summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/action_map_editor.cpp29
-rw-r--r--editor/action_map_editor.h3
-rw-r--r--editor/animation_bezier_editor.cpp41
-rw-r--r--editor/animation_bezier_editor.h5
-rw-r--r--editor/animation_track_editor.cpp175
-rw-r--r--editor/animation_track_editor.h15
-rw-r--r--editor/animation_track_editor_plugins.cpp5
-rw-r--r--editor/array_property_edit.cpp301
-rw-r--r--editor/code_editor.cpp7
-rw-r--r--editor/connections_dialog.cpp409
-rw-r--r--editor/connections_dialog.h35
-rw-r--r--editor/create_dialog.cpp20
-rw-r--r--editor/create_dialog.h3
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_parser.cpp2
-rw-r--r--editor/debugger/editor_debugger_node.cpp2
-rw-r--r--editor/debugger/editor_profiler.cpp4
-rw-r--r--editor/debugger/editor_visual_profiler.cpp4
-rw-r--r--editor/debugger/script_editor_debugger.cpp38
-rw-r--r--editor/debugger/script_editor_debugger.h2
-rw-r--r--editor/dependency_editor.cpp12
-rw-r--r--editor/dictionary_property_edit.cpp177
-rw-r--r--editor/dictionary_property_edit.h64
-rw-r--r--editor/doc_tools.cpp79
-rw-r--r--editor/editor_about.cpp4
-rw-r--r--editor/editor_asset_installer.cpp1
-rw-r--r--editor/editor_audio_buses.cpp44
-rw-r--r--editor/editor_autoload_settings.cpp18
-rw-r--r--editor/editor_data.cpp69
-rw-r--r--editor/editor_data.h7
-rw-r--r--editor/editor_feature_profile.cpp2
-rw-r--r--editor/editor_file_system.cpp185
-rw-r--r--editor/editor_file_system.h14
-rw-r--r--editor/editor_help.cpp12
-rw-r--r--editor/editor_help.h2
-rw-r--r--editor/editor_inspector.cpp102
-rw-r--r--editor/editor_inspector.h14
-rw-r--r--editor/editor_locale_dialog.cpp9
-rw-r--r--editor/editor_log.cpp5
-rw-r--r--editor/editor_log.h1
-rw-r--r--editor/editor_node.cpp785
-rw-r--r--editor/editor_node.h58
-rw-r--r--editor/editor_plugin.cpp20
-rw-r--r--editor/editor_plugin.h9
-rw-r--r--editor/editor_properties.cpp380
-rw-r--r--editor/editor_properties.h43
-rw-r--r--editor/editor_properties_array_dict.cpp174
-rw-r--r--editor/editor_properties_array_dict.h4
-rw-r--r--editor/editor_property_name_processor.cpp2
-rw-r--r--editor/editor_quick_open.cpp14
-rw-r--r--editor/editor_quick_open.h1
-rw-r--r--editor/editor_resource_picker.cpp124
-rw-r--r--editor/editor_resource_picker.h8
-rw-r--r--editor/editor_run.cpp4
-rw-r--r--editor/editor_run_native.cpp107
-rw-r--r--editor/editor_run_native.h7
-rw-r--r--editor/editor_settings.cpp7
-rw-r--r--editor/editor_settings_dialog.cpp14
-rw-r--r--editor/editor_spin_slider.cpp25
-rw-r--r--editor/editor_spin_slider.h2
-rw-r--r--editor/editor_themes.cpp167
-rw-r--r--editor/editor_title_bar.cpp4
-rw-r--r--editor/editor_title_bar.h2
-rw-r--r--editor/editor_toaster.cpp59
-rw-r--r--editor/editor_toaster.h2
-rw-r--r--editor/editor_undo_redo_manager.cpp12
-rw-r--r--editor/editor_undo_redo_manager.h11
-rw-r--r--editor/editor_zoom_widget.cpp20
-rw-r--r--editor/event_listener_line_edit.cpp40
-rw-r--r--editor/event_listener_line_edit.h2
-rw-r--r--editor/export/editor_export.cpp35
-rw-r--r--editor/export/editor_export_platform.cpp338
-rw-r--r--editor/export/editor_export_platform.h13
-rw-r--r--editor/export/editor_export_platform_pc.h1
-rw-r--r--editor/export/editor_export_plugin.cpp13
-rw-r--r--editor/export/editor_export_plugin.h18
-rw-r--r--editor/export/editor_export_preset.cpp105
-rw-r--r--editor/export/editor_export_preset.h26
-rw-r--r--editor/export/project_export.cpp186
-rw-r--r--editor/export/project_export.h13
-rw-r--r--editor/fbx_importer_manager.cpp8
-rw-r--r--editor/filesystem_dock.cpp121
-rw-r--r--editor/filesystem_dock.h4
-rw-r--r--editor/groups_editor.cpp14
-rw-r--r--editor/history_dock.cpp2
-rw-r--r--editor/history_dock.h2
-rw-r--r--editor/icons/AnimatableBody2D.svg2
-rw-r--r--editor/icons/AnimatableBody3D.svg2
-rw-r--r--editor/icons/AnimationLibrary.svg2
-rw-r--r--editor/icons/BoneMapHumanBody.svg27
-rw-r--r--editor/icons/BoneMapHumanFace.svg2
-rw-r--r--editor/icons/BoneMapHumanLeftHand.svg2
-rw-r--r--editor/icons/BoneMapHumanRightHand.svg2
-rw-r--r--editor/icons/CPUParticles2D.svg2
-rw-r--r--editor/icons/CollisionPolygon2D.svg2
-rw-r--r--editor/icons/CollisionShape2D.svg2
-rw-r--r--editor/icons/DampedSpringJoint2D.svg2
-rw-r--r--editor/icons/FontFile.svg2
-rw-r--r--editor/icons/FontVariation.svg2
-rw-r--r--editor/icons/GizmoDirectionalLight.svg2
-rw-r--r--editor/icons/GizmoLight.svg2
-rw-r--r--editor/icons/GradientTexture2D.svg2
-rw-r--r--editor/icons/GrooveJoint2D.svg2
-rw-r--r--editor/icons/GroupViewport.svg2
-rw-r--r--editor/icons/Keyboard.svg2
-rw-r--r--editor/icons/KeyboardError.svg1
-rw-r--r--editor/icons/KeyboardLabel.svg1
-rw-r--r--editor/icons/KeyboardPhysical.svg2
-rw-r--r--editor/icons/LabelSettings.svg2
-rw-r--r--editor/icons/LightOccluder2D.svg2
-rw-r--r--editor/icons/LockViewport.svg2
-rw-r--r--editor/icons/Marker2D.svg2
-rw-r--r--editor/icons/MultiplayerSpawner.svg2
-rw-r--r--editor/icons/MultiplayerSynchronizer.svg2
-rw-r--r--editor/icons/Navigation2D.svg2
-rw-r--r--editor/icons/NavigationAgent2D.svg2
-rw-r--r--editor/icons/NavigationObstacle2D.svg2
-rw-r--r--editor/icons/NavigationRegion2D.svg2
-rw-r--r--editor/icons/NewKey.svg2
-rw-r--r--editor/icons/OccluderPolygon2D.svg2
-rw-r--r--editor/icons/ParallaxLayer.svg2
-rw-r--r--editor/icons/Path2D.svg2
-rw-r--r--editor/icons/PathFollow2D.svg2
-rw-r--r--editor/icons/PinJoint2D.svg2
-rw-r--r--editor/icons/PingPongLoop.svg2
-rw-r--r--editor/icons/PlayRemote.svg1
-rw-r--r--editor/icons/PointLight2D.svg2
-rw-r--r--editor/icons/README.md2
-rw-r--r--editor/icons/RemoteTransform2D.svg2
-rw-r--r--editor/icons/RigidBody2D.svg2
-rw-r--r--editor/icons/StaticBody2D.svg2
-rw-r--r--editor/icons/StyleBoxGridVisible.svg2
-rw-r--r--editor/icons/SystemFont.svg2
-rw-r--r--editor/icons/Texture3D.svg2
-rw-r--r--editor/icons/TileMap.svg2
-rw-r--r--editor/icons/ToolBoneSelect.svg2
-rw-r--r--editor/icons/TouchScreenButton.svg2
-rw-r--r--editor/icons/UseBlendDisable.svg1
-rw-r--r--editor/icons/UseBlendEnable.svg1
-rw-r--r--editor/icons/VisibleOnScreenEnabler2D.svg2
-rw-r--r--editor/icons/YSort.svg2
-rw-r--r--editor/icons/ZoomLess.svg2
-rw-r--r--editor/icons/ZoomMore.svg2
-rw-r--r--editor/icons/ZoomReset.svg2
-rw-r--r--editor/import/collada.cpp164
-rw-r--r--editor/import/editor_import_collada.cpp2
-rw-r--r--editor/import/editor_import_plugin.cpp6
-rw-r--r--editor/import/editor_import_plugin.h2
-rw-r--r--editor/import/resource_importer_layered_texture.cpp124
-rw-r--r--editor/import/resource_importer_layered_texture.h2
-rw-r--r--editor/import/resource_importer_obj.cpp50
-rw-r--r--editor/import/resource_importer_scene.cpp16
-rw-r--r--editor/import/resource_importer_scene.h20
-rw-r--r--editor/import/resource_importer_shader_file.cpp1
-rw-r--r--editor/import/resource_importer_texture.cpp130
-rw-r--r--editor/import/scene_import_settings.cpp30
-rw-r--r--editor/input_event_configuration_dialog.cpp157
-rw-r--r--editor/input_event_configuration_dialog.h17
-rw-r--r--editor/inspector_dock.cpp49
-rw-r--r--editor/inspector_dock.h2
-rw-r--r--editor/localization_editor.cpp19
-rw-r--r--editor/multi_node_edit.cpp12
-rw-r--r--editor/plugin_config_dialog.cpp4
-rw-r--r--editor/plugin_config_dialog.h2
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp12
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp32
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.h2
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp21
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp30
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.h1
-rw-r--r--editor/plugins/animation_library_editor.cpp28
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp85
-rw-r--r--editor/plugins/animation_player_editor_plugin.h2
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp124
-rw-r--r--editor/plugins/animation_state_machine_editor.h22
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp13
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp35
-rw-r--r--editor/plugins/asset_library_editor_plugin.h1
-rw-r--r--editor/plugins/audio_stream_randomizer_editor_plugin.cpp4
-rw-r--r--editor/plugins/bit_map_editor_plugin.cpp2
-rw-r--r--editor/plugins/bone_map_editor_plugin.cpp14
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp198
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h13
-rw-r--r--editor/plugins/cast_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/control_editor_plugin.cpp9
-rw-r--r--editor/plugins/control_editor_plugin.h2
-rw-r--r--editor/plugins/curve_editor_plugin.cpp14
-rw-r--r--editor/plugins/dedicated_server_export_plugin.cpp139
-rw-r--r--editor/plugins/dedicated_server_export_plugin.h (renamed from editor/array_property_edit.h)49
-rw-r--r--editor/plugins/font_config_plugin.cpp6
-rw-r--r--editor/plugins/font_config_plugin.h6
-rw-r--r--editor/plugins/gpu_particles_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.cpp4
-rw-r--r--editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp2
-rw-r--r--editor/plugins/gradient_editor.cpp185
-rw-r--r--editor/plugins/gradient_texture_2d_editor_plugin.cpp6
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/lightmap_gi_editor_plugin.cpp56
-rw-r--r--editor/plugins/line_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/material_editor_plugin.cpp6
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp2
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp18
-rw-r--r--editor/plugins/navigation_link_2d_editor_plugin.cpp38
-rw-r--r--editor/plugins/navigation_link_2d_editor_plugin.h4
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp8
-rw-r--r--editor/plugins/node_3d_editor_gizmos.cpp269
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp58
-rw-r--r--editor/plugins/node_3d_editor_plugin.h1
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp10
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp12
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp26
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.h5
-rw-r--r--editor/plugins/polygon_3d_editor_plugin.cpp10
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp16
-rw-r--r--editor/plugins/root_motion_editor_plugin.cpp2
-rw-r--r--editor/plugins/root_motion_editor_plugin.h2
-rw-r--r--editor/plugins/script_editor_plugin.cpp74
-rw-r--r--editor/plugins/script_editor_plugin.h3
-rw-r--r--editor/plugins/script_text_editor.cpp16
-rw-r--r--editor/plugins/script_text_editor.h1
-rw-r--r--editor/plugins/shader_editor_plugin.cpp54
-rw-r--r--editor/plugins/shader_editor_plugin.h3
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp158
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp8
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp606
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h51
-rw-r--r--editor/plugins/text_editor.cpp2
-rw-r--r--editor/plugins/text_shader_editor.cpp9
-rw-r--r--editor/plugins/texture_editor_plugin.cpp2
-rw-r--r--editor/plugins/texture_layered_editor_plugin.cpp2
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp62
-rw-r--r--editor/plugins/texture_region_editor_plugin.h7
-rw-r--r--editor/plugins/theme_editor_plugin.cpp58
-rw-r--r--editor/plugins/tiles/atlas_merging_dialog.cpp81
-rw-r--r--editor/plugins/tiles/atlas_merging_dialog.h2
-rw-r--r--editor/plugins/tiles/tile_atlas_view.cpp71
-rw-r--r--editor/plugins/tiles/tile_atlas_view.h7
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp229
-rw-r--r--editor/plugins/tiles/tile_data_editors.h4
-rw-r--r--editor/plugins/tiles/tile_map_editor.cpp129
-rw-r--r--editor/plugins/tiles/tile_map_editor.h3
-rw-r--r--editor/plugins/tiles/tile_proxies_manager_dialog.cpp13
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.cpp251
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.h8
-rw-r--r--editor/plugins/tiles/tile_set_editor.cpp97
-rw-r--r--editor/plugins/tiles/tile_set_editor.h3
-rw-r--r--editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp35
-rw-r--r--editor/plugins/tiles/tile_set_scenes_collection_source_editor.h2
-rw-r--r--editor/plugins/tiles/tiles_editor_plugin.cpp31
-rw-r--r--editor/plugins/tiles/tiles_editor_plugin.h2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp372
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h20
-rw-r--r--editor/plugins/voxel_gi_editor_plugin.cpp39
-rw-r--r--editor/progress_dialog.cpp33
-rw-r--r--editor/progress_dialog.h2
-rw-r--r--editor/project_converter_3_to_4.cpp444
-rw-r--r--editor/project_converter_3_to_4.h16
-rw-r--r--editor/project_manager.cpp14
-rw-r--r--editor/project_settings_editor.cpp30
-rw-r--r--editor/register_editor_types.cpp2
-rw-r--r--editor/rename_dialog.cpp2
-rw-r--r--editor/scene_create_dialog.cpp2
-rw-r--r--editor/scene_tree_dock.cpp74
-rw-r--r--editor/scene_tree_editor.cpp20
-rw-r--r--editor/shader_globals_editor.cpp6
-rw-r--r--editor/translations/af.po2
-rw-r--r--editor/translations/ar.po14
-rw-r--r--editor/translations/az.po2
-rw-r--r--editor/translations/bg.po2
-rw-r--r--editor/translations/bn.po17
-rw-r--r--editor/translations/br.po2
-rw-r--r--editor/translations/ca.po2
-rw-r--r--editor/translations/cs.po524
-rw-r--r--editor/translations/da.po2
-rw-r--r--editor/translations/de.po29
-rw-r--r--editor/translations/editor.pot6
-rw-r--r--editor/translations/el.po356
-rw-r--r--editor/translations/en_Shaw.po2
-rw-r--r--editor/translations/eo.po2
-rw-r--r--editor/translations/es.po65
-rw-r--r--editor/translations/es_AR.po22
-rw-r--r--editor/translations/et.po15
-rw-r--r--editor/translations/eu.po2
-rw-r--r--editor/translations/fa.po63
-rw-r--r--editor/translations/fi.po2
-rw-r--r--editor/translations/fil.po2
-rw-r--r--editor/translations/fr.po605
-rw-r--r--editor/translations/ga.po2
-rw-r--r--editor/translations/gl.po2
-rw-r--r--editor/translations/he.po249
-rw-r--r--editor/translations/hi.po2
-rw-r--r--editor/translations/hr.po11
-rw-r--r--editor/translations/hu.po2
-rw-r--r--editor/translations/id.po12
-rw-r--r--editor/translations/ig.po2
-rw-r--r--editor/translations/is.po2
-rw-r--r--editor/translations/it.po12
-rw-r--r--editor/translations/ja.po453
-rw-r--r--editor/translations/ka.po2
-rw-r--r--editor/translations/km.po2
-rw-r--r--editor/translations/ko.po64
-rw-r--r--editor/translations/lt.po2
-rw-r--r--editor/translations/lv.po2
-rw-r--r--editor/translations/mk.po2
-rw-r--r--editor/translations/ml.po2
-rw-r--r--editor/translations/mr.po2
-rw-r--r--editor/translations/ms.po2
-rw-r--r--editor/translations/nb.po112
-rw-r--r--editor/translations/nl.po2
-rw-r--r--editor/translations/pl.po1014
-rw-r--r--editor/translations/pr.po2
-rw-r--r--editor/translations/pt.po70
-rw-r--r--editor/translations/pt_BR.po97
-rw-r--r--editor/translations/ro.po435
-rw-r--r--editor/translations/ru.po2
-rw-r--r--editor/translations/si.po2
-rw-r--r--editor/translations/sk.po11
-rw-r--r--editor/translations/sl.po2
-rw-r--r--editor/translations/sq.po2
-rw-r--r--editor/translations/sr_Cyrl.po2
-rw-r--r--editor/translations/sr_Latn.po2
-rw-r--r--editor/translations/sv.po54
-rw-r--r--editor/translations/te.po2
-rw-r--r--editor/translations/th.po2
-rw-r--r--editor/translations/tl.po2
-rw-r--r--editor/translations/tr.po2
-rw-r--r--editor/translations/uk.po135
-rw-r--r--editor/translations/ur_PK.po2
-rw-r--r--editor/translations/vi.po2
-rw-r--r--editor/translations/zh_CN.po49
-rw-r--r--editor/translations/zh_HK.po2
-rw-r--r--editor/translations/zh_TW.po110
333 files changed, 8441 insertions, 6897 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index 8e55f3a1c3..146b5a794c 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -198,6 +198,14 @@ void ActionMapEditor::_tree_button_pressed(Object *p_item, int p_column, int p_i
emit_signal(SNAME("action_edited"), action_name, action);
} break;
+ case ActionMapEditor::BUTTON_REVERT_ACTION: {
+ ERR_FAIL_COND_MSG(!item->has_meta("__action_initial"), "Tree Item for action which can be reverted is expected to have meta value with initial value of action.");
+
+ Dictionary action = item->get_meta("__action_initial").duplicate();
+ String action_name = item->get_meta("__name");
+
+ emit_signal(SNAME("action_edited"), action_name, action);
+ } break;
default:
break;
}
@@ -354,10 +362,6 @@ void ActionMapEditor::_notification(int p_what) {
}
void ActionMapEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &ActionMapEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &ActionMapEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &ActionMapEditor::drop_data_fw);
-
ADD_SIGNAL(MethodInfo("action_added", PropertyInfo(Variant::STRING, "name")));
ADD_SIGNAL(MethodInfo("action_edited", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::DICTIONARY, "new_action")));
ADD_SIGNAL(MethodInfo("action_removed", PropertyInfo(Variant::STRING, "name")));
@@ -431,6 +435,13 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info
action_item->set_range(1, deadzone);
// Third column - buttons
+ if (action_info.has_initial) {
+ bool deadzone_eq = action_info.action_initial["deadzone"] == action_info.action["deadzone"];
+ bool events_eq = Shortcut::is_event_array_equal(action_info.action_initial["events"], action_info.action["events"]);
+ bool action_eq = deadzone_eq && events_eq;
+ action_item->set_meta("__action_initial", action_info.action_initial);
+ action_item->add_button(2, action_tree->get_theme_icon(SNAME("ReloadSmall"), SNAME("EditorIcons")), BUTTON_REVERT_ACTION, action_eq, action_eq ? TTR("Cannot Revert - Action is same as initial") : TTR("Revert Action"));
+ }
action_item->add_button(2, action_tree->get_theme_icon(SNAME("Add"), SNAME("EditorIcons")), BUTTON_ADD_EVENT, false, TTR("Add Event"));
action_item->add_button(2, action_tree->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_ACTION, !action_info.editable, action_info.editable ? TTR("Remove Action") : TTR("Cannot Remove Action"));
@@ -453,10 +464,14 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info
// First Column - Icon
Ref<InputEventKey> k = event;
if (k.is_valid()) {
- if (k->get_physical_keycode() == Key::NONE) {
+ if (k->get_physical_keycode() == Key::NONE && k->get_keycode() == Key::NONE && k->get_key_label() != Key::NONE) {
+ event_item->set_icon(0, action_tree->get_theme_icon(SNAME("KeyboardLabel"), SNAME("EditorIcons")));
+ } else if (k->get_keycode() != Key::NONE) {
event_item->set_icon(0, action_tree->get_theme_icon(SNAME("Keyboard"), SNAME("EditorIcons")));
- } else {
+ } else if (k->get_physical_keycode() != Key::NONE) {
event_item->set_icon(0, action_tree->get_theme_icon(SNAME("KeyboardPhysical"), SNAME("EditorIcons")));
+ } else {
+ event_item->set_icon(0, action_tree->get_theme_icon(SNAME("KeyboardError"), SNAME("EditorIcons")));
}
}
@@ -578,7 +593,7 @@ ActionMapEditor::ActionMapEditor() {
action_tree->connect("button_clicked", callable_mp(this, &ActionMapEditor::_tree_button_pressed));
main_vbox->add_child(action_tree);
- action_tree->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(action_tree, ActionMapEditor);
// Adding event dialog
event_config_dialog = memnew(InputEventConfigurationDialog);
diff --git a/editor/action_map_editor.h b/editor/action_map_editor.h
index 433a72a807..2848d23e83 100644
--- a/editor/action_map_editor.h
+++ b/editor/action_map_editor.h
@@ -49,6 +49,8 @@ public:
struct ActionInfo {
String name;
Dictionary action;
+ bool has_initial = false;
+ Dictionary action_initial;
Ref<Texture2D> icon = Ref<Texture2D>();
bool editable = true;
@@ -60,6 +62,7 @@ private:
BUTTON_EDIT_EVENT,
BUTTON_REMOVE_ACTION,
BUTTON_REMOVE_EVENT,
+ BUTTON_REVERT_ACTION,
};
Vector<ActionInfo> actions_cache;
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index d4ab907e78..8defa04ada 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -788,7 +788,7 @@ void AnimationBezierTrackEdit::_clear_selection() {
}
void AnimationBezierTrackEdit::_change_selected_keys_handle_mode(Animation::HandleMode p_mode, bool p_auto) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Update Selected Key Handles"));
for (SelectionSet::Element *E = selection.back(); E; E = E->prev()) {
const IntPair track_key_pair = E->get();
@@ -985,7 +985,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if (I.value.has_point(mb->get_position())) {
if (I.key == REMOVE_ICON) {
if (!read_only) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action("Remove Bezier Track");
undo_redo->add_do_method(this, "_update_locked_tracks_after", track);
@@ -1172,7 +1172,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
time += 0.0001;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Bezier Point"));
undo_redo->add_do_method(animation.ptr(), "bezier_track_insert_key", selected_track, time, new_point);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", selected_track, time);
@@ -1270,7 +1270,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if (moving_selection) {
//combit it
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Move Bezier Points"));
List<AnimMoveRestore> to_restore;
@@ -1471,7 +1471,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if ((moving_handle == -1 || moving_handle == 1) && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) {
if (!read_only) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Move Bezier Points"));
if (moving_handle == -1) {
real_t ratio = timeline->get_zoom_scale() * v_zoom;
@@ -1489,32 +1489,21 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
}
}
-void AnimationBezierTrackEdit::_scroll_callback(Vector2 p_scroll_vec, bool p_alt) {
- _pan_callback(-p_scroll_vec * 32);
-}
-
-void AnimationBezierTrackEdit::_pan_callback(Vector2 p_scroll_vec) {
+void AnimationBezierTrackEdit::_pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event) {
v_scroll += p_scroll_vec.y * v_zoom;
v_scroll = CLAMP(v_scroll, -100000, 100000);
timeline->set_value(timeline->get_value() - p_scroll_vec.x / timeline->get_zoom_scale());
queue_redraw();
}
-void AnimationBezierTrackEdit::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) {
+void AnimationBezierTrackEdit::_zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event) {
const float v_zoom_orig = v_zoom;
- if (p_alt) {
+ Ref<InputEventWithModifiers> iewm = p_event;
+ if (iewm.is_valid() && iewm->is_alt_pressed()) {
// Alternate zoom (doesn't affect timeline).
- if (p_scroll_vec.y > 0) {
- v_zoom = MIN(v_zoom * 1.2, 100000);
- } else {
- v_zoom = MAX(v_zoom / 1.2, 0.000001);
- }
+ v_zoom = CLAMP(v_zoom * p_zoom_factor, 0.000001, 100000);
} else {
- if (p_scroll_vec.y > 0) {
- timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() / 1.05);
- } else {
- timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() * 1.05);
- }
+ timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() / p_zoom_factor);
}
v_scroll = v_scroll + (p_origin.y - get_size().y / 2.0) * (v_zoom - v_zoom_orig);
queue_redraw();
@@ -1543,7 +1532,7 @@ void AnimationBezierTrackEdit::_menu_selected(int p_index) {
time += 0.001;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Bezier Point"));
undo_redo->add_do_method(animation.ptr(), "track_insert_key", selected_track, time, new_point);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", selected_track, time);
@@ -1591,7 +1580,7 @@ void AnimationBezierTrackEdit::duplicate_selection() {
}
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Duplicate Keys"));
List<Pair<int, real_t>> new_selection_values;
@@ -1637,7 +1626,7 @@ void AnimationBezierTrackEdit::duplicate_selection() {
void AnimationBezierTrackEdit::delete_selection() {
if (selection.size()) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Delete Keys"));
for (SelectionSet::Element *E = selection.back(); E; E = E->prev()) {
@@ -1681,7 +1670,7 @@ void AnimationBezierTrackEdit::_bind_methods() {
AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
panner.instantiate();
- panner->set_callbacks(callable_mp(this, &AnimationBezierTrackEdit::_scroll_callback), callable_mp(this, &AnimationBezierTrackEdit::_pan_callback), callable_mp(this, &AnimationBezierTrackEdit::_zoom_callback));
+ panner->set_callbacks(callable_mp(this, &AnimationBezierTrackEdit::_pan_callback), callable_mp(this, &AnimationBezierTrackEdit::_zoom_callback));
play_position = memnew(Control);
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h
index e6d6424ef2..dbc231ccac 100644
--- a/editor/animation_bezier_editor.h
+++ b/editor/animation_bezier_editor.h
@@ -174,9 +174,8 @@ class AnimationBezierTrackEdit : public Control {
SelectionSet selection;
Ref<ViewPanner> panner;
- void _scroll_callback(Vector2 p_scroll_vec, bool p_alt);
- void _pan_callback(Vector2 p_scroll_vec);
- void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt);
+ void _pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event);
+ void _zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event);
void _draw_line_clipped(const Vector2 &p_from, const Vector2 &p_to, const Color &p_color, int p_clip_left, int p_clip_right);
void _draw_track(int p_track, const Color &p_color);
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 65bc7b2414..ee4163bc14 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -107,7 +107,7 @@ bool AnimationTrackKeyEdit::_set(const StringName &p_name, const Variant &p_valu
float val = p_value;
float prev_val = animation->track_get_key_transition(track, key);
setting = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Change Transition"), UndoRedo::MERGE_ENDS);
undo_redo->add_do_method(animation.ptr(), "track_set_key_transition", track, key, val);
undo_redo->add_undo_method(animation.ptr(), "track_set_key_transition", track, key, prev_val);
@@ -119,7 +119,7 @@ bool AnimationTrackKeyEdit::_set(const StringName &p_name, const Variant &p_valu
return true;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (animation->track_get_type(track)) {
case Animation::TYPE_POSITION_3D:
case Animation::TYPE_ROTATION_3D:
@@ -704,7 +704,7 @@ bool AnimationMultiTrackKeyEdit::_set(const StringName &p_name, const Variant &p
float val = p_value;
float prev_val = animation->track_get_key_transition(track, key);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (!setting) {
setting = true;
undo_redo->create_action(TTR("Animation Multi Change Transition"), UndoRedo::MERGE_ENDS);
@@ -714,7 +714,7 @@ bool AnimationMultiTrackKeyEdit::_set(const StringName &p_name, const Variant &p
update_obj = true;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (animation->track_get_type(track)) {
case Animation::TYPE_POSITION_3D:
case Animation::TYPE_ROTATION_3D:
@@ -925,7 +925,7 @@ bool AnimationMultiTrackKeyEdit::_set(const StringName &p_name, const Variant &p
}
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (setting) {
if (update_obj) {
undo_redo->add_do_method(this, "_update_obj", animation);
@@ -1252,8 +1252,8 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) {
}
editing = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Change Animation Length"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Change Animation Length"), UndoRedo::MERGE_ENDS);
undo_redo->add_do_method(animation.ptr(), "set_length", p_new_len);
undo_redo->add_undo_method(animation.ptr(), "set_length", animation->get_length());
undo_redo->commit_action();
@@ -1265,7 +1265,7 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) {
void AnimationTimelineEdit::_anim_loop_pressed() {
if (!read_only) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Animation Loop"));
switch (animation->get_loop_mode()) {
case Animation::LOOP_NONE: {
@@ -1704,25 +1704,13 @@ Control::CursorShape AnimationTimelineEdit::get_cursor_shape(const Point2 &p_pos
}
}
-void AnimationTimelineEdit::_scroll_callback(Vector2 p_scroll_vec, bool p_alt) {
- // Timeline has no vertical scroll, so we change it to horizontal.
- p_scroll_vec.x += p_scroll_vec.y;
- _pan_callback(-p_scroll_vec * 32);
-}
-
-void AnimationTimelineEdit::_pan_callback(Vector2 p_scroll_vec) {
+void AnimationTimelineEdit::_pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event) {
set_value(get_value() - p_scroll_vec.x / get_zoom_scale());
}
-void AnimationTimelineEdit::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) {
- double new_zoom_value;
+void AnimationTimelineEdit::_zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event) {
double current_zoom_value = get_zoom()->get_value();
- if (current_zoom_value <= 0.1) {
- new_zoom_value = MAX(0.01, current_zoom_value - 0.01 * SIGN(p_scroll_vec.y));
- } else {
- new_zoom_value = p_scroll_vec.y > 0 ? MAX(0.01, current_zoom_value / 1.05) : current_zoom_value * 1.05;
- }
- get_zoom()->set_value(new_zoom_value);
+ get_zoom()->set_value(MAX(0.01, current_zoom_value * p_zoom_factor));
}
void AnimationTimelineEdit::set_use_fps(bool p_use_fps) {
@@ -1798,7 +1786,8 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
len_hb->hide();
panner.instantiate();
- panner->set_callbacks(callable_mp(this, &AnimationTimelineEdit::_scroll_callback), callable_mp(this, &AnimationTimelineEdit::_pan_callback), callable_mp(this, &AnimationTimelineEdit::_zoom_callback));
+ panner->set_callbacks(callable_mp(this, &AnimationTimelineEdit::_pan_callback), callable_mp(this, &AnimationTimelineEdit::_zoom_callback));
+ panner->set_pan_axis(ViewPanner::PAN_AXIS_HORIZONTAL);
set_layout_direction(Control::LAYOUT_DIRECTION_LTR);
}
@@ -1965,6 +1954,10 @@ void AnimationTrackEdit::_notification(int p_what) {
get_theme_icon(SNAME("TrackDiscrete"), SNAME("EditorIcons")),
get_theme_icon(SNAME("TrackCapture"), SNAME("EditorIcons"))
};
+ Ref<Texture2D> blend_icon[2] = {
+ get_theme_icon(SNAME("UseBlendEnable"), SNAME("EditorIcons")),
+ get_theme_icon(SNAME("UseBlendDisable"), SNAME("EditorIcons")),
+ };
int ofs = get_size().width - timeline->get_buttons_width();
@@ -1993,6 +1986,11 @@ void AnimationTrackEdit::_notification(int p_what) {
if (!animation->track_is_compressed(track) && animation->track_get_type(track) == Animation::TYPE_VALUE) {
draw_texture(update_icon, update_mode_rect.position);
}
+ if (animation->track_get_type(track) == Animation::TYPE_AUDIO) {
+ Ref<Texture2D> use_blend_icon = blend_icon[animation->audio_track_is_use_blend(track) ? 0 : 1];
+ Vector2 use_blend_icon_pos = update_mode_rect.position + (update_mode_rect.size - use_blend_icon->get_size()) / 2;
+ draw_texture(use_blend_icon, use_blend_icon_pos);
+ }
// Make it easier to click.
update_mode_rect.position.y = 0;
update_mode_rect.size.y = get_size().height;
@@ -2001,13 +1999,12 @@ void AnimationTrackEdit::_notification(int p_what) {
update_mode_rect.size.x += hsep / 2;
if (!read_only) {
- if (animation->track_get_type(track) == Animation::TYPE_VALUE) {
+ if (animation->track_get_type(track) == Animation::TYPE_VALUE || animation->track_get_type(track) == Animation::TYPE_AUDIO) {
draw_texture(down_icon, Vector2(ofs, int(get_size().height - down_icon->get_height()) / 2));
update_mode_rect.size.x += down_icon->get_width();
} else if (animation->track_get_type(track) == Animation::TYPE_BEZIER) {
Ref<Texture2D> bezier_icon = get_theme_icon(SNAME("EditBezier"), SNAME("EditorIcons"));
update_mode_rect.size.x += down_icon->get_width();
-
update_mode_rect = Rect2();
} else {
update_mode_rect = Rect2();
@@ -2392,7 +2389,7 @@ void AnimationTrackEdit::_zoom_changed() {
}
void AnimationTrackEdit::_path_submitted(const String &p_text) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Track Path"));
undo_redo->add_do_method(animation.ptr(), "track_set_path", track, p_text);
undo_redo->add_undo_method(animation.ptr(), "track_set_path", track, animation->track_get_path(track));
@@ -2450,7 +2447,11 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
}
if (update_mode_rect.has_point(p_pos)) {
- return TTR("Update Mode (How this property is set)");
+ if (animation->track_get_type(track) == Animation::TYPE_AUDIO) {
+ return TTR("Use Blend");
+ } else {
+ return TTR("Update Mode (How this property is set)");
+ }
}
if (interp_mode_rect.has_point(p_pos)) {
@@ -2630,7 +2631,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if (!read_only) {
if (check_rect.has_point(pos)) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Toggle Track Enabled"));
undo_redo->add_do_method(animation.ptr(), "track_set_enabled", track, !animation->track_is_enabled(track));
undo_redo->add_undo_method(animation.ptr(), "track_set_enabled", track, animation->track_is_enabled(track));
@@ -2652,9 +2653,14 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
}
menu->clear();
- menu->add_icon_item(get_theme_icon(SNAME("TrackContinuous"), SNAME("EditorIcons")), TTR("Continuous"), MENU_CALL_MODE_CONTINUOUS);
- menu->add_icon_item(get_theme_icon(SNAME("TrackDiscrete"), SNAME("EditorIcons")), TTR("Discrete"), MENU_CALL_MODE_DISCRETE);
- menu->add_icon_item(get_theme_icon(SNAME("TrackCapture"), SNAME("EditorIcons")), TTR("Capture"), MENU_CALL_MODE_CAPTURE);
+ if (animation->track_get_type(track) == Animation::TYPE_AUDIO) {
+ menu->add_icon_item(get_theme_icon(SNAME("UseBlendEnable"), SNAME("EditorIcons")), TTR("Use Blend"), MENU_USE_BLEND_ENABLED);
+ menu->add_icon_item(get_theme_icon(SNAME("UseBlendDisable"), SNAME("EditorIcons")), TTR("Don't Use Blend"), MENU_USE_BLEND_DISABLED);
+ } else {
+ menu->add_icon_item(get_theme_icon(SNAME("TrackContinuous"), SNAME("EditorIcons")), TTR("Continuous"), MENU_CALL_MODE_CONTINUOUS);
+ menu->add_icon_item(get_theme_icon(SNAME("TrackDiscrete"), SNAME("EditorIcons")), TTR("Discrete"), MENU_CALL_MODE_DISCRETE);
+ menu->add_icon_item(get_theme_icon(SNAME("TrackCapture"), SNAME("EditorIcons")), TTR("Capture"), MENU_CALL_MODE_CAPTURE);
+ }
menu->reset_size();
Vector2 popup_pos = get_screen_position() + update_mode_rect.position + Vector2(0, update_mode_rect.size.height);
@@ -2673,7 +2679,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
menu->add_icon_item(get_theme_icon(SNAME("InterpRaw"), SNAME("EditorIcons")), TTR("Nearest"), MENU_INTERPOLATION_NEAREST);
menu->add_icon_item(get_theme_icon(SNAME("InterpLinear"), SNAME("EditorIcons")), TTR("Linear"), MENU_INTERPOLATION_LINEAR);
menu->add_icon_item(get_theme_icon(SNAME("InterpCubic"), SNAME("EditorIcons")), TTR("Cubic"), MENU_INTERPOLATION_CUBIC);
- // Check is angle property.
+ // Check whether it is angle property.
AnimationPlayerEditor *ape = AnimationPlayerEditor::get_singleton();
if (ape) {
AnimationPlayer *ap = ape->get_player();
@@ -2919,7 +2925,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
}
}
- if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE && moving_selection_attempt) {
+ if (mm.is_valid() && mm->get_button_mask().has_flag(MouseButtonMask::LEFT) && moving_selection_attempt) {
if (!moving_selection) {
moving_selection = true;
emit_signal(SNAME("move_selection_begin"));
@@ -2980,7 +2986,6 @@ bool AnimationTrackEdit::can_drop_data(const Point2 &p_point, const Variant &p_d
}
const_cast<AnimationTrackEdit *>(this)->queue_redraw();
- const_cast<AnimationTrackEdit *>(this)->emit_signal(SNAME("drop_attempted"), track);
return true;
}
@@ -3020,7 +3025,7 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
case MENU_CALL_MODE_DISCRETE:
case MENU_CALL_MODE_CAPTURE: {
Animation::UpdateMode update_mode = Animation::UpdateMode(p_index);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Animation Update Mode"));
undo_redo->add_do_method(animation.ptr(), "value_track_set_update_mode", track, update_mode);
undo_redo->add_undo_method(animation.ptr(), "value_track_set_update_mode", track, animation->value_track_get_update_mode(track));
@@ -3034,7 +3039,7 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
case MENU_INTERPOLATION_LINEAR_ANGLE:
case MENU_INTERPOLATION_CUBIC_ANGLE: {
Animation::InterpolationType interp_mode = Animation::InterpolationType(p_index - MENU_INTERPOLATION_NEAREST);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Animation Interpolation Mode"));
undo_redo->add_do_method(animation.ptr(), "track_set_interpolation_type", track, interp_mode);
undo_redo->add_undo_method(animation.ptr(), "track_set_interpolation_type", track, animation->track_get_interpolation_type(track));
@@ -3044,7 +3049,7 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
case MENU_LOOP_WRAP:
case MENU_LOOP_CLAMP: {
bool loop_wrap = p_index == MENU_LOOP_WRAP;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Animation Loop Mode"));
undo_redo->add_do_method(animation.ptr(), "track_set_interpolation_loop_wrap", track, loop_wrap);
undo_redo->add_undo_method(animation.ptr(), "track_set_interpolation_loop_wrap", track, animation->track_get_interpolation_loop_wrap(track));
@@ -3066,6 +3071,16 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
emit_signal(SNAME("delete_request"));
} break;
+ case MENU_USE_BLEND_ENABLED:
+ case MENU_USE_BLEND_DISABLED: {
+ bool use_blend = p_index == MENU_USE_BLEND_ENABLED;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Change Animation Use Blend"));
+ undo_redo->add_do_method(animation.ptr(), "audio_track_set_use_blend", track, use_blend);
+ undo_redo->add_undo_method(animation.ptr(), "audio_track_set_use_blend", track, animation->audio_track_is_use_blend(track));
+ undo_redo->commit_action();
+ queue_redraw();
+ } break;
}
}
@@ -3438,7 +3453,7 @@ void AnimationTrackEditor::_animation_track_remove_request(int p_track, Ref<Anim
}
int idx = p_track;
if (idx >= 0 && idx < p_from_animation->get_track_count()) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Anim Track"), UndoRedo::MERGE_DISABLE, p_from_animation.ptr());
// Remove corresponding reset tracks if they are no longer needed.
@@ -3499,6 +3514,9 @@ void AnimationTrackEditor::_animation_track_remove_request(int p_track, Ref<Anim
if (p_from_animation->track_get_type(idx) == Animation::TYPE_VALUE) {
undo_redo->add_undo_method(p_from_animation.ptr(), "value_track_set_update_mode", idx, p_from_animation->value_track_get_update_mode(idx));
}
+ if (animation->track_get_type(idx) == Animation::TYPE_AUDIO) {
+ undo_redo->add_undo_method(animation.ptr(), "audio_track_set_use_blend", idx, animation->audio_track_is_use_blend(idx));
+ }
undo_redo->commit_action();
}
@@ -3639,7 +3657,7 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) {
}
void AnimationTrackEditor::_insert_track(bool p_reset_wanted, bool p_create_beziers) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Insert Key"));
Ref<Animation> reset_anim;
@@ -3968,7 +3986,7 @@ Ref<Animation> AnimationTrackEditor::_create_and_get_reset_animation() {
Ref<Animation> reset_anim;
reset_anim.instantiate();
reset_anim->set_length(ANIM_MIN_LENGTH);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(al.ptr(), "add_animation", SceneStringNames::get_singleton()->RESET, reset_anim);
undo_redo->add_do_method(AnimationPlayerEditor::get_singleton(), "_animation_player_changed", player);
undo_redo->add_undo_method(al.ptr(), "remove_animation", SceneStringNames::get_singleton()->RESET);
@@ -3978,7 +3996,7 @@ Ref<Animation> AnimationTrackEditor::_create_and_get_reset_animation() {
}
void AnimationTrackEditor::_confirm_insert_list() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Insert Key"));
bool create_reset = insert_confirm_reset->is_visible() && insert_confirm_reset->is_pressed();
@@ -4148,7 +4166,7 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD
}
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (create_normal_track) {
if (p_create_beziers) {
bool valid;
@@ -4600,7 +4618,7 @@ void AnimationTrackEditor::_update_scroll(double) {
}
void AnimationTrackEditor::_update_step(double p_new_step) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Animation Step"));
float step_value = p_new_step;
if (timeline->is_using_fps()) {
@@ -4627,7 +4645,7 @@ void AnimationTrackEditor::_dropped_track(int p_from_track, int p_to_track) {
}
_clear_selection(true);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Rearrange Tracks"));
undo_redo->add_do_method(animation.ptr(), "track_move_to", p_from_track, p_to_track);
// Take into account that the position of the tracks that come after the one removed will change.
@@ -4671,7 +4689,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
case Animation::TYPE_ROTATION_3D:
case Animation::TYPE_SCALE_3D:
case Animation::TYPE_METHOD: {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Track"));
undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type);
undo_redo->add_do_method(animation.ptr(), "track_set_path", animation->get_track_count(), path_to);
@@ -4700,7 +4718,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Track"));
undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type);
undo_redo->add_do_method(animation.ptr(), "track_set_path", animation->get_track_count(), path_to);
@@ -4719,7 +4737,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Track"));
undo_redo->add_do_method(animation.ptr(), "add_track", adding_track_type);
undo_redo->add_do_method(animation.ptr(), "track_set_path", animation->get_track_count(), path_to);
@@ -4744,7 +4762,7 @@ void AnimationTrackEditor::_add_track(int p_type) {
void AnimationTrackEditor::_new_track_property_selected(String p_name) {
String full_path = String(adding_track_path) + ":" + p_name;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (adding_track_type == Animation::TYPE_VALUE) {
Animation::UpdateMode update_mode = Animation::UPDATE_DISCRETE;
{
@@ -4835,7 +4853,7 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
p_ofs += 0.0001;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (animation->track_get_type(p_track)) {
case Animation::TYPE_POSITION_3D: {
if (!root->has_node(animation->track_get_path(p_track))) {
@@ -4991,7 +5009,7 @@ void AnimationTrackEditor::_add_method_key(const String &p_method) {
}
d["args"] = params;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Method Track Key"));
undo_redo->add_do_method(animation.ptr(), "track_insert_key", insert_key_from_track_call_track, insert_key_from_track_call_ofs, d);
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", insert_key_from_track_call_track, insert_key_from_track_call_ofs);
@@ -5178,7 +5196,7 @@ void AnimationTrackEditor::_select_at_anim(const Ref<Animation> &p_anim, int p_t
}
void AnimationTrackEditor::_move_selection_commit() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Move Keys"));
List<_AnimMoveRestore> to_restore;
@@ -5309,7 +5327,7 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid() && box_selecting) {
- if ((mm->get_button_mask() & MouseButton::MASK_LEFT) == MouseButton::NONE) {
+ if (!mm->get_button_mask().has_flag(MouseButtonMask::LEFT)) {
// No longer.
box_selection->hide();
box_selecting = false;
@@ -5358,32 +5376,23 @@ void AnimationTrackEditor::_toggle_bezier_edit() {
}
}
-void AnimationTrackEditor::_scroll_callback(Vector2 p_scroll_vec, bool p_alt) {
- if (p_alt) {
+void AnimationTrackEditor::_pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event) {
+ Ref<InputEventWithModifiers> iewm = p_event;
+ if (iewm.is_valid() && iewm->is_alt_pressed()) {
if (p_scroll_vec.x < 0 || p_scroll_vec.y < 0) {
goto_prev_step(true);
} else {
goto_next_step(true);
}
} else {
- _pan_callback(-p_scroll_vec * 32);
+ timeline->set_value(timeline->get_value() - p_scroll_vec.x / timeline->get_zoom_scale());
+ scroll->set_v_scroll(scroll->get_v_scroll() - p_scroll_vec.y);
}
}
-void AnimationTrackEditor::_pan_callback(Vector2 p_scroll_vec) {
- timeline->set_value(timeline->get_value() - p_scroll_vec.x / timeline->get_zoom_scale());
- scroll->set_v_scroll(scroll->get_v_scroll() - p_scroll_vec.y);
-}
-
-void AnimationTrackEditor::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) {
- double new_zoom_value;
+void AnimationTrackEditor::_zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event) {
double current_zoom_value = timeline->get_zoom()->get_value();
- if (current_zoom_value <= 0.1) {
- new_zoom_value = MAX(0.01, current_zoom_value - 0.01 * SIGN(p_scroll_vec.y));
- } else {
- new_zoom_value = p_scroll_vec.y > 0 ? MAX(0.01, current_zoom_value / 1.05) : current_zoom_value * 1.05;
- }
- timeline->get_zoom()->set_value(new_zoom_value);
+ timeline->get_zoom()->set_value(MAX(0.01, current_zoom_value * p_zoom_factor));
}
void AnimationTrackEditor::_cancel_bezier_edit() {
@@ -5430,7 +5439,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
int start_track = transpose ? _get_track_selected() : top_track;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Duplicate Keys"));
List<Pair<int, float>> new_selection_values;
@@ -5638,6 +5647,9 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
if (tc.track_type == Animation::TYPE_VALUE) {
tc.update_mode = animation->value_track_get_update_mode(idx);
}
+ if (tc.track_type == Animation::TYPE_AUDIO) {
+ tc.use_blend = animation->audio_track_is_use_blend(idx);
+ }
tc.loop_wrap = animation->track_get_interpolation_loop_wrap(idx);
tc.enabled = animation->track_is_enabled(idx);
for (int i = 0; i < animation->track_get_key_count(idx); i++) {
@@ -5660,7 +5672,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
}
int base_track = animation->get_track_count();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Paste Tracks"));
for (int i = 0; i < track_clipboard.size(); i++) {
undo_redo->add_do_method(animation.ptr(), "add_track", track_clipboard[i].track_type);
@@ -5682,6 +5694,9 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
if (track_clipboard[i].track_type == Animation::TYPE_VALUE) {
undo_redo->add_do_method(animation.ptr(), "value_track_set_update_mode", base_track, track_clipboard[i].update_mode);
}
+ if (track_clipboard[i].track_type == Animation::TYPE_AUDIO) {
+ undo_redo->add_do_method(animation.ptr(), "audio_track_set_use_blend", base_track, track_clipboard[i].use_blend);
+ }
for (int j = 0; j < track_clipboard[i].keys.size(); j++) {
undo_redo->add_do_method(animation.ptr(), "track_insert_key", base_track, track_clipboard[i].keys[j].time, track_clipboard[i].keys[j].value, track_clipboard[i].keys[j].transition);
@@ -5730,7 +5745,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
float s = scale->get_value();
ERR_FAIL_COND_MSG(s == 0, "Can't scale to 0.");
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Scale Keys"));
List<_AnimMoveRestore> to_restore;
@@ -5810,7 +5825,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
ease_dialog->popup_centered(Size2(200, 100) * EDSCALE);
} break;
case EDIT_EASE_CONFIRM: {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Make Easing Keys"));
Tween::TransitionType transition_type = static_cast<Tween::TransitionType>(transition_selection->get_selected_id());
@@ -5917,7 +5932,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
_anim_duplicate_keys(true);
} break;
case EDIT_ADD_RESET_KEY: {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Add RESET Keys"));
Ref<Animation> reset = _create_and_get_reset_animation();
@@ -5978,7 +5993,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
}
if (selection.size()) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Delete Keys"));
for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
@@ -6009,7 +6024,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
bake_dialog->popup_centered(Size2(200, 100) * EDSCALE);
} break;
case EDIT_BAKE_ANIMATION_CONFIRM: {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Bake Animation as Linear keys."));
int track_len = animation->get_track_count();
@@ -6130,7 +6145,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
animation->optimize(optimize_velocity_error->get_value(), optimize_angular_error->get_value(), optimize_precision_error->get_value());
_redraw_tracks();
_update_key_edit();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->clear_history(true, undo_redo->get_history_id_for_object(animation.ptr()));
undo_redo->clear_history(true, undo_redo->get_history_id_for_object(this));
@@ -6200,7 +6215,7 @@ void AnimationTrackEditor::_cleanup_animation(Ref<Animation> p_animation) {
}
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->clear_history(true, undo_redo->get_history_id_for_object(animation.ptr()));
undo_redo->clear_history(true, undo_redo->get_history_id_for_object(this));
_update_tracks();
@@ -6398,7 +6413,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
timeline->connect("length_changed", callable_mp(this, &AnimationTrackEditor::_update_length));
panner.instantiate();
- panner->set_callbacks(callable_mp(this, &AnimationTrackEditor::_scroll_callback), callable_mp(this, &AnimationTrackEditor::_pan_callback), callable_mp(this, &AnimationTrackEditor::_zoom_callback));
+ panner->set_callbacks(callable_mp(this, &AnimationTrackEditor::_pan_callback), callable_mp(this, &AnimationTrackEditor::_zoom_callback));
scroll = memnew(ScrollContainer);
timeline_vbox->add_child(scroll);
@@ -6801,7 +6816,7 @@ void AnimationTrackKeyEditEditor::_time_edit_exited() {
}
int existing = animation->track_find_key(track, new_time, Animation::FIND_MODE_APPROX);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Animation Change Keyframe Time"), UndoRedo::MERGE_ENDS);
if (existing != -1) {
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index ef06445011..2a59bda2a4 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -159,9 +159,8 @@ class AnimationTimelineEdit : public Range {
bool use_fps = false;
Ref<ViewPanner> panner;
- void _scroll_callback(Vector2 p_scroll_vec, bool p_alt);
- void _pan_callback(Vector2 p_scroll_vec);
- void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt);
+ void _pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event);
+ void _zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event);
bool dragging_timeline = false;
bool dragging_hsize = false;
@@ -221,7 +220,9 @@ class AnimationTrackEdit : public Control {
MENU_KEY_INSERT,
MENU_KEY_DUPLICATE,
MENU_KEY_ADD_RESET,
- MENU_KEY_DELETE
+ MENU_KEY_DELETE,
+ MENU_USE_BLEND_ENABLED,
+ MENU_USE_BLEND_DISABLED,
};
AnimationTimelineEdit *timeline = nullptr;
@@ -460,9 +461,8 @@ class AnimationTrackEditor : public VBoxContainer {
PropertyInfo _find_hint_for_track(int p_idx, NodePath &r_base_path, Variant *r_current_val = nullptr);
Ref<ViewPanner> panner;
- void _scroll_callback(Vector2 p_scroll_vec, bool p_alt);
- void _pan_callback(Vector2 p_scroll_vec);
- void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt);
+ void _pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event);
+ void _zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event);
void _timeline_value_changed(double);
@@ -568,6 +568,7 @@ class AnimationTrackEditor : public VBoxContainer {
Animation::LoopMode loop_mode = Animation::LOOP_PINGPONG;
bool loop_wrap = false;
bool enabled = false;
+ bool use_blend = false;
struct Key {
float time = 0;
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 0926a63f88..ba73a63245 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -31,7 +31,6 @@
#include "animation_track_editor_plugins.h"
#include "editor/audio_stream_preview.h"
-#include "editor/editor_node.h"
#include "editor/editor_resource_preview.h"
#include "editor/editor_scale.h"
#include "editor/editor_undo_redo_manager.h"
@@ -1018,7 +1017,7 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant
ofs += 0.0001;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Audio Track Clip"));
undo_redo->add_do_method(get_animation().ptr(), "audio_track_insert_key", get_track(), ofs, stream);
undo_redo->add_undo_method(get_animation().ptr(), "track_remove_key_at_time", get_track(), ofs);
@@ -1125,7 +1124,7 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (len_resizing && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) {
if (len_resizing_rel == 0 || len_resizing_index < 0) {
len_resizing = false;
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp
deleted file mode 100644
index b2e12e2409..0000000000
--- a/editor/array_property_edit.cpp
+++ /dev/null
@@ -1,301 +0,0 @@
-/**************************************************************************/
-/* array_property_edit.cpp */
-/**************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/**************************************************************************/
-
-#include "array_property_edit.h"
-
-#include "core/io/marshalls.h"
-#include "editor/editor_node.h"
-#include "editor/editor_undo_redo_manager.h"
-
-#define ITEMS_PER_PAGE 100
-
-Variant ArrayPropertyEdit::get_array() const {
- Object *o = ObjectDB::get_instance(obj);
- if (!o) {
- return Array();
- }
- Variant arr = o->get(property);
- if (!arr.is_array()) {
- Callable::CallError ce;
- Variant::construct(default_type, arr, nullptr, 0, ce);
- }
- return arr;
-}
-
-void ArrayPropertyEdit::_notif_change() {
- notify_property_list_changed();
-}
-
-void ArrayPropertyEdit::_set_size(int p_size) {
- Variant arr = get_array();
- arr.call("resize", p_size);
- Object *o = ObjectDB::get_instance(obj);
- if (!o) {
- return;
- }
-
- o->set(property, arr);
-}
-
-void ArrayPropertyEdit::_set_value(int p_idx, const Variant &p_value) {
- Variant arr = get_array();
- arr.set(p_idx, p_value);
- Object *o = ObjectDB::get_instance(obj);
- if (!o) {
- return;
- }
-
- o->set(property, arr);
-}
-
-bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
- String pn = p_name;
-
- if (pn.begins_with("array/")) {
- if (pn == "array/size") {
- Variant arr = get_array();
- int size = arr.call("size");
-
- int newsize = p_value;
- if (newsize == size) {
- return true;
- }
-
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
- ur->create_action(TTR("Resize Array"));
- ur->add_do_method(this, "_set_size", newsize);
- ur->add_undo_method(this, "_set_size", size);
- if (newsize < size) {
- for (int i = newsize; i < size; i++) {
- ur->add_undo_method(this, "_set_value", i, arr.get(i));
- }
- } else if (newsize > size) {
- Variant init;
- Callable::CallError ce;
- Variant::Type new_type = subtype;
- if (new_type == Variant::NIL && size) {
- new_type = arr.get(size - 1).get_type();
- }
- if (new_type != Variant::NIL) {
- Variant::construct(new_type, init, nullptr, 0, ce);
- for (int i = size; i < newsize; i++) {
- ur->add_do_method(this, "_set_value", i, init);
- }
- }
- }
- ur->add_do_method(this, "_notif_change");
- ur->add_undo_method(this, "_notif_change");
- ur->commit_action();
- return true;
- }
- if (pn == "array/page") {
- page = p_value;
- notify_property_list_changed();
- return true;
- }
-
- } else if (pn.begins_with("indices")) {
- if (pn.contains("_")) {
- //type
- int idx = pn.get_slicec('/', 1).get_slicec('_', 0).to_int();
-
- int type = p_value;
-
- Variant arr = get_array();
-
- Variant value = arr.get(idx);
- if (value.get_type() != type && type >= 0 && type < Variant::VARIANT_MAX) {
- Callable::CallError ce;
- Variant new_value;
- Variant::construct(Variant::Type(type), new_value, nullptr, 0, ce);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
-
- ur->create_action(TTR("Change Array Value Type"));
- ur->add_do_method(this, "_set_value", idx, new_value);
- ur->add_undo_method(this, "_set_value", idx, value);
- ur->add_do_method(this, "_notif_change");
- ur->add_undo_method(this, "_notif_change");
- ur->commit_action();
- }
- return true;
-
- } else {
- int idx = pn.get_slicec('/', 1).to_int();
- Variant arr = get_array();
-
- Variant value = arr.get(idx);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
-
- ur->create_action(TTR("Change Array Value"));
- ur->add_do_method(this, "_set_value", idx, p_value);
- ur->add_undo_method(this, "_set_value", idx, value);
- ur->commit_action();
- return true;
- }
- }
-
- return false;
-}
-
-bool ArrayPropertyEdit::_get(const StringName &p_name, Variant &r_ret) const {
- Variant arr = get_array();
- //int size = arr.call("size");
-
- String pn = p_name;
- if (pn.begins_with("array/")) {
- if (pn == "array/size") {
- r_ret = arr.call("size");
- return true;
- }
- if (pn == "array/page") {
- r_ret = page;
- return true;
- }
- } else if (pn.begins_with("indices")) {
- if (pn.contains("_")) {
- //type
- int idx = pn.get_slicec('/', 1).get_slicec('_', 0).to_int();
- bool valid;
- r_ret = arr.get(idx, &valid);
- if (valid) {
- r_ret = r_ret.get_type();
- }
- return valid;
-
- } else {
- int idx = pn.get_slicec('/', 1).to_int();
- bool valid;
- r_ret = arr.get(idx, &valid);
-
- if (r_ret.get_type() == Variant::OBJECT && Object::cast_to<EncodedObjectAsID>(r_ret)) {
- r_ret = Object::cast_to<EncodedObjectAsID>(r_ret)->get_object_id();
- }
-
- return valid;
- }
- }
-
- return false;
-}
-
-void ArrayPropertyEdit::_get_property_list(List<PropertyInfo> *p_list) const {
- Variant arr = get_array();
- int size = arr.call("size");
-
- p_list->push_back(PropertyInfo(Variant::INT, "array/size", PROPERTY_HINT_RANGE, "0,100000,1"));
- int pages = size / ITEMS_PER_PAGE;
- if (pages > 0) {
- p_list->push_back(PropertyInfo(Variant::INT, "array/page", PROPERTY_HINT_RANGE, "0," + itos(pages) + ",1"));
- }
-
- int offset = page * ITEMS_PER_PAGE;
-
- int items = MIN(size - offset, ITEMS_PER_PAGE);
-
- for (int i = 0; i < items; i++) {
- Variant v = arr.get(i + offset);
- bool is_typed = arr.get_type() != Variant::ARRAY || subtype != Variant::NIL;
-
- if (!is_typed) {
- p_list->push_back(PropertyInfo(Variant::INT, "indices/" + itos(i + offset) + "_type", PROPERTY_HINT_ENUM, vtypes));
- }
-
- if (v.get_type() == Variant::OBJECT && Object::cast_to<EncodedObjectAsID>(v)) {
- p_list->push_back(PropertyInfo(Variant::INT, "indices/" + itos(i + offset), PROPERTY_HINT_OBJECT_ID, "Object"));
- continue;
- }
-
- if (is_typed || v.get_type() != Variant::NIL) {
- PropertyInfo pi(v.get_type(), "indices/" + itos(i + offset));
- if (subtype != Variant::NIL) {
- pi.type = Variant::Type(subtype);
- pi.hint = PropertyHint(subtype_hint);
- pi.hint_string = subtype_hint_string;
- } else if (v.get_type() == Variant::OBJECT) {
- pi.hint = PROPERTY_HINT_RESOURCE_TYPE;
- pi.hint_string = "Resource";
- }
-
- p_list->push_back(pi);
- }
- }
-}
-
-void ArrayPropertyEdit::edit(Object *p_obj, const StringName &p_prop, const String &p_hint_string, Variant::Type p_deftype) {
- page = 0;
- property = p_prop;
- obj = p_obj->get_instance_id();
- default_type = p_deftype;
-
- if (!p_hint_string.is_empty()) {
- int hint_subtype_separator = p_hint_string.find(":");
- if (hint_subtype_separator >= 0) {
- String subtype_string = p_hint_string.substr(0, hint_subtype_separator);
-
- int slash_pos = subtype_string.find("/");
- if (slash_pos >= 0) {
- subtype_hint = PropertyHint(subtype_string.substr(slash_pos + 1, subtype_string.size() - slash_pos - 1).to_int());
- subtype_string = subtype_string.substr(0, slash_pos);
- }
-
- subtype_hint_string = p_hint_string.substr(hint_subtype_separator + 1, p_hint_string.size() - hint_subtype_separator - 1);
- subtype = Variant::Type(subtype_string.to_int());
- }
- }
-}
-
-Node *ArrayPropertyEdit::get_node() {
- return Object::cast_to<Node>(ObjectDB::get_instance(obj));
-}
-
-bool ArrayPropertyEdit::_dont_undo_redo() {
- return true;
-}
-
-void ArrayPropertyEdit::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_set_size"), &ArrayPropertyEdit::_set_size);
- ClassDB::bind_method(D_METHOD("_set_value"), &ArrayPropertyEdit::_set_value);
- ClassDB::bind_method(D_METHOD("_notif_change"), &ArrayPropertyEdit::_notif_change);
- ClassDB::bind_method(D_METHOD("_dont_undo_redo"), &ArrayPropertyEdit::_dont_undo_redo);
-}
-
-ArrayPropertyEdit::ArrayPropertyEdit() {
- page = 0;
- for (int i = 0; i < Variant::VARIANT_MAX; i++) {
- if (i > 0) {
- vtypes += ",";
- }
- vtypes += Variant::get_type_name(Variant::Type(i));
- }
- default_type = Variant::NIL;
- subtype = Variant::NIL;
- subtype_hint = PROPERTY_HINT_NONE;
- subtype_hint_string = "";
-}
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index ba7e7f2877..b217cd57bf 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -143,6 +143,9 @@ void FindReplaceBar::unhandled_input(const Ref<InputEvent> &p_event) {
}
bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col) {
+ if (!preserve_cursor) {
+ text_editor->remove_secondary_carets();
+ }
String text = get_search_text();
Point2i pos = text_editor->search(text, p_flags, p_from_line, p_from_col);
@@ -178,6 +181,7 @@ bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col)
}
void FindReplaceBar::_replace() {
+ text_editor->remove_secondary_carets();
bool selection_enabled = text_editor->has_selection(0);
Point2i selection_begin, selection_end;
if (selection_enabled) {
@@ -225,6 +229,7 @@ void FindReplaceBar::_replace() {
}
void FindReplaceBar::_replace_all() {
+ text_editor->remove_secondary_carets();
text_editor->disconnect("text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed));
// Line as x so it gets priority in comparison, column as y.
Point2i orig_cursor(text_editor->get_caret_line(0), text_editor->get_caret_column(0));
@@ -665,7 +670,6 @@ void FindReplaceBar::set_text_edit(CodeTextEditor *p_text_editor) {
void FindReplaceBar::_bind_methods() {
ClassDB::bind_method("_search_current", &FindReplaceBar::search_current);
- ADD_SIGNAL(MethodInfo("search"));
ADD_SIGNAL(MethodInfo("error"));
}
@@ -2083,6 +2087,7 @@ CodeTextEditor::CodeTextEditor() {
text_editor = memnew(CodeEdit);
add_child(text_editor);
text_editor->set_v_size_flags(SIZE_EXPAND_FILL);
+ text_editor->set_structured_text_bidi_override(TextServer::STRUCTURED_TEXT_GDSCRIPT);
int ot_mode = EDITOR_GET("interface/editor/code_font_contextual_ligatures");
Ref<FontVariation> fc = text_editor->get_theme_font(SNAME("font"));
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 78987ee6ef..aaa07e98c8 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -30,6 +30,7 @@
#include "connections_dialog.h"
+#include "core/config/project_settings.h"
#include "editor/doc_tools.h"
#include "editor/editor_help.h"
#include "editor/editor_node.h"
@@ -165,6 +166,7 @@ void ConnectDialog::_tree_node_selected() {
if (!edit_mode) {
set_dst_method(generate_method_callback_name(source, signal, current));
}
+ _update_method_tree();
_update_ok_enabled();
}
@@ -182,6 +184,11 @@ void ConnectDialog::_unbind_count_changed(double p_count) {
}
}
+void ConnectDialog::_method_selected() {
+ TreeItem *selected_item = method_tree->get_selected();
+ dst_method->set_text(selected_item->get_metadata(0));
+}
+
/*
* Adds a new parameter bind to connection.
*/
@@ -242,14 +249,154 @@ StringName ConnectDialog::generate_method_callback_name(Node *p_source, String p
String dst_method;
if (p_source == p_target) {
- dst_method = String(EDITOR_GET("interface/editors/default_signal_callback_to_self_name")).format(subst);
+ dst_method = String(GLOBAL_GET("editor/naming/default_signal_callback_to_self_name")).format(subst);
} else {
- dst_method = String(EDITOR_GET("interface/editors/default_signal_callback_name")).format(subst);
+ dst_method = String(GLOBAL_GET("editor/naming/default_signal_callback_name")).format(subst);
}
return dst_method;
}
+void ConnectDialog::_create_method_tree_items(const List<MethodInfo> &p_methods, TreeItem *p_parent_item) {
+ for (const MethodInfo &mi : p_methods) {
+ TreeItem *method_item = method_tree->create_item(p_parent_item);
+ method_item->set_text(0, get_signature(mi));
+ method_item->set_metadata(0, mi.name);
+ }
+}
+
+List<MethodInfo> ConnectDialog::_filter_method_list(const List<MethodInfo> &p_methods, const MethodInfo &p_signal, const String &p_search_string) const {
+ bool check_signal = compatible_methods_only->is_pressed();
+ List<MethodInfo> ret;
+
+ for (const MethodInfo &mi : p_methods) {
+ if (!p_search_string.is_empty() && !mi.name.contains(p_search_string)) {
+ continue;
+ }
+
+ if (check_signal) {
+ if (mi.arguments.size() != p_signal.arguments.size()) {
+ continue;
+ }
+
+ bool type_mismatch = false;
+ const List<PropertyInfo>::Element *E = p_signal.arguments.front();
+ for (const List<PropertyInfo>::Element *F = mi.arguments.front(); F; F = F->next(), E = E->next()) {
+ Variant::Type stype = E->get().type;
+ Variant::Type mtype = F->get().type;
+
+ if (stype != Variant::NIL && mtype != Variant::NIL && stype != mtype) {
+ type_mismatch = true;
+ break;
+ }
+
+ if (stype == Variant::OBJECT && mtype == Variant::OBJECT && E->get().class_name != F->get().class_name) {
+ type_mismatch = true;
+ break;
+ }
+ }
+
+ if (type_mismatch) {
+ continue;
+ }
+ }
+ ret.push_back(mi);
+ }
+ return ret;
+}
+
+void ConnectDialog::_update_method_tree() {
+ method_tree->clear();
+
+ Color disabled_color = get_theme_color(SNAME("accent_color"), SNAME("Editor")) * 0.7;
+ String search_string = method_search->get_text();
+ Node *target = tree->get_selected();
+ if (!target) {
+ return;
+ }
+
+ MethodInfo signal_info;
+ if (compatible_methods_only->is_pressed()) {
+ List<MethodInfo> signals;
+ source->get_signal_list(&signals);
+ for (const MethodInfo &mi : signals) {
+ if (mi.name == signal) {
+ signal_info = mi;
+ break;
+ }
+ }
+ }
+
+ TreeItem *root_item = method_tree->create_item();
+ root_item->set_text(0, TTR("Methods"));
+ root_item->set_selectable(0, false);
+
+ // If a script is attached, get methods from it.
+ ScriptInstance *si = target->get_script_instance();
+ if (si) {
+ TreeItem *si_item = method_tree->create_item(root_item);
+ si_item->set_text(0, TTR("Attached Script"));
+ si_item->set_icon(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons")));
+ si_item->set_selectable(0, false);
+
+ List<MethodInfo> methods;
+ si->get_method_list(&methods);
+ methods = _filter_method_list(methods, signal_info, search_string);
+
+ if (methods.is_empty()) {
+ si_item->set_custom_color(0, disabled_color);
+ } else {
+ _create_method_tree_items(methods, si_item);
+ }
+ }
+
+ if (script_methods_only->is_pressed()) {
+ empty_tree_label->set_visible(root_item->get_first_child() == nullptr);
+ return;
+ }
+
+ // Get methods from each class in the hierarchy.
+ StringName current_class = target->get_class_name();
+ do {
+ TreeItem *class_item = method_tree->create_item(root_item);
+ class_item->set_text(0, current_class);
+ Ref<Texture2D> icon = get_theme_icon(SNAME("Node"), SNAME("EditorIcons"));
+ if (has_theme_icon(current_class, SNAME("EditorIcons"))) {
+ icon = get_theme_icon(current_class, SNAME("EditorIcons"));
+ }
+ class_item->set_icon(0, icon);
+ class_item->set_selectable(0, false);
+
+ List<MethodInfo> methods;
+ ClassDB::get_method_list(current_class, &methods, true);
+ methods = _filter_method_list(methods, signal_info, search_string);
+
+ if (methods.is_empty()) {
+ class_item->set_custom_color(0, disabled_color);
+ } else {
+ _create_method_tree_items(methods, class_item);
+ }
+ current_class = ClassDB::get_parent_class_nocheck(current_class);
+ } while (current_class != StringName());
+
+ empty_tree_label->set_visible(root_item->get_first_child() == nullptr);
+}
+
+void ConnectDialog::_method_check_button_pressed(const CheckButton *p_button) {
+ if (p_button == script_methods_only) {
+ EditorSettings::get_singleton()->set_project_metadata("editor_metadata", "show_script_methods_only", p_button->is_pressed());
+ } else if (p_button == compatible_methods_only) {
+ EditorSettings::get_singleton()->set_project_metadata("editor_metadata", "show_compatible_methods_only", p_button->is_pressed());
+ }
+ _update_method_tree();
+}
+
+void ConnectDialog::_open_method_popup() {
+ method_popup->popup_centered();
+ method_search->clear();
+ method_search->grab_focus();
+}
+
/*
* Enables or disables the connect button. The connect button is enabled if a
* node is selected and valid in the selected mode.
@@ -262,7 +409,7 @@ void ConnectDialog::_update_ok_enabled() {
return;
}
- if (!advanced->is_pressed() && target->get_script().is_null()) {
+ if (dst_method->get_text().is_empty()) {
get_ok_button()->set_disabled(true);
return;
}
@@ -285,17 +432,16 @@ void ConnectDialog::_notification(int p_what) {
Ref<StyleBox> style = get_theme_stylebox("normal", "LineEdit")->duplicate();
if (style.is_valid()) {
- style->set_default_margin(SIDE_TOP, style->get_default_margin(SIDE_TOP) + 1.0);
+ style->set_content_margin(SIDE_TOP, style->get_content_margin(SIDE_TOP) + 1.0);
from_signal->add_theme_style_override("normal", style);
}
+ method_search->set_right_icon(get_theme_icon("Search", "EditorIcons"));
+ open_method_tree->set_icon(get_theme_icon("Edit", "EditorIcons"));
} break;
}
}
void ConnectDialog::_bind_methods() {
- ClassDB::bind_method("_cancel", &ConnectDialog::_cancel_pressed);
- ClassDB::bind_method("_update_ok_enabled", &ConnectDialog::_update_ok_enabled);
-
ADD_SIGNAL(MethodInfo("connected"));
}
@@ -303,10 +449,18 @@ Node *ConnectDialog::get_source() const {
return source;
}
+ConnectDialog::ConnectionData ConnectDialog::get_source_connection_data() const {
+ return source_connection_data;
+}
+
StringName ConnectDialog::get_signal_name() const {
return signal;
}
+PackedStringArray ConnectDialog::get_signal_args() const {
+ return signal_args;
+}
+
NodePath ConnectDialog::get_dst_path() const {
return dst_path;
}
@@ -335,6 +489,34 @@ Vector<Variant> ConnectDialog::get_binds() const {
return cdbinds->params;
}
+String ConnectDialog::get_signature(const MethodInfo &p_method, PackedStringArray *r_arg_names) {
+ PackedStringArray signature;
+ signature.append(p_method.name);
+ signature.append("(");
+
+ for (int i = 0; i < p_method.arguments.size(); i++) {
+ if (i > 0) {
+ signature.append(", ");
+ }
+
+ const PropertyInfo &pi = p_method.arguments[i];
+ String tname = "var";
+ if (pi.type == Variant::OBJECT && pi.class_name != StringName()) {
+ tname = pi.class_name.operator String();
+ } else if (pi.type != Variant::NIL) {
+ tname = Variant::get_type_name(pi.type);
+ }
+
+ signature.append((pi.name.is_empty() ? String("arg " + itos(i)) : pi.name) + ": " + tname);
+ if (r_arg_names) {
+ r_arg_names->push_back(pi.name + ":" + tname);
+ }
+ }
+
+ signature.append(")");
+ return String().join(signature);
+}
+
bool ConnectDialog::get_deferred() const {
return deferred->is_pressed();
}
@@ -355,11 +537,12 @@ bool ConnectDialog::is_editing() const {
* If creating a connection from scratch, sensible defaults are used.
* If editing an existing connection, previous data is retained.
*/
-void ConnectDialog::init(ConnectionData p_cd, bool p_edit) {
+void ConnectDialog::init(const ConnectionData &p_cd, const PackedStringArray &p_signal_args, bool p_edit) {
set_hide_on_ok(false);
source = static_cast<Node *>(p_cd.source);
signal = p_cd.signal;
+ signal_args = p_signal_args;
tree->set_selected(nullptr);
tree->set_marked(source, true);
@@ -377,22 +560,7 @@ void ConnectDialog::init(ConnectionData p_cd, bool p_edit) {
deferred->set_pressed(b_deferred);
one_shot->set_pressed(b_oneshot);
- MethodInfo r_signal;
- Ref<Script> source_script = source->get_script();
- if (source_script.is_valid() && source_script->has_script_signal(signal)) {
- List<MethodInfo> signals;
- source_script->get_script_signal_list(&signals);
- for (MethodInfo &mi : signals) {
- if (mi.name == signal) {
- r_signal = mi;
- break;
- }
- }
- } else {
- ClassDB::get_signal(source->get_class(), signal, &r_signal);
- }
-
- unbind_count->set_max(r_signal.arguments.size());
+ unbind_count->set_max(p_signal_args.size());
unbind_count->set_value(p_cd.unbinds);
_unbind_count_changed(p_cd.unbinds);
@@ -402,9 +570,11 @@ void ConnectDialog::init(ConnectionData p_cd, bool p_edit) {
cdbinds->notify_changed();
edit_mode = p_edit;
+
+ source_connection_data = p_cd;
}
-void ConnectDialog::popup_dialog(const String &p_for_signal) {
+void ConnectDialog::popup_dialog(const String p_for_signal) {
from_signal->set_text(p_for_signal);
error_label->add_theme_color_override("font_color", error_label->get_theme_color(SNAME("error_color"), SNAME("Editor")));
if (!advanced->is_pressed()) {
@@ -437,7 +607,6 @@ void ConnectDialog::_advanced_pressed() {
error_label->set_visible(!_find_first_script(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root()));
}
- _update_ok_enabled();
EditorSettings::get_singleton()->set_project_metadata("editor_metadata", "use_advanced_connections", advanced->is_pressed());
popup_centered();
@@ -458,8 +627,8 @@ ConnectDialog::ConnectDialog() {
vbc_left->set_h_size_flags(Control::SIZE_EXPAND_FILL);
from_signal = memnew(LineEdit);
- from_signal->set_editable(false);
vbc_left->add_margin_child(TTR("From Signal:"), from_signal);
+ from_signal->set_editable(false);
tree = memnew(SceneTreeEditor(false));
tree->set_connecting_signal(true);
@@ -476,6 +645,43 @@ ConnectDialog::ConnectDialog() {
vbc_left->add_child(error_label);
error_label->hide();
+ method_popup = memnew(AcceptDialog);
+ method_popup->set_title(TTR("Select Method"));
+ method_popup->set_min_size(Vector2(400, 600) * EDSCALE);
+ add_child(method_popup);
+
+ VBoxContainer *method_vbc = memnew(VBoxContainer);
+ method_popup->add_child(method_vbc);
+
+ method_search = memnew(LineEdit);
+ method_vbc->add_child(method_search);
+ method_search->set_placeholder(TTR("Filter Methods"));
+ method_search->set_clear_button_enabled(true);
+ method_search->connect("text_changed", callable_mp(this, &ConnectDialog::_update_method_tree).unbind(1));
+
+ method_tree = memnew(Tree);
+ method_vbc->add_child(method_tree);
+ method_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ method_tree->set_hide_root(true);
+ method_tree->connect("item_selected", callable_mp(this, &ConnectDialog::_method_selected));
+ method_tree->connect("item_activated", callable_mp((Window *)method_popup, &Window::hide));
+
+ empty_tree_label = memnew(Label(TTR("No method found matching given filters.")));
+ method_tree->add_child(empty_tree_label);
+ empty_tree_label->set_anchors_and_offsets_preset(Control::PRESET_CENTER);
+
+ script_methods_only = memnew(CheckButton(TTR("Script Methods Only")));
+ method_vbc->add_child(script_methods_only);
+ script_methods_only->set_h_size_flags(Control::SIZE_SHRINK_END);
+ script_methods_only->set_pressed(EditorSettings::get_singleton()->get_project_metadata("editor_metadata", "show_script_methods_only", true));
+ script_methods_only->connect("pressed", callable_mp(this, &ConnectDialog::_method_check_button_pressed).bind(script_methods_only));
+
+ compatible_methods_only = memnew(CheckButton(TTR("Compatible Methods Only")));
+ method_vbc->add_child(compatible_methods_only);
+ compatible_methods_only->set_h_size_flags(Control::SIZE_SHRINK_END);
+ compatible_methods_only->set_pressed(EditorSettings::get_singleton()->get_project_metadata("editor_metadata", "show_compatible_methods_only", true));
+ compatible_methods_only->connect("pressed", callable_mp(this, &ConnectDialog::_method_check_button_pressed).bind(compatible_methods_only));
+
vbc_right = memnew(VBoxContainer);
main_hb->add_child(vbc_right);
vbc_right->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -521,14 +727,22 @@ ConnectDialog::ConnectDialog() {
vbc_right->add_margin_child(TTR("Unbind Signal Arguments:"), unbind_count);
+ HBoxContainer *hbc_method = memnew(HBoxContainer);
+ vbc_left->add_margin_child(TTR("Receiver Method:"), hbc_method);
+
dst_method = memnew(LineEdit);
dst_method->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ dst_method->connect("text_changed", callable_mp(method_tree, &Tree::deselect_all).unbind(1));
dst_method->connect("text_submitted", callable_mp(this, &ConnectDialog::_text_submitted));
- vbc_left->add_margin_child(TTR("Receiver Method:"), dst_method);
+ hbc_method->add_child(dst_method);
- advanced = memnew(CheckButton);
+ open_method_tree = memnew(Button);
+ hbc_method->add_child(open_method_tree);
+ open_method_tree->set_text("Pick");
+ open_method_tree->connect("pressed", callable_mp(this, &ConnectDialog::_open_method_popup));
+
+ advanced = memnew(CheckButton(TTR("Advanced")));
vbc_left->add_child(advanced);
- advanced->set_text(TTR("Advanced"));
advanced->set_h_size_flags(Control::SIZE_SHRINK_BEGIN | Control::SIZE_EXPAND);
advanced->set_pressed(EditorSettings::get_singleton()->get_project_metadata("editor_metadata", "use_advanced_connections", false));
advanced->connect("pressed", callable_mp(this, &ConnectDialog::_advanced_pressed));
@@ -566,7 +780,7 @@ ConnectDialog::~ConnectDialog() {
// Originally copied and adapted from EditorProperty, try to keep style in sync.
Control *ConnectionsDockTree::make_custom_tooltip(const String &p_text) const {
EditorHelpBit *help_bit = memnew(EditorHelpBit);
- help_bit->get_rich_text()->set_fixed_size_to_width(360 * EDSCALE);
+ help_bit->get_rich_text()->set_custom_minimum_size(Size2(360 * EDSCALE, 1));
// p_text is expected to be something like this:
// "gui_input::(event: InputEvent)::<Signal description>"
@@ -605,9 +819,6 @@ void ConnectionsDock::_filter_changed(const String &p_text) {
* Creates or edits connections based on state of the ConnectDialog when "Connect" is pressed.
*/
void ConnectionsDock::_make_or_edit_connection() {
- TreeItem *it = tree->get_selected();
- ERR_FAIL_COND(!it);
-
NodePath dst_path = connect_dialog->get_dst_path();
Node *target = selected_node->get_node(dst_path);
ERR_FAIL_COND(!target);
@@ -645,27 +856,21 @@ void ConnectionsDock::_make_or_edit_connection() {
add_script_function = !found_inherited_function;
}
- PackedStringArray script_function_args;
- if (add_script_function) {
- // Pick up args here before "it" is deleted by update_tree.
- script_function_args = it->get_metadata(0).operator Dictionary()["args"];
- script_function_args.resize(script_function_args.size() - cd.unbinds);
- for (int i = 0; i < cd.binds.size(); i++) {
- script_function_args.push_back("extra_arg_" + itos(i) + ":" + Variant::get_type_name(cd.binds[i].get_type()));
- }
- }
if (connect_dialog->is_editing()) {
- _disconnect(*it);
+ _disconnect(connect_dialog->get_source_connection_data());
_connect(cd);
} else {
_connect(cd);
}
- // IMPORTANT NOTE: _disconnect and _connect cause an update_tree, which will delete the object "it" is pointing to.
- it = nullptr;
-
if (add_script_function) {
+ PackedStringArray script_function_args = connect_dialog->get_signal_args();
+ script_function_args.resize(script_function_args.size() - cd.unbinds);
+ for (int i = 0; i < cd.binds.size(); i++) {
+ script_function_args.push_back("extra_arg_" + itos(i) + ":" + Variant::get_type_name(cd.binds[i].get_type()));
+ }
+
EditorNode::get_singleton()->emit_signal(SNAME("script_add_function_request"), target, cd.method, script_function_args);
hide();
}
@@ -676,7 +881,7 @@ void ConnectionsDock::_make_or_edit_connection() {
/*
* Creates single connection w/ undo-redo functionality.
*/
-void ConnectionsDock::_connect(ConnectDialog::ConnectionData p_cd) {
+void ConnectionsDock::_connect(const ConnectDialog::ConnectionData &p_cd) {
Node *source = Object::cast_to<Node>(p_cd.source);
Node *target = Object::cast_to<Node>(p_cd.target);
@@ -685,7 +890,7 @@ void ConnectionsDock::_connect(ConnectDialog::ConnectionData p_cd) {
}
Callable callable = p_cd.get_callable();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Connect '%s' to '%s'"), String(p_cd.signal), String(p_cd.method)));
undo_redo->add_do_method(source, "connect", p_cd.signal, callable, p_cd.flags);
undo_redo->add_undo_method(source, "disconnect", p_cd.signal, callable);
@@ -700,18 +905,15 @@ void ConnectionsDock::_connect(ConnectDialog::ConnectionData p_cd) {
/*
* Break single connection w/ undo-redo functionality.
*/
-void ConnectionsDock::_disconnect(TreeItem &p_item) {
- Connection connection = p_item.get_metadata(0);
- ConnectDialog::ConnectionData cd = connection;
+void ConnectionsDock::_disconnect(const ConnectDialog::ConnectionData &p_cd) {
+ ERR_FAIL_COND(p_cd.source != selected_node); // Shouldn't happen but... Bugcheck.
- ERR_FAIL_COND(cd.source != selected_node); // Shouldn't happen but... Bugcheck.
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(vformat(TTR("Disconnect '%s' from '%s'"), p_cd.signal, p_cd.method));
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(vformat(TTR("Disconnect '%s' from '%s'"), cd.signal, cd.method));
-
- Callable callable = cd.get_callable();
- undo_redo->add_do_method(selected_node, "disconnect", cd.signal, callable);
- undo_redo->add_undo_method(selected_node, "connect", cd.signal, callable, cd.binds, cd.flags);
+ Callable callable = p_cd.get_callable();
+ undo_redo->add_do_method(selected_node, "disconnect", p_cd.signal, callable);
+ undo_redo->add_undo_method(selected_node, "connect", p_cd.signal, callable, p_cd.flags);
undo_redo->add_do_method(this, "update_tree");
undo_redo->add_undo_method(this, "update_tree");
undo_redo->add_do_method(SceneTreeDock::get_singleton()->get_tree_editor(), "update_tree"); // To force redraw of scene tree.
@@ -733,7 +935,7 @@ void ConnectionsDock::_disconnect_all() {
TreeItem *child = item->get_first_child();
String signal_name = item->get_metadata(0).operator Dictionary()["name"];
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Disconnect all from signal: '%s'"), signal_name));
while (child) {
@@ -741,7 +943,7 @@ void ConnectionsDock::_disconnect_all() {
if (!_is_connection_inherited(connection)) {
ConnectDialog::ConnectionData cd = connection;
undo_redo->add_do_method(selected_node, "disconnect", cd.signal, cd.get_callable());
- undo_redo->add_undo_method(selected_node, "connect", cd.signal, cd.get_callable(), cd.binds, cd.flags);
+ undo_redo->add_undo_method(selected_node, "connect", cd.signal, cd.get_callable(), cd.flags);
}
child = child->get_next();
}
@@ -795,8 +997,9 @@ bool ConnectionsDock::_is_connection_inherited(Connection &p_connection) {
* Open connection dialog with TreeItem data to CREATE a brand-new connection.
*/
void ConnectionsDock::_open_connection_dialog(TreeItem &p_item) {
- String signal_name = p_item.get_metadata(0).operator Dictionary()["name"];
- const String &signal_name_ref = signal_name;
+ Dictionary sinfo = p_item.get_metadata(0);
+ String signal_name = sinfo["name"];
+ PackedStringArray signal_args = sinfo["args"];
Node *dst_node = selected_node->get_owner() ? selected_node->get_owner() : selected_node;
if (!dst_node || dst_node->get_script().is_null()) {
@@ -805,26 +1008,34 @@ void ConnectionsDock::_open_connection_dialog(TreeItem &p_item) {
ConnectDialog::ConnectionData cd;
cd.source = selected_node;
- cd.signal = StringName(signal_name_ref);
+ cd.signal = StringName(signal_name);
cd.target = dst_node;
cd.method = ConnectDialog::generate_method_callback_name(cd.source, signal_name, cd.target);
- connect_dialog->popup_dialog(signal_name_ref);
- connect_dialog->init(cd);
+ connect_dialog->popup_dialog(signal_name + "(" + String(", ").join(signal_args) + ")");
+ connect_dialog->init(cd, signal_args);
connect_dialog->set_title(TTR("Connect a Signal to a Method"));
}
/*
* Open connection dialog with Connection data to EDIT an existing connection.
*/
-void ConnectionsDock::_open_connection_dialog(ConnectDialog::ConnectionData p_cd) {
- Node *src = Object::cast_to<Node>(p_cd.source);
- Node *dst = Object::cast_to<Node>(p_cd.target);
+void ConnectionsDock::_open_edit_connection_dialog(TreeItem &p_item) {
+ TreeItem *signal_item = p_item.get_parent();
+ ERR_FAIL_COND(!signal_item);
+
+ Connection connection = p_item.get_metadata(0);
+ ConnectDialog::ConnectionData cd = connection;
+
+ Node *src = Object::cast_to<Node>(cd.source);
+ Node *dst = Object::cast_to<Node>(cd.target);
if (src && dst) {
- const String &signal_name_ref = p_cd.signal;
- connect_dialog->set_title(TTR("Edit Connection:") + p_cd.signal);
+ const String &signal_name_ref = cd.signal;
+ PackedStringArray signal_args = signal_item->get_metadata(0).operator Dictionary()["args"];
+
+ connect_dialog->set_title(vformat(TTR("Edit Connection: '%s'"), cd.signal));
connect_dialog->popup_dialog(signal_name_ref);
- connect_dialog->init(p_cd, true);
+ connect_dialog->init(cd, signal_args, true);
}
}
@@ -899,14 +1110,14 @@ void ConnectionsDock::_handle_slot_menu_option(int p_option) {
switch (p_option) {
case EDIT: {
- Connection connection = item->get_metadata(0);
- _open_connection_dialog(connection);
+ _open_edit_connection_dialog(*item);
} break;
case GO_TO_SCRIPT: {
_go_to_script(*item);
} break;
case DISCONNECT: {
- _disconnect(*item);
+ Connection connection = item->get_metadata(0);
+ _disconnect(connection);
update_tree();
} break;
}
@@ -957,7 +1168,8 @@ void ConnectionsDock::_connect_pressed() {
if (_is_item_signal(*item)) {
_open_connection_dialog(*item);
} else {
- _disconnect(*item);
+ Connection connection = item->get_metadata(0);
+ _disconnect(connection);
update_tree();
}
}
@@ -985,6 +1197,10 @@ void ConnectionsDock::set_node(Node *p_node) {
}
void ConnectionsDock::update_tree() {
+ String prev_selected;
+ if (tree->is_anything_selected()) {
+ prev_selected = tree->get_selected()->get_text(0);
+ }
tree->clear();
if (!selected_node) {
@@ -1046,37 +1262,22 @@ void ConnectionsDock::update_tree() {
}
for (MethodInfo &mi : node_signals2) {
- StringName signal_name = mi.name;
- String signaldesc = "(";
- PackedStringArray argnames;
-
- String filter_text = search_box->get_text();
- if (!filter_text.is_subsequence_ofn(signal_name)) {
+ const StringName signal_name = mi.name;
+ if (!search_box->get_text().is_subsequence_ofn(signal_name)) {
continue;
}
+ PackedStringArray argnames;
- if (mi.arguments.size()) {
- for (int i = 0; i < mi.arguments.size(); i++) {
- PropertyInfo &pi = mi.arguments[i];
+ // Create the children of the subsection - the actual list of signals.
+ TreeItem *signal_item = tree->create_item(section_item);
+ String signame = connect_dialog->get_signature(mi, &argnames);
+ signal_item->set_text(0, signame);
- if (i > 0) {
- signaldesc += ", ";
- }
- String tname = "var";
- if (pi.type == Variant::OBJECT && pi.class_name != StringName()) {
- tname = pi.class_name.operator String();
- } else if (pi.type != Variant::NIL) {
- tname = Variant::get_type_name(pi.type);
- }
- signaldesc += (pi.name.is_empty() ? String("arg " + itos(i)) : pi.name) + ": " + tname;
- argnames.push_back(pi.name + ":" + tname);
- }
+ if (signame == prev_selected) {
+ signal_item->select(0);
+ prev_selected = "";
}
- signaldesc += ")";
- // Create the children of the subsection - the actual list of signals.
- TreeItem *signal_item = tree->create_item(section_item);
- signal_item->set_text(0, String(signal_name) + signaldesc);
Dictionary sinfo;
sinfo["name"] = signal_name;
sinfo["args"] = argnames;
@@ -1117,7 +1318,7 @@ void ConnectionsDock::update_tree() {
}
// "::" separators used in make_custom_tooltip for formatting.
- signal_item->set_tooltip_text(0, String(signal_name) + "::" + signaldesc + "::" + descr);
+ signal_item->set_tooltip_text(0, String(signal_name) + "::" + signame.trim_prefix(mi.name) + "::" + descr);
}
// List existing connections.
@@ -1196,6 +1397,7 @@ ConnectionsDock::ConnectionsDock() {
tree->set_columns(1);
tree->set_select_mode(Tree::SELECT_ROW);
tree->set_hide_root(true);
+ tree->set_column_clip_content(0, true);
vbc->add_child(tree);
tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
tree->set_allow_rmb_select(true);
@@ -1237,9 +1439,6 @@ ConnectionsDock::ConnectionsDock() {
tree->connect("item_mouse_selected", callable_mp(this, &ConnectionsDock::_rmb_pressed));
add_theme_constant_override("separation", 3 * EDSCALE);
-
- EDITOR_DEF("interface/editors/default_signal_callback_name", "_on_{node_name}_{signal_name}");
- EDITOR_DEF("interface/editors/default_signal_callback_to_self_name", "_on_{signal_name}");
}
ConnectionsDock::~ConnectionsDock() {
diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h
index 829a98caed..277ea03cf7 100644
--- a/editor/connections_dialog.h
+++ b/editor/connections_dialog.h
@@ -88,7 +88,7 @@ public:
method = base_callable.get_method();
}
- Callable get_callable() {
+ Callable get_callable() const {
if (unbinds > 0) {
return Callable(target, method).unbind(unbinds);
} else if (!binds.is_empty()) {
@@ -107,16 +107,26 @@ private:
Label *connect_to_label = nullptr;
LineEdit *from_signal = nullptr;
Node *source = nullptr;
+ ConnectionData source_connection_data;
StringName signal;
+ PackedStringArray signal_args;
LineEdit *dst_method = nullptr;
ConnectDialogBinds *cdbinds = nullptr;
bool edit_mode = false;
bool first_popup = true;
NodePath dst_path;
VBoxContainer *vbc_right = nullptr;
-
SceneTreeEditor *tree = nullptr;
AcceptDialog *error = nullptr;
+
+ Button *open_method_tree = nullptr;
+ AcceptDialog *method_popup = nullptr;
+ Tree *method_tree = nullptr;
+ Label *empty_tree_label = nullptr;
+ LineEdit *method_search = nullptr;
+ CheckButton *script_methods_only = nullptr;
+ CheckButton *compatible_methods_only = nullptr;
+
SpinBox *unbind_count = nullptr;
EditorInspector *bind_editor = nullptr;
OptionButton *type_list = nullptr;
@@ -132,6 +142,14 @@ private:
void _item_activated();
void _text_submitted(const String &p_text);
void _tree_node_selected();
+
+ void _method_selected();
+ void _create_method_tree_items(const List<MethodInfo> &p_methods, TreeItem *p_parent_item);
+ List<MethodInfo> _filter_method_list(const List<MethodInfo> &p_methods, const MethodInfo &p_signal, const String &p_search_string) const;
+ void _update_method_tree();
+ void _method_check_button_pressed(const CheckButton *p_button);
+ void _open_method_popup();
+
void _unbind_count_changed(double p_count);
void _add_bind();
void _remove_bind();
@@ -145,21 +163,24 @@ protected:
public:
static StringName generate_method_callback_name(Node *p_source, String p_signal_name, Node *p_target);
Node *get_source() const;
+ ConnectionData get_source_connection_data() const;
StringName get_signal_name() const;
+ PackedStringArray get_signal_args() const;
NodePath get_dst_path() const;
void set_dst_node(Node *p_node);
StringName get_dst_method_name() const;
void set_dst_method(const StringName &p_method);
int get_unbinds() const;
Vector<Variant> get_binds() const;
+ String get_signature(const MethodInfo &p_method, PackedStringArray *r_arg_names = nullptr);
bool get_deferred() const;
bool get_one_shot() const;
bool is_editing() const;
- void init(ConnectionData p_cd, bool p_edit = false);
+ void init(const ConnectionData &p_cd, const PackedStringArray &p_signal_args, bool p_edit = false);
- void popup_dialog(const String &p_for_signal);
+ void popup_dialog(const String p_for_signal);
ConnectDialog();
~ConnectDialog();
};
@@ -203,8 +224,8 @@ class ConnectionsDock : public VBoxContainer {
void _filter_changed(const String &p_text);
void _make_or_edit_connection();
- void _connect(ConnectDialog::ConnectionData p_cd);
- void _disconnect(TreeItem &p_item);
+ void _connect(const ConnectDialog::ConnectionData &p_cd);
+ void _disconnect(const ConnectDialog::ConnectionData &p_cd);
void _disconnect_all();
void _tree_item_selected();
@@ -213,7 +234,7 @@ class ConnectionsDock : public VBoxContainer {
bool _is_connection_inherited(Connection &p_connection);
void _open_connection_dialog(TreeItem &p_item);
- void _open_connection_dialog(ConnectDialog::ConnectionData p_cd);
+ void _open_edit_connection_dialog(TreeItem &p_item);
void _go_to_script(TreeItem &p_item);
void _handle_signal_menu_option(int p_option);
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 76d70b09e6..aee907854c 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -122,7 +122,7 @@ bool CreateDialog::_should_hide_type(const String &p_type) const {
return true;
}
- if (base_type == "Node" && p_type.begins_with("Editor")) {
+ if (is_base_type_node && p_type.begins_with("Editor")) {
return true; // Do not show editor nodes.
}
@@ -148,6 +148,11 @@ bool CreateDialog::_should_hide_type(const String &p_type) const {
return true;
}
+ StringName native_type = ScriptServer::get_global_class_native_base(p_type);
+ if (ClassDB::class_exists(native_type) && !ClassDB::can_instantiate(native_type)) {
+ return true;
+ }
+
String script_path = ScriptServer::get_global_class_path(p_type);
if (script_path.begins_with("res://addons/")) {
if (!EditorNode::get_singleton()->is_addon_plugin_enabled(script_path.get_slicec('/', 3))) {
@@ -503,6 +508,11 @@ String CreateDialog::get_selected_type() {
return selected->get_text(0);
}
+void CreateDialog::set_base_type(const String &p_base) {
+ base_type = p_base;
+ is_base_type_node = ClassDB::is_parent_class(p_base, "Node");
+}
+
Variant CreateDialog::instantiate_selected() {
TreeItem *selected = search_options->get_selected();
@@ -719,12 +729,6 @@ void CreateDialog::_load_favorites_and_history() {
}
void CreateDialog::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_save_and_update_favorite_list"), &CreateDialog::_save_and_update_favorite_list);
-
- ClassDB::bind_method("_get_drag_data_fw", &CreateDialog::get_drag_data_fw);
- ClassDB::bind_method("_can_drop_data_fw", &CreateDialog::can_drop_data_fw);
- ClassDB::bind_method("_drop_data_fw", &CreateDialog::drop_data_fw);
-
ADD_SIGNAL(MethodInfo("create"));
ADD_SIGNAL(MethodInfo("favorites_updated"));
}
@@ -754,7 +758,7 @@ CreateDialog::CreateDialog() {
favorites->connect("cell_selected", callable_mp(this, &CreateDialog::_favorite_selected));
favorites->connect("item_activated", callable_mp(this, &CreateDialog::_favorite_activated));
favorites->add_theme_constant_override("draw_guides", 1);
- favorites->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(favorites, CreateDialog);
fav_vb->add_margin_child(TTR("Favorites:"), favorites, true);
VBoxContainer *rec_vb = memnew(VBoxContainer);
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index ad63346a02..37579812cf 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -51,6 +51,7 @@ class CreateDialog : public ConfirmationDialog {
Tree *search_options = nullptr;
String base_type;
+ bool is_base_type_node = false;
String icon_fallback;
String preferred_search_result_type;
@@ -113,7 +114,7 @@ public:
Variant instantiate_selected();
String get_selected_type();
- void set_base_type(const String &p_base) { base_type = p_base; }
+ void set_base_type(const String &p_base);
String get_base_type() const { return base_type; }
void select_base();
diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.cpp b/editor/debugger/debug_adapter/debug_adapter_parser.cpp
index d685db40d9..fc806ded5e 100644
--- a/editor/debugger/debug_adapter/debug_adapter_parser.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_parser.cpp
@@ -213,7 +213,7 @@ Dictionary DebugAdapterParser::req_launch(const Dictionary &p_params) const {
}
EditorNode *editor = EditorNode::get_singleton();
- Error err = platform_string == "android" ? editor->run_play_native(device, idx) : editor->run_play_native(-1, idx);
+ Error err = platform_string == "android" ? editor->run_play_native(device * 10000 + idx) : editor->run_play_native(idx);
if (err) {
if (err == ERR_INVALID_PARAMETER && platform_string == "android") {
return prepare_error_response(p_params, DAP::ErrorType::MISSING_DEVICE);
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
index e4afbde89f..a368cacf56 100644
--- a/editor/debugger/editor_debugger_node.cpp
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -275,7 +275,7 @@ void EditorDebuggerNode::stop(bool p_force) {
});
_break_state_changed();
breakpoints.clear();
- EditorNode::get_undo_redo()->clear_history(false, EditorUndoRedoManager::REMOTE_HISTORY);
+ EditorUndoRedoManager::get_singleton()->clear_history(false, EditorUndoRedoManager::REMOTE_HISTORY);
set_process(false);
}
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp
index 2e68e91c8b..e4730faf38 100644
--- a/editor/debugger/editor_profiler.cpp
+++ b/editor/debugger/editor_profiler.cpp
@@ -468,7 +468,7 @@ void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
x = frame_metrics.size() - 1;
}
- if (mb.is_valid() || (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (mb.is_valid() || (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
updating_frame = true;
if (x < total_metrics) {
@@ -670,7 +670,7 @@ EditorProfiler::EditorProfiler() {
variables->connect("item_edited", callable_mp(this, &EditorProfiler::_item_edited));
graph = memnew(TextureRect);
- graph->set_ignore_texture_size(true);
+ graph->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
graph->set_mouse_filter(MOUSE_FILTER_STOP);
graph->connect("draw", callable_mp(this, &EditorProfiler::_graph_tex_draw));
graph->connect("gui_input", callable_mp(this, &EditorProfiler::_graph_tex_input));
diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp
index 8fa77fd028..1a06e85f90 100644
--- a/editor/debugger/editor_visual_profiler.cpp
+++ b/editor/debugger/editor_visual_profiler.cpp
@@ -544,7 +544,7 @@ void EditorVisualProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
hover_metric = -1;
}
- if (mb.is_valid() || (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (mb.is_valid() || mm->get_button_mask().has_flag(MouseButtonMask::LEFT)) {
//cursor_metric=x;
updating_frame = true;
@@ -798,7 +798,7 @@ EditorVisualProfiler::EditorVisualProfiler() {
variables->connect("cell_selected", callable_mp(this, &EditorVisualProfiler::_item_selected));
graph = memnew(TextureRect);
- graph->set_ignore_texture_size(true);
+ graph->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
graph->set_mouse_filter(MOUSE_FILTER_STOP);
graph->connect("draw", callable_mp(this, &EditorVisualProfiler::_graph_tex_draw));
graph->connect("gui_input", callable_mp(this, &EditorVisualProfiler::_graph_tex_input));
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 2c6b9990ed..32952a367d 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -519,7 +519,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
String error_title;
if (oe.callstack.size() > 0) {
// If available, use the script's stack in the error title.
- error_title = oe.callstack[oe.callstack.size() - 1].func + ": ";
+ error_title = _format_frame_text(&oe.callstack[0]) + ": ";
} else if (!oe.source_func.is_empty()) {
// Otherwise try to use the C++ source function.
error_title += oe.source_func + ": ";
@@ -530,13 +530,25 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
error->set_text(1, error_title);
tooltip += " " + error_title + "\n";
+ // Find the language of the error's source file.
+ String source_language_name = "C++"; // Default value is the old hard-coded one.
+ const String source_file_extension = oe.source_file.get_extension();
+ for (int i = 0; i < ScriptServer::get_language_count(); ++i) {
+ ScriptLanguage *script_language = ScriptServer::get_language(i);
+ if (source_file_extension == script_language->get_extension()) {
+ source_language_name = script_language->get_name();
+ break;
+ }
+ }
+
if (!oe.error_descr.is_empty()) {
// Add item for C++ error condition.
TreeItem *cpp_cond = error_tree->create_item(error);
- cpp_cond->set_text(0, "<" + TTR("C++ Error") + ">");
+ // TRANSLATORS: %s is the name of a language, e.g. C++.
+ cpp_cond->set_text(0, "<" + vformat(TTR("%s Error"), source_language_name) + ">");
cpp_cond->set_text(1, oe.error);
cpp_cond->set_text_alignment(0, HORIZONTAL_ALIGNMENT_LEFT);
- tooltip += TTR("C++ Error:") + " " + oe.error + "\n";
+ tooltip += vformat(TTR("%s Error:"), source_language_name) + " " + oe.error + "\n";
if (source_is_project_file) {
cpp_cond->set_metadata(0, source_meta);
}
@@ -547,14 +559,18 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
// Source of the error.
String source_txt = (source_is_project_file ? oe.source_file.get_file() : oe.source_file) + ":" + itos(oe.source_line);
if (!oe.source_func.is_empty()) {
- source_txt += " @ " + oe.source_func + "()";
+ source_txt += " @ " + oe.source_func;
+ if (!oe.source_func.ends_with(")")) {
+ source_txt += "()";
+ }
}
TreeItem *cpp_source = error_tree->create_item(error);
- cpp_source->set_text(0, "<" + (source_is_project_file ? TTR("Source") : TTR("C++ Source")) + ">");
+ // TRANSLATORS: %s is the name of a language, e.g. C++.
+ cpp_source->set_text(0, "<" + vformat(TTR("%s Source"), source_language_name) + ">");
cpp_source->set_text(1, source_txt);
cpp_source->set_text_alignment(0, HORIZONTAL_ALIGNMENT_LEFT);
- tooltip += (source_is_project_file ? TTR("Source:") : TTR("C++ Source:")) + " " + source_txt + "\n";
+ tooltip += vformat(TTR("%s Source:"), source_language_name) + " " + source_txt + "\n";
// Set metadata to highlight error line in scripts.
if (source_is_project_file) {
@@ -581,7 +597,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
tooltip += TTR("Stack Trace:") + "\n";
}
- String frame_txt = infos[i].file.get_file() + ":" + itos(infos[i].line) + " @ " + infos[i].func + "()";
+ String frame_txt = _format_frame_text(&infos[i]);
tooltip += frame_txt + "\n";
stack_trace->set_text(1, frame_txt);
}
@@ -901,6 +917,14 @@ void ScriptEditorDebugger::_breakpoint_tree_clicked() {
}
}
+String ScriptEditorDebugger::_format_frame_text(const ScriptLanguage::StackInfo *info) {
+ String text = info->file.get_file() + ":" + itos(info->line) + " @ " + info->func;
+ if (!text.ends_with(")")) {
+ text += "()";
+ }
+ return text;
+}
+
void ScriptEditorDebugger::start(Ref<RemoteDebuggerPeer> p_peer) {
_clear_errors_list();
stop();
diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h
index e31b3af3d9..a0c420522a 100644
--- a/editor/debugger/script_editor_debugger.h
+++ b/editor/debugger/script_editor_debugger.h
@@ -210,6 +210,8 @@ private:
void _breakpoint_tree_clicked();
+ String _format_frame_text(const ScriptLanguage::StackInfo *info);
+
protected:
void _notification(int p_what);
static void _bind_methods();
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index a925e2d1d3..c98ec7b2d5 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -536,12 +536,17 @@ void DependencyRemoveDialog::show(const Vector<String> &p_folders, const Vector<
}
void DependencyRemoveDialog::ok_pressed() {
- for (int i = 0; i < files_to_delete.size(); ++i) {
- if (ResourceCache::has(files_to_delete[i])) {
- Ref<Resource> res = ResourceCache::get_ref(files_to_delete[i]);
+ for (const KeyValue<String, String> &E : all_remove_files) {
+ String file = E.key;
+
+ if (ResourceCache::has(file)) {
+ Ref<Resource> res = ResourceCache::get_ref(file);
+ emit_signal(SNAME("resource_removed"), res);
res->set_path("");
}
+ }
+ for (int i = 0; i < files_to_delete.size(); ++i) {
// If the file we are deleting for e.g. the main scene, default environment,
// or audio bus layout, we must clear its definition in Project Settings.
if (files_to_delete[i] == String(GLOBAL_GET("application/config/icon"))) {
@@ -621,6 +626,7 @@ void DependencyRemoveDialog::ok_pressed() {
}
void DependencyRemoveDialog::_bind_methods() {
+ ADD_SIGNAL(MethodInfo("resource_removed", PropertyInfo(Variant::OBJECT, "obj")));
ADD_SIGNAL(MethodInfo("file_removed", PropertyInfo(Variant::STRING, "file")));
ADD_SIGNAL(MethodInfo("folder_removed", PropertyInfo(Variant::STRING, "folder")));
}
diff --git a/editor/dictionary_property_edit.cpp b/editor/dictionary_property_edit.cpp
deleted file mode 100644
index 0d191cabe8..0000000000
--- a/editor/dictionary_property_edit.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
-/**************************************************************************/
-/* dictionary_property_edit.cpp */
-/**************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/**************************************************************************/
-
-#include "dictionary_property_edit.h"
-#include "editor/editor_node.h"
-#include "editor/editor_undo_redo_manager.h"
-
-void DictionaryPropertyEdit::_notif_change() {
- notify_property_list_changed();
-}
-
-void DictionaryPropertyEdit::_set_key(const Variant &p_old_key, const Variant &p_new_key) {
- // TODO: Set key of a dictionary is not allowed yet
-}
-
-void DictionaryPropertyEdit::_set_value(const Variant &p_key, const Variant &p_value) {
- Dictionary dict = get_dictionary();
- dict[p_key] = p_value;
- Object *o = ObjectDB::get_instance(obj);
- if (!o) {
- return;
- }
-
- o->set(property, dict);
-}
-
-Variant DictionaryPropertyEdit::get_dictionary() const {
- Object *o = ObjectDB::get_instance(obj);
- if (!o) {
- return Dictionary();
- }
- Variant dict = o->get(property);
- if (dict.get_type() != Variant::DICTIONARY) {
- return Dictionary();
- }
- return dict;
-}
-
-void DictionaryPropertyEdit::_get_property_list(List<PropertyInfo> *p_list) const {
- Dictionary dict = get_dictionary();
-
- Array keys = dict.keys();
- keys.sort();
-
- for (int i = 0; i < keys.size(); i++) {
- String index = itos(i);
-
- const Variant &key = keys[i];
- PropertyInfo pi(key.get_type(), index + ": key");
- p_list->push_back(pi);
-
- const Variant &value = dict[key];
- pi = PropertyInfo(value.get_type(), index + ": value");
- p_list->push_back(pi);
- }
-}
-
-void DictionaryPropertyEdit::edit(Object *p_obj, const StringName &p_prop) {
- property = p_prop;
- obj = p_obj->get_instance_id();
-}
-
-Node *DictionaryPropertyEdit::get_node() {
- Object *o = ObjectDB::get_instance(obj);
- if (!o) {
- return nullptr;
- }
-
- return cast_to<Node>(o);
-}
-
-bool DictionaryPropertyEdit::_dont_undo_redo() {
- return true;
-}
-
-void DictionaryPropertyEdit::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_set_key"), &DictionaryPropertyEdit::_set_key);
- ClassDB::bind_method(D_METHOD("_set_value"), &DictionaryPropertyEdit::_set_value);
- ClassDB::bind_method(D_METHOD("_notif_change"), &DictionaryPropertyEdit::_notif_change);
- ClassDB::bind_method(D_METHOD("_dont_undo_redo"), &DictionaryPropertyEdit::_dont_undo_redo);
-}
-
-bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
- Dictionary dict = get_dictionary();
- Array keys = dict.keys();
- keys.sort();
-
- String pn = p_name;
- int slash = pn.find(": ");
- if (slash != -1 && pn.length() > slash) {
- String type = pn.substr(slash + 2, pn.length());
- int index = pn.substr(0, slash).to_int();
- if (type == "key" && index < keys.size()) {
- const Variant &key = keys[index];
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
-
- ur->create_action(TTR("Change Dictionary Key"));
- ur->add_do_method(this, "_set_key", key, p_value);
- ur->add_undo_method(this, "_set_key", p_value, key);
- ur->commit_action();
-
- return true;
- } else if (type == "value" && index < keys.size()) {
- const Variant &key = keys[index];
- if (dict.has(key)) {
- Variant value = dict[key];
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
-
- ur->create_action(TTR("Change Dictionary Value"));
- ur->add_do_method(this, "_set_value", key, p_value);
- ur->add_undo_method(this, "_set_value", key, value);
- ur->commit_action();
-
- return true;
- }
- }
- }
-
- return false;
-}
-
-bool DictionaryPropertyEdit::_get(const StringName &p_name, Variant &r_ret) const {
- Dictionary dict = get_dictionary();
- Array keys = dict.keys();
- keys.sort();
-
- String pn = p_name;
- int slash = pn.find(": ");
-
- if (slash != -1 && pn.length() > slash) {
- String type = pn.substr(slash + 2, pn.length());
- int index = pn.substr(0, slash).to_int();
-
- if (type == "key" && index < keys.size()) {
- r_ret = keys[index];
- return true;
- } else if (type == "value" && index < keys.size()) {
- const Variant &key = keys[index];
- if (dict.has(key)) {
- r_ret = dict[key];
- return true;
- }
- }
- }
-
- return false;
-}
-
-DictionaryPropertyEdit::DictionaryPropertyEdit() {
-}
diff --git a/editor/dictionary_property_edit.h b/editor/dictionary_property_edit.h
deleted file mode 100644
index 197bb394d4..0000000000
--- a/editor/dictionary_property_edit.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************/
-/* dictionary_property_edit.h */
-/**************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/**************************************************************************/
-
-#ifndef DICTIONARY_PROPERTY_EDIT_H
-#define DICTIONARY_PROPERTY_EDIT_H
-
-#include "scene/main/node.h"
-
-class DictionaryPropertyEdit : public RefCounted {
- GDCLASS(DictionaryPropertyEdit, RefCounted);
-
- ObjectID obj;
- StringName property;
-
- void _notif_change();
- void _set_key(const Variant &p_old_key, const Variant &p_new_key);
- void _set_value(const Variant &p_key, const Variant &p_value);
-
- Variant get_dictionary() const;
-
- bool _dont_undo_redo();
-
-protected:
- static void _bind_methods();
- bool _set(const StringName &p_name, const Variant &p_value);
- bool _get(const StringName &p_name, Variant &r_ret) const;
- void _get_property_list(List<PropertyInfo> *p_list) const;
-
-public:
- void edit(Object *p_obj, const StringName &p_prop);
-
- Node *get_node();
-
- DictionaryPropertyEdit();
-};
-
-#endif // DICTIONARY_PROPERTY_EDIT_H
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp
index 002599acdb..d71ef78d88 100644
--- a/editor/doc_tools.cpp
+++ b/editor/doc_tools.cpp
@@ -461,7 +461,7 @@ void DocTools::generate(bool p_basic_types) {
}
if (default_value_valid && default_value.get_type() != Variant::OBJECT) {
- prop.default_value = default_value.get_construct_string().replace("\n", " ");
+ prop.default_value = DocData::get_default_value_string(default_value);
}
StringName setter = ClassDB::get_property_setter(name, E.name);
@@ -591,7 +591,7 @@ void DocTools::generate(bool p_basic_types) {
tid.name = E;
tid.type = "Color";
tid.data_type = "color";
- tid.default_value = Variant(ThemeDB::get_singleton()->get_default_theme()->get_color(E, cname)).get_construct_string().replace("\n", " ");
+ tid.default_value = DocData::get_default_value_string(ThemeDB::get_singleton()->get_default_theme()->get_color(E, cname));
c.theme_properties.push_back(tid);
}
@@ -750,6 +750,7 @@ void DocTools::generate(bool p_basic_types) {
MethodInfo mi;
mi.name = "operator []";
mi.return_val.type = Variant::get_indexed_element_type(Variant::Type(i));
+ mi.return_val.usage = Variant::get_indexed_element_usage(Variant::Type(i));
PropertyInfo arg;
arg.name = "index";
arg.type = Variant::INT;
@@ -771,8 +772,7 @@ void DocTools::generate(bool p_basic_types) {
int darg_idx = mi.default_arguments.size() - mi.arguments.size() + j;
if (darg_idx >= 0) {
- Variant default_arg = mi.default_arguments[darg_idx];
- ad.default_value = default_arg.get_construct_string().replace("\n", " ");
+ ad.default_value = DocData::get_default_value_string(mi.default_arguments[darg_idx]);
}
method.arguments.push_back(ad);
@@ -816,7 +816,7 @@ void DocTools::generate(bool p_basic_types) {
DocData::PropertyDoc property;
property.name = pi.name;
property.type = Variant::get_type_name(pi.type);
- property.default_value = v.get(pi.name).get_construct_string().replace("\n", " ");
+ property.default_value = DocData::get_default_value_string(v.get(pi.name));
c.properties.push_back(property);
}
@@ -845,6 +845,7 @@ void DocTools::generate(bool p_basic_types) {
for (int i = 0; i < CoreConstants::get_global_constant_count(); i++) {
DocData::ConstantDoc cd;
cd.name = CoreConstants::get_global_constant_name(i);
+ cd.is_bitfield = CoreConstants::is_global_constant_bitfield(i);
if (!CoreConstants::get_ignore_value_in_docs(i)) {
cd.value = itos(CoreConstants::get_global_constant_value(i));
cd.is_value_valid = true;
@@ -946,8 +947,7 @@ void DocTools::generate(bool p_basic_types) {
int darg_idx = j - (mi.arguments.size() - mi.default_arguments.size());
if (darg_idx >= 0) {
- Variant default_arg = mi.default_arguments[darg_idx];
- ad.default_value = default_arg.get_construct_string().replace("\n", " ");
+ ad.default_value = DocData::get_default_value_string(mi.default_arguments[darg_idx]);
}
md.arguments.push_back(ad);
@@ -991,8 +991,7 @@ void DocTools::generate(bool p_basic_types) {
int darg_idx = j - (ai.arguments.size() - ai.default_arguments.size());
if (darg_idx >= 0) {
- Variant default_arg = ai.default_arguments[darg_idx];
- ad.default_value = default_arg.get_construct_string().replace("\n", " ");
+ ad.default_value = DocData::get_default_value_string(ai.default_arguments[darg_idx]);
}
atd.arguments.push_back(ad);
@@ -1020,15 +1019,15 @@ static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> &
if (parser->get_node_name() == element) {
DocData::MethodDoc method;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
- method.name = parser->get_attribute_value("name");
+ method.name = parser->get_named_attribute_value("name");
if (parser->has_attribute("qualifiers")) {
- method.qualifiers = parser->get_attribute_value("qualifiers");
+ method.qualifiers = parser->get_named_attribute_value("qualifiers");
}
if (parser->has_attribute("is_deprecated")) {
- method.is_deprecated = parser->get_attribute_value("is_deprecated").to_lower() == "true";
+ method.is_deprecated = parser->get_named_attribute_value("is_deprecated").to_lower() == "true";
}
if (parser->has_attribute("is_experimental")) {
- method.is_experimental = parser->get_attribute_value("is_experimental").to_lower() == "true";
+ method.is_experimental = parser->get_named_attribute_value("is_experimental").to_lower() == "true";
}
while (parser->read() == OK) {
@@ -1036,21 +1035,21 @@ static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> &
String name = parser->get_node_name();
if (name == "return") {
ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT);
- method.return_type = parser->get_attribute_value("type");
+ method.return_type = parser->get_named_attribute_value("type");
if (parser->has_attribute("enum")) {
- method.return_enum = parser->get_attribute_value("enum");
+ method.return_enum = parser->get_named_attribute_value("enum");
}
} else if (name == "returns_error") {
ERR_FAIL_COND_V(!parser->has_attribute("number"), ERR_FILE_CORRUPT);
- method.errors_returned.push_back(parser->get_attribute_value("number").to_int());
+ method.errors_returned.push_back(parser->get_named_attribute_value("number").to_int());
} else if (name == "param") {
DocData::ArgumentDoc argument;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
- argument.name = parser->get_attribute_value("name");
+ argument.name = parser->get_named_attribute_value("name");
ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT);
- argument.type = parser->get_attribute_value("type");
+ argument.type = parser->get_named_attribute_value("type");
if (parser->has_attribute("enum")) {
- argument.enumeration = parser->get_attribute_value("enum");
+ argument.enumeration = parser->get_named_attribute_value("enum");
}
method.arguments.push_back(argument);
@@ -1152,21 +1151,21 @@ Error DocTools::_load(Ref<XMLParser> parser) {
ERR_FAIL_COND_V(parser->get_node_name() != "class", ERR_FILE_CORRUPT);
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
- String name = parser->get_attribute_value("name");
+ String name = parser->get_named_attribute_value("name");
class_list[name] = DocData::ClassDoc();
DocData::ClassDoc &c = class_list[name];
c.name = name;
if (parser->has_attribute("inherits")) {
- c.inherits = parser->get_attribute_value("inherits");
+ c.inherits = parser->get_named_attribute_value("inherits");
}
if (parser->has_attribute("is_deprecated")) {
- c.is_deprecated = parser->get_attribute_value("is_deprecated").to_lower() == "true";
+ c.is_deprecated = parser->get_named_attribute_value("is_deprecated").to_lower() == "true";
}
if (parser->has_attribute("is_experimental")) {
- c.is_experimental = parser->get_attribute_value("is_experimental").to_lower() == "true";
+ c.is_experimental = parser->get_named_attribute_value("is_experimental").to_lower() == "true";
}
while (parser->read() == OK) {
@@ -1192,7 +1191,7 @@ Error DocTools::_load(Ref<XMLParser> parser) {
if (name3 == "link") {
DocData::TutorialDoc tutorial;
if (parser->has_attribute("title")) {
- tutorial.title = parser->get_attribute_value("title");
+ tutorial.title = parser->get_named_attribute_value("title");
}
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT) {
@@ -1230,23 +1229,23 @@ Error DocTools::_load(Ref<XMLParser> parser) {
DocData::PropertyDoc prop2;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
- prop2.name = parser->get_attribute_value("name");
+ prop2.name = parser->get_named_attribute_value("name");
ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT);
- prop2.type = parser->get_attribute_value("type");
+ prop2.type = parser->get_named_attribute_value("type");
if (parser->has_attribute("setter")) {
- prop2.setter = parser->get_attribute_value("setter");
+ prop2.setter = parser->get_named_attribute_value("setter");
}
if (parser->has_attribute("getter")) {
- prop2.getter = parser->get_attribute_value("getter");
+ prop2.getter = parser->get_named_attribute_value("getter");
}
if (parser->has_attribute("enum")) {
- prop2.enumeration = parser->get_attribute_value("enum");
+ prop2.enumeration = parser->get_named_attribute_value("enum");
}
if (parser->has_attribute("is_deprecated")) {
- prop2.is_deprecated = parser->get_attribute_value("is_deprecated").to_lower() == "true";
+ prop2.is_deprecated = parser->get_named_attribute_value("is_deprecated").to_lower() == "true";
}
if (parser->has_attribute("is_experimental")) {
- prop2.is_experimental = parser->get_attribute_value("is_experimental").to_lower() == "true";
+ prop2.is_experimental = parser->get_named_attribute_value("is_experimental").to_lower() == "true";
}
if (!parser->is_empty()) {
parser->read();
@@ -1273,11 +1272,11 @@ Error DocTools::_load(Ref<XMLParser> parser) {
DocData::ThemeItemDoc prop2;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
- prop2.name = parser->get_attribute_value("name");
+ prop2.name = parser->get_named_attribute_value("name");
ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT);
- prop2.type = parser->get_attribute_value("type");
+ prop2.type = parser->get_named_attribute_value("type");
ERR_FAIL_COND_V(!parser->has_attribute("data_type"), ERR_FILE_CORRUPT);
- prop2.data_type = parser->get_attribute_value("data_type");
+ prop2.data_type = parser->get_named_attribute_value("data_type");
if (!parser->is_empty()) {
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT) {
@@ -1302,21 +1301,21 @@ Error DocTools::_load(Ref<XMLParser> parser) {
if (name3 == "constant") {
DocData::ConstantDoc constant2;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
- constant2.name = parser->get_attribute_value("name");
+ constant2.name = parser->get_named_attribute_value("name");
ERR_FAIL_COND_V(!parser->has_attribute("value"), ERR_FILE_CORRUPT);
- constant2.value = parser->get_attribute_value("value");
+ constant2.value = parser->get_named_attribute_value("value");
constant2.is_value_valid = true;
if (parser->has_attribute("enum")) {
- constant2.enumeration = parser->get_attribute_value("enum");
+ constant2.enumeration = parser->get_named_attribute_value("enum");
}
if (parser->has_attribute("is_bitfield")) {
- constant2.is_bitfield = parser->get_attribute_value("is_bitfield").to_lower() == "true";
+ constant2.is_bitfield = parser->get_named_attribute_value("is_bitfield").to_lower() == "true";
}
if (parser->has_attribute("is_deprecated")) {
- constant2.is_deprecated = parser->get_attribute_value("is_deprecated").to_lower() == "true";
+ constant2.is_deprecated = parser->get_named_attribute_value("is_deprecated").to_lower() == "true";
}
if (parser->has_attribute("is_experimental")) {
- constant2.is_experimental = parser->get_attribute_value("is_experimental").to_lower() == "true";
+ constant2.is_experimental = parser->get_named_attribute_value("is_experimental").to_lower() == "true";
}
if (!parser->is_empty()) {
parser->read();
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index ae9abc638f..25bca2a099 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -153,8 +153,8 @@ EditorAbout::EditorAbout() {
Label *about_text = memnew(Label);
about_text->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
- about_text->set_text(String::utf8("\xc2\xa9 2014-present ") + TTR("Godot Engine contributors") +
- "\n\xc2\xa9 2007-2014 Juan Linietsky, Ariel Manzur.\n");
+ about_text->set_text(String::utf8("\xc2\xa9 2014-present ") + TTR("Godot Engine contributors") + "." +
+ String::utf8("\n\xc2\xa9 2007-2014 Juan Linietsky, Ariel Manzur.\n"));
version_info_vbc->add_child(about_text);
hbc->add_child(version_info_vbc);
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 0258ac532f..a5bc90159a 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -120,7 +120,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
// Mark C# support as unavailable.
extension_guess["cs"] = tree->get_theme_icon(SNAME("ImportFail"), SNAME("EditorIcons"));
}
- extension_guess["vs"] = tree->get_theme_icon(SNAME("VisualScript"), SNAME("EditorIcons"));
extension_guess["res"] = tree->get_theme_icon(SNAME("Resource"), SNAME("EditorIcons"));
extension_guess["tres"] = tree->get_theme_icon(SNAME("Resource"), SNAME("EditorIcons"));
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 5296749c18..f4cefc606b 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -282,7 +282,7 @@ void EditorAudioBus::_name_changed(const String &p_new_name) {
}
updating_bus = true;
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
StringName current = AudioServer::get_singleton()->get_bus_name(get_index());
ur->create_action(TTR("Rename Audio Bus"));
@@ -323,7 +323,7 @@ void EditorAudioBus::_volume_changed(float p_normalized) {
slider->set_value(_scaled_db_to_normalized_volume(Math::round(p_db)));
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Audio Bus Volume"), UndoRedo::MERGE_ENDS);
ur->add_do_method(AudioServer::get_singleton(), "set_bus_volume_db", get_index(), p_db);
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_volume_db", get_index(), AudioServer::get_singleton()->get_bus_volume_db(get_index()));
@@ -417,7 +417,7 @@ void EditorAudioBus::_hide_value_preview() {
void EditorAudioBus::_solo_toggled() {
updating_bus = true;
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Toggle Audio Bus Solo"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_solo", get_index(), solo->is_pressed());
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_solo", get_index(), AudioServer::get_singleton()->is_bus_solo(get_index()));
@@ -431,7 +431,7 @@ void EditorAudioBus::_solo_toggled() {
void EditorAudioBus::_mute_toggled() {
updating_bus = true;
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Toggle Audio Bus Mute"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_mute", get_index(), mute->is_pressed());
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_mute", get_index(), AudioServer::get_singleton()->is_bus_mute(get_index()));
@@ -445,7 +445,7 @@ void EditorAudioBus::_mute_toggled() {
void EditorAudioBus::_bypass_toggled() {
updating_bus = true;
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Toggle Audio Bus Bypass Effects"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_bypass_effects", get_index(), bypass->is_pressed());
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_bypass_effects", get_index(), AudioServer::get_singleton()->is_bus_bypassing_effects(get_index()));
@@ -459,7 +459,7 @@ void EditorAudioBus::_bypass_toggled() {
void EditorAudioBus::_send_selected(int p_which) {
updating_bus = true;
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Select Audio Bus Send"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_send", get_index(), send->get_item_text(p_which));
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_send", get_index(), AudioServer::get_singleton()->get_bus_send(get_index()));
@@ -509,7 +509,7 @@ void EditorAudioBus::_effect_edited() {
int index = effect->get_metadata(0);
updating_bus = true;
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Select Audio Bus Send"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_effect_enabled", get_index(), index, effect->is_checked(0));
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_effect_enabled", get_index(), index, AudioServer::get_singleton()->is_bus_effect_enabled(get_index(), index));
@@ -536,7 +536,7 @@ void EditorAudioBus::_effect_add(int p_which) {
afxr->set_name(effect_options->get_item_text(p_which));
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Add Audio Bus Effect"));
ur->add_do_method(AudioServer::get_singleton(), "add_bus_effect", get_index(), afxr, -1);
ur->add_undo_method(AudioServer::get_singleton(), "remove_bus_effect", get_index(), AudioServer::get_singleton()->get_bus_effect_count(get_index()));
@@ -690,7 +690,7 @@ void EditorAudioBus::drop_data_fw(const Point2 &p_point, const Variant &p_data,
bool enabled = AudioServer::get_singleton()->is_bus_effect_enabled(bus, effect);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Move Bus Effect"));
ur->add_do_method(AudioServer::get_singleton(), "remove_bus_effect", bus, effect);
ur->add_do_method(AudioServer::get_singleton(), "add_bus_effect", get_index(), AudioServer::get_singleton()->get_bus_effect(bus, effect), paste_at);
@@ -732,7 +732,7 @@ void EditorAudioBus::_delete_effect_pressed(int p_option) {
int index = item->get_metadata(0);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Delete Bus Effect"));
ur->add_do_method(AudioServer::get_singleton(), "remove_bus_effect", get_index(), index);
ur->add_undo_method(AudioServer::get_singleton(), "add_bus_effect", get_index(), AudioServer::get_singleton()->get_bus_effect(get_index(), index), index);
@@ -765,10 +765,6 @@ void EditorAudioBus::_bind_methods() {
ClassDB::bind_method("update_bus", &EditorAudioBus::update_bus);
ClassDB::bind_method("update_send", &EditorAudioBus::update_send);
- ClassDB::bind_method("_get_drag_data_fw", &EditorAudioBus::get_drag_data_fw);
- ClassDB::bind_method("_can_drop_data_fw", &EditorAudioBus::can_drop_data_fw);
- ClassDB::bind_method("_drop_data_fw", &EditorAudioBus::drop_data_fw);
-
ADD_SIGNAL(MethodInfo("duplicate_request"));
ADD_SIGNAL(MethodInfo("delete_request"));
ADD_SIGNAL(MethodInfo("vol_reset_request"));
@@ -903,7 +899,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
effects->connect("item_edited", callable_mp(this, &EditorAudioBus::_effect_edited));
effects->connect("cell_selected", callable_mp(this, &EditorAudioBus::_effect_selected));
effects->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
- effects->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(effects, EditorAudioBus);
effects->connect("item_mouse_selected", callable_mp(this, &EditorAudioBus::_effect_rmb));
effects->set_allow_rmb_select(true);
effects->set_focus_mode(FOCUS_CLICK);
@@ -1065,7 +1061,7 @@ void EditorAudioBuses::_notification(int p_what) {
}
void EditorAudioBuses::_add_bus() {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Add Audio Bus"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_count", AudioServer::get_singleton()->get_bus_count() + 1);
@@ -1097,7 +1093,7 @@ void EditorAudioBuses::_delete_bus(Object *p_which) {
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Delete Audio Bus"));
ur->add_do_method(AudioServer::get_singleton(), "remove_bus", index);
@@ -1119,7 +1115,7 @@ void EditorAudioBuses::_delete_bus(Object *p_which) {
void EditorAudioBuses::_duplicate_bus(int p_which) {
int add_at_pos = p_which + 1;
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Duplicate Audio Bus"));
ur->add_do_method(AudioServer::get_singleton(), "add_bus", add_at_pos);
ur->add_do_method(AudioServer::get_singleton(), "set_bus_name", add_at_pos, AudioServer::get_singleton()->get_bus_name(p_which) + " Copy");
@@ -1142,7 +1138,7 @@ void EditorAudioBuses::_reset_bus_volume(Object *p_which) {
EditorAudioBus *bus = Object::cast_to<EditorAudioBus>(p_which);
int index = bus->get_index();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Reset Bus Volume"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_volume_db", index, 0.f);
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_volume_db", index, AudioServer::get_singleton()->get_bus_volume_db(index));
@@ -1162,7 +1158,7 @@ void EditorAudioBuses::_request_drop_end() {
}
void EditorAudioBuses::_drop_at_index(int p_bus, int p_index) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Move Audio Bus"));
ur->add_do_method(AudioServer::get_singleton(), "move_bus", p_bus, p_index);
@@ -1221,7 +1217,7 @@ void EditorAudioBuses::_load_default_layout() {
file->set_text(String(TTR("Layout:")) + " " + layout_path.get_file());
AudioServer::get_singleton()->set_bus_layout(state);
_update_buses();
- EditorNode::get_undo_redo()->clear_history(true, EditorUndoRedoManager::GLOBAL_HISTORY);
+ EditorUndoRedoManager::get_singleton()->clear_history(true, EditorUndoRedoManager::GLOBAL_HISTORY);
call_deferred(SNAME("_select_layout"));
}
@@ -1237,7 +1233,7 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
file->set_text(String(TTR("Layout:")) + " " + p_string.get_file());
AudioServer::get_singleton()->set_bus_layout(state);
_update_buses();
- EditorNode::get_undo_redo()->clear_history(true, EditorUndoRedoManager::GLOBAL_HISTORY);
+ EditorUndoRedoManager::get_singleton()->clear_history(true, EditorUndoRedoManager::GLOBAL_HISTORY);
call_deferred(SNAME("_select_layout"));
} else if (file_dialog->get_file_mode() == EditorFileDialog::FILE_MODE_SAVE_FILE) {
@@ -1257,7 +1253,7 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
edited_path = p_string;
file->set_text(String(TTR("Layout:")) + " " + p_string.get_file());
_update_buses();
- EditorNode::get_undo_redo()->clear_history(true, EditorUndoRedoManager::GLOBAL_HISTORY);
+ EditorUndoRedoManager::get_singleton()->clear_history(true, EditorUndoRedoManager::GLOBAL_HISTORY);
call_deferred(SNAME("_select_layout"));
}
}
@@ -1356,7 +1352,7 @@ void EditorAudioBuses::open_layout(const String &p_path) {
file->set_text(p_path.get_file());
AudioServer::get_singleton()->set_bus_layout(state);
_update_buses();
- EditorNode::get_undo_redo()->clear_history(true, EditorUndoRedoManager::GLOBAL_HISTORY);
+ EditorUndoRedoManager::get_singleton()->clear_history(true, EditorUndoRedoManager::GLOBAL_HISTORY);
call_deferred(SNAME("_select_layout"));
}
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index db251c857c..f843733f2c 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -194,7 +194,7 @@ void EditorAutoloadSettings::_autoload_edited() {
TreeItem *ti = tree->get_edited();
int column = tree->get_edited_column();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (column == 0) {
String name = ti->get_text(0);
@@ -289,7 +289,7 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
String name = "autoload/" + ti->get_text(0);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (p_button) {
case BUTTON_OPEN: {
@@ -717,7 +717,7 @@ void EditorAutoloadSettings::drop_data_fw(const Point2 &p_point, const Variant &
orders.sort();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Rearrange Autoloads"));
@@ -760,7 +760,7 @@ bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_
name = "autoload/" + name;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Autoload"));
// Singleton autoloads are represented with a leading "*" in their path.
@@ -786,7 +786,7 @@ bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_
void EditorAutoloadSettings::autoload_remove(const String &p_name) {
String name = "autoload/" + p_name;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
int order = ProjectSettings::get_singleton()->get_order(name);
@@ -808,12 +808,6 @@ void EditorAutoloadSettings::autoload_remove(const String &p_name) {
}
void EditorAutoloadSettings::_bind_methods() {
- ClassDB::bind_method("_autoload_open", &EditorAutoloadSettings::_autoload_open);
-
- ClassDB::bind_method("_get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw);
- ClassDB::bind_method("_can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw);
- ClassDB::bind_method("_drop_data_fw", &EditorAutoloadSettings::drop_data_fw);
-
ClassDB::bind_method("update_autoload", &EditorAutoloadSettings::update_autoload);
ClassDB::bind_method("autoload_add", &EditorAutoloadSettings::autoload_add);
ClassDB::bind_method("autoload_remove", &EditorAutoloadSettings::autoload_remove);
@@ -935,7 +929,7 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
tree->set_select_mode(Tree::SELECT_MULTI);
tree->set_allow_reselect(true);
- tree->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(tree, EditorAutoloadSettings);
tree->set_columns(4);
tree->set_column_titles_visible(true);
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index c5fe89e35d..3059ce445c 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -122,12 +122,6 @@ int EditorSelectionHistory::get_history_pos() {
return current_elem_idx;
}
-bool EditorSelectionHistory::is_history_obj_inspector_only(int p_obj) const {
- ERR_FAIL_INDEX_V(p_obj, history.size(), false);
- ERR_FAIL_INDEX_V(history[p_obj].level, history[p_obj].path.size(), false);
- return history[p_obj].path[history[p_obj].level].inspector_only;
-}
-
ObjectID EditorSelectionHistory::get_history_obj(int p_obj) const {
ERR_FAIL_INDEX_V(p_obj, history.size(), ObjectID());
ERR_FAIL_INDEX_V(history[p_obj].level, history[p_obj].path.size(), ObjectID());
@@ -351,18 +345,6 @@ void EditorData::apply_changes_in_editors() {
}
}
-void EditorData::save_editor_global_states() {
- for (int i = 0; i < editor_plugins.size(); i++) {
- editor_plugins[i]->save_global_state();
- }
-}
-
-void EditorData::restore_editor_global_states() {
- for (int i = 0; i < editor_plugins.size(); i++) {
- editor_plugins[i]->restore_global_state();
- }
-}
-
void EditorData::paste_object_params(Object *p_object) {
ERR_FAIL_NULL(p_object);
undo_redo_manager->create_action(TTR("Paste Params"));
@@ -390,7 +372,7 @@ void EditorData::set_scene_as_saved(int p_idx) {
}
ERR_FAIL_INDEX(p_idx, edited_scene.size());
- get_undo_redo()->set_history_as_saved(edited_scene[p_idx].history_id);
+ undo_redo_manager->set_history_as_saved(edited_scene[p_idx].history_id);
}
bool EditorData::is_scene_changed(int p_idx) {
@@ -399,7 +381,7 @@ bool EditorData::is_scene_changed(int p_idx) {
}
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), false);
- uint64_t current_scene_version = get_undo_redo()->get_or_create_history(edited_scene[p_idx].history_id).undo_redo->get_version();
+ uint64_t current_scene_version = undo_redo_manager->get_or_create_history(edited_scene[p_idx].history_id).undo_redo->get_version();
bool is_changed = edited_scene[p_idx].last_checked_version != current_scene_version;
edited_scene.write[p_idx].last_checked_version = current_scene_version;
return is_changed;
@@ -425,10 +407,6 @@ int EditorData::get_scene_history_id(int p_idx) const {
return edited_scene[p_idx].history_id;
}
-Ref<EditorUndoRedoManager> &EditorData::get_undo_redo() {
- return undo_redo_manager;
-}
-
void EditorData::add_undo_redo_inspector_hook_callback(Callable p_callable) {
undo_redo_callbacks.push_back(p_callable);
}
@@ -998,6 +976,8 @@ void EditorData::script_class_set_name(const String &p_path, const StringName &p
}
void EditorData::script_class_save_icon_paths() {
+ Array script_classes = ProjectSettings::get_singleton()->get_global_class_list();
+
Dictionary d;
for (const KeyValue<StringName, String> &E : _script_class_icon_paths) {
if (ScriptServer::is_global_class(E.key)) {
@@ -1005,27 +985,20 @@ void EditorData::script_class_save_icon_paths() {
}
}
- Dictionary old;
- if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
- old = GLOBAL_GET("_global_script_class_icons");
- }
- if ((!old.is_empty() || d.is_empty()) && d.hash() == old.hash()) {
- return;
- }
-
- if (d.is_empty()) {
- if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
- ProjectSettings::get_singleton()->clear("_global_script_class_icons");
+ for (int i = 0; i < script_classes.size(); i++) {
+ Dictionary d2 = script_classes[i];
+ if (!d2.has("class")) {
+ continue;
}
- } else {
- ProjectSettings::get_singleton()->set("_global_script_class_icons", d);
+ d2["icon"] = d.get(d2["class"], "");
}
- ProjectSettings::get_singleton()->save();
+ ProjectSettings::get_singleton()->store_global_class_list(script_classes);
}
void EditorData::script_class_load_icon_paths() {
script_class_clear_icon_paths();
+#ifndef DISABLE_DEPRECATED
if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
Dictionary d = GLOBAL_GET("_global_script_class_icons");
List<Variant> keys;
@@ -1038,15 +1011,33 @@ void EditorData::script_class_load_icon_paths() {
String path = ScriptServer::get_global_class_path(name);
script_class_set_name(path, name);
}
+ ProjectSettings::get_singleton()->clear("_global_script_class_icons");
+ }
+#endif
+
+ Array script_classes = ProjectSettings::get_singleton()->get_global_class_list();
+ for (int i = 0; i < script_classes.size(); i++) {
+ Dictionary d = script_classes[i];
+ if (!d.has("class") || !d.has("path") || !d.has("icon")) {
+ continue;
+ }
+
+ String name = d["class"];
+ _script_class_icon_paths[name] = d["icon"];
+ script_class_set_name(d["path"], name);
}
}
EditorData::EditorData() {
current_edited_scene = -1;
- undo_redo_manager.instantiate();
+ undo_redo_manager = memnew(EditorUndoRedoManager);
script_class_load_icon_paths();
}
+EditorData::~EditorData() {
+ memdelete(undo_redo_manager);
+}
+
///////////////////////////////////////////////////////////////////////////////
void EditorSelection::_node_removed(Node *p_node) {
diff --git a/editor/editor_data.h b/editor/editor_data.h
index 385bcad1f9..d00501280d 100644
--- a/editor/editor_data.h
+++ b/editor/editor_data.h
@@ -80,7 +80,6 @@ public:
// Gets an object from the history. The most recent object would be the object with p_obj = get_history_len() - 1.
ObjectID get_history_obj(int p_obj) const;
- bool is_history_obj_inspector_only(int p_obj) const;
bool next();
bool previous();
@@ -133,7 +132,7 @@ private:
HashMap<String, Vector<CustomType>> custom_types;
List<PropertyData> clipboard;
- Ref<EditorUndoRedoManager> undo_redo_manager;
+ EditorUndoRedoManager *undo_redo_manager;
Vector<Callable> undo_redo_callbacks;
HashMap<StringName, Callable> move_element_functions;
@@ -168,7 +167,6 @@ public:
int get_editor_plugin_count() const;
EditorPlugin *get_editor_plugin(int p_idx);
- Ref<EditorUndoRedoManager> &get_undo_redo();
void add_undo_redo_inspector_hook_callback(Callable p_callable); // Callbacks should have this signature: void (Object* undo_redo, Object *modified_object, String property, Variant new_value)
void remove_undo_redo_inspector_hook_callback(Callable p_callable);
const Vector<Callable> get_undo_redo_inspector_hook_callback();
@@ -178,7 +176,6 @@ public:
Callable get_move_array_element_function(const StringName &p_class) const;
void save_editor_global_states();
- void restore_editor_global_states();
void add_custom_type(const String &p_type, const String &p_inherits, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon);
Variant instantiate_custom_type(const String &p_type, const String &p_inherits);
@@ -204,7 +201,6 @@ public:
String get_scene_type(int p_idx) const;
void set_scene_path(int p_idx, const String &p_path);
Ref<Script> get_scene_root_script(int p_idx) const;
- void set_edited_scene_version(uint64_t version, int p_scene_idx = -1);
void set_scene_modified_time(int p_idx, uint64_t p_time);
uint64_t get_scene_modified_time(int p_idx) const;
void clear_edited_scenes();
@@ -245,6 +241,7 @@ public:
void script_class_load_icon_paths();
EditorData();
+ ~EditorData();
};
/**
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index a83a53ad15..33a1fe4b45 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -980,7 +980,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
no_profile_selected_help = memnew(Label(TTR("Create or import a profile to edit available classes and properties.")));
// Add some spacing above the help label.
Ref<StyleBoxEmpty> sb = memnew(StyleBoxEmpty);
- sb->set_default_margin(SIDE_TOP, 20 * EDSCALE);
+ sb->set_content_margin(SIDE_TOP, 20 * EDSCALE);
no_profile_selected_help->add_theme_style_override("normal", sb);
no_profile_selected_help->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
no_profile_selected_help->set_v_size_flags(Control::SIZE_EXPAND_FILL);
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 28424d53b1..644c32e8a4 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -47,7 +47,7 @@
EditorFileSystem *EditorFileSystem::singleton = nullptr;
//the name is the version, to keep compatibility with different versions of Godot
-#define CACHE_FILE_NAME "filesystem_cache7"
+#define CACHE_FILE_NAME "filesystem_cache8"
void EditorFileSystemDirectory::sort_files() {
files.sort_custom<FileInfoSort>();
@@ -169,6 +169,11 @@ StringName EditorFileSystemDirectory::get_file_type(int p_idx) const {
return files[p_idx]->type;
}
+StringName EditorFileSystemDirectory::get_file_resource_script_class(int p_idx) const {
+ ERR_FAIL_INDEX_V(p_idx, files.size(), "");
+ return files[p_idx]->resource_script_class;
+}
+
String EditorFileSystemDirectory::get_name() {
return name;
}
@@ -266,6 +271,10 @@ void EditorFileSystem::_scan_filesystem() {
FileCache fc;
fc.type = split[1];
+ if (fc.type.find("/") != -1) {
+ fc.type = fc.type.get_slice("/", 0);
+ fc.resource_script_class = fc.type.get_slice("/", 1);
+ }
fc.uid = split[2].to_int();
fc.modification_time = split[3].to_int();
fc.import_modification_time = split[4].to_int();
@@ -433,7 +442,7 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
}
if (!found_uid) {
- return true; //UUID not found, old format, reimport.
+ return true; //UID not found, old format, reimport.
}
Ref<ResourceImporter> importer = ResourceFormatImporter::get_singleton()->get_importer_by_name(importer_name);
@@ -602,10 +611,19 @@ bool EditorFileSystem::_update_scan_actions() {
fs_changed = true;
+ if (ClassDB::is_parent_class(ia.new_file->type, SNAME("Script"))) {
+ _queue_update_script_class(ia.dir->get_file_path(idx));
+ }
+
} break;
case ItemAction::ACTION_FILE_REMOVE: {
int idx = ia.dir->find_file_index(ia.file);
ERR_CONTINUE(idx == -1);
+
+ if (ClassDB::is_parent_class(ia.dir->files[idx]->type, SNAME("Script"))) {
+ _queue_update_script_class(ia.dir->get_file_path(idx));
+ }
+
_delete_internal_files(ia.dir->files[idx]->file);
memdelete(ia.dir->files[idx]);
ia.dir->files.remove_at(idx);
@@ -640,6 +658,10 @@ bool EditorFileSystem::_update_scan_actions() {
ERR_CONTINUE(idx == -1);
String full_path = ia.dir->get_file_path(idx);
+ if (ClassDB::is_parent_class(ia.dir->files[idx]->type, SNAME("Script"))) {
+ _queue_update_script_class(full_path);
+ }
+
reloads.push_back(full_path);
} break;
@@ -708,9 +730,9 @@ void EditorFileSystem::scan() {
new_filesystem = nullptr;
_update_scan_actions();
scanning = false;
+ _update_pending_script_classes();
emit_signal(SNAME("filesystem_changed"));
emit_signal(SNAME("sources_changed"), sources_changed.size() > 0);
- _queue_update_script_classes();
first_scan = false;
} else {
ERR_FAIL_COND(thread.is_started());
@@ -841,6 +863,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAc
if (fc && fc->modification_time == mt && fc->import_modification_time == import_mt && !_test_for_reimport(path, true)) {
fi->type = fc->type;
+ fi->resource_script_class = fc->resource_script_class;
fi->uid = fc->uid;
fi->deps = fc->deps;
fi->modified_time = fc->modification_time;
@@ -862,13 +885,14 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAc
if (fc->type.is_empty()) {
fi->type = ResourceLoader::get_resource_type(path);
+ fi->resource_script_class = ResourceLoader::get_resource_script_class(path);
fi->import_group_file = ResourceLoader::get_import_group_file(path);
//there is also the chance that file type changed due to reimport, must probably check this somehow here (or kind of note it for next time in another file?)
//note: I think this should not happen any longer..
}
if (fc->uid == ResourceUID::INVALID_ID) {
- // imported files should always have a UUID, so attempt to fetch it.
+ // imported files should always have a UID, so attempt to fetch it.
fi->uid = ResourceLoader::get_resource_uid(path);
}
@@ -891,6 +915,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAc
if (fc && fc->modification_time == mt) {
//not imported, so just update type if changed
fi->type = fc->type;
+ fi->resource_script_class = fc->resource_script_class;
fi->uid = fc->uid;
fi->modified_time = fc->modification_time;
fi->deps = fc->deps;
@@ -902,6 +927,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAc
} else {
//new or modified time
fi->type = ResourceLoader::get_resource_type(path);
+ fi->resource_script_class = ResourceLoader::get_resource_script_class(path);
if (fi->type == "" && textfile_extensions.has(ext)) {
fi->type = "TextFile";
}
@@ -911,6 +937,10 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAc
fi->modified_time = mt;
fi->import_modified_time = 0;
fi->import_valid = true;
+
+ if (ClassDB::is_parent_class(fi->type, SNAME("Script"))) {
+ _queue_update_script_class(path);
+ }
}
}
@@ -922,20 +952,6 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAc
}
}
- for (int i = 0; i < ScriptServer::get_language_count(); i++) {
- ScriptLanguage *lang = ScriptServer::get_language(i);
- if (lang->supports_documentation() && fi->type == lang->get_type()) {
- Ref<Script> scr = ResourceLoader::load(path);
- if (scr == nullptr) {
- continue;
- }
- Vector<DocData::ClassDoc> docs = scr->get_documentation();
- for (int j = 0; j < docs.size(); j++) {
- EditorHelp::get_doc_data()->add_doc(docs[j]);
- }
- }
- }
-
p_dir->files.push_back(fi);
p_progress.update(idx, total);
}
@@ -1026,6 +1042,7 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
fi->modified_time = FileAccess::get_modified_time(path);
fi->import_modified_time = 0;
fi->type = ResourceLoader::get_resource_type(path);
+ fi->resource_script_class = ResourceLoader::get_resource_script_class(path);
if (fi->type == "" && textfile_extensions.has(ext)) {
fi->type = "TextFile";
}
@@ -1176,7 +1193,9 @@ void EditorFileSystem::scan_changes() {
sp.low = 0;
scan_total = 0;
_scan_fs_changes(filesystem, sp);
- if (_update_scan_actions()) {
+ bool changed = _update_scan_actions();
+ _update_pending_script_classes();
+ if (changed) {
emit_signal(SNAME("filesystem_changed"));
}
}
@@ -1225,11 +1244,12 @@ void EditorFileSystem::_notification(int p_what) {
set_process(false);
thread_sources.wait_to_finish();
- if (_update_scan_actions()) {
+ bool changed = _update_scan_actions();
+ _update_pending_script_classes();
+ if (changed) {
emit_signal(SNAME("filesystem_changed"));
}
emit_signal(SNAME("sources_changed"), sources_changed.size() > 0);
- _queue_update_script_classes();
first_scan = false;
}
} else if (!scanning && thread.is_started()) {
@@ -1242,9 +1262,9 @@ void EditorFileSystem::_notification(int p_what) {
new_filesystem = nullptr;
thread.wait_to_finish();
_update_scan_actions();
+ _update_pending_script_classes();
emit_signal(SNAME("filesystem_changed"));
emit_signal(SNAME("sources_changed"), sources_changed.size() > 0);
- _queue_update_script_classes();
first_scan = false;
}
@@ -1279,7 +1299,12 @@ void EditorFileSystem::_save_filesystem_cache(EditorFileSystemDirectory *p_dir,
if (!p_dir->files[i]->import_group_file.is_empty()) {
group_file_cache.insert(p_dir->files[i]->import_group_file);
}
- String s = p_dir->files[i]->file + "::" + p_dir->files[i]->type + "::" + itos(p_dir->files[i]->uid) + "::" + itos(p_dir->files[i]->modified_time) + "::" + itos(p_dir->files[i]->import_modified_time) + "::" + itos(p_dir->files[i]->import_valid) + "::" + p_dir->files[i]->import_group_file + "::" + p_dir->files[i]->script_class_name + "<>" + p_dir->files[i]->script_class_extends + "<>" + p_dir->files[i]->script_class_icon_path;
+
+ String type = p_dir->files[i]->type;
+ if (p_dir->files[i]->resource_script_class) {
+ type += "/" + String(p_dir->files[i]->resource_script_class);
+ }
+ String s = p_dir->files[i]->file + "::" + type + "::" + itos(p_dir->files[i]->uid) + "::" + itos(p_dir->files[i]->modified_time) + "::" + itos(p_dir->files[i]->import_modified_time) + "::" + itos(p_dir->files[i]->import_valid) + "::" + p_dir->files[i]->import_group_file + "::" + p_dir->files[i]->script_class_name + "<>" + p_dir->files[i]->script_class_extends + "<>" + p_dir->files[i]->script_class_icon_path;
s += "::";
for (int j = 0; j < p_dir->files[i]->deps.size(); j++) {
if (j > 0) {
@@ -1491,42 +1516,68 @@ String EditorFileSystem::_get_global_script_class(const String &p_type, const St
return String();
}
-void EditorFileSystem::_scan_script_classes(EditorFileSystemDirectory *p_dir) {
- int filecount = p_dir->files.size();
- const EditorFileSystemDirectory::FileInfo *const *files = p_dir->files.ptr();
- for (int i = 0; i < filecount; i++) {
- if (files[i]->script_class_name.is_empty()) {
+void EditorFileSystem::_update_script_classes() {
+ update_script_mutex.lock();
+
+ for (const String &path : update_script_paths) {
+ ScriptServer::remove_global_class_by_path(path); // First remove, just in case it changed
+
+ int index = -1;
+ EditorFileSystemDirectory *efd = find_file(path, &index);
+
+ if (!efd || index < 0) {
+ // The file was removed
continue;
}
- String lang;
- for (int j = 0; j < ScriptServer::get_language_count(); j++) {
- if (ScriptServer::get_language(j)->handles_global_class_type(files[i]->type)) {
- lang = ScriptServer::get_language(j)->get_name();
+ if (!efd->files[index]->script_class_name.is_empty()) {
+ String lang;
+ for (int j = 0; j < ScriptServer::get_language_count(); j++) {
+ if (ScriptServer::get_language(j)->handles_global_class_type(efd->files[index]->type)) {
+ lang = ScriptServer::get_language(j)->get_name();
+ }
}
+ if (lang.is_empty()) {
+ continue; // No lang found that can handle this global class
+ }
+
+ 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);
}
- ScriptServer::add_global_class(files[i]->script_class_name, files[i]->script_class_extends, lang, p_dir->get_file_path(i));
- EditorNode::get_editor_data().script_class_set_icon_path(files[i]->script_class_name, files[i]->script_class_icon_path);
- EditorNode::get_editor_data().script_class_set_name(files[i]->file, files[i]->script_class_name);
}
- for (int i = 0; i < p_dir->get_subdir_count(); i++) {
- _scan_script_classes(p_dir->get_subdir(i));
- }
-}
-void EditorFileSystem::update_script_classes() {
- if (!update_script_classes_queued.is_set()) {
- return;
- }
+ // Parse documentation second, as it requires the class names to be correct and registered
+ for (const String &path : update_script_paths) {
+ int index = -1;
+ EditorFileSystemDirectory *efd = find_file(path, &index);
- update_script_classes_queued.clear();
- ScriptServer::global_classes_clear();
- if (get_filesystem()) {
- _scan_script_classes(get_filesystem());
+ if (!efd || index < 0) {
+ // The file was removed
+ continue;
+ }
+
+ for (int i = 0; i < ScriptServer::get_language_count(); i++) {
+ ScriptLanguage *lang = ScriptServer::get_language(i);
+ if (lang->supports_documentation() && efd->files[index]->type == lang->get_type()) {
+ Ref<Script> scr = ResourceLoader::load(path);
+ if (scr.is_null()) {
+ continue;
+ }
+ Vector<DocData::ClassDoc> docs = scr->get_documentation();
+ for (int j = 0; j < docs.size(); j++) {
+ EditorHelp::get_doc_data()->add_doc(docs[j]);
+ }
+ }
+ }
}
+ update_script_paths.clear();
+ update_script_mutex.unlock();
+
ScriptServer::save_global_classes();
EditorNode::get_editor_data().script_class_save_icon_paths();
+ emit_signal("script_classes_updated");
// Rescan custom loaders and savers.
// Doing the following here because the `filesystem_changed` signal fires multiple times and isn't always followed by script classes update.
@@ -1537,13 +1588,21 @@ void EditorFileSystem::update_script_classes() {
ResourceSaver::add_custom_savers();
}
-void EditorFileSystem::_queue_update_script_classes() {
- if (update_script_classes_queued.is_set()) {
- return;
+void EditorFileSystem::_update_pending_script_classes() {
+ if (!update_script_paths.is_empty()) {
+ _update_script_classes();
+ } else {
+ // In case the class cache file was removed somehow, regenerate it.
+ if (!FileAccess::exists(ScriptServer::get_global_class_cache_file_path())) {
+ ScriptServer::save_global_classes();
+ }
}
+}
- update_script_classes_queued.set();
- call_deferred(SNAME("update_script_classes"));
+void EditorFileSystem::_queue_update_script_class(const String &p_path) {
+ update_script_mutex.lock();
+ update_script_paths.insert(p_path);
+ update_script_mutex.unlock();
}
void EditorFileSystem::update_file(const String &p_file) {
@@ -1565,12 +1624,16 @@ void EditorFileSystem::update_file(const String &p_file) {
ResourceUID::get_singleton()->remove_id(fs->files[cpos]->uid);
}
}
+ if (ClassDB::is_parent_class(fs->files[cpos]->type, SNAME("Script"))) {
+ _queue_update_script_class(p_file);
+ }
+
memdelete(fs->files[cpos]);
fs->files.remove_at(cpos);
}
+ _update_pending_script_classes();
call_deferred(SNAME("emit_signal"), "filesystem_changed"); //update later
- _queue_update_script_classes();
return;
}
@@ -1578,6 +1641,8 @@ void EditorFileSystem::update_file(const String &p_file) {
if (type.is_empty() && textfile_extensions.has(p_file.get_extension())) {
type = "TextFile";
}
+ String script_class = ResourceLoader::get_resource_script_class(p_file);
+
ResourceUID::ID uid = ResourceLoader::get_resource_uid(p_file);
if (cpos == -1) {
@@ -1611,6 +1676,7 @@ void EditorFileSystem::update_file(const String &p_file) {
}
fs->files[cpos]->type = type;
+ fs->files[cpos]->resource_script_class = script_class;
fs->files[cpos]->uid = uid;
fs->files[cpos]->script_class_name = _get_global_script_class(type, p_file, &fs->files[cpos]->script_class_extends, &fs->files[cpos]->script_class_icon_path);
fs->files[cpos]->import_group_file = ResourceLoader::get_import_group_file(p_file);
@@ -1630,8 +1696,12 @@ void EditorFileSystem::update_file(const String &p_file) {
// Update preview
EditorResourcePreview::get_singleton()->check_for_invalidation(p_file);
+ if (ClassDB::is_parent_class(fs->files[cpos]->type, SNAME("Script"))) {
+ _queue_update_script_class(p_file);
+ }
+
+ _update_pending_script_classes();
call_deferred(SNAME("emit_signal"), "filesystem_changed"); //update later
- _queue_update_script_classes();
}
HashSet<String> EditorFileSystem::get_valid_extensions() const {
@@ -2319,14 +2389,14 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const
}
if (p_generate) {
- return ResourceUID::get_singleton()->create_id(); // Just create a new one, we will be notified of save anyway and fetch the right UUID at that time, to keep things simple.
+ return ResourceUID::get_singleton()->create_id(); // Just create a new one, we will be notified of save anyway and fetch the right UID at that time, to keep things simple.
} else {
return ResourceUID::INVALID_ID;
}
} else if (fs->files[cpos]->uid != ResourceUID::INVALID_ID) {
return fs->files[cpos]->uid;
} else if (p_generate) {
- return ResourceUID::get_singleton()->create_id(); // Just create a new one, we will be notified of save anyway and fetch the right UUID at that time, to keep things simple.
+ return ResourceUID::get_singleton()->create_id(); // Just create a new one, we will be notified of save anyway and fetch the right UID at that time, to keep things simple.
} else {
return ResourceUID::INVALID_ID;
}
@@ -2413,10 +2483,10 @@ void EditorFileSystem::_bind_methods() {
ClassDB::bind_method(D_METHOD("update_file", "path"), &EditorFileSystem::update_file);
ClassDB::bind_method(D_METHOD("get_filesystem_path", "path"), &EditorFileSystem::get_filesystem_path);
ClassDB::bind_method(D_METHOD("get_file_type", "path"), &EditorFileSystem::get_file_type);
- ClassDB::bind_method(D_METHOD("update_script_classes"), &EditorFileSystem::update_script_classes);
ClassDB::bind_method(D_METHOD("reimport_files", "files"), &EditorFileSystem::reimport_files);
ADD_SIGNAL(MethodInfo("filesystem_changed"));
+ ADD_SIGNAL(MethodInfo("script_classes_updated"));
ADD_SIGNAL(MethodInfo("sources_changed", PropertyInfo(Variant::BOOL, "exist")));
ADD_SIGNAL(MethodInfo("resources_reimported", PropertyInfo(Variant::PACKED_STRING_ARRAY, "resources")));
ADD_SIGNAL(MethodInfo("resources_reload", PropertyInfo(Variant::PACKED_STRING_ARRAY, "resources")));
@@ -2472,7 +2542,6 @@ EditorFileSystem::EditorFileSystem() {
using_fat32_or_exfat = (da->get_filesystem_type() == "FAT32" || da->get_filesystem_type() == "exFAT");
scan_total = 0;
- update_script_classes_queued.clear();
MessageQueue::get_singleton()->push_callable(callable_mp(ResourceUID::get_singleton(), &ResourceUID::clear)); // Will be updated on scan.
ResourceSaver::set_get_resource_id_for_path(_resource_saver_get_resource_id_for_path);
}
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index 2985134093..2490bd31b3 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -54,6 +54,7 @@ class EditorFileSystemDirectory : public Object {
struct FileInfo {
String file;
StringName type;
+ StringName resource_script_class; // If any resource has script with a global class name, its found here.
ResourceUID::ID uid = ResourceUID::INVALID_ID;
uint64_t modified_time = 0;
uint64_t import_modified_time = 0;
@@ -61,6 +62,7 @@ class EditorFileSystemDirectory : public Object {
String import_group_file;
Vector<String> deps;
bool verified = false; //used for checking changes
+ // These are for script resources only.
String script_class_name;
String script_class_extends;
String script_class_icon_path;
@@ -90,6 +92,7 @@ public:
String get_file(int p_idx) const;
String get_file_path(int p_idx) const;
StringName get_file_type(int p_idx) const;
+ StringName get_file_resource_script_class(int p_idx) const;
Vector<String> get_file_deps(int p_idx) const;
bool get_file_import_is_valid(int p_idx) const;
uint64_t get_file_modified_time(int p_idx) const;
@@ -189,6 +192,7 @@ class EditorFileSystem : public Node {
/* Used for reading the filesystem cache file */
struct FileCache {
String type;
+ String resource_script_class;
ResourceUID::ID uid = ResourceUID::INVALID_ID;
uint64_t modification_time = 0;
uint64_t import_modification_time = 0;
@@ -257,9 +261,11 @@ class EditorFileSystem : public Node {
}
};
- void _scan_script_classes(EditorFileSystemDirectory *p_dir);
- SafeFlag update_script_classes_queued;
- void _queue_update_script_classes();
+ Mutex update_script_mutex;
+ HashSet<String> update_script_paths;
+ void _queue_update_script_class(const String &p_path);
+ void _update_script_classes();
+ void _update_pending_script_classes();
String _get_global_script_class(const String &p_type, const String &p_path, String *r_extends, String *r_icon_path) const;
@@ -312,8 +318,6 @@ public:
void reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const HashMap<StringName, Variant> &p_custom_params);
- void update_script_classes();
-
bool is_group_file(const String &p_path) const;
void move_group_file(const String &p_path, const String &p_new_path);
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 5baa58873e..bb7098643a 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -41,7 +41,7 @@
#include "editor/plugins/script_editor_plugin.h"
#include "scene/gui/line_edit.h"
-#define CONTRIBUTE_URL vformat("%s/community/contributing/updating_the_class_reference.html", VERSION_DOCS_URL)
+#define CONTRIBUTE_URL vformat("%s/contributing/documentation/updating_the_class_reference.html", VERSION_DOCS_URL)
DocTools *EditorHelp::doc = nullptr;
@@ -195,8 +195,8 @@ void EditorHelp::_class_desc_resized(bool p_force_update_theme) {
display_margin = new_display_margin;
Ref<StyleBox> class_desc_stylebox = EditorNode::get_singleton()->get_theme_base()->get_theme_stylebox(SNAME("background"), SNAME("EditorHelp"))->duplicate();
- class_desc_stylebox->set_default_margin(SIDE_LEFT, display_margin);
- class_desc_stylebox->set_default_margin(SIDE_RIGHT, display_margin);
+ class_desc_stylebox->set_content_margin(SIDE_LEFT, display_margin);
+ class_desc_stylebox->set_content_margin(SIDE_RIGHT, display_margin);
class_desc->add_theme_style_override("normal", class_desc_stylebox);
class_desc->add_theme_style_override("focused", class_desc_stylebox);
}
@@ -2370,7 +2370,7 @@ EditorHelpBit::EditorHelpBit() {
rich_text = memnew(RichTextLabel);
add_child(rich_text);
rich_text->connect("meta_clicked", callable_mp(this, &EditorHelpBit::_meta_clicked));
- rich_text->set_fit_content_height(true);
+ rich_text->set_fit_content(true);
set_custom_minimum_size(Size2(0, 50 * EDSCALE));
}
@@ -2448,10 +2448,6 @@ void FindBar::_notification(int p_what) {
}
}
-void FindBar::_bind_methods() {
- ADD_SIGNAL(MethodInfo("search"));
-}
-
void FindBar::set_rich_text_label(RichTextLabel *p_rich_text_label) {
rich_text_label = p_rich_text_label;
}
diff --git a/editor/editor_help.h b/editor/editor_help.h
index 9be17143c7..81cd6d6674 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -72,8 +72,6 @@ protected:
bool _search(bool p_search_previous = false);
- static void _bind_methods();
-
public:
void set_rich_text_label(RichTextLabel *p_rich_text_label);
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index c24bab054f..42d8f48ea0 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -618,7 +618,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
if (is_layout_rtl()) {
mpos.x = get_size().x - mpos.x;
}
- bool button_left = (me->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE;
+ bool button_left = me->get_button_mask().has_flag(MouseButtonMask::LEFT);
bool new_keying_hover = keying_rect.has_point(mpos) && !button_left;
if (new_keying_hover != keying_hover) {
@@ -886,7 +886,7 @@ void EditorProperty::_update_pin_flags() {
static Control *make_help_bit(const String &p_text, bool p_property) {
EditorHelpBit *help_bit = memnew(EditorHelpBit);
- help_bit->get_rich_text()->set_fixed_size_to_width(360 * EDSCALE);
+ help_bit->get_rich_text()->set_custom_minimum_size(Size2(360 * EDSCALE, 1));
PackedStringArray slices = p_text.split("::", false);
if (slices.is_empty()) {
@@ -1084,7 +1084,7 @@ void EditorInspectorPlugin::parse_group(Object *p_object, const String &p_group)
GDVIRTUAL_CALL(_parse_group, p_object, p_group);
}
-bool EditorInspectorPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
bool ret = false;
GDVIRTUAL_CALL(_parse_property, p_object, p_type, p_path, p_hint, p_hint_text, p_usage, p_wide, ret);
return ret;
@@ -1361,38 +1361,22 @@ void EditorInspectorSection::_notification(int p_what) {
} break;
case NOTIFICATION_DRAG_BEGIN: {
- Dictionary dd = get_viewport()->gui_get_drag_data();
-
- // Only allow dropping if the section contains properties which can take the dragged data.
- bool children_can_drop = false;
- for (int child_idx = 0; child_idx < vbox->get_child_count(); child_idx++) {
- Control *editor_property = Object::cast_to<Control>(vbox->get_child(child_idx));
-
- // Test can_drop_data and can_drop_data_fw, since can_drop_data only works if set up with forwarding or if script attached.
- if (editor_property && (editor_property->can_drop_data(Point2(), dd) || editor_property->call("_can_drop_data_fw", Point2(), dd, this))) {
- children_can_drop = true;
- break;
- }
- }
-
- dropping = children_can_drop;
- queue_redraw();
+ dropping_for_unfold = true;
} break;
case NOTIFICATION_DRAG_END: {
- dropping = false;
- queue_redraw();
+ dropping_for_unfold = false;
} break;
case NOTIFICATION_MOUSE_ENTER: {
- if (dropping) {
+ if (dropping || dropping_for_unfold) {
dropping_unfold_timer->start();
}
queue_redraw();
} break;
case NOTIFICATION_MOUSE_EXIT: {
- if (dropping) {
+ if (dropping || dropping_for_unfold) {
dropping_unfold_timer->stop();
}
queue_redraw();
@@ -1696,13 +1680,13 @@ void EditorInspectorArray::_move_element(int p_element_index, int p_to_pos) {
} else {
action_name = vformat("Move element %d to position %d in property array with prefix %s.", p_element_index, p_to_pos, array_element_prefix);
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(action_name);
if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) {
// Call the function.
Callable move_function = EditorNode::get_singleton()->get_editor_data().get_move_array_element_function(object->get_class_name());
if (move_function.is_valid()) {
- Variant args[] = { undo_redo.ptr(), object, array_element_prefix, p_element_index, p_to_pos };
+ Variant args[] = { undo_redo, object, array_element_prefix, p_element_index, p_to_pos };
const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
Variant return_value;
Callable::CallError call_error;
@@ -1840,14 +1824,14 @@ void EditorInspectorArray::_move_element(int p_element_index, int p_to_pos) {
}
void EditorInspectorArray::_clear_array() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat("Clear property array with prefix %s.", array_element_prefix));
if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) {
for (int i = count - 1; i >= 0; i--) {
// Call the function.
Callable move_function = EditorNode::get_singleton()->get_editor_data().get_move_array_element_function(object->get_class_name());
if (move_function.is_valid()) {
- Variant args[] = { undo_redo.ptr(), object, array_element_prefix, i, -1 };
+ Variant args[] = { undo_redo, object, array_element_prefix, i, -1 };
const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
Variant return_value;
Callable::CallError call_error;
@@ -1893,7 +1877,7 @@ void EditorInspectorArray::_resize_array(int p_size) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat("Resize property array with prefix %s.", array_element_prefix));
if (p_size > count) {
if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) {
@@ -1901,7 +1885,7 @@ void EditorInspectorArray::_resize_array(int p_size) {
// Call the function.
Callable move_function = EditorNode::get_singleton()->get_editor_data().get_move_array_element_function(object->get_class_name());
if (move_function.is_valid()) {
- Variant args[] = { undo_redo.ptr(), object, array_element_prefix, -1, -1 };
+ Variant args[] = { undo_redo, object, array_element_prefix, -1, -1 };
const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
Variant return_value;
Callable::CallError call_error;
@@ -1920,7 +1904,7 @@ void EditorInspectorArray::_resize_array(int p_size) {
// Call the function.
Callable move_function = EditorNode::get_singleton()->get_editor_data().get_move_array_element_function(object->get_class_name());
if (move_function.is_valid()) {
- Variant args[] = { undo_redo.ptr(), object, array_element_prefix, i, -1 };
+ Variant args[] = { undo_redo, object, array_element_prefix, i, -1 };
const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
Variant return_value;
Callable::CallError call_error;
@@ -2065,7 +2049,7 @@ void EditorInspectorArray::_setup() {
ae.panel = memnew(PanelContainer);
ae.panel->set_focus_mode(FOCUS_ALL);
ae.panel->set_mouse_filter(MOUSE_FILTER_PASS);
- ae.panel->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(ae.panel, EditorInspectorArray);
ae.panel->set_meta("index", begin_array_index + i);
ae.panel->set_tooltip_text(vformat(TTR("Element %d: %s%d*"), i, array_element_prefix, i));
ae.panel->connect("focus_entered", callable_mp((CanvasItem *)ae.panel, &PanelContainer::queue_redraw));
@@ -2197,8 +2181,7 @@ void EditorInspectorArray::_notification(int p_what) {
odd_style->set_bg_color(color.darkened(-0.08));
even_style->set_bg_color(color.darkened(0.08));
- for (int i = 0; i < (int)array_elements.size(); i++) {
- ArrayElement &ae = array_elements[i];
+ for (ArrayElement &ae : array_elements) {
if (ae.move_texture_rect) {
ae.move_texture_rect->set_texture(get_theme_icon(SNAME("TripleBar"), SNAME("EditorIcons")));
}
@@ -2236,10 +2219,6 @@ void EditorInspectorArray::_notification(int p_what) {
}
void EditorInspectorArray::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &EditorInspectorArray::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &EditorInspectorArray::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &EditorInspectorArray::drop_data_fw);
-
ADD_SIGNAL(MethodInfo("page_change_request"));
}
@@ -3303,6 +3282,11 @@ void EditorInspector::update_tree() {
ped->parse_end(object);
_parse_added_editors(main_vbox, nullptr, ped);
}
+
+ if (_is_main_editor_inspector()) {
+ // Updating inspector might invalidate some editing owners.
+ EditorNode::get_singleton()->hide_unused_editors();
+ }
}
void EditorInspector::update_property(const String &p_prop) {
@@ -3327,6 +3311,9 @@ void EditorInspector::_clear() {
sections.clear();
pending.clear();
restart_request_props.clear();
+ if (_is_main_editor_inspector()) {
+ EditorNode::get_singleton()->hide_unused_editors(this);
+ }
}
Object *EditorInspector::get_edited_object() {
@@ -3568,8 +3555,8 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
}
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- if (!undo_redo.is_valid() || bool(object->call("_dont_undo_redo"))) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ if (bool(object->call("_dont_undo_redo"))) {
object->set(p_name, p_value);
if (p_refresh_all) {
_edit_request_change(object, "");
@@ -3661,6 +3648,10 @@ 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.
@@ -3689,7 +3680,7 @@ void EditorInspector::_multiple_properties_changed(Vector<String> p_paths, Array
}
names += p_paths[i];
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Multiple:") + " " + names, UndoRedo::MERGE_ENDS);
for (int i = 0; i < p_paths.size(); i++) {
_edit_set(p_paths[i], p_values[i], false, "");
@@ -3724,7 +3715,7 @@ void EditorInspector::_property_deleted(const String &p_path) {
if (p_path.begins_with("metadata/")) {
String name = p_path.replace_first("metadata/", "");
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Remove metadata %s"), name));
undo_redo->add_do_method(object, "remove_meta", name);
undo_redo->add_undo_method(object, "set_meta", name, object->get_meta(name));
@@ -3790,26 +3781,17 @@ void EditorInspector::_property_pinned(const String &p_path, bool p_pinned) {
Node *node = Object::cast_to<Node>(object);
ERR_FAIL_COND(!node);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- if (undo_redo.is_valid()) {
- undo_redo->create_action(vformat(p_pinned ? TTR("Pinned %s") : TTR("Unpinned %s"), p_path));
- undo_redo->add_do_method(node, "_set_property_pinned", p_path, p_pinned);
- undo_redo->add_undo_method(node, "_set_property_pinned", p_path, !p_pinned);
- if (editor_property_map.has(p_path)) {
- for (List<EditorProperty *>::Element *E = editor_property_map[p_path].front(); E; E = E->next()) {
- undo_redo->add_do_method(E->get(), "_update_editor_property_status");
- undo_redo->add_undo_method(E->get(), "_update_editor_property_status");
- }
- }
- undo_redo->commit_action();
- } else {
- node->set_property_pinned(p_path, p_pinned);
- if (editor_property_map.has(p_path)) {
- for (List<EditorProperty *>::Element *E = editor_property_map[p_path].front(); E; E = E->next()) {
- E->get()->update_editor_property_status();
- }
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(vformat(p_pinned ? TTR("Pinned %s") : TTR("Unpinned %s"), p_path));
+ undo_redo->add_do_method(node, "_set_property_pinned", p_path, p_pinned);
+ undo_redo->add_undo_method(node, "_set_property_pinned", p_path, !p_pinned);
+ if (editor_property_map.has(p_path)) {
+ for (List<EditorProperty *>::Element *E = editor_property_map[p_path].front(); E; E = E->next()) {
+ undo_redo->add_do_method(E->get(), "_update_editor_property_status");
+ undo_redo->add_undo_method(E->get(), "_update_editor_property_status");
}
}
+ undo_redo->commit_action();
}
void EditorInspector::_property_selected(const String &p_path, int p_focusable) {
@@ -3988,7 +3970,7 @@ void EditorInspector::_add_meta_confirm() {
Variant defval;
Callable::CallError ce;
Variant::construct(Variant::Type(add_meta_type->get_selected_id()), defval, nullptr, 0, ce);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Add metadata %s"), name));
undo_redo->add_do_method(object, "set_meta", name, defval);
undo_redo->add_undo_method(object, "remove_meta", name);
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index af8d1e6806..eab495ef3d 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -47,11 +47,7 @@ class TextureRect;
class EditorPropertyRevert {
public:
- static bool get_instantiated_node_original_property(Node *p_node, const StringName &p_prop, Variant &value, bool p_check_class_default = true);
- static bool is_node_property_different(Node *p_node, const Variant &p_current, const Variant &p_orig);
- static bool is_property_value_different(const Variant &p_a, const Variant &p_b);
static Variant get_property_revert_value(Object *p_object, const StringName &p_property, bool *r_is_valid);
-
static bool can_property_revert(Object *p_object, const StringName &p_property, const Variant *p_custom_current_value = nullptr);
};
@@ -231,7 +227,7 @@ protected:
GDVIRTUAL1(_parse_begin, Object *)
GDVIRTUAL2(_parse_category, Object *, String)
GDVIRTUAL2(_parse_group, Object *, String)
- GDVIRTUAL7R(bool, _parse_property, Object *, int, String, int, String, int, bool)
+ GDVIRTUAL7R(bool, _parse_property, Object *, Variant::Type, String, PropertyHint, String, BitField<PropertyUsageFlags>, bool)
GDVIRTUAL1(_parse_end, Object *)
public:
@@ -243,7 +239,7 @@ public:
virtual void parse_begin(Object *p_object);
virtual void parse_category(Object *p_object, const String &p_category);
virtual void parse_group(Object *p_object, const String &p_group);
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false);
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false);
virtual void parse_end(Object *p_object);
};
@@ -276,6 +272,7 @@ class EditorInspectorSection : public Container {
Timer *dropping_unfold_timer = nullptr;
bool dropping = false;
+ bool dropping_for_unfold = false;
HashSet<StringName> revertable_properties;
@@ -330,7 +327,7 @@ class EditorInspectorArray : public EditorInspectorSection {
AcceptDialog *resize_dialog = nullptr;
SpinBox *new_size_spin_box = nullptr;
- // Pagination
+ // Pagination.
int page_length = 5;
int page = 0;
int max_page = 0;
@@ -494,13 +491,14 @@ class EditorInspector : public ScrollContainer {
HashMap<ObjectID, int> scroll_cache;
- String property_prefix; //used for sectioned inspector
+ String property_prefix; // Used for sectioned inspector.
String object_class;
Variant property_clipboard;
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);
diff --git a/editor/editor_locale_dialog.cpp b/editor/editor_locale_dialog.cpp
index d57b3b66cc..5a372412fa 100644
--- a/editor/editor_locale_dialog.cpp
+++ b/editor/editor_locale_dialog.cpp
@@ -31,7 +31,6 @@
#include "editor_locale_dialog.h"
#include "core/config/project_settings.h"
-#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_undo_redo_manager.h"
#include "scene/gui/check_button.h"
@@ -141,7 +140,7 @@ void EditorLocaleDialog::_filter_lang_option_changed() {
f_lang_all.sort();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Changed Locale Language Filter"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/language_filter", f_lang_all);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/language_filter", prev);
@@ -175,7 +174,7 @@ void EditorLocaleDialog::_filter_script_option_changed() {
f_script_all.sort();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Changed Locale Script Filter"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/script_filter", f_script_all);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/script_filter", prev);
@@ -209,7 +208,7 @@ void EditorLocaleDialog::_filter_cnt_option_changed() {
f_cnt_all.sort();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Changed Locale Country Filter"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/country_filter", f_cnt_all);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/country_filter", prev);
@@ -224,7 +223,7 @@ void EditorLocaleDialog::_filter_mode_changed(int p_mode) {
prev = GLOBAL_GET("internationalization/locale/locale_filter_mode");
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Changed Locale Filter Mode"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter_mode", f_mode);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter_mode", prev);
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 550c57121e..296181f79d 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -360,11 +360,6 @@ void EditorLog::_reset_message_counts() {
}
}
-void EditorLog::_bind_methods() {
- ADD_SIGNAL(MethodInfo("clear_request"));
- ADD_SIGNAL(MethodInfo("copy_request"));
-}
-
EditorLog::EditorLog() {
save_state_timer = memnew(Timer);
save_state_timer->set_wait_time(2);
diff --git a/editor/editor_log.h b/editor/editor_log.h
index 7a3c1c01b7..b875066afa 100644
--- a/editor/editor_log.h
+++ b/editor/editor_log.h
@@ -178,7 +178,6 @@ private:
void _update_theme();
protected:
- static void _bind_methods();
void _notification(int p_what);
public:
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 13dd03068f..f317c23b83 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -58,6 +58,7 @@
#include "scene/gui/tab_bar.h"
#include "scene/gui/tab_container.h"
#include "scene/main/window.h"
+#include "scene/property_utils.h"
#include "scene/resources/packed_scene.h"
#include "servers/display_server.h"
#include "servers/navigation_server_3d.h"
@@ -124,6 +125,7 @@
#include "editor/plugins/asset_library_editor_plugin.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/debugger_editor_plugin.h"
+#include "editor/plugins/dedicated_server_export_plugin.h"
#include "editor/plugins/editor_preview_plugins.h"
#include "editor/plugins/editor_resource_conversion_plugin.h"
#include "editor/plugins/gdextension_export_plugin.h"
@@ -288,7 +290,7 @@ void EditorNode::_update_scene_tabs() {
icon = EditorNode::get_singleton()->get_object_icon(type_node, "Node");
}
- bool unsaved = get_undo_redo()->is_history_unsaved(editor_data.get_scene_history_id(i));
+ bool unsaved = EditorUndoRedoManager::get_singleton()->is_history_unsaved(editor_data.get_scene_history_id(i));
scene_tabs->add_tab(disambiguated_scene_names[i] + (unsaved ? "(*)" : ""), icon);
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_GLOBAL_MENU)) {
@@ -493,16 +495,16 @@ void EditorNode::_update_from_settings() {
tree->set_debug_collision_contact_color(GLOBAL_GET("debug/shapes/collision/contact_color"));
#ifdef DEBUG_ENABLED
- NavigationServer3D::get_singleton_mut()->set_debug_navigation_edge_connection_color(GLOBAL_GET("debug/shapes/navigation/edge_connection_color"));
- NavigationServer3D::get_singleton_mut()->set_debug_navigation_geometry_edge_color(GLOBAL_GET("debug/shapes/navigation/geometry_edge_color"));
- NavigationServer3D::get_singleton_mut()->set_debug_navigation_geometry_face_color(GLOBAL_GET("debug/shapes/navigation/geometry_face_color"));
- NavigationServer3D::get_singleton_mut()->set_debug_navigation_geometry_edge_disabled_color(GLOBAL_GET("debug/shapes/navigation/geometry_edge_disabled_color"));
- NavigationServer3D::get_singleton_mut()->set_debug_navigation_geometry_face_disabled_color(GLOBAL_GET("debug/shapes/navigation/geometry_face_disabled_color"));
- NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_edge_connections(GLOBAL_GET("debug/shapes/navigation/enable_edge_connections"));
- NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_edge_connections_xray(GLOBAL_GET("debug/shapes/navigation/enable_edge_connections_xray"));
- NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_edge_lines(GLOBAL_GET("debug/shapes/navigation/enable_edge_lines"));
- NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_edge_lines_xray(GLOBAL_GET("debug/shapes/navigation/enable_edge_lines_xray"));
- NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_geometry_face_random_color(GLOBAL_GET("debug/shapes/navigation/enable_geometry_face_random_color"));
+ NavigationServer3D::get_singleton()->set_debug_navigation_edge_connection_color(GLOBAL_GET("debug/shapes/navigation/edge_connection_color"));
+ NavigationServer3D::get_singleton()->set_debug_navigation_geometry_edge_color(GLOBAL_GET("debug/shapes/navigation/geometry_edge_color"));
+ NavigationServer3D::get_singleton()->set_debug_navigation_geometry_face_color(GLOBAL_GET("debug/shapes/navigation/geometry_face_color"));
+ NavigationServer3D::get_singleton()->set_debug_navigation_geometry_edge_disabled_color(GLOBAL_GET("debug/shapes/navigation/geometry_edge_disabled_color"));
+ NavigationServer3D::get_singleton()->set_debug_navigation_geometry_face_disabled_color(GLOBAL_GET("debug/shapes/navigation/geometry_face_disabled_color"));
+ NavigationServer3D::get_singleton()->set_debug_navigation_enable_edge_connections(GLOBAL_GET("debug/shapes/navigation/enable_edge_connections"));
+ NavigationServer3D::get_singleton()->set_debug_navigation_enable_edge_connections_xray(GLOBAL_GET("debug/shapes/navigation/enable_edge_connections_xray"));
+ NavigationServer3D::get_singleton()->set_debug_navigation_enable_edge_lines(GLOBAL_GET("debug/shapes/navigation/enable_edge_lines"));
+ NavigationServer3D::get_singleton()->set_debug_navigation_enable_edge_lines_xray(GLOBAL_GET("debug/shapes/navigation/enable_edge_lines_xray"));
+ NavigationServer3D::get_singleton()->set_debug_navigation_enable_geometry_face_random_color(GLOBAL_GET("debug/shapes/navigation/enable_geometry_face_random_color"));
#endif // DEBUG_ENABLED
}
@@ -533,8 +535,8 @@ void EditorNode::_notification(int p_what) {
opening_prev = false;
}
- bool global_unsaved = get_undo_redo()->is_history_unsaved(EditorUndoRedoManager::GLOBAL_HISTORY);
- bool scene_or_global_unsaved = global_unsaved || get_undo_redo()->is_history_unsaved(editor_data.get_current_edited_scene_history_id());
+ bool global_unsaved = EditorUndoRedoManager::get_singleton()->is_history_unsaved(EditorUndoRedoManager::GLOBAL_HISTORY);
+ bool scene_or_global_unsaved = global_unsaved || EditorUndoRedoManager::get_singleton()->is_history_unsaved(editor_data.get_current_edited_scene_history_id());
if (unsaved_cache != scene_or_global_unsaved) {
unsaved_cache = scene_or_global_unsaved;
_update_title();
@@ -579,15 +581,17 @@ void EditorNode::_notification(int p_what) {
ResourceImporterTexture::get_singleton()->update_imports();
+ bottom_panel_updating = false;
} break;
case NOTIFICATION_ENTER_TREE: {
Engine::get_singleton()->set_editor_hint(true);
- Window *window = static_cast<Window *>(get_tree()->get_root());
+ Window *window = get_window();
if (window) {
// Handle macOS fullscreen and extend-to-title changes.
window->connect("titlebar_changed", callable_mp(this, &EditorNode::_titlebar_resized));
+ window->set_theme(theme);
}
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/low_processor_mode_sleep_usec")));
@@ -608,6 +612,9 @@ void EditorNode::_notification(int p_what) {
} break;
case NOTIFICATION_EXIT_TREE: {
+ if (progress_dialog) {
+ progress_dialog->queue_free();
+ }
editor_data.save_editor_external_data();
FileAccess::set_file_close_fail_notify_callback(nullptr);
log->deinit(); // Do not get messages anymore.
@@ -630,10 +637,14 @@ void EditorNode::_notification(int p_what) {
set_addon_plugin_enabled(addons[i], true);
}
_initializing_plugins = false;
+
+ if (!pending_addons.is_empty()) {
+ EditorFileSystem::get_singleton()->connect("script_classes_updated", callable_mp(this, &EditorNode::_enable_pending_addons));
+ }
}
RenderingServer::get_singleton()->viewport_set_disable_2d(get_scene_root()->get_viewport_rid(), true);
- RenderingServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(), true);
+ RenderingServer::get_singleton()->viewport_set_environment_mode(get_viewport()->get_viewport_rid(), RenderingServer::VIEWPORT_ENVIRONMENT_DISABLED);
feature_profile_manager->notify_changed();
@@ -688,9 +699,11 @@ void EditorNode::_notification(int p_what) {
if (theme_changed) {
theme = create_custom_theme(theme_base->get_theme());
+ DisplayServer::set_early_window_clear_color_override(true, theme->get_color(SNAME("background"), SNAME("Editor")));
theme_base->set_theme(theme);
gui_base->set_theme(theme);
+ get_window()->set_theme(theme);
gui_base->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("Background"), SNAME("EditorStyles")));
scene_root_parent->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("Content"), SNAME("EditorStyles")));
@@ -987,6 +1000,7 @@ void EditorNode::_resources_reimported(const Vector<String> &p_resources) {
for (const String &E : scenes) {
reload_scene(E);
+ reload_instances_with_path_in_edited_scenes(E);
}
scene_tabs->set_current_tab(current_tab);
@@ -1123,6 +1137,12 @@ void EditorNode::_version_button_pressed() {
DisplayServer::get_singleton()->clipboard_set(version_btn->get_meta(META_TEXT_TO_COPY));
}
+void EditorNode::_update_undo_redo_allowed() {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ file_menu->set_item_disabled(file_menu->get_item_index(EDIT_UNDO), !undo_redo->has_undo());
+ file_menu->set_item_disabled(file_menu->get_item_index(EDIT_REDO), !undo_redo->has_redo());
+}
+
void EditorNode::_node_renamed() {
if (InspectorDock::get_inspector_singleton()) {
InspectorDock::get_inspector_singleton()->update_tree();
@@ -1670,7 +1690,7 @@ int EditorNode::_save_external_resources() {
saved++;
}
- get_undo_redo()->set_history_as_saved(EditorUndoRedoManager::GLOBAL_HISTORY);
+ EditorUndoRedoManager::get_singleton()->set_history_as_saved(EditorUndoRedoManager::GLOBAL_HISTORY);
return saved;
}
@@ -1847,7 +1867,7 @@ void EditorNode::_mark_unsaved_scenes() {
String path = node->get_scene_file_path();
if (!path.is_empty() && !FileAccess::exists(path)) {
// Mark scene tab as unsaved if the file is gone.
- get_undo_redo()->set_history_as_unsaved(editor_data.get_scene_history_id(i));
+ EditorUndoRedoManager::get_singleton()->set_history_as_unsaved(editor_data.get_scene_history_id(i));
}
}
@@ -2062,42 +2082,65 @@ bool EditorNode::_is_class_editor_disabled_by_feature_profile(const StringName &
return false;
}
-void EditorNode::edit_item(Object *p_object) {
+void EditorNode::edit_item(Object *p_object, Object *p_editing_owner) {
+ ERR_FAIL_NULL(p_editing_owner);
+
if (p_object && _is_class_editor_disabled_by_feature_profile(p_object->get_class())) {
return;
}
- Vector<EditorPlugin *> top_plugins = editor_plugins_over->get_plugins_list();
Vector<EditorPlugin *> item_plugins;
if (p_object) {
item_plugins = editor_data.get_subeditors(p_object);
}
if (!item_plugins.is_empty()) {
- bool same = true;
- if (item_plugins.size() == top_plugins.size()) {
- for (int i = 0; i < item_plugins.size(); i++) {
- if (item_plugins[i] != top_plugins[i]) {
- same = false;
- }
+ ObjectID owner_id = p_editing_owner->get_instance_id();
+
+ List<EditorPlugin *> to_remove;
+ for (EditorPlugin *plugin : active_plugins[owner_id]) {
+ if (!item_plugins.has(plugin)) {
+ // Remove plugins no longer used by this editing owner.
+ to_remove.push_back(plugin);
+ plugin->make_visible(false);
+ plugin->edit(nullptr);
}
- } else {
- same = false;
}
- if (!same) {
- _display_top_editors(false);
- _set_top_editors(item_plugins);
+ for (EditorPlugin *plugin : to_remove) {
+ active_plugins[owner_id].erase(plugin);
+ }
+
+ for (EditorPlugin *plugin : item_plugins) {
+ if (active_plugins[owner_id].has(plugin)) {
+ continue;
+ }
+
+ for (KeyValue<ObjectID, HashSet<EditorPlugin *>> &kv : active_plugins) {
+ if (kv.key != owner_id) {
+ EditorPropertyResource *epres = Object::cast_to<EditorPropertyResource>(ObjectDB::get_instance(kv.key));
+ if (epres && kv.value.has(plugin)) {
+ // If it's resource property editing the same resource type, fold it.
+ epres->fold_resource();
+ }
+ kv.value.erase(plugin);
+ }
+ }
+ active_plugins[owner_id].insert(plugin);
+ editor_plugins_over->add_plugin(plugin);
+ plugin->edit(p_object);
+ plugin->make_visible(true);
}
- _set_editing_top_editors(p_object);
- _display_top_editors(true);
- } else if (!top_plugins.is_empty()) {
- hide_top_editors();
+ } else {
+ hide_unused_editors(p_editing_owner);
}
}
-void EditorNode::edit_item_resource(Ref<Resource> p_resource) {
- edit_item(p_resource.ptr());
+void EditorNode::push_node_item(Node *p_node) {
+ if (p_node || Object::cast_to<Node>(InspectorDock::get_inspector_singleton()->get_edited_object())) {
+ // Don't push null if the currently edited object is not a Node.
+ push_item(p_node);
+ }
}
void EditorNode::push_item(Object *p_object, const String &p_property, bool p_inspector_only) {
@@ -2106,7 +2149,7 @@ void EditorNode::push_item(Object *p_object, const String &p_property, bool p_in
NodeDock::get_singleton()->set_node(nullptr);
SceneTreeDock::get_singleton()->set_selected(nullptr);
InspectorDock::get_singleton()->update(nullptr);
- _display_top_editors(false);
+ hide_unused_editors();
return;
}
@@ -2134,22 +2177,34 @@ void EditorNode::_save_default_environment() {
}
}
-void EditorNode::hide_top_editors() {
- _display_top_editors(false);
-
- editor_plugins_over->clear();
-}
-
-void EditorNode::_display_top_editors(bool p_display) {
- editor_plugins_over->make_visible(p_display);
-}
-
-void EditorNode::_set_top_editors(Vector<EditorPlugin *> p_editor_plugins_over) {
- editor_plugins_over->set_plugins_list(p_editor_plugins_over);
-}
+void EditorNode::hide_unused_editors(const Object *p_editing_owner) {
+ if (p_editing_owner) {
+ const ObjectID id = p_editing_owner->get_instance_id();
+ for (EditorPlugin *plugin : active_plugins[id]) {
+ plugin->make_visible(false);
+ plugin->edit(nullptr);
+ editor_plugins_over->remove_plugin(plugin);
+ }
+ active_plugins.erase(id);
+ } else {
+ // If no editing owner is provided, this method will go over all owners and check if they are valid.
+ // This is to sweep properties that were removed from the inspector.
+ List<ObjectID> to_remove;
+ for (KeyValue<ObjectID, HashSet<EditorPlugin *>> &kv : active_plugins) {
+ if (!ObjectDB::get_instance(kv.key)) {
+ to_remove.push_back(kv.key);
+ for (EditorPlugin *plugin : kv.value) {
+ plugin->make_visible(false);
+ plugin->edit(nullptr);
+ editor_plugins_over->remove_plugin(plugin);
+ }
+ }
+ }
-void EditorNode::_set_editing_top_editors(Object *p_current_object) {
- editor_plugins_over->edit(p_current_object);
+ for (const ObjectID &id : to_remove) {
+ active_plugins.erase(id);
+ }
+ }
}
static bool overrides_external_editor(Object *p_object) {
@@ -2183,7 +2238,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
NodeDock::get_singleton()->set_node(nullptr);
InspectorDock::get_singleton()->update(nullptr);
- _display_top_editors(false);
+ hide_unused_editors();
return;
}
@@ -2311,6 +2366,9 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
InspectorDock::get_inspector_singleton()->set_use_folding(!disable_folding);
}
+ Object *editor_owner = is_node ? (Object *)SceneTreeDock::get_singleton() : is_resource ? (Object *)InspectorDock::get_inspector_singleton()
+ : (Object *)this;
+
// Take care of the main editor plugin.
if (!inspector_only) {
@@ -2327,25 +2385,33 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
}
}
+ ObjectID editor_owner_id = editor_owner->get_instance_id();
if (main_plugin && !skip_main_plugin) {
// Special case if use of external editor is true.
Resource *current_res = Object::cast_to<Resource>(current_obj);
- if (main_plugin->get_name() == "Script" && !current_obj->is_class("VisualScript") && current_res && !current_res->is_built_in() && (bool(EDITOR_GET("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) {
+ if (main_plugin->get_name() == "Script" && current_res && !current_res->is_built_in() && (bool(EDITOR_GET("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) {
if (!changing_scene) {
main_plugin->edit(current_obj);
}
}
else if (main_plugin != editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible_in_tree() || ScriptEditor::get_singleton()->can_take_away_focus())) {
+ // Unedit previous plugin.
+ editor_plugin_screen->edit(nullptr);
+ active_plugins[editor_owner_id].erase(editor_plugin_screen);
// Update screen main_plugin.
editor_select(plugin_index);
main_plugin->edit(current_obj);
} else {
editor_plugin_screen->edit(current_obj);
}
+ is_main_screen_editing = true;
+ } else if (!main_plugin && editor_plugin_screen && is_main_screen_editing) {
+ editor_plugin_screen->edit(nullptr);
+ is_main_screen_editing = false;
}
- edit_item(current_obj);
+ edit_item(current_obj, editor_owner);
}
InspectorDock::get_singleton()->update(current_obj);
@@ -2734,9 +2800,10 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
if ((int)Input::get_singleton()->get_mouse_button_mask() & 0x7) {
log->add_message(TTR("Can't undo while mouse buttons are pressed."), EditorLog::MSG_TYPE_EDITOR);
} else {
- String action = editor_data.get_undo_redo()->get_current_action_name();
- int id = editor_data.get_undo_redo()->get_current_action_history_id();
- if (!editor_data.get_undo_redo()->undo()) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ String action = undo_redo->get_current_action_name();
+ int id = undo_redo->get_current_action_history_id();
+ if (!undo_redo->undo()) {
log->add_message(TTR("Nothing to undo."), EditorLog::MSG_TYPE_EDITOR);
} else if (!action.is_empty()) {
switch (id) {
@@ -2753,18 +2820,19 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
}
} break;
case EDIT_REDO: {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if ((int)Input::get_singleton()->get_mouse_button_mask() & 0x7) {
log->add_message(TTR("Can't redo while mouse buttons are pressed."), EditorLog::MSG_TYPE_EDITOR);
} else {
- if (!editor_data.get_undo_redo()->redo()) {
+ if (!undo_redo->redo()) {
log->add_message(TTR("Nothing to redo."), EditorLog::MSG_TYPE_EDITOR);
} else {
- String action = editor_data.get_undo_redo()->get_current_action_name();
+ String action = undo_redo->get_current_action_name();
if (action.is_empty()) {
break;
}
- switch (editor_data.get_undo_redo()->get_current_action_history_id()) {
+ switch (undo_redo->get_current_action_history_id()) {
case EditorUndoRedoManager::GLOBAL_HISTORY:
log->add_message(vformat(TTR("Global Redo: %s"), action), EditorLog::MSG_TYPE_EDITOR);
break;
@@ -2807,7 +2875,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
ERR_PRINT("Failed to load scene");
}
editor_data.move_edited_scene_to_index(cur_idx);
- get_undo_redo()->clear_history(false, editor_data.get_current_edited_scene_history_id());
+ EditorUndoRedoManager::get_singleton()->clear_history(false, editor_data.get_current_edited_scene_history_id());
scene_tabs->set_current_tab(cur_idx);
} break;
@@ -2899,7 +2967,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
case RELOAD_CURRENT_PROJECT: {
if (!p_confirmed) {
bool save_each = EDITOR_GET("interface/editor/save_each_scene_on_quit");
- if (_next_unsaved_scene(!save_each) == -1 && !get_undo_redo()->is_history_unsaved(EditorUndoRedoManager::GLOBAL_HISTORY)) {
+ if (_next_unsaved_scene(!save_each) == -1 && !EditorUndoRedoManager::get_singleton()->is_history_unsaved(EditorUndoRedoManager::GLOBAL_HISTORY)) {
_discard_changes();
break;
} else {
@@ -3040,7 +3108,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
}
String EditorNode::adjust_scene_name_casing(const String &root_name) {
- switch (GLOBAL_GET("editor/scene/scene_naming").operator int()) {
+ switch (GLOBAL_GET("editor/naming/scene_name_casing").operator int()) {
case SCENE_NAME_CASING_AUTO:
// Use casing of the root node.
break;
@@ -3138,7 +3206,7 @@ int EditorNode::_next_unsaved_scene(bool p_valid_filename, int p_start) {
if (!editor_data.get_edited_scene_root(i)) {
continue;
}
- bool unsaved = get_undo_redo()->is_history_unsaved(editor_data.get_scene_history_id(i));
+ bool unsaved = EditorUndoRedoManager::get_singleton()->is_history_unsaved(editor_data.get_scene_history_id(i));
if (unsaved) {
String scene_filename = editor_data.get_edited_scene_root(i)->get_scene_file_path();
if (p_valid_filename && scene_filename.length() == 0) {
@@ -3245,16 +3313,8 @@ void EditorNode::_discard_changes(const String &p_str) {
}
void EditorNode::_update_file_menu_opened() {
- Ref<Shortcut> close_scene_sc = ED_GET_SHORTCUT("editor/close_scene");
- close_scene_sc->set_name(TTR("Close Scene"));
- Ref<Shortcut> reopen_closed_scene_sc = ED_GET_SHORTCUT("editor/reopen_closed_scene");
- reopen_closed_scene_sc->set_name(TTR("Reopen Closed Scene"));
-
file_menu->set_item_disabled(file_menu->get_item_index(FILE_OPEN_PREV), previous_scenes.is_empty());
-
- Ref<EditorUndoRedoManager> undo_redo = editor_data.get_undo_redo();
- file_menu->set_item_disabled(file_menu->get_item_index(EDIT_UNDO), !undo_redo->has_undo());
- file_menu->set_item_disabled(file_menu->get_item_index(EDIT_REDO), !undo_redo->has_redo());
+ _update_undo_redo_allowed();
}
void EditorNode::_update_file_menu_closed() {
@@ -3467,6 +3527,12 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
// Errors in the script cause the base_type to be an empty StringName.
if (scr->get_instance_base_type() == StringName()) {
+ if (_initializing_plugins) {
+ // However, if it happens during initialization, waiting for file scan might help.
+ pending_addons.push_back(p_addon);
+ return;
+ }
+
show_warning(vformat(TTR("Unable to load addon script from path: '%s'. This might be due to a code error in that script.\nDisabling the addon at '%s' to prevent further errors."), script_path, addon_path));
_remove_plugin_from_enabled(addon_path);
return;
@@ -3610,12 +3676,12 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
if (get_edited_scene()) {
if (current_tab < 2) {
- // Use heuristic instead.
- int n2d = 0, n3d = 0;
- _find_node_types(get_edited_scene(), n2d, n3d);
- if (n2d > n3d) {
+ Node *editor_node = SceneTreeDock::get_singleton()->get_tree_editor()->get_selected();
+ editor_node = editor_node == nullptr ? get_edited_scene() : editor_node;
+
+ if (Object::cast_to<Node2D>(editor_node) || Object::cast_to<Control>(editor_node)) {
editor_select(EDITOR_2D);
- } else if (n3d > n2d) {
+ } else if (Object::cast_to<Node3D>(editor_node)) {
editor_select(EDITOR_3D);
}
}
@@ -3655,7 +3721,7 @@ void EditorNode::set_current_scene(int p_idx) {
editor_folding.load_scene_folding(editor_data.get_edited_scene_root(p_idx), editor_data.get_scene_path(p_idx));
}
- get_undo_redo()->clear_history(false, editor_data.get_scene_history_id(p_idx));
+ EditorUndoRedoManager::get_singleton()->clear_history(false, editor_data.get_scene_history_id(p_idx));
}
changing_scene = true;
@@ -3696,11 +3762,12 @@ void EditorNode::set_current_scene(int p_idx) {
call_deferred(SNAME("_set_main_scene_state"), state, get_edited_scene()); // Do after everything else is done setting up.
}
-void EditorNode::setup_color_picker(ColorPicker *picker) {
+void EditorNode::setup_color_picker(ColorPicker *p_picker) {
+ p_picker->set_editor_settings(EditorSettings::get_singleton());
int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
int picker_shape = EDITOR_GET("interface/inspector/default_color_picker_shape");
- picker->set_color_mode((ColorPicker::ColorModeType)default_color_mode);
- picker->set_picker_shape((ColorPicker::PickerShapeType)picker_shape);
+ p_picker->set_color_mode((ColorPicker::ColorModeType)default_color_mode);
+ p_picker->set_picker_shape((ColorPicker::PickerShapeType)picker_shape);
}
bool EditorNode::is_scene_open(const String &p_path) {
@@ -3722,7 +3789,7 @@ int EditorNode::new_scene() {
// Remove placeholder empty scene.
if (editor_data.get_edited_scene_count() > 1) {
for (int i = 0; i < editor_data.get_edited_scene_count() - 1; i++) {
- bool unsaved = get_undo_redo()->is_history_unsaved(editor_data.get_scene_history_id(i));
+ bool unsaved = EditorUndoRedoManager::get_singleton()->is_history_unsaved(editor_data.get_scene_history_id(i));
if (!unsaved && editor_data.get_scene_path(i).is_empty() && editor_data.get_edited_scene_root(i) == nullptr) {
editor_data.remove_scene(i);
idx--;
@@ -3888,6 +3955,134 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
return OK;
}
+HashMap<StringName, Variant> EditorNode::get_modified_properties_for_node(Node *p_node) {
+ HashMap<StringName, Variant> modified_property_map;
+
+ List<PropertyInfo> pinfo;
+ p_node->get_property_list(&pinfo);
+ for (const PropertyInfo &E : pinfo) {
+ if (E.usage & PROPERTY_USAGE_STORAGE) {
+ bool is_valid_revert = false;
+ Variant revert_value = EditorPropertyRevert::get_property_revert_value(p_node, E.name, &is_valid_revert);
+ Variant current_value = p_node->get(E.name);
+ if (is_valid_revert) {
+ if (PropertyUtils::is_property_value_different(current_value, revert_value)) {
+ modified_property_map[E.name] = current_value;
+ }
+ }
+ }
+ }
+
+ return modified_property_map;
+}
+
+void EditorNode::update_diff_data_for_node(
+ Node *p_edited_scene,
+ Node *p_root,
+ Node *p_node,
+ HashMap<NodePath, ModificationNodeEntry> &p_modification_table,
+ List<AdditiveNodeEntry> &p_addition_list) {
+ bool node_part_of_subscene = p_node != p_edited_scene &&
+ p_edited_scene->get_scene_inherited_state().is_valid() &&
+ p_edited_scene->get_scene_inherited_state()->find_node_by_path(p_edited_scene->get_path_to(p_node)) >= 0;
+
+ // Loop through the owners until either we reach the root node or nullptr
+ Node *valid_node_owner = p_node->get_owner();
+ while (valid_node_owner) {
+ if (valid_node_owner == p_root) {
+ break;
+ }
+ valid_node_owner = valid_node_owner->get_owner();
+ }
+
+ if ((valid_node_owner == p_root && (p_root != p_edited_scene || !p_edited_scene->get_scene_file_path().is_empty())) || node_part_of_subscene || p_node == p_root) {
+ HashMap<StringName, Variant> modified_properties = get_modified_properties_for_node(p_node);
+
+ // Find all valid connections to other nodes.
+ List<Connection> connections_to;
+ p_node->get_all_signal_connections(&connections_to);
+
+ List<ConnectionWithNodePath> valid_connections_to;
+ for (const Connection &c : connections_to) {
+ Node *connection_target_node = Object::cast_to<Node>(c.callable.get_object());
+ if (connection_target_node) {
+ // TODO: add support for reinstating custom callables
+ if (!c.callable.is_custom()) {
+ ConnectionWithNodePath connection_to;
+ connection_to.connection = c;
+ connection_to.node_path = p_node->get_path_to(connection_target_node);
+ valid_connections_to.push_back(connection_to);
+ }
+ }
+ }
+
+ // Find all valid connections from other nodes.
+ List<Connection> connections_from;
+ p_node->get_signals_connected_to_this(&connections_from);
+
+ List<Connection> valid_connections_from;
+ for (const Connection &c : connections_from) {
+ Node *source_node = Object::cast_to<Node>(c.signal.get_object());
+
+ Node *valid_source_owner = nullptr;
+ if (source_node) {
+ valid_source_owner = source_node->get_owner();
+ while (valid_source_owner) {
+ if (valid_source_owner == p_root) {
+ break;
+ }
+ valid_source_owner = valid_source_owner->get_owner();
+ }
+ }
+
+ if (!source_node || valid_source_owner == nullptr) {
+ // TODO: add support for reinstating custom callables
+ if (!c.callable.is_custom()) {
+ valid_connections_from.push_back(c);
+ }
+ }
+ }
+
+ // Find all node groups.
+ List<Node::GroupInfo> groups;
+ p_node->get_groups(&groups);
+
+ if (!modified_properties.is_empty() || !valid_connections_to.is_empty() || !valid_connections_from.is_empty() || !groups.is_empty()) {
+ ModificationNodeEntry modification_node_entry;
+ modification_node_entry.property_table = modified_properties;
+ modification_node_entry.connections_to = valid_connections_to;
+ modification_node_entry.connections_from = valid_connections_from;
+ modification_node_entry.groups = groups;
+
+ p_modification_table[p_root->get_path_to(p_node)] = modification_node_entry;
+ }
+ } else {
+ AdditiveNodeEntry new_additive_node_entry;
+ new_additive_node_entry.node = p_node;
+ new_additive_node_entry.parent = p_root->get_path_to(p_node->get_parent());
+ new_additive_node_entry.owner = p_node->get_owner();
+ new_additive_node_entry.index = p_node->get_index();
+
+ Node2D *node_2d = Object::cast_to<Node2D>(p_node);
+ if (node_2d) {
+ new_additive_node_entry.transform_2d = node_2d->get_relative_transform_to_parent(node_2d->get_parent());
+ }
+ Node3D *node_3d = Object::cast_to<Node3D>(p_node);
+ if (node_3d) {
+ new_additive_node_entry.transform_3d = node_3d->get_relative_transform(node_3d->get_parent());
+ }
+ p_addition_list.push_back(new_additive_node_entry);
+
+ return;
+ }
+
+ for (int i = 0; i < p_node->get_child_count(); i++) {
+ Node *child = p_node->get_child(i);
+ update_diff_data_for_node(p_edited_scene, p_root, child, p_modification_table, p_addition_list);
+ }
+}
+//
+
void EditorNode::open_request(const String &p_path) {
if (!opening_prev) {
List<String>::Element *prev_scene_item = previous_scenes.find(p_path);
@@ -3947,10 +4142,6 @@ void EditorNode::request_instantiate_scenes(const Vector<String> &p_files) {
SceneTreeDock::get_singleton()->instantiate_scenes(p_files);
}
-Ref<EditorUndoRedoManager> &EditorNode::get_undo_redo() {
- return singleton->editor_data.get_undo_redo();
-}
-
void EditorNode::_inherit_request(String p_file) {
current_menu_option = FILE_NEW_INHERITED_SCENE;
_dialog_action(p_file);
@@ -4309,7 +4500,7 @@ bool EditorNode::is_object_of_custom_type(const Object *p_object, const StringNa
void EditorNode::progress_add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel) {
if (singleton->cmdline_export_mode) {
print_line(p_task + ": begin: " + p_label + " steps: " + itos(p_steps));
- } else {
+ } else if (singleton->progress_dialog) {
singleton->progress_dialog->add_task(p_task, p_label, p_steps, p_can_cancel);
}
}
@@ -4318,15 +4509,17 @@ bool EditorNode::progress_task_step(const String &p_task, const String &p_state,
if (singleton->cmdline_export_mode) {
print_line("\t" + p_task + ": step " + itos(p_step) + ": " + p_state);
return false;
- } else {
+ } else if (singleton->progress_dialog) {
return singleton->progress_dialog->task_step(p_task, p_state, p_step, p_force_refresh);
+ } else {
+ return false;
}
}
void EditorNode::progress_end_task(const String &p_task) {
if (singleton->cmdline_export_mode) {
print_line(p_task + ": end");
- } else {
+ } else if (singleton->progress_dialog) {
singleton->progress_dialog->end_task(p_task);
}
}
@@ -4374,6 +4567,13 @@ void EditorNode::_build_icon_type_cache() {
}
}
+void EditorNode::_enable_pending_addons() {
+ for (uint32_t i = 0; i < pending_addons.size(); i++) {
+ set_addon_plugin_enabled(pending_addons[i], true);
+ }
+ pending_addons.clear();
+}
+
void EditorNode::_file_dialog_register(FileDialog *p_dialog) {
singleton->file_dialogs.insert(p_dialog);
}
@@ -5061,8 +5261,8 @@ bool EditorNode::ensure_main_scene(bool p_from_native) {
return true;
}
-Error EditorNode::run_play_native(int p_idx, int p_platform) {
- return run_native->run_native(p_idx, p_platform);
+Error EditorNode::run_play_native(int p_id) {
+ return run_native->run_native(p_id);
}
void EditorNode::run_play() {
@@ -5218,7 +5418,7 @@ void EditorNode::_scene_tab_closed(int p_tab, int option) {
return;
}
- bool unsaved = get_undo_redo()->is_history_unsaved(editor_data.get_scene_history_id(p_tab));
+ bool unsaved = EditorUndoRedoManager::get_singleton()->is_history_unsaved(editor_data.get_scene_history_id(p_tab));
if (unsaved) {
save_confirmation->set_ok_button_text(TTR("Save & Close"));
save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), !scene->get_scene_file_path().is_empty() ? scene->get_scene_file_path() : "unsaved scene"));
@@ -5260,7 +5460,7 @@ void EditorNode::_scene_tab_input(const Ref<InputEvent> &p_input) {
_scene_tab_closed(scene_tabs->get_hovered_tab());
}
} else {
- if ((mb->get_button_index() == MouseButton::LEFT && mb->is_double_click()) || (mb->get_button_index() == MouseButton::MIDDLE && mb->is_pressed())) {
+ if (mb->get_button_index() == MouseButton::LEFT && mb->is_double_click()) {
_menu_option_confirm(FILE_NEW_SCENE, true);
}
}
@@ -5281,12 +5481,10 @@ void EditorNode::_scene_tab_input(const Ref<InputEvent> &p_input) {
scene_tabs_context_menu->add_item(TTR("Play This Scene"), RUN_PLAY_SCENE);
scene_tabs_context_menu->add_separator();
- Ref<Shortcut> close_tab_sc = ED_GET_SHORTCUT("editor/close_scene");
- close_tab_sc->set_name(TTR("Close Tab"));
- scene_tabs_context_menu->add_shortcut(close_tab_sc, FILE_CLOSE);
- Ref<Shortcut> undo_close_tab_sc = ED_GET_SHORTCUT("editor/reopen_closed_scene");
- undo_close_tab_sc->set_name(TTR("Undo Close Tab"));
- scene_tabs_context_menu->add_shortcut(undo_close_tab_sc, FILE_OPEN_PREV);
+ scene_tabs_context_menu->add_shortcut(ED_GET_SHORTCUT("editor/close_scene"), FILE_CLOSE);
+ scene_tabs_context_menu->set_item_text(scene_tabs_context_menu->get_item_index(FILE_CLOSE), TTR("Close Tab"));
+ scene_tabs_context_menu->add_shortcut(ED_GET_SHORTCUT("editor/reopen_closed_scene"), FILE_OPEN_PREV);
+ scene_tabs_context_menu->set_item_text(scene_tabs_context_menu->get_item_index(FILE_OPEN_PREV), TTR("Undo Close Tab"));
if (previous_scenes.is_empty()) {
scene_tabs_context_menu->set_item_disabled(scene_tabs_context_menu->get_item_index(FILE_OPEN_PREV), true);
}
@@ -5411,12 +5609,16 @@ void EditorNode::remove_bottom_panel_item(Control *p_item) {
}
void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
+ if (bottom_panel_updating) {
+ return;
+ }
ERR_FAIL_INDEX(p_idx, bottom_panel_items.size());
if (bottom_panel_items[p_idx].control->is_visible() == p_enable) {
return;
}
+ bottom_panel_updating = true;
if (p_enable) {
for (int i = 0; i < bottom_panel_items.size(); i++) {
bottom_panel_items[i].button->set_pressed(i == p_idx);
@@ -5719,7 +5921,7 @@ void EditorNode::reload_scene(const String &p_path) {
if (scene_idx == -1) {
if (get_edited_scene()) {
// Scene is not open, so at it might be instantiated. We'll refresh the whole scene later.
- editor_data.get_undo_redo()->clear_history(false, editor_data.get_current_edited_scene_history_id());
+ EditorUndoRedoManager::get_singleton()->clear_history(false, editor_data.get_current_edited_scene_history_id());
}
return;
}
@@ -5735,12 +5937,359 @@ void EditorNode::reload_scene(const String &p_path) {
// Adjust index so tab is back a the previous position.
editor_data.move_edited_scene_to_index(scene_idx);
- get_undo_redo()->clear_history(false, editor_data.get_scene_history_id(scene_idx));
+ EditorUndoRedoManager::get_singleton()->clear_history(false, editor_data.get_scene_history_id(scene_idx));
// Recover the tab.
scene_tabs->set_current_tab(current_tab);
}
+void EditorNode::find_all_instances_inheriting_path_in_node(Node *p_root, Node *p_node, const String &p_instance_path, List<Node *> &p_instance_list) {
+ String scene_file_path = p_node->get_scene_file_path();
+
+ // This is going to get messy...
+ if (p_node->get_scene_file_path() == p_instance_path) {
+ p_instance_list.push_back(p_node);
+ } else {
+ Node *current_node = p_node;
+
+ Ref<SceneState> inherited_state = current_node->get_scene_inherited_state();
+ while (inherited_state.is_valid()) {
+ String inherited_path = inherited_state->get_path();
+ if (inherited_path == p_instance_path) {
+ p_instance_list.push_back(p_node);
+ break;
+ }
+
+ inherited_state = inherited_state->get_base_scene_state();
+ }
+ }
+
+ for (int i = 0; i < p_node->get_child_count(); i++) {
+ Node *child = p_node->get_child(i);
+ find_all_instances_inheriting_path_in_node(p_root, child, p_instance_path, p_instance_list);
+ }
+}
+
+void EditorNode::reload_instances_with_path_in_edited_scenes(const String &p_instance_path) {
+ int original_edited_scene_idx = editor_data.get_edited_scene();
+ HashMap<int, List<Node *>> edited_scene_map;
+
+ // Walk through each opened scene to get a global list of all instances which match
+ // the current reimported scenes.
+ for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
+ if (editor_data.get_scene_path(i) != p_instance_path) {
+ Node *edited_scene_root = editor_data.get_edited_scene_root(i);
+
+ if (edited_scene_root) {
+ List<Node *> valid_nodes;
+ find_all_instances_inheriting_path_in_node(edited_scene_root, edited_scene_root, p_instance_path, valid_nodes);
+ if (valid_nodes.size() > 0) {
+ edited_scene_map[i] = valid_nodes;
+ }
+ }
+ }
+ }
+
+ if (edited_scene_map.size() > 0) {
+ // Reload the new instance.
+ Error err;
+ Ref<PackedScene> instance_scene_packed_scene = ResourceLoader::load(p_instance_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE, &err);
+ instance_scene_packed_scene->set_path(p_instance_path, true);
+
+ ERR_FAIL_COND(err != OK);
+ ERR_FAIL_COND(instance_scene_packed_scene.is_null());
+
+ HashMap<String, Ref<PackedScene>> local_scene_cache;
+ local_scene_cache[p_instance_path] = instance_scene_packed_scene;
+
+ for (const KeyValue<int, List<Node *>> &edited_scene_map_elem : edited_scene_map) {
+ // Set the current scene.
+ int current_scene_idx = edited_scene_map_elem.key;
+ editor_data.set_edited_scene(current_scene_idx);
+ Node *current_edited_scene = editor_data.get_edited_scene_root(current_scene_idx);
+
+ // Clear the history for this tab (should we allow history to be retained?).
+ EditorUndoRedoManager::get_singleton()->clear_history();
+
+ // Update the version
+ editor_data.is_scene_changed(current_scene_idx);
+
+ for (Node *original_node : edited_scene_map_elem.value) {
+ // Walk the tree for the current node and extract relevant diff data, storing it in the modification table.
+ // For additional nodes which are part of the current scene, they get added to the addition table.
+ HashMap<NodePath, ModificationNodeEntry> modification_table;
+ List<AdditiveNodeEntry> addition_list;
+ update_diff_data_for_node(current_edited_scene, original_node, original_node, modification_table, addition_list);
+
+ // Disconnect all relevant connections, all connections from and persistent connections to.
+ for (const KeyValue<NodePath, ModificationNodeEntry> &modification_table_entry : modification_table) {
+ for (Connection conn : modification_table_entry.value.connections_from) {
+ conn.signal.get_object()->disconnect(conn.signal.get_name(), conn.callable);
+ }
+ for (ConnectionWithNodePath cwnp : modification_table_entry.value.connections_to) {
+ Connection conn = cwnp.connection;
+ if (conn.flags & CONNECT_PERSIST) {
+ conn.signal.get_object()->disconnect(conn.signal.get_name(), conn.callable);
+ }
+ }
+ }
+
+ // Store all the paths for any selected nodes which are ancestors of the node we're replacing.
+ List<NodePath> selected_node_paths;
+ for (Node *selected_node : editor_selection->get_selected_node_list()) {
+ if (selected_node == original_node || original_node->is_ancestor_of(selected_node)) {
+ selected_node_paths.push_back(original_node->get_path_to(selected_node));
+ editor_selection->remove_node(selected_node);
+ }
+ }
+
+ // Remove all nodes which were added as additional elements (they will be restored later).
+ for (AdditiveNodeEntry additive_node_entry : addition_list) {
+ Node *addition_node = additive_node_entry.node;
+ addition_node->get_parent()->remove_child(addition_node);
+ }
+
+ // Clear ownership of the nodes (kind of hack to workaround an issue with
+ // replace_by when called on nodes in other tabs).
+ List<Node *> nodes_owned_by_original_node;
+ original_node->get_owned_by(original_node, &nodes_owned_by_original_node);
+ for (Node *owned_node : nodes_owned_by_original_node) {
+ owned_node->set_owner(nullptr);
+ }
+
+ // Delete all the remaining node children.
+ while (original_node->get_child_count()) {
+ Node *child = original_node->get_child(0);
+
+ original_node->remove_child(child);
+ child->queue_free();
+ }
+
+ // Reset the editable instance state.
+ bool is_editable = true;
+ Node *owner = original_node->get_owner();
+ if (owner) {
+ is_editable = owner->is_editable_instance(original_node);
+ }
+
+ // Load a replacement scene for the node.
+ Ref<PackedScene> current_packed_scene;
+ if (original_node->get_scene_file_path() == p_instance_path) {
+ // If the node file name directly matches the scene we're replacing,
+ // just load it since we already cached it.
+ current_packed_scene = instance_scene_packed_scene;
+ } else {
+ // Otherwise, check the inheritance chain, reloading and caching any scenes
+ // we require along the way.
+ List<String> required_load_paths;
+ String scene_path = original_node->get_scene_file_path();
+ // Do we need to check if the paths are empty?
+ if (!scene_path.is_empty()) {
+ required_load_paths.push_front(scene_path);
+ }
+ Ref<SceneState> inherited_state = original_node->get_scene_inherited_state();
+ while (inherited_state.is_valid()) {
+ String inherited_path = inherited_state->get_path();
+ // Do we need to check if the paths are empty?
+ if (!inherited_path.is_empty()) {
+ required_load_paths.push_front(inherited_path);
+ }
+ inherited_state = inherited_state->get_base_scene_state();
+ }
+
+ // Ensure the inheritance chain is loaded in the correct order so that cache can
+ // be properly updated.
+ for (String path : required_load_paths) {
+ if (!local_scene_cache.find(path)) {
+ current_packed_scene = ResourceLoader::load(path, "", ResourceFormatLoader::CACHE_MODE_IGNORE, &err);
+ current_packed_scene->set_path(path, true);
+ local_scene_cache[path] = current_packed_scene;
+ } else {
+ current_packed_scene = local_scene_cache[path];
+ }
+ }
+ }
+
+ ERR_FAIL_COND(current_packed_scene.is_null());
+
+ // Instantiate the node.
+ Node *instantiated_node = nullptr;
+ if (current_packed_scene.is_valid()) {
+ instantiated_node = current_packed_scene->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE);
+ }
+
+ ERR_FAIL_COND(!instantiated_node);
+
+ bool original_node_is_displayed_folded = original_node->is_displayed_folded();
+ bool original_node_scene_instance_load_placeholder = original_node->get_scene_instance_load_placeholder();
+
+ // Update the name to match
+ instantiated_node->set_name(original_node->get_name());
+
+ // Is this replacing the edited root node?
+ String original_node_file_path = original_node->get_scene_file_path();
+
+ if (current_edited_scene == original_node) {
+ instantiated_node->set_scene_instance_state(original_node->get_scene_instance_state());
+ // Fix unsaved inherited scene
+ if (original_node_file_path.is_empty()) {
+ Ref<SceneState> state = current_packed_scene->get_state();
+ state->set_path(current_packed_scene->get_path());
+ instantiated_node->set_scene_inherited_state(state);
+ instantiated_node->set_scene_file_path(String());
+ }
+ editor_data.set_edited_scene_root(instantiated_node);
+ current_edited_scene = instantiated_node;
+
+ if (original_node->is_inside_tree()) {
+ SceneTreeDock::get_singleton()->set_edited_scene(current_edited_scene);
+ original_node->get_tree()->set_edited_scene_root(instantiated_node);
+ }
+ }
+
+ // Replace the original node with the instantiated version.
+ original_node->replace_by(instantiated_node, false);
+
+ // Mark the old node for deletion.
+ original_node->queue_free();
+
+ // Restore the folded and placeholder state from the original node.
+ instantiated_node->set_display_folded(original_node_is_displayed_folded);
+ instantiated_node->set_scene_instance_load_placeholder(original_node_scene_instance_load_placeholder);
+
+ if (owner) {
+ Ref<SceneState> ss_inst = owner->get_scene_instance_state();
+ if (ss_inst.is_valid()) {
+ ss_inst->update_instance_resource(p_instance_path, current_packed_scene);
+ }
+
+ owner->set_editable_instance(instantiated_node, is_editable);
+ }
+
+ // Attempt to re-add all the additional nodes.
+ for (AdditiveNodeEntry additive_node_entry : addition_list) {
+ Node *parent_node = instantiated_node->get_node_or_null(additive_node_entry.parent);
+
+ if (!parent_node) {
+ parent_node = current_edited_scene;
+ }
+
+ parent_node->add_child(additive_node_entry.node);
+ parent_node->move_child(additive_node_entry.node, additive_node_entry.index);
+ // If the additive node's owner was the node which got replaced, update it.
+ if (additive_node_entry.owner == original_node) {
+ additive_node_entry.owner = instantiated_node;
+ }
+
+ additive_node_entry.node->set_owner(additive_node_entry.owner);
+
+ // If the parent node was lost, attempt to restore the original global transform.
+ {
+ Node2D *node_2d = Object::cast_to<Node2D>(additive_node_entry.node);
+ if (node_2d) {
+ node_2d->set_transform(additive_node_entry.transform_2d);
+ }
+
+ Node3D *node_3d = Object::cast_to<Node3D>(additive_node_entry.node);
+ if (node_3d) {
+ node_3d->set_transform(additive_node_entry.transform_3d);
+ }
+ }
+ }
+
+ // Restore the selection.
+ if (selected_node_paths.size()) {
+ for (NodePath selected_node_path : selected_node_paths) {
+ Node *selected_node = instantiated_node->get_node_or_null(selected_node_path);
+ if (selected_node) {
+ editor_selection->add_node(selected_node);
+ }
+ }
+ editor_selection->update();
+ }
+
+ // Attempt to restore the modified properties and signals for the instantitated node and all its owned children.
+ for (KeyValue<NodePath, ModificationNodeEntry> &E : modification_table) {
+ NodePath new_current_path = E.key;
+ Node *modifiable_node = instantiated_node->get_node_or_null(new_current_path);
+
+ if (modifiable_node) {
+ // Get properties for this node.
+ List<PropertyInfo> pinfo;
+ modifiable_node->get_property_list(&pinfo);
+
+ // Get names of all valid property names (TODO: make this more efficient).
+ List<String> property_names;
+ for (const PropertyInfo &E2 : pinfo) {
+ if (E2.usage & PROPERTY_USAGE_STORAGE) {
+ property_names.push_back(E2.name);
+ }
+ }
+
+ // Restore the modified properties for this node.
+ for (const KeyValue<StringName, Variant> &E2 : E.value.property_table) {
+ if (property_names.find(E2.key)) {
+ modifiable_node->set(E2.key, E2.value);
+ }
+ }
+ // Restore the connections to other nodes.
+ for (const ConnectionWithNodePath &E2 : E.value.connections_to) {
+ Connection conn = E2.connection;
+
+ // Get the node the callable is targeting.
+ Node *target_node = cast_to<Node>(conn.callable.get_object());
+
+ // If the callable object no longer exists or is marked for deletion,
+ // attempt to reaccquire the closest match by using the node path
+ // we saved earlier.
+ if (!target_node || !target_node->is_queued_for_deletion()) {
+ target_node = modifiable_node->get_node_or_null(E2.node_path);
+ }
+
+ if (target_node) {
+ // Reconstruct the callable.
+ Callable new_callable = Callable(target_node, conn.callable.get_method());
+
+ if (!modifiable_node->is_connected(conn.signal.get_name(), new_callable)) {
+ ERR_FAIL_COND(modifiable_node->connect(conn.signal.get_name(), new_callable, conn.flags) != OK);
+ }
+ }
+ }
+
+ // Restore the connections from other nodes.
+ for (const Connection &E2 : E.value.connections_from) {
+ Connection conn = E2;
+
+ bool valid = modifiable_node->has_method(conn.callable.get_method()) || Ref<Script>(modifiable_node->get_script()).is_null() || Ref<Script>(modifiable_node->get_script())->has_method(conn.callable.get_method());
+ ERR_CONTINUE_MSG(!valid, vformat("Attempt to connect signal '%s.%s' to nonexistent method '%s.%s'.", conn.signal.get_object()->get_class(), conn.signal.get_name(), conn.callable.get_object()->get_class(), conn.callable.get_method()));
+
+ // Get the object which the signal is connected from.
+ Object *source_object = conn.signal.get_object();
+
+ if (source_object) {
+ ERR_FAIL_COND(source_object->connect(conn.signal.get_name(), Callable(modifiable_node, conn.callable.get_method()), conn.flags) != OK);
+ }
+ }
+
+ // Re-add the groups.
+ for (const Node::GroupInfo &E2 : E.value.groups) {
+ modifiable_node->add_to_group(E2.name, E2.persistent);
+ }
+ }
+ }
+ }
+ // Cleanup the history of the changes.
+ editor_history.cleanup_history();
+
+ current_edited_scene->propagate_notification(NOTIFICATION_NODE_RECACHE_REQUESTED);
+ }
+ edited_scene_map.clear();
+ }
+ editor_data.set_edited_scene(original_edited_scene_idx);
+
+ _edit_current();
+}
+
int EditorNode::plugin_init_callback_count = 0;
void EditorNode::add_plugin_init_callback(EditorPluginInitializeCallback p_callback) {
@@ -5904,7 +6453,7 @@ void EditorNode::_feature_profile_changed() {
}
void EditorNode::_bind_methods() {
- GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/scene/scene_naming", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"), SCENE_NAME_CASING_SNAKE_CASE);
+ GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/naming/scene_name_casing", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"), SCENE_NAME_CASING_SNAKE_CASE);
ClassDB::bind_method("edit_current", &EditorNode::edit_current);
ClassDB::bind_method("edit_node", &EditorNode::edit_node);
@@ -5925,7 +6474,6 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_gui_base"), &EditorNode::get_gui_base);
ADD_SIGNAL(MethodInfo("play_pressed"));
- ADD_SIGNAL(MethodInfo("pause_pressed"));
ADD_SIGNAL(MethodInfo("stop_pressed"));
ADD_SIGNAL(MethodInfo("request_help_search"));
ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "args")));
@@ -6053,6 +6601,9 @@ EditorNode::EditorNode() {
singleton = this;
+ EditorUndoRedoManager::get_singleton()->connect("version_changed", callable_mp(this, &EditorNode::_update_undo_redo_allowed));
+ EditorUndoRedoManager::get_singleton()->connect("history_changed", callable_mp(this, &EditorNode::_update_undo_redo_allowed));
+
TranslationServer::get_singleton()->set_enabled(false);
// Load settings.
if (!EditorSettings::get_singleton()) {
@@ -6094,7 +6645,10 @@ EditorNode::EditorNode() {
}
// Define a minimum window size to prevent UI elements from overlapping or being cut off.
- DisplayServer::get_singleton()->window_set_min_size(Size2(1024, 600) * EDSCALE);
+ Window *w = Object::cast_to<Window>(SceneTree::get_singleton()->get_root());
+ if (w) {
+ w->set_min_size(Size2(1024, 600) * EDSCALE);
+ }
FileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files"));
EditorFileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files"));
@@ -6233,6 +6787,7 @@ EditorNode::EditorNode() {
// Exporters might need the theme.
EditorColorMap::create();
theme = create_custom_theme();
+ DisplayServer::set_early_window_clear_color_override(true, theme->get_color(SNAME("background"), SNAME("Editor")));
register_exporters();
@@ -6287,7 +6842,6 @@ EditorNode::EditorNode() {
resource_preview = memnew(EditorResourcePreview);
add_child(resource_preview);
progress_dialog = memnew(ProgressDialog);
- gui_base->add_child(progress_dialog);
// Take up all screen.
gui_base->set_anchor(SIDE_RIGHT, Control::ANCHOR_END);
@@ -6730,6 +7284,7 @@ EditorNode::EditorNode() {
project_title->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
project_title->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
project_title->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ project_title->set_mouse_filter(Control::MOUSE_FILTER_PASS);
left_spacer->add_child(project_title);
}
@@ -6891,7 +7446,7 @@ EditorNode::EditorNode() {
_reset_play_buttons();
- ED_SHORTCUT_AND_COMMAND("editor/run_specific_scene", TTR("Run Specific Scene"), KeyModifierMask::META | KeyModifierMask::SHIFT | Key::F5);
+ ED_SHORTCUT_AND_COMMAND("editor/run_specific_scene", TTR("Run Specific Scene"), KeyModifierMask::CTRL | KeyModifierMask::SHIFT | Key::F5);
ED_SHORTCUT_OVERRIDE("editor/run_specific_scene", "macos", KeyModifierMask::META | KeyModifierMask::SHIFT | Key::R);
play_custom_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/run_specific_scene"));
@@ -7043,8 +7598,8 @@ EditorNode::EditorNode() {
right_r_vsplit->hide();
// Add some offsets to left_r and main hsplits to make LEFT_R and RIGHT_L docks wider than minsize.
- left_r_hsplit->set_split_offset(70 * EDSCALE);
- main_hsplit->set_split_offset(-70 * EDSCALE);
+ left_r_hsplit->set_split_offset(270 * EDSCALE);
+ main_hsplit->set_split_offset(-270 * EDSCALE);
// Define corresponding default layout.
@@ -7059,8 +7614,8 @@ EditorNode::EditorNode() {
default_layout->set_value(docks_section, "dock_split_" + itos(i + 1), 0);
}
default_layout->set_value(docks_section, "dock_hsplit_1", 0);
- default_layout->set_value(docks_section, "dock_hsplit_2", 70 * EDSCALE);
- default_layout->set_value(docks_section, "dock_hsplit_3", -70 * EDSCALE);
+ default_layout->set_value(docks_section, "dock_hsplit_2", 270 * EDSCALE);
+ default_layout->set_value(docks_section, "dock_hsplit_3", -270 * EDSCALE);
default_layout->set_value(docks_section, "dock_hsplit_4", 0);
_update_layouts_menu();
@@ -7348,6 +7903,11 @@ EditorNode::EditorNode() {
EditorExport::get_singleton()->add_export_plugin(gdextension_export_plugin);
+ Ref<DedicatedServerExportPlugin> dedicated_server_export_plugin;
+ dedicated_server_export_plugin.instantiate();
+
+ EditorExport::get_singleton()->add_export_plugin(dedicated_server_export_plugin);
+
Ref<PackedSceneEditorTranslationParserPlugin> packed_scene_translation_parser_plugin;
packed_scene_translation_parser_plugin.instantiate();
EditorTranslationParser::get_singleton()->add_parser(packed_scene_translation_parser_plugin, EditorTranslationParser::STANDARD);
@@ -7375,7 +7935,6 @@ EditorNode::EditorNode() {
_update_recent_scenes();
- editor_data.restore_editor_global_states();
set_process_shortcut_input(true);
load_errors = memnew(RichTextLabel);
diff --git a/editor/editor_node.h b/editor/editor_node.h
index f3dad8e223..914dab0254 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -68,6 +68,7 @@ class EditorLayoutsDialog;
class EditorLog;
class EditorPluginList;
class EditorQuickOpen;
+class EditorPropertyResource;
class EditorResourcePreview;
class EditorResourceConversionPlugin;
class EditorRun;
@@ -86,6 +87,7 @@ class ImportDock;
class LinkButton;
class MenuBar;
class MenuButton;
+class Node2D;
class NodeDock;
class OptionButton;
class OrphanResourcesDialog;
@@ -292,6 +294,9 @@ private:
Vector<EditorPlugin *> editor_plugins;
bool _initializing_plugins = false;
HashMap<String, EditorPlugin *> addon_name_to_plugin;
+ LocalVector<String> pending_addons;
+ HashMap<ObjectID, HashSet<EditorPlugin *>> active_plugins;
+ bool is_main_screen_editing = false;
PanelContainer *scene_root_parent = nullptr;
Control *theme_base = nullptr;
@@ -455,6 +460,7 @@ private:
EditorToaster *editor_toaster = nullptr;
LinkButton *version_btn = nullptr;
Button *bottom_panel_raise = nullptr;
+ bool bottom_panel_updating = false;
Tree *disk_changed_list = nullptr;
ConfirmationDialog *disk_changed = nullptr;
@@ -535,6 +541,7 @@ private:
static void _resource_loaded(Ref<Resource> p_resource, const String &p_path);
void _build_icon_type_cache();
+ void _enable_pending_addons();
void _dialog_action(String p_file);
@@ -577,6 +584,8 @@ private:
void _titlebar_resized();
void _version_button_pressed();
+ void _update_undo_redo_allowed();
+
int _save_external_resources();
bool _validate_scene_recursive(const String &p_filename, Node *p_node);
@@ -588,10 +597,6 @@ private:
void _inherit_request(String p_file);
void _instantiate_request(const Vector<String> &p_files);
- void _display_top_editors(bool p_display);
- void _set_top_editors(Vector<EditorPlugin *> p_editor_plugins_over);
- void _set_editing_top_editors(Object *p_current_object);
-
void _quick_opened();
void _quick_run();
void _open_command_palette();
@@ -727,7 +732,6 @@ public:
static EditorLog *get_log() { return singleton->log; }
static EditorData &get_editor_data() { return singleton->editor_data; }
static EditorFolding &get_editor_folding() { return singleton->editor_folding; }
- static Ref<EditorUndoRedoManager> &get_undo_redo();
static HBoxContainer *get_menu_hb() { return singleton->menu_hb; }
static VSplitContainer *get_top_split() { return singleton->top_split; }
@@ -793,9 +797,9 @@ public:
void show_about() { _menu_option_confirm(HELP_ABOUT, false); }
void push_item(Object *p_object, const String &p_property = "", bool p_inspector_only = false);
- void edit_item(Object *p_object);
- void edit_item_resource(Ref<Resource> p_resource);
- void hide_top_editors();
+ void edit_item(Object *p_object, Object *p_editing_owner);
+ void push_node_item(Node *p_node);
+ void hide_unused_editors(const Object *p_editing_owner = nullptr);
void select_editor_by_name(const String &p_name);
@@ -817,11 +821,42 @@ public:
Error load_scene(const String &p_scene, bool p_ignore_broken_deps = false, bool p_set_inherited = false, bool p_clear_errors = true, bool p_force_open_imported = false, bool p_silent_change_tab = false);
Error load_resource(const String &p_resource, bool p_ignore_broken_deps = false);
+ HashMap<StringName, Variant> get_modified_properties_for_node(Node *p_node);
+
+ struct AdditiveNodeEntry {
+ Node *node = nullptr;
+ NodePath parent = NodePath();
+ Node *owner = nullptr;
+ int index = 0;
+ // Used if the original parent node is lost
+ Transform2D transform_2d;
+ Transform3D transform_3d;
+ };
+
+ struct ConnectionWithNodePath {
+ Connection connection;
+ NodePath node_path;
+ };
+
+ struct ModificationNodeEntry {
+ HashMap<StringName, Variant> property_table;
+ List<ConnectionWithNodePath> connections_to;
+ List<Connection> connections_from;
+ List<Node::GroupInfo> groups;
+ };
+
+ void update_diff_data_for_node(
+ Node *p_edited_scene,
+ Node *p_root,
+ Node *p_node,
+ HashMap<NodePath, ModificationNodeEntry> &p_modification_table,
+ List<AdditiveNodeEntry> &p_addition_list);
+
bool is_scene_open(const String &p_path);
void set_current_scene(int p_idx);
- void setup_color_picker(ColorPicker *picker);
+ void setup_color_picker(ColorPicker *p_picker);
void request_instantiate_scene(const String &p_path);
void request_instantiate_scenes(const Vector<String> &p_files);
@@ -869,6 +904,9 @@ public:
void reload_scene(const String &p_path);
+ void find_all_instances_inheriting_path_in_node(Node *p_root, Node *p_node, const String &p_instance_path, List<Node *> &p_instance_list);
+ void reload_instances_with_path_in_edited_scenes(const String &p_path);
+
bool is_exiting() const { return exiting; }
Button *get_pause_button() { return pause_button; }
@@ -912,7 +950,7 @@ public:
bool ensure_main_scene(bool p_from_native);
- Error run_play_native(int p_idx, int p_platform);
+ Error run_play_native(int p_id);
void run_play();
void run_play_current();
void run_play_custom(const String &p_custom);
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index a5d1ddb2fa..14cdbc364e 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -45,6 +45,7 @@
#include "editor/inspector_dock.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/editor_debugger_plugin.h"
+#include "editor/plugins/editor_resource_conversion_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/project_settings_editor.h"
@@ -661,7 +662,7 @@ void EditorPlugin::make_visible(bool p_visible) {
}
void EditorPlugin::edit(Object *p_object) {
- if (p_object->is_class("Resource")) {
+ if (Object::cast_to<Resource>(p_object)) {
GDVIRTUAL_CALL(_edit, Ref<Resource>(Object::cast_to<Resource>(p_object)));
} else {
GDVIRTUAL_CALL(_edit, p_object);
@@ -711,9 +712,6 @@ bool EditorPlugin::get_remove_list(List<Node *> *p_list) {
return false;
}
-void EditorPlugin::restore_global_state() {}
-void EditorPlugin::save_global_state() {}
-
void EditorPlugin::add_undo_redo_inspector_hook_callback(Callable p_callable) {
EditorNode::get_singleton()->get_editor_data().add_undo_redo_inspector_hook_callback(p_callable);
}
@@ -856,6 +854,14 @@ void EditorPlugin::remove_debugger_plugin(const Ref<EditorDebuggerPlugin> &p_plu
EditorDebuggerNode::get_singleton()->remove_debugger_plugin(p_plugin);
}
+void EditorPlugin::add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin) {
+ EditorNode::get_singleton()->add_resource_conversion_plugin(p_plugin);
+}
+
+void EditorPlugin::remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin) {
+ EditorNode::get_singleton()->remove_resource_conversion_plugin(p_plugin);
+}
+
void EditorPlugin::_editor_project_settings_changed() {
emit_signal(SNAME("project_settings_changed"));
}
@@ -911,6 +917,8 @@ void EditorPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("remove_node_3d_gizmo_plugin", "plugin"), &EditorPlugin::remove_node_3d_gizmo_plugin);
ClassDB::bind_method(D_METHOD("add_inspector_plugin", "plugin"), &EditorPlugin::add_inspector_plugin);
ClassDB::bind_method(D_METHOD("remove_inspector_plugin", "plugin"), &EditorPlugin::remove_inspector_plugin);
+ ClassDB::bind_method(D_METHOD("add_resource_conversion_plugin", "plugin"), &EditorPlugin::add_resource_conversion_plugin);
+ ClassDB::bind_method(D_METHOD("remove_resource_conversion_plugin", "plugin"), &EditorPlugin::remove_resource_conversion_plugin);
ClassDB::bind_method(D_METHOD("set_input_event_forwarding_always_enabled"), &EditorPlugin::set_input_event_forwarding_always_enabled);
ClassDB::bind_method(D_METHOD("set_force_draw_over_forwarding_enabled"), &EditorPlugin::set_force_draw_over_forwarding_enabled);
@@ -977,8 +985,8 @@ void EditorPlugin::_bind_methods() {
BIND_ENUM_CONSTANT(AFTER_GUI_INPUT_CUSTOM);
}
-Ref<EditorUndoRedoManager> EditorPlugin::get_undo_redo() {
- return EditorNode::get_undo_redo();
+EditorUndoRedoManager *EditorPlugin::get_undo_redo() {
+ return EditorUndoRedoManager::get_singleton();
}
EditorPluginCreateFunc EditorPlugins::creation_funcs[MAX_CREATE_FUNCS];
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index 33081e867a..a5a17acdf1 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -48,6 +48,7 @@ class EditorInspector;
class EditorInspectorPlugin;
class EditorNode3DGizmoPlugin;
class EditorPaths;
+class EditorResourceConversionPlugin;
class EditorResourcePreview;
class EditorSceneFormatImporter;
class EditorScenePostImportPlugin;
@@ -148,7 +149,7 @@ protected:
void _notification(int p_what);
static void _bind_methods();
- Ref<EditorUndoRedoManager> get_undo_redo();
+ EditorUndoRedoManager *get_undo_redo();
void add_custom_type(const String &p_type, const String &p_base, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon);
void remove_custom_type(const String &p_type);
@@ -277,9 +278,6 @@ public:
void make_bottom_panel_item_visible(Control *p_item);
void hide_bottom_panel();
- virtual void restore_global_state();
- virtual void save_global_state();
-
void add_translation_parser_plugin(const Ref<EditorTranslationParserPlugin> &p_parser);
void remove_translation_parser_plugin(const Ref<EditorTranslationParserPlugin> &p_parser);
@@ -307,6 +305,9 @@ public:
void add_debugger_plugin(const Ref<EditorDebuggerPlugin> &p_plugin);
void remove_debugger_plugin(const Ref<EditorDebuggerPlugin> &p_plugin);
+ void add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
+ void remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
+
void enable_plugin();
void disable_plugin();
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index ba42bbf3bd..c9eae77b53 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -68,7 +68,7 @@ EditorPropertyNil::EditorPropertyNil() {
void EditorPropertyText::_set_read_only(bool p_read_only) {
text->set_editable(!p_read_only);
-};
+}
void EditorPropertyText::_text_submitted(const String &p_string) {
if (updating) {
@@ -133,7 +133,7 @@ EditorPropertyText::EditorPropertyText() {
void EditorPropertyMultilineText::_set_read_only(bool p_read_only) {
text->set_editable(!p_read_only);
open_big_text->set_disabled(p_read_only);
-};
+}
void EditorPropertyMultilineText::_big_text_changed() {
text->set_text(big_text->get_text());
@@ -236,7 +236,7 @@ EditorPropertyMultilineText::EditorPropertyMultilineText(bool p_expression) {
void EditorPropertyTextEnum::_set_read_only(bool p_read_only) {
option_button->set_disabled(p_read_only);
edit_button->set_disabled(p_read_only);
-};
+}
void EditorPropertyTextEnum::_emit_changed_value(String p_string) {
if (string_name) {
@@ -268,7 +268,7 @@ void EditorPropertyTextEnum::_custom_value_accepted() {
_custom_value_submitted(new_value);
}
-void EditorPropertyTextEnum::_custom_value_cancelled() {
+void EditorPropertyTextEnum::_custom_value_canceled() {
custom_value_edit->set_text(get_edited_object()->get(get_edited_property()));
edit_custom_layout->hide();
@@ -342,12 +342,17 @@ void EditorPropertyTextEnum::_notification(int p_what) {
}
EditorPropertyTextEnum::EditorPropertyTextEnum() {
+ HBoxContainer *hb = memnew(HBoxContainer);
+ add_child(hb);
+
default_layout = memnew(HBoxContainer);
- add_child(default_layout);
+ default_layout->set_h_size_flags(SIZE_EXPAND_FILL);
+ hb->add_child(default_layout);
edit_custom_layout = memnew(HBoxContainer);
+ edit_custom_layout->set_h_size_flags(SIZE_EXPAND_FILL);
edit_custom_layout->hide();
- add_child(edit_custom_layout);
+ hb->add_child(edit_custom_layout);
option_button = memnew(OptionButton);
option_button->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -375,7 +380,7 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() {
cancel_button = memnew(Button);
cancel_button->set_flat(true);
edit_custom_layout->add_child(cancel_button);
- cancel_button->connect("pressed", callable_mp(this, &EditorPropertyTextEnum::_custom_value_cancelled));
+ cancel_button->connect("pressed", callable_mp(this, &EditorPropertyTextEnum::_custom_value_canceled));
add_focusable(option_button);
add_focusable(edit_button);
@@ -450,7 +455,7 @@ EditorPropertyLocale::EditorPropertyLocale() {
void EditorPropertyPath::_set_read_only(bool p_read_only) {
path->set_editable(!p_read_only);
path_edit->set_disabled(p_read_only);
-};
+}
void EditorPropertyPath::_path_selected(const String &p_path) {
emit_changed(get_edited_property(), p_path);
@@ -561,15 +566,13 @@ bool EditorPropertyPath::_can_drop_data_fw(const Point2 &p_point, const Variant
}
void EditorPropertyPath::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw", "position", "data", "from"), &EditorPropertyPath::_can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw", "position", "data", "from"), &EditorPropertyPath::_drop_data_fw);
}
EditorPropertyPath::EditorPropertyPath() {
HBoxContainer *path_hb = memnew(HBoxContainer);
add_child(path_hb);
path = memnew(LineEdit);
- path->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_CDU(path, EditorPropertyPath);
path->set_structured_text_bidi_override(TextServer::STRUCTURED_TEXT_FILE);
path_hb->add_child(path);
path->connect("text_submitted", callable_mp(this, &EditorPropertyPath::_path_selected));
@@ -588,7 +591,7 @@ EditorPropertyPath::EditorPropertyPath() {
void EditorPropertyClassName::_set_read_only(bool p_read_only) {
property->set_disabled(p_read_only);
-};
+}
void EditorPropertyClassName::setup(const String &p_base_type, const String &p_selected_type) {
base_type = p_base_type;
@@ -629,112 +632,11 @@ EditorPropertyClassName::EditorPropertyClassName() {
add_child(dialog);
}
-///////////////////// MEMBER /////////////////////////
-
-void EditorPropertyMember::_set_read_only(bool p_read_only) {
- property->set_disabled(p_read_only);
-};
-
-void EditorPropertyMember::_property_selected(const String &p_selected) {
- emit_changed(get_edited_property(), p_selected);
- update_property();
-}
-
-void EditorPropertyMember::_property_select() {
- if (!selector) {
- selector = memnew(PropertySelector);
- selector->connect("selected", callable_mp(this, &EditorPropertyMember::_property_selected));
- add_child(selector);
- }
-
- String current = get_edited_object()->get(get_edited_property());
-
- if (hint == MEMBER_METHOD_OF_VARIANT_TYPE) {
- Variant::Type type = Variant::NIL;
- for (int i = 0; i < Variant::VARIANT_MAX; i++) {
- if (hint_text == Variant::get_type_name(Variant::Type(i))) {
- type = Variant::Type(i);
- }
- }
- if (type != Variant::NIL) {
- selector->select_method_from_basic_type(type, current);
- }
-
- } else if (hint == MEMBER_METHOD_OF_BASE_TYPE) {
- selector->select_method_from_base_type(hint_text, current);
-
- } else if (hint == MEMBER_METHOD_OF_INSTANCE) {
- Object *instance = ObjectDB::get_instance(ObjectID(hint_text.to_int()));
- if (instance) {
- selector->select_method_from_instance(instance, current);
- }
-
- } else if (hint == MEMBER_METHOD_OF_SCRIPT) {
- Object *obj = ObjectDB::get_instance(ObjectID(hint_text.to_int()));
- if (Object::cast_to<Script>(obj)) {
- selector->select_method_from_script(Object::cast_to<Script>(obj), current);
- }
-
- } else if (hint == MEMBER_PROPERTY_OF_VARIANT_TYPE) {
- Variant::Type type = Variant::NIL;
- String tname = hint_text;
- if (tname.contains(".")) {
- tname = tname.get_slice(".", 0);
- }
- for (int i = 0; i < Variant::VARIANT_MAX; i++) {
- if (tname == Variant::get_type_name(Variant::Type(i))) {
- type = Variant::Type(Variant::Type(i));
- }
- }
-
- if (type != Variant::NIL) {
- selector->select_property_from_basic_type(type, current);
- }
-
- } else if (hint == MEMBER_PROPERTY_OF_BASE_TYPE) {
- selector->select_property_from_base_type(hint_text, current);
-
- } else if (hint == MEMBER_PROPERTY_OF_INSTANCE) {
- Object *instance = ObjectDB::get_instance(ObjectID(hint_text.to_int()));
- if (instance) {
- selector->select_property_from_instance(instance, current);
- }
-
- } else if (hint == MEMBER_PROPERTY_OF_SCRIPT) {
- Object *obj = ObjectDB::get_instance(ObjectID(hint_text.to_int()));
- if (Object::cast_to<Script>(obj)) {
- selector->select_property_from_script(Object::cast_to<Script>(obj), current);
- }
- }
-}
-
-void EditorPropertyMember::setup(Type p_hint, const String &p_hint_text) {
- hint = p_hint;
- hint_text = p_hint_text;
-}
-
-void EditorPropertyMember::update_property() {
- String full_path = get_edited_object()->get(get_edited_property());
- property->set_text(full_path);
-}
-
-void EditorPropertyMember::_bind_methods() {
-}
-
-EditorPropertyMember::EditorPropertyMember() {
- selector = nullptr;
- property = memnew(Button);
- property->set_clip_text(true);
- add_child(property);
- add_focusable(property);
- property->connect("pressed", callable_mp(this, &EditorPropertyMember::_property_select));
-}
-
///////////////////// CHECK /////////////////////////
void EditorPropertyCheck::_set_read_only(bool p_read_only) {
checkbox->set_disabled(p_read_only);
-};
+}
void EditorPropertyCheck::_checkbox_pressed() {
emit_changed(get_edited_property(), checkbox->is_pressed());
@@ -761,7 +663,7 @@ EditorPropertyCheck::EditorPropertyCheck() {
void EditorPropertyEnum::_set_read_only(bool p_read_only) {
options->set_disabled(p_read_only);
-};
+}
void EditorPropertyEnum::_option_selected(int p_which) {
int64_t val = options->get_item_metadata(p_which);
@@ -820,7 +722,7 @@ void EditorPropertyFlags::_set_read_only(bool p_read_only) {
for (CheckBox *check : flags) {
check->set_disabled(p_read_only);
}
-};
+}
void EditorPropertyFlags::_flag_toggled(int p_index) {
uint32_t value = get_edited_object()->get(get_edited_property());
@@ -1186,7 +1088,7 @@ void EditorPropertyLayers::_notification(int p_what) {
void EditorPropertyLayers::_set_read_only(bool p_read_only) {
button->set_disabled(p_read_only);
grid->set_read_only(p_read_only);
-};
+}
void EditorPropertyLayers::_grid_changed(uint32_t p_grid) {
emit_changed(get_edited_property(), p_grid);
@@ -1359,7 +1261,7 @@ EditorPropertyLayers::EditorPropertyLayers() {
void EditorPropertyInteger::_set_read_only(bool p_read_only) {
spin->set_read_only(p_read_only);
-};
+}
void EditorPropertyInteger::_value_changed(int64_t val) {
if (setting) {
@@ -1406,7 +1308,7 @@ EditorPropertyInteger::EditorPropertyInteger() {
void EditorPropertyObjectID::_set_read_only(bool p_read_only) {
edit->set_disabled(p_read_only);
-};
+}
void EditorPropertyObjectID::_edit_pressed() {
emit_signal(SNAME("object_id_selected"), get_edited_property(), get_edited_object()->get(get_edited_property()));
@@ -1421,10 +1323,12 @@ void EditorPropertyObjectID::update_property() {
ObjectID id = get_edited_object()->get(get_edited_property());
if (id.is_valid()) {
edit->set_text(type + " ID: " + uitos(id));
+ edit->set_tooltip_text(type + " ID: " + uitos(id));
edit->set_disabled(false);
edit->set_icon(EditorNode::get_singleton()->get_class_icon(type));
} else {
edit->set_text(TTR("<empty>"));
+ edit->set_tooltip_text("");
edit->set_disabled(true);
edit->set_icon(Ref<Texture2D>());
}
@@ -1441,6 +1345,7 @@ EditorPropertyObjectID::EditorPropertyObjectID() {
edit = memnew(Button);
add_child(edit);
add_focusable(edit);
+ edit->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
edit->connect("pressed", callable_mp(this, &EditorPropertyObjectID::_edit_pressed));
}
@@ -1496,7 +1401,7 @@ EditorPropertyCallable::EditorPropertyCallable() {
void EditorPropertyFloat::_set_read_only(bool p_read_only) {
spin->set_read_only(p_read_only);
-};
+}
void EditorPropertyFloat::_value_changed(double val) {
if (setting) {
@@ -1546,7 +1451,7 @@ EditorPropertyFloat::EditorPropertyFloat() {
void EditorPropertyEasing::_set_read_only(bool p_read_only) {
spin->set_read_only(p_read_only);
-};
+}
void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) {
if (is_read_only()) {
@@ -1577,7 +1482,7 @@ void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) {
const Ref<InputEventMouseMotion> mm = p_ev;
- if (dragging && mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (dragging && mm.is_valid() && (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
float rel = mm->get_relative().x;
if (rel == 0) {
return;
@@ -1769,7 +1674,7 @@ void EditorPropertyVector2::_set_read_only(bool p_read_only) {
for (int i = 0; i < 2; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyVector2::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -1900,7 +1805,7 @@ void EditorPropertyRect2::_set_read_only(bool p_read_only) {
for (int i = 0; i < 4; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyRect2::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -2003,7 +1908,7 @@ void EditorPropertyVector3::_set_read_only(bool p_read_only) {
for (int i = 0; i < 3; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyVector3::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -2182,7 +2087,7 @@ void EditorPropertyVector2i::_set_read_only(bool p_read_only) {
for (int i = 0; i < 2; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyVector2i::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -2312,7 +2217,7 @@ void EditorPropertyRect2i::_set_read_only(bool p_read_only) {
for (int i = 0; i < 4; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyRect2i::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -2414,7 +2319,7 @@ void EditorPropertyVector3i::_set_read_only(bool p_read_only) {
for (int i = 0; i < 3; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyVector3i::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -2564,7 +2469,7 @@ void EditorPropertyPlane::_set_read_only(bool p_read_only) {
for (int i = 0; i < 4; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyPlane::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -2660,7 +2565,7 @@ void EditorPropertyQuaternion::_set_read_only(bool p_read_only) {
for (int i = 0; i < 3; i++) {
euler[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyQuaternion::_edit_custom_value() {
if (edit_button->is_pressed()) {
@@ -2873,7 +2778,7 @@ void EditorPropertyVector4::_set_read_only(bool p_read_only) {
for (int i = 0; i < 4; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyVector4::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -2963,7 +2868,7 @@ void EditorPropertyVector4i::_set_read_only(bool p_read_only) {
for (int i = 0; i < 4; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyVector4i::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -3052,7 +2957,7 @@ void EditorPropertyAABB::_set_read_only(bool p_read_only) {
for (int i = 0; i < 6; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyAABB::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -3135,7 +3040,7 @@ void EditorPropertyTransform2D::_set_read_only(bool p_read_only) {
for (int i = 0; i < 6; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyTransform2D::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -3226,7 +3131,7 @@ void EditorPropertyBasis::_set_read_only(bool p_read_only) {
for (int i = 0; i < 9; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyBasis::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -3316,7 +3221,7 @@ void EditorPropertyTransform3D::_set_read_only(bool p_read_only) {
for (int i = 0; i < 12; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyTransform3D::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -3414,7 +3319,7 @@ void EditorPropertyProjection::_set_read_only(bool p_read_only) {
for (int i = 0; i < 12; i++) {
spin[i]->set_read_only(p_read_only);
}
-};
+}
void EditorPropertyProjection::_value_changed(double val, const String &p_name) {
if (setting) {
@@ -3517,7 +3422,7 @@ EditorPropertyProjection::EditorPropertyProjection() {
void EditorPropertyColor::_set_read_only(bool p_read_only) {
picker->set_disabled(p_read_only);
-};
+}
void EditorPropertyColor::_color_changed(const Color &p_color) {
// Cancel the color change if the current color is identical to the new one.
@@ -3774,8 +3679,6 @@ void EditorPropertyNodePath::_notification(int p_what) {
}
void EditorPropertyNodePath::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw", "position", "data", "from"), &EditorPropertyNodePath::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw", "position", "data", "from"), &EditorPropertyNodePath::drop_data_fw);
}
EditorPropertyNodePath::EditorPropertyNodePath() {
@@ -3787,7 +3690,7 @@ EditorPropertyNodePath::EditorPropertyNodePath() {
assign->set_h_size_flags(SIZE_EXPAND_FILL);
assign->set_clip_text(true);
assign->connect("pressed", callable_mp(this, &EditorPropertyNodePath::_node_assign));
- assign->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_CD(assign, EditorPropertyNodePath);
hbc->add_child(assign);
clear = memnew(Button);
@@ -3819,7 +3722,7 @@ EditorPropertyRID::EditorPropertyRID() {
void EditorPropertyResource::_set_read_only(bool p_read_only) {
resource_picker->set_editable(!p_read_only);
-};
+}
void EditorPropertyResource::_resource_selected(const Ref<Resource> &p_resource, bool p_inspect) {
if (p_resource->is_built_in() && !p_resource->get_path().is_empty()) {
@@ -3847,13 +3750,93 @@ void EditorPropertyResource::_resource_selected(const Ref<Resource> &p_resource,
}
}
+static bool _find_recursive_resources(const Variant &v, HashSet<Resource *> &resources_found) {
+ switch (v.get_type()) {
+ case Variant::ARRAY: {
+ Array a = v;
+ for (int i = 0; i < a.size(); i++) {
+ Variant v2 = a[i];
+ if (v2.get_type() != Variant::ARRAY && v2.get_type() != Variant::DICTIONARY && v2.get_type() != Variant::OBJECT) {
+ continue;
+ }
+ if (_find_recursive_resources(v2, resources_found)) {
+ return true;
+ }
+ }
+ } break;
+ case Variant::DICTIONARY: {
+ Dictionary d = v;
+ List<Variant> keys;
+ d.get_key_list(&keys);
+ for (const Variant &k : keys) {
+ if (k.get_type() == Variant::ARRAY || k.get_type() == Variant::DICTIONARY || k.get_type() == Variant::OBJECT) {
+ if (_find_recursive_resources(k, resources_found)) {
+ return true;
+ }
+ }
+ Variant v2 = d[k];
+ if (v2.get_type() == Variant::ARRAY || v2.get_type() == Variant::DICTIONARY || v2.get_type() == Variant::OBJECT) {
+ if (_find_recursive_resources(v2, resources_found)) {
+ return true;
+ }
+ }
+ }
+ } break;
+ case Variant::OBJECT: {
+ Ref<Resource> r = v;
+
+ if (r.is_null()) {
+ return false;
+ }
+
+ if (resources_found.has(r.ptr())) {
+ return true;
+ }
+
+ resources_found.insert(r.ptr());
+
+ List<PropertyInfo> plist;
+ r->get_property_list(&plist);
+ for (const PropertyInfo &pinfo : plist) {
+ if (!(pinfo.usage & PROPERTY_USAGE_STORAGE)) {
+ continue;
+ }
+
+ if (pinfo.type != Variant::ARRAY && pinfo.type != Variant::DICTIONARY && pinfo.type != Variant::OBJECT) {
+ continue;
+ }
+ if (_find_recursive_resources(r->get(pinfo.name), resources_found)) {
+ return true;
+ }
+ }
+
+ resources_found.erase(r.ptr());
+ } break;
+ default: {
+ }
+ }
+ return false;
+}
+
void EditorPropertyResource::_resource_changed(const Ref<Resource> &p_resource) {
- // Make visual script the correct type.
- Ref<Script> s = p_resource;
+ Resource *r = Object::cast_to<Resource>(get_edited_object());
+ if (r) {
+ // Check for recursive setting of resource
+ HashSet<Resource *> resources_found;
+ resources_found.insert(r);
+ bool found = _find_recursive_resources(p_resource, resources_found);
+ if (found) {
+ EditorNode::get_singleton()->show_warning(TTR("Recursion detected, unable to assign resource to property."));
+ emit_changed(get_edited_property(), Ref<Resource>());
+ update_property();
+ return;
+ }
+ }
// The bool is_script applies only to an object's main script.
// Changing the value of Script-type exported variables of the main script should not trigger saving/reloading properties.
bool is_script = false;
+ Ref<Script> s = p_resource;
if (get_edited_object() && s.is_valid() && get_edited_property() == CoreStringNames::get_singleton()->_script) {
is_script = true;
InspectorDock::get_singleton()->store_script_properties(get_edited_object());
@@ -3863,7 +3846,7 @@ void EditorPropertyResource::_resource_changed(const Ref<Resource> &p_resource)
// Prevent the creation of invalid ViewportTextures when possible.
Ref<ViewportTexture> vpt = p_resource;
if (vpt.is_valid()) {
- Resource *r = Object::cast_to<Resource>(get_edited_object());
+ r = Object::cast_to<Resource>(get_edited_object());
if (r && r->get_path().is_resource_file()) {
EditorNode::get_singleton()->show_warning(TTR("Can't create a ViewportTexture on resources saved as a file.\nResource needs to belong to a scene."));
emit_changed(get_edited_property(), Ref<Resource>());
@@ -3925,40 +3908,7 @@ void EditorPropertyResource::_open_editor_pressed() {
Ref<Resource> res = get_edited_object()->get(get_edited_property());
if (res.is_valid()) {
// May clear the editor so do it deferred.
- callable_mp(EditorNode::get_singleton(), &EditorNode::edit_item_resource).bind(res).call_deferred();
- }
-}
-
-void EditorPropertyResource::_fold_other_editors(Object *p_self) {
- if (this == p_self) {
- return;
- }
-
- Ref<Resource> res = get_edited_object()->get(get_edited_property());
- if (!res.is_valid()) {
- return;
- }
-
- bool use_editor = false;
- for (int i = 0; i < EditorNode::get_editor_data().get_editor_plugin_count(); i++) {
- EditorPlugin *ep = EditorNode::get_editor_data().get_editor_plugin(i);
- if (ep->handles(res.ptr())) {
- use_editor = true;
- break;
- }
- }
- if (!use_editor) {
- return;
- }
-
- opened_editor = false;
-
- bool unfolded = get_edited_object()->editor_is_section_unfolded(get_edited_property());
- if (unfolded) {
- // Refold.
- resource_picker->set_toggle_pressed(false);
- get_edited_object()->editor_set_section_unfold(get_edited_property(), false);
- update_property();
+ callable_mp(EditorNode::get_singleton(), &EditorNode::edit_item).bind(res.ptr(), this).call_deferred();
}
}
@@ -4111,20 +4061,17 @@ void EditorPropertyResource::update_property() {
sub_inspector_vbox->add_child(sub_inspector);
resource_picker->set_toggle_pressed(true);
- bool use_editor = false;
+ Array editor_list;
for (int i = 0; i < EditorNode::get_editor_data().get_editor_plugin_count(); i++) {
EditorPlugin *ep = EditorNode::get_editor_data().get_editor_plugin(i);
if (ep->handles(res.ptr())) {
- use_editor = true;
+ editor_list.push_back(ep);
}
}
- if (use_editor) {
- // Open editor directly and hide other such editors which are currently open.
+ if (!editor_list.is_empty()) {
+ // Open editor directly.
_open_editor_pressed();
- if (is_inside_tree()) {
- get_tree()->call_deferred(SNAME("call_group"), "_editor_resource_properties", "_fold_other_editors", this);
- }
opened_editor = true;
}
@@ -4143,7 +4090,7 @@ void EditorPropertyResource::update_property() {
sub_inspector_vbox = nullptr;
if (opened_editor) {
- EditorNode::get_singleton()->hide_top_editors();
+ EditorNode::get_singleton()->hide_unused_editors();
opened_editor = false;
}
@@ -4177,6 +4124,15 @@ void EditorPropertyResource::set_use_sub_inspector(bool p_enable) {
use_sub_inspector = p_enable;
}
+void EditorPropertyResource::fold_resource() {
+ bool unfolded = get_edited_object()->editor_is_section_unfolded(get_edited_property());
+ if (unfolded) {
+ resource_picker->set_toggle_pressed(false);
+ get_edited_object()->editor_set_section_unfold(get_edited_property(), false);
+ update_property();
+ }
+}
+
void EditorPropertyResource::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
@@ -4188,14 +4144,8 @@ void EditorPropertyResource::_notification(int p_what) {
}
}
-void EditorPropertyResource::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_fold_other_editors"), &EditorPropertyResource::_fold_other_editors);
-}
-
EditorPropertyResource::EditorPropertyResource() {
use_sub_inspector = bool(EDITOR_GET("interface/inspector/open_resources_in_current_inspector"));
-
- add_to_group("_editor_resource_properties");
}
////////////// DEFAULT PLUGIN //////////////////////
@@ -4204,7 +4154,7 @@ bool EditorInspectorDefaultPlugin::can_handle(Object *p_object) {
return true; // Can handle everything.
}
-bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
Control *editor = EditorInspectorDefaultPlugin::get_editor_for_property(p_object, p_type, p_path, p_hint, p_hint_text, p_usage, p_wide);
if (editor) {
add_property_editor(p_path, editor);
@@ -4278,7 +4228,7 @@ static EditorPropertyRangeHint _parse_range_hint(PropertyHint p_hint, const Stri
return hint;
}
-EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
double default_float_step = EDITOR_GET("interface/inspector/default_float_step");
switch (p_type) {
@@ -4409,45 +4359,6 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
editor->set_save_mode();
}
return editor;
- } else if (p_hint == PROPERTY_HINT_METHOD_OF_VARIANT_TYPE ||
- p_hint == PROPERTY_HINT_METHOD_OF_BASE_TYPE ||
- p_hint == PROPERTY_HINT_METHOD_OF_INSTANCE ||
- p_hint == PROPERTY_HINT_METHOD_OF_SCRIPT ||
- p_hint == PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE ||
- p_hint == PROPERTY_HINT_PROPERTY_OF_BASE_TYPE ||
- p_hint == PROPERTY_HINT_PROPERTY_OF_INSTANCE ||
- p_hint == PROPERTY_HINT_PROPERTY_OF_SCRIPT) {
- EditorPropertyMember *editor = memnew(EditorPropertyMember);
-
- EditorPropertyMember::Type type = EditorPropertyMember::MEMBER_METHOD_OF_BASE_TYPE;
- switch (p_hint) {
- case PROPERTY_HINT_METHOD_OF_BASE_TYPE:
- type = EditorPropertyMember::MEMBER_METHOD_OF_BASE_TYPE;
- break;
- case PROPERTY_HINT_METHOD_OF_INSTANCE:
- type = EditorPropertyMember::MEMBER_METHOD_OF_INSTANCE;
- break;
- case PROPERTY_HINT_METHOD_OF_SCRIPT:
- type = EditorPropertyMember::MEMBER_METHOD_OF_SCRIPT;
- break;
- case PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE:
- type = EditorPropertyMember::MEMBER_PROPERTY_OF_VARIANT_TYPE;
- break;
- case PROPERTY_HINT_PROPERTY_OF_BASE_TYPE:
- type = EditorPropertyMember::MEMBER_PROPERTY_OF_BASE_TYPE;
- break;
- case PROPERTY_HINT_PROPERTY_OF_INSTANCE:
- type = EditorPropertyMember::MEMBER_PROPERTY_OF_INSTANCE;
- break;
- case PROPERTY_HINT_PROPERTY_OF_SCRIPT:
- type = EditorPropertyMember::MEMBER_PROPERTY_OF_SCRIPT;
- break;
- default: {
- }
- }
- editor->setup(type, p_hint_text);
- return editor;
-
} else {
EditorPropertyText *editor = memnew(EditorPropertyText);
if (p_hint == PROPERTY_HINT_PLACEHOLDER_TEXT) {
@@ -4646,6 +4557,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
return editor;
} else {
EditorPropertyDictionary *editor = memnew(EditorPropertyDictionary);
+ editor->setup(p_hint);
return editor;
}
} break;
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index 03e318b706..14a2699ad8 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -121,7 +121,7 @@ class EditorPropertyTextEnum : public EditorProperty {
void _edit_custom_value();
void _custom_value_submitted(String p_value);
void _custom_value_accepted();
- void _custom_value_cancelled();
+ void _custom_value_canceled();
protected:
virtual void _set_read_only(bool p_read_only) override;
@@ -203,40 +203,6 @@ public:
EditorPropertyClassName();
};
-class EditorPropertyMember : public EditorProperty {
- GDCLASS(EditorPropertyMember, EditorProperty);
-
-public:
- enum Type {
- MEMBER_METHOD_OF_VARIANT_TYPE, ///< a method of a type
- MEMBER_METHOD_OF_BASE_TYPE, ///< a method of a base type
- MEMBER_METHOD_OF_INSTANCE, ///< a method of an instance
- MEMBER_METHOD_OF_SCRIPT, ///< a method of a script & base
- MEMBER_PROPERTY_OF_VARIANT_TYPE, ///< a property of a type
- MEMBER_PROPERTY_OF_BASE_TYPE, ///< a property of a base type
- MEMBER_PROPERTY_OF_INSTANCE, ///< a property of an instance
- MEMBER_PROPERTY_OF_SCRIPT, ///< a property of a script & base
- };
-
-private:
- Type hint;
- PropertySelector *selector = nullptr;
- Button *property = nullptr;
- String hint_text;
-
- void _property_selected(const String &p_selected);
- void _property_select();
-
-protected:
- virtual void _set_read_only(bool p_read_only) override;
- static void _bind_methods();
-
-public:
- void setup(Type p_hint, const String &p_hint_text);
- virtual void update_property() override;
- EditorPropertyMember();
-};
-
class EditorPropertyCheck : public EditorProperty {
GDCLASS(EditorPropertyCheck, EditorProperty);
CheckBox *checkbox = nullptr;
@@ -868,13 +834,11 @@ class EditorPropertyResource : public EditorProperty {
void _sub_inspector_object_id_selected(int p_id);
void _open_editor_pressed();
- void _fold_other_editors(Object *p_self);
void _update_property_bg();
void _update_preferred_shader();
protected:
virtual void _set_read_only(bool p_read_only) override;
- static void _bind_methods();
void _notification(int p_what);
public:
@@ -886,6 +850,7 @@ public:
void expand_revertable() override;
void set_use_sub_inspector(bool p_enable);
+ void fold_resource();
EditorPropertyResource();
};
@@ -898,9 +863,9 @@ class EditorInspectorDefaultPlugin : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
- static EditorProperty *get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false);
+ static EditorProperty *get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false);
};
#endif // EDITOR_PROPERTIES_H
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 10f46283e6..b96ac9dbcb 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -158,17 +158,32 @@ EditorPropertyDictionaryObject::EditorPropertyDictionaryObject() {
///////////////////// ARRAY ///////////////////////////
+void EditorPropertyArray::initialize_array(Variant &p_array) {
+ if (array_type == Variant::ARRAY && subtype != Variant::NIL) {
+ Array array;
+ StringName subtype_class;
+ Ref<Script> subtype_script;
+ if (subtype == Variant::OBJECT && !subtype_hint_string.is_empty()) {
+ if (ClassDB::class_exists(subtype_hint_string)) {
+ subtype_class = subtype_hint_string;
+ }
+ }
+ array.set_typed(subtype, subtype_class, subtype_script);
+ p_array = array;
+ } else {
+ VariantInternal::initialize(&p_array, array_type);
+ }
+}
+
void EditorPropertyArray::_property_changed(const String &p_property, Variant p_value, const String &p_name, bool p_changing) {
if (p_property.begins_with("indices")) {
int index = p_property.get_slice("/", 1).to_int();
- Variant array = object->get_array();
+
+ Variant array = object->get_array().duplicate();
array.set(index, p_value);
- emit_changed(get_edited_property(), array, "", true);
- if (array.get_type() == Variant::ARRAY) {
- array = array.call("duplicate"); // Duplicate, so undo/redo works better.
- }
object->set_array(array);
+ emit_changed(get_edited_property(), array, "", true);
}
}
@@ -188,18 +203,12 @@ void EditorPropertyArray::_change_type_menu(int p_index) {
}
Variant value;
- Callable::CallError ce;
- Variant::construct(Variant::Type(p_index), value, nullptr, 0, ce);
- Variant array = object->get_array();
+ VariantInternal::initialize(&value, Variant::Type(p_index));
+
+ Variant array = object->get_array().duplicate();
array.set(changing_type_index, value);
emit_changed(get_edited_property(), array, "", true);
-
- if (array.get_type() == Variant::ARRAY) {
- array = array.call("duplicate"); // Duplicate, so undo/redo works better.
- }
-
- object->set_array(array);
update_property();
}
@@ -234,6 +243,8 @@ void EditorPropertyArray::update_property() {
return;
}
+ object->set_array(array);
+
int size = array.call("size");
int max_page = MAX(0, size - 1) / page_length;
page_index = MIN(page_index, max_page);
@@ -305,12 +316,6 @@ void EditorPropertyArray::update_property() {
paginator->update(page_index, max_page);
paginator->set_visible(max_page > 0);
- if (array.get_type() == Variant::ARRAY) {
- array = array.call("duplicate");
- }
-
- object->set_array(array);
-
int amount = MIN(size - offset, page_length);
for (int i = 0; i < amount; i++) {
bool reorder_is_from_current_page = reorder_from_index / page_length == page_index;
@@ -401,7 +406,7 @@ void EditorPropertyArray::update_property() {
}
void EditorPropertyArray::_remove_pressed(int p_index) {
- Variant array = object->get_array();
+ Variant array = object->get_array().duplicate();
array.call("remove_at", p_index);
emit_changed(get_edited_property(), array, "", false);
@@ -469,8 +474,9 @@ void EditorPropertyArray::drop_data_fw(const Point2 &p_point, const Variant &p_d
// Handle the case where array is not initialized yet.
if (!array.is_array()) {
- Callable::CallError ce;
- Variant::construct(array_type, array, nullptr, 0, ce);
+ initialize_array(array);
+ } else {
+ array = array.duplicate();
}
// Loop the file array and add to existing array.
@@ -483,13 +489,7 @@ void EditorPropertyArray::drop_data_fw(const Point2 &p_point, const Variant &p_d
}
}
- if (array.get_type() == Variant::ARRAY) {
- array = array.call("duplicate");
- }
-
emit_changed(get_edited_property(), array, "", false);
- object->set_array(array);
-
update_property();
}
}
@@ -536,10 +536,8 @@ void EditorPropertyArray::_notification(int p_what) {
void EditorPropertyArray::_edit_pressed() {
Variant array = get_edited_object()->get(get_edited_property());
- if (!array.is_array()) {
- Callable::CallError ce;
- Variant::construct(array_type, array, nullptr, 0, ce);
-
+ if (!array.is_array() && edit->is_pressed()) {
+ initialize_array(array);
get_edited_object()->set(get_edited_property(), array);
}
@@ -560,37 +558,10 @@ void EditorPropertyArray::_length_changed(double p_page) {
return;
}
- Variant array = object->get_array();
- int previous_size = array.call("size");
-
+ Variant array = object->get_array().duplicate();
array.call("resize", int(p_page));
- if (array.get_type() == Variant::ARRAY) {
- if (subtype != Variant::NIL) {
- int size = array.call("size");
- for (int i = previous_size; i < size; i++) {
- if (array.get(i).get_type() == Variant::NIL) {
- Callable::CallError ce;
- Variant r;
- Variant::construct(subtype, r, nullptr, 0, ce);
- array.set(i, r);
- }
- }
- }
- array = array.call("duplicate"); // Duplicate, so undo/redo works better.
- } else {
- int size = array.call("size");
- // Pool*Array don't initialize their elements, have to do it manually.
- for (int i = previous_size; i < size; i++) {
- Callable::CallError ce;
- Variant r;
- Variant::construct(array.get(i).get_type(), r, nullptr, 0, ce);
- array.set(i, r);
- }
- }
-
emit_changed(get_edited_property(), array, "", false);
- object->set_array(array);
update_property();
}
@@ -677,14 +648,13 @@ void EditorPropertyArray::_reorder_button_up() {
if (reorder_from_index != reorder_to_index) {
// Move the element.
- Variant array = object->get_array();
+ Variant array = object->get_array().duplicate();
Variant value_to_move = array.get(reorder_from_index);
array.call("remove_at", reorder_from_index);
array.call("insert", reorder_to_index, value_to_move);
emit_changed(get_edited_property(), array, "", false);
- object->set_array(array);
update_property();
}
@@ -702,8 +672,6 @@ void EditorPropertyArray::_reorder_button_up() {
}
void EditorPropertyArray::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &EditorPropertyArray::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &EditorPropertyArray::drop_data_fw);
}
EditorPropertyArray::EditorPropertyArray() {
@@ -715,7 +683,7 @@ EditorPropertyArray::EditorPropertyArray() {
edit->set_clip_text(true);
edit->connect("pressed", callable_mp(this, &EditorPropertyArray::_edit_pressed));
edit->set_toggle_mode(true);
- edit->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_CD(edit, EditorPropertyArray);
edit->connect("draw", callable_mp(this, &EditorPropertyArray::_button_draw));
add_child(edit);
add_focusable(edit);
@@ -744,14 +712,13 @@ void EditorPropertyDictionary::_property_changed(const String &p_property, Varia
object->set_new_item_value(p_value);
} else if (p_property.begins_with("indices")) {
int index = p_property.get_slice("/", 1).to_int();
- Dictionary dict = object->get_dict();
+
+ Dictionary dict = object->get_dict().duplicate();
Variant key = dict.get_key_at_index(index);
dict[key] = p_value;
- emit_changed(get_edited_property(), dict, "", true);
-
- dict = dict.duplicate(); // Duplicate, so undo/redo works better.
object->set_dict(dict);
+ emit_changed(get_edited_property(), dict, "", true);
}
}
@@ -771,24 +738,19 @@ void EditorPropertyDictionary::_add_key_value() {
return;
}
- Dictionary dict = object->get_dict();
-
+ Dictionary dict = object->get_dict().duplicate();
dict[object->get_new_item_key()] = object->get_new_item_value();
object->set_new_item_key(Variant());
object->set_new_item_value(Variant());
emit_changed(get_edited_property(), dict, "", false);
-
- dict = dict.duplicate(); // Duplicate, so undo/redo works better.
- object->set_dict(dict);
update_property();
}
void EditorPropertyDictionary::_change_type_menu(int p_index) {
if (changing_type_index < 0) {
Variant value;
- Callable::CallError ce;
- Variant::construct(Variant::Type(p_index), value, nullptr, 0, ce);
+ VariantInternal::initialize(&value, Variant::Type(p_index));
if (changing_type_index == -1) {
object->set_new_item_key(value);
} else {
@@ -798,12 +760,10 @@ void EditorPropertyDictionary::_change_type_menu(int p_index) {
return;
}
- Dictionary dict = object->get_dict();
-
+ Dictionary dict = object->get_dict().duplicate();
if (p_index < Variant::VARIANT_MAX) {
Variant value;
- Callable::CallError ce;
- Variant::construct(Variant::Type(p_index), value, nullptr, 0, ce);
+ VariantInternal::initialize(&value, Variant::Type(p_index));
Variant key = dict.get_key_at_index(changing_type_index);
dict[key] = value;
} else {
@@ -812,12 +772,13 @@ void EditorPropertyDictionary::_change_type_menu(int p_index) {
}
emit_changed(get_edited_property(), dict, "", false);
-
- dict = dict.duplicate(); // Duplicate, so undo/redo works better.
- object->set_dict(dict);
update_property();
}
+void EditorPropertyDictionary::setup(PropertyHint p_hint) {
+ property_hint = p_hint;
+}
+
void EditorPropertyDictionary::update_property() {
Variant updated_val = get_edited_object()->get(get_edited_property());
@@ -834,6 +795,7 @@ void EditorPropertyDictionary::update_property() {
}
Dictionary dict = updated_val;
+ object->set_dict(updated_val);
edit->set_text(vformat(TTR("Dictionary (size %d)"), dict.size()));
@@ -881,9 +843,6 @@ void EditorPropertyDictionary::update_property() {
int amount = MIN(size - offset, page_length);
int total_amount = page_index == max_page ? amount + 2 : amount; // For the "Add Key/Value Pair" box on last page.
- dict = dict.duplicate();
-
- object->set_dict(dict);
VBoxContainer *add_vbox = nullptr;
double default_float_step = EDITOR_GET("interface/inspector/default_float_step");
@@ -929,7 +888,13 @@ void EditorPropertyDictionary::update_property() {
prop = editor;
} break;
case Variant::STRING: {
- prop = memnew(EditorPropertyText);
+ if (i != amount && property_hint == PROPERTY_HINT_MULTILINE_TEXT) {
+ // If this is NOT the new key field and there's a multiline hint,
+ // show the field as multiline
+ prop = memnew(EditorPropertyMultilineText);
+ } else {
+ prop = memnew(EditorPropertyText);
+ }
} break;
@@ -1217,9 +1182,8 @@ void EditorPropertyDictionary::_notification(int p_what) {
void EditorPropertyDictionary::_edit_pressed() {
Variant prop_val = get_edited_object()->get(get_edited_property());
- if (prop_val.get_type() == Variant::NIL) {
- Callable::CallError ce;
- Variant::construct(Variant::DICTIONARY, prop_val, nullptr, 0, ce);
+ if (prop_val.get_type() == Variant::NIL && edit->is_pressed()) {
+ VariantInternal::initialize(&prop_val, Variant::DICTIONARY);
get_edited_object()->set(get_edited_property(), prop_val);
}
@@ -1264,14 +1228,13 @@ EditorPropertyDictionary::EditorPropertyDictionary() {
void EditorPropertyLocalizableString::_property_changed(const String &p_property, Variant p_value, const String &p_name, bool p_changing) {
if (p_property.begins_with("indices")) {
int index = p_property.get_slice("/", 1).to_int();
- Dictionary dict = object->get_dict();
+
+ Dictionary dict = object->get_dict().duplicate();
Variant key = dict.get_key_at_index(index);
dict[key] = p_value;
- emit_changed(get_edited_property(), dict, "", true);
-
- dict = dict.duplicate(); // Duplicate, so undo/redo works better.
object->set_dict(dict);
+ emit_changed(get_edited_property(), dict, "", true);
}
}
@@ -1280,29 +1243,22 @@ void EditorPropertyLocalizableString::_add_locale_popup() {
}
void EditorPropertyLocalizableString::_add_locale(const String &p_locale) {
- Dictionary dict = object->get_dict();
-
+ Dictionary dict = object->get_dict().duplicate();
object->set_new_item_key(p_locale);
object->set_new_item_value(String());
dict[object->get_new_item_key()] = object->get_new_item_value();
emit_changed(get_edited_property(), dict, "", false);
-
- dict = dict.duplicate(); // Duplicate, so undo/redo works better.
- object->set_dict(dict);
update_property();
}
void EditorPropertyLocalizableString::_remove_item(Object *p_button, int p_index) {
- Dictionary dict = object->get_dict();
+ Dictionary dict = object->get_dict().duplicate();
Variant key = dict.get_key_at_index(p_index);
dict.erase(key);
emit_changed(get_edited_property(), dict, "", false);
-
- dict = dict.duplicate(); // Duplicate, so undo/redo works better.
- object->set_dict(dict);
update_property();
}
@@ -1322,6 +1278,7 @@ void EditorPropertyLocalizableString::update_property() {
}
Dictionary dict = updated_val;
+ object->set_dict(dict);
edit->set_text(vformat(TTR("Localizable String (size %d)"), dict.size()));
@@ -1368,10 +1325,6 @@ void EditorPropertyLocalizableString::update_property() {
int amount = MIN(size - offset, page_length);
- dict = dict.duplicate();
-
- object->set_dict(dict);
-
for (int i = 0; i < amount; i++) {
String prop_name;
Variant key;
@@ -1443,9 +1396,8 @@ void EditorPropertyLocalizableString::_notification(int p_what) {
void EditorPropertyLocalizableString::_edit_pressed() {
Variant prop_val = get_edited_object()->get(get_edited_property());
- if (prop_val.get_type() == Variant::NIL) {
- Callable::CallError ce;
- Variant::construct(Variant::DICTIONARY, prop_val, nullptr, 0, ce);
+ if (prop_val.get_type() == Variant::NIL && edit->is_pressed()) {
+ VariantInternal::initialize(&prop_val, Variant::DICTIONARY);
get_edited_object()->set(get_edited_property(), prop_val);
}
diff --git a/editor/editor_properties_array_dict.h b/editor/editor_properties_array_dict.h
index 96fc2dce24..3b880c60a8 100644
--- a/editor/editor_properties_array_dict.h
+++ b/editor/editor_properties_array_dict.h
@@ -102,6 +102,8 @@ class EditorPropertyArray : public EditorProperty {
HBoxContainer *reorder_selected_element_hbox = nullptr;
Button *reorder_selected_button = nullptr;
+ void initialize_array(Variant &p_array);
+
void _page_changed(int p_page);
void _reorder_button_gui_input(const Ref<InputEvent> &p_event);
@@ -154,6 +156,7 @@ class EditorPropertyDictionary : public EditorProperty {
EditorSpinSlider *size_sliderv = nullptr;
Button *button_add_item = nullptr;
EditorPaginator *paginator = nullptr;
+ PropertyHint property_hint;
void _page_changed(int p_page);
void _edit_pressed();
@@ -169,6 +172,7 @@ protected:
void _notification(int p_what);
public:
+ void setup(PropertyHint p_hint);
virtual void update_property() override;
EditorPropertyDictionary();
};
diff --git a/editor/editor_property_name_processor.cpp b/editor/editor_property_name_processor.cpp
index 195457c239..5380fddde2 100644
--- a/editor/editor_property_name_processor.cpp
+++ b/editor/editor_property_name_processor.cpp
@@ -115,6 +115,7 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
capitalize_string_remaps["arm64-v8a"] = "arm64-v8a";
capitalize_string_remaps["armeabi-v7a"] = "armeabi-v7a";
capitalize_string_remaps["arvr"] = "ARVR";
+ capitalize_string_remaps["astc"] = "ASTC";
capitalize_string_remaps["bg"] = "BG";
capitalize_string_remaps["bidi"] = "BiDi";
capitalize_string_remaps["bp"] = "BP";
@@ -211,6 +212,7 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
capitalize_string_remaps["rmb"] = "RMB";
capitalize_string_remaps["rpc"] = "RPC";
capitalize_string_remaps["s3tc"] = "S3TC";
+ capitalize_string_remaps["scp"] = "SCP";
capitalize_string_remaps["sdf"] = "SDF";
capitalize_string_remaps["sdfgi"] = "SDFGI";
capitalize_string_remaps["sdk"] = "SDK";
diff --git a/editor/editor_quick_open.cpp b/editor/editor_quick_open.cpp
index d516610908..b90edb8f90 100644
--- a/editor/editor_quick_open.cpp
+++ b/editor/editor_quick_open.cpp
@@ -69,17 +69,9 @@ void EditorQuickOpen::_build_search_cache(EditorFileSystemDirectory *p_efsd) {
for (int i = 0; i < p_efsd->get_file_count(); i++) {
String file = p_efsd->get_file_path(i);
String engine_type = p_efsd->get_file_type(i);
- // TODO: Fix lack of caching for resource's script's global class name (if applicable).
- String script_type;
- if (_load_resources) {
- Ref<Resource> res = ResourceLoader::load(file);
- if (res.is_valid()) {
- Ref<Script> scr = res->get_script();
- if (scr.is_valid()) {
- script_type = scr->get_language()->get_global_class_name(file);
- }
- }
- }
+
+ String script_type = p_efsd->get_file_resource_script_class(i);
+
String actual_type = script_type.is_empty() ? engine_type : script_type;
// Iterate all possible base types.
for (String &parent_type : base_types) {
diff --git a/editor/editor_quick_open.h b/editor/editor_quick_open.h
index 0503eec835..4b63a226c2 100644
--- a/editor/editor_quick_open.h
+++ b/editor/editor_quick_open.h
@@ -43,7 +43,6 @@ class EditorQuickOpen : public ConfirmationDialog {
Tree *search_options = nullptr;
String base_type;
bool allow_multi_select = false;
- bool _load_resources = false; // Prohibitively slow for now.
Vector<String> files;
OAHashMap<String, Ref<Texture2D>> icons;
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index 94152dfd49..86ffbccefd 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -42,12 +42,6 @@
#include "editor/plugins/script_editor_plugin.h"
#include "editor/scene_tree_dock.h"
-HashMap<StringName, List<StringName>> EditorResourcePicker::allowed_types_cache;
-
-void EditorResourcePicker::clear_caches() {
- allowed_types_cache.clear();
-}
-
void EditorResourcePicker::_update_resource() {
String resource_path;
if (edited_resource.is_valid() && edited_resource->get_path().is_resource_file()) {
@@ -103,7 +97,7 @@ void EditorResourcePicker::_update_resource_preview(const String &p_path, const
}
if (p_preview.is_valid()) {
- preview_rect->set_offset(SIDE_LEFT, assign_button->get_icon()->get_width() + assign_button->get_theme_stylebox(SNAME("normal"))->get_default_margin(SIDE_LEFT) + get_theme_constant(SNAME("h_separation"), SNAME("Button")));
+ preview_rect->set_offset(SIDE_LEFT, assign_button->get_icon()->get_width() + assign_button->get_theme_stylebox(SNAME("normal"))->get_content_margin(SIDE_LEFT) + get_theme_constant(SNAME("h_separation"), SNAME("Button")));
// Resource-specific stretching.
if (Ref<GradientTexture1D>(edited_resource).is_valid() || Ref<Gradient>(edited_resource).is_valid()) {
@@ -464,7 +458,7 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) {
if (!base_type.is_empty()) {
int idx = 0;
- HashSet<String> allowed_types;
+ HashSet<StringName> allowed_types;
_get_allowed_types(false, &allowed_types);
Vector<EditorData::CustomType> custom_resources;
@@ -472,7 +466,7 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) {
custom_resources = EditorNode::get_editor_data().get_custom_types()["Resource"];
}
- for (const String &E : allowed_types) {
+ for (const StringName &E : allowed_types) {
const String &t = E;
bool is_custom_resource = false;
@@ -561,53 +555,44 @@ String EditorResourcePicker::_get_resource_type(const Ref<Resource> &p_resource)
return res_type;
}
-void EditorResourcePicker::_get_allowed_types(bool p_with_convert, HashSet<String> *p_vector) const {
- Vector<String> allowed_types = base_type.split(",");
- int size = allowed_types.size();
+static void _add_allowed_type(const StringName &p_type, HashSet<StringName> *p_vector) {
+ if (p_vector->has(p_type)) {
+ // Already added
+ return;
+ }
- List<StringName> global_classes;
- ScriptServer::get_global_class_list(&global_classes);
+ if (ClassDB::class_exists(p_type)) {
+ // Engine class,
- for (int i = 0; i < size; i++) {
- String base = allowed_types[i].strip_edges();
- if (!ClassDB::is_virtual(base)) {
- p_vector->insert(base);
+ if (!ClassDB::is_virtual(p_type)) {
+ p_vector->insert(p_type);
}
- // If we hit a familiar base type, take all the data from cache.
- if (allowed_types_cache.has(base)) {
- List<StringName> allowed_subtypes = allowed_types_cache[base];
- for (const StringName &subtype_name : allowed_subtypes) {
- if (!ClassDB::is_virtual(subtype_name)) {
- p_vector->insert(subtype_name);
- }
- }
- } else {
- List<StringName> allowed_subtypes;
+ List<StringName> inheriters;
+ ClassDB::get_inheriters_from_class(p_type, &inheriters);
+ for (const StringName &S : inheriters) {
+ _add_allowed_type(S, p_vector);
+ }
+ } else {
+ // Script class.
+ p_vector->insert(p_type);
+ }
- List<StringName> inheriters;
- if (!ScriptServer::is_global_class(base)) {
- ClassDB::get_inheriters_from_class(base, &inheriters);
- }
- for (const StringName &subtype_name : inheriters) {
- if (!ClassDB::is_virtual(subtype_name)) {
- p_vector->insert(subtype_name);
- }
- allowed_subtypes.push_back(subtype_name);
- }
+ List<StringName> inheriters;
+ ScriptServer::get_inheriters_list(p_type, &inheriters);
+ for (const StringName &S : inheriters) {
+ _add_allowed_type(S, p_vector);
+ }
+}
- for (const StringName &subtype_name : global_classes) {
- if (EditorNode::get_editor_data().script_class_is_parent(subtype_name, base)) {
- if (!ClassDB::is_virtual(subtype_name)) {
- p_vector->insert(subtype_name);
- }
- allowed_subtypes.push_back(subtype_name);
- }
- }
+void EditorResourcePicker::_get_allowed_types(bool p_with_convert, HashSet<StringName> *p_vector) const {
+ Vector<String> allowed_types = base_type.split(",");
+ int size = allowed_types.size();
- // Store the subtypes of the base type in the cache for future use.
- allowed_types_cache[base] = allowed_subtypes;
- }
+ for (int i = 0; i < size; i++) {
+ String base = allowed_types[i].strip_edges();
+
+ _add_allowed_type(base, p_vector);
if (p_with_convert) {
if (base == "BaseMaterial3D") {
@@ -619,14 +604,6 @@ void EditorResourcePicker::_get_allowed_types(bool p_with_convert, HashSet<Strin
}
}
}
-
- if (EditorNode::get_editor_data().get_custom_types().has("Resource")) {
- Vector<EditorData::CustomType> custom_resources = EditorNode::get_editor_data().get_custom_types()["Resource"];
-
- for (int i = 0; i < custom_resources.size(); i++) {
- p_vector->insert(custom_resources[i].name);
- }
- }
}
bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const {
@@ -654,7 +631,7 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const {
}
}
- HashSet<String> allowed_types;
+ HashSet<StringName> allowed_types;
_get_allowed_types(true, &allowed_types);
if (res.is_valid()) {
@@ -673,9 +650,9 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const {
return false;
}
-bool EditorResourcePicker::_is_type_valid(const String p_type_name, HashSet<String> p_allowed_types) const {
- for (const String &E : p_allowed_types) {
- String at = E.strip_edges();
+bool EditorResourcePicker::_is_type_valid(const String p_type_name, HashSet<StringName> p_allowed_types) const {
+ for (const StringName &E : p_allowed_types) {
+ String at = E;
if (p_type_name == at || ClassDB::is_parent_class(p_type_name, at) || EditorNode::get_editor_data().script_class_is_parent(p_type_name, at)) {
return true;
}
@@ -721,15 +698,15 @@ void EditorResourcePicker::drop_data_fw(const Point2 &p_point, const Variant &p_
}
if (dropped_resource.is_valid()) {
- HashSet<String> allowed_types;
+ HashSet<StringName> allowed_types;
_get_allowed_types(false, &allowed_types);
String res_type = _get_resource_type(dropped_resource);
// If the accepted dropped resource is from the extended list, it requires conversion.
if (!_is_type_valid(res_type, allowed_types)) {
- for (const String &E : allowed_types) {
- String at = E.strip_edges();
+ for (const StringName &E : allowed_types) {
+ String at = E;
if (at == "BaseMaterial3D" && Ref<Texture2D>(dropped_resource).is_valid()) {
// Use existing resource if possible and only replace its data.
@@ -772,9 +749,6 @@ void EditorResourcePicker::drop_data_fw(const Point2 &p_point, const Variant &p_
void EditorResourcePicker::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_resource_preview"), &EditorResourcePicker::_update_resource_preview);
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw", "position", "from"), &EditorResourcePicker::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw", "position", "data", "from"), &EditorResourcePicker::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw", "position", "data", "from"), &EditorResourcePicker::drop_data_fw);
ClassDB::bind_method(D_METHOD("set_base_type", "base_type"), &EditorResourcePicker::set_base_type);
ClassDB::bind_method(D_METHOD("get_base_type"), &EditorResourcePicker::get_base_type);
@@ -835,7 +809,7 @@ void EditorResourcePicker::set_base_type(const String &p_base_type) {
// There is a possibility that the new base type is conflicting with the existing value.
// Keep the value, but warn the user that there is a potential mistake.
if (!base_type.is_empty() && edited_resource.is_valid()) {
- HashSet<String> allowed_types;
+ HashSet<StringName> allowed_types;
_get_allowed_types(true, &allowed_types);
StringName custom_class;
@@ -849,10 +823,6 @@ void EditorResourcePicker::set_base_type(const String &p_base_type) {
String class_str = (custom_class == StringName() ? edited_resource->get_class() : vformat("%s (%s)", custom_class, edited_resource->get_class()));
WARN_PRINT(vformat("Value mismatch between the new base type of this EditorResourcePicker, '%s', and the type of the value it already has, '%s'.", base_type, class_str));
}
- } else {
- // Call the method to build the cache immediately.
- HashSet<String> allowed_types;
- _get_allowed_types(false, &allowed_types);
}
}
@@ -861,7 +831,7 @@ String EditorResourcePicker::get_base_type() const {
}
Vector<String> EditorResourcePicker::get_allowed_types() const {
- HashSet<String> allowed_types;
+ HashSet<StringName> allowed_types;
_get_allowed_types(false, &allowed_types);
Vector<String> types;
@@ -869,7 +839,7 @@ Vector<String> EditorResourcePicker::get_allowed_types() const {
int i = 0;
String *w = types.ptrw();
- for (const String &E : allowed_types) {
+ for (const StringName &E : allowed_types) {
w[i] = E;
i++;
}
@@ -885,7 +855,7 @@ void EditorResourcePicker::set_edited_resource(Ref<Resource> p_resource) {
}
if (!base_type.is_empty()) {
- HashSet<String> allowed_types;
+ HashSet<StringName> allowed_types;
_get_allowed_types(true, &allowed_types);
StringName custom_class;
@@ -950,7 +920,7 @@ EditorResourcePicker::EditorResourcePicker(bool p_hide_assign_button_controls) {
assign_button->set_flat(true);
assign_button->set_h_size_flags(SIZE_EXPAND_FILL);
assign_button->set_clip_text(true);
- assign_button->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(assign_button, EditorResourcePicker);
add_child(assign_button);
assign_button->connect("pressed", callable_mp(this, &EditorResourcePicker::_resource_selected));
assign_button->connect("draw", callable_mp(this, &EditorResourcePicker::_button_draw));
@@ -958,7 +928,7 @@ EditorResourcePicker::EditorResourcePicker(bool p_hide_assign_button_controls) {
if (!p_hide_assign_button_controls) {
preview_rect = memnew(TextureRect);
- preview_rect->set_ignore_texture_size(true);
+ preview_rect->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
preview_rect->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
preview_rect->set_offset(SIDE_TOP, 1);
preview_rect->set_offset(SIDE_BOTTOM, -1);
diff --git a/editor/editor_resource_picker.h b/editor/editor_resource_picker.h
index 8641cb6e84..a302e24957 100644
--- a/editor/editor_resource_picker.h
+++ b/editor/editor_resource_picker.h
@@ -42,8 +42,6 @@ class EditorQuickOpen;
class EditorResourcePicker : public HBoxContainer {
GDCLASS(EditorResourcePicker, HBoxContainer);
- static HashMap<StringName, List<StringName>> allowed_types_cache;
-
String base_type;
Ref<Resource> edited_resource;
@@ -92,9 +90,9 @@ class EditorResourcePicker : public HBoxContainer {
void _button_input(const Ref<InputEvent> &p_event);
String _get_resource_type(const Ref<Resource> &p_resource) const;
- void _get_allowed_types(bool p_with_convert, HashSet<String> *p_vector) const;
+ void _get_allowed_types(bool p_with_convert, HashSet<StringName> *p_vector) const;
bool _is_drop_valid(const Dictionary &p_drag_data) const;
- bool _is_type_valid(const String p_type_name, HashSet<String> p_allowed_types) const;
+ bool _is_type_valid(const String p_type_name, HashSet<StringName> p_allowed_types) const;
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
@@ -118,8 +116,6 @@ protected:
GDVIRTUAL1R(bool, _handle_menu_selected, int)
public:
- static void clear_caches();
-
void set_base_type(const String &p_base_type);
String get_base_type() const;
Vector<String> get_allowed_types() const;
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index 4bcd91376a..d3cceee1a3 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -272,7 +272,9 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) {
OS::ProcessID pid = 0;
Error err = OS::get_singleton()->create_instance(args, &pid);
ERR_FAIL_COND_V(err, err);
- pids.push_back(pid);
+ if (pid != 0) {
+ pids.push_back(pid);
+ }
}
status = STATUS_PLAY;
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index b0eb4c3d55..0628dc7116 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -37,56 +37,38 @@
void EditorRunNative::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_ENTER_TREE: {
- for (int i = 0; i < EditorExport::get_singleton()->get_export_platform_count(); i++) {
- Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(i);
- if (eep.is_null()) {
- continue;
- }
- Ref<ImageTexture> icon = eep->get_run_icon();
- if (!icon.is_null()) {
- Ref<Image> im = icon->get_image();
- im = im->duplicate();
- im->clear_mipmaps();
- if (!im->is_empty()) {
- im->resize(16 * EDSCALE, 16 * EDSCALE);
- Ref<ImageTexture> small_icon = ImageTexture::create_from_image(im);
- MenuButton *mb = memnew(MenuButton);
- mb->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::run_native).bind(i));
- mb->connect("pressed", callable_mp(this, &EditorRunNative::run_native).bind(-1, i));
- mb->set_icon(small_icon);
- add_child(mb);
- menus[i] = mb;
- }
- }
- }
+ case NOTIFICATION_THEME_CHANGED: {
+ remote_debug->set_icon(get_theme_icon(SNAME("PlayRemote"), SNAME("EditorIcons")));
} break;
-
case NOTIFICATION_PROCESS: {
bool changed = EditorExport::get_singleton()->poll_export_platforms() || first;
if (changed) {
- for (KeyValue<int, MenuButton *> &E : menus) {
- Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(E.key);
- MenuButton *mb = E.value;
- int dc = eep->get_options_count();
-
- if (dc == 0) {
- mb->hide();
- } else {
- mb->get_popup()->clear();
- mb->show();
- if (dc == 1) {
- mb->set_tooltip_text(eep->get_option_tooltip(0));
- } else {
- mb->set_tooltip_text(eep->get_options_tooltip());
- for (int i = 0; i < dc; i++) {
- mb->get_popup()->add_icon_item(eep->get_option_icon(i), eep->get_option_label(i));
- mb->get_popup()->set_item_tooltip(-1, eep->get_option_tooltip(i));
- }
+ PopupMenu *popup = remote_debug->get_popup();
+ popup->clear();
+ for (int i = 0; i < EditorExport::get_singleton()->get_export_platform_count(); i++) {
+ Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(i);
+ if (eep.is_null()) {
+ continue;
+ }
+ int dc = MIN(eep->get_options_count(), 9000);
+ if (dc > 0) {
+ popup->add_icon_item(eep->get_run_icon(), eep->get_name(), -1);
+ popup->set_item_disabled(-1, true);
+ for (int j = 0; j < dc; j++) {
+ popup->add_icon_item(eep->get_option_icon(j), eep->get_option_label(j), 10000 * i + j);
+ popup->set_item_tooltip(-1, eep->get_option_tooltip(j));
+ popup->set_item_indent(-1, 2);
}
}
}
+ if (popup->get_item_count() == 0) {
+ remote_debug->set_disabled(true);
+ remote_debug->set_tooltip_text(TTR("No Remote Debug export presets configured."));
+ } else {
+ remote_debug->set_disabled(false);
+ remote_debug->set_tooltip_text(TTR("Remote Debug"));
+ }
first = false;
}
@@ -94,25 +76,22 @@ void EditorRunNative::_notification(int p_what) {
}
}
-Error EditorRunNative::run_native(int p_idx, int p_platform) {
- if (!EditorNode::get_singleton()->ensure_main_scene(true)) {
- resume_idx = p_idx;
- resume_platform = p_platform;
+Error EditorRunNative::run_native(int p_id) {
+ if (p_id < 0) {
return OK;
}
- Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(p_platform);
- ERR_FAIL_COND_V(eep.is_null(), ERR_UNAVAILABLE);
+ int platform = p_id / 10000;
+ int idx = p_id % 10000;
- if (p_idx == -1) {
- if (eep->get_options_count() == 1) {
- menus[p_platform]->get_popup()->hide();
- p_idx = 0;
- } else {
- return ERR_INVALID_PARAMETER;
- }
+ if (!EditorNode::get_singleton()->ensure_main_scene(true)) {
+ resume_id = p_id;
+ return OK;
}
+ Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(platform);
+ ERR_FAIL_COND_V(eep.is_null(), ERR_UNAVAILABLE);
+
Ref<EditorExportPreset> preset;
for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
@@ -151,16 +130,18 @@ Error EditorRunNative::run_native(int p_idx, int p_platform) {
}
eep->clear_messages();
- Error err = eep->run(preset, p_idx, flags);
+ Error err = eep->run(preset, idx, flags);
result_dialog_log->clear();
if (eep->fill_log_messages(result_dialog_log, err)) {
- result_dialog->popup_centered_ratio(0.5);
+ if (eep->get_worst_message_type() >= EditorExportPlatform::EXPORT_MESSAGE_ERROR) {
+ result_dialog->popup_centered_ratio(0.5);
+ }
}
return err;
}
void EditorRunNative::resume_run_native() {
- run_native(resume_idx, resume_platform);
+ run_native(resume_id);
}
void EditorRunNative::_bind_methods() {
@@ -172,6 +153,14 @@ bool EditorRunNative::is_deploy_debug_remote_enabled() const {
}
EditorRunNative::EditorRunNative() {
+ remote_debug = memnew(MenuButton);
+ remote_debug->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::run_native));
+ remote_debug->set_icon(get_theme_icon(SNAME("PlayRemote"), SNAME("EditorIcons")));
+ remote_debug->set_tooltip_text(TTR("Remote Debug"));
+ remote_debug->set_disabled(true);
+
+ add_child(remote_debug);
+
result_dialog = memnew(AcceptDialog);
result_dialog->set_title(TTR("Project Run"));
result_dialog_log = memnew(RichTextLabel);
@@ -182,6 +171,4 @@ EditorRunNative::EditorRunNative() {
result_dialog->hide();
set_process(true);
- resume_idx = 0;
- resume_platform = 0;
}
diff --git a/editor/editor_run_native.h b/editor/editor_run_native.h
index a87e27de97..2a5431e54b 100644
--- a/editor/editor_run_native.h
+++ b/editor/editor_run_native.h
@@ -42,18 +42,17 @@ class EditorRunNative : public HBoxContainer {
RichTextLabel *result_dialog_log = nullptr;
AcceptDialog *result_dialog = nullptr;
- HashMap<int, MenuButton *> menus;
+ MenuButton *remote_debug = nullptr;
bool first = true;
- int resume_idx;
- int resume_platform;
+ int resume_id = -1;
protected:
static void _bind_methods();
void _notification(int p_what);
public:
- Error run_native(int p_idx, int p_platform);
+ Error run_native(int p_id);
bool is_deploy_debug_remote_enabled() const;
void resume_run_native();
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 8ca98e6f76..1c988840ac 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -453,6 +453,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Theme
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "interface/theme/preset", "Default", "Default,Breeze Dark,Godot 2,Gray,Light,Solarized (Dark),Solarized (Light),Black (OLED),Custom")
+ EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/theme/enable_touchscreen_touch_area", DisplayServer::get_singleton()->is_touchscreen_available(), "")
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/theme/icon_and_font_color", 0, "Auto,Dark,Light")
EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/base_color", Color(0.2, 0.23, 0.31), "")
EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/accent_color", Color(0.41, 0.61, 0.91), "")
@@ -473,6 +474,12 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
/* Filesystem */
+ // External Programs
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "filesystem/external_programs/raster_image_editor", "", "")
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "filesystem/external_programs/vector_image_editor", "", "")
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "filesystem/external_programs/audio_editor", "", "")
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "filesystem/external_programs/3d_model_editor", "", "")
+
// Directories
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_DIR, "filesystem/directories/autoscan_project_path", "", "")
const String fs_dir_default_project_path = OS::get_singleton()->has_environment("HOME") ? OS::get_singleton()->get_environment("HOME") : OS::get_singleton()->get_system_dir(OS::SYSTEM_DIR_DOCUMENTS);
diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp
index 5985af21cd..ad614b1769 100644
--- a/editor/editor_settings_dialog.cpp
+++ b/editor/editor_settings_dialog.cpp
@@ -132,7 +132,7 @@ void EditorSettingsDialog::_notification(int p_what) {
} break;
case NOTIFICATION_READY: {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->get_or_create_history(EditorUndoRedoManager::GLOBAL_HISTORY).undo_redo->set_method_notify_callback(EditorDebuggerNode::_method_changeds, nullptr);
undo_redo->get_or_create_history(EditorUndoRedoManager::GLOBAL_HISTORY).undo_redo->set_property_notify_callback(EditorDebuggerNode::_property_changeds, nullptr);
undo_redo->get_or_create_history(EditorUndoRedoManager::GLOBAL_HISTORY).undo_redo->set_commit_notify_callback(_undo_redo_callback, this);
@@ -161,7 +161,7 @@ void EditorSettingsDialog::_notification(int p_what) {
void EditorSettingsDialog::shortcut_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
const Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed()) {
@@ -232,7 +232,7 @@ void EditorSettingsDialog::_event_config_confirmed() {
void EditorSettingsDialog::_update_builtin_action(const String &p_name, const Array &p_events) {
Array old_input_array = EditorSettings::get_singleton()->get_builtin_action_overrides(p_name);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Edit Built-in Action") + " '" + p_name + "'");
undo_redo->add_do_method(EditorSettings::get_singleton(), "mark_setting_changed", "builtin_action_overrides");
undo_redo->add_undo_method(EditorSettings::get_singleton(), "mark_setting_changed", "builtin_action_overrides");
@@ -248,7 +248,7 @@ void EditorSettingsDialog::_update_builtin_action(const String &p_name, const Ar
void EditorSettingsDialog::_update_shortcut_events(const String &p_path, const Array &p_events) {
Ref<Shortcut> current_sc = EditorSettings::get_singleton()->get_shortcut(p_path);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Edit Shortcut") + " '" + p_path + "'");
undo_redo->add_do_method(current_sc.ptr(), "set_events", p_events);
undo_redo->add_undo_method(current_sc.ptr(), "set_events", current_sc->get_events());
@@ -694,10 +694,6 @@ void EditorSettingsDialog::_editor_restart_close() {
void EditorSettingsDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_shortcuts"), &EditorSettingsDialog::_update_shortcuts);
ClassDB::bind_method(D_METHOD("_settings_changed"), &EditorSettingsDialog::_settings_changed);
-
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &EditorSettingsDialog::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &EditorSettingsDialog::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &EditorSettingsDialog::drop_data_fw);
}
EditorSettingsDialog::EditorSettingsDialog() {
@@ -793,7 +789,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
shortcuts->connect("item_activated", callable_mp(this, &EditorSettingsDialog::_shortcut_cell_double_clicked));
tab_shortcuts->add_child(shortcuts);
- shortcuts->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(shortcuts, EditorSettingsDialog);
// Adding event dialog
shortcut_editor = memnew(InputEventConfigurationDialog);
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index ea03b1c744..54e14074d9 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -253,6 +253,12 @@ void EditorSpinSlider::_value_input_gui_input(const Ref<InputEvent> &p_event) {
value_input_dirty = true;
set_process_internal(true);
} break;
+ case Key::ESCAPE: {
+ value_input_closed_frame = Engine::get_singleton()->get_frames_drawn();
+ if (value_input_popup) {
+ value_input_popup->hide();
+ }
+ } break;
default:
break;
}
@@ -272,11 +278,11 @@ void EditorSpinSlider::_update_value_input_stylebox() {
// higher margin to match the location where the text begins.
// The margin values below were determined by empirical testing.
if (is_layout_rtl()) {
- stylebox->set_default_margin(SIDE_LEFT, 0);
- stylebox->set_default_margin(SIDE_RIGHT, (!get_label().is_empty() ? 23 : 16) * EDSCALE);
+ stylebox->set_content_margin(SIDE_LEFT, 0);
+ stylebox->set_content_margin(SIDE_RIGHT, (!get_label().is_empty() ? 23 : 16) * EDSCALE);
} else {
- stylebox->set_default_margin(SIDE_LEFT, (!get_label().is_empty() ? 23 : 16) * EDSCALE);
- stylebox->set_default_margin(SIDE_RIGHT, 0);
+ stylebox->set_content_margin(SIDE_LEFT, (!get_label().is_empty() ? 23 : 16) * EDSCALE);
+ stylebox->set_content_margin(SIDE_RIGHT, 0);
}
value_input->add_theme_style_override("normal", stylebox);
@@ -479,10 +485,10 @@ void EditorSpinSlider::_notification(int p_what) {
} break;
case NOTIFICATION_FOCUS_ENTER: {
- if ((Input::get_singleton()->is_action_pressed("ui_focus_next") || Input::get_singleton()->is_action_pressed("ui_focus_prev")) && !value_input_just_closed) {
+ if ((Input::get_singleton()->is_action_pressed("ui_focus_next") || Input::get_singleton()->is_action_pressed("ui_focus_prev")) && value_input_closed_frame != Engine::get_singleton()->get_frames_drawn()) {
_focus_entered();
}
- value_input_just_closed = false;
+ value_input_closed_frame = 0;
} break;
}
}
@@ -553,7 +559,7 @@ void EditorSpinSlider::_evaluate_input_text() {
//text_submitted signal
void EditorSpinSlider::_value_input_submitted(const String &p_text) {
- value_input_just_closed = true;
+ value_input_closed_frame = Engine::get_singleton()->get_frames_drawn();
if (value_input_popup) {
value_input_popup->hide();
}
@@ -562,7 +568,7 @@ void EditorSpinSlider::_value_input_submitted(const String &p_text) {
//modal_closed signal
void EditorSpinSlider::_value_input_closed() {
_evaluate_input_text();
- value_input_just_closed = true;
+ value_input_closed_frame = Engine::get_singleton()->get_frames_drawn();
}
//focus_exited signal
@@ -578,7 +584,7 @@ void EditorSpinSlider::_value_focus_exited() {
// -> TAB was pressed
// -> modal_close was not called
// -> need to close/hide manually
- if (!value_input_just_closed) { //value_input_just_closed should do the same
+ if (value_input_closed_frame != Engine::get_singleton()->get_frames_drawn()) {
if (value_input_popup) {
value_input_popup->hide();
}
@@ -672,6 +678,7 @@ void EditorSpinSlider::_ensure_input_popup() {
add_child(value_input_popup);
value_input = memnew(LineEdit);
+ value_input->set_focus_mode(FOCUS_CLICK);
value_input_popup->add_child(value_input);
value_input->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
value_input_popup->connect("hidden", callable_mp(this, &EditorSpinSlider::_value_input_closed));
diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h
index 99eb953166..a4d810b18b 100644
--- a/editor/editor_spin_slider.h
+++ b/editor/editor_spin_slider.h
@@ -65,7 +65,7 @@ class EditorSpinSlider : public Range {
Control *value_input_popup = nullptr;
LineEdit *value_input = nullptr;
- bool value_input_just_closed = false;
+ uint64_t value_input_closed_frame = 0;
bool value_input_dirty = false;
bool hide_slider = false;
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 96c8aa6fb5..d2c82ad013 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -133,25 +133,26 @@ void EditorColorMap::create() {
add_conversion_color_pair("#0e71fc", "#0350bd"); // New Autotile
add_conversion_color_pair("#c6ced4", "#828f9b"); // New Atlas
- // Visual script
- add_conversion_color_pair("#41ecad", "#25e3a0"); // VisualScript variant
- add_conversion_color_pair("#6f91f0", "#6d8eeb"); // VisualScript bool
- add_conversion_color_pair("#5abbef", "#4fb2e9"); // VisualScript int
- add_conversion_color_pair("#35d4f4", "#27ccf0"); // VisualScript float
- add_conversion_color_pair("#4593ec", "#4690e7"); // VisualScript String
- add_conversion_color_pair("#ac73f1", "#ad76ee"); // VisualScript Vector2
- add_conversion_color_pair("#f1738f", "#ee758e"); // VisualScript Rect2
- add_conversion_color_pair("#de66f0", "#dc6aed"); // VisualScript Vector3
- add_conversion_color_pair("#b9ec41", "#96ce1a"); // VisualScript Transform2D
- add_conversion_color_pair("#f74949", "#f77070"); // VisualScript Plane
- add_conversion_color_pair("#ec418e", "#ec69a3"); // VisualScript Quat
- add_conversion_color_pair("#ee5677", "#ee7991"); // VisualScript AABB
- add_conversion_color_pair("#e1ec41", "#b2bb19"); // VisualScript Basis
- add_conversion_color_pair("#f68f45", "#f49047"); // VisualScript Transform
- add_conversion_color_pair("#417aec", "#6993ec"); // VisualScript NodePath
- add_conversion_color_pair("#41ec80", "#2ce573"); // VisualScript RID
- add_conversion_color_pair("#55f3e3", "#12d5c3"); // VisualScript Object
- add_conversion_color_pair("#54ed9e", "#57e99f"); // VisualScript Dictionary
+ // Variant types
+ add_conversion_color_pair("#41ecad", "#25e3a0"); // Variant
+ add_conversion_color_pair("#6f91f0", "#6d8eeb"); // bool
+ add_conversion_color_pair("#5abbef", "#4fb2e9"); // int
+ add_conversion_color_pair("#35d4f4", "#27ccf0"); // float
+ add_conversion_color_pair("#4593ec", "#4690e7"); // String
+ add_conversion_color_pair("#ac73f1", "#ad76ee"); // Vector2
+ add_conversion_color_pair("#f1738f", "#ee758e"); // Rect2
+ add_conversion_color_pair("#de66f0", "#dc6aed"); // Vector3
+ add_conversion_color_pair("#b9ec41", "#96ce1a"); // Transform2D
+ add_conversion_color_pair("#f74949", "#f77070"); // Plane
+ add_conversion_color_pair("#ec418e", "#ec69a3"); // Quaternion
+ add_conversion_color_pair("#ee5677", "#ee7991"); // AABB
+ add_conversion_color_pair("#e1ec41", "#b2bb19"); // Basis
+ add_conversion_color_pair("#f68f45", "#f49047"); // Transform3D
+ add_conversion_color_pair("#417aec", "#6993ec"); // NodePath
+ add_conversion_color_pair("#41ec80", "#2ce573"); // RID
+ add_conversion_color_pair("#55f3e3", "#12d5c3"); // Object
+ add_conversion_color_pair("#54ed9e", "#57e99f"); // Dictionary
+
// Visual shaders
add_conversion_color_pair("#77ce57", "#67c046"); // Vector funcs
add_conversion_color_pair("#ea686c", "#d95256"); // Vector transforms
@@ -196,15 +197,15 @@ void EditorColorMap::create() {
static Ref<StyleBoxTexture> make_stylebox(Ref<Texture2D> p_texture, float p_left, float p_top, float p_right, float p_bottom, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1, bool p_draw_center = true) {
Ref<StyleBoxTexture> style(memnew(StyleBoxTexture));
style->set_texture(p_texture);
- style->set_margin_size_individual(p_left * EDSCALE, p_top * EDSCALE, p_right * EDSCALE, p_bottom * EDSCALE);
- style->set_default_margin_individual(p_margin_left * EDSCALE, p_margin_top * EDSCALE, p_margin_right * EDSCALE, p_margin_bottom * EDSCALE);
+ style->set_texture_margin_individual(p_left * EDSCALE, p_top * EDSCALE, p_right * EDSCALE, p_bottom * EDSCALE);
+ style->set_content_margin_individual((p_left + p_margin_left) * EDSCALE, (p_top + p_margin_top) * EDSCALE, (p_right + p_margin_right) * EDSCALE, (p_bottom + p_margin_bottom) * EDSCALE);
style->set_draw_center(p_draw_center);
return style;
}
static Ref<StyleBoxEmpty> make_empty_stylebox(float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1) {
Ref<StyleBoxEmpty> style(memnew(StyleBoxEmpty));
- style->set_default_margin_individual(p_margin_left * EDSCALE, p_margin_top * EDSCALE, p_margin_right * EDSCALE, p_margin_bottom * EDSCALE);
+ style->set_content_margin_individual(p_margin_left * EDSCALE, p_margin_top * EDSCALE, p_margin_right * EDSCALE, p_margin_bottom * EDSCALE);
return style;
}
@@ -214,7 +215,7 @@ static Ref<StyleBoxFlat> make_flat_stylebox(Color p_color, float p_margin_left =
// Adjust level of detail based on the corners' effective sizes.
style->set_corner_detail(Math::ceil(0.8 * p_corner_width * EDSCALE));
style->set_corner_radius_all(p_corner_width * EDSCALE);
- style->set_default_margin_individual(p_margin_left * EDSCALE, p_margin_top * EDSCALE, p_margin_right * EDSCALE, p_margin_bottom * EDSCALE);
+ style->set_content_margin_individual(p_margin_left * EDSCALE, p_margin_top * EDSCALE, p_margin_right * EDSCALE, p_margin_bottom * EDSCALE);
// Work around issue about antialiased edges being blurrier (GH-35279).
style->set_anti_aliased(false);
return style;
@@ -393,6 +394,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Color accent_color = EDITOR_GET("interface/theme/accent_color");
Color base_color = EDITOR_GET("interface/theme/base_color");
float contrast = EDITOR_GET("interface/theme/contrast");
+ bool enable_touchscreen_touch_area = EDITOR_GET("interface/theme/enable_touchscreen_touch_area");
bool draw_extra_borders = EDITOR_GET("interface/theme/draw_extra_borders");
float icon_saturation = EDITOR_GET("interface/theme/icon_saturation");
float relationship_line_opacity = EDITOR_GET("interface/theme/relationship_line_opacity");
@@ -647,7 +649,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Vector2 widget_default_margin = Vector2(extra_spacing + 6, extra_spacing + default_margin_size + 1) * EDSCALE;
Ref<StyleBoxFlat> style_widget = style_default->duplicate();
- style_widget->set_default_margin_individual(widget_default_margin.x, widget_default_margin.y, widget_default_margin.x, widget_default_margin.y);
+ style_widget->set_content_margin_individual(widget_default_margin.x, widget_default_margin.y, widget_default_margin.x, widget_default_margin.y);
style_widget->set_bg_color(dark_color_1);
if (draw_extra_borders) {
style_widget->set_border_width_all(Math::round(EDSCALE));
@@ -683,7 +685,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Style for windows, popups, etc..
Ref<StyleBoxFlat> style_popup = style_default->duplicate();
const int popup_margin_size = default_margin_size * EDSCALE * 3;
- style_popup->set_default_margin_all(popup_margin_size);
+ style_popup->set_content_margin_all(popup_margin_size);
style_popup->set_border_color(contrast_color_1);
const Color shadow_color = Color(0, 0, 0, dark_theme ? 0.3 : 0.1);
style_popup->set_shadow_color(shadow_color);
@@ -721,12 +723,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_tab_base->set_corner_radius(CORNER_BOTTOM_RIGHT, 0);
// When using a border width greater than 0, visually line up the left of the selected tab with the underlying panel.
- style_tab_base->set_expand_margin_size(SIDE_LEFT, -border_width);
+ style_tab_base->set_expand_margin(SIDE_LEFT, -border_width);
- style_tab_base->set_default_margin(SIDE_LEFT, widget_default_margin.x + 5 * EDSCALE);
- style_tab_base->set_default_margin(SIDE_RIGHT, widget_default_margin.x + 5 * EDSCALE);
- style_tab_base->set_default_margin(SIDE_BOTTOM, widget_default_margin.y);
- style_tab_base->set_default_margin(SIDE_TOP, widget_default_margin.y);
+ style_tab_base->set_content_margin(SIDE_LEFT, widget_default_margin.x + 5 * EDSCALE);
+ style_tab_base->set_content_margin(SIDE_RIGHT, widget_default_margin.x + 5 * EDSCALE);
+ style_tab_base->set_content_margin(SIDE_BOTTOM, widget_default_margin.y);
+ style_tab_base->set_content_margin(SIDE_TOP, widget_default_margin.y);
Ref<StyleBoxFlat> style_tab_selected = style_tab_base->duplicate();
@@ -739,19 +741,20 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_tab_selected->set_corner_radius_all(0);
Ref<StyleBoxFlat> style_tab_unselected = style_tab_base->duplicate();
- style_tab_unselected->set_expand_margin_size(SIDE_BOTTOM, 0);
+ style_tab_unselected->set_expand_margin(SIDE_BOTTOM, 0);
style_tab_unselected->set_bg_color(dark_color_1);
// Add some spacing between unselected tabs to make them easier to distinguish from each other
style_tab_unselected->set_border_color(Color(0, 0, 0, 0));
Ref<StyleBoxFlat> style_tab_disabled = style_tab_base->duplicate();
- style_tab_disabled->set_expand_margin_size(SIDE_BOTTOM, 0);
+ style_tab_disabled->set_expand_margin(SIDE_BOTTOM, 0);
style_tab_disabled->set_bg_color(disabled_bg_color);
style_tab_disabled->set_border_color(disabled_bg_color);
// Editor background
Color background_color_opaque = background_color;
background_color_opaque.a = 1.0;
+ theme->set_color("background", "Editor", background_color_opaque);
theme->set_stylebox("Background", "EditorStyles", make_flat_stylebox(background_color_opaque, default_margin_size, default_margin_size, default_margin_size, default_margin_size));
// Focus
@@ -770,7 +773,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// CanvasItem Editor
Ref<StyleBoxFlat> style_canvas_editor_info = make_flat_stylebox(Color(0.0, 0.0, 0.0, 0.2));
- style_canvas_editor_info->set_expand_margin_size_all(4 * EDSCALE);
+ style_canvas_editor_info->set_expand_margin_all(4 * EDSCALE);
theme->set_stylebox("CanvasItemInfoOverlay", "EditorStyles", style_canvas_editor_info);
// 2D and 3D contextual toolbar.
@@ -785,7 +788,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Add an underline to the StyleBox, but prevent its minimum vertical size from changing.
toolbar_stylebox->set_border_color(accent_color);
toolbar_stylebox->set_border_width(SIDE_BOTTOM, Math::round(2 * EDSCALE));
- toolbar_stylebox->set_default_margin(SIDE_BOTTOM, 0);
+ toolbar_stylebox->set_content_margin(SIDE_BOTTOM, 0);
theme->set_stylebox("ContextualToolbar", "EditorStyles", toolbar_stylebox);
// Script Editor
@@ -806,11 +809,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<StyleBoxFlat> style_write_movie_button = style_widget_pressed->duplicate();
style_write_movie_button->set_bg_color(accent_color);
style_write_movie_button->set_corner_radius_all(corner_radius * EDSCALE);
- style_write_movie_button->set_default_margin(SIDE_TOP, 0);
- style_write_movie_button->set_default_margin(SIDE_BOTTOM, 0);
- style_write_movie_button->set_default_margin(SIDE_LEFT, 0);
- style_write_movie_button->set_default_margin(SIDE_RIGHT, 0);
- style_write_movie_button->set_expand_margin_size(SIDE_RIGHT, 2 * EDSCALE);
+ style_write_movie_button->set_content_margin(SIDE_TOP, 0);
+ style_write_movie_button->set_content_margin(SIDE_BOTTOM, 0);
+ style_write_movie_button->set_content_margin(SIDE_LEFT, 0);
+ style_write_movie_button->set_content_margin(SIDE_RIGHT, 0);
+ style_write_movie_button->set_expand_margin(SIDE_RIGHT, 2 * EDSCALE);
theme->set_stylebox("MovieWriterButtonPressed", "EditorStyles", style_write_movie_button);
theme->set_stylebox("normal", "MenuButton", style_menu);
@@ -853,16 +856,16 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
color_inspector_action.a = 0.5;
Ref<StyleBoxFlat> style_inspector_action = style_widget->duplicate();
style_inspector_action->set_bg_color(color_inspector_action);
- style_inspector_action->set_default_margin(SIDE_RIGHT, ACTION_BUTTON_EXTRA_MARGIN);
+ style_inspector_action->set_content_margin(SIDE_RIGHT, ACTION_BUTTON_EXTRA_MARGIN);
theme->set_stylebox("normal", "InspectorActionButton", style_inspector_action);
style_inspector_action = style_widget_hover->duplicate();
- style_inspector_action->set_default_margin(SIDE_RIGHT, ACTION_BUTTON_EXTRA_MARGIN);
+ style_inspector_action->set_content_margin(SIDE_RIGHT, ACTION_BUTTON_EXTRA_MARGIN);
theme->set_stylebox("hover", "InspectorActionButton", style_inspector_action);
style_inspector_action = style_widget_pressed->duplicate();
- style_inspector_action->set_default_margin(SIDE_RIGHT, ACTION_BUTTON_EXTRA_MARGIN);
+ style_inspector_action->set_content_margin(SIDE_RIGHT, ACTION_BUTTON_EXTRA_MARGIN);
theme->set_stylebox("pressed", "InspectorActionButton", style_inspector_action);
style_inspector_action = style_widget_disabled->duplicate();
- style_inspector_action->set_default_margin(SIDE_RIGHT, ACTION_BUTTON_EXTRA_MARGIN);
+ style_inspector_action->set_content_margin(SIDE_RIGHT, ACTION_BUTTON_EXTRA_MARGIN);
theme->set_stylebox("disabled", "InspectorActionButton", style_inspector_action);
theme->set_constant("h_separation", "InspectorActionButton", ACTION_BUTTON_EXTRA_MARGIN);
@@ -906,11 +909,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<StyleBoxFlat> style_option_button_pressed = style_widget_pressed->duplicate();
Ref<StyleBoxFlat> style_option_button_disabled = style_widget_disabled->duplicate();
- style_option_button_focus->set_default_margin(SIDE_RIGHT, 4 * EDSCALE);
- style_option_button_normal->set_default_margin(SIDE_RIGHT, 4 * EDSCALE);
- style_option_button_hover->set_default_margin(SIDE_RIGHT, 4 * EDSCALE);
- style_option_button_pressed->set_default_margin(SIDE_RIGHT, 4 * EDSCALE);
- style_option_button_disabled->set_default_margin(SIDE_RIGHT, 4 * EDSCALE);
+ style_option_button_focus->set_content_margin(SIDE_RIGHT, 4 * EDSCALE);
+ style_option_button_normal->set_content_margin(SIDE_RIGHT, 4 * EDSCALE);
+ style_option_button_hover->set_content_margin(SIDE_RIGHT, 4 * EDSCALE);
+ style_option_button_pressed->set_content_margin(SIDE_RIGHT, 4 * EDSCALE);
+ style_option_button_disabled->set_content_margin(SIDE_RIGHT, 4 * EDSCALE);
theme->set_stylebox("focus", "OptionButton", style_option_button_focus);
theme->set_stylebox("normal", "OptionButton", style_widget);
@@ -976,7 +979,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Checkbox
Ref<StyleBoxFlat> sb_checkbox = style_menu->duplicate();
- sb_checkbox->set_default_margin_all(default_margin_size * EDSCALE);
+ sb_checkbox->set_content_margin_all(default_margin_size * EDSCALE);
theme->set_stylebox("normal", "CheckBox", sb_checkbox);
theme->set_stylebox("pressed", "CheckBox", sb_checkbox);
@@ -1016,7 +1019,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Use 1 pixel for the sides, since if 0 is used, the highlight of hovered items is drawn
// on top of the popup border. This causes a 'gap' in the panel border when an item is highlighted,
// and it looks weird. 1px solves this.
- style_popup_menu->set_default_margin_individual(EDSCALE, 2 * EDSCALE, EDSCALE, 2 * EDSCALE);
+ style_popup_menu->set_content_margin_individual(EDSCALE, 2 * EDSCALE, EDSCALE, 2 * EDSCALE);
// Always display a border for PopupMenus so they can be distinguished from their background.
style_popup_menu->set_border_width_all(EDSCALE);
if (draw_extra_borders) {
@@ -1076,7 +1079,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
sub_inspector_bg->set_bg_color(dark_color_1.lerp(si_base_color, 0.08));
sub_inspector_bg->set_border_width_all(2 * EDSCALE);
sub_inspector_bg->set_border_color(si_base_color * Color(0.7, 0.7, 0.7, 0.8));
- sub_inspector_bg->set_default_margin_all(4 * EDSCALE);
+ sub_inspector_bg->set_content_margin_all(4 * EDSCALE);
sub_inspector_bg->set_corner_radius(CORNER_TOP_LEFT, 0);
sub_inspector_bg->set_corner_radius(CORNER_TOP_RIGHT, 0);
@@ -1316,7 +1319,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_content_panel->set_corner_radius(CORNER_TOP_LEFT, 0);
style_content_panel->set_corner_radius(CORNER_TOP_RIGHT, 0);
// Compensate for the border.
- style_content_panel->set_default_margin_individual(margin_size_extra * EDSCALE, (2 + margin_size_extra) * EDSCALE, margin_size_extra * EDSCALE, margin_size_extra * EDSCALE);
+ style_content_panel->set_content_margin_individual(margin_size_extra * EDSCALE, (2 + margin_size_extra) * EDSCALE, margin_size_extra * EDSCALE, margin_size_extra * EDSCALE);
theme->set_stylebox("panel", "TabContainer", style_content_panel);
// Bottom panel.
@@ -1337,15 +1340,15 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// This stylebox is used in 3d and 2d viewports (no borders).
Ref<StyleBoxFlat> style_content_panel_vp = style_content_panel->duplicate();
- style_content_panel_vp->set_default_margin_individual(border_width * 2, default_margin_size * EDSCALE, border_width * 2, border_width * 2);
+ style_content_panel_vp->set_content_margin_individual(border_width * 2, default_margin_size * EDSCALE, border_width * 2, border_width * 2);
theme->set_stylebox("Content", "EditorStyles", style_content_panel_vp);
// This stylebox is used by preview tabs in the Theme Editor.
Ref<StyleBoxFlat> style_theme_preview_tab = style_tab_selected_odd->duplicate();
- style_theme_preview_tab->set_expand_margin_size(SIDE_BOTTOM, 5 * EDSCALE);
+ style_theme_preview_tab->set_expand_margin(SIDE_BOTTOM, 5 * EDSCALE);
theme->set_stylebox("ThemeEditorPreviewFG", "EditorStyles", style_theme_preview_tab);
Ref<StyleBoxFlat> style_theme_preview_bg_tab = style_tab_unselected->duplicate();
- style_theme_preview_bg_tab->set_expand_margin_size(SIDE_BOTTOM, 2 * EDSCALE);
+ style_theme_preview_bg_tab->set_expand_margin(SIDE_BOTTOM, 2 * EDSCALE);
theme->set_stylebox("ThemeEditorPreviewBG", "EditorStyles", style_theme_preview_bg_tab);
// Separators
@@ -1359,9 +1362,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("DebuggerPanel", "EditorStyles", style_panel_debugger);
Ref<StyleBoxFlat> style_panel_invisible_top = style_content_panel->duplicate();
- int stylebox_offset = theme->get_font(SNAME("tab_selected"), SNAME("TabContainer"))->get_height(theme->get_font_size(SNAME("tab_selected"), SNAME("TabContainer"))) + theme->get_stylebox(SNAME("tab_selected"), SNAME("TabContainer"))->get_minimum_size().height + theme->get_stylebox(SNAME("panel"), SNAME("TabContainer"))->get_default_margin(SIDE_TOP);
- style_panel_invisible_top->set_expand_margin_size(SIDE_TOP, -stylebox_offset);
- style_panel_invisible_top->set_default_margin(SIDE_TOP, 0);
+ int stylebox_offset = theme->get_font(SNAME("tab_selected"), SNAME("TabContainer"))->get_height(theme->get_font_size(SNAME("tab_selected"), SNAME("TabContainer"))) + theme->get_stylebox(SNAME("tab_selected"), SNAME("TabContainer"))->get_minimum_size().height + theme->get_stylebox(SNAME("panel"), SNAME("TabContainer"))->get_content_margin(SIDE_TOP);
+ style_panel_invisible_top->set_expand_margin(SIDE_TOP, -stylebox_offset);
+ style_panel_invisible_top->set_content_margin(SIDE_TOP, 0);
theme->set_stylebox("BottomPanelDebuggerOverride", "EditorStyles", style_panel_invisible_top);
// LineEdit
@@ -1369,7 +1372,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<StyleBoxFlat> style_line_edit = style_widget->duplicate();
// The original style_widget style has an extra 1 pixel offset that makes LineEdits not align with Buttons,
// so this compensates for that.
- style_line_edit->set_default_margin(SIDE_TOP, style_line_edit->get_default_margin(SIDE_TOP) - 1 * EDSCALE);
+ style_line_edit->set_content_margin(SIDE_TOP, style_line_edit->get_content_margin(SIDE_TOP) - 1 * EDSCALE);
// Don't round the bottom corner to make the line look sharper.
style_tab_selected->set_corner_radius(CORNER_BOTTOM_LEFT, 0);
@@ -1457,12 +1460,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_window_title->set_corner_radius(CORNER_TOP_LEFT, 0);
style_window_title->set_corner_radius(CORNER_TOP_RIGHT, 0);
// Prevent visible line between window title and body.
- style_window_title->set_expand_margin_size(SIDE_BOTTOM, 2 * EDSCALE);
+ style_window_title->set_expand_margin(SIDE_BOTTOM, 2 * EDSCALE);
Ref<StyleBoxFlat> style_window = style_popup->duplicate();
style_window->set_border_color(base_color);
style_window->set_border_width(SIDE_TOP, 24 * EDSCALE);
- style_window->set_expand_margin_size(SIDE_TOP, 24 * EDSCALE);
+ style_window->set_expand_margin(SIDE_TOP, 24 * EDSCALE);
theme->set_stylebox("embedded_border", "Window", style_window);
theme->set_color("title_color", "Window", font_color);
@@ -1490,11 +1493,15 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// HScrollBar
Ref<Texture2D> empty_icon = memnew(ImageTexture);
- theme->set_stylebox("scroll", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), SNAME("EditorIcons")), 5, 5, 5, 5, 0, 0, 0, 0));
- theme->set_stylebox("scroll_focus", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), SNAME("EditorIcons")), 5, 5, 5, 5, 0, 0, 0, 0));
- theme->set_stylebox("grabber", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabber"), SNAME("EditorIcons")), 6, 6, 6, 6, 2, 2, 2, 2));
- theme->set_stylebox("grabber_highlight", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabberHl"), SNAME("EditorIcons")), 5, 5, 5, 5, 2, 2, 2, 2));
- theme->set_stylebox("grabber_pressed", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabberPressed"), SNAME("EditorIcons")), 6, 6, 6, 6, 2, 2, 2, 2));
+ if (enable_touchscreen_touch_area) {
+ theme->set_stylebox("scroll", "HScrollBar", make_line_stylebox(separator_color, 50));
+ } else {
+ theme->set_stylebox("scroll", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), SNAME("EditorIcons")), 5, 5, 5, 5, 1, 1, 1, 1));
+ }
+ theme->set_stylebox("scroll_focus", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), SNAME("EditorIcons")), 5, 5, 5, 5, 1, 1, 1, 1));
+ theme->set_stylebox("grabber", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabber"), SNAME("EditorIcons")), 6, 6, 6, 6, 1, 1, 1, 1));
+ theme->set_stylebox("grabber_highlight", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabberHl"), SNAME("EditorIcons")), 5, 5, 5, 5, 1, 1, 1, 1));
+ theme->set_stylebox("grabber_pressed", "HScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabberPressed"), SNAME("EditorIcons")), 6, 6, 6, 6, 1, 1, 1, 1));
theme->set_icon("increment", "HScrollBar", empty_icon);
theme->set_icon("increment_highlight", "HScrollBar", empty_icon);
@@ -1504,11 +1511,15 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("decrement_pressed", "HScrollBar", empty_icon);
// VScrollBar
- theme->set_stylebox("scroll", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), SNAME("EditorIcons")), 5, 5, 5, 5, 0, 0, 0, 0));
- theme->set_stylebox("scroll_focus", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), SNAME("EditorIcons")), 5, 5, 5, 5, 0, 0, 0, 0));
- theme->set_stylebox("grabber", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabber"), SNAME("EditorIcons")), 6, 6, 6, 6, 2, 2, 2, 2));
- theme->set_stylebox("grabber_highlight", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabberHl"), SNAME("EditorIcons")), 5, 5, 5, 5, 2, 2, 2, 2));
- theme->set_stylebox("grabber_pressed", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabberPressed"), SNAME("EditorIcons")), 6, 6, 6, 6, 2, 2, 2, 2));
+ if (enable_touchscreen_touch_area) {
+ theme->set_stylebox("scroll", "VScrollBar", make_line_stylebox(separator_color, 50, 1, 1, true));
+ } else {
+ theme->set_stylebox("scroll", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), SNAME("EditorIcons")), 5, 5, 5, 5, 1, 1, 1, 1));
+ }
+ theme->set_stylebox("scroll_focus", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollBg"), SNAME("EditorIcons")), 5, 5, 5, 5, 1, 1, 1, 1));
+ theme->set_stylebox("grabber", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabber"), SNAME("EditorIcons")), 6, 6, 6, 6, 1, 1, 1, 1));
+ theme->set_stylebox("grabber_highlight", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabberHl"), SNAME("EditorIcons")), 5, 5, 5, 5, 1, 1, 1, 1));
+ theme->set_stylebox("grabber_pressed", "VScrollBar", make_stylebox(theme->get_icon(SNAME("GuiScrollGrabberPressed"), SNAME("EditorIcons")), 6, 6, 6, 6, 1, 1, 1, 1));
theme->set_icon("increment", "VScrollBar", empty_icon);
theme->set_icon("increment_highlight", "VScrollBar", empty_icon);
@@ -1596,7 +1607,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// is only relevant for default tooltips.
Ref<StyleBoxFlat> style_tooltip = style_popup->duplicate();
style_tooltip->set_shadow_size(0);
- style_tooltip->set_default_margin_all(default_margin_size * EDSCALE * 0.5);
+ style_tooltip->set_content_margin_all(default_margin_size * EDSCALE * 0.5);
style_tooltip->set_bg_color(dark_color_3 * Color(0.8, 0.8, 0.8, 0.9));
style_tooltip->set_border_width_all(0);
theme->set_color("font_color", "TooltipLabel", font_hover_color);
@@ -1608,10 +1619,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<StyleBoxFlat> control_editor_popup_style = style_popup->duplicate();
control_editor_popup_style->set_shadow_size(0);
- control_editor_popup_style->set_default_margin(SIDE_LEFT, default_margin_size * EDSCALE);
- control_editor_popup_style->set_default_margin(SIDE_TOP, default_margin_size * EDSCALE);
- control_editor_popup_style->set_default_margin(SIDE_RIGHT, default_margin_size * EDSCALE);
- control_editor_popup_style->set_default_margin(SIDE_BOTTOM, default_margin_size * EDSCALE);
+ control_editor_popup_style->set_content_margin(SIDE_LEFT, default_margin_size * EDSCALE);
+ control_editor_popup_style->set_content_margin(SIDE_TOP, default_margin_size * EDSCALE);
+ control_editor_popup_style->set_content_margin(SIDE_RIGHT, default_margin_size * EDSCALE);
+ control_editor_popup_style->set_content_margin(SIDE_BOTTOM, default_margin_size * EDSCALE);
control_editor_popup_style->set_border_width_all(0);
theme->set_stylebox("panel", "ControlEditorPopupPanel", control_editor_popup_style);
@@ -1824,8 +1835,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Dictionary editor add item.
// Expand to the left and right by 4px to compensate for the dictionary editor margins.
Ref<StyleBoxFlat> style_dictionary_add_item = make_flat_stylebox(prop_subsection_color, 0, 4, 0, 4, corner_radius);
- style_dictionary_add_item->set_expand_margin_size(SIDE_LEFT, 4 * EDSCALE);
- style_dictionary_add_item->set_expand_margin_size(SIDE_RIGHT, 4 * EDSCALE);
+ style_dictionary_add_item->set_expand_margin(SIDE_LEFT, 4 * EDSCALE);
+ style_dictionary_add_item->set_expand_margin(SIDE_RIGHT, 4 * EDSCALE);
theme->set_stylebox("DictionaryAddItem", "EditorStyles", style_dictionary_add_item);
Ref<StyleBoxEmpty> vshader_label_style = make_empty_stylebox(2, 1, 2, 1);
diff --git a/editor/editor_title_bar.cpp b/editor/editor_title_bar.cpp
index d756606029..ae5cdfd72b 100644
--- a/editor/editor_title_bar.cpp
+++ b/editor/editor_title_bar.cpp
@@ -30,14 +30,14 @@
#include "editor/editor_title_bar.h"
-void EditorTitleBar::input(const Ref<InputEvent> &p_event) {
+void EditorTitleBar::gui_input(const Ref<InputEvent> &p_event) {
if (!can_move) {
return;
}
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid() && moving) {
- if ((mm->get_button_mask() & MouseButton::LEFT) == MouseButton::LEFT) {
+ if (mm->get_button_mask().has_flag(MouseButtonMask::LEFT)) {
Window *w = Object::cast_to<Window>(get_viewport());
if (w) {
Point2 mouse = DisplayServer::get_singleton()->mouse_get_position();
diff --git a/editor/editor_title_bar.h b/editor/editor_title_bar.h
index 6cac163830..4055476b82 100644
--- a/editor/editor_title_bar.h
+++ b/editor/editor_title_bar.h
@@ -42,7 +42,7 @@ class EditorTitleBar : public HBoxContainer {
bool can_move = false;
protected:
- virtual void input(const Ref<InputEvent> &p_event) override;
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
static void _bind_methods(){};
public:
diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp
index dd5d68a08e..73b645f351 100644
--- a/editor/editor_toaster.cpp
+++ b/editor/editor_toaster.cpp
@@ -90,11 +90,12 @@ void EditorToaster::_notification(int p_what) {
}
// Hide element if it is not visible anymore.
- if (modulate_fade.a <= 0) {
- if (element.key->is_visible()) {
- element.key->hide();
- needs_update = true;
- }
+ if (modulate_fade.a <= 0 && element.key->is_visible()) {
+ element.key->hide();
+ needs_update = true;
+ } else if (modulate_fade.a >= 0 && !element.key->is_visible()) {
+ element.key->show();
+ needs_update = true;
}
}
@@ -229,10 +230,10 @@ void EditorToaster::_auto_hide_or_free_toasts() {
}
// Delete the control right away (removed as child) as it might cause issues otherwise when iterative over the vbox_container children.
- for (unsigned int i = 0; i < to_delete.size(); i++) {
- vbox_container->remove_child(to_delete[i]);
- to_delete[i]->queue_free();
- toasts.erase(to_delete[i]);
+ for (Control *c : to_delete) {
+ vbox_container->remove_child(c);
+ c->queue_free();
+ toasts.erase(c);
}
if (toasts.is_empty()) {
@@ -419,12 +420,21 @@ void EditorToaster::_popup_str(String p_message, Severity p_severity, String p_t
// Create a new message if needed.
if (control == nullptr) {
+ HBoxContainer *hb = memnew(HBoxContainer);
+ hb->add_theme_constant_override("separation", 0);
+
Label *label = memnew(Label);
+ hb->add_child(label);
- control = popup(label, p_severity, default_message_duration, p_tooltip);
+ Label *count_label = memnew(Label);
+ hb->add_child(count_label);
+
+ control = popup(hb, p_severity, default_message_duration, p_tooltip);
toasts[control].message = p_message;
toasts[control].tooltip = p_tooltip;
toasts[control].count = 1;
+ toasts[control].message_label = label;
+ toasts[control].message_count_label = count_label;
} else {
if (toasts[control].popped) {
toasts[control].count += 1;
@@ -441,14 +451,31 @@ void EditorToaster::_popup_str(String p_message, Severity p_severity, String p_t
main_button->queue_redraw();
}
- // Retrieve the label back then update the text.
- Label *label = Object::cast_to<Label>(control->get_child(0)->get_child(0));
- ERR_FAIL_COND(!label);
+ // Retrieve the label back, then update the text.
+ Label *message_label = toasts[control].message_label;
+ ERR_FAIL_COND(!message_label);
+ message_label->set_text(p_message);
+ message_label->set_text_overrun_behavior(TextServer::OVERRUN_NO_TRIMMING);
+ message_label->set_custom_minimum_size(Size2());
+
+ Size2i size = message_label->get_combined_minimum_size();
+ int limit_width = get_viewport_rect().size.x / 2; // Limit label size to half the viewport size.
+ if (size.x > limit_width) {
+ message_label->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
+ message_label->set_custom_minimum_size(Size2(limit_width, 0));
+ }
+
+ // Retrieve the count label back, then update the text.
+ Label *message_count_label = toasts[control].message_count_label;
if (toasts[control].count == 1) {
- label->set_text(p_message);
+ message_count_label->hide();
} else {
- label->set_text(vformat("%s (%d)", p_message, toasts[control].count));
+ message_count_label->set_text(vformat("(%d)", toasts[control].count));
+ message_count_label->show();
}
+
+ vbox_container->reset_size();
+
is_processing_error = false;
}
@@ -498,7 +525,7 @@ EditorToaster::EditorToaster() {
Ref<StyleBoxFlat> boxes[] = { info_panel_style_background, warning_panel_style_background, error_panel_style_background };
for (int i = 0; i < 3; i++) {
- boxes[i]->set_default_margin_individual(int(stylebox_radius * 2.5), 3, int(stylebox_radius * 2.5), 3);
+ boxes[i]->set_content_margin_individual(int(stylebox_radius * 2.5), 3, int(stylebox_radius * 2.5), 3);
}
// Theming (progress).
diff --git a/editor/editor_toaster.h b/editor/editor_toaster.h
index acd2a8fbf3..6b834f8288 100644
--- a/editor/editor_toaster.h
+++ b/editor/editor_toaster.h
@@ -79,6 +79,8 @@ private:
String message;
String tooltip;
int count = 0;
+ Label *message_label = nullptr;
+ Label *message_count_label = nullptr;
};
HashMap<Control *, Toast> toasts;
diff --git a/editor/editor_undo_redo_manager.cpp b/editor/editor_undo_redo_manager.cpp
index 2ef52bd85a..f65f905b25 100644
--- a/editor/editor_undo_redo_manager.cpp
+++ b/editor/editor_undo_redo_manager.cpp
@@ -39,6 +39,8 @@
#include "editor/editor_node.h"
#include "scene/main/node.h"
+EditorUndoRedoManager *EditorUndoRedoManager::singleton = nullptr;
+
EditorUndoRedoManager::History &EditorUndoRedoManager::get_or_create_history(int p_idx) {
if (!history_map.has(p_idx)) {
History history;
@@ -503,6 +505,16 @@ void EditorUndoRedoManager::_bind_methods() {
BIND_ENUM_CONSTANT(INVALID_HISTORY);
}
+EditorUndoRedoManager *EditorUndoRedoManager::get_singleton() {
+ return singleton;
+}
+
+EditorUndoRedoManager::EditorUndoRedoManager() {
+ if (!singleton) {
+ singleton = this;
+ }
+}
+
EditorUndoRedoManager::~EditorUndoRedoManager() {
for (const KeyValue<int, History> &E : history_map) {
discard_history(E.key, false);
diff --git a/editor/editor_undo_redo_manager.h b/editor/editor_undo_redo_manager.h
index 960d17d410..10daeae807 100644
--- a/editor/editor_undo_redo_manager.h
+++ b/editor/editor_undo_redo_manager.h
@@ -32,11 +32,13 @@
#define EDITOR_UNDO_REDO_MANAGER_H
#include "core/object/class_db.h"
-#include "core/object/ref_counted.h"
+#include "core/object/object.h"
#include "core/object/undo_redo.h"
-class EditorUndoRedoManager : public RefCounted {
- GDCLASS(EditorUndoRedoManager, RefCounted);
+class EditorUndoRedoManager : public Object {
+ GDCLASS(EditorUndoRedoManager, Object);
+
+ static EditorUndoRedoManager *singleton;
public:
enum SpecialHistory {
@@ -132,6 +134,9 @@ public:
int get_current_action_history_id();
void discard_history(int p_idx, bool p_erase_from_map = true);
+
+ static EditorUndoRedoManager *get_singleton();
+ EditorUndoRedoManager();
~EditorUndoRedoManager();
};
diff --git a/editor/editor_zoom_widget.cpp b/editor/editor_zoom_widget.cpp
index 5a334bdaa6..3998b33a53 100644
--- a/editor/editor_zoom_widget.cpp
+++ b/editor/editor_zoom_widget.cpp
@@ -41,12 +41,12 @@ void EditorZoomWidget::_update_zoom_label() {
// lower the editor scale to increase the available real estate,
// even if their display doesn't have a particularly low DPI.
if (zoom >= 10) {
- // Don't show a decimal when the zoom level is higher than 1000 %.
- zoom_text = TS->format_number(rtos(Math::round((zoom / MAX(1, EDSCALE)) * 100))) + " " + TS->percent_sign();
+ zoom_text = TS->format_number(rtos(Math::round((zoom / MAX(1, EDSCALE)) * 100)));
} else {
- zoom_text = TS->format_number(rtos(Math::snapped((zoom / MAX(1, EDSCALE)) * 100, 0.1))) + " " + TS->percent_sign();
+ // 2 decimal places if the zoom is below 10%, 1 decimal place if it's below 1000%.
+ zoom_text = TS->format_number(rtos(Math::snapped((zoom / MAX(1, EDSCALE)) * 100, (zoom >= 0.1) ? 0.1 : 0.01)));
}
-
+ zoom_text += " " + TS->percent_sign();
zoom_reset->set_text(zoom_text);
}
@@ -134,7 +134,7 @@ void EditorZoomWidget::set_zoom_by_increments(int p_increment_count, bool p_inte
float new_zoom_index = closest_zoom_index + p_increment_count;
float new_zoom = Math::pow(2.f, new_zoom_index / 12.f);
- // Restore Editor scale transformation
+ // Restore Editor scale transformation.
new_zoom *= MAX(1, EDSCALE);
set_zoom(new_zoom);
@@ -179,8 +179,12 @@ EditorZoomWidget::EditorZoomWidget() {
zoom_reset = memnew(Button);
zoom_reset->set_flat(true);
+ zoom_reset->add_theme_style_override("normal", memnew(StyleBoxEmpty));
+ zoom_reset->add_theme_style_override("hover", memnew(StyleBoxEmpty));
+ zoom_reset->add_theme_style_override("focus", memnew(StyleBoxEmpty));
+ zoom_reset->add_theme_style_override("pressed", memnew(StyleBoxEmpty));
add_child(zoom_reset);
- zoom_reset->add_theme_constant_override("outline_size", 1);
+ zoom_reset->add_theme_constant_override("outline_size", Math::ceil(2 * EDSCALE));
zoom_reset->add_theme_color_override("font_outline_color", Color(0, 0, 0));
zoom_reset->add_theme_color_override("font_color", Color(1, 1, 1));
zoom_reset->connect("pressed", callable_mp(this, &EditorZoomWidget::_button_zoom_reset));
@@ -189,7 +193,7 @@ EditorZoomWidget::EditorZoomWidget() {
zoom_reset->set_focus_mode(FOCUS_NONE);
zoom_reset->set_text_alignment(HORIZONTAL_ALIGNMENT_CENTER);
// Prevent the button's size from changing when the text size changes
- zoom_reset->set_custom_minimum_size(Size2(75 * EDSCALE, 0));
+ zoom_reset->set_custom_minimum_size(Size2(56 * EDSCALE, 0));
zoom_plus = memnew(Button);
zoom_plus->set_flat(true);
@@ -201,5 +205,5 @@ EditorZoomWidget::EditorZoomWidget() {
_update_zoom_label();
- add_theme_constant_override("separation", Math::round(-8 * EDSCALE));
+ add_theme_constant_override("separation", 0);
}
diff --git a/editor/event_listener_line_edit.cpp b/editor/event_listener_line_edit.cpp
index 3a99c4e264..ea4a7133bf 100644
--- a/editor/event_listener_line_edit.cpp
+++ b/editor/event_listener_line_edit.cpp
@@ -59,16 +59,42 @@ static const char *_joy_axis_descriptions[(size_t)JoyAxis::MAX * 2] = {
String EventListenerLineEdit::get_event_text(const Ref<InputEvent> &p_event, bool p_include_device) {
ERR_FAIL_COND_V_MSG(p_event.is_null(), String(), "Provided event is not a valid instance of InputEvent");
- String text = p_event->as_text();
-
+ String text;
Ref<InputEventKey> key = p_event;
- if (key.is_valid() && key->is_command_or_control_autoremap()) {
+ if (key.is_valid()) {
+ String mods_text = key->InputEventWithModifiers::as_text();
+ mods_text = mods_text.is_empty() ? mods_text : mods_text + "+";
+ if (key->is_command_or_control_autoremap()) {
#ifdef MACOS_ENABLED
- text = text.replace("Command", "Command/Ctrl");
+ mods_text = mods_text.replace("Command", "Command/Ctrl");
#else
- text = text.replace("Ctrl", "Command/Ctrl");
+ mods_text = mods_text.replace("Ctrl", "Command/Ctrl");
#endif
+ }
+
+ if (key->get_keycode() != Key::NONE) {
+ text += mods_text + keycode_get_string(key->get_keycode());
+ }
+ if (key->get_physical_keycode() != Key::NONE) {
+ if (!text.is_empty()) {
+ text += " or ";
+ }
+ text += mods_text + keycode_get_string(key->get_physical_keycode()) + " (" + RTR("Physical") + ")";
+ }
+ if (key->get_key_label() != Key::NONE) {
+ if (!text.is_empty()) {
+ text += " or ";
+ }
+ text += mods_text + keycode_get_string(key->get_key_label()) + " (Unicode)";
+ }
+
+ if (text.is_empty()) {
+ text = "(" + RTR("Unset") + ")";
+ }
+ } else {
+ text = p_event->as_text();
}
+
Ref<InputEventMouse> mouse = p_event;
Ref<InputEventJoypadMotion> jp_motion = p_event;
Ref<InputEventJoypadButton> jp_button = p_event;
@@ -168,8 +194,8 @@ void EventListenerLineEdit::clear_event() {
}
}
-void EventListenerLineEdit::set_allowed_input_types(int input_types) {
- allowed_input_types = input_types;
+void EventListenerLineEdit::set_allowed_input_types(int p_type_masks) {
+ allowed_input_types = p_type_masks;
}
int EventListenerLineEdit::get_allowed_input_types() const {
diff --git a/editor/event_listener_line_edit.h b/editor/event_listener_line_edit.h
index 0679733b6a..aa0cc91d47 100644
--- a/editor/event_listener_line_edit.h
+++ b/editor/event_listener_line_edit.h
@@ -67,7 +67,7 @@ public:
Ref<InputEvent> get_event() const;
void clear_event();
- void set_allowed_input_types(int input_types);
+ void set_allowed_input_types(int p_type_masks);
int get_allowed_input_types() const;
void grab_focus();
diff --git a/editor/export/editor_export.cpp b/editor/export/editor_export.cpp
index f48cabf207..bc429e1111 100644
--- a/editor/export/editor_export.cpp
+++ b/editor/export/editor_export.cpp
@@ -45,6 +45,7 @@ void EditorExport::_save() {
config->set_value(section, "name", preset->get_name());
config->set_value(section, "platform", preset->get_platform()->get_name());
config->set_value(section, "runnable", preset->is_runnable());
+ config->set_value(section, "dedicated_server", preset->is_dedicated_server());
config->set_value(section, "custom_features", preset->get_custom_features());
bool save_files = false;
@@ -64,6 +65,11 @@ void EditorExport::_save() {
config->set_value(section, "export_filter", "exclude");
save_files = true;
} break;
+ case EditorExportPreset::EXPORT_CUSTOMIZED: {
+ config->set_value(section, "export_filter", "customized");
+ config->set_value(section, "customized_files", preset->get_customized_files());
+ save_files = false;
+ };
}
if (save_files) {
@@ -77,7 +83,6 @@ void EditorExport::_save() {
config->set_value(section, "encryption_exclude_filters", preset->get_enc_ex_filter());
config->set_value(section, "encrypt_pck", preset->get_enc_pck());
config->set_value(section, "encrypt_directory", preset->get_enc_directory());
- config->set_value(section, "script_export_mode", preset->get_script_export_mode());
config->set_value(section, "script_encryption_key", preset->get_script_encryption_key());
String option_section = "preset." + itos(i) + ".options";
@@ -124,10 +129,20 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in
}
String EditorExportPlatform::test_etc2() const {
- const bool etc2_supported = GLOBAL_GET("rendering/textures/vram_compression/import_etc2");
+ const bool etc2_supported = GLOBAL_GET("rendering/textures/vram_compression/import_etc2_astc");
if (!etc2_supported) {
- return TTR("Target platform requires 'ETC2' texture compression. Enable 'Import Etc 2' in Project Settings.");
+ return TTR("Target platform requires 'ETC2/ASTC' texture compression. Enable 'Import ETC2 ASTC' in Project Settings.");
+ }
+
+ return String();
+}
+
+String EditorExportPlatform::test_bc() const {
+ const bool bc_supported = GLOBAL_GET("rendering/textures/vram_compression/import_s3tc_bptc");
+
+ if (!bc_supported) {
+ return TTR("Target platform requires 'S3TC/BPTC' texture compression. Enable 'Import S3TC BPTC' in Project Settings.");
}
return String();
@@ -170,6 +185,12 @@ void EditorExport::_notification(int p_what) {
case NOTIFICATION_PROCESS: {
update_export_presets();
} break;
+
+ case NOTIFICATION_EXIT_TREE: {
+ for (int i = 0; i < export_platforms.size(); i++) {
+ export_platforms.write[i]->cleanup();
+ }
+ } break;
}
}
@@ -208,6 +229,7 @@ void EditorExport::load_config() {
preset->set_name(config->get_value(section, "name"));
preset->set_runnable(config->get_value(section, "runnable"));
+ preset->set_dedicated_server(config->get_value(section, "dedicated_server", false));
if (config->has_section_key(section, "custom_features")) {
preset->set_custom_features(config->get_value(section, "custom_features"));
@@ -228,6 +250,10 @@ void EditorExport::load_config() {
} else if (export_filter == "exclude") {
preset->set_export_filter(EditorExportPreset::EXCLUDE_SELECTED_RESOURCES);
get_files = true;
+ } else if (export_filter == "customized") {
+ preset->set_export_filter(EditorExportPreset::EXPORT_CUSTOMIZED);
+ preset->set_customized_files(config->get_value(section, "customized_files", Dictionary()));
+ get_files = false;
}
if (get_files) {
@@ -258,9 +284,6 @@ void EditorExport::load_config() {
if (config->has_section_key(section, "encryption_exclude_filters")) {
preset->set_enc_ex_filter(config->get_value(section, "encryption_exclude_filters"));
}
- if (config->has_section_key(section, "script_export_mode")) {
- preset->set_script_export_mode(config->get_value(section, "script_export_mode"));
- }
if (config->has_section_key(section, "script_encryption_key")) {
preset->set_script_encryption_key(config->get_value(section, "script_encryption_key"));
}
diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp
index 028071ff62..a46484bb0e 100644
--- a/editor/export/editor_export_platform.cpp
+++ b/editor/export/editor_export_platform.cpp
@@ -343,6 +343,24 @@ void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_d
}
}
+void EditorExportPlatform::_export_find_customized_resources(const Ref<EditorExportPreset> &p_preset, EditorFileSystemDirectory *p_dir, EditorExportPreset::FileExportMode p_mode, HashSet<String> &p_paths) {
+ for (int i = 0; i < p_dir->get_subdir_count(); i++) {
+ EditorFileSystemDirectory *subdir = p_dir->get_subdir(i);
+ _export_find_customized_resources(p_preset, subdir, p_preset->get_file_export_mode(subdir->get_path(), p_mode), p_paths);
+ }
+
+ for (int i = 0; i < p_dir->get_file_count(); i++) {
+ if (p_dir->get_file_type(i) == "TextFile") {
+ continue;
+ }
+ String path = p_dir->get_file_path(i);
+ EditorExportPreset::FileExportMode file_mode = p_preset->get_file_export_mode(path, p_mode);
+ if (file_mode != EditorExportPreset::MODE_FILE_REMOVE) {
+ p_paths.insert(path);
+ }
+ }
+}
+
void EditorExportPlatform::_export_find_dependencies(const String &p_path, HashSet<String> &p_paths) {
if (p_paths.has(p_path)) {
return;
@@ -444,8 +462,10 @@ HashSet<String> EditorExportPlatform::get_features(const Ref<EditorExportPreset>
result.insert("template");
if (p_debug) {
+ result.insert("debug");
result.insert("template_debug");
} else {
+ result.insert("release");
result.insert("template_release");
}
@@ -501,8 +521,8 @@ bool EditorExportPlatform::_export_customize_dictionary(Dictionary &dict, LocalV
case Variant::OBJECT: {
Ref<Resource> res = v;
if (res.is_valid()) {
- for (uint32_t j = 0; j < customize_resources_plugins.size(); j++) {
- Ref<Resource> new_res = customize_resources_plugins[j]->_customize_resource(res, "");
+ for (Ref<EditorExportPlugin> &plugin : customize_resources_plugins) {
+ Ref<Resource> new_res = plugin->_customize_resource(res, "");
if (new_res.is_valid()) {
changed = true;
if (new_res != res) {
@@ -548,8 +568,8 @@ bool EditorExportPlatform::_export_customize_array(Array &arr, LocalVector<Ref<E
case Variant::OBJECT: {
Ref<Resource> res = v;
if (res.is_valid()) {
- for (uint32_t j = 0; j < customize_resources_plugins.size(); j++) {
- Ref<Resource> new_res = customize_resources_plugins[j]->_customize_resource(res, "");
+ for (Ref<EditorExportPlugin> &plugin : customize_resources_plugins) {
+ Ref<Resource> new_res = plugin->_customize_resource(res, "");
if (new_res.is_valid()) {
changed = true;
if (new_res != res) {
@@ -595,8 +615,8 @@ bool EditorExportPlatform::_export_customize_object(Object *p_object, LocalVecto
case Variant::OBJECT: {
Ref<Resource> res = p_object->get(E.name);
if (res.is_valid()) {
- for (uint32_t j = 0; j < customize_resources_plugins.size(); j++) {
- Ref<Resource> new_res = customize_resources_plugins[j]->_customize_resource(res, "");
+ for (Ref<EditorExportPlugin> &plugin : customize_resources_plugins) {
+ Ref<Resource> new_res = plugin->_customize_resource(res, "");
if (new_res.is_valid()) {
changed = true;
if (new_res != res) {
@@ -637,10 +657,20 @@ bool EditorExportPlatform::_export_customize_object(Object *p_object, LocalVecto
return changed;
}
+bool EditorExportPlatform::_is_editable_ancestor(Node *p_root, Node *p_node) {
+ while (p_node != nullptr && p_node != p_root) {
+ if (p_root->is_editable_instance(p_node)) {
+ return true;
+ }
+ p_node = p_node->get_owner();
+ }
+ return false;
+}
+
bool EditorExportPlatform::_export_customize_scene_resources(Node *p_root, Node *p_node, LocalVector<Ref<EditorExportPlugin>> &customize_resources_plugins) {
bool changed = false;
- if (p_node == p_root || p_node->get_owner() == p_root) {
+ if (p_root == p_node || p_node->get_owner() == p_root || _is_editable_ancestor(p_root, p_node)) {
if (_export_customize_object(p_node, customize_resources_plugins)) {
changed = true;
}
@@ -713,16 +743,16 @@ String EditorExportPlatform::_export_customize(const String &p_path, LocalVector
ERR_FAIL_COND_V(ps.is_null(), p_path);
Node *node = ps->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE); // Make sure the child scene root gets the correct inheritance chain.
ERR_FAIL_COND_V(node == nullptr, p_path);
- if (customize_scenes_plugins.size()) {
- for (uint32_t i = 0; i < customize_scenes_plugins.size(); i++) {
- Node *customized = customize_scenes_plugins[i]->_customize_scene(node, p_path);
+ if (!customize_scenes_plugins.is_empty()) {
+ for (Ref<EditorExportPlugin> &plugin : customize_scenes_plugins) {
+ Node *customized = plugin->_customize_scene(node, p_path);
if (customized != nullptr) {
node = customized;
modified = true;
}
}
}
- if (customize_resources_plugins.size()) {
+ if (!customize_resources_plugins.is_empty()) {
if (_export_customize_scene_resources(node, node, customize_resources_plugins)) {
modified = true;
}
@@ -744,9 +774,9 @@ String EditorExportPlatform::_export_customize(const String &p_path, LocalVector
Ref<Resource> res = ResourceLoader::load(p_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE);
ERR_FAIL_COND_V(res.is_null(), p_path);
- if (customize_resources_plugins.size()) {
- for (uint32_t i = 0; i < customize_resources_plugins.size(); i++) {
- Ref<Resource> new_res = customize_resources_plugins[i]->_customize_resource(res, p_path);
+ if (!customize_resources_plugins.is_empty()) {
+ for (Ref<EditorExportPlugin> &plugin : customize_resources_plugins) {
+ Ref<Resource> new_res = plugin->_customize_resource(res, p_path);
if (new_res.is_valid()) {
modified = true;
if (new_res != res) {
@@ -784,6 +814,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
HashSet<String> paths;
Vector<String> path_remaps;
+ paths.insert(ProjectSettings::get_singleton()->get_global_class_list_path());
if (p_preset->get_export_filter() == EditorExportPreset::EXPORT_ALL_RESOURCES) {
//find stuff
_export_find_resources(EditorFileSystem::get_singleton()->get_filesystem(), paths);
@@ -793,6 +824,8 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
for (int i = 0; i < files.size(); i++) {
paths.erase(files[i]);
}
+ } else if (p_preset->get_export_filter() == EditorExportPreset::EXPORT_CUSTOMIZED) {
+ _export_find_customized_resources(p_preset, EditorFileSystem::get_singleton()->get_filesystem(), p_preset->get_file_export_mode("res://"), paths);
} else {
bool scenes_only = p_preset->get_export_filter() == EditorExportPreset::EXPORT_SELECTED_SCENES;
@@ -936,14 +969,14 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
LocalVector<Ref<EditorExportPlugin>> customize_scenes_plugins;
for (int i = 0; i < export_plugins.size(); i++) {
- if (export_plugins[i]->_begin_customize_resources(Ref<EditorExportPlatform>(this), features_psa)) {
+ if (export_plugins.write[i]->_begin_customize_resources(Ref<EditorExportPlatform>(this), features_psa)) {
customize_resources_plugins.push_back(export_plugins[i]);
custom_resources_hash = hash_murmur3_one_64(export_plugins[i]->_get_name().hash64(), custom_resources_hash);
uint64_t hash = export_plugins[i]->_get_customization_configuration_hash();
custom_resources_hash = hash_murmur3_one_64(hash, custom_resources_hash);
}
- if (export_plugins[i]->_begin_customize_scenes(Ref<EditorExportPlatform>(this), features_psa)) {
+ if (export_plugins.write[i]->_begin_customize_scenes(Ref<EditorExportPlatform>(this), features_psa)) {
customize_scenes_plugins.push_back(export_plugins[i]);
custom_resources_hash = hash_murmur3_one_64(export_plugins[i]->_get_name().hash64(), custom_resources_hash);
@@ -957,7 +990,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
bool convert_text_to_binary = GLOBAL_GET("editor/export/convert_text_resources_to_binary");
- if (convert_text_to_binary || customize_resources_plugins.size() || customize_scenes_plugins.size()) {
+ if (convert_text_to_binary || !customize_resources_plugins.is_empty() || !customize_scenes_plugins.is_empty()) {
// See if we have something to open
Ref<FileAccess> f = FileAccess::open(export_base_path.path_join("file_cache"), FileAccess::READ);
if (f.is_valid()) {
@@ -1176,7 +1209,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
idx++;
}
- if (convert_text_to_binary || customize_resources_plugins.size() || customize_scenes_plugins.size()) {
+ if (convert_text_to_binary || !customize_resources_plugins.is_empty() || !customize_scenes_plugins.is_empty()) {
// End scene customization
String fcache = export_base_path.path_join("file_cache");
@@ -1193,12 +1226,12 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
ERR_PRINT("Error opening export file cache: " + fcache);
}
- for (uint32_t i = 0; i < customize_resources_plugins.size(); i++) {
- customize_resources_plugins[i]->_end_customize_resources();
+ for (Ref<EditorExportPlugin> &plugin : customize_resources_plugins) {
+ plugin->_end_customize_resources();
}
- for (uint32_t i = 0; i < customize_scenes_plugins.size(); i++) {
- customize_scenes_plugins[i]->_end_customize_scenes();
+ for (Ref<EditorExportPlugin> &plugin : customize_scenes_plugins) {
+ plugin->_end_customize_scenes();
}
}
//save config!
@@ -1215,6 +1248,9 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
}
}
+ for (int i = 0; i < export_plugins.size(); i++) {
+ custom_list.append_array(export_plugins[i]->_get_export_features(Ref<EditorExportPlatform>(this), p_debug));
+ }
ProjectSettings::CustomMap custom_map;
if (path_remaps.size()) {
@@ -1291,7 +1327,9 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
} else {
// Use default text server data.
String icu_data_file = EditorPaths::get_singleton()->get_cache_dir().path_join("tmp_icu_data");
- TS->save_support_data(icu_data_file);
+ if (!TS->save_support_data(icu_data_file)) {
+ return ERR_INVALID_DATA;
+ }
Vector<uint8_t> array = FileAccess::get_file_as_bytes(icu_data_file);
err = p_func(p_udata, ts_data, array, idx, total, enc_in_filters, enc_ex_filters, key);
DirAccess::remove_file_or_error(icu_data_file);
@@ -1320,6 +1358,121 @@ Error EditorExportPlatform::_add_shared_object(void *p_userdata, const SharedObj
return OK;
}
+void EditorExportPlatform::zip_folder_recursive(zipFile &p_zip, const String &p_root_path, const String &p_folder, const String &p_pkg_name) {
+ String dir = p_folder.is_empty() ? p_root_path : p_root_path.path_join(p_folder);
+
+ Ref<DirAccess> da = DirAccess::open(dir);
+ da->list_dir_begin();
+ String f = da->get_next();
+ while (!f.is_empty()) {
+ if (f == "." || f == "..") {
+ f = da->get_next();
+ continue;
+ }
+ if (da->is_link(f)) {
+ OS::DateTime dt = OS::get_singleton()->get_datetime();
+
+ zip_fileinfo zipfi;
+ zipfi.tmz_date.tm_year = dt.year;
+ zipfi.tmz_date.tm_mon = dt.month - 1; // Note: "tm" month range - 0..11, Godot month range - 1..12, https://www.cplusplus.com/reference/ctime/tm/
+ zipfi.tmz_date.tm_mday = dt.day;
+ zipfi.tmz_date.tm_hour = dt.hour;
+ zipfi.tmz_date.tm_min = dt.minute;
+ zipfi.tmz_date.tm_sec = dt.second;
+ zipfi.dosDate = 0;
+ // 0120000: symbolic link type
+ // 0000755: permissions rwxr-xr-x
+ // 0000644: permissions rw-r--r--
+ uint32_t _mode = 0120644;
+ zipfi.external_fa = (_mode << 16L) | !(_mode & 0200);
+ zipfi.internal_fa = 0;
+
+ zipOpenNewFileInZip4(p_zip,
+ p_folder.path_join(f).utf8().get_data(),
+ &zipfi,
+ nullptr,
+ 0,
+ nullptr,
+ 0,
+ nullptr,
+ Z_DEFLATED,
+ Z_DEFAULT_COMPRESSION,
+ 0,
+ -MAX_WBITS,
+ DEF_MEM_LEVEL,
+ Z_DEFAULT_STRATEGY,
+ nullptr,
+ 0,
+ 0x0314, // "version made by", 0x03 - Unix, 0x14 - ZIP specification version 2.0, required to store Unix file permissions
+ 0);
+
+ String target = da->read_link(f);
+ zipWriteInFileInZip(p_zip, target.utf8().get_data(), target.utf8().size());
+ zipCloseFileInZip(p_zip);
+ } else if (da->current_is_dir()) {
+ zip_folder_recursive(p_zip, p_root_path, p_folder.path_join(f), p_pkg_name);
+ } else {
+ bool _is_executable = is_executable(dir.path_join(f));
+
+ OS::DateTime dt = OS::get_singleton()->get_datetime();
+
+ zip_fileinfo zipfi;
+ zipfi.tmz_date.tm_year = dt.year;
+ zipfi.tmz_date.tm_mon = dt.month - 1; // Note: "tm" month range - 0..11, Godot month range - 1..12, https://www.cplusplus.com/reference/ctime/tm/
+ zipfi.tmz_date.tm_mday = dt.day;
+ zipfi.tmz_date.tm_hour = dt.hour;
+ zipfi.tmz_date.tm_min = dt.minute;
+ zipfi.tmz_date.tm_sec = dt.second;
+ zipfi.dosDate = 0;
+ // 0100000: regular file type
+ // 0000755: permissions rwxr-xr-x
+ // 0000644: permissions rw-r--r--
+ uint32_t _mode = (_is_executable ? 0100755 : 0100644);
+ zipfi.external_fa = (_mode << 16L) | !(_mode & 0200);
+ zipfi.internal_fa = 0;
+
+ zipOpenNewFileInZip4(p_zip,
+ p_folder.path_join(f).utf8().get_data(),
+ &zipfi,
+ nullptr,
+ 0,
+ nullptr,
+ 0,
+ nullptr,
+ Z_DEFLATED,
+ Z_DEFAULT_COMPRESSION,
+ 0,
+ -MAX_WBITS,
+ DEF_MEM_LEVEL,
+ Z_DEFAULT_STRATEGY,
+ nullptr,
+ 0,
+ 0x0314, // "version made by", 0x03 - Unix, 0x14 - ZIP specification version 2.0, required to store Unix file permissions
+ 0);
+
+ Ref<FileAccess> fa = FileAccess::open(dir.path_join(f), FileAccess::READ);
+ if (fa.is_null()) {
+ add_message(EXPORT_MESSAGE_ERROR, TTR("ZIP Creation"), vformat(TTR("Could not open file to read from path \"%s\"."), dir.path_join(f)));
+ return;
+ }
+ const int bufsize = 16384;
+ uint8_t buf[bufsize];
+
+ while (true) {
+ uint64_t got = fa->get_buffer(buf, bufsize);
+ if (got == 0) {
+ break;
+ }
+ zipWriteInFileInZip(p_zip, buf, got);
+ }
+
+ zipCloseFileInZip(p_zip);
+ }
+ f = da->get_next();
+ }
+ da->list_dir_end();
+}
+
Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, Vector<SharedObject> *p_so_files, bool p_embed, int64_t *r_embedded_start, int64_t *r_embedded_size) {
EditorProgress ep("savepack", TTR("Packing"), 102, true);
@@ -1640,5 +1793,144 @@ bool EditorExportPlatform::can_export(const Ref<EditorExportPreset> &p_preset, S
return valid;
}
+Error EditorExportPlatform::ssh_run_on_remote(const String &p_host, const String &p_port, const Vector<String> &p_ssh_args, const String &p_cmd_args, String *r_out, int p_port_fwd) const {
+ String ssh_path = EditorSettings::get_singleton()->get("export/ssh/ssh");
+ if (ssh_path.is_empty()) {
+ ssh_path = "ssh";
+ }
+
+ List<String> args;
+ args.push_back("-p");
+ args.push_back(p_port);
+ args.push_back("-q");
+ args.push_back("-o");
+ args.push_back("LogLevel=error");
+ args.push_back("-o");
+ args.push_back("BatchMode=yes");
+ args.push_back("-o");
+ args.push_back("StrictHostKeyChecking=no");
+ for (const String &E : p_ssh_args) {
+ args.push_back(E);
+ }
+ if (p_port_fwd > 0) {
+ args.push_back("-R");
+ args.push_back(vformat("%d:localhost:%d", p_port_fwd, p_port_fwd));
+ }
+ args.push_back(p_host);
+ args.push_back(p_cmd_args);
+
+ String out;
+ int exit_code = -1;
+
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ OS::get_singleton()->print("Executing: %s", ssh_path.utf8().get_data());
+ for (const String &arg : args) {
+ OS::get_singleton()->print(" %s", arg.utf8().get_data());
+ }
+ OS::get_singleton()->print("\n");
+ }
+
+ Error err = OS::get_singleton()->execute(ssh_path, args, &out, &exit_code, true);
+ if (out.is_empty()) {
+ print_verbose(vformat("Exit code: %d", exit_code));
+ } else {
+ print_verbose(vformat("Exit code: %d, Output: %s", exit_code, out.replace("\r\n", "\n")));
+ }
+ if (r_out) {
+ *r_out = out.replace("\r\n", "\n").get_slice("\n", 0);
+ }
+ if (err != OK) {
+ return err;
+ } else if (exit_code != 0) {
+ if (!out.is_empty()) {
+ print_line(out);
+ }
+ return FAILED;
+ }
+ return OK;
+}
+
+Error EditorExportPlatform::ssh_run_on_remote_no_wait(const String &p_host, const String &p_port, const Vector<String> &p_ssh_args, const String &p_cmd_args, OS::ProcessID *r_pid, int p_port_fwd) const {
+ String ssh_path = EditorSettings::get_singleton()->get("export/ssh/ssh");
+ if (ssh_path.is_empty()) {
+ ssh_path = "ssh";
+ }
+
+ List<String> args;
+ args.push_back("-p");
+ args.push_back(p_port);
+ args.push_back("-q");
+ args.push_back("-o");
+ args.push_back("LogLevel=error");
+ args.push_back("-o");
+ args.push_back("BatchMode=yes");
+ args.push_back("-o");
+ args.push_back("StrictHostKeyChecking=no");
+ for (const String &E : p_ssh_args) {
+ args.push_back(E);
+ }
+ if (p_port_fwd > 0) {
+ args.push_back("-R");
+ args.push_back(vformat("%d:localhost:%d", p_port_fwd, p_port_fwd));
+ }
+ args.push_back(p_host);
+ args.push_back(p_cmd_args);
+
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ OS::get_singleton()->print("Executing: %s", ssh_path.utf8().get_data());
+ for (const String &arg : args) {
+ OS::get_singleton()->print(" %s", arg.utf8().get_data());
+ }
+ OS::get_singleton()->print("\n");
+ }
+
+ return OS::get_singleton()->create_process(ssh_path, args, r_pid);
+}
+
+Error EditorExportPlatform::ssh_push_to_remote(const String &p_host, const String &p_port, const Vector<String> &p_scp_args, const String &p_src_file, const String &p_dst_file) const {
+ String scp_path = EditorSettings::get_singleton()->get("export/ssh/scp");
+ if (scp_path.is_empty()) {
+ scp_path = "scp";
+ }
+
+ List<String> args;
+ args.push_back("-P");
+ args.push_back(p_port);
+ args.push_back("-q");
+ args.push_back("-o");
+ args.push_back("LogLevel=error");
+ args.push_back("-o");
+ args.push_back("BatchMode=yes");
+ args.push_back("-o");
+ args.push_back("StrictHostKeyChecking=no");
+ for (const String &E : p_scp_args) {
+ args.push_back(E);
+ }
+ args.push_back(p_src_file);
+ args.push_back(vformat("%s:%s", p_host, p_dst_file));
+
+ String out;
+ int exit_code = -1;
+
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ OS::get_singleton()->print("Executing: %s", scp_path.utf8().get_data());
+ for (const String &arg : args) {
+ OS::get_singleton()->print(" %s", arg.utf8().get_data());
+ }
+ OS::get_singleton()->print("\n");
+ }
+
+ Error err = OS::get_singleton()->execute(scp_path, args, &out, &exit_code, true);
+ if (err != OK) {
+ return err;
+ } else if (exit_code != 0) {
+ if (!out.is_empty()) {
+ print_line(out);
+ }
+ return FAILED;
+ }
+ return OK;
+}
+
EditorExportPlatform::EditorExportPlatform() {
}
diff --git a/editor/export/editor_export_platform.h b/editor/export/editor_export_platform.h
index d3d8a8f186..05d985eb6a 100644
--- a/editor/export/editor_export_platform.h
+++ b/editor/export/editor_export_platform.h
@@ -35,6 +35,7 @@ class EditorFileSystemDirectory;
struct EditorProgress;
#include "core/io/dir_access.h"
+#include "core/io/zip_io.h"
#include "editor_export_preset.h"
#include "editor_export_shared_object.h"
#include "scene/gui/rich_text_label.h"
@@ -90,9 +91,9 @@ private:
Vector<ExportMessage> messages;
void _export_find_resources(EditorFileSystemDirectory *p_dir, HashSet<String> &p_paths);
+ void _export_find_customized_resources(const Ref<EditorExportPreset> &p_preset, EditorFileSystemDirectory *p_dir, EditorExportPreset::FileExportMode p_mode, HashSet<String> &p_paths);
void _export_find_dependencies(const String &p_path, HashSet<String> &p_paths);
- void gen_debug_flags(Vector<String> &r_flags, int p_flags);
static Error _save_pack_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
static Error _save_zip_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
@@ -112,6 +113,7 @@ private:
bool _export_customize_array(Array &array, LocalVector<Ref<EditorExportPlugin>> &customize_resources_plugins);
bool _export_customize_object(Object *p_object, LocalVector<Ref<EditorExportPlugin>> &customize_resources_plugins);
bool _export_customize_scene_resources(Node *p_root, Node *p_node, LocalVector<Ref<EditorExportPlugin>> &customize_resources_plugins);
+ bool _is_editable_ancestor(Node *p_root, Node *p_node);
String _export_customize(const String &p_path, LocalVector<Ref<EditorExportPlugin>> &customize_resources_plugins, LocalVector<Ref<EditorExportPlugin>> &customize_scenes_plugins, HashMap<String, FileExportCache> &export_cache, const String &export_base_path, bool p_force_save);
@@ -126,6 +128,13 @@ protected:
bool exists_export_template(String template_file_name, String *err) const;
String find_export_template(String template_file_name, String *err = nullptr) const;
void gen_export_flags(Vector<String> &r_flags, int p_flags);
+ void gen_debug_flags(Vector<String> &r_flags, int p_flags);
+
+ virtual void zip_folder_recursive(zipFile &p_zip, const String &p_root_path, const String &p_folder, const String &p_pkg_name);
+
+ Error ssh_run_on_remote(const String &p_host, const String &p_port, const Vector<String> &p_ssh_args, const String &p_cmd_args, String *r_out = nullptr, int p_port_fwd = -1) const;
+ Error ssh_run_on_remote_no_wait(const String &p_host, const String &p_port, const Vector<String> &p_ssh_args, const String &p_cmd_args, OS::ProcessID *r_pid = nullptr, int p_port_fwd = -1) const;
+ Error ssh_push_to_remote(const String &p_host, const String &p_port, const Vector<String> &p_scp_args, const String &p_src_file, const String &p_dst_file) const;
public:
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const = 0;
@@ -215,10 +224,12 @@ public:
DEBUG_FLAG_VIEW_NAVIGATION = 16,
};
+ virtual void cleanup() {}
virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_device, int p_debug_flags) { return OK; }
virtual Ref<Texture2D> get_run_icon() const { return get_logo(); }
String test_etc2() const;
+ String test_bc() const;
bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const;
virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const = 0;
virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const = 0;
diff --git a/editor/export/editor_export_platform_pc.h b/editor/export/editor_export_platform_pc.h
index c71a62ee5c..8c24f2fc68 100644
--- a/editor/export/editor_export_platform_pc.h
+++ b/editor/export/editor_export_platform_pc.h
@@ -62,7 +62,6 @@ public:
virtual Error modify_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) { return OK; };
virtual Error export_project_data(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags);
- void set_extension(const String &p_extension, const String &p_feature_key = "default");
void set_name(const String &p_name);
void set_os_name(const String &p_name);
diff --git a/editor/export/editor_export_plugin.cpp b/editor/export/editor_export_plugin.cpp
index f34ebfa541..0add55820f 100644
--- a/editor/export/editor_export_plugin.cpp
+++ b/editor/export/editor_export_plugin.cpp
@@ -34,6 +34,7 @@
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "editor/editor_paths.h"
+#include "editor/editor_settings.h"
#include "editor/export/editor_export_platform.h"
#include "scene/resources/resource_format_text.h"
@@ -140,7 +141,7 @@ void EditorExportPlugin::_export_end_script() {
// Customization
-bool EditorExportPlugin::_begin_customize_resources(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) const {
+bool EditorExportPlugin::_begin_customize_resources(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) {
bool ret = false;
GDVIRTUAL_CALL(_begin_customize_resources, p_platform, p_features, ret);
return ret;
@@ -152,7 +153,7 @@ Ref<Resource> EditorExportPlugin::_customize_resource(const Ref<Resource> &p_res
return ret;
}
-bool EditorExportPlugin::_begin_customize_scenes(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) const {
+bool EditorExportPlugin::_begin_customize_scenes(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) {
bool ret = false;
GDVIRTUAL_CALL(_begin_customize_scenes, p_platform, p_features, ret);
return ret;
@@ -184,6 +185,12 @@ String EditorExportPlugin::_get_name() const {
return ret;
}
+PackedStringArray EditorExportPlugin::_get_export_features(const Ref<EditorExportPlatform> &p_platform, bool p_debug) const {
+ PackedStringArray ret;
+ GDVIRTUAL_CALL(_get_export_features, p_platform, p_debug, ret);
+ return ret;
+}
+
void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) {
}
@@ -226,4 +233,6 @@ void EditorExportPlugin::_bind_methods() {
}
EditorExportPlugin::EditorExportPlugin() {
+ EDITOR_DEF("export/ssh/ssh", "");
+ EDITOR_DEF("export/ssh/scp", "");
}
diff --git a/editor/export/editor_export_plugin.h b/editor/export/editor_export_plugin.h
index 5ac0a70c3e..fad647a67b 100644
--- a/editor/export/editor_export_plugin.h
+++ b/editor/export/editor_export_plugin.h
@@ -120,18 +120,22 @@ protected:
GDVIRTUAL0(_end_customize_scenes)
GDVIRTUAL0(_end_customize_resources)
+ GDVIRTUAL2RC(PackedStringArray, _get_export_features, const Ref<EditorExportPlatform> &, bool);
+
GDVIRTUAL0RC(String, _get_name)
- bool _begin_customize_resources(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) const; // Return true if this plugin does property export customization
- Ref<Resource> _customize_resource(const Ref<Resource> &p_resource, const String &p_path); // If nothing is returned, it means do not touch (nothing changed). If something is returned (either the same or a different resource) it means changes are made.
+ virtual bool _begin_customize_resources(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features); // Return true if this plugin does property export customization
+ virtual Ref<Resource> _customize_resource(const Ref<Resource> &p_resource, const String &p_path); // If nothing is returned, it means do not touch (nothing changed). If something is returned (either the same or a different resource) it means changes are made.
+
+ virtual bool _begin_customize_scenes(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features); // Return true if this plugin does property export customization
+ virtual Node *_customize_scene(Node *p_root, const String &p_path); // Return true if a change was made
- bool _begin_customize_scenes(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) const; // Return true if this plugin does property export customization
- Node *_customize_scene(Node *p_root, const String &p_path); // Return true if a change was made
+ virtual uint64_t _get_customization_configuration_hash() const; // Hash used for caching customized resources and scenes.
- uint64_t _get_customization_configuration_hash() const; // Hash used for caching customized resources and scenes.
+ virtual void _end_customize_scenes();
+ virtual void _end_customize_resources();
- void _end_customize_scenes();
- void _end_customize_resources();
+ virtual PackedStringArray _get_export_features(const Ref<EditorExportPlatform> &p_export_platform, bool p_debug) const;
virtual String _get_name() const;
diff --git a/editor/export/editor_export_preset.cpp b/editor/export/editor_export_preset.cpp
index 6cd8e85e6a..6beef623bc 100644
--- a/editor/export/editor_export_preset.cpp
+++ b/editor/export/editor_export_preset.cpp
@@ -64,15 +64,29 @@ Ref<EditorExportPlatform> EditorExportPreset::get_platform() const {
return platform;
}
-void EditorExportPreset::update_files_to_export() {
- Vector<String> to_remove;
- for (const String &E : selected_files) {
- if (!FileAccess::exists(E)) {
- to_remove.push_back(E);
+void EditorExportPreset::update_files() {
+ {
+ Vector<String> to_remove;
+ for (const String &E : selected_files) {
+ if (!FileAccess::exists(E)) {
+ to_remove.push_back(E);
+ }
+ }
+ for (int i = 0; i < to_remove.size(); ++i) {
+ selected_files.erase(to_remove[i]);
}
}
- for (int i = 0; i < to_remove.size(); ++i) {
- selected_files.erase(to_remove[i]);
+
+ {
+ Vector<String> to_remove;
+ for (const KeyValue<String, FileExportMode> &E : customized_files) {
+ if (!FileAccess::exists(E.key) && !DirAccess::exists(E.key)) {
+ to_remove.push_back(E.key);
+ }
+ }
+ for (int i = 0; i < to_remove.size(); ++i) {
+ customized_files.erase(to_remove[i]);
+ }
}
}
@@ -84,6 +98,48 @@ Vector<String> EditorExportPreset::get_files_to_export() const {
return files;
}
+Dictionary EditorExportPreset::get_customized_files() const {
+ Dictionary files;
+ for (const KeyValue<String, FileExportMode> &E : customized_files) {
+ String mode;
+ switch (E.value) {
+ case MODE_FILE_NOT_CUSTOMIZED: {
+ continue;
+ } break;
+ case MODE_FILE_STRIP: {
+ mode = "strip";
+ } break;
+ case MODE_FILE_KEEP: {
+ mode = "keep";
+ } break;
+ case MODE_FILE_REMOVE: {
+ mode = "remove";
+ }
+ }
+ files[E.key] = mode;
+ }
+ return files;
+}
+
+int EditorExportPreset::get_customized_files_count() const {
+ return customized_files.size();
+}
+
+void EditorExportPreset::set_customized_files(const Dictionary &p_files) {
+ for (const Variant *key = p_files.next(nullptr); key; key = p_files.next(key)) {
+ EditorExportPreset::FileExportMode mode = EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED;
+ String value = p_files[*key];
+ if (value == "strip") {
+ mode = EditorExportPreset::MODE_FILE_STRIP;
+ } else if (value == "keep") {
+ mode = EditorExportPreset::MODE_FILE_KEEP;
+ } else if (value == "remove") {
+ mode = EditorExportPreset::MODE_FILE_REMOVE;
+ }
+ set_file_export_mode(*key, mode);
+ }
+}
+
void EditorExportPreset::set_name(const String &p_name) {
name = p_name;
EditorExport::singleton->save_presets();
@@ -102,6 +158,15 @@ bool EditorExportPreset::is_runnable() const {
return runnable;
}
+void EditorExportPreset::set_dedicated_server(bool p_enable) {
+ dedicated_server = p_enable;
+ EditorExport::singleton->save_presets();
+}
+
+bool EditorExportPreset::is_dedicated_server() const {
+ return dedicated_server;
+}
+
void EditorExportPreset::set_export_filter(ExportFilter p_filter) {
export_filter = p_filter;
EditorExport::singleton->save_presets();
@@ -158,6 +223,23 @@ bool EditorExportPreset::has_export_file(const String &p_path) {
return selected_files.has(p_path);
}
+void EditorExportPreset::set_file_export_mode(const String &p_path, EditorExportPreset::FileExportMode p_mode) {
+ if (p_mode == FileExportMode::MODE_FILE_NOT_CUSTOMIZED) {
+ customized_files.erase(p_path);
+ } else {
+ customized_files.insert(p_path, p_mode);
+ }
+ EditorExport::singleton->save_presets();
+}
+
+EditorExportPreset::FileExportMode EditorExportPreset::get_file_export_mode(const String &p_path, EditorExportPreset::FileExportMode p_default) const {
+ HashMap<String, FileExportMode>::ConstIterator i = customized_files.find(p_path);
+ if (i) {
+ return i->value;
+ }
+ return p_default;
+}
+
void EditorExportPreset::set_custom_features(const String &p_custom_features) {
custom_features = p_custom_features;
EditorExport::singleton->save_presets();
@@ -203,15 +285,6 @@ bool EditorExportPreset::get_enc_directory() const {
return enc_directory;
}
-void EditorExportPreset::set_script_export_mode(int p_mode) {
- script_mode = p_mode;
- EditorExport::singleton->save_presets();
-}
-
-int EditorExportPreset::get_script_export_mode() const {
- return script_mode;
-}
-
void EditorExportPreset::set_script_encryption_key(const String &p_key) {
script_key = p_key;
EditorExport::singleton->save_presets();
diff --git a/editor/export/editor_export_preset.h b/editor/export/editor_export_preset.h
index 2055416d4b..db139d8860 100644
--- a/editor/export/editor_export_preset.h
+++ b/editor/export/editor_export_preset.h
@@ -44,11 +44,14 @@ public:
EXPORT_SELECTED_SCENES,
EXPORT_SELECTED_RESOURCES,
EXCLUDE_SELECTED_RESOURCES,
+ EXPORT_CUSTOMIZED,
};
- enum ScriptExportMode {
- MODE_SCRIPT_TEXT,
- MODE_SCRIPT_COMPILED,
+ enum FileExportMode {
+ MODE_FILE_NOT_CUSTOMIZED,
+ MODE_FILE_STRIP,
+ MODE_FILE_KEEP,
+ MODE_FILE_REMOVE,
};
private:
@@ -60,7 +63,9 @@ private:
String exporter;
HashSet<String> selected_files;
+ HashMap<String, FileExportMode> customized_files;
bool runnable = false;
+ bool dedicated_server = false;
friend class EditorExport;
friend class EditorExportPlatform;
@@ -78,7 +83,6 @@ private:
bool enc_pck = false;
bool enc_directory = false;
- int script_mode = MODE_SCRIPT_COMPILED;
String script_key;
protected:
@@ -91,20 +95,29 @@ public:
bool has(const StringName &p_property) const { return values.has(p_property); }
- void update_files_to_export();
+ void update_files();
Vector<String> get_files_to_export() const;
+ Dictionary get_customized_files() const;
+ int get_customized_files_count() const;
+ void set_customized_files(const Dictionary &p_files);
void add_export_file(const String &p_path);
void remove_export_file(const String &p_path);
bool has_export_file(const String &p_path);
+ void set_file_export_mode(const String &p_path, FileExportMode p_mode);
+ FileExportMode get_file_export_mode(const String &p_path, FileExportMode p_default = MODE_FILE_NOT_CUSTOMIZED) const;
+
void set_name(const String &p_name);
String get_name() const;
void set_runnable(bool p_enable);
bool is_runnable() const;
+ void set_dedicated_server(bool p_enable);
+ bool is_dedicated_server() const;
+
void set_export_filter(ExportFilter p_filter);
ExportFilter get_export_filter() const;
@@ -132,9 +145,6 @@ public:
void set_enc_directory(bool p_enabled);
bool get_enc_directory() const;
- void set_script_export_mode(int p_mode);
- int get_script_export_mode() const;
-
void set_script_encryption_key(const String &p_key);
String get_script_encryption_key() const;
diff --git a/editor/export/project_export.cpp b/editor/export/project_export.cpp
index 3e06633cc8..e9ea0012be 100644
--- a/editor/export/project_export.cpp
+++ b/editor/export/project_export.cpp
@@ -45,6 +45,7 @@
#include "scene/gui/link_button.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/option_button.h"
+#include "scene/gui/popup_menu.h"
#include "scene/gui/split_container.h"
#include "scene/gui/texture_rect.h"
#include "scene/gui/tree.h"
@@ -165,7 +166,7 @@ void ProjectExportDialog::_update_presets() {
if (preset->is_runnable()) {
preset_name += " (" + TTR("Runnable") + ")";
}
- preset->update_files_to_export();
+ preset->update_files();
presets->add_item(preset_name, preset->get_platform()->get_logo());
}
@@ -244,6 +245,7 @@ void ProjectExportDialog::_edit_preset(int p_index) {
export_filter->select(current->get_export_filter());
include_filters->set_text(current->get_include_filter());
exclude_filters->set_text(current->get_exclude_filter());
+ server_strip_message->set_visible(current->get_export_filter() == EditorExportPreset::EXPORT_CUSTOMIZED);
_fill_resource_tree();
@@ -317,9 +319,6 @@ void ProjectExportDialog::_edit_preset(int p_index) {
bool enc_directory_mode = current->get_enc_directory();
enc_directory->set_pressed(enc_directory_mode);
- int script_export_mode = current->get_script_export_mode();
- script_mode->select(script_export_mode);
-
String key = current->get_script_encryption_key();
if (!updating_script_key) {
script_key->set_text(key);
@@ -480,7 +479,7 @@ void ProjectExportDialog::_enc_filters_changed(const String &p_filters) {
}
void ProjectExportDialog::_open_key_help_link() {
- OS::get_singleton()->shell_open(vformat("%s/development/compiling/compiling_with_script_encryption_key.html", VERSION_DOCS_URL));
+ OS::get_singleton()->shell_open(vformat("%s/contributing/development/compiling/compiling_with_script_encryption_key.html", VERSION_DOCS_URL));
}
void ProjectExportDialog::_enc_pck_changed(bool p_pressed) {
@@ -513,19 +512,6 @@ void ProjectExportDialog::_enc_directory_changed(bool p_pressed) {
_update_current_preset();
}
-void ProjectExportDialog::_script_export_mode_changed(int p_mode) {
- if (updating) {
- return;
- }
-
- Ref<EditorExportPreset> current = get_current_preset();
- ERR_FAIL_COND(current.is_null());
-
- current->set_script_export_mode(p_mode);
-
- _update_current_preset();
-}
-
void ProjectExportDialog::_script_encryption_key_changed(const String &p_key) {
if (updating) {
return;
@@ -586,6 +572,7 @@ void ProjectExportDialog::_duplicate_preset() {
if (make_runnable) {
preset->set_runnable(make_runnable);
}
+ preset->set_dedicated_server(current->is_dedicated_server());
preset->set_export_filter(current->get_export_filter());
preset->set_include_filter(current->get_include_filter());
preset->set_exclude_filter(current->get_exclude_filter());
@@ -708,7 +695,16 @@ void ProjectExportDialog::_export_type_changed(int p_which) {
return;
}
- current->set_export_filter(EditorExportPreset::ExportFilter(p_which));
+ EditorExportPreset::ExportFilter filter_type = (EditorExportPreset::ExportFilter)p_which;
+ current->set_export_filter(filter_type);
+ current->set_dedicated_server(filter_type == EditorExportPreset::EXPORT_CUSTOMIZED);
+ server_strip_message->set_visible(filter_type == EditorExportPreset::EXPORT_CUSTOMIZED);
+
+ // Default to stripping everything when first switching to server build.
+ if (filter_type == EditorExportPreset::EXPORT_CUSTOMIZED && current->get_customized_files_count() == 0) {
+ current->set_file_export_mode("res://", EditorExportPreset::MODE_FILE_STRIP);
+ }
+
updating = true;
_fill_resource_tree();
updating = false;
@@ -744,25 +740,58 @@ void ProjectExportDialog::_fill_resource_tree() {
return;
}
+ TreeItem *root = include_files->create_item();
+
+ if (f == EditorExportPreset::EXPORT_CUSTOMIZED) {
+ include_files->set_columns(2);
+ include_files->set_column_expand(1, false);
+ include_files->set_column_custom_minimum_width(1, 250 * EDSCALE);
+ } else {
+ include_files->set_columns(1);
+ }
+
include_label->show();
include_margin->show();
- TreeItem *root = include_files->create_item();
+ _fill_tree(EditorFileSystem::get_singleton()->get_filesystem(), root, current, f);
- _fill_tree(EditorFileSystem::get_singleton()->get_filesystem(), root, current, f == EditorExportPreset::EXPORT_SELECTED_SCENES);
+ if (f == EditorExportPreset::EXPORT_CUSTOMIZED) {
+ _propagate_file_export_mode(include_files->get_root(), EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED);
+ }
+}
+
+void ProjectExportDialog::_setup_item_for_file_mode(TreeItem *p_item, EditorExportPreset::FileExportMode p_mode) {
+ if (p_mode == EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED) {
+ p_item->set_checked(0, false);
+ p_item->set_cell_mode(1, TreeItem::CELL_MODE_STRING);
+ p_item->set_editable(1, false);
+ p_item->set_selectable(1, false);
+ p_item->set_custom_color(1, get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
+ } else {
+ p_item->set_checked(0, true);
+ p_item->set_cell_mode(1, TreeItem::CELL_MODE_CUSTOM);
+ p_item->set_editable(1, true);
+ p_item->set_selectable(1, true);
+ p_item->clear_custom_color(1);
+ }
+ p_item->set_metadata(1, p_mode);
}
-bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem *p_item, Ref<EditorExportPreset> &current, bool p_only_scenes) {
+bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem *p_item, Ref<EditorExportPreset> &current, EditorExportPreset::ExportFilter p_export_filter) {
p_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
p_item->set_icon(0, presets->get_theme_icon(SNAME("folder"), SNAME("FileDialog")));
p_item->set_text(0, p_dir->get_name() + "/");
p_item->set_editable(0, true);
p_item->set_metadata(0, p_dir->get_path());
+ if (p_export_filter == EditorExportPreset::EXPORT_CUSTOMIZED) {
+ _setup_item_for_file_mode(p_item, current->get_file_export_mode(p_dir->get_path()));
+ }
+
bool used = false;
for (int i = 0; i < p_dir->get_subdir_count(); i++) {
TreeItem *subdir = include_files->create_item(p_item);
- if (_fill_tree(p_dir->get_subdir(i), subdir, current, p_only_scenes)) {
+ if (_fill_tree(p_dir->get_subdir(i), subdir, current, p_export_filter)) {
used = true;
} else {
memdelete(subdir);
@@ -771,7 +800,7 @@ bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem
for (int i = 0; i < p_dir->get_file_count(); i++) {
String type = p_dir->get_file_type(i);
- if (p_only_scenes && type != "PackedScene") {
+ if (p_export_filter == EditorExportPreset::EXPORT_SELECTED_SCENES && type != "PackedScene") {
continue;
}
if (type == "TextFile") {
@@ -786,15 +815,37 @@ bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem
file->set_icon(0, EditorNode::get_singleton()->get_class_icon(type));
file->set_editable(0, true);
- file->set_checked(0, current->has_export_file(path));
file->set_metadata(0, path);
- file->propagate_check(0);
+
+ if (p_export_filter == EditorExportPreset::EXPORT_CUSTOMIZED) {
+ _setup_item_for_file_mode(file, current->get_file_export_mode(path));
+ } else {
+ file->set_checked(0, current->has_export_file(path));
+ file->propagate_check(0);
+ }
used = true;
}
return used;
}
+void ProjectExportDialog::_propagate_file_export_mode(TreeItem *p_item, EditorExportPreset::FileExportMode p_inherited_export_mode) {
+ EditorExportPreset::FileExportMode file_export_mode = (EditorExportPreset::FileExportMode)(int)p_item->get_metadata(1);
+ if (file_export_mode == EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED) {
+ file_export_mode = p_inherited_export_mode;
+ }
+
+ if (file_export_mode == EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED) {
+ p_item->set_text(1, "");
+ } else {
+ p_item->set_text(1, file_mode_popup->get_item_text(file_mode_popup->get_item_index(file_export_mode)));
+ }
+
+ for (int i = 0; i < p_item->get_child_count(); i++) {
+ _propagate_file_export_mode(p_item->get_child(i), file_export_mode);
+ }
+}
+
void ProjectExportDialog::_tree_changed() {
if (updating) {
return;
@@ -810,7 +861,20 @@ void ProjectExportDialog::_tree_changed() {
return;
}
- item->propagate_check(0);
+ if (current->get_export_filter() == EditorExportPreset::EXPORT_CUSTOMIZED) {
+ EditorExportPreset::FileExportMode file_mode = EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED;
+ String path = item->get_metadata(0);
+
+ if (item->is_checked(0)) {
+ file_mode = current->get_file_export_mode(path, EditorExportPreset::MODE_FILE_STRIP);
+ }
+
+ current->set_file_export_mode(path, file_mode);
+ _setup_item_for_file_mode(item, file_mode);
+ _propagate_file_export_mode(include_files->get_root(), EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED);
+ } else {
+ item->propagate_check(0);
+ }
}
void ProjectExportDialog::_check_propagated_to_item(Object *p_obj, int column) {
@@ -830,6 +894,31 @@ void ProjectExportDialog::_check_propagated_to_item(Object *p_obj, int column) {
}
}
+void ProjectExportDialog::_tree_popup_edited(bool p_arrow_clicked) {
+ Rect2 bounds = include_files->get_custom_popup_rect();
+ bounds.position += get_global_canvas_transform().get_origin();
+ bounds.size *= get_global_canvas_transform().get_scale();
+ if (!is_embedding_subwindows()) {
+ bounds.position += get_position();
+ }
+ file_mode_popup->popup(bounds);
+}
+
+void ProjectExportDialog::_set_file_export_mode(int p_id) {
+ Ref<EditorExportPreset> current = get_current_preset();
+ if (current.is_null()) {
+ return;
+ }
+
+ TreeItem *item = include_files->get_edited();
+ String path = item->get_metadata(0);
+
+ EditorExportPreset::FileExportMode file_export_mode = (EditorExportPreset::FileExportMode)p_id;
+ current->set_file_export_mode(path, file_export_mode);
+ item->set_metadata(1, file_export_mode);
+ _propagate_file_export_mode(include_files->get_root(), EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED);
+}
+
void ProjectExportDialog::_export_pck_zip() {
Ref<EditorExportPreset> current = get_current_preset();
ERR_FAIL_COND(current.is_null());
@@ -979,9 +1068,6 @@ void ProjectExportDialog::_export_all(bool p_debug) {
}
void ProjectExportDialog::_bind_methods() {
- ClassDB::bind_method("_get_drag_data_fw", &ProjectExportDialog::get_drag_data_fw);
- ClassDB::bind_method("_can_drop_data_fw", &ProjectExportDialog::can_drop_data_fw);
- ClassDB::bind_method("_drop_data_fw", &ProjectExportDialog::drop_data_fw);
ClassDB::bind_method("_export_all", &ProjectExportDialog::_export_all);
ClassDB::bind_method("set_export_path", &ProjectExportDialog::set_export_path);
ClassDB::bind_method("get_export_path", &ProjectExportDialog::get_export_path);
@@ -1022,8 +1108,7 @@ ProjectExportDialog::ProjectExportDialog() {
preset_vb->add_child(mc);
mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
presets = memnew(ItemList);
- // TODO: Must reimplement drag forwarding.
- //presets->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(presets, ProjectExportDialog);
mc->add_child(presets);
presets->connect("item_selected", callable_mp(this, &ProjectExportDialog::_edit_preset));
duplicate_preset = memnew(Button);
@@ -1088,6 +1173,7 @@ ProjectExportDialog::ProjectExportDialog() {
export_filter->add_item(TTR("Export selected scenes (and dependencies)"));
export_filter->add_item(TTR("Export selected resources (and dependencies)"));
export_filter->add_item(TTR("Export all resources in the project except resources checked below"));
+ export_filter->add_item(TTR("Export as dedicated server"));
resources_vb->add_margin_child(TTR("Export Mode:"), export_filter);
export_filter->connect("item_selected", callable_mp(this, &ProjectExportDialog::_export_type_changed));
@@ -1102,6 +1188,36 @@ ProjectExportDialog::ProjectExportDialog() {
include_margin->add_child(include_files);
include_files->connect("item_edited", callable_mp(this, &ProjectExportDialog::_tree_changed));
include_files->connect("check_propagated_to_item", callable_mp(this, &ProjectExportDialog::_check_propagated_to_item));
+ include_files->connect("custom_popup_edited", callable_mp(this, &ProjectExportDialog::_tree_popup_edited));
+
+ server_strip_message = memnew(Label);
+ server_strip_message->set_visible(false);
+ server_strip_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
+ resources_vb->add_child(server_strip_message);
+
+ {
+ List<StringName> resource_names;
+ ClassDB::get_inheriters_from_class("Resource", &resource_names);
+
+ PackedStringArray strippable;
+ for (StringName resource_name : resource_names) {
+ if (ClassDB::has_method(resource_name, "create_placeholder", true)) {
+ strippable.push_back(resource_name);
+ }
+ }
+ strippable.sort();
+
+ String message = TTR("\"Strip Visuals\" will replace the following resources with placeholders:") + " ";
+ message += String(", ").join(strippable);
+ server_strip_message->set_text(message);
+ }
+
+ file_mode_popup = memnew(PopupMenu);
+ add_child(file_mode_popup);
+ file_mode_popup->add_item(TTR("Strip Visuals"), EditorExportPreset::MODE_FILE_STRIP);
+ file_mode_popup->add_item(TTR("Keep"), EditorExportPreset::MODE_FILE_KEEP);
+ file_mode_popup->add_item(TTR("Remove"), EditorExportPreset::MODE_FILE_REMOVE);
+ file_mode_popup->connect("id_pressed", callable_mp(this, &ProjectExportDialog::_set_file_export_mode));
include_filters = memnew(LineEdit);
resources_vb->add_margin_child(
@@ -1115,12 +1231,6 @@ ProjectExportDialog::ProjectExportDialog() {
exclude_filters);
exclude_filters->connect("text_changed", callable_mp(this, &ProjectExportDialog::_filter_changed));
- script_mode = memnew(OptionButton);
- resources_vb->add_margin_child(TTR("GDScript Export Mode:"), script_mode);
- script_mode->add_item(TTR("Text"), (int)EditorExportPreset::MODE_SCRIPT_TEXT);
- script_mode->add_item(TTR("Compiled Bytecode (Faster Loading)"), (int)EditorExportPreset::MODE_SCRIPT_COMPILED);
- script_mode->connect("item_selected", callable_mp(this, &ProjectExportDialog::_script_export_mode_changed));
-
// Feature tags.
VBoxContainer *feature_vb = memnew(VBoxContainer);
diff --git a/editor/export/project_export.h b/editor/export/project_export.h
index 1138d598cb..e53e393432 100644
--- a/editor/export/project_export.h
+++ b/editor/export/project_export.h
@@ -31,11 +31,11 @@
#ifndef PROJECT_EXPORT_H
#define PROJECT_EXPORT_H
+#include "editor/export/editor_export_preset.h"
#include "scene/gui/dialogs.h"
class CheckBox;
class CheckButton;
-class EditorExportPreset;
class EditorFileDialog;
class EditorFileSystemDirectory;
class EditorInspector;
@@ -43,6 +43,7 @@ class EditorPropertyPath;
class ItemList;
class MenuButton;
class OptionButton;
+class PopupMenu;
class RichTextLabel;
class TabContainer;
class Tree;
@@ -75,6 +76,8 @@ private:
LineEdit *include_filters = nullptr;
LineEdit *exclude_filters = nullptr;
Tree *include_files = nullptr;
+ Label *server_strip_message = nullptr;
+ PopupMenu *file_mode_popup = nullptr;
Label *include_label = nullptr;
MarginContainer *include_margin = nullptr;
@@ -86,7 +89,6 @@ private:
LineEdit *custom_features = nullptr;
RichTextLabel *custom_feature_display = nullptr;
- OptionButton *script_mode = nullptr;
LineEdit *script_key = nullptr;
Label *script_key_error = nullptr;
@@ -114,9 +116,13 @@ private:
void _export_type_changed(int p_which);
void _filter_changed(const String &p_filter);
void _fill_resource_tree();
- bool _fill_tree(EditorFileSystemDirectory *p_dir, TreeItem *p_item, Ref<EditorExportPreset> &current, bool p_only_scenes);
+ void _setup_item_for_file_mode(TreeItem *p_item, EditorExportPreset::FileExportMode p_mode);
+ bool _fill_tree(EditorFileSystemDirectory *p_dir, TreeItem *p_item, Ref<EditorExportPreset> &current, EditorExportPreset::ExportFilter p_export_filter);
+ void _propagate_file_export_mode(TreeItem *p_item, EditorExportPreset::FileExportMode p_inherited_export_mode);
void _tree_changed();
void _check_propagated_to_item(Object *p_obj, int column);
+ void _tree_popup_edited(bool p_arrow_clicked);
+ void _set_file_export_mode(int p_id);
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
@@ -152,7 +158,6 @@ private:
void _enc_pck_changed(bool p_pressed);
void _enc_directory_changed(bool p_pressed);
void _enc_filters_changed(const String &p_text);
- void _script_export_mode_changed(int p_mode);
void _script_encryption_key_changed(const String &p_key);
bool _validate_script_encryption_key(const String &p_key);
diff --git a/editor/fbx_importer_manager.cpp b/editor/fbx_importer_manager.cpp
index dfea2e706a..2a005034a5 100644
--- a/editor/fbx_importer_manager.cpp
+++ b/editor/fbx_importer_manager.cpp
@@ -144,12 +144,8 @@ FBXImporterManager::FBXImporterManager() {
browse_dialog = memnew(EditorFileDialog);
browse_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
browse_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
-#if defined(X11_ENABLED)
- browse_dialog->add_filter("FBX2glTF-linux-x86_64");
-#elif defined(OSX_ENABLED)
- browse_dialog->add_filter("FBX2glTF-macos-x86_64");
-#elif defined(WINDOWS_ENABLED)
- browse_dialog->add_filter("FBX2glTF-windows-x86_64");
+#ifdef WINDOWS_ENABLED
+ browse_dialog->add_filter("*.exe");
#endif
browse_dialog->connect("file_selected", callable_mp(this, &FBXImporterManager::_select_file));
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index e66be6ce49..378e06b4c9 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1531,6 +1531,10 @@ void FileSystemDock::_make_scene_confirm() {
EditorNode::get_singleton()->save_scene_list({ scene_path });
}
+void FileSystemDock::_resource_removed(const Ref<Resource> &p_resource) {
+ emit_signal(SNAME("resource_removed"), p_resource);
+}
+
void FileSystemDock::_file_removed(String p_file) {
emit_signal(SNAME("file_removed"), p_file);
@@ -1819,6 +1823,43 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
OS::get_singleton()->shell_open(String("file://") + dir);
} break;
+ case FILE_OPEN_EXTERNAL: {
+ String fpath = path;
+ if (path == "Favorites") {
+ fpath = p_selected[0];
+ }
+
+ String file = ProjectSettings::get_singleton()->globalize_path(fpath);
+
+ String resource_type = ResourceLoader::get_resource_type(fpath);
+ String external_program;
+
+ if (resource_type == "CompressedTexture2D" || resource_type == "Image") {
+ if (file.get_extension() == "svg" || file.get_extension() == "svgz") {
+ external_program = EDITOR_GET("filesystem/external_programs/vector_image_editor");
+ } else {
+ external_program = EDITOR_GET("filesystem/external_programs/raster_image_editor");
+ }
+ } else if (ClassDB::is_parent_class(resource_type, "AudioStream")) {
+ external_program = EDITOR_GET("filesystem/external_programs/audio_editor");
+ } else if (resource_type == "PackedScene") {
+ // Ignore non-model scenes.
+ if (file.get_extension() != "tscn" && file.get_extension() != "scn" && file.get_extension() != "res") {
+ external_program = EDITOR_GET("filesystem/external_programs/3d_model_editor");
+ }
+ } else if (ClassDB::is_parent_class(resource_type, "Script")) {
+ external_program = EDITOR_GET("text_editor/external/exec_path");
+ }
+
+ if (external_program.is_empty()) {
+ OS::get_singleton()->shell_open(file);
+ } else {
+ List<String> args;
+ args.push_back(file);
+ OS::get_singleton()->create_process(external_program, args);
+ }
+ } break;
+
case FILE_OPEN: {
// Open folders.
TreeItem *selected = tree->get_root();
@@ -2051,7 +2092,8 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
if (!fpath.ends_with("/")) {
fpath = fpath.get_base_dir();
}
- ScriptEditor::get_singleton()->open_text_file_create_dialog(fpath);
+ String dir = ProjectSettings::get_singleton()->globalize_path(fpath);
+ ScriptEditor::get_singleton()->open_text_file_create_dialog(dir);
} break;
}
}
@@ -2589,17 +2631,29 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str
if (p_paths.size() == 1) {
p_popup->add_separator();
if (p_display_path_dependent_options) {
- p_popup->add_icon_item(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")), TTR("New Folder..."), FILE_NEW_FOLDER);
- p_popup->add_icon_item(get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")), TTR("New Scene..."), FILE_NEW_SCENE);
- p_popup->add_icon_item(get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), TTR("New Script..."), FILE_NEW_SCRIPT);
- p_popup->add_icon_item(get_theme_icon(SNAME("Object"), SNAME("EditorIcons")), TTR("New Resource..."), FILE_NEW_RESOURCE);
- p_popup->add_icon_item(get_theme_icon(SNAME("TextFile"), SNAME("EditorIcons")), TTR("New TextFile..."), FILE_NEW_TEXTFILE);
+ PopupMenu *new_menu = memnew(PopupMenu);
+ new_menu->set_name("New");
+ new_menu->connect("id_pressed", callable_mp(this, &FileSystemDock::_tree_rmb_option));
+
+ p_popup->add_child(new_menu);
+ p_popup->add_submenu_item(TTR("New"), "New");
+
+ new_menu->add_icon_item(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")), TTR("Folder..."), FILE_NEW_FOLDER);
+ new_menu->add_icon_item(get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")), TTR("Scene..."), FILE_NEW_SCENE);
+ new_menu->add_icon_item(get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), TTR("Script..."), FILE_NEW_SCRIPT);
+ new_menu->add_icon_item(get_theme_icon(SNAME("Object"), SNAME("EditorIcons")), TTR("Resource..."), FILE_NEW_RESOURCE);
+ new_menu->add_icon_item(get_theme_icon(SNAME("TextFile"), SNAME("EditorIcons")), TTR("TextFile..."), FILE_NEW_TEXTFILE);
p_popup->add_separator();
}
String fpath = p_paths[0];
- String item_text = fpath.ends_with("/") ? TTR("Open in File Manager") : TTR("Show in File Manager");
- p_popup->add_icon_item(get_theme_icon(SNAME("Filesystem"), SNAME("EditorIcons")), item_text, FILE_SHOW_IN_EXPLORER);
+ bool is_directory = fpath.ends_with("/");
+ String item_text = is_directory ? TTR("Open in File Manager") : TTR("Show in File Manager");
+ p_popup->add_icon_shortcut(get_theme_icon(SNAME("Filesystem"), SNAME("EditorIcons")), ED_GET_SHORTCUT("filesystem_dock/show_in_explorer"), FILE_SHOW_IN_EXPLORER);
+ p_popup->set_item_text(p_popup->get_item_index(FILE_SHOW_IN_EXPLORER), item_text);
+ if (!is_directory) {
+ p_popup->add_icon_shortcut(get_theme_icon(SNAME("ExternalLink"), SNAME("EditorIcons")), ED_GET_SHORTCUT("filesystem_dock/open_in_external_program"), FILE_OPEN_EXTERNAL);
+ }
path = fpath;
}
}
@@ -2644,7 +2698,7 @@ void FileSystemDock::_tree_empty_click(const Vector2 &p_pos, MouseButton p_butto
tree_popup->add_icon_item(get_theme_icon(SNAME("Object"), SNAME("EditorIcons")), TTR("New Resource..."), FILE_NEW_RESOURCE);
tree_popup->add_icon_item(get_theme_icon(SNAME("TextFile"), SNAME("EditorIcons")), TTR("New TextFile..."), FILE_NEW_TEXTFILE);
tree_popup->add_separator();
- tree_popup->add_icon_item(get_theme_icon(SNAME("Filesystem"), SNAME("EditorIcons")), TTR("Open in File Manager"), FILE_SHOW_IN_EXPLORER);
+ tree_popup->add_icon_shortcut(get_theme_icon(SNAME("Filesystem"), SNAME("EditorIcons")), ED_GET_SHORTCUT("filesystem_dock/show_in_explorer"), FILE_SHOW_IN_EXPLORER);
tree_popup->set_position(tree->get_screen_position() + p_pos);
tree_popup->reset_size();
@@ -2704,7 +2758,8 @@ void FileSystemDock::_file_list_empty_clicked(const Vector2 &p_pos, MouseButton
file_list_popup->add_icon_item(get_theme_icon(SNAME("Object"), SNAME("EditorIcons")), TTR("New Resource..."), FILE_NEW_RESOURCE);
file_list_popup->add_icon_item(get_theme_icon(SNAME("TextFile"), SNAME("EditorIcons")), TTR("New TextFile..."), FILE_NEW_TEXTFILE);
file_list_popup->add_separator();
- file_list_popup->add_icon_item(get_theme_icon(SNAME("Filesystem"), SNAME("EditorIcons")), TTR("Open in File Manager"), FILE_SHOW_IN_EXPLORER);
+ file_list_popup->add_icon_shortcut(get_theme_icon(SNAME("Filesystem"), SNAME("EditorIcons")), ED_GET_SHORTCUT("filesystem_dock/show_in_explorer"), FILE_SHOW_IN_EXPLORER);
+
file_list_popup->set_position(files->get_screen_position() + p_pos);
file_list_popup->reset_size();
file_list_popup->popup();
@@ -2816,6 +2871,10 @@ void FileSystemDock::_tree_gui_input(Ref<InputEvent> p_event) {
_tree_rmb_option(FILE_REMOVE);
} else if (ED_IS_SHORTCUT("filesystem_dock/rename", p_event)) {
_tree_rmb_option(FILE_RENAME);
+ } else if (ED_IS_SHORTCUT("filesystem_dock/show_in_explorer", p_event)) {
+ _tree_rmb_option(FILE_SHOW_IN_EXPLORER);
+ } else if (ED_IS_SHORTCUT("filesystem_dock/open_in_external_program", p_event)) {
+ _tree_rmb_option(FILE_OPEN_EXTERNAL);
} else if (ED_IS_SHORTCUT("editor/open_search", p_event)) {
focus_on_filter();
} else {
@@ -2874,6 +2933,8 @@ void FileSystemDock::_file_list_gui_input(Ref<InputEvent> p_event) {
_file_list_rmb_option(FILE_REMOVE);
} else if (ED_IS_SHORTCUT("filesystem_dock/rename", p_event)) {
_file_list_rmb_option(FILE_RENAME);
+ } else if (ED_IS_SHORTCUT("filesystem_dock/show_in_explorer", p_event)) {
+ _file_list_rmb_option(FILE_SHOW_IN_EXPLORER);
} else if (ED_IS_SHORTCUT("editor/open_search", p_event)) {
focus_on_filter();
} else {
@@ -2884,12 +2945,19 @@ void FileSystemDock::_file_list_gui_input(Ref<InputEvent> p_event) {
}
}
-void FileSystemDock::_get_imported_files(const String &p_path, Vector<String> &r_files) const {
+bool FileSystemDock::_get_imported_files(const String &p_path, String &r_extension, Vector<String> &r_files) const {
if (!p_path.ends_with("/")) {
if (FileAccess::exists(p_path + ".import")) {
+ if (r_extension.is_empty()) {
+ r_extension = p_path.get_extension();
+ } else if (r_extension != p_path.get_extension()) {
+ r_files.clear();
+ return false; // File type mismatch, stop search.
+ }
+
r_files.push_back(p_path);
}
- return;
+ return true;
}
Ref<DirAccess> da = DirAccess::open(p_path);
@@ -2898,11 +2966,14 @@ void FileSystemDock::_get_imported_files(const String &p_path, Vector<String> &r
while (!n.is_empty()) {
if (n != "." && n != ".." && !n.ends_with(".import")) {
String npath = p_path + n + (da->current_is_dir() ? "/" : "");
- _get_imported_files(npath, r_files);
+ if (!_get_imported_files(npath, r_extension, r_files)) {
+ return false;
+ }
}
n = da->get_next();
}
da->list_dir_end();
+ return true;
}
void FileSystemDock::_update_import_dock() {
@@ -2927,10 +2998,16 @@ void FileSystemDock::_update_import_dock() {
}
}
- // Expand directory selection
+ if (!selected.is_empty() && selected[0] == "res://") {
+ // Scanning res:// is costly and unlikely to yield any useful results.
+ return;
+ }
+
+ // Expand directory selection.
Vector<String> efiles;
- for (int i = 0; i < selected.size(); i++) {
- _get_imported_files(selected[i], efiles);
+ String extension;
+ for (const String &fpath : selected) {
+ _get_imported_files(fpath, extension, efiles);
}
// Check import.
@@ -3015,9 +3092,6 @@ void FileSystemDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_tree_thumbnail_done"), &FileSystemDock::_tree_thumbnail_done);
ClassDB::bind_method(D_METHOD("_select_file"), &FileSystemDock::_select_file);
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw", "position", "from"), &FileSystemDock::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw", "position", "data", "from"), &FileSystemDock::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw", "position", "data", "from"), &FileSystemDock::drop_data_fw);
ClassDB::bind_method(D_METHOD("navigate_to_path", "path"), &FileSystemDock::navigate_to_path);
ClassDB::bind_method(D_METHOD("_update_import_dock"), &FileSystemDock::_update_import_dock);
@@ -3025,6 +3099,7 @@ void FileSystemDock::_bind_methods() {
ADD_SIGNAL(MethodInfo("inherit", PropertyInfo(Variant::STRING, "file")));
ADD_SIGNAL(MethodInfo("instantiate", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files")));
+ ADD_SIGNAL(MethodInfo("resource_removed", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
ADD_SIGNAL(MethodInfo("file_removed", PropertyInfo(Variant::STRING, "file")));
ADD_SIGNAL(MethodInfo("folder_removed", PropertyInfo(Variant::STRING, "folder")));
ADD_SIGNAL(MethodInfo("files_moved", PropertyInfo(Variant::STRING, "old_file"), PropertyInfo(Variant::STRING, "new_file")));
@@ -3045,6 +3120,8 @@ FileSystemDock::FileSystemDock() {
ED_SHORTCUT("filesystem_dock/delete", TTR("Delete"), Key::KEY_DELETE);
ED_SHORTCUT("filesystem_dock/rename", TTR("Rename..."), Key::F2);
ED_SHORTCUT_OVERRIDE("filesystem_dock/rename", "macos", Key::ENTER);
+ ED_SHORTCUT("filesystem_dock/show_in_explorer", TTR("Open in File Manager"));
+ ED_SHORTCUT("filesystem_dock/open_in_external_program", TTR("Open in External Program"));
VBoxContainer *top_vbc = memnew(VBoxContainer);
add_child(top_vbc);
@@ -3116,10 +3193,11 @@ FileSystemDock::FileSystemDock() {
tree = memnew(Tree);
tree->set_hide_root(true);
- tree->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(tree, FileSystemDock);
tree->set_allow_rmb_select(true);
tree->set_select_mode(Tree::SELECT_MULTI);
tree->set_custom_minimum_size(Size2(0, 15 * EDSCALE));
+ tree->set_column_clip_content(0, true);
split_box->add_child(tree);
tree->connect("item_activated", callable_mp(this, &FileSystemDock::_tree_activate_file));
@@ -3153,7 +3231,7 @@ FileSystemDock::FileSystemDock() {
files = memnew(ItemList);
files->set_v_size_flags(SIZE_EXPAND_FILL);
files->set_select_mode(ItemList::SELECT_MULTI);
- files->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(files, FileSystemDock);
files->connect("item_clicked", callable_mp(this, &FileSystemDock::_file_list_item_clicked));
files->connect("gui_input", callable_mp(this, &FileSystemDock::_file_list_gui_input));
files->connect("multi_selected", callable_mp(this, &FileSystemDock::_file_multi_selected));
@@ -3181,6 +3259,7 @@ FileSystemDock::FileSystemDock() {
add_child(owners_editor);
remove_dialog = memnew(DependencyRemoveDialog);
+ remove_dialog->connect("resource_removed", callable_mp(this, &FileSystemDock::_resource_removed));
remove_dialog->connect("file_removed", callable_mp(this, &FileSystemDock::_file_removed));
remove_dialog->connect("folder_removed", callable_mp(this, &FileSystemDock::_folder_removed));
add_child(remove_dialog);
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index 2304d8f8ad..ede6869eea 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -94,6 +94,7 @@ private:
FILE_NEW_SCRIPT,
FILE_NEW_SCENE,
FILE_SHOW_IN_EXPLORER,
+ FILE_OPEN_EXTERNAL,
FILE_COPY_PATH,
FILE_COPY_UID,
FILE_NEW_RESOURCE,
@@ -213,7 +214,7 @@ private:
void _file_multi_selected(int p_index, bool p_selected);
void _tree_multi_selected(Object *p_item, int p_column, bool p_selected);
- void _get_imported_files(const String &p_path, Vector<String> &r_files) const;
+ bool _get_imported_files(const String &p_path, String &r_extension, Vector<String> &r_files) const;
void _update_import_dock();
void _get_all_items_in_dir(EditorFileSystemDirectory *p_efsd, Vector<String> &r_files, Vector<String> &r_folders) const;
@@ -226,6 +227,7 @@ private:
void _update_favorites_list_after_move(const HashMap<String, String> &p_files_renames, const HashMap<String, String> &p_folders_renames) const;
void _update_project_settings_after_move(const HashMap<String, String> &p_renames) const;
+ void _resource_removed(const Ref<Resource> &p_resource);
void _file_removed(String p_file);
void _folder_removed(String p_folder);
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index 3ee7d5ddd8..7f0417ea29 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -130,7 +130,7 @@ void GroupDialog::_add_pressed() {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add to Group"));
while (selected) {
@@ -160,7 +160,7 @@ void GroupDialog::_removed_pressed() {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove from Group"));
while (selected) {
@@ -248,7 +248,7 @@ void GroupDialog::_group_renamed() {
renamed_group->set_text(0, name); // Spaces trimmed.
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Rename Group"));
List<Node *> nodes;
@@ -325,7 +325,7 @@ void GroupDialog::_modify_group_pressed(Object *p_item, int p_column, int p_id,
case DELETE_GROUP: {
String name = ti->get_text(0);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete Group"));
List<Node *> nodes;
@@ -597,7 +597,7 @@ void GroupsEditor::_add_group(const String &p_group) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add to Group"));
undo_redo->add_do_method(node, "add_to_group", name, true);
@@ -652,7 +652,7 @@ void GroupsEditor::_group_renamed() {
ti->set_text(0, name); // Spaces trimmed.
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Rename Group"));
undo_redo->add_do_method(node, "remove_from_group", selected_group);
@@ -688,7 +688,7 @@ void GroupsEditor::_modify_group(Object *p_item, int p_column, int p_id, MouseBu
switch (p_id) {
case DELETE_GROUP: {
const String name = ti->get_text(0);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove from Group"));
undo_redo->add_do_method(node, "remove_from_group", name);
diff --git a/editor/history_dock.cpp b/editor/history_dock.cpp
index f9fe1093b8..41ca519400 100644
--- a/editor/history_dock.cpp
+++ b/editor/history_dock.cpp
@@ -221,7 +221,7 @@ void HistoryDock::_notification(int p_notification) {
HistoryDock::HistoryDock() {
set_name("History");
- ur_manager = EditorNode::get_undo_redo();
+ ur_manager = EditorUndoRedoManager::get_singleton();
ur_manager->connect("history_changed", callable_mp(this, &HistoryDock::on_history_changed));
ur_manager->connect("version_changed", callable_mp(this, &HistoryDock::on_version_changed));
diff --git a/editor/history_dock.h b/editor/history_dock.h
index 81d1d02b79..d507f19b07 100644
--- a/editor/history_dock.h
+++ b/editor/history_dock.h
@@ -40,7 +40,7 @@ class EditorUndoRedoManager;
class HistoryDock : public VBoxContainer {
GDCLASS(HistoryDock, VBoxContainer);
- Ref<EditorUndoRedoManager> ur_manager;
+ EditorUndoRedoManager *ur_manager;
ItemList *action_list = nullptr;
CheckBox *current_scene_checkbox = nullptr;
diff --git a/editor/icons/AnimatableBody2D.svg b/editor/icons/AnimatableBody2D.svg
index f4fed813c9..e6057feeff 100644
--- a/editor/icons/AnimatableBody2D.svg
+++ b/editor/icons/AnimatableBody2D.svg
@@ -1 +1 @@
-<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#8da5f3" fill-opacity=".99" stroke-width="1.08904"><path d="m10.86822576 4.28299076h1.99947744v1.99947744h-1.99947744z"/><path d="m10.86822576 10.84273776h1.99947744v1.99947744h-1.99947744z"/><path d="m4.71256576 10.84273776h1.99947744v1.99947744h-1.99947744z"/></g><g fill="none" stroke="#8da5f3"><path d="m1.635 8.161v4.848c0 .713.579 1.293 1.292 1.293h9.857c.713 0 1.291-.58 1.291-1.293v-9.854c0-.714-.578-1.293-1.291-1.293h-5.526" stroke-width="1.07" transform="matrix(.939225 0 0 .938055 1.27996 1.07595)"/><path d="m1.339 1.364 2.539 2.539" stroke-width=".74" transform="matrix(2.04823 .655864 .655864 2.04823 -1.51683 -1.5267)"/><path d="m1.436 1.461 1.168 1.168" stroke-width="1.18" transform="matrix(1.69185 0 0 1.69185 4.50755 -.792876)"/><path d="m1.385 1.41 1.219 1.219" stroke-width="1.22" transform="matrix(1.63859 0 0 1.63859 -.688679 4.82985)"/></g></svg>
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#8da5f3" stroke-width="1.08904"><path d="m10.86822576 4.28299076h1.99947744v1.99947744h-1.99947744z"/><path d="m10.86822576 10.84273776h1.99947744v1.99947744h-1.99947744z"/><path d="m4.71256576 10.84273776h1.99947744v1.99947744h-1.99947744z"/></g><g fill="none" stroke="#8da5f3"><path d="m1.635 8.161v4.848c0 .713.579 1.293 1.292 1.293h9.857c.713 0 1.291-.58 1.291-1.293v-9.854c0-.714-.578-1.293-1.291-1.293h-5.526" stroke-width="1.07" transform="matrix(.939225 0 0 .938055 1.27996 1.07595)"/><path d="m1.339 1.364 2.539 2.539" stroke-width=".74" transform="matrix(2.04823 .655864 .655864 2.04823 -1.51683 -1.5267)"/><path d="m1.436 1.461 1.168 1.168" stroke-width="1.18" transform="matrix(1.69185 0 0 1.69185 4.50755 -.792876)"/><path d="m1.385 1.41 1.219 1.219" stroke-width="1.22" transform="matrix(1.63859 0 0 1.63859 -.688679 4.82985)"/></g></svg>
diff --git a/editor/icons/AnimatableBody3D.svg b/editor/icons/AnimatableBody3D.svg
index 2e472f0625..0724e2cbfa 100644
--- a/editor/icons/AnimatableBody3D.svg
+++ b/editor/icons/AnimatableBody3D.svg
@@ -1 +1 @@
-<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f" fill-opacity=".99" stroke-width="1.08904"><path d="m10.86822576 4.28299076h1.99947744v1.99947744h-1.99947744z"/><path d="m10.86822576 10.84273776h1.99947744v1.99947744h-1.99947744z"/><path d="m4.71256576 10.84273776h1.99947744v1.99947744h-1.99947744z"/></g><g fill="none" stroke="#fc7f7f"><path d="m1.635 8.161v4.848c0 .713.579 1.293 1.292 1.293h9.857c.713 0 1.291-.58 1.291-1.293v-9.854c0-.714-.578-1.293-1.291-1.293h-5.526" stroke-width="1.07" transform="matrix(.939225 0 0 .938055 1.27996 1.07595)"/><path d="m1.339 1.364 2.539 2.539" stroke-width=".74" transform="matrix(2.04823 .655864 .655864 2.04823 -1.51683 -1.5267)"/><path d="m1.436 1.461 1.168 1.168" stroke-width="1.18" transform="matrix(1.69185 0 0 1.69185 4.50755 -.792876)"/><path d="m1.385 1.41 1.219 1.219" stroke-width="1.22" transform="matrix(1.63859 0 0 1.63859 -.688679 4.82985)"/></g></svg>
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f" stroke-width="1.08904"><path d="m10.86822576 4.28299076h1.99947744v1.99947744h-1.99947744z"/><path d="m10.86822576 10.84273776h1.99947744v1.99947744h-1.99947744z"/><path d="m4.71256576 10.84273776h1.99947744v1.99947744h-1.99947744z"/></g><g fill="none" stroke="#fc7f7f"><path d="m1.635 8.161v4.848c0 .713.579 1.293 1.292 1.293h9.857c.713 0 1.291-.58 1.291-1.293v-9.854c0-.714-.578-1.293-1.291-1.293h-5.526" stroke-width="1.07" transform="matrix(.939225 0 0 .938055 1.27996 1.07595)"/><path d="m1.339 1.364 2.539 2.539" stroke-width=".74" transform="matrix(2.04823 .655864 .655864 2.04823 -1.51683 -1.5267)"/><path d="m1.436 1.461 1.168 1.168" stroke-width="1.18" transform="matrix(1.69185 0 0 1.69185 4.50755 -.792876)"/><path d="m1.385 1.41 1.219 1.219" stroke-width="1.22" transform="matrix(1.63859 0 0 1.63859 -.688679 4.82985)"/></g></svg>
diff --git a/editor/icons/AnimationLibrary.svg b/editor/icons/AnimationLibrary.svg
index 0bac67d302..097a53a41d 100644
--- a/editor/icons/AnimationLibrary.svg
+++ b/editor/icons/AnimationLibrary.svg
@@ -1 +1 @@
-<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M14.519 2.006A6 6 0 0 0 8.599 8a6 6 0 0 0 5.92 5.994v-1.01a1 1 0 0 1-.92-.984 1 1 0 0 1 .92-.984V4.984a1 1 0 0 1-.92-.984 1 1 0 0 1 .92-.984Zm-3.432 2.996a1 1 0 0 1 .547.133 1 1 0 0 1 .367 1.365 1 1 0 0 1-1.367.365A1 1 0 0 1 10.27 5.5a1 1 0 0 1 .818-.498ZM11.111 9a1 1 0 0 1 .89.5 1 1 0 0 1-.367 1.365 1 1 0 0 1-1.365-.365 1 1 0 0 1 .365-1.365A1 1 0 0 1 11.111 9Z" style="fill:#e0e0e0;fill-opacity:1"/><path d="M11.094 2.104a6 6 0 0 0-5.92 5.994 6 6 0 0 0 5.92 5.994v-.023a5.795 6.506 0 0 1-2.89-3.104 1 1 0 0 1-1.36-.367 1 1 0 0 1 .365-1.365 1 1 0 0 1 .475-.135 5.795 6.506 0 0 1-.076-.984 5.795 6.506 0 0 1 .082-1.027 1 1 0 0 1-.48-.124 1 1 0 0 1-.366-1.365 1 1 0 0 1 .818-.498 1 1 0 0 1 .547.133 1 1 0 0 1 .004.002 5.795 6.506 0 0 1 2.881-3.076z" style="fill:#e0e0e0;fill-opacity:1"/><path d="M7.616 2.104a6 6 0 0 0-5.92 5.994 6 6 0 0 0 5.92 5.994v-.023a5.795 6.506 0 0 1-2.89-3.104 1 1 0 0 1-1.36-.367 1 1 0 0 1 .366-1.365 1 1 0 0 1 .474-.135 5.795 6.506 0 0 1-.076-.984 5.795 6.506 0 0 1 .082-1.027 1 1 0 0 1-.48-.124 1 1 0 0 1-.366-1.365 1 1 0 0 1 .819-.498 1 1 0 0 1 .547.133 1 1 0 0 1 .003.002 5.795 6.506 0 0 1 2.881-3.076z" style="fill:#e0e0e0;fill-opacity:1"/></svg>
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M14.519 2.006A6 6 0 0 0 8.599 8a6 6 0 0 0 5.92 5.994v-1.01a1 1 0 0 1-.92-.984 1 1 0 0 1 .92-.984V4.984a1 1 0 0 1-.92-.984 1 1 0 0 1 .92-.984Zm-3.432 2.996a1 1 0 0 1 .547.133 1 1 0 0 1 .367 1.365 1 1 0 0 1-1.367.365A1 1 0 0 1 10.27 5.5a1 1 0 0 1 .818-.498ZM11.111 9a1 1 0 0 1 .89.5 1 1 0 0 1-.367 1.365 1 1 0 0 1-1.365-.365 1 1 0 0 1 .365-1.365A1 1 0 0 1 11.111 9Z" fill="#e0e0e0"/><path d="M11.094 2.104a6 6 0 0 0-5.92 5.994 6 6 0 0 0 5.92 5.994v-.023a5.795 6.506 0 0 1-2.89-3.104 1 1 0 0 1-1.36-.367 1 1 0 0 1 .365-1.365 1 1 0 0 1 .475-.135 5.795 6.506 0 0 1-.076-.984 5.795 6.506 0 0 1 .082-1.027 1 1 0 0 1-.48-.124 1 1 0 0 1-.366-1.365 1 1 0 0 1 .818-.498 1 1 0 0 1 .547.133 1 1 0 0 1 .004.002 5.795 6.506 0 0 1 2.881-3.076z" fill="#e0e0e0"/><path d="M7.616 2.104a6 6 0 0 0-5.92 5.994 6 6 0 0 0 5.92 5.994v-.023a5.795 6.506 0 0 1-2.89-3.104 1 1 0 0 1-1.36-.367 1 1 0 0 1 .366-1.365 1 1 0 0 1 .474-.135 5.795 6.506 0 0 1-.076-.984 5.795 6.506 0 0 1 .082-1.027 1 1 0 0 1-.48-.124 1 1 0 0 1-.366-1.365 1 1 0 0 1 .819-.498 1 1 0 0 1 .547.133 1 1 0 0 1 .003.002 5.795 6.506 0 0 1 2.881-3.076z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/BoneMapHumanBody.svg b/editor/icons/BoneMapHumanBody.svg
index 8674157aaa..818ee63069 100644
--- a/editor/icons/BoneMapHumanBody.svg
+++ b/editor/icons/BoneMapHumanBody.svg
@@ -1,26 +1 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
- y="0px" width="1024px" height="1024px" viewBox="0 0 1024 1024" enable-background="new 0 0 1024 1024" xml:space="preserve">
-<path fill="#3F3F3F" d="M0,0h1024v1024H0V0z"/>
-<path fill="#B2B2B2" d="M512,536.162c7,35,11.645,66.898,14,114c2,40,4,51,2,66c-7.384,55.369,6.77,183.898,8.666,206.667
- c2,24-7.653,24.241-10.666,46.333c-2.449,17.958,79,18.439,65-9c-25-49-2-84,4-221c0.521-11.921-8.967-47.874-2-94
- c11.086-73.414,8.42-107.242,6.5-145.662c-1.245-31.973-1-56.963-9-138.963c-0.976-10.002,5.915-79.268,11.954-79.088
- c42,1.25,97.313-5.009,118.145-14.68c28.901,3.73,97.81-12.047,127.887-16.126c14.541,9.407,16.673,3.335,37.515,9.019
- c5.5,1.5,17.336-1.443,12-5c-7.409-4.937-20.75-8.25-23-12c10.75-2.5,22.365-9.578,36-13.166c9.5-2.5,18.866-11.748,15.5-12.334l0,0
- c-11.5-2-26.03,4.547-37.5,6.5c-15.724,2.678-25.238,3.24-33.334,5.167c-1.227,0.292-3.103,0.763-5.791,0.958
- c0,0-0.02,0.16-0.053,0.437c-36.818,0.994-80.322-9.724-130.31-5.569c-34.026-3.925-94.181-5.16-113.513-5.493
- c-13.911-0.239-59.293-2.583-71.75-0.5c-0.668-4.083-1.5-9.75,0.949-16.468c14.881-7.246,19.188-17.796,27.301-34.694
- c0.922,4.424,6.252,4.929,12.459-14.231c5.661-17.478,2.323-22.254-2.313-22.525c0.172-2.056,0.279-4.105,0.313-6.142
- C573.746,76.562,566,42.163,512,42.163s-61.746,34.399-60.959,82.44c0.034,2.037,0.142,4.086,0.313,6.142
- c-4.637,0.271-7.975,5.047-2.313,22.525c6.207,19.16,11.537,18.655,12.459,14.231c8.112,16.898,12.42,27.448,27.301,34.694
- c2.449,6.718,1.617,12.385,0.949,16.468c-12.457-2.083-57.839,0.261-71.75,0.5c-19.332,0.333-79.486,1.568-113.513,5.493
- c-49.987-4.155-93.491,6.563-130.31,5.569c-0.033-0.277-0.053-0.437-0.053-0.437c-2.688-0.195-4.564-0.666-5.791-0.958
- c-8.096-1.927-17.61-2.489-33.334-5.167c-11.47-1.953-26-8.5-37.5-6.5l0,0c-3.366,0.586,6,9.834,15.5,12.334
- c13.635,3.588,25.25,10.666,36,13.166c-2.25,3.75-15.591,7.063-23,12c-5.336,3.557,6.5,6.5,12,5
- c20.842-5.684,22.974,0.388,37.515-9.019c30.077,4.079,98.985,19.857,127.887,16.126c20.832,9.671,76.145,15.93,118.145,14.68
- c6.039-0.18,12.93,69.085,11.954,79.088c-8,82-7.755,106.99-9,138.963c-1.92,38.419-4.586,72.248,6.5,145.662
- c6.967,46.126-2.521,82.079-2,94c6,137,29,172,4,221c-14,27.439,67.449,26.958,65,9c-3.013-22.092-12.666-22.333-10.666-46.333
- c1.896-22.769,16.05-151.298,8.666-206.667c-2-15,0-26,2-66C500.356,603.061,505,571.162,512,536.162z"/>
-</svg>
+<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1451_455)"><path d="M0 0H256V256H0V0Z" fill="#3F3F3F"/><path d="M128 134.04C129.75 142.79 130.911 150.765 131.5 162.54C132 172.54 132.5 175.29 132 179.04C130.154 192.883 133.692 225.015 134.166 230.707C134.666 236.707 132.253 236.767 131.5 242.29C130.888 246.78 151.25 246.9 147.75 240.04C141.5 227.79 147.25 219.04 148.75 184.79C148.88 181.81 146.508 172.822 148.25 161.29C151.021 142.937 150.355 134.48 149.875 124.875C149.564 116.882 149.625 110.634 147.625 90.134C147.381 87.6335 149.104 70.317 150.613 70.362C161.113 70.6745 174.942 69.1098 180.15 66.692C187.375 67.6245 204.602 63.6803 212.121 62.6605C215.757 65.0123 216.29 63.4943 221.5 64.9153C222.875 65.2903 225.834 64.5545 224.5 63.6653C222.648 62.431 219.313 61.6028 218.75 60.6653C221.438 60.0403 224.341 58.2708 227.75 57.3738C230.125 56.7488 232.467 54.4368 231.625 54.2903C228.75 53.7903 225.118 55.427 222.25 55.9153C218.319 56.5848 215.941 56.7253 213.917 57.207C213.61 57.28 213.141 57.3978 212.469 57.4465C212.469 57.4465 212.464 57.4865 212.456 57.5558C203.251 57.8043 192.375 55.1248 179.878 56.1635C171.372 55.1823 156.333 54.8735 151.5 54.7903C148.022 54.7305 136.677 54.1445 133.562 54.6653C133.395 53.6445 133.187 52.2278 133.8 50.5483C137.52 48.7368 138.597 46.0993 140.625 41.8748C140.855 42.9808 142.188 43.107 143.74 38.317C145.155 33.9475 144.32 32.7535 143.161 32.6858C143.204 32.1718 143.231 31.6595 143.24 31.1503C143.436 19.1403 141.5 10.5405 128 10.5405C114.5 10.5405 112.563 19.1403 112.76 31.1505C112.769 31.6598 112.796 32.172 112.838 32.686C111.679 32.7538 110.845 33.9478 112.26 38.3173C113.812 43.1073 115.144 42.981 115.375 41.875C117.403 46.0995 118.48 48.737 122.2 50.5485C122.812 52.228 122.604 53.6448 122.437 54.6655C119.323 54.1448 107.978 54.7308 104.5 54.7905C99.6669 54.8738 84.6284 55.1825 76.1217 56.1638C63.6249 55.125 52.7489 57.8045 43.5442 57.556C43.5359 57.4868 43.5309 57.4468 43.5309 57.4468C42.8589 57.398 42.3899 57.2803 42.0832 57.2073C40.0592 56.7255 37.6807 56.585 33.7497 55.9155C30.8822 55.4273 27.2497 53.7905 24.3747 54.2905C23.5332 54.437 25.8747 56.749 28.2497 57.374C31.6584 58.271 34.5622 60.0405 37.2497 60.6655C36.6872 61.603 33.3519 62.4313 31.4997 63.6655C30.1657 64.5548 33.1247 65.2905 34.4997 64.9155C39.7102 63.4945 40.2432 65.0125 43.8784 62.6608C51.3977 63.6805 68.6247 67.625 75.8502 66.6923C81.0582 69.11 94.8864 70.6748 105.386 70.3623C106.896 70.3173 108.619 87.6335 108.375 90.1343C106.375 110.634 106.436 116.882 106.125 124.875C105.645 134.48 104.978 142.937 107.75 161.291C109.492 172.822 107.12 181.81 107.25 184.791C108.75 219.041 114.5 227.791 108.25 240.041C104.75 246.9 125.112 246.78 124.5 242.291C123.747 236.768 121.333 236.707 121.833 230.707C122.307 225.015 125.846 192.883 124 179.041C123.5 175.291 124 172.541 124.5 162.541C125.089 150.765 126.25 142.79 128 134.04Z" fill="#B2B2B2"/></g><defs><clipPath id="clip0_1451_455"><rect width="256" height="256" fill="white"/></clipPath></defs></svg>
diff --git a/editor/icons/BoneMapHumanFace.svg b/editor/icons/BoneMapHumanFace.svg
index 6cb21140bc..e38c5cb790 100644
--- a/editor/icons/BoneMapHumanFace.svg
+++ b/editor/icons/BoneMapHumanFace.svg
@@ -1 +1 @@
-<svg enable-background="new 0 0 1024 1024" height="1024" viewBox="0 0 1024 1024" width="1024" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h1024v1024h-1024z" fill="#3f3f3f"/><path d="m788.105 552.967c17.995-57.892 31.896-124.566 30.875-198.071-3.758-270.403-249.846-251.479-295.568-244.947-359.868 51.409-219.047 452.358-220.453 496.426-4.899 153.499 83.686 170.991 161.665 215.554 2.646 1.512 7.259 1.786 13.313 1.111 7.223 25.179 11.762 59.035 9.548 75.638-3.266 24.495 209.021 24.495 209.021 0 0-62.883 12.233-124.363 33.827-188.89 7.143-2.284 16.054-7.601 25.963-16.95 13.681-12.908 34.839-21.774 45.726-63.145 15.615-59.338 3.869-76.074-13.917-76.726z" fill="#b2b2b2"/></svg>
+<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1451_458)"><path d="M0 0H256V256H0V0Z" fill="#3F3F3F"/><path d="M197.026 138.242C201.525 123.769 205 107.1 204.745 88.724C203.805 21.1232 142.283 25.8542 130.853 27.4872C40.8859 40.3395 76.0912 140.577 75.7397 151.594C74.5149 189.968 96.6612 194.342 116.156 205.482C116.817 205.86 117.971 205.929 119.484 205.76C121.29 212.055 122.425 220.519 121.871 224.669C121.055 230.793 174.126 230.793 174.126 224.669C174.126 208.949 177.185 193.579 182.583 177.447C184.369 176.876 186.597 175.547 189.074 173.21C192.494 169.983 197.784 167.766 200.505 157.423C204.409 142.589 201.473 138.405 197.026 138.242Z" fill="#B2B2B2"/></g><defs><clipPath id="clip0_1451_458"><rect width="256" height="256" fill="white"/></clipPath></defs></svg>
diff --git a/editor/icons/BoneMapHumanLeftHand.svg b/editor/icons/BoneMapHumanLeftHand.svg
index 08c68bb4be..a9861f818c 100644
--- a/editor/icons/BoneMapHumanLeftHand.svg
+++ b/editor/icons/BoneMapHumanLeftHand.svg
@@ -1 +1 @@
-<svg enable-background="new 0 0 1024 1024" height="1024" viewBox="0 0 1024 1024" width="1024" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h1024v1024h-1024z" fill="#3f3f3f"/><path d="m703.906 786.098c7.046-66.929 28.135-153.363 18.529-260.192-1.143-12.71-4.5-48.282-4.46-82.732.025-21.174-2.111-48.505-1.975-64.174.167-19.333-.428-41.584-.625-55.755-1.052-75.44-13.225-85.827-30.813-85.827-17.246 0-26.77 14.266-27.062 84.582-.061 14.42.5 51 .5 58.5 0 17.508-.333 34.167 0 53.5.447 25.955-4.279 68-9 68-3.902 0-8.099-39.299-9.575-76.999-.756-19.326-3.219-58.336-2.6-70.102 1.759-33.413.474-58.914 1.537-90.165 3.183-93.607-13.016-111.729-34.695-111.729-21.973 0-35.979 57.688-34.849 114.224.128 6.394-1.165 50.739.188 89.859.754 21.811-1.07 49.627-1.683 69.67-1.095 35.768-5.755 63.896-8.869 63.896-2.641 0-4.135-32.584-5.456-65.706-.859-21.557-4.468-58.477-3.664-83.616 1.886-59.012-1.139-110.226-1.063-121.501.635-94.955-14.66-123.101-36.052-123.101-21.476 0-37.188 30.192-36.6 123.343.067 10.53-2.62 99.926-1.759 121.816.865 21.992-2.773 65.062-3.517 84.818-1.299 34.521-6.49 63.947-9.124 63.947-3.281 0-10.794-25.638-11.724-60.965-.587-22.275 1.231-50.99.624-70.688-1.257-40.707-3.175-64.631-3.877-99.708-1.945-97.182-16.352-106.289-38.142-106.289-17.957 0-32.453 28.673-32.657 115.03-.065 27.702-2.429 62.626-.315 94.329.805 12.081-.622 42.512-1.875 73.894-.799 20.007-1.102 47.501-1.137 63.775-.17 78.595-26.712 133.424-36.555 131.308-30.333-6.521-51.648-43.918-71.219-117.307-10.551-39.566-36.667-71.149-69.9-77.813-25.9-5.193-19.783 46.161-1.319 125.293 8.65 37.068 27.909 86.227 39.566 122.655 31.653 98.917 125.574 188.563 160.903 228.546 17.146 19.403 236.894 19.403 264.59 0 11.525-8.07 43.087-101.557 45.724-126.616z" fill="#b2b2b2"/></svg>
+<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1451_461)"><path d="M0 0H256V256H0V0Z" fill="#3F3F3F"/><path d="M175.976 196.525C177.738 179.792 183.01 158.184 180.609 131.477C180.323 128.299 179.484 119.406 179.494 110.794C179.5 105.5 178.966 98.6674 179 94.7501C179.042 89.9169 178.893 84.3541 178.844 80.8114C178.581 61.9514 175.537 59.3546 171.14 59.3546C166.829 59.3546 164.448 62.9211 164.375 80.5001C164.36 84.1051 164.5 93.2501 164.5 95.1251C164.5 99.5021 164.417 103.667 164.5 108.5C164.612 114.989 163.43 125.5 162.25 125.5C161.274 125.5 160.225 115.675 159.856 106.25C159.667 101.419 159.051 91.6664 159.206 88.7249C159.646 80.3716 159.325 73.9964 159.59 66.1836C160.386 42.7819 156.336 38.2514 150.917 38.2514C145.423 38.2514 141.922 52.6734 142.204 66.8074C142.236 68.4059 141.913 79.4921 142.251 89.2721C142.44 94.7249 141.984 101.679 141.831 106.69C141.557 115.632 140.392 122.664 139.613 122.664C138.953 122.664 138.58 114.518 138.249 106.237C138.035 100.848 137.132 91.6179 137.333 85.3331C137.805 70.5801 137.049 57.7766 137.068 54.9579C137.226 31.2191 133.403 24.1826 128.055 24.1826C122.686 24.1826 118.758 31.7306 118.905 55.0184C118.921 57.6509 118.25 79.9999 118.465 85.4724C118.681 90.9704 117.772 101.738 117.586 106.677C117.261 115.307 115.963 122.664 115.305 122.664C114.484 122.664 112.606 116.254 112.374 107.422C112.227 101.854 112.681 94.6749 112.53 89.7504C112.215 79.5736 111.736 73.5926 111.56 64.8234C111.074 40.5279 107.472 38.2511 102.025 38.2511C97.5357 38.2511 93.9117 45.4194 93.8607 67.0086C93.8445 73.9341 93.2535 82.6651 93.782 90.5909C93.9832 93.6111 93.6265 101.219 93.3132 109.064C93.1135 114.066 93.0377 120.94 93.029 125.008C92.9865 144.657 86.351 158.364 83.8902 157.835C76.307 156.205 70.9782 146.856 66.0855 128.508C63.4477 118.617 56.9187 110.721 48.6105 109.055C42.1355 107.757 43.6647 120.595 48.2807 140.378C50.4432 149.645 55.258 161.935 58.1722 171.042C66.0855 195.771 89.5657 218.183 98.398 228.179C102.684 233.029 157.621 233.029 164.545 228.179C167.427 226.161 175.317 202.789 175.976 196.525Z" fill="#B2B2B2"/></g><defs><clipPath id="clip0_1451_461"><rect width="256" height="256" fill="white"/></clipPath></defs></svg>
diff --git a/editor/icons/BoneMapHumanRightHand.svg b/editor/icons/BoneMapHumanRightHand.svg
index 4e40af35d8..e92898152f 100644
--- a/editor/icons/BoneMapHumanRightHand.svg
+++ b/editor/icons/BoneMapHumanRightHand.svg
@@ -1 +1 @@
-<svg enable-background="new 0 0 1024 1024" height="1024" viewBox="0 0 1024 1024" width="1024" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h1024v1024h-1024z" fill="#3f3f3f"/><path d="m320.094 786.098c-7.046-66.929-28.135-153.363-18.529-260.192 1.143-12.71 4.5-48.282 4.46-82.732-.025-21.174 2.111-48.505 1.975-64.174-.167-19.333.428-41.584.625-55.755 1.052-75.44 13.225-85.827 30.813-85.827 17.246 0 26.77 14.266 27.062 84.582.061 14.42-.5 51-.5 58.5 0 17.508.333 34.167 0 53.5-.447 25.955 4.279 68 9 68 3.902 0 8.099-39.299 9.575-76.999.756-19.326 3.219-58.336 2.6-70.102-1.759-33.413-.474-58.914-1.537-90.165-3.183-93.607 13.016-111.729 34.695-111.729 21.973 0 35.979 57.688 34.849 114.224-.128 6.394 1.165 50.739-.188 89.859-.754 21.811 1.07 49.627 1.683 69.67 1.095 35.768 5.755 63.896 8.869 63.896 2.641 0 4.135-32.584 5.456-65.706.859-21.557 4.468-58.477 3.664-83.616-1.886-59.012 1.139-110.226 1.063-121.501-.635-94.955 14.66-123.101 36.052-123.101 21.476 0 37.188 30.192 36.6 123.343-.067 10.53 2.62 99.926 1.759 121.816-.865 21.992 2.773 65.062 3.517 84.818 1.299 34.521 6.49 63.947 9.124 63.947 3.281 0 10.794-25.638 11.724-60.965.587-22.275-1.231-50.99-.624-70.688 1.257-40.707 3.176-64.631 3.877-99.708 1.945-97.182 16.352-106.289 38.142-106.289 17.957 0 32.453 28.673 32.657 115.03.065 27.702 2.429 62.626.314 94.329-.805 12.081.622 42.512 1.875 73.894.799 20.007 1.102 47.501 1.137 63.775.171 78.595 26.713 133.424 36.556 131.308 30.333-6.521 51.648-43.918 71.219-117.307 10.551-39.566 36.667-71.149 69.9-77.813 25.9-5.193 19.783 46.161 1.318 125.293-8.649 37.068-27.909 86.227-39.566 122.655-31.652 98.917-125.573 188.563-160.902 228.546-17.146 19.403-236.894 19.403-264.59 0-11.525-8.07-43.087-101.557-45.724-126.616z" fill="#b2b2b2"/></svg>
+<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1451_464)"><path d="M0 0H256V256H0V0Z" fill="#3F3F3F"/><path d="M80.0233 196.525C78.2618 179.792 72.9896 158.184 75.3911 131.477C75.6768 128.299 76.5161 119.406 76.5061 110.794C76.4998 105.5 77.0338 98.6674 76.9998 94.7501C76.9581 89.9169 77.1068 84.3541 77.1561 80.8114C77.4191 61.9514 80.4623 59.3546 84.8593 59.3546C89.1708 59.3546 91.5518 62.9211 91.6248 80.5001C91.6401 84.1051 91.4998 93.2501 91.4998 95.1251C91.4998 99.5021 91.5831 103.667 91.4998 108.5C91.3881 114.989 92.5696 125.5 93.7498 125.5C94.7253 125.5 95.7746 115.675 96.1436 106.25C96.3326 101.419 96.9483 91.6664 96.7935 88.7249C96.3538 80.3716 96.6751 73.9964 96.4093 66.1836C95.6136 42.7819 99.6633 38.2514 105.083 38.2514C110.576 38.2514 114.078 52.6734 113.795 66.8074C113.763 68.4059 114.087 79.4921 113.748 89.2721C113.56 94.7249 114.016 101.679 114.169 106.69C114.443 115.632 115.608 122.664 116.386 122.664C117.047 122.664 117.42 114.518 117.75 106.237C117.965 100.848 118.867 91.6179 118.666 85.3331C118.195 70.5801 118.951 57.7766 118.932 54.9579C118.773 31.2191 122.597 24.1826 127.945 24.1826C133.314 24.1826 137.242 31.7306 137.095 55.0184C137.078 57.6509 137.75 79.9999 137.535 85.4724C137.319 90.9704 138.228 101.738 138.414 106.677C138.739 115.307 140.037 122.664 140.695 122.664C141.515 122.664 143.394 116.254 143.626 107.422C143.773 101.854 143.318 94.6749 143.47 89.7504C143.784 79.5736 144.264 73.5926 144.439 64.8234C144.926 40.5279 148.527 38.2511 153.975 38.2511C158.464 38.2511 162.088 45.4194 162.139 67.0086C162.155 73.9341 162.746 82.6651 162.218 90.5909C162.016 93.6111 162.373 101.219 162.686 109.064C162.886 114.066 162.962 120.94 162.971 125.008C163.013 144.657 169.649 158.364 172.11 157.835C179.693 156.205 185.022 146.856 189.914 128.508C192.552 118.617 199.081 110.721 207.389 109.055C213.864 107.757 212.335 120.595 207.719 140.378C205.557 149.645 200.742 161.935 197.827 171.042C189.914 195.771 166.434 218.183 157.602 228.179C153.315 233.029 98.3783 233.029 91.4543 228.179C88.5731 226.161 80.6826 202.789 80.0233 196.525Z" fill="#B2B2B2"/></g><defs><clipPath id="clip0_1451_464"><rect width="256" height="256" fill="white"/></clipPath></defs></svg>
diff --git a/editor/icons/CPUParticles2D.svg b/editor/icons/CPUParticles2D.svg
index 2a2c616954..a446039b81 100644
--- a/editor/icons/CPUParticles2D.svg
+++ b/editor/icons/CPUParticles2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4.5587261.60940813c-.4226244 0-.7617187.3410473-.7617187.76367177v.5078126c0 .1028478.020058.199689.056641.2890624h-1.1933597c-.4226245 0-.7617188.3390944-.7617188.7617188v.921875c-.040428-.00657-.0767989-.0234375-.1191406-.0234375h-.5078125c-.42262448 0-.76367188.3410475-.76367188.7636719v.3730468c0 .4226245.3410474.7617188.76367188.7617188h.5078125c.042396 0 .078663-.016851.1191406-.023437v4.4531248c-.040428-.0066-.076799-.02344-.1191406-.02344h-.5078125c-.42262448 0-.76367188.341047-.76367188.763672v.373047c0 .422625.3410474.761718.76367188.761718h.5078125c.042396 0 .078663-.01685.1191406-.02344v1.125c0 .422624.3390944.763672.7617188.763672h1.1367187v.457031c0 .422624.3390943.763672.7617187.763672h.3730469c.4226244 0 .7636719-.341048.7636719-.763672v-.457031h4.4062501v.457031c0 .422624.339094.763672.761719.763672h.373047c.422624 0 .763671-.341048.763671-.763672v-.457031h1.269532c.422625 0 .763672-.341048.763672-.763672v-1.111328c.01774.0012.03272.0098.05078.0098h.507812c.422624 0 .763672-.339093.763672-.761718v-.373047c0-.422624-.341048-.763672-.763672-.763672h-.507812c-.01803 0-.03307.0085-.05078.0098v-4.4258454c.01774.00122.03272.00977.05078.00977h.507812c.422624 0 .763672-.3390943.763672-.7617188v-.3730512c0-.4226244-.341048-.7636719-.763672-.7636719h-.507812c-.01803 0-.03307.00855-.05078.00977v-.9082075c0-.4226244-.341047-.7617187-.763672-.7617188h-1.328125c.03658-.089375.05859-.1862118.05859-.2890624v-.5078126c0-.42262437-.341047-.76367177-.763671-.76367177h-.373047c-.422625 0-.761719.3410474-.761719.76367177v.5078126c0 .1028478.02006.1996891.05664.2890624h-4.5214809c.036585-.0893749.0585938-.1862118.0585938-.2890624v-.5078126c0-.42262437-.3410475-.76367177-.7636719-.76367177zm3.2382813 2.35742177a3.279661 3.6440678 0 0 1 3.2128906 2.9394532 2.1864407 2.1864407 0 0 1 1.888672 2.1621094 2.1864407 2.1864407 0 0 1 -2.1875 2.1855475h-5.8300782a2.1864407 2.1864407 0 0 1 -2.1855469-2.1855475 2.1864407 2.1864407 0 0 1 1.8847656-2.1640626 3.279661 3.6440678 0 0 1 3.2167969-2.9375zm-2.9160156 8.0156251a.72881355.72881355 0 0 1 .7285156.728516.72881355.72881355 0 0 1 -.7285156.730469.72881355.72881355 0 0 1 -.7285157-.730469.72881355.72881355 0 0 1 .7285157-.728516zm5.8300782 0a.72881355.72881355 0 0 1 .730469.728516.72881355.72881355 0 0 1 -.730469.730469.72881355.72881355 0 0 1 -.7285157-.730469.72881355.72881355 0 0 1 .7285157-.728516zm-2.9140626.728516a.72881355.72881355 0 0 1 .7285156.730469.72881355.72881355 0 0 1 -.7285156.728515.72881355.72881355 0 0 1 -.7285156-.728515.72881355.72881355 0 0 1 .7285156-.730469z" fill="#8da5f3" fill-opacity=".992157"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4.5587261.60940813c-.4226244 0-.7617187.3410473-.7617187.76367177v.5078126c0 .1028478.020058.199689.056641.2890624h-1.1933597c-.4226245 0-.7617188.3390944-.7617188.7617188v.921875c-.040428-.00657-.0767989-.0234375-.1191406-.0234375h-.5078125c-.42262448 0-.76367188.3410475-.76367188.7636719v.3730468c0 .4226245.3410474.7617188.76367188.7617188h.5078125c.042396 0 .078663-.016851.1191406-.023437v4.4531248c-.040428-.0066-.076799-.02344-.1191406-.02344h-.5078125c-.42262448 0-.76367188.341047-.76367188.763672v.373047c0 .422625.3410474.761718.76367188.761718h.5078125c.042396 0 .078663-.01685.1191406-.02344v1.125c0 .422624.3390944.763672.7617188.763672h1.1367187v.457031c0 .422624.3390943.763672.7617187.763672h.3730469c.4226244 0 .7636719-.341048.7636719-.763672v-.457031h4.4062501v.457031c0 .422624.339094.763672.761719.763672h.373047c.422624 0 .763671-.341048.763671-.763672v-.457031h1.269532c.422625 0 .763672-.341048.763672-.763672v-1.111328c.01774.0012.03272.0098.05078.0098h.507812c.422624 0 .763672-.339093.763672-.761718v-.373047c0-.422624-.341048-.763672-.763672-.763672h-.507812c-.01803 0-.03307.0085-.05078.0098v-4.4258454c.01774.00122.03272.00977.05078.00977h.507812c.422624 0 .763672-.3390943.763672-.7617188v-.3730512c0-.4226244-.341048-.7636719-.763672-.7636719h-.507812c-.01803 0-.03307.00855-.05078.00977v-.9082075c0-.4226244-.341047-.7617187-.763672-.7617188h-1.328125c.03658-.089375.05859-.1862118.05859-.2890624v-.5078126c0-.42262437-.341047-.76367177-.763671-.76367177h-.373047c-.422625 0-.761719.3410474-.761719.76367177v.5078126c0 .1028478.02006.1996891.05664.2890624h-4.5214809c.036585-.0893749.0585938-.1862118.0585938-.2890624v-.5078126c0-.42262437-.3410475-.76367177-.7636719-.76367177zm3.2382813 2.35742177a3.279661 3.6440678 0 0 1 3.2128906 2.9394532 2.1864407 2.1864407 0 0 1 1.888672 2.1621094 2.1864407 2.1864407 0 0 1 -2.1875 2.1855475h-5.8300782a2.1864407 2.1864407 0 0 1 -2.1855469-2.1855475 2.1864407 2.1864407 0 0 1 1.8847656-2.1640626 3.279661 3.6440678 0 0 1 3.2167969-2.9375zm-2.9160156 8.0156251a.72881355.72881355 0 0 1 .7285156.728516.72881355.72881355 0 0 1 -.7285156.730469.72881355.72881355 0 0 1 -.7285157-.730469.72881355.72881355 0 0 1 .7285157-.728516zm5.8300782 0a.72881355.72881355 0 0 1 .730469.728516.72881355.72881355 0 0 1 -.730469.730469.72881355.72881355 0 0 1 -.7285157-.730469.72881355.72881355 0 0 1 .7285157-.728516zm-2.9140626.728516a.72881355.72881355 0 0 1 .7285156.730469.72881355.72881355 0 0 1 -.7285156.728515.72881355.72881355 0 0 1 -.7285156-.728515.72881355.72881355 0 0 1 .7285156-.730469z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/CollisionPolygon2D.svg b/editor/icons/CollisionPolygon2D.svg
index a882943847..215bcc0d08 100644
--- a/editor/icons/CollisionPolygon2D.svg
+++ b/editor/icons/CollisionPolygon2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 1050.4h-12v-12h12l-6 6z" fill="none" stroke="#8da5f3" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2" transform="translate(0 -1036.4)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 1050.4h-12v-12h12l-6 6z" fill="none" stroke="#8da5f3" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/CollisionShape2D.svg b/editor/icons/CollisionShape2D.svg
index 0acad74379..3f15d173b8 100644
--- a/editor/icons/CollisionShape2D.svg
+++ b/editor/icons/CollisionShape2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 1050.4h-12v-12h12z" fill="none" stroke="#8da5f3" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2" transform="translate(0 -1036.4)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 1050.4h-12v-12h12z" fill="none" stroke="#8da5f3" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/DampedSpringJoint2D.svg b/editor/icons/DampedSpringJoint2D.svg
index 99e1a1f1e1..cba54bbd99 100644
--- a/editor/icons/DampedSpringJoint2D.svg
+++ b/editor/icons/DampedSpringJoint2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".98824"><path d="m4 3v2l8 3v-2zm0 5v2l8 3v-2z" fill="#4b70ea"/><path d="m4 3v2l8-2v-2zm0 5v2l8-2v-2zm0 5v2l8-2v-2z" fill="#8da5f3"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 3v2l8 3v-2zm0 5v2l8 3v-2z" fill="#4b70ea"/><path d="m4 3v2l8-2v-2zm0 5v2l8-2v-2zm0 5v2l8-2v-2z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/FontFile.svg b/editor/icons/FontFile.svg
index c014299783..6b98c269f8 100644
--- a/editor/icons/FontFile.svg
+++ b/editor/icons/FontFile.svg
@@ -1 +1 @@
-<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 7.5h-1a.519.519 0 0 0-.281.084A.491.491 0 0 0 6 8v.5h-.5V9a1 1 0 0 1-1 1v1H8V9.854A1 1 0 0 1 7.5 9V7.5zM1.5 1v3h1a1 1 0 0 1 1-1h2v1.5h2V3h2a1 1 0 0 1 1 1h1V1h-10z" style="fill:#e0e0e0;fill-opacity:1"/><path d="M4.5 5v3h1a1 1 0 0 1 1-1h2v6a1 1 0 0 1-1 1v1h4v-1a1 1 0 0 1-1-1V7h2a1 1 0 0 1 1 1h1V5h-6z" fill="#ff5f5f"/></svg>
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 7.5h-1a.519.519 0 0 0-.281.084A.491.491 0 0 0 6 8v.5h-.5V9a1 1 0 0 1-1 1v1H8V9.854A1 1 0 0 1 7.5 9V7.5zM1.5 1v3h1a1 1 0 0 1 1-1h2v1.5h2V3h2a1 1 0 0 1 1 1h1V1h-10z" fill="#e0e0e0"/><path d="M4.5 5v3h1a1 1 0 0 1 1-1h2v6a1 1 0 0 1-1 1v1h4v-1a1 1 0 0 1-1-1V7h2a1 1 0 0 1 1 1h1V5h-6z" fill="#ff5f5f"/></svg>
diff --git a/editor/icons/FontVariation.svg b/editor/icons/FontVariation.svg
index 39917bcba9..9488679af2 100644
--- a/editor/icons/FontVariation.svg
+++ b/editor/icons/FontVariation.svg
@@ -1 +1 @@
-<svg height="16" width="16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M5.975 11 7.21 7.5H5.916a.478.478 0 0 0-.113.016.837.837 0 0 0-.127.043c-.044.018-.089.04-.133.066l-.043.027V9a1 1 0 0 1-1 1v1h1.475zM1.5 1v3h1a1 1 0 0 1 1-1h2v1.5h2V3h2a1 1 0 0 1 1 1h1V1h-10z" style="fill:#e0e0e0;fill-opacity:1"/><path d="m4.621 5-.705 2-.353 1h1a.84 1.192 49.998 0 1 1.353-1h2L5.8 13a.84 1.192 49.998 0 1-1.353 1l-.353 1h4l.353-1a.84 1.192 49.998 0 1-.647-1l2.116-6h2a.84 1.192 49.998 0 1 .647 1h1l.353-1 .705-2h-6z" fill="#ff5f5f"/></svg>
+<svg height="16" width="16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M5.975 11 7.21 7.5H5.916a.478.478 0 0 0-.113.016.837.837 0 0 0-.127.043c-.044.018-.089.04-.133.066l-.043.027V9a1 1 0 0 1-1 1v1h1.475zM1.5 1v3h1a1 1 0 0 1 1-1h2v1.5h2V3h2a1 1 0 0 1 1 1h1V1h-10z" fill="#e0e0e0"/><path d="m4.621 5-.705 2-.353 1h1a.84 1.192 49.998 0 1 1.353-1h2L5.8 13a.84 1.192 49.998 0 1-1.353 1l-.353 1h4l.353-1a.84 1.192 49.998 0 1-.647-1l2.116-6h2a.84 1.192 49.998 0 1 .647 1h1l.353-1 .705-2h-6z" fill="#ff5f5f"/></svg>
diff --git a/editor/icons/GizmoDirectionalLight.svg b/editor/icons/GizmoDirectionalLight.svg
index d943be79f0..cb80b31f91 100644
--- a/editor/icons/GizmoDirectionalLight.svg
+++ b/editor/icons/GizmoDirectionalLight.svg
@@ -1 +1 @@
-<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="m64 4c-4.432 0-8 3.568-8 8v16c0 4.432 3.568 8 8 8s8-3.568 8-8v-16c0-4.432-3.568-8-8-8zm-36.77 15.223c-2.045 0-4.0893.78461-5.6562 2.3516-3.1339 3.1339-3.1339 8.1786 0 11.312l11.312 11.314c3.1339 3.1339 8.1806 3.1339 11.314 0s3.1339-8.1806 0-11.314l-11.314-11.312c-1.5669-1.5669-3.6113-2.3516-5.6562-2.3516zm73.539 0c-2.045 0-4.0893.78461-5.6562 2.3516l-11.314 11.312c-3.1339 3.1339-3.1339 8.1806 0 11.314s8.1806 3.1339 11.314 0l11.312-11.314c3.1339-3.1339 3.1339-8.1786 0-11.312-1.567-1.5669-3.6113-2.3516-5.6562-2.3516zm-36.77 20.777a24 24 0 0 0 -24 24 24 24 0 0 0 24 24 24 24 0 0 0 24-24 24 24 0 0 0 -24-24zm-52 16c-4.432 0-8 3.568-8 8s3.568 8 8 8h16c4.432 0 8-3.568 8-8s-3.568-8-8-8zm88 0c-4.432 0-8 3.568-8 8s3.568 8 8 8h16c4.432 0 8-3.568 8-8s-3.568-8-8-8zm-61.455 25.449c-2.045 0-4.0913.78266-5.6582 2.3496l-11.312 11.314c-3.1339 3.1339-3.1339 8.1786 0 11.312 3.1339 3.1339 8.1786 3.1339 11.312 0l11.314-11.312c3.1339-3.1339 3.1339-8.1806 0-11.314-1.5669-1.5669-3.6113-2.3496-5.6562-2.3496zm50.91 0c-2.045 0-4.0893.78266-5.6562 2.3496-3.1339 3.1339-3.1339 8.1806 0 11.314l11.314 11.312c3.1339 3.1339 8.1786 3.1339 11.312 0s3.1339-8.1786 0-11.312l-11.312-11.314c-1.5669-1.5669-3.6132-2.3496-5.6582-2.3496zm-25.455 10.551c-4.432 0-8 3.568-8 8v16c0 4.432 3.568 8 8 8s8-3.568 8-8v-16c0-4.432-3.568-8-8-8z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2"/><path d="m64 8c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4zm-36.77 15.227c-1.0225 0-2.0447.39231-2.8281 1.1758-1.5669 1.5669-1.5669 4.0893 0 5.6562l11.312 11.314c1.5669 1.5669 4.0913 1.5669 5.6582 0s1.5669-4.0913 0-5.6582l-11.314-11.312c-.78348-.78348-1.8056-1.1758-2.8281-1.1758zm73.539 0c-1.0225 0-2.0446.39231-2.8281 1.1758l-11.314 11.312c-1.5669 1.5669-1.5669 4.0913 0 5.6582s4.0913 1.5669 5.6582 0l11.313-11.314c1.5669-1.5669 1.5669-4.0893 0-5.6562-.78348-.78348-1.8056-1.1758-2.8281-1.1758zm-36.77 20.773c-11.046.00001-20 8.9543-20 20 .000007 11.046 8.9543 20 20 20s20-8.9543 20-20c-.000008-11.046-8.9543-20-20-20zm-52 16c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4zm88 0c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4zm-61.455 25.453c-1.0225 0-2.0466.39035-2.8301 1.1738l-11.312 11.314c-1.5669 1.5669-1.5669 4.0893 0 5.6563 1.5669 1.5669 4.0893 1.5669 5.6562 0l11.314-11.313c1.5669-1.5669 1.5669-4.0913 0-5.6582-.78347-.78347-1.8056-1.1738-2.8281-1.1738zm50.91 0c-1.0225 0-2.0447.39035-2.8281 1.1738-1.5669 1.5669-1.5669 4.0913 0 5.6582l11.314 11.313c1.5669 1.5669 4.0893 1.5669 5.6563 0 1.5669-1.567 1.5669-4.0893 0-5.6563l-11.313-11.314c-.78347-.78347-1.8076-1.1738-2.8301-1.1738zm-25.455 10.547c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4z" fill="#ffffff"/></svg>
+<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="m64 4c-4.432 0-8 3.568-8 8v16c0 4.432 3.568 8 8 8s8-3.568 8-8v-16c0-4.432-3.568-8-8-8zm-36.77 15.223c-2.045 0-4.0893.78461-5.6562 2.3516-3.1339 3.1339-3.1339 8.1786 0 11.312l11.312 11.314c3.1339 3.1339 8.1806 3.1339 11.314 0s3.1339-8.1806 0-11.314l-11.314-11.312c-1.5669-1.5669-3.6113-2.3516-5.6562-2.3516zm73.539 0c-2.045 0-4.0893.78461-5.6562 2.3516l-11.314 11.312c-3.1339 3.1339-3.1339 8.1806 0 11.314s8.1806 3.1339 11.314 0l11.312-11.314c3.1339-3.1339 3.1339-8.1786 0-11.312-1.567-1.5669-3.6113-2.3516-5.6562-2.3516zm-36.77 20.777a24 24 0 0 0 -24 24 24 24 0 0 0 24 24 24 24 0 0 0 24-24 24 24 0 0 0 -24-24zm-52 16c-4.432 0-8 3.568-8 8s3.568 8 8 8h16c4.432 0 8-3.568 8-8s-3.568-8-8-8zm88 0c-4.432 0-8 3.568-8 8s3.568 8 8 8h16c4.432 0 8-3.568 8-8s-3.568-8-8-8zm-61.455 25.449c-2.045 0-4.0913.78266-5.6582 2.3496l-11.312 11.314c-3.1339 3.1339-3.1339 8.1786 0 11.312 3.1339 3.1339 8.1786 3.1339 11.312 0l11.314-11.312c3.1339-3.1339 3.1339-8.1806 0-11.314-1.5669-1.5669-3.6113-2.3496-5.6562-2.3496zm50.91 0c-2.045 0-4.0893.78266-5.6562 2.3496-3.1339 3.1339-3.1339 8.1806 0 11.314l11.314 11.312c3.1339 3.1339 8.1786 3.1339 11.312 0s3.1339-8.1786 0-11.312l-11.312-11.314c-1.5669-1.5669-3.6132-2.3496-5.6582-2.3496zm-25.455 10.551c-4.432 0-8 3.568-8 8v16c0 4.432 3.568 8 8 8s8-3.568 8-8v-16c0-4.432-3.568-8-8-8z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path d="m64 8c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4zm-36.77 15.227c-1.0225 0-2.0447.39231-2.8281 1.1758-1.5669 1.5669-1.5669 4.0893 0 5.6562l11.312 11.314c1.5669 1.5669 4.0913 1.5669 5.6582 0s1.5669-4.0913 0-5.6582l-11.314-11.312c-.78348-.78348-1.8056-1.1758-2.8281-1.1758zm73.539 0c-1.0225 0-2.0446.39231-2.8281 1.1758l-11.314 11.312c-1.5669 1.5669-1.5669 4.0913 0 5.6582s4.0913 1.5669 5.6582 0l11.313-11.314c1.5669-1.5669 1.5669-4.0893 0-5.6562-.78348-.78348-1.8056-1.1758-2.8281-1.1758zm-36.77 20.773c-11.046.00001-20 8.9543-20 20 .000007 11.046 8.9543 20 20 20s20-8.9543 20-20c-.000008-11.046-8.9543-20-20-20zm-52 16c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4zm88 0c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4zm-61.455 25.453c-1.0225 0-2.0466.39035-2.8301 1.1738l-11.312 11.314c-1.5669 1.5669-1.5669 4.0893 0 5.6563 1.5669 1.5669 4.0893 1.5669 5.6562 0l11.314-11.313c1.5669-1.5669 1.5669-4.0913 0-5.6582-.78347-.78347-1.8056-1.1738-2.8281-1.1738zm50.91 0c-1.0225 0-2.0447.39035-2.8281 1.1738-1.5669 1.5669-1.5669 4.0913 0 5.6582l11.314 11.313c1.5669 1.5669 4.0893 1.5669 5.6563 0 1.5669-1.567 1.5669-4.0893 0-5.6563l-11.313-11.314c-.78347-.78347-1.8076-1.1738-2.8301-1.1738zm-25.455 10.547c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4z" fill="#ffffff"/></svg>
diff --git a/editor/icons/GizmoLight.svg b/editor/icons/GizmoLight.svg
index 0f74ebbd3d..ff224f32c9 100644
--- a/editor/icons/GizmoLight.svg
+++ b/editor/icons/GizmoLight.svg
@@ -1 +1 @@
-<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="m64 2a44 44 0 0 0 -44 44 44 44 0 0 0 24 39.189v5.8105 5 3c0 5.0515 3.3756 9.2769 8 10.578v16.422h24v-16.422c4.6244-1.3012 8-5.5266 8-10.578v-3-5-5.8574a44 44 0 0 0 24-39.143 44 44 0 0 0 -44-44zm0 20a24 24 0 0 1 24 24 24 24 0 0 1 -24 24 24 24 0 0 1 -24-24 24 24 0 0 1 24-24z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2.2"/><path d="m64 6a40 40 0 0 0 -40 40 40 40 0 0 0 24 36.607v15.393a8 8 0 0 0 8 8h16a8 8 0 0 0 8-8v-15.363a40 40 0 0 0 24-36.637 40 40 0 0 0 -40-40zm0 12a28 28 0 0 1 28 28 28 28 0 0 1 -28 28 28 28 0 0 1 -28-28 28 28 0 0 1 28-28zm-8 96v8h16v-8z" fill="#ffffff"/></svg>
+<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="m64 2a44 44 0 0 0 -44 44 44 44 0 0 0 24 39.189v5.8105 5 3c0 5.0515 3.3756 9.2769 8 10.578v16.422h24v-16.422c4.6244-1.3012 8-5.5266 8-10.578v-3-5-5.8574a44 44 0 0 0 24-39.143 44 44 0 0 0 -44-44zm0 20a24 24 0 0 1 24 24 24 24 0 0 1 -24 24 24 24 0 0 1 -24-24 24 24 0 0 1 24-24z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.2"/><path d="m64 6a40 40 0 0 0 -40 40 40 40 0 0 0 24 36.607v15.393a8 8 0 0 0 8 8h16a8 8 0 0 0 8-8v-15.363a40 40 0 0 0 24-36.637 40 40 0 0 0 -40-40zm0 12a28 28 0 0 1 28 28 28 28 0 0 1 -28 28 28 28 0 0 1 -28-28 28 28 0 0 1 28-28zm-8 96v8h16v-8z" fill="#ffffff"/></svg>
diff --git a/editor/icons/GradientTexture2D.svg b/editor/icons/GradientTexture2D.svg
index ef40323b8c..77d38cc089 100644
--- a/editor/icons/GradientTexture2D.svg
+++ b/editor/icons/GradientTexture2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g fill="#e0e0e0"> <path d="M 2,1 C 1.447715,1 1,1.4477153 1,2 v 12.000001 c 0,0.552285 0.447715,1 1,1 h 11.999999 c 0.552285,0 1,-0.447715 1,-1 V 2 c 0,-0.5522847 -0.447715,-1 -1,-1 z m 1,2.0000001 h 9.999999 V 11.000001 H 3 Z" fill-opacity="0.99608"/> <path d="m 5.5,3.5 v 1 h 1 v -1 z m 1,1 v 1 h 1 v -1 z m 1,0 h 1 v 1 h -1 v 1 h 1 v 1 h 1 v 1 h 1 v -1 h 1 v 1 h 1 v -1 -1 -1 -1 -1 h -1 -1 -1 -1 -1 z m 4,4 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m -1,0 h -1 v 1 h 1 z m -1,0 v -1 h -1 v 1 z m -1,-1 v -1 h -1 v 1 z m -1,0 h -1 v 1 h 1 z m 0,-1 v -1 h -1 v 1 z m -1,-1 v -1 h -1 v 1 z" /> </g> </svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill="#e0e0e0"><path d="M 2,1 C 1.447715,1 1,1.4477153 1,2 v 12.000001 c 0,0.552285 0.447715,1 1,1 h 11.999999 c 0.552285,0 1,-0.447715 1,-1 V 2 c 0,-0.5522847 -0.447715,-1 -1,-1 z m 1,2.0000001 h 9.999999 V 11.000001 H 3 Z"/><path d="m 5.5,3.5 v 1 h 1 v -1 z m 1,1 v 1 h 1 v -1 z m 1,0 h 1 v 1 h -1 v 1 h 1 v 1 h 1 v 1 h 1 v -1 h 1 v 1 h 1 v -1 -1 -1 -1 -1 h -1 -1 -1 -1 -1 z m 4,4 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m -1,0 h -1 v 1 h 1 z m -1,0 v -1 h -1 v 1 z m -1,-1 v -1 h -1 v 1 z m -1,0 h -1 v 1 h 1 z m 0,-1 v -1 h -1 v 1 z m -1,-1 v -1 h -1 v 1 z" /></g></svg>
diff --git a/editor/icons/GrooveJoint2D.svg b/editor/icons/GrooveJoint2D.svg
index 0f7b84096c..0305d27685 100644
--- a/editor/icons/GrooveJoint2D.svg
+++ b/editor/icons/GrooveJoint2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 1037.4h-5v6h-5v2h5v6h5zm-7 0h-7v14h7v-4h-5v-6h5z" fill="#8da5f3" fill-opacity=".98824" transform="translate(0 -1036.4)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 1037.4h-5v6h-5v2h5v6h5zm-7 0h-7v14h7v-4h-5v-6h5z" fill="#8da5f3" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/GroupViewport.svg b/editor/icons/GroupViewport.svg
index 1c22046ba1..331890e1de 100644
--- a/editor/icons/GroupViewport.svg
+++ b/editor/icons/GroupViewport.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 0v4h4v-4zm6 0v6h-6v10h10v-6h6v-10zm4 4h2v2h-2zm2 8v4h4v-4z" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width=".5"/><path d="m7 1v6h-6v8h8v-6h6v-8zm2 2h4v4h-4z" fill="#e0e0e0"/><path d="m1 1v2c0 .0000234.446 0 1 0s1 .0000234 1 0v-2c0-.00002341-.446 0-1 0s-1-.00002341-1 0zm12 0v2c0 .0000234.446 0 1 0s1 .0000234 1 0v-2c0-.00002341-.446 0-1 0s-1-.00002341-1 0zm-12 12v2c0 .000023.446 0 1 0s1 .000023 1 0v-2c0-.000023-.446 0-1 0s-1-.000023-1 0zm12 0v2c0 .000023.446 0 1 0s1 .000023 1 0v-2c0-.000023-.446 0-1 0s-1-.000023-1 0z" fill="#fff"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 0v4h4v-4zm6 0v6h-6v10h10v-6h6v-10zm4 4h2v2h-2zm2 8v4h4v-4z" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-width=".5"/><path d="m7 1v6h-6v8h8v-6h6v-8zm2 2h4v4h-4z" fill="#e0e0e0"/><path d="m1 1v2c0 .0000234.446 0 1 0s1 .0000234 1 0v-2c0-.00002341-.446 0-1 0s-1-.00002341-1 0zm12 0v2c0 .0000234.446 0 1 0s1 .0000234 1 0v-2c0-.00002341-.446 0-1 0s-1-.00002341-1 0zm-12 12v2c0 .000023.446 0 1 0s1 .000023 1 0v-2c0-.000023-.446 0-1 0s-1-.000023-1 0zm12 0v2c0 .000023.446 0 1 0s1 .000023 1 0v-2c0-.000023-.446 0-1 0s-1-.000023-1 0z" fill="#fff"/></svg>
diff --git a/editor/icons/Keyboard.svg b/editor/icons/Keyboard.svg
index b9dfab71ed..b00ed5dd21 100644
--- a/editor/icons/Keyboard.svg
+++ b/editor/icons/Keyboard.svg
@@ -1 +1 @@
-<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".996"><path d="m4 2a1 1 0 0 0 -1 1v9.084c0 .506.448.916 1 .916h8c.552 0 1-.41 1-.916v-9.084a1 1 0 0 0 -1-1zm1.543 1.139h1.393l1.834 4.199h1.295v.437c.708.052 1.246.239 1.61.559.368.316.55.747.55 1.295 0 .552-.182.99-.55 1.314-.368.32-.906.505-1.61.553v.467h-1.294v-.473c-.708-.06-1.247-.248-1.615-.564-.364-.316-.545-.75-.545-1.297 0-.548.181-.977.545-1.29.368-.315.907-.504 1.615-.564v-.437h-1.464l-.282-.733h-1.595l-.284.733h-1.439l1.836-4.2zm.684 1.39-.409 1.057h.817zm3.84 4.338v1.526c.28-.04.483-.12.607-.24.124-.125.185-.302.185-.53 0-.224-.063-.396-.191-.516-.124-.12-.326-.2-.602-.24zm-1.296.006c-.284.04-.487.12-.61.24-.12.116-.182.288-.182.516 0 .22.065.392.193.512.132.12.331.202.6.246v-1.514z" fill="#e0e0e0"/><path d="m27 2h7v14h-7z" fill="#fff"/><path d="m1 4v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9h-1v9a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1-1v-9z" fill="#e0e0e0"/></g></svg>
+<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="16" height="16"><path fill="#e0e0e0" d="M6.584 5.135 6.17 4.059l-.412 1.076h.826zm3.203 2.976a1.032 1.032 0 0 0-.287.041.953.953 0 0 0-.09.034c-.028.012-.057.024-.084.039a.912.912 0 0 0-.152.107.988.988 0 0 0-.23.305.937.937 0 0 0-.04.097 1.017 1.017 0 0 0-.068.323 1.553 1.553 0 0 0 0 .244 1.374 1.374 0 0 0 .068.328 1.03 1.03 0 0 0 .201.336c.023.022.045.044.069.064a.96.96 0 0 0 .152.104c.027.015.056.027.084.039.03.012.06.024.09.033a.965.965 0 0 0 .19.035 1.028 1.028 0 0 0 .197 0 .974.974 0 0 0 .36-.107.876.876 0 0 0 .077-.049.872.872 0 0 0 .074-.055.882.882 0 0 0 .13-.136.978.978 0 0 0 .177-.368 1.225 1.225 0 0 0 .035-.224 1.61 1.61 0 0 0 0-.244 1.361 1.361 0 0 0-.035-.223 1.092 1.092 0 0 0-.121-.285.87.87 0 0 0-.12-.15.862.862 0 0 0-.14-.124c-.025-.017-.05-.035-.078-.05-.027-.015-.056-.027-.086-.04a.892.892 0 0 0-.373-.074z"/><path fill="#e0e0e0" d="M4 2c-.616-.02-1.084.59-1 1.178.003 3-.007 6 .005 9 .057.577.672.889 1.203.822 2.631-.003 5.263.006 7.894-.005a.973.973 0 0 0 .898-1.09c-.003-3.002.007-6.005-.005-9.007-.042-.592-.643-.976-1.203-.898H4Zm1.475.646H6.89l1.865 4.27H7.268l-.286-.744H5.36l-.287.744H3.61l1.866-4.27Zm4.312 4.301c1.069-.042 2.164.679 2.363 1.766.232 1.01-.34 2.144-1.326 2.502.296.465.837-.109 1.06-.007l.544.642c-.64.756-1.883.677-2.605.084-.394-.448-.866-.673-1.409-.887-1.175-.66-1.391-2.456-.43-3.39.463-.486 1.141-.716 1.803-.71Z"/><path fill="#e0e0e0" d="M1 4v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4h-1v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4Z"/></svg>
diff --git a/editor/icons/KeyboardError.svg b/editor/icons/KeyboardError.svg
new file mode 100644
index 0000000000..5cd6de9de8
--- /dev/null
+++ b/editor/icons/KeyboardError.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="16" height="16"><path fill="#ff5f5f" d="M4 2c-.616-.02-1.084.59-1 1.178.003 3-.007 6 .005 9 .057.577.672.889 1.203.822 2.631-.003 5.263.006 7.894-.005a.973.973 0 0 0 .898-1.09c-.003-3.002.007-6.005-.005-9.007-.042-.592-.643-.976-1.203-.898H4Zm4.223 1.262c1.06.005 2.29.257 2.92 1.197.532.862.275 2.057-.484 2.703-.346.382-.862.629-1.075 1.117.055.345-.33.172-.537.213H7.148c-.037-.749.503-1.335 1.026-1.796.406-.253.744-1.002.129-1.22-.626-.25-1.374.117-1.645.715l-2.08-1.039c.599-1.147 1.868-1.818 3.136-1.872.17-.013.339-.018.509-.018Zm.127 5.697c.798-.057 1.616.616 1.54 1.45-.023.81-.841 1.413-1.623 1.328-.833.022-1.6-.771-1.443-1.613.097-.721.83-1.195 1.526-1.165z"/><path fill="#ff5f5f" d="M1 4v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4h-1v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4Z"/></svg>
diff --git a/editor/icons/KeyboardLabel.svg b/editor/icons/KeyboardLabel.svg
new file mode 100644
index 0000000000..25e02fd653
--- /dev/null
+++ b/editor/icons/KeyboardLabel.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#e0e0e0" d="M11.814 1.977c-.078 0-.157.008-.232.023H4c-.7-.034-1.143.765-1 1.39.008 2.95-.017 5.9.014 8.848.13.705.965.847 1.562.76 2.542-.008 5.085.02 7.627-.014.734-.1.9-.952.797-1.564-.003-2.84.006-5.68-.006-8.522-.035-.594-.628-.927-1.18-.921zM9.797 4.016l.572.58-.572.578-.57-.578.57-.58zm-.606 1.05.594.606-.594.601-.591-.601.591-.606zm1.213 0 .596.606-.596.601-.593-.601.593-.606zm.717 1.436h1.06c.053.217.093.428.122.63.028.201.043.395.043.58a2.363 2.363 0 0 1-.133.724 1.425 1.425 0 0 1-.31.515c-.249.265-.598.399-1.05.399-.331 0-.594-.08-.785-.235a1.091 1.091 0 0 1-.236-.275c-.063.1-.14.19-.236.265-.206.163-.467.245-.787.245-.252 0-.457-.057-.614-.166a2.75 2.75 0 0 1-.095.42 1.936 1.936 0 0 1-.403.722c-.2.22-.452.383-.756.49-.303.11-.654.166-1.052.166-.466 0-.865-.089-1.2-.265a1.817 1.817 0 0 1-.765-.752c-.18-.327-.27-.715-.27-1.164 0-.256.027-.525.082-.809.055-.284.126-.545.21-.781h1.001c-.062.232-.112.46-.15.684a3.87 3.87 0 0 0-.053.613c0 .37.1.643.3.82.204.177.523.264.96.264.222 0 .425-.03.61-.092a.97.97 0 0 0 .439-.299.803.803 0 0 0 .166-.521 5.463 5.463 0 0 0-.051-.725 11.61 11.61 0 0 0-.068-.482 26.51 26.51 0 0 0-.096-.606h1.135l.043.276c.047.32.123.532.228.634.105.1.24.15.402.15.165 0 .284-.04.358-.124.076-.086.115-.224.115-.412v-.524h1.027v.524c0 .203.032.351.096.447.065.095.202.142.412.142a.637.637 0 0 0 .33-.078c.089-.052.133-.15.133-.297 0-.128-.019-.295-.054-.498l-.108-.605z"/><path fill="#e0e0e0" d="M1 4v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4h-1v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4Z"/></svg>
diff --git a/editor/icons/KeyboardPhysical.svg b/editor/icons/KeyboardPhysical.svg
index 4364e0b4fa..877b9b89b9 100644
--- a/editor/icons/KeyboardPhysical.svg
+++ b/editor/icons/KeyboardPhysical.svg
@@ -1 +1 @@
-<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".996"><path d="m4 2a1 1 0 0 0 -1 1v9.084c0 .506.448.916 1 .916h8c.552 0 1-.41 1-.916v-9.084a1 1 0 0 0 -1-1zm2.762 1.768h2.476l3.264 7.464h-2.604l-.502-1.3h-2.835l-.502 1.3h-2.561zm1.217 2.474-.725 1.878h1.45z" fill="#e0e0e0"/><path d="m27 2h7v14h-7z" fill="#fff"/><path d="m1 4v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9h-1v9a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1-1v-9z" fill="#e0e0e0"/></g></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#e0e0e0" d="M4 2a1 1 0 0 0-1 1v9.084c0 .506.448.916 1 .916h8c.552 0 1-.41 1-.916V3a1 1 0 0 0-1-1Zm2.762 1.768h2.476l3.264 7.464H9.898l-.502-1.3H6.561l-.502 1.3H3.498Zm1.217 2.474L7.254 8.12h1.45z"/><path fill="#e0e0e0" d="M1 4v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4h-1v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4Z"/></svg>
diff --git a/editor/icons/LabelSettings.svg b/editor/icons/LabelSettings.svg
index 4dc3b9e86e..f85165f805 100644
--- a/editor/icons/LabelSettings.svg
+++ b/editor/icons/LabelSettings.svg
@@ -1 +1 @@
-<svg height="16" width="16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6 3a1 1 0 0 0-.707.293l-4 4a1 1 0 0 0 0 1.414l4 4A1 1 0 0 0 6 13h2.076a3.766 3.766 0 0 1-.058-.496c-.003-.058-.006-.115-.006-.174a2.606 2.606 0 0 1 .05-.508 3.212 3.212 0 0 1 .133-.496 5.104 5.104 0 0 1 .451-.982 8.303 8.303 0 0 1 .422-.656 14.41 14.41 0 0 1 .489-.667c.172-.223.351-.45.535-.68.163-.203.327-.408.492-.618a27.639 27.639 0 0 0 .732-.977 16.04 16.04 0 0 0 .465-.697c.075-.12.147-.242.219-.365a12.399 12.399 0 0 0 .684 1.062 27.555 27.555 0 0 0 .73.977c.165.21.331.415.494.619a43.298 43.298 0 0 1 .787 1.013c.082.111.16.222.237.332L15 9.79V4a1 1 0 0 0-1-1H6zM5 7a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1z" style="fill:#8eef97;fill-opacity:1"/><path d="M9.184 13A2.99 2.99 0 0 0 12 15a2.99 2.99 0 0 0 2.816-2z" fill="#ff4596"/><path d="M9.23 11c-.136.326-.23.656-.23 1 0 .352.072.686.184 1h5.632c.112-.314.184-.648.184-1 0-.344-.094-.674-.23-1H9.23z" fill="#8045ff"/><path d="M10.564 9c-.552.69-1.058 1.342-1.334 2h5.54c-.276-.658-.782-1.31-1.335-2Z" fill="#45d7ff"/><path d="M12 7c-.43.746-.945 1.387-1.435 2h2.87c-.49-.613-1.005-1.254-1.435-2Z" fill="#45ffa2"/></svg>
+<svg height="16" width="16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6 3a1 1 0 0 0-.707.293l-4 4a1 1 0 0 0 0 1.414l4 4A1 1 0 0 0 6 13h2.076a3.766 3.766 0 0 1-.058-.496c-.003-.058-.006-.115-.006-.174a2.606 2.606 0 0 1 .05-.508 3.212 3.212 0 0 1 .133-.496 5.104 5.104 0 0 1 .451-.982 8.303 8.303 0 0 1 .422-.656 14.41 14.41 0 0 1 .489-.667c.172-.223.351-.45.535-.68.163-.203.327-.408.492-.618a27.639 27.639 0 0 0 .732-.977 16.04 16.04 0 0 0 .465-.697c.075-.12.147-.242.219-.365a12.399 12.399 0 0 0 .684 1.062 27.555 27.555 0 0 0 .73.977c.165.21.331.415.494.619a43.298 43.298 0 0 1 .787 1.013c.082.111.16.222.237.332L15 9.79V4a1 1 0 0 0-1-1H6zM5 7a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1z" fill="#8eef97"/><path d="M9.184 13A2.99 2.99 0 0 0 12 15a2.99 2.99 0 0 0 2.816-2z" fill="#ff4596"/><path d="M9.23 11c-.136.326-.23.656-.23 1 0 .352.072.686.184 1h5.632c.112-.314.184-.648.184-1 0-.344-.094-.674-.23-1H9.23z" fill="#8045ff"/><path d="M10.564 9c-.552.69-1.058 1.342-1.334 2h5.54c-.276-.658-.782-1.31-1.335-2Z" fill="#45d7ff"/><path d="M12 7c-.43.746-.945 1.387-1.435 2h2.87c-.49-.613-1.005-1.254-1.435-2Z" fill="#45ffa2"/></svg>
diff --git a/editor/icons/LightOccluder2D.svg b/editor/icons/LightOccluder2D.svg
index ff2c4d4561..7765aecbc3 100644
--- a/editor/icons/LightOccluder2D.svg
+++ b/editor/icons/LightOccluder2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1037.4c-2.7614 0-5 2.2386-5 5 .00253 1.9858 1.18 3.7819 3 4.5762v2.4238h4v-2.4199c1.8213-.7949 2.999-2.5929 3-4.5801 0-2.7614-2.2386-5-5-5zm0 2v6c-1.6569 0-3-1.3431-3-3s1.3431-3 3-3zm-1 11v1h2v-1z" fill="#8da5f3" fill-opacity=".98824" transform="translate(0 -1036.4)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1037.4c-2.7614 0-5 2.2386-5 5 .00253 1.9858 1.18 3.7819 3 4.5762v2.4238h4v-2.4199c1.8213-.7949 2.999-2.5929 3-4.5801 0-2.7614-2.2386-5-5-5zm0 2v6c-1.6569 0-3-1.3431-3-3s1.3431-3 3-3zm-1 11v1h2v-1z" fill="#8da5f3" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/LockViewport.svg b/editor/icons/LockViewport.svg
index c8b8a57be6..e1d26bc4b0 100644
--- a/editor/icons/LockViewport.svg
+++ b/editor/icons/LockViewport.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 0a6 6 0 0 0 -6 6v1h-1v9h14v-9h-1v-1a6 6 0 0 0 -6-6zm0 4c1.1046 0 2 .89543 2 2v1h-4v-1c0-1.1046.89543-2 2-2z" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="4"/><path d="m8 1a5 5 0 0 0 -5 5v2h-1v7h12v-7h-1v-2a5 5 0 0 0 -5-5zm0 2a3 3 0 0 1 3 3v2h-6v-2a3 3 0 0 1 3-3zm-1 7h2v3h-2z" fill="#e0e0e0"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 0a6 6 0 0 0 -6 6v1h-1v9h14v-9h-1v-1a6 6 0 0 0 -6-6zm0 4c1.1046 0 2 .89543 2 2v1h-4v-1c0-1.1046.89543-2 2-2z" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/><path d="m8 1a5 5 0 0 0 -5 5v2h-1v7h12v-7h-1v-2a5 5 0 0 0 -5-5zm0 2a3 3 0 0 1 3 3v2h-6v-2a3 3 0 0 1 3-3zm-1 7h2v3h-2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Marker2D.svg b/editor/icons/Marker2D.svg
index 191f0b2a03..aa7836c3ef 100644
--- a/editor/icons/Marker2D.svg
+++ b/editor/icons/Marker2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v4h2v-4zm-6 6v2h4v-2zm10 0v2h4v-2zm-4 4v4h2v-4z" fill="#8da5f3" fill-opacity=".98824"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v4h2v-4zm-6 6v2h4v-2zm10 0v2h4v-2zm-4 4v4h2v-4z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/MultiplayerSpawner.svg b/editor/icons/MultiplayerSpawner.svg
index 68ffd3aab4..9e6d6a4a7c 100644
--- a/editor/icons/MultiplayerSpawner.svg
+++ b/editor/icons/MultiplayerSpawner.svg
@@ -1 +1 @@
-<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path style="fill:none;fill-opacity:.996078;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:16.5;stroke-opacity:1;paint-order:stroke markers fill" d="M4.936 7.429A4 4 0 0 1 8 6a4 4 0 0 1 3.064 1.429M1.872 4.858A8 8 0 0 1 8 2a8 8 0 0 1 6.128 2.858"/><path d="M7 9v2H5v2h2v2h2v-2h2v-2H9V9Z" fill="#5fff97"/></svg>
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:16.5;paint-order:stroke markers fill" d="M4.936 7.429A4 4 0 0 1 8 6a4 4 0 0 1 3.064 1.429M1.872 4.858A8 8 0 0 1 8 2a8 8 0 0 1 6.128 2.858"/><path d="M7 9v2H5v2h2v2h2v-2h2v-2H9V9Z" fill="#5fff97"/></svg>
diff --git a/editor/icons/MultiplayerSynchronizer.svg b/editor/icons/MultiplayerSynchronizer.svg
index 1547ec5a2b..4137b9dba0 100644
--- a/editor/icons/MultiplayerSynchronizer.svg
+++ b/editor/icons/MultiplayerSynchronizer.svg
@@ -1 +1 @@
-<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path style="fill:#5fff97;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" d="M5 10h3l-2 4-2-4Z"/><path style="fill:#ff5f5f;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" d="M9 14h3l-2-4-2 4Z"/><path style="fill:none;fill-opacity:.996078;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:16.5;stroke-opacity:1;paint-order:stroke markers fill" d="M4.936 7.429A4 4 0 0 1 8 6a4 4 0 0 1 3.064 1.429M1.872 4.858A8 8 0 0 1 8 2a8 8 0 0 1 6.128 2.858"/></svg>
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path style="fill:#5fff97;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke fill markers" d="M5 10h3l-2 4-2-4Z"/><path style="fill:#ff5f5f;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:stroke fill markers" d="M9 14h3l-2-4-2 4Z"/><path style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:16.5;paint-order:stroke markers fill" d="M4.936 7.429A4 4 0 0 1 8 6a4 4 0 0 1 3.064 1.429M1.872 4.858A8 8 0 0 1 8 2a8 8 0 0 1 6.128 2.858"/></svg>
diff --git a/editor/icons/Navigation2D.svg b/editor/icons/Navigation2D.svg
index aa3e258eae..286fcb8d4c 100644
--- a/editor/icons/Navigation2D.svg
+++ b/editor/icons/Navigation2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1050.4 5-2 5 2-5-12z" fill="#8da5f3" fill-opacity=".98824" fill-rule="evenodd" transform="translate(0 -1036.4)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1050.4 5-2 5 2-5-12z" fill="#8da5f3" fill-rule="evenodd" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/NavigationAgent2D.svg b/editor/icons/NavigationAgent2D.svg
index 05aeb95e12..c5b543e638 100644
--- a/editor/icons/NavigationAgent2D.svg
+++ b/editor/icons/NavigationAgent2D.svg
@@ -1 +1 @@
-<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1v2.5c1.371 0 2.5 1.129 2.5 2.5s-1.129 2.5-2.5 2.5v6.5c2-3 5.007-6.03 5-9 0-3-2-5-5-5z" fill="#8da5f3" fill-opacity=".988235"/><path d="m8 1c-3 0-5 2-5 5s3 6 5 9v-6.5c-1.371 0-2.5-1.129-2.5-2.5s1.129-2.5 2.5-2.5z" fill="#e0e0e0"/></svg>
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1v2.5c1.371 0 2.5 1.129 2.5 2.5s-1.129 2.5-2.5 2.5v6.5c2-3 5.007-6.03 5-9 0-3-2-5-5-5z" fill="#8da5f3"/><path d="m8 1c-3 0-5 2-5 5s3 6 5 9v-6.5c-1.371 0-2.5-1.129-2.5-2.5s1.129-2.5 2.5-2.5z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/NavigationObstacle2D.svg b/editor/icons/NavigationObstacle2D.svg
index a5073898f4..af88325240 100644
--- a/editor/icons/NavigationObstacle2D.svg
+++ b/editor/icons/NavigationObstacle2D.svg
@@ -1 +1 @@
-<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 .875c-.625 0-1.25.375-1.5 1.125l-3 10h4.5v-3h-2.5l1-4h1.5zm-6 12.125c-1 0-1 2 0 2h6v-2z" fill="#e0e0e0"/><path d="m8 .875v4.125h1.5l1 4h-2.5v3h4.5l-3-10c-.25-.75-.875-1.125-1.5-1.125zm0 12.125v2h6c1 0 1-2 0-2z" fill="#8da5f3" fill-opacity=".988235"/></svg>
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 .875c-.625 0-1.25.375-1.5 1.125l-3 10h4.5v-3h-2.5l1-4h1.5zm-6 12.125c-1 0-1 2 0 2h6v-2z" fill="#e0e0e0"/><path d="m8 .875v4.125h1.5l1 4h-2.5v3h4.5l-3-10c-.25-.75-.875-1.125-1.5-1.125zm0 12.125v2h6c1 0 1-2 0-2z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/NavigationRegion2D.svg b/editor/icons/NavigationRegion2D.svg
index 8efd836075..30e2138e82 100644
--- a/editor/icons/NavigationRegion2D.svg
+++ b/editor/icons/NavigationRegion2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.1339223.0000569-.2535666.0306675-.3652344.0742188-.022275.0088111-.0410424.0209185-.0625.03125-.0889622.0424668-.1681009.0954994-.2382812.1601562-.0215322.0195204-.0427394.0372854-.0625.0585938-.0741112.0810923-.13722.1698052-.1816406.2695312-.0034324.0076504-.0084746.0137334-.0117188.0214844l-.0019531.0019531c-.0452252.1091882-.0629923.2268973-.0683594.3457031-.0005086.0130821-.0078112.023903-.0078125.0371094v12c.0000552.552262.4477381.999945 1 1h4.8847656a2.1184381 2.1184381 0 0 1 .1328125-.744141l2.9999999-7.9999996a2.1184381 2.1184381 0 0 1 2.007813-1.3730469 2.1184381 2.1184381 0 0 1 1.957031 1.3730469l1.017578 2.7128906v-6.96875c-.000001-.0132064-.007305-.0240273-.007812-.0371094-.005369-.1188058-.023135-.2365149-.06836-.3457031l-.001953-.0019531c-.003155-.0075626-.008384-.0139987-.011719-.0214844-.044421-.099726-.107529-.188439-.18164-.2695312-.019761-.0213083-.040968-.0390734-.0625-.0585938-.070181-.0646568-.149319-.1176895-.238282-.1601562-.021457-.0103315-.040225-.022439-.0625-.03125-.111667-.0435511-.231312-.0741619-.365234-.0742188zm10 6-3 8 3-2 3 2z" fill="#8da5f3" fill-opacity=".98824" fill-rule="evenodd"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.1339223.0000569-.2535666.0306675-.3652344.0742188-.022275.0088111-.0410424.0209185-.0625.03125-.0889622.0424668-.1681009.0954994-.2382812.1601562-.0215322.0195204-.0427394.0372854-.0625.0585938-.0741112.0810923-.13722.1698052-.1816406.2695312-.0034324.0076504-.0084746.0137334-.0117188.0214844l-.0019531.0019531c-.0452252.1091882-.0629923.2268973-.0683594.3457031-.0005086.0130821-.0078112.023903-.0078125.0371094v12c.0000552.552262.4477381.999945 1 1h4.8847656a2.1184381 2.1184381 0 0 1 .1328125-.744141l2.9999999-7.9999996a2.1184381 2.1184381 0 0 1 2.007813-1.3730469 2.1184381 2.1184381 0 0 1 1.957031 1.3730469l1.017578 2.7128906v-6.96875c-.000001-.0132064-.007305-.0240273-.007812-.0371094-.005369-.1188058-.023135-.2365149-.06836-.3457031l-.001953-.0019531c-.003155-.0075626-.008384-.0139987-.011719-.0214844-.044421-.099726-.107529-.188439-.18164-.2695312-.019761-.0213083-.040968-.0390734-.0625-.0585938-.070181-.0646568-.149319-.1176895-.238282-.1601562-.021457-.0103315-.040225-.022439-.0625-.03125-.111667-.0435511-.231312-.0741619-.365234-.0742188zm10 6-3 8 3-2 3 2z" fill="#8da5f3" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/NewKey.svg b/editor/icons/NewKey.svg
index fc8507e6c4..266b763329 100644
--- a/editor/icons/NewKey.svg
+++ b/editor/icons/NewKey.svg
@@ -1 +1 @@
-<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m13 9h-2v2h-2v2h2v2h2v-2h2v-2h-2z"/><path d="m10 9.723c-.596-.347-1-.985-1-1.723 0-1.104.896-2 2-2s2 .896 2 2h1v2h.445c.344-.591.555-1.268.555-2 0-2.209-1.791-4-4-4-1.822.002-3.414 1.235-3.869 3h-6.131v2h1v2h3v-2h2.133c.16.62.466 1.169.867 1.627v-.627h2z"/></g></svg>
+<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m13 9h-2v2h-2v2h2v2h2v-2h2v-2h-2z"/><path d="m10 9.723c-.596-.347-1-.985-1-1.723 0-1.104.896-2 2-2s2 .896 2 2h1v2h.445c.344-.591.555-1.268.555-2 0-2.209-1.791-4-4-4-1.822.002-3.414 1.235-3.869 3h-6.131v2h1v2h3v-2h2.133c.16.62.466 1.169.867 1.627v-.627h2z"/></g></svg>
diff --git a/editor/icons/OccluderPolygon2D.svg b/editor/icons/OccluderPolygon2D.svg
index 7ab4240d2f..b8e67b76dd 100644
--- a/editor/icons/OccluderPolygon2D.svg
+++ b/editor/icons/OccluderPolygon2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill-rule="evenodd" transform="translate(0 -1036.4)"><path d="m1 1045.4 6 6h8v-8l-6-6h-8z" fill="#4b70ea"/><path d="m1 1037.4h8l-3 4 3 4h-8z" fill="#8da5f3" fill-opacity=".98824"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill-rule="evenodd" transform="translate(0 -1036.4)"><path d="m1 1045.4 6 6h8v-8l-6-6h-8z" fill="#4b70ea"/><path d="m1 1037.4h8l-3 4 3 4h-8z" fill="#8da5f3"/></g></svg>
diff --git a/editor/icons/ParallaxLayer.svg b/editor/icons/ParallaxLayer.svg
index 58968b77fb..6945798e9c 100644
--- a/editor/icons/ParallaxLayer.svg
+++ b/editor/icons/ParallaxLayer.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -1036.4)"><path d="m3 1c-1.1046 0-2 .89543-2 2v10c0 1.1046.89543 2 2 2h10c1.1046 0 2-.89543 2-2v-10c0-1.1046-.89543-2-2-2zm0 1h10c.55228.0000096.99999.44772 1 1v10c-.00001.55228-.44772.99999-1 1h-10c-.55228-.00001-.99999-.44772-1-1v-10c.0000096-.55228.44772-.99999 1-1zm4 3-3 3 3 3zm2 0v6l3-3z" fill="#8da5f3" fill-opacity=".98824" fill-rule="evenodd" transform="translate(0 1036.4)"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -1036.4)"><path d="m3 1c-1.1046 0-2 .89543-2 2v10c0 1.1046.89543 2 2 2h10c1.1046 0 2-.89543 2-2v-10c0-1.1046-.89543-2-2-2zm0 1h10c.55228.0000096.99999.44772 1 1v10c-.00001.55228-.44772.99999-1 1h-10c-.55228-.00001-.99999-.44772-1-1v-10c.0000096-.55228.44772-.99999 1-1zm4 3-3 3 3 3zm2 0v6l3-3z" fill="#8da5f3" fill-rule="evenodd" transform="translate(0 1036.4)"/></g></svg>
diff --git a/editor/icons/Path2D.svg b/editor/icons/Path2D.svg
index 494ca344be..cce8206df6 100644
--- a/editor/icons/Path2D.svg
+++ b/editor/icons/Path2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13 1a2 2 0 0 0 -2 2 2 2 0 0 0 .84961 1.6328c-.19239.88508-.55317 1.3394-.98633 1.6426-.64426.451-1.7129.60547-2.9629.73047s-2.6814.22053-3.9121 1.082c-.89278.62493-1.5321 1.6522-1.8184 3.0957a2 2 0 0 0 -1.1699 1.8164 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -.84961-1.6328c.19235-.88496.55306-1.3373.98633-1.6406.64426-.451 1.7129-.60547 2.9629-.73047s2.6814-.22053 3.9121-1.082c.8927-.62488 1.5321-1.6538 1.8184-3.0977a2 2 0 0 0 1.1699-1.8164 2 2 0 0 0 -2-2z" fill="#8da5f3" fill-opacity=".98824"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13 1a2 2 0 0 0 -2 2 2 2 0 0 0 .84961 1.6328c-.19239.88508-.55317 1.3394-.98633 1.6426-.64426.451-1.7129.60547-2.9629.73047s-2.6814.22053-3.9121 1.082c-.89278.62493-1.5321 1.6522-1.8184 3.0957a2 2 0 0 0 -1.1699 1.8164 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -.84961-1.6328c.19235-.88496.55306-1.3373.98633-1.6406.64426-.451 1.7129-.60547 2.9629-.73047s2.6814-.22053 3.9121-1.082c.8927-.62488 1.5321-1.6538 1.8184-3.0977a2 2 0 0 0 1.1699-1.8164 2 2 0 0 0 -2-2z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/PathFollow2D.svg b/editor/icons/PathFollow2D.svg
index a1fb97cf34..0e0cad6930 100644
--- a/editor/icons/PathFollow2D.svg
+++ b/editor/icons/PathFollow2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13 0-3 4h1.9473c-.1385 1.3203-.5583 1.9074-1.084 2.2754-.64426.451-1.7129.60547-2.9629.73047s-2.6814.22053-3.9121 1.082c-.89278.62493-1.5321 1.6522-1.8184 3.0957a2 2 0 0 0 -1.1699 1.8164 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -.84961-1.6328c.19235-.88496.55306-1.3373.98633-1.6406.64426-.451 1.7129-.60547 2.9629-.73047s2.6814-.22053 3.9121-1.082c1.0528-.73697 1.7552-2.032 1.9375-3.9141h2.0508l-3-4z" fill="#8da5f3" fill-opacity=".98824"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13 0-3 4h1.9473c-.1385 1.3203-.5583 1.9074-1.084 2.2754-.64426.451-1.7129.60547-2.9629.73047s-2.6814.22053-3.9121 1.082c-.89278.62493-1.5321 1.6522-1.8184 3.0957a2 2 0 0 0 -1.1699 1.8164 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -.84961-1.6328c.19235-.88496.55306-1.3373.98633-1.6406.64426-.451 1.7129-.60547 2.9629-.73047s2.6814-.22053 3.9121-1.082c1.0528-.73697 1.7552-2.032 1.9375-3.9141h2.0508l-3-4z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/PinJoint2D.svg b/editor/icons/PinJoint2D.svg
index fc7329e4f3..021af9c8f3 100644
--- a/editor/icons/PinJoint2D.svg
+++ b/editor/icons/PinJoint2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m9 1.2715-.70703.70703v1.4141l-2.1211 2.123 4.2422 4.2422 2.1211-2.1211h1.4141l.70703-.70703-5.6562-5.6582zm-3.5352 4.9512-3.5352.70703 7.0703 7.0703.70703-3.5352-4.2422-4.2422zm-1.4141 4.2422-1.4141 1.4141-.70703 2.1211 2.1211-.70703 1.4141-1.4141-1.4141-1.4141z" fill="#8da5f3" fill-opacity=".98824" fill-rule="evenodd"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m9 1.2715-.70703.70703v1.4141l-2.1211 2.123 4.2422 4.2422 2.1211-2.1211h1.4141l.70703-.70703-5.6562-5.6582zm-3.5352 4.9512-3.5352.70703 7.0703 7.0703.70703-3.5352-4.2422-4.2422zm-1.4141 4.2422-1.4141 1.4141-.70703 2.1211 2.1211-.70703 1.4141-1.4141-1.4141-1.4141z" fill="#8da5f3" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/PingPongLoop.svg b/editor/icons/PingPongLoop.svg
index c44f889b49..61a701a81e 100644
--- a/editor/icons/PingPongLoop.svg
+++ b/editor/icons/PingPongLoop.svg
@@ -1 +1 @@
-<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m10 7h-4v-2l-4 3 4 3v-2h4v2l4-3-4-3z"/><path d="m0 1v14h2v-7-7z"/><path d="m14 1v7 7h2v-14z"/></g></svg>
+<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m10 7h-4v-2l-4 3 4 3v-2h4v2l4-3-4-3z"/><path d="m0 1v14h2v-7-7z"/><path d="m14 1v7 7h2v-14z"/></g></svg>
diff --git a/editor/icons/PlayRemote.svg b/editor/icons/PlayRemote.svg
new file mode 100644
index 0000000000..f69414e856
--- /dev/null
+++ b/editor/icons/PlayRemote.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="16" height="16"><path d="m12.998 2.548-9.996.005a2.006 2.006 0 0 0-2.006 2v4.61c0 1.107.898 2.003 2.006 2.003h3.996v.9h-1.68v.381H3.001v2h2.315v.38h5.366v-.38H13v-2.004h-2.315v-.378H9.004v-.9h3.994a2.006 2.006 0 0 0 2.006-2.003v-4.61c0-1.106-.9-2.003-2.006-2.003zm-7.496 1.31 5 3-5 3z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/PointLight2D.svg b/editor/icons/PointLight2D.svg
index 1a3222c79e..e4352ff6cd 100644
--- a/editor/icons/PointLight2D.svg
+++ b/editor/icons/PointLight2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a5 5 0 0 0 -5 5 5 5 0 0 0 3 4.5762v2.4238h4v-2.4199a5 5 0 0 0 3-4.5801 5 5 0 0 0 -5-5zm0 2a3 3 0 0 1 3 3 3 3 0 0 1 -3 3 3 3 0 0 1 -3-3 3 3 0 0 1 3-3zm-1 11v1h2v-1z" fill="#8da5f3" fill-opacity=".98824"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a5 5 0 0 0 -5 5 5 5 0 0 0 3 4.5762v2.4238h4v-2.4199a5 5 0 0 0 3-4.5801 5 5 0 0 0 -5-5zm0 2a3 3 0 0 1 3 3 3 3 0 0 1 -3 3 3 3 0 0 1 -3-3 3 3 0 0 1 3-3zm-1 11v1h2v-1z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/README.md b/editor/icons/README.md
index 3159565180..d191000985 100644
--- a/editor/icons/README.md
+++ b/editor/icons/README.md
@@ -3,5 +3,5 @@
This folder contains all the icons used by Godot editor (except for platform
icons which are located in their respective platform folder).
-See [Editor icons](https://docs.godotengine.org/en/latest/development/editor/creating_icons.html)
+See [Editor icons](https://docs.godotengine.org/en/latest/contributing/development/editor/creating_icons.html)
in the documentation for details on creating icons for the Godot editor.
diff --git a/editor/icons/RemoteTransform2D.svg b/editor/icons/RemoteTransform2D.svg
index 9d03db5c3b..bbe4109cd2 100644
--- a/editor/icons/RemoteTransform2D.svg
+++ b/editor/icons/RemoteTransform2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-2.8565 0-5.4995 1.5262-6.9277 4a1 1 0 0 0 .36523 1.3672 1 1 0 0 0 1.3672-.36719c1.0726-1.8578 3.0501-3 5.1953-3s4.1227 1.1422 5.1953 3a1 1 0 0 0 1.3672.36719 1 1 0 0 0 .36523-1.3672c-1.4283-2.4738-4.0712-4-6.9277-4zm0 4c-1.8056 0-3.396 1.2207-3.8633 2.9648a1 1 0 0 0 .70703 1.2246 1 1 0 0 0 1.2246-.70703c.23553-.8791 1.0216-1.4824 1.9316-1.4824s1.6961.60332 1.9316 1.4824a1 1 0 0 0 1.2246.70703 1 1 0 0 0 .70703-1.2246c-.46732-1.7441-2.0577-2.9648-3.8633-2.9648zm0 4c-.554 0-1 .446-1 1v1h-3a4 4 0 0 0 2 3.4648 4 4 0 0 0 4 0 4 4 0 0 0 2-3.4648h-3v-1c0-.554-.446-1-1-1z" fill="#8da5f3" fill-opacity=".98824"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-2.8565 0-5.4995 1.5262-6.9277 4a1 1 0 0 0 .36523 1.3672 1 1 0 0 0 1.3672-.36719c1.0726-1.8578 3.0501-3 5.1953-3s4.1227 1.1422 5.1953 3a1 1 0 0 0 1.3672.36719 1 1 0 0 0 .36523-1.3672c-1.4283-2.4738-4.0712-4-6.9277-4zm0 4c-1.8056 0-3.396 1.2207-3.8633 2.9648a1 1 0 0 0 .70703 1.2246 1 1 0 0 0 1.2246-.70703c.23553-.8791 1.0216-1.4824 1.9316-1.4824s1.6961.60332 1.9316 1.4824a1 1 0 0 0 1.2246.70703 1 1 0 0 0 .70703-1.2246c-.46732-1.7441-2.0577-2.9648-3.8633-2.9648zm0 4c-.554 0-1 .446-1 1v1h-3a4 4 0 0 0 2 3.4648 4 4 0 0 0 4 0 4 4 0 0 0 2-3.4648h-3v-1c0-.554-.446-1-1-1z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/RigidBody2D.svg b/editor/icons/RigidBody2D.svg
index 5d08e991ae..ea317ce94c 100644
--- a/editor/icons/RigidBody2D.svg
+++ b/editor/icons/RigidBody2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 1.2227 3.9531 7 7 0 0 0 .30273.4082c.000785-.00256.0011667-.005252.0019532-.007812a7 7 0 0 0 5.4727 2.6465 7 7 0 0 0 3.2422-.80273c.001375.000393.002531.00156.003906.001953a7 7 0 0 0 .035156-.021485 7 7 0 0 0 .42578-.25 7 7 0 0 0 .16992-.10352 7 7 0 0 0 .36914-.26953 7 7 0 0 0 .20508-.15625 7 7 0 0 0 .3418-.30859 7 7 0 0 0 .16406-.1543 7 7 0 0 0 .33008-.36133 7 7 0 0 0 .14062-.16016 7 7 0 0 0 .27734-.37305 7 7 0 0 0 .13867-.19531 7 7 0 0 0 .21875-.36133 7 7 0 0 0 .14258-.25 7 7 0 0 0 .15625-.33398 7 7 0 0 0 .13867-.31055 7 7 0 0 0 .10742-.30859 7 7 0 0 0 .11914-.35352 7 7 0 0 0 .087891-.36914 7 7 0 0 0 .066406-.29297 7 7 0 0 0 .056641-.40039 7 7 0 0 0 .037109-.3125 7 7 0 0 0 .025391-.55273 7 7 0 0 0 -4.3926-6.4922 7 7 0 0 0 -.001953 0 7 7 0 0 0 -.66016-.22852 7 7 0 0 0 -.0058594-.0019531 7 7 0 0 0 -.55078-.13086 7 7 0 0 0 -.14062-.03125 7 7 0 0 0 -.55078-.072266 7 7 0 0 0 -.14258-.017578 7 7 0 0 0 -.55469-.025391zm1.9512 1.334a6 6 0 0 1 4.0488 5.666h-7a2 2 0 0 0 -.94922-1.6992c1.3464-2.0289 2.6038-3.2631 3.9004-3.9668zm-6.8281 2.1797c.14632.65093.35776 1.2833.68359 1.8848a2 2 0 0 0 -.80664 1.6016h-1a6 6 0 0 1 1.123-3.4863zm1.877 1.4863a2 2 0 0 0 -.10938.0039062 2 2 0 0 1 .10938-.0039062zm-.18945.011719a2 2 0 0 0 -.12109.013672 2 2 0 0 1 .12109-.013672zm-.44141.09375a2 2 0 0 0 -.056641.019531 2 2 0 0 1 .056641-.019531zm-1.3594 2.0605a2 2 0 0 0 .013672.11914 2 2 0 0 1 -.013672-.11914zm.027344.20898a2 2 0 0 0 .017578.080078 2 2 0 0 1 -.017578-.080078zm.73438 1.1992a2 2 0 0 0 1.2285.42578 2 2 0 0 0 1.0508-.30078c1.345 2.0268 2.6013 3.2645 3.8965 3.9688a6 6 0 0 1 -1.9473.33203 6 6 0 0 1 -5.0547-2.7695c.23771-.5785.50336-1.1403.82617-1.6563z" fill="#8da5f3" fill-opacity=".98824"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 1.2227 3.9531 7 7 0 0 0 .30273.4082c.000785-.00256.0011667-.005252.0019532-.007812a7 7 0 0 0 5.4727 2.6465 7 7 0 0 0 3.2422-.80273c.001375.000393.002531.00156.003906.001953a7 7 0 0 0 .035156-.021485 7 7 0 0 0 .42578-.25 7 7 0 0 0 .16992-.10352 7 7 0 0 0 .36914-.26953 7 7 0 0 0 .20508-.15625 7 7 0 0 0 .3418-.30859 7 7 0 0 0 .16406-.1543 7 7 0 0 0 .33008-.36133 7 7 0 0 0 .14062-.16016 7 7 0 0 0 .27734-.37305 7 7 0 0 0 .13867-.19531 7 7 0 0 0 .21875-.36133 7 7 0 0 0 .14258-.25 7 7 0 0 0 .15625-.33398 7 7 0 0 0 .13867-.31055 7 7 0 0 0 .10742-.30859 7 7 0 0 0 .11914-.35352 7 7 0 0 0 .087891-.36914 7 7 0 0 0 .066406-.29297 7 7 0 0 0 .056641-.40039 7 7 0 0 0 .037109-.3125 7 7 0 0 0 .025391-.55273 7 7 0 0 0 -4.3926-6.4922 7 7 0 0 0 -.001953 0 7 7 0 0 0 -.66016-.22852 7 7 0 0 0 -.0058594-.0019531 7 7 0 0 0 -.55078-.13086 7 7 0 0 0 -.14062-.03125 7 7 0 0 0 -.55078-.072266 7 7 0 0 0 -.14258-.017578 7 7 0 0 0 -.55469-.025391zm1.9512 1.334a6 6 0 0 1 4.0488 5.666h-7a2 2 0 0 0 -.94922-1.6992c1.3464-2.0289 2.6038-3.2631 3.9004-3.9668zm-6.8281 2.1797c.14632.65093.35776 1.2833.68359 1.8848a2 2 0 0 0 -.80664 1.6016h-1a6 6 0 0 1 1.123-3.4863zm1.877 1.4863a2 2 0 0 0 -.10938.0039062 2 2 0 0 1 .10938-.0039062zm-.18945.011719a2 2 0 0 0 -.12109.013672 2 2 0 0 1 .12109-.013672zm-.44141.09375a2 2 0 0 0 -.056641.019531 2 2 0 0 1 .056641-.019531zm-1.3594 2.0605a2 2 0 0 0 .013672.11914 2 2 0 0 1 -.013672-.11914zm.027344.20898a2 2 0 0 0 .017578.080078 2 2 0 0 1 -.017578-.080078zm.73438 1.1992a2 2 0 0 0 1.2285.42578 2 2 0 0 0 1.0508-.30078c1.345 2.0268 2.6013 3.2645 3.8965 3.9688a6 6 0 0 1 -1.9473.33203 6 6 0 0 1 -5.0547-2.7695c.23771-.5785.50336-1.1403.82617-1.6563z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/StaticBody2D.svg b/editor/icons/StaticBody2D.svg
index 359d4d858c..4d7c575dc0 100644
--- a/editor/icons/StaticBody2D.svg
+++ b/editor/icons/StaticBody2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -1036.4)"><path d="m3 1a2 2 0 0 0 -1.4141.58594 2 2 0 0 0 -.58594 1.4141v10a2 2 0 0 0 .58594 1.4141 2 2 0 0 0 1.4141.58594h10a2 2 0 0 0 2-2v-10a2 2 0 0 0 -2-2h-10zm0 1h10a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1-1v-10a1 1 0 0 1 1-1zm0 1v2h2v-2zm8 0v2h2v-2zm-8 8v2h2v-2zm8 0v2h2v-2z" fill="#8da5f3" fill-opacity=".98824" transform="translate(0 1036.4)"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -1036.4)"><path d="m3 1a2 2 0 0 0 -1.4141.58594 2 2 0 0 0 -.58594 1.4141v10a2 2 0 0 0 .58594 1.4141 2 2 0 0 0 1.4141.58594h10a2 2 0 0 0 2-2v-10a2 2 0 0 0 -2-2h-10zm0 1h10a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1-1v-10a1 1 0 0 1 1-1zm0 1v2h2v-2zm8 0v2h2v-2zm-8 8v2h2v-2zm8 0v2h2v-2z" fill="#8da5f3" transform="translate(0 1036.4)"/></g></svg>
diff --git a/editor/icons/StyleBoxGridVisible.svg b/editor/icons/StyleBoxGridVisible.svg
index 64419f4938..b13ee1023a 100644
--- a/editor/icons/StyleBoxGridVisible.svg
+++ b/editor/icons/StyleBoxGridVisible.svg
@@ -1 +1 @@
-<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><rect style="fill:#000;stroke-width:6.081;stroke-linejoin:round;stroke-miterlimit:5;fill-opacity:.75294119" width="16.131" height="16.131" x="-.008" y="-.006" rx="0" ry="1.188"/><path style="fill:#656565;fill-opacity:1;stroke-width:6.081;stroke-linejoin:round;stroke-miterlimit:5" d="M11.92 1.37v2.835h.549V1.37zm-5.7.017v2.818h.55V1.387zm8.776 3.18v1.595H11.92v3.57h.549V6.523h3.076V4.566ZM1.599 6.161v.361h2.717v-.36Zm4.621 0v3.57h.55V6.523h3.21v-.36Zm8.833 3.932v1.601H11.92v3.336h-1.39v.362h1.939v-3.335H15.6v-1.963ZM1.63 11.695v.362h2.685v-.362zm4.59 0v3.328H4.864v.362h1.904v-3.328H9.98v-.362z"/><path style="fill:#e0e0e0;fill-opacity:1;stroke-width:6.081;stroke-linejoin:round;stroke-miterlimit:5" d="M9.98 1.008v3.197H6.22v-3.18H4.316v3.18H1.051v1.957h3.265v3.57H1.082v1.963h3.234v3.328H6.22v-3.327h3.76v3.333h1.94v-3.334h3.133V9.733H11.92v-3.57h3.076V4.204H11.92V1.008zM6.22 6.162h3.76v3.57H6.22Z"/></svg>
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><rect style="fill:#000;stroke-width:6.081;stroke-linejoin:round;stroke-miterlimit:5;fill-opacity:.75294119" width="16.131" height="16.131" x="-.008" y="-.006" rx="0" ry="1.188"/><path style="fill:#656565;stroke-width:6.081;stroke-linejoin:round;stroke-miterlimit:5" d="M11.92 1.37v2.835h.549V1.37zm-5.7.017v2.818h.55V1.387zm8.776 3.18v1.595H11.92v3.57h.549V6.523h3.076V4.566ZM1.599 6.161v.361h2.717v-.36Zm4.621 0v3.57h.55V6.523h3.21v-.36Zm8.833 3.932v1.601H11.92v3.336h-1.39v.362h1.939v-3.335H15.6v-1.963ZM1.63 11.695v.362h2.685v-.362zm4.59 0v3.328H4.864v.362h1.904v-3.328H9.98v-.362z"/><path style="fill:#e0e0e0;stroke-width:6.081;stroke-linejoin:round;stroke-miterlimit:5" d="M9.98 1.008v3.197H6.22v-3.18H4.316v3.18H1.051v1.957h3.265v3.57H1.082v1.963h3.234v3.328H6.22v-3.327h3.76v3.333h1.94v-3.334h3.133V9.733H11.92v-3.57h3.076V4.204H11.92V1.008zM6.22 6.162h3.76v3.57H6.22Z"/></svg>
diff --git a/editor/icons/SystemFont.svg b/editor/icons/SystemFont.svg
index a6f62d56d3..25415a2a76 100644
--- a/editor/icons/SystemFont.svg
+++ b/editor/icons/SystemFont.svg
@@ -1 +1 @@
-<svg height="16" width="16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path style="fill:#e0e0e0;fill-opacity:1;stroke-width:.714755" d="m5.787 1-.402 1.613c-.352.265-.71.122-1.012-.111l-.904-.541L2.46 2.973l.853 1.425c-.058.438-.412.586-.79.635-.343.065-.674.216-1.024.213V6.72c.367 0 .715.157 1.074.224.371.032.716.243.727.65l-.84 1.4 1.008 1.01c.443-.266.895-.53 1.33-.802.349-.044.675.139.674.506l.314 1.258c.459-.059 1.099.115 1.45-.082.117-.475.242-.954.35-1.428A.67.67 0 0 1 8 9.195V7.5H6.5a.519.519 0 0 0-.281.084A.491.491 0 0 0 6 8v.5H4v-4h5.75c-.005-.22.107-.434.254-.625l.543-.902L9.535 1.96l-1.426.853c-.437-.058-.588-.412-.636-.79L7.217 1h-1.43z"/><path d="M4.5 5v3h1a1 1 0 0 1 1-1h2v6a1 1 0 0 1-1 1v1h4v-1a1 1 0 0 1-1-1V7h2a1 1 0 0 1 1 1h1V5h-6z" fill="#ff5f5f"/></svg>
+<svg height="16" width="16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path style="fill:#e0e0e0;stroke-width:.714755" d="m5.787 1-.402 1.613c-.352.265-.71.122-1.012-.111l-.904-.541L2.46 2.973l.853 1.425c-.058.438-.412.586-.79.635-.343.065-.674.216-1.024.213V6.72c.367 0 .715.157 1.074.224.371.032.716.243.727.65l-.84 1.4 1.008 1.01c.443-.266.895-.53 1.33-.802.349-.044.675.139.674.506l.314 1.258c.459-.059 1.099.115 1.45-.082.117-.475.242-.954.35-1.428A.67.67 0 0 1 8 9.195V7.5H6.5a.519.519 0 0 0-.281.084A.491.491 0 0 0 6 8v.5H4v-4h5.75c-.005-.22.107-.434.254-.625l.543-.902L9.535 1.96l-1.426.853c-.437-.058-.588-.412-.636-.79L7.217 1h-1.43z"/><path d="M4.5 5v3h1a1 1 0 0 1 1-1h2v6a1 1 0 0 1-1 1v1h4v-1a1 1 0 0 1-1-1V7h2a1 1 0 0 1 1 1h1V5h-6z" fill="#ff5f5f"/></svg>
diff --git a/editor/icons/Texture3D.svg b/editor/icons/Texture3D.svg
index a313613b26..d121c02f2b 100644
--- a/editor/icons/Texture3D.svg
+++ b/editor/icons/Texture3D.svg
@@ -1 +1 @@
-<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-rule="nonzero"><path d="m2 1c-.552 0-1 .448-1 1v12c0 .552.448 1 1 1h12c.552 0 1-.448 1-1v-12c0-.552-.448-1-1-1zm1 2h10v8h-10z"/><g fill-opacity=".99"><path d="m4.973 10.075c-.134 0-.275-.012-.424-.036-.149-.018-.293-.044-.432-.08-.14-.035-.266-.074-.381-.115-.114-.041-.203-.08-.268-.115l.216-1.1c.129.065.293.136.492.213.204.071.455.106.753.106.342 0 .593-.076.752-.23s.239-.361.239-.621c0-.159-.03-.292-.09-.399-.054-.112-.131-.201-.231-.266-.099-.071-.218-.118-.357-.142-.134-.029-.279-.044-.432-.044h-.433v-1.064h.492c.109 0 .214-.012.313-.036.104-.023.196-.062.276-.115.079-.059.141-.136.186-.23.05-.101.075-.225.075-.373 0-.112-.02-.21-.06-.292-.04-.083-.092-.151-.157-.204-.059-.054-.131-.092-.216-.116-.079-.029-.161-.044-.246-.044-.213 0-.412.038-.596.115-.178.077-.342.172-.491.284l-.395-.966c.079-.06.171-.122.275-.187.11-.065.229-.124.358-.177s.266-.098.41-.133c.149-.035.305-.053.469-.053.303 0 .564.044.783.133.223.083.407.204.551.363.144.154.251.337.321.55.069.207.104.435.104.683 0 .242-.057.479-.172.709-.114.225-.268.396-.462.515.269.13.475.325.619.585.149.254.223.561.223.922 0 .284-.039.547-.119.789-.079.237-.203.443-.372.621-.169.171-.385.307-.649.408-.258.094-.566.142-.924.142z"/><path d="m9.268 8.815c.055.006.117.012.186.018h.261c.581 0 1.011-.174 1.289-.523.284-.349.425-.831.425-1.445 0-.645-.134-1.132-.402-1.463-.269-.331-.693-.497-1.274-.497-.08 0-.162.003-.246.009-.085 0-.164.006-.239.018zm3.361-1.95c0 .532-.07.996-.209 1.392s-.338.724-.596.984c-.253.26-.564.455-.931.585-.368.13-.78.195-1.237.195-.209 0-.452-.011-.731-.035-.278-.018-.551-.059-.819-.124v-5.986c.268-.059.546-.097.834-.115.293-.023.544-.035.753-.035.442 0 .842.059 1.2.177.362.118.673.305.931.559s.457.579.596.975.209.872.209 1.428z"/></g></g></svg>
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-rule="nonzero"><path d="m2 1c-.552 0-1 .448-1 1v12c0 .552.448 1 1 1h12c.552 0 1-.448 1-1v-12c0-.552-.448-1-1-1zm1 2h10v8h-10z"/><path d="m4.973 10.075c-.134 0-.275-.012-.424-.036-.149-.018-.293-.044-.432-.08-.14-.035-.266-.074-.381-.115-.114-.041-.203-.08-.268-.115l.216-1.1c.129.065.293.136.492.213.204.071.455.106.753.106.342 0 .593-.076.752-.23s.239-.361.239-.621c0-.159-.03-.292-.09-.399-.054-.112-.131-.201-.231-.266-.099-.071-.218-.118-.357-.142-.134-.029-.279-.044-.432-.044h-.433v-1.064h.492c.109 0 .214-.012.313-.036.104-.023.196-.062.276-.115.079-.059.141-.136.186-.23.05-.101.075-.225.075-.373 0-.112-.02-.21-.06-.292-.04-.083-.092-.151-.157-.204-.059-.054-.131-.092-.216-.116-.079-.029-.161-.044-.246-.044-.213 0-.412.038-.596.115-.178.077-.342.172-.491.284l-.395-.966c.079-.06.171-.122.275-.187.11-.065.229-.124.358-.177s.266-.098.41-.133c.149-.035.305-.053.469-.053.303 0 .564.044.783.133.223.083.407.204.551.363.144.154.251.337.321.55.069.207.104.435.104.683 0 .242-.057.479-.172.709-.114.225-.268.396-.462.515.269.13.475.325.619.585.149.254.223.561.223.922 0 .284-.039.547-.119.789-.079.237-.203.443-.372.621-.169.171-.385.307-.649.408-.258.094-.566.142-.924.142z"/><path d="m9.268 8.815c.055.006.117.012.186.018h.261c.581 0 1.011-.174 1.289-.523.284-.349.425-.831.425-1.445 0-.645-.134-1.132-.402-1.463-.269-.331-.693-.497-1.274-.497-.08 0-.162.003-.246.009-.085 0-.164.006-.239.018zm3.361-1.95c0 .532-.07.996-.209 1.392s-.338.724-.596.984c-.253.26-.564.455-.931.585-.368.13-.78.195-1.237.195-.209 0-.452-.011-.731-.035-.278-.018-.551-.059-.819-.124v-5.986c.268-.059.546-.097.834-.115.293-.023.544-.035.753-.035.442 0 .842.059 1.2.177.362.118.673.305.931.559s.457.579.596.975.209.872.209 1.428z"/></g></svg>
diff --git a/editor/icons/TileMap.svg b/editor/icons/TileMap.svg
index 291d02b858..d3432f41ac 100644
--- a/editor/icons/TileMap.svg
+++ b/editor/icons/TileMap.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2z" fill="#8da5f3" fill-opacity=".98824"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/ToolBoneSelect.svg b/editor/icons/ToolBoneSelect.svg
index cc12b69a82..5e9178ee94 100644
--- a/editor/icons/ToolBoneSelect.svg
+++ b/editor/icons/ToolBoneSelect.svg
@@ -1 +1 @@
-<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".9961"><path d="m16 11.46-6.142-2.527-1.572-.647.647 1.572 2.527 6.142.913-2.72 1.815 1.817.91-.909-1.818-1.815z"/><path d="m7.784 11.008-.886-2.152c-.23-.56-.102-1.203.327-1.631.287-.287.67-.439 1.061-.439.192 0 .386.037.57.113l2.151.885.17-.17c.977.645 2.271.516 3.1-.311.964-.963.964-2.524 0-3.488-.377-.377-.867-.622-1.396-.697-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.963.964 2.525.964 3.488 0 .828-.828.96-2.125.314-3.104z"/></g></svg>
+<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m16 11.46-6.142-2.527-1.572-.647.647 1.572 2.527 6.142.913-2.72 1.815 1.817.91-.909-1.818-1.815z"/><path d="m7.784 11.008-.886-2.152c-.23-.56-.102-1.203.327-1.631.287-.287.67-.439 1.061-.439.192 0 .386.037.57.113l2.151.885.17-.17c.977.645 2.271.516 3.1-.311.964-.963.964-2.524 0-3.488-.377-.377-.867-.622-1.396-.697-.074-.529-.318-1.019-.695-1.397-.455-.453-1.067-.711-1.707-.721-.667-.01-1.309.25-1.782.72-.828.829-.96 2.126-.314 3.105l-3.558 3.561c-.978-.646-2.274-.515-3.103.312-.963.962-.963 2.524 0 3.487.378.377.868.621 1.396.695.075.529.319 1.02.696 1.396.963.964 2.525.964 3.488 0 .828-.828.96-2.125.314-3.104z"/></g></svg>
diff --git a/editor/icons/TouchScreenButton.svg b/editor/icons/TouchScreenButton.svg
index 7e3e232867..731743694d 100644
--- a/editor/icons/TouchScreenButton.svg
+++ b/editor/icons/TouchScreenButton.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h2v-1h-1-1v-2h8v2h-2v1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0 -1-1zm4 2a1 1 0 0 0 -1 1v7 .033203l-2.4746-1.8086c-.52015-.3803-1.1948-.4556-1.6504 0-.45566.4556-.45561 1.1948 0 1.6504l4.125 4.125h6c1.1046 0 2-.8954 2-2v-5h-6v-4a1 1 0 0 0 -1-1z" fill="#8da5f3" fill-opacity=".98824"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h2v-1h-1-1v-2h8v2h-2v1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0 -1-1zm4 2a1 1 0 0 0 -1 1v7 .033203l-2.4746-1.8086c-.52015-.3803-1.1948-.4556-1.6504 0-.45566.4556-.45561 1.1948 0 1.6504l4.125 4.125h6c1.1046 0 2-.8954 2-2v-5h-6v-4a1 1 0 0 0 -1-1z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/UseBlendDisable.svg b/editor/icons/UseBlendDisable.svg
new file mode 100644
index 0000000000..449dc2d0c8
--- /dev/null
+++ b/editor/icons/UseBlendDisable.svg
@@ -0,0 +1 @@
+<svg enable-background="new -595.5 420.5 16 16" height="16" viewBox="-595.5 420.5 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m-591 421.5h7v14h-7z" fill="#a3e595" opacity=".5"/><g fill="none" stroke="#a3e595" stroke-linecap="square" stroke-width="2"><path d="m-585 434.5v-12"/><path d="m-590 422.5v12"/><path d="m-581.5 422.5h-12"/></g></svg>
diff --git a/editor/icons/UseBlendEnable.svg b/editor/icons/UseBlendEnable.svg
new file mode 100644
index 0000000000..5567b2d8c6
--- /dev/null
+++ b/editor/icons/UseBlendEnable.svg
@@ -0,0 +1 @@
+<svg enable-background="new -595.5 420.5 16 16" height="16" viewBox="-595.5 420.5 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m-587.5 423.244c-3.995 2.354-7 6.775-7 11.256v1h14v-1c0-4.48-3.005-8.901-7-11.256z" fill="#95c6e8" opacity=".5"/><g fill="none" stroke="#95c6e8" stroke-linecap="square" stroke-width="2"><path d="m-581.5 422.5c-6 0-12 6-12 12"/><path d="m-581.5 434.5c0-6-6-12-12-12"/></g></svg>
diff --git a/editor/icons/VisibleOnScreenEnabler2D.svg b/editor/icons/VisibleOnScreenEnabler2D.svg
index 989675f44f..434083b7c6 100644
--- a/editor/icons/VisibleOnScreenEnabler2D.svg
+++ b/editor/icons/VisibleOnScreenEnabler2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v3h1v-2h2v-1zm11 0v1h2v2h1v-3zm-4 1c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -.0058594.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0-.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4-4 4 4 0 0 1 4-4zm0 2a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -2-2zm-7 6v3h3v-1h-2v-2zm13 0v2h-2v1h3v-3z" fill="#8da5f3" fill-opacity=".98824" fill-rule="evenodd"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v3h1v-2h2v-1zm11 0v1h2v2h1v-3zm-4 1c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -.0058594.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0-.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4-4 4 4 0 0 1 4-4zm0 2a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -2-2zm-7 6v3h3v-1h-2v-2zm13 0v2h-2v1h3v-3z" fill="#8da5f3" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/YSort.svg b/editor/icons/YSort.svg
index 31e5d9a67e..8394a3bb9b 100644
--- a/editor/icons/YSort.svg
+++ b/editor/icons/YSort.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 1-3 3h2v8h-2l3 3 3-3h-2v-8h2zm5 1v2h6v-2zm0 5v2h4v-2zm0 5v2h2v-2z" fill="#8da5f3" fill-opacity=".98824"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 1-3 3h2v8h-2l3 3 3-3h-2v-8h2zm5 1v2h6v-2zm0 5v2h4v-2zm0 5v2h2v-2z" fill="#8da5f3"/></svg>
diff --git a/editor/icons/ZoomLess.svg b/editor/icons/ZoomLess.svg
index 18b052c32a..53298ed6ed 100644
--- a/editor/icons/ZoomLess.svg
+++ b/editor/icons/ZoomLess.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"><circle cx="8" cy="1044.4" fill-opacity=".39216" r="8" stroke-opacity=".98824"/><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm-4 6h8v2h-8z" fill="#e0e0e0" transform="translate(0 1036.4)"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"><circle cx="8" cy="1044.4" fill-opacity=".39216" r="8"/><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm-4 6h8v2h-8z" fill="#e0e0e0" transform="translate(0 1036.4)"/></g></svg>
diff --git a/editor/icons/ZoomMore.svg b/editor/icons/ZoomMore.svg
index fdc80611da..2b84e822e6 100644
--- a/editor/icons/ZoomMore.svg
+++ b/editor/icons/ZoomMore.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"><circle cx="8" cy="1044.4" fill-opacity=".39216" r="8" stroke-opacity=".98824"/><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm-1 3h2v3h3v2h-3v3h-2v-3h-3v-2h3z" fill="#e0e0e0" transform="translate(0 1036.4)"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"><circle cx="8" cy="1044.4" fill-opacity=".39216" r="8"/><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm-1 3h2v3h3v2h-3v3h-2v-3h-3v-2h3z" fill="#e0e0e0" transform="translate(0 1036.4)"/></g></svg>
diff --git a/editor/icons/ZoomReset.svg b/editor/icons/ZoomReset.svg
index f6793b6816..ffb0d42563 100644
--- a/editor/icons/ZoomReset.svg
+++ b/editor/icons/ZoomReset.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"><circle cx="8" cy="1044.4" fill-opacity=".39216" r="8" stroke-opacity=".98824"/><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm-.029297 3.002a1.0001 1.0001 0 0 1 1.0293.99805v7h-2v-5.1309l-1.4453.96289-1.1094-1.6641 3-2a1.0001 1.0001 0 0 1 .52539-.16602z" fill="#e0e0e0" transform="translate(0 1036.4)"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"><circle cx="8" cy="1044.4" fill-opacity=".39216" r="8"/><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm-.029297 3.002a1.0001 1.0001 0 0 1 1.0293.99805v7h-2v-5.1309l-1.4453.96289-1.1094-1.6641 3-2a1.0001 1.0001 0 0 1 .52539-.16602z" fill="#e0e0e0" transform="translate(0 1036.4)"/></g></svg>
diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp
index fcd706627d..a8d746fde6 100644
--- a/editor/import/collada.cpp
+++ b/editor/import/collada.cpp
@@ -262,7 +262,7 @@ void Collada::_parse_asset(XMLParser &parser) {
COLLADA_PRINT("up axis: " + parser.get_node_data());
} else if (name == "unit") {
- state.unit_scale = parser.get_attribute_value("meter").to_float();
+ state.unit_scale = parser.get_named_attribute_value("meter").to_float();
COLLADA_PRINT("unit scale: " + rtos(state.unit_scale));
}
@@ -273,7 +273,7 @@ void Collada::_parse_asset(XMLParser &parser) {
}
void Collada::_parse_image(XMLParser &parser) {
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
if (!(state.import_flags & IMPORT_FLAG_SCENE)) {
if (!parser.is_empty()) {
@@ -286,7 +286,7 @@ void Collada::_parse_image(XMLParser &parser) {
if (state.version < State::Version(1, 4, 0)) {
/* <1.4 */
- String path = parser.get_attribute_value("source").strip_edges();
+ String path = parser.get_named_attribute_value("source").strip_edges();
if (!path.contains("://") && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().path_join(path.uri_decode()));
@@ -337,9 +337,9 @@ void Collada::_parse_material(XMLParser &parser) {
Material material;
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
if (parser.has_attribute("name")) {
- material.name = parser.get_attribute_value("name");
+ material.name = parser.get_named_attribute_value("name");
}
if (state.version < State::Version(1, 4, 0)) {
@@ -348,7 +348,7 @@ void Collada::_parse_material(XMLParser &parser) {
} else {
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT && parser.get_node_name() == "instance_effect") {
- material.instance_effect = _uri_to_id(parser.get_attribute_value("url"));
+ material.instance_effect = _uri_to_id(parser.get_named_attribute_value("url"));
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "material") {
break; //end of <asset>
}
@@ -549,7 +549,7 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
_parse_effect_material(parser, effect, id); // try again
} else if (parser.get_node_name() == "newparam") {
- String name = parser.get_attribute_value("sid");
+ String name = parser.get_named_attribute_value("sid");
Variant value = _parse_param(parser);
effect.params[name] = value;
COLLADA_PRINT("param: " + name + " value:" + String(value));
@@ -591,7 +591,7 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
}
} else if (parser.get_node_name() == "texture") {
- String sampler = parser.get_attribute_value("texture");
+ String sampler = parser.get_named_attribute_value("texture");
if (!effect.params.has(sampler)) {
ERR_PRINT(String("Couldn't find sampler: " + sampler + " in material:" + id).utf8().get_data());
} else {
@@ -609,7 +609,7 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
} else if (what == "emission") {
effect.emission.texture = uri;
} else if (what == "bump") {
- if (parser.has_attribute("bumptype") && parser.get_attribute_value("bumptype") != "NORMALMAP") {
+ if (parser.has_attribute("bumptype") && parser.get_named_attribute_value("bumptype") != "NORMALMAP") {
WARN_PRINT("'bump' texture type is not NORMALMAP, only NORMALMAP is supported.");
}
@@ -654,7 +654,7 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
if (parser.get_node_name() == "texture") {
- String sampler = parser.get_attribute_value("texture");
+ String sampler = parser.get_named_attribute_value("texture");
if (!effect.params.has(sampler)) {
ERR_PRINT(String("Couldn't find sampler: " + sampler + " in material:" + id).utf8().get_data());
} else {
@@ -665,7 +665,7 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
} else {
String uri = effect.params[surface];
- if (parser.has_attribute("bumptype") && parser.get_attribute_value("bumptype") != "NORMALMAP") {
+ if (parser.has_attribute("bumptype") && parser.get_named_attribute_value("bumptype") != "NORMALMAP") {
WARN_PRINT("'bump' texture type is not NORMALMAP, only NORMALMAP is supported.");
}
@@ -703,11 +703,11 @@ void Collada::_parse_effect(XMLParser &parser) {
return;
}
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
Effect effect;
if (parser.has_attribute("name")) {
- effect.name = parser.get_attribute_value("name");
+ effect.name = parser.get_named_attribute_value("name");
}
_parse_effect_material(parser, effect, id);
@@ -724,7 +724,7 @@ void Collada::_parse_camera(XMLParser &parser) {
return;
}
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
state.camera_data_map[id] = CameraData();
CameraData &camera = state.camera_data_map[id];
@@ -780,7 +780,7 @@ void Collada::_parse_light(XMLParser &parser) {
return;
}
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
state.light_data_map[id] = LightData();
LightData &light = state.light_data_map[id];
@@ -848,7 +848,7 @@ void Collada::_parse_curve_geometry(XMLParser &parser, String p_id, String p_nam
CurveData &curvedata = state.curve_data_map[p_id];
curvedata.name = p_name;
- String closed = parser.get_attribute_value_safe("closed").to_lower();
+ String closed = parser.get_named_attribute_value_safe("closed").to_lower();
curvedata.closed = closed == "true" || closed == "1";
COLLADA_PRINT("curve name: " + p_name);
@@ -865,7 +865,7 @@ void Collada::_parse_curve_geometry(XMLParser &parser, String p_id, String p_nam
String section = parser.get_node_name();
if (section == "source") {
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
curvedata.sources[id] = CurveData::Source();
current_source = id;
COLLADA_PRINT("source data: " + id);
@@ -888,15 +888,15 @@ void Collada::_parse_curve_geometry(XMLParser &parser, String p_id, String p_nam
} else if (section == "accessor") { // child of source (below a technique tag)
if (curvedata.sources.has(current_source)) {
- curvedata.sources[current_source].stride = parser.get_attribute_value("stride").to_int();
+ curvedata.sources[current_source].stride = parser.get_named_attribute_value("stride").to_int();
COLLADA_PRINT("section: " + current_source + " stride " + itos(curvedata.sources[current_source].stride));
}
} else if (section == "control_vertices") {
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
if (parser.get_node_name() == "input") {
- String semantic = parser.get_attribute_value("semantic");
- String source = _uri_to_id(parser.get_attribute_value("source"));
+ String semantic = parser.get_named_attribute_value("semantic");
+ String source = _uri_to_id(parser.get_named_attribute_value("source"));
curvedata.control_vertices[semantic] = source;
@@ -945,7 +945,7 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
String section = parser.get_node_name();
if (section == "source") {
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
meshdata.sources[id] = MeshData::Source();
current_source = id;
COLLADA_PRINT("source data: " + id);
@@ -961,19 +961,19 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
} else if (section == "accessor") { // child of source (below a technique tag)
if (meshdata.sources.has(current_source)) {
- meshdata.sources[current_source].stride = parser.get_attribute_value("stride").to_int();
+ meshdata.sources[current_source].stride = parser.get_named_attribute_value("stride").to_int();
COLLADA_PRINT("section: " + current_source + " stride " + itos(meshdata.sources[current_source].stride));
}
} else if (section == "vertices") {
MeshData::Vertices vert;
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
int last_ref = 0;
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
if (parser.get_node_name() == "input") {
- String semantic = parser.get_attribute_value("semantic");
- String source = _uri_to_id(parser.get_attribute_value("source"));
+ String semantic = parser.get_named_attribute_value("semantic");
+ String source = _uri_to_id(parser.get_named_attribute_value("source"));
if (semantic == "TEXCOORD") {
semantic = "TEXCOORD" + itos(last_ref++);
@@ -998,22 +998,22 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
MeshData::Primitives prim;
if (parser.has_attribute("material")) {
- prim.material = parser.get_attribute_value("material");
+ prim.material = parser.get_named_attribute_value("material");
}
- prim.count = parser.get_attribute_value("count").to_int();
+ prim.count = parser.get_named_attribute_value("count").to_int();
prim.vertex_size = 0;
int last_ref = 0;
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
if (parser.get_node_name() == "input") {
- String semantic = parser.get_attribute_value("semantic");
- String source = _uri_to_id(parser.get_attribute_value("source"));
+ String semantic = parser.get_named_attribute_value("semantic");
+ String source = _uri_to_id(parser.get_named_attribute_value("source"));
if (semantic == "TEXCOORD") {
semantic = "TEXCOORD" + itos(last_ref++);
}
- int offset = parser.get_attribute_value("offset").to_int();
+ int offset = parser.get_named_attribute_value("offset").to_int();
MeshData::Primitives::SourceRef sref;
sref.source = source;
@@ -1074,7 +1074,7 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
state.skin_controller_data_map[p_id] = SkinControllerData();
SkinControllerData &skindata = state.skin_controller_data_map[p_id];
- skindata.base = _uri_to_id(parser.get_attribute_value("source"));
+ skindata.base = _uri_to_id(parser.get_named_attribute_value("source"));
String current_source;
@@ -1091,7 +1091,7 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
COLLADA_PRINT("skeleton bind shape transform: " + skindata.bind_shape);
} else if (section == "source") {
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
skindata.sources[id] = SkinControllerData::Source();
current_source = id;
COLLADA_PRINT("source data: " + id);
@@ -1125,7 +1125,7 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
if (skindata.sources.has(current_source)) {
int stride = 1;
if (parser.has_attribute("stride")) {
- stride = parser.get_attribute_value("stride").to_int();
+ stride = parser.get_named_attribute_value("stride").to_int();
}
skindata.sources[current_source].stride = stride;
@@ -1138,8 +1138,8 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
if (parser.get_node_name() == "input") {
- String semantic = parser.get_attribute_value("semantic");
- String source = _uri_to_id(parser.get_attribute_value("source"));
+ String semantic = parser.get_named_attribute_value("semantic");
+ String source = _uri_to_id(parser.get_named_attribute_value("source"));
joint.sources[semantic] = source;
@@ -1155,15 +1155,15 @@ void Collada::_parse_skin_controller(XMLParser &parser, String p_id) {
} else if (section == "vertex_weights") {
SkinControllerData::Weights weights;
- weights.count = parser.get_attribute_value("count").to_int();
+ weights.count = parser.get_named_attribute_value("count").to_int();
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
if (parser.get_node_name() == "input") {
- String semantic = parser.get_attribute_value("semantic");
- String source = _uri_to_id(parser.get_attribute_value("source"));
+ String semantic = parser.get_named_attribute_value("semantic");
+ String source = _uri_to_id(parser.get_named_attribute_value("source"));
- int offset = parser.get_attribute_value("offset").to_int();
+ int offset = parser.get_named_attribute_value("offset").to_int();
SkinControllerData::Weights::SourceRef sref;
sref.source = source;
@@ -1228,8 +1228,8 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
state.morph_controller_data_map[p_id] = MorphControllerData();
MorphControllerData &morphdata = state.morph_controller_data_map[p_id];
- morphdata.mesh = _uri_to_id(parser.get_attribute_value("source"));
- morphdata.mode = parser.get_attribute_value("method");
+ morphdata.mesh = _uri_to_id(parser.get_named_attribute_value("source"));
+ morphdata.mode = parser.get_named_attribute_value("method");
String current_source;
while (parser.read() == OK) {
@@ -1237,7 +1237,7 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
String section = parser.get_node_name();
if (section == "source") {
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
morphdata.sources[id] = MorphControllerData::Source();
current_source = id;
COLLADA_PRINT("source data: " + id);
@@ -1261,7 +1261,7 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
if (morphdata.sources.has(current_source)) {
int stride = 1;
if (parser.has_attribute("stride")) {
- stride = parser.get_attribute_value("stride").to_int();
+ stride = parser.get_named_attribute_value("stride").to_int();
}
morphdata.sources[current_source].stride = stride;
@@ -1272,8 +1272,8 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
if (parser.get_node_name() == "input") {
- String semantic = parser.get_attribute_value("semantic");
- String source = _uri_to_id(parser.get_attribute_value("source"));
+ String semantic = parser.get_named_attribute_value("semantic");
+ String source = _uri_to_id(parser.get_named_attribute_value("source"));
morphdata.targets[semantic] = source;
@@ -1295,7 +1295,7 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) {
}
void Collada::_parse_controller(XMLParser &parser) {
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
if (parser.is_empty()) {
return;
@@ -1320,7 +1320,7 @@ Collada::Node *Collada::_parse_visual_instance_geometry(XMLParser &parser) {
String type = parser.get_node_name();
NodeGeometry *geom = memnew(NodeGeometry);
geom->controller = type == "instance_controller";
- geom->source = _uri_to_id(parser.get_attribute_value_safe("url"));
+ geom->source = _uri_to_id(parser.get_named_attribute_value_safe("url"));
if (parser.is_empty()) { //nothing else to parse...
return geom;
@@ -1329,8 +1329,8 @@ Collada::Node *Collada::_parse_visual_instance_geometry(XMLParser &parser) {
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
if (parser.get_node_name() == "instance_material") {
- String symbol = parser.get_attribute_value("symbol");
- String target = _uri_to_id(parser.get_attribute_value("target"));
+ String symbol = parser.get_named_attribute_value("symbol");
+ String target = _uri_to_id(parser.get_named_attribute_value("target"));
NodeGeometry::Material mat;
mat.target = target;
@@ -1370,7 +1370,7 @@ Collada::Node *Collada::_parse_visual_instance_geometry(XMLParser &parser) {
Collada::Node *Collada::_parse_visual_instance_camera(XMLParser &parser) {
NodeCamera *cam = memnew(NodeCamera);
- cam->camera = _uri_to_id(parser.get_attribute_value_safe("url"));
+ cam->camera = _uri_to_id(parser.get_named_attribute_value_safe("url"));
if (state.up_axis == Vector3::AXIS_Z) { //collada weirdness
cam->post_transform.basis.rotate(Vector3(1, 0, 0), -Math_PI * 0.5);
@@ -1391,7 +1391,7 @@ Collada::Node *Collada::_parse_visual_instance_camera(XMLParser &parser) {
Collada::Node *Collada::_parse_visual_instance_light(XMLParser &parser) {
NodeLight *cam = memnew(NodeLight);
- cam->light = _uri_to_id(parser.get_attribute_value_safe("url"));
+ cam->light = _uri_to_id(parser.get_named_attribute_value_safe("url"));
if (state.up_axis == Vector3::AXIS_Z) { //collada weirdness
cam->post_transform.basis.rotate(Vector3(1, 0, 0), -Math_PI * 0.5);
@@ -1437,7 +1437,7 @@ Collada::Node *Collada::_parse_visual_node_instance_data(XMLParser &parser) {
Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
String name;
- String id = parser.get_attribute_value_safe("id");
+ String id = parser.get_named_attribute_value_safe("id");
bool found_name = false;
@@ -1455,25 +1455,25 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
Node *node = nullptr;
- name = parser.has_attribute("name") ? parser.get_attribute_value_safe("name") : parser.get_attribute_value_safe("id");
+ name = parser.has_attribute("name") ? parser.get_named_attribute_value_safe("name") : parser.get_named_attribute_value_safe("id");
if (name.is_empty()) {
name = id;
} else {
found_name = true;
}
- if ((parser.has_attribute("type") && parser.get_attribute_value("type") == "JOINT") || state.idref_joints.has(name)) {
+ if ((parser.has_attribute("type") && parser.get_named_attribute_value("type") == "JOINT") || state.idref_joints.has(name)) {
// handle a bone
NodeJoint *joint = memnew(NodeJoint);
if (parser.has_attribute("sid")) { //bones may not have sid
- joint->sid = parser.get_attribute_value("sid");
+ joint->sid = parser.get_named_attribute_value("sid");
//state.bone_map[joint->sid]=joint;
} else if (state.idref_joints.has(name)) {
joint->sid = name; //kind of a cheat but..
} else if (parser.has_attribute("name")) {
- joint->sid = parser.get_attribute_value_safe("name");
+ joint->sid = parser.get_named_attribute_value_safe("name");
}
if (!joint->sid.is_empty()) {
@@ -1490,7 +1490,7 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
if (section == "translate") {
Node::XForm xf;
if (parser.has_attribute("sid")) {
- xf.id = parser.get_attribute_value("sid");
+ xf.id = parser.get_named_attribute_value("sid");
}
xf.op = Node::XForm::OP_TRANSLATE;
@@ -1501,7 +1501,7 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
} else if (section == "rotate") {
Node::XForm xf;
if (parser.has_attribute("sid")) {
- xf.id = parser.get_attribute_value("sid");
+ xf.id = parser.get_named_attribute_value("sid");
}
xf.op = Node::XForm::OP_ROTATE;
@@ -1513,7 +1513,7 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
} else if (section == "scale") {
Node::XForm xf;
if (parser.has_attribute("sid")) {
- xf.id = parser.get_attribute_value("sid");
+ xf.id = parser.get_named_attribute_value("sid");
}
xf.op = Node::XForm::OP_SCALE;
@@ -1527,7 +1527,7 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
} else if (section == "matrix") {
Node::XForm xf;
if (parser.has_attribute("sid")) {
- xf.id = parser.get_attribute_value("sid");
+ xf.id = parser.get_named_attribute_value("sid");
}
xf.op = Node::XForm::OP_MATRIX;
@@ -1544,7 +1544,7 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
} else if (section == "visibility") {
Node::XForm xf;
if (parser.has_attribute("sid")) {
- xf.id = parser.get_attribute_value("sid");
+ xf.id = parser.get_named_attribute_value("sid");
}
xf.op = Node::XForm::OP_VISIBILITY;
@@ -1609,7 +1609,7 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) {
}
void Collada::_parse_visual_scene(XMLParser &parser) {
- String id = parser.get_attribute_value("id");
+ String id = parser.get_named_attribute_value("id");
if (parser.is_empty()) {
return;
@@ -1619,7 +1619,7 @@ void Collada::_parse_visual_scene(XMLParser &parser) {
VisualScene &vscene = state.visual_scene_map[id];
if (parser.has_attribute("name")) {
- vscene.name = parser.get_attribute_value("name");
+ vscene.name = parser.get_named_attribute_value("name");
}
while (parser.read() == OK) {
@@ -1656,7 +1656,7 @@ void Collada::_parse_animation(XMLParser &parser) {
String id = "";
if (parser.has_attribute("id")) {
- id = parser.get_attribute_value("id");
+ id = parser.get_named_attribute_value("id");
}
String current_source;
@@ -1668,7 +1668,7 @@ void Collada::_parse_animation(XMLParser &parser) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
String name = parser.get_node_name();
if (name == "source") {
- current_source = parser.get_attribute_value("id");
+ current_source = parser.get_named_attribute_value("id");
source_param_names[current_source] = Vector<String>();
source_param_types[current_source] = Vector<String>();
@@ -1683,32 +1683,32 @@ void Collada::_parse_animation(XMLParser &parser) {
}
} else if (name == "accessor") {
if (!current_source.is_empty() && parser.has_attribute("stride")) {
- source_strides[current_source] = parser.get_attribute_value("stride").to_int();
+ source_strides[current_source] = parser.get_named_attribute_value("stride").to_int();
}
} else if (name == "sampler") {
- current_sampler = parser.get_attribute_value("id");
+ current_sampler = parser.get_named_attribute_value("id");
samplers[current_sampler] = HashMap<String, String>();
} else if (name == "param") {
if (parser.has_attribute("name")) {
- source_param_names[current_source].push_back(parser.get_attribute_value("name"));
+ source_param_names[current_source].push_back(parser.get_named_attribute_value("name"));
} else {
source_param_names[current_source].push_back("");
}
if (parser.has_attribute("type")) {
- source_param_types[current_source].push_back(parser.get_attribute_value("type"));
+ source_param_types[current_source].push_back(parser.get_named_attribute_value("type"));
} else {
source_param_types[current_source].push_back("");
}
} else if (name == "input") {
if (!current_sampler.is_empty()) {
- samplers[current_sampler][parser.get_attribute_value("semantic")] = parser.get_attribute_value("source");
+ samplers[current_sampler][parser.get_named_attribute_value("semantic")] = parser.get_named_attribute_value("source");
}
} else if (name == "channel") {
- channel_sources.push_back(parser.get_attribute_value("source"));
- channel_targets.push_back(parser.get_attribute_value("target"));
+ channel_sources.push_back(parser.get_named_attribute_value("source"));
+ channel_targets.push_back(parser.get_named_attribute_value("target"));
}
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "animation") {
@@ -1857,22 +1857,22 @@ void Collada::_parse_animation_clip(XMLParser &parser) {
AnimationClip clip;
if (parser.has_attribute("name")) {
- clip.name = parser.get_attribute_value("name");
+ clip.name = parser.get_named_attribute_value("name");
} else if (parser.has_attribute("id")) {
- clip.name = parser.get_attribute_value("id");
+ clip.name = parser.get_named_attribute_value("id");
}
if (parser.has_attribute("start")) {
- clip.begin = parser.get_attribute_value("start").to_float();
+ clip.begin = parser.get_named_attribute_value("start").to_float();
}
if (parser.has_attribute("end")) {
- clip.end = parser.get_attribute_value("end").to_float();
+ clip.end = parser.get_named_attribute_value("end").to_float();
}
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
String name = parser.get_node_name();
if (name == "instance_animation") {
- String url = _uri_to_id(parser.get_attribute_value("url"));
+ String url = _uri_to_id(parser.get_named_attribute_value("url"));
clip.tracks.push_back(url);
}
@@ -1894,9 +1894,9 @@ void Collada::_parse_scene(XMLParser &parser) {
String name = parser.get_node_name();
if (name == "instance_visual_scene") {
- state.root_visual_scene = _uri_to_id(parser.get_attribute_value("url"));
+ state.root_visual_scene = _uri_to_id(parser.get_named_attribute_value("url"));
} else if (name == "instance_physics_scene") {
- state.root_physics_scene = _uri_to_id(parser.get_attribute_value("url"));
+ state.root_physics_scene = _uri_to_id(parser.get_named_attribute_value("url"));
}
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && parser.get_node_name() == "scene") {
@@ -1925,8 +1925,8 @@ void Collada::_parse_library(XMLParser &parser) {
} else if (name == "light") {
_parse_light(parser);
} else if (name == "geometry") {
- String id = parser.get_attribute_value("id");
- String name2 = parser.get_attribute_value_safe("name");
+ String id = parser.get_named_attribute_value("id");
+ String name2 = parser.get_named_attribute_value_safe("name");
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
if (parser.get_node_name() == "mesh") {
@@ -2346,7 +2346,7 @@ Error Collada::load(const String &p_path, int p_flags) {
{
//version
- String version = parser.get_attribute_value("version");
+ String version = parser.get_named_attribute_value("version");
state.version.major = version.get_slice(".", 0).to_int();
state.version.minor = version.get_slice(".", 1).to_int();
state.version.rev = version.get_slice(".", 2).to_int();
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 4b0ece3367..1ffede6502 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -734,7 +734,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p
/* CREATE PRIMITIVE ARRAY */
/**************************/
- // The way collada uses indices is more optimal, and friendlier with 3D modelling software,
+ // The way collada uses indices is more optimal, and friendlier with 3D modeling software,
// because it can index everything, not only vertices (similar to how the WII works).
// This is, however, more incompatible with standard video cards, so arrays must be converted.
// Must convert to GL/DX format.
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index fb14dcf888..ef3d3d1276 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -172,17 +172,15 @@ Error EditorImportPlugin::import(const String &p_source_file, const String &p_sa
++E;
}
- int err = 0;
+ Error err = OK;
if (GDVIRTUAL_CALL(_import, p_source_file, p_save_path, options, platform_variants, gen_files, err)) {
- Error ret_err = Error(err);
-
for (int i = 0; i < platform_variants.size(); i++) {
r_platform_variants->push_back(platform_variants[i]);
}
for (int i = 0; i < gen_files.size(); i++) {
r_gen_files->push_back(gen_files[i]);
}
- return ret_err;
+ return err;
}
ERR_FAIL_V_MSG(ERR_METHOD_NOT_FOUND, "Unimplemented _import in add-on.");
}
diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h
index 0f79ba4783..bf912058a2 100644
--- a/editor/import/editor_import_plugin.h
+++ b/editor/import/editor_import_plugin.h
@@ -51,7 +51,7 @@ protected:
GDVIRTUAL0RC(float, _get_priority)
GDVIRTUAL0RC(int, _get_import_order)
GDVIRTUAL3RC(bool, _get_option_visibility, String, StringName, Dictionary)
- GDVIRTUAL5RC(int, _import, String, String, Dictionary, TypedArray<String>, TypedArray<String>)
+ GDVIRTUAL5RC(Error, _import, String, String, Dictionary, TypedArray<String>, TypedArray<String>)
public:
EditorImportPlugin();
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp
index bc4ced7ea2..10a0c2662f 100644
--- a/editor/import/resource_importer_layered_texture.cpp
+++ b/editor/import/resource_importer_layered_texture.cpp
@@ -123,6 +123,9 @@ bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_path,
if (p_option == "compress/lossy_quality" && p_options.has("compress/mode")) {
return int(p_options["compress/mode"]) == COMPRESS_LOSSY;
}
+ if ((p_option == "compress/high_quality" || p_option == "compress/hdr_compression") && p_options.has("compress/mode")) {
+ return int(p_options["compress/mode"]) == COMPRESS_VRAM_COMPRESSED;
+ }
return true;
}
@@ -136,9 +139,9 @@ String ResourceImporterLayeredTexture::get_preset_name(int p_idx) const {
void ResourceImporterLayeredTexture::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless,Lossy,VRAM Compressed,VRAM Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress/high_quality"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_compression", PROPERTY_HINT_ENUM, "Disabled,Opaque Only,Always"), 1));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/bptc_ldr", PROPERTY_HINT_ENUM, "Disabled,Enabled,RGBA Only"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/channel_pack", PROPERTY_HINT_ENUM, "sRGB Friendly,Optimized,Normal Map (RG Channels)"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "mipmaps/generate"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "mipmaps/limit", PROPERTY_HINT_RANGE, "-1,256"), -1));
@@ -283,8 +286,8 @@ void ResourceImporterLayeredTexture::_save_tex(Vector<Ref<Image>> p_images, cons
Error ResourceImporterLayeredTexture::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
int compress_mode = p_options["compress/mode"];
float lossy = p_options["compress/lossy_quality"];
+ float high_quality = p_options["compress/high_quality"];
int hdr_compression = p_options["compress/hdr_compression"];
- int bptc_ldr = p_options["compress/bptc_ldr"];
bool mipmaps = p_options["mipmaps/generate"];
int channel_pack = p_options["compress/channel_pack"];
@@ -389,9 +392,10 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
texture_import->compress_mode = compress_mode;
texture_import->lossy = lossy;
texture_import->hdr_compression = hdr_compression;
- texture_import->bptc_ldr = bptc_ldr;
texture_import->mipmaps = mipmaps;
texture_import->used_channels = used_channels;
+ texture_import->high_quality = high_quality;
+
_check_compress_ctex(p_source_file, texture_import);
if (r_metadata) {
Dictionary meta;
@@ -406,12 +410,11 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
}
const char *ResourceImporterLayeredTexture::compression_formats[] = {
- "bptc",
- "s3tc",
- "etc",
- "etc2",
+ "s3tc_bptc",
+ "etc2_astc",
nullptr
};
+
String ResourceImporterLayeredTexture::get_import_settings_string() const {
String s;
@@ -450,12 +453,16 @@ bool ResourceImporterLayeredTexture::are_import_settings_valid(const String &p_p
bool valid = true;
while (compression_formats[index]) {
String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]);
- bool test = GLOBAL_GET(setting_path);
- if (test) {
- if (!formats_imported.has(compression_formats[index])) {
- valid = false;
- break;
+ if (ProjectSettings::get_singleton()->has_setting(setting_path)) {
+ bool test = GLOBAL_GET(setting_path);
+ if (test) {
+ if (!formats_imported.has(compression_formats[index])) {
+ valid = false;
+ break;
+ }
}
+ } else {
+ WARN_PRINT("Setting for imported format not found: " + setting_path);
}
index++;
}
@@ -484,64 +491,83 @@ void ResourceImporterLayeredTexture::_check_compress_ctex(const String &p_source
// Must import in all formats, in order of priority (so platform choses the best supported one. IE, etc2 over etc).
// Android, GLES 2.x
- bool can_bptc = GLOBAL_GET("rendering/textures/vram_compression/import_bptc");
- if (can_bptc) {
- r_texture_import->formats_imported.push_back("bptc"); // BPTC needs to be added anyway.
+ const bool can_s3tc_bptc = GLOBAL_GET("rendering/textures/vram_compression/import_s3tc_bptc") || OS::get_singleton()->get_preferred_texture_format() == OS::PREFERRED_TEXTURE_FORMAT_S3TC_BPTC;
+ const bool can_etc2_astc = GLOBAL_GET("rendering/textures/vram_compression/import_etc2_astc") || OS::get_singleton()->get_preferred_texture_format() == OS::PREFERRED_TEXTURE_FORMAT_ETC2_ASTC;
+
+ // Add list of formats imported
+ if (can_s3tc_bptc) {
+ r_texture_import->formats_imported.push_back("s3tc_bptc");
}
+ if (can_etc2_astc) {
+ r_texture_import->formats_imported.push_back("etc2_astc");
+ }
+
bool can_compress_hdr = r_texture_import->hdr_compression > 0;
ERR_FAIL_NULL(r_texture_import->image);
bool is_hdr = (r_texture_import->image->get_format() >= Image::FORMAT_RF && r_texture_import->image->get_format() <= Image::FORMAT_RGBE9995);
- bool is_ldr = (r_texture_import->image->get_format() >= Image::FORMAT_L8 && r_texture_import->image->get_format() <= Image::FORMAT_RGB565);
- bool can_s3tc = GLOBAL_GET("rendering/textures/vram_compression/import_s3tc");
ERR_FAIL_NULL(r_texture_import->slices);
// Can compress hdr, but hdr with alpha is not compressible.
- if (r_texture_import->hdr_compression == 2) {
- // The user selected to compress hdr anyway, so force an alpha-less format.
- if (r_texture_import->image->get_format() == Image::FORMAT_RGBAF) {
- for (int i = 0; i < r_texture_import->slices->size(); i++) {
- r_texture_import->slices->write[i]->convert(Image::FORMAT_RGBF);
- }
+ bool use_uncompressed = false;
+
+ if (is_hdr) {
+ if (r_texture_import->used_channels == Image::USED_CHANNELS_LA || r_texture_import->used_channels == Image::USED_CHANNELS_RGBA) {
+ if (r_texture_import->hdr_compression == 2) {
+ // The user selected to compress hdr anyway, so force an alpha-less format.
+ if (r_texture_import->image->get_format() == Image::FORMAT_RGBAF) {
+ for (int i = 0; i < r_texture_import->slices->size(); i++) {
+ r_texture_import->slices->write[i]->convert(Image::FORMAT_RGBF);
+ }
- } else if (r_texture_import->image->get_format() == Image::FORMAT_RGBAH) {
- for (int i = 0; i < r_texture_import->slices->size(); i++) {
- r_texture_import->slices->write[i]->convert(Image::FORMAT_RGBH);
+ } else if (r_texture_import->image->get_format() == Image::FORMAT_RGBAH) {
+ for (int i = 0; i < r_texture_import->slices->size(); i++) {
+ r_texture_import->slices->write[i]->convert(Image::FORMAT_RGBH);
+ }
+ }
+ } else {
+ can_compress_hdr = false;
}
}
- } else {
- can_compress_hdr = false;
- }
- if (is_hdr && can_compress_hdr) {
- if (!can_bptc) {
+ if (!can_compress_hdr) {
//default to rgbe
if (r_texture_import->image->get_format() != Image::FORMAT_RGBE9995) {
for (int i = 0; i < r_texture_import->slices->size(); i++) {
r_texture_import->slices->write[i]->convert(Image::FORMAT_RGBE9995);
}
}
+ use_uncompressed = true;
}
- } else {
- can_bptc = false;
}
- if (is_ldr && can_bptc) {
- if (r_texture_import->bptc_ldr == 0 || (r_texture_import->bptc_ldr == 1 && !(r_texture_import->used_channels == Image::USED_CHANNELS_LA || r_texture_import->used_channels == Image::USED_CHANNELS_RGBA))) {
- can_bptc = false;
- }
- }
- if (!(r_texture_import->used_channels == Image::USED_CHANNELS_LA || r_texture_import->used_channels == Image::USED_CHANNELS_RGBA)) {
- if (GLOBAL_GET("rendering/textures/vram_compression/import_etc2")) {
- _save_tex(*r_texture_import->slices, r_texture_import->save_path + ".etc2." + extension, r_texture_import->compress_mode, r_texture_import->lossy, Image::COMPRESS_ETC2, *r_texture_import->csource, r_texture_import->used_channels, r_texture_import->mipmaps, true);
- r_texture_import->platform_variants->push_back("etc2");
- r_texture_import->formats_imported.push_back("etc2");
+ if (use_uncompressed) {
+ _save_tex(*r_texture_import->slices, r_texture_import->save_path + "." + extension, COMPRESS_VRAM_UNCOMPRESSED, r_texture_import->lossy, Image::COMPRESS_S3TC /* IGNORED */, *r_texture_import->csource, r_texture_import->used_channels, r_texture_import->mipmaps, false);
+ } else {
+ if (can_s3tc_bptc) {
+ Image::CompressMode image_compress_mode;
+ String image_compress_format;
+ if (r_texture_import->high_quality || is_hdr) {
+ image_compress_mode = Image::COMPRESS_BPTC;
+ image_compress_format = "bptc";
+ } else {
+ image_compress_mode = Image::COMPRESS_S3TC;
+ image_compress_format = "s3tc";
+ }
+ _save_tex(*r_texture_import->slices, r_texture_import->save_path + "." + image_compress_format + "." + extension, r_texture_import->compress_mode, r_texture_import->lossy, image_compress_mode, *r_texture_import->csource, r_texture_import->used_channels, r_texture_import->mipmaps, true);
+ r_texture_import->platform_variants->push_back(image_compress_format);
}
- if (can_bptc || can_s3tc) {
- _save_tex(*r_texture_import->slices, r_texture_import->save_path + ".s3tc." + extension, r_texture_import->compress_mode, r_texture_import->lossy, can_bptc ? Image::COMPRESS_BPTC : Image::COMPRESS_S3TC, *r_texture_import->csource, r_texture_import->used_channels, r_texture_import->mipmaps, false);
- r_texture_import->platform_variants->push_back("s3tc");
- r_texture_import->formats_imported.push_back("s3tc");
+ if (can_etc2_astc) {
+ Image::CompressMode image_compress_mode;
+ String image_compress_format;
+ if (r_texture_import->high_quality || is_hdr) {
+ image_compress_mode = Image::COMPRESS_ASTC;
+ image_compress_format = "astc";
+ } else {
+ image_compress_mode = Image::COMPRESS_ETC2;
+ image_compress_format = "etc2";
+ }
+ _save_tex(*r_texture_import->slices, r_texture_import->save_path + "." + image_compress_format + "." + extension, r_texture_import->compress_mode, r_texture_import->lossy, image_compress_mode, *r_texture_import->csource, r_texture_import->used_channels, r_texture_import->mipmaps, true);
+ r_texture_import->platform_variants->push_back(image_compress_format);
}
- return;
}
- EditorNode::add_io_error(vformat(TTR("%s: No suitable PC VRAM compression algorithm enabled in Project Settings (S3TC or BPTC). This texture may not display correctly on desktop platforms."), p_source_file));
}
diff --git a/editor/import/resource_importer_layered_texture.h b/editor/import/resource_importer_layered_texture.h
index 5118ad7ba4..52fd37639d 100644
--- a/editor/import/resource_importer_layered_texture.h
+++ b/editor/import/resource_importer_layered_texture.h
@@ -51,8 +51,8 @@ public:
int compress_mode = 0;
float lossy = 1.0;
int hdr_compression = 0;
- int bptc_ldr = 0;
bool mipmaps = true;
+ bool high_quality = false;
Image::UsedChannels used_channels = Image::USED_CHANNELS_RGBA;
virtual ~LayeredTextureImport() {}
};
diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp
index a67da0c2b1..3dd01754a3 100644
--- a/editor/import/resource_importer_obj.cpp
+++ b/editor/import/resource_importer_obj.cpp
@@ -206,6 +206,20 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ);
ERR_FAIL_COND_V_MSG(f.is_null(), ERR_CANT_OPEN, vformat("Couldn't open OBJ file '%s', it may not exist or not be readable.", p_path));
+ // Avoid trying to load/interpret potential build artifacts from Visual Studio (e.g. when compiling native plugins inside the project tree)
+ // This should only match, if it's indeed a COFF file header
+ // https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#machine-types
+ const int first_bytes = f->get_16();
+ static const Vector<int> coff_header_machines{
+ 0x0, // IMAGE_FILE_MACHINE_UNKNOWN
+ 0x8664, // IMAGE_FILE_MACHINE_AMD64
+ 0x1c0, // IMAGE_FILE_MACHINE_ARM
+ 0x14c, // IMAGE_FILE_MACHINE_I386
+ 0x200, // IMAGE_FILE_MACHINE_IA64
+ };
+ ERR_FAIL_COND_V_MSG(coff_header_machines.find(first_bytes) != -1, ERR_FILE_CORRUPT, vformat("Couldn't read OBJ file '%s', it seems to be binary, corrupted, or empty.", p_path));
+ f->seek(0);
+
Ref<ArrayMesh> mesh;
mesh.instantiate();
@@ -217,7 +231,9 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
Vector<Vector3> vertices;
Vector<Vector3> normals;
Vector<Vector2> uvs;
- String name;
+ Vector<Color> colors;
+ const String default_name = "Mesh";
+ String name = default_name;
HashMap<String, HashMap<String, Ref<StandardMaterial3D>>> material_map;
@@ -249,6 +265,19 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
vtx.y = v[2].to_float() * scale_mesh.y + offset_mesh.y;
vtx.z = v[3].to_float() * scale_mesh.z + offset_mesh.z;
vertices.push_back(vtx);
+ //vertex color
+ if (v.size() == 7) {
+ while (colors.size() < vertices.size() - 1) {
+ colors.push_back(Color(1.0, 1.0, 1.0));
+ }
+ Color c;
+ c.r = v[4].to_float();
+ c.g = v[5].to_float();
+ c.b = v[6].to_float();
+ colors.push_back(c);
+ } else if (!colors.is_empty()) {
+ colors.push_back(Color(1.0, 1.0, 1.0));
+ }
} else if (l.begins_with("vt ")) {
//uv
Vector<String> v = l.split(" ", false);
@@ -317,6 +346,9 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
ERR_FAIL_INDEX_V(vtx, vertices.size(), ERR_FILE_CORRUPT);
Vector3 vertex = vertices[vtx];
+ if (!colors.is_empty()) {
+ surf_tool->set_color(colors[vtx]);
+ }
if (!smoothing) {
smooth_group++;
}
@@ -356,7 +388,11 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
print_verbose("OBJ: Current material " + current_material + " has " + itos(material_map.has(current_material_library) && material_map[current_material_library].has(current_material)));
if (material_map.has(current_material_library) && material_map[current_material_library].has(current_material)) {
- surf_tool->set_material(material_map[current_material_library][current_material]);
+ Ref<StandardMaterial3D> &material = material_map[current_material_library][current_material];
+ if (!colors.is_empty()) {
+ material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
+ }
+ surf_tool->set_material(material);
}
mesh = surf_tool->commit(mesh, mesh_flags);
@@ -374,9 +410,12 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
if (l.begins_with("o ") || f->eof_reached()) {
if (!p_single_mesh) {
- mesh->set_name(name);
- r_meshes.push_back(mesh);
- mesh.instantiate();
+ if (mesh->get_surface_count() > 0) {
+ mesh->set_name(name);
+ r_meshes.push_back(mesh);
+ mesh.instantiate();
+ }
+ name = default_name;
current_group = "";
current_material = "";
}
@@ -439,6 +478,7 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, co
for (const Ref<Mesh> &m : meshes) {
Ref<ImporterMesh> mesh;
mesh.instantiate();
+ mesh->set_name(m->get_name());
for (int i = 0; i < m->get_surface_count(); i++) {
mesh->add_surface(m->surface_get_primitive_type(i), m->surface_get_arrays(i), Array(), Dictionary(), m->surface_get_material(i));
}
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index cab42aa54d..9560f4bed2 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -54,7 +54,7 @@
#include "scene/resources/world_boundary_shape_3d.h"
uint32_t EditorSceneFormatImporter::get_import_flags() const {
- int ret;
+ uint32_t ret;
if (GDVIRTUAL_CALL(_get_import_flags, ret)) {
return ret;
}
@@ -1085,10 +1085,10 @@ Node *ResourceImporterScene::_post_fix_animations(Node *p_node, Node *p_root, co
return p_node;
}
-Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, HashSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) {
+Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, HashSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps, float p_applied_root_scale) {
// children first
for (int i = 0; i < p_node->get_child_count(); i++) {
- Node *r = _post_fix_node(p_node->get_child(i), p_root, collision_map, r_occluder_arrays, r_scanned_meshes, p_node_data, p_material_data, p_animation_data, p_animation_fps);
+ Node *r = _post_fix_node(p_node->get_child(i), p_root, collision_map, r_occluder_arrays, r_scanned_meshes, p_node_data, p_material_data, p_animation_data, p_animation_fps, p_applied_root_scale);
if (!r) {
i--; //was erased
}
@@ -1231,7 +1231,8 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
} else {
shapes = get_collision_shapes(
m->get_mesh(),
- node_settings);
+ node_settings,
+ p_applied_root_scale);
}
if (shapes.size()) {
@@ -1242,6 +1243,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
p_node->add_child(col, true);
col->set_owner(p_node->get_owner());
col->set_transform(get_collision_shapes_transform(node_settings));
+ col->set_position(p_applied_root_scale * col->get_position());
base = col;
} break;
case MESH_PHYSICS_RIGID_BODY_AND_MESH: {
@@ -1249,6 +1251,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
rigid_body->set_name(p_node->get_name());
p_node->replace_by(rigid_body);
rigid_body->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings));
+ rigid_body->set_position(p_applied_root_scale * rigid_body->get_position());
p_node = rigid_body;
mi->set_transform(Transform3D());
rigid_body->add_child(mi, true);
@@ -1258,6 +1261,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
case MESH_PHYSICS_STATIC_COLLIDER_ONLY: {
StaticBody3D *col = memnew(StaticBody3D);
col->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings));
+ col->set_position(p_applied_root_scale * col->get_position());
col->set_name(p_node->get_name());
p_node->replace_by(col);
memdelete(p_node);
@@ -1267,6 +1271,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
case MESH_PHYSICS_AREA_ONLY: {
Area3D *area = memnew(Area3D);
area->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings));
+ area->set_position(p_applied_root_scale * area->get_position());
area->set_name(p_node->get_name());
p_node->replace_by(area);
memdelete(p_node);
@@ -1865,6 +1870,7 @@ void ResourceImporterScene::get_import_options(const String &p_path, List<Import
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 30));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/trimming"), false));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/remove_immutable_tracks"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "import_script/path", PROPERTY_HINT_FILE, script_ext_hint), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::DICTIONARY, "_subresources", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), Dictionary()));
@@ -2397,7 +2403,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
fps = (float)p_options[SNAME("animation/fps")];
}
_pre_fix_animations(scene, scene, node_data, animation_data, fps);
- _post_fix_node(scene, scene, collision_map, occluder_arrays, scanned_meshes, node_data, material_data, animation_data, fps);
+ _post_fix_node(scene, scene, collision_map, occluder_arrays, scanned_meshes, node_data, material_data, animation_data, fps, apply_root ? root_scale : 1.0);
_post_fix_animations(scene, scene, node_data, animation_data, fps);
String root_type = p_options["nodes/root_type"];
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 2d08d4df50..d6d83a45d3 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -56,7 +56,7 @@ protected:
Node *import_scene_wrapper(const String &p_path, uint32_t p_flags, Dictionary p_options);
Ref<Animation> import_animation_wrapper(const String &p_path, uint32_t p_flags, Dictionary p_options);
- GDVIRTUAL0RC(int, _get_import_flags)
+ GDVIRTUAL0RC(uint32_t, _get_import_flags)
GDVIRTUAL0RC(Vector<String>, _get_extensions)
GDVIRTUAL3R(Object *, _import_scene, String, uint32_t, Dictionary)
GDVIRTUAL1(_get_import_options, String)
@@ -279,7 +279,7 @@ public:
Node *_pre_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames);
Node *_pre_fix_animations(Node *p_node, Node *p_root, const Dictionary &p_node_data, const Dictionary &p_animation_data, float p_animation_fps);
- Node *_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, HashSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps);
+ Node *_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, HashSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps, float p_applied_root_scale);
Node *_post_fix_animations(Node *p_node, Node *p_root, const Dictionary &p_node_data, const Dictionary &p_animation_data, float p_animation_fps);
Ref<Animation> _save_animation_to_file(Ref<Animation> anim, bool p_save_to_file, String p_save_to_path, bool p_keep_custom_tracks);
@@ -298,7 +298,7 @@ public:
ResourceImporterScene(bool p_animation_import = false);
template <class M>
- static Vector<Ref<Shape3D>> get_collision_shapes(const Ref<Mesh> &p_mesh, const M &p_options);
+ static Vector<Ref<Shape3D>> get_collision_shapes(const Ref<Mesh> &p_mesh, const M &p_options, float p_applied_root_scale);
template <class M>
static Transform3D get_collision_shapes_transform(const M &p_options);
@@ -314,7 +314,7 @@ public:
};
template <class M>
-Vector<Ref<Shape3D>> ResourceImporterScene::get_collision_shapes(const Ref<Mesh> &p_mesh, const M &p_options) {
+Vector<Ref<Shape3D>> ResourceImporterScene::get_collision_shapes(const Ref<Mesh> &p_mesh, const M &p_options, float p_applied_root_scale) {
ShapeType generate_shape_type = SHAPE_TYPE_DECOMPOSE_CONVEX;
if (p_options.has(SNAME("physics/shape_type"))) {
generate_shape_type = (ShapeType)p_options[SNAME("physics/shape_type")].operator int();
@@ -409,7 +409,7 @@ Vector<Ref<Shape3D>> ResourceImporterScene::get_collision_shapes(const Ref<Mesh>
Ref<BoxShape3D> box;
box.instantiate();
if (p_options.has(SNAME("primitive/size"))) {
- box->set_size(p_options[SNAME("primitive/size")]);
+ box->set_size(p_options[SNAME("primitive/size")].operator Vector3() * p_applied_root_scale);
}
Vector<Ref<Shape3D>> shapes;
@@ -420,7 +420,7 @@ Vector<Ref<Shape3D>> ResourceImporterScene::get_collision_shapes(const Ref<Mesh>
Ref<SphereShape3D> sphere;
sphere.instantiate();
if (p_options.has(SNAME("primitive/radius"))) {
- sphere->set_radius(p_options[SNAME("primitive/radius")]);
+ sphere->set_radius(p_options[SNAME("primitive/radius")].operator float() * p_applied_root_scale);
}
Vector<Ref<Shape3D>> shapes;
@@ -430,10 +430,10 @@ Vector<Ref<Shape3D>> ResourceImporterScene::get_collision_shapes(const Ref<Mesh>
Ref<CylinderShape3D> cylinder;
cylinder.instantiate();
if (p_options.has(SNAME("primitive/height"))) {
- cylinder->set_height(p_options[SNAME("primitive/height")]);
+ cylinder->set_height(p_options[SNAME("primitive/height")].operator float() * p_applied_root_scale);
}
if (p_options.has(SNAME("primitive/radius"))) {
- cylinder->set_radius(p_options[SNAME("primitive/radius")]);
+ cylinder->set_radius(p_options[SNAME("primitive/radius")].operator float() * p_applied_root_scale);
}
Vector<Ref<Shape3D>> shapes;
@@ -443,10 +443,10 @@ Vector<Ref<Shape3D>> ResourceImporterScene::get_collision_shapes(const Ref<Mesh>
Ref<CapsuleShape3D> capsule;
capsule.instantiate();
if (p_options.has(SNAME("primitive/height"))) {
- capsule->set_height(p_options[SNAME("primitive/height")]);
+ capsule->set_height(p_options[SNAME("primitive/height")].operator float() * p_applied_root_scale);
}
if (p_options.has(SNAME("primitive/radius"))) {
- capsule->set_radius(p_options[SNAME("primitive/radius")]);
+ capsule->set_radius(p_options[SNAME("primitive/radius")].operator float() * p_applied_root_scale);
}
Vector<Ref<Shape3D>> shapes;
diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp
index 7187e85df0..ba48fc9029 100644
--- a/editor/import/resource_importer_shader_file.cpp
+++ b/editor/import/resource_importer_shader_file.cpp
@@ -91,6 +91,7 @@ static String _include_function(const String &p_path, void *userpointer) {
Error ResourceImporterShaderFile::import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
/* STEP 1, Read shader code */
+ ERR_FAIL_COND_V_EDMSG((OS::get_singleton()->get_current_rendering_method() == "gl_compatibility"), ERR_UNAVAILABLE, "Cannot import custom .glsl shaders when using the gl_compatibility rendering_method. Please switch to the forward_plus or mobile rendering methods to use custom shaders.");
Error err;
Ref<FileAccess> file = FileAccess::open(p_source_file, FileAccess::READ, &err);
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 2f543ea02d..c05e7582eb 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -169,9 +169,14 @@ String ResourceImporterTexture::get_resource_type() const {
}
bool ResourceImporterTexture::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const {
- if (p_option == "compress/lossy_quality") {
+ if (p_option == "compress/high_quality" || p_option == "compress/hdr_compression") {
int compress_mode = int(p_options["compress/mode"]);
- if (compress_mode != COMPRESS_LOSSY && compress_mode != COMPRESS_VRAM_COMPRESSED) {
+ if (compress_mode != COMPRESS_VRAM_COMPRESSED) {
+ return false;
+ }
+ } else if (p_option == "compress/lossy_quality") {
+ int compress_mode = int(p_options["compress/mode"]);
+ if (compress_mode != COMPRESS_LOSSY) {
return false;
}
} else if (p_option == "compress/hdr_mode") {
@@ -186,15 +191,6 @@ bool ResourceImporterTexture::get_option_visibility(const String &p_path, const
}
} else if (p_option == "mipmaps/limit") {
return p_options["mipmaps/generate"];
-
- } else if (p_option == "compress/bptc_ldr") {
- int compress_mode = int(p_options["compress/mode"]);
- if (compress_mode < COMPRESS_VRAM_COMPRESSED) {
- return false;
- }
- if (!GLOBAL_GET("rendering/textures/vram_compression/import_bptc")) {
- return false;
- }
}
return true;
@@ -216,9 +212,9 @@ String ResourceImporterTexture::get_preset_name(int p_idx) const {
void ResourceImporterTexture::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless,Lossy,VRAM Compressed,VRAM Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), p_preset == PRESET_3D ? 2 : 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress/high_quality"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_compression", PROPERTY_HINT_ENUM, "Disabled,Opaque Only,Always"), 1));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/bptc_ldr", PROPERTY_HINT_ENUM, "Disabled,Enabled,RGBA Only"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/normal_map", PROPERTY_HINT_ENUM, "Detect,Enable,Disabled"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/channel_pack", PROPERTY_HINT_ENUM, "sRGB Friendly,Optimized"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "mipmaps/generate"), (p_preset == PRESET_3D ? true : false)));
@@ -289,7 +285,7 @@ void ResourceImporterTexture::save_to_ctex_format(Ref<FileAccess> f, const Ref<I
case COMPRESS_VRAM_COMPRESSED: {
Ref<Image> image = p_image->duplicate();
- image->compress_from_channels(p_compress_format, p_channels, p_lossy_quality);
+ image->compress_from_channels(p_compress_format, p_channels);
f->store_32(CompressedTexture2D::DATA_FORMAT_IMAGE);
f->store_16(image->get_width());
@@ -322,15 +318,11 @@ void ResourceImporterTexture::save_to_ctex_format(Ref<FileAccess> f, const Ref<I
f->store_16(p_image->get_height());
f->store_32(p_image->get_mipmap_count());
f->store_32(p_image->get_format());
-
- for (int i = 0; i < p_image->get_mipmap_count() + 1; i++) {
- Vector<uint8_t> data = Image::basis_universal_packer(p_image->get_image_from_mipmap(i), p_channels);
- int data_len = data.size();
- f->store_32(data_len);
-
- const uint8_t *r = data.ptr();
- f->store_buffer(r, data_len);
- }
+ Vector<uint8_t> data = Image::basis_universal_packer(p_image, p_channels);
+ int data_len = data.size();
+ f->store_32(data_len);
+ const uint8_t *r = data.ptr();
+ f->store_buffer(r, data_len);
} break;
}
}
@@ -387,7 +379,7 @@ void ResourceImporterTexture::_save_ctex(const Ref<Image> &p_image, const String
Ref<Image> image = p_image->duplicate();
- if (((p_compress_mode == COMPRESS_BASIS_UNIVERSAL) || (p_compress_mode == COMPRESS_VRAM_COMPRESSED && p_force_po2_for_compressed)) && p_mipmaps) {
+ if (p_force_po2_for_compressed && p_mipmaps && ((p_compress_mode == COMPRESS_BASIS_UNIVERSAL) || (p_compress_mode == COMPRESS_VRAM_COMPRESSED))) {
image->resize_to_po2();
}
@@ -425,7 +417,7 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
const int pack_channels = p_options["compress/channel_pack"];
const int normal = p_options["compress/normal_map"];
const int hdr_compression = p_options["compress/hdr_compression"];
- const int bptc_ldr = p_options["compress/bptc_ldr"];
+ const int high_quality = p_options["compress/high_quality"];
// Mipmaps.
const bool mipmaps = p_options["mipmaps/generate"];
@@ -598,19 +590,22 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
// Android, GLES 2.x
const bool is_hdr = (image->get_format() >= Image::FORMAT_RF && image->get_format() <= Image::FORMAT_RGBE9995);
- bool is_ldr = (image->get_format() >= Image::FORMAT_L8 && image->get_format() <= Image::FORMAT_RGB565);
- const bool can_bptc = GLOBAL_GET("rendering/textures/vram_compression/import_bptc");
- const bool can_s3tc = GLOBAL_GET("rendering/textures/vram_compression/import_s3tc");
+ const bool can_s3tc_bptc = GLOBAL_GET("rendering/textures/vram_compression/import_s3tc_bptc") || OS::get_singleton()->get_preferred_texture_format() == OS::PREFERRED_TEXTURE_FORMAT_S3TC_BPTC;
+ const bool can_etc2_astc = GLOBAL_GET("rendering/textures/vram_compression/import_etc2_astc") || OS::get_singleton()->get_preferred_texture_format() == OS::PREFERRED_TEXTURE_FORMAT_ETC2_ASTC;
- if (can_bptc) {
- // Add to the list anyway.
- formats_imported.push_back("bptc");
+ // Add list of formats imported
+ if (can_s3tc_bptc) {
+ formats_imported.push_back("s3tc_bptc");
+ }
+ if (can_etc2_astc) {
+ formats_imported.push_back("etc2_astc");
}
bool can_compress_hdr = hdr_compression > 0;
bool has_alpha = image->detect_alpha() != Image::ALPHA_NONE;
+ bool use_uncompressed = false;
- if (is_hdr && can_compress_hdr) {
+ if (is_hdr) {
if (has_alpha) {
// Can compress HDR, but HDR with alpha is not compressible.
if (hdr_compression == 2) {
@@ -629,36 +624,41 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
// Fallback to RGBE99995.
if (image->get_format() != Image::FORMAT_RGBE9995) {
image->convert(Image::FORMAT_RGBE9995);
+ use_uncompressed = true;
}
}
}
- bool ok_on_pc = false;
- if (can_bptc || can_s3tc) {
- ok_on_pc = true;
- Image::CompressMode image_compress_mode = Image::COMPRESS_BPTC;
- if (!bptc_ldr && can_s3tc && is_ldr) {
- image_compress_mode = Image::COMPRESS_S3TC;
+ if (use_uncompressed) {
+ _save_ctex(image, p_save_path + ".ctex", COMPRESS_VRAM_UNCOMPRESSED, lossy, Image::COMPRESS_S3TC /*this is ignored */, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, false, mipmap_limit, normal_image, roughness_channel);
+ } else {
+ if (can_s3tc_bptc) {
+ Image::CompressMode image_compress_mode;
+ String image_compress_format;
+ if (high_quality || is_hdr) {
+ image_compress_mode = Image::COMPRESS_BPTC;
+ image_compress_format = "bptc";
+ } else {
+ image_compress_mode = Image::COMPRESS_S3TC;
+ image_compress_format = "s3tc";
+ }
+ _save_ctex(image, p_save_path + "." + image_compress_format + ".ctex", compress_mode, lossy, image_compress_mode, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, false, mipmap_limit, normal_image, roughness_channel);
+ r_platform_variants->push_back(image_compress_format);
}
- _save_ctex(image, p_save_path + ".s3tc.ctex", compress_mode, lossy, image_compress_mode, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, false, mipmap_limit, normal_image, roughness_channel);
- r_platform_variants->push_back("s3tc");
- formats_imported.push_back("s3tc");
- }
-
- if (GLOBAL_GET("rendering/textures/vram_compression/import_etc2")) {
- _save_ctex(image, p_save_path + ".etc2.ctex", compress_mode, lossy, Image::COMPRESS_ETC2, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel);
- r_platform_variants->push_back("etc2");
- formats_imported.push_back("etc2");
- }
- if (GLOBAL_GET("rendering/textures/vram_compression/import_etc")) {
- _save_ctex(image, p_save_path + ".etc.ctex", compress_mode, lossy, Image::COMPRESS_ETC, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel);
- r_platform_variants->push_back("etc");
- formats_imported.push_back("etc");
- }
-
- if (!ok_on_pc) {
- EditorNode::add_io_error(vformat(TTR("%s: No suitable desktop VRAM compression algorithm enabled in Project Settings (S3TC or BPTC). This texture may not display correctly on desktop platforms."), p_source_file));
+ if (can_etc2_astc) {
+ Image::CompressMode image_compress_mode;
+ String image_compress_format;
+ if (high_quality || is_hdr) {
+ image_compress_mode = Image::COMPRESS_ASTC;
+ image_compress_format = "astc";
+ } else {
+ image_compress_mode = Image::COMPRESS_ETC2;
+ image_compress_format = "etc2";
+ }
+ _save_ctex(image, p_save_path + "." + image_compress_format + ".ctex", compress_mode, lossy, image_compress_mode, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, false, mipmap_limit, normal_image, roughness_channel);
+ r_platform_variants->push_back(image_compress_format);
+ }
}
} else {
// Import normally.
@@ -692,10 +692,8 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
}
const char *ResourceImporterTexture::compression_formats[] = {
- "bptc",
- "s3tc",
- "etc",
- "etc2",
+ "s3tc_bptc",
+ "etc2_astc",
nullptr
};
String ResourceImporterTexture::get_import_settings_string() const {
@@ -745,12 +743,16 @@ bool ResourceImporterTexture::are_import_settings_valid(const String &p_path) co
bool valid = true;
while (compression_formats[index]) {
String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]);
- bool test = GLOBAL_GET(setting_path);
- if (test) {
- if (!formats_imported.has(compression_formats[index])) {
- valid = false;
- break;
+ if (ProjectSettings::get_singleton()->has_setting(setting_path)) {
+ bool test = GLOBAL_GET(setting_path);
+ if (test) {
+ if (!formats_imported.has(compression_formats[index])) {
+ valid = false;
+ break;
+ }
}
+ } else {
+ WARN_PRINT("Setting for imported format not found: " + setting_path);
}
index++;
}
diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp
index a9b43ba5f1..8d26feebf4 100644
--- a/editor/import/scene_import_settings.cpp
+++ b/editor/import/scene_import_settings.cpp
@@ -441,7 +441,7 @@ void SceneImportSettings::_update_view_gizmos() {
// This collider_view doesn't have a mesh so we need to generate a new one.
// Generate the mesh collider.
- Vector<Ref<Shape3D>> shapes = ResourceImporterScene::get_collision_shapes(mesh_node->get_mesh(), e.value.settings);
+ Vector<Ref<Shape3D>> shapes = ResourceImporterScene::get_collision_shapes(mesh_node->get_mesh(), e.value.settings, 1.0);
const Transform3D transform = ResourceImporterScene::get_collision_shapes_transform(e.value.settings);
Ref<ArrayMesh> collider_view_mesh;
@@ -703,15 +703,17 @@ void SceneImportSettings::_select(Tree *p_from, String p_type, String p_id) {
}
MeshData &md = mesh_map[p_id];
- if (p_from != mesh_tree) {
- md.mesh_node->uncollapse_tree();
- md.mesh_node->select(0);
- mesh_tree->ensure_cursor_is_visible();
- }
- if (p_from != scene_tree) {
- md.scene_node->uncollapse_tree();
- md.scene_node->select(0);
- scene_tree->ensure_cursor_is_visible();
+ if (md.mesh_node != nullptr) {
+ if (p_from != mesh_tree) {
+ md.mesh_node->uncollapse_tree();
+ md.mesh_node->select(0);
+ mesh_tree->ensure_cursor_is_visible();
+ }
+ if (p_from != scene_tree) {
+ md.scene_node->uncollapse_tree();
+ md.scene_node->select(0);
+ scene_tree->ensure_cursor_is_visible();
+ }
}
mesh_preview->set_mesh(md.mesh);
@@ -849,7 +851,7 @@ void SceneImportSettings::_viewport_input(const Ref<InputEvent> &p_input) {
zoom = &md.cam_zoom;
}
Ref<InputEventMouseMotion> mm = p_input;
- if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (mm.is_valid() && (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
(*rot_x) -= mm->get_relative().y * 0.01 * EDSCALE;
(*rot_y) -= mm->get_relative().x * 0.01 * EDSCALE;
(*rot_x) = CLAMP((*rot_x), -Math_PI / 2, Math_PI / 2);
@@ -1234,6 +1236,12 @@ SceneImportSettings::SceneImportSettings() {
action_menu = memnew(MenuButton);
action_menu->set_text(TTR("Actions..."));
+ // Style the MenuButton like a regular Button to make it more noticeable.
+ action_menu->set_flat(false);
+ action_menu->add_theme_style_override("normal", get_theme_stylebox("normal", "Button"));
+ action_menu->add_theme_style_override("hover", get_theme_stylebox("hover", "Button"));
+ action_menu->add_theme_style_override("pressed", get_theme_stylebox("pressed", "Button"));
+ action_menu->set_focus_mode(Control::FOCUS_ALL);
menu_hb->add_child(action_menu);
action_menu->get_popup()->add_item(TTR("Extract Materials"), ACTION_EXTRACT_MATERIALS);
diff --git a/editor/input_event_configuration_dialog.cpp b/editor/input_event_configuration_dialog.cpp
index b137f6f668..fb450a41d3 100644
--- a/editor/input_event_configuration_dialog.cpp
+++ b/editor/input_event_configuration_dialog.cpp
@@ -38,9 +38,10 @@
#include "scene/gui/separator.h"
#include "scene/gui/tree.h"
-void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, bool p_update_input_list_selection) {
+void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, const Ref<InputEvent> &p_original_event, bool p_update_input_list_selection) {
if (p_event.is_valid()) {
event = p_event;
+ original_event = p_original_event;
// If the event is changed to something which is not the same as the listener,
// clear out the event from the listener text box to avoid confusion.
@@ -61,7 +62,7 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, b
// Update option values and visibility
bool show_mods = false;
bool show_device = false;
- bool show_phys_key = false;
+ bool show_key = false;
if (mod.is_valid()) {
show_mods = true;
@@ -74,9 +75,25 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, b
}
if (k.is_valid()) {
- show_phys_key = true;
- physical_key_checkbox->set_pressed(k->get_physical_keycode() != Key::NONE && k->get_keycode() == Key::NONE);
-
+ show_key = true;
+ if (k->get_keycode() == Key::NONE && k->get_physical_keycode() == Key::NONE && k->get_key_label() != Key::NONE) {
+ key_mode->select(KEYMODE_UNICODE);
+ } else if (k->get_keycode() != Key::NONE) {
+ key_mode->select(KEYMODE_KEYCODE);
+ } else if (k->get_physical_keycode() != Key::NONE) {
+ key_mode->select(KEYMODE_PHY_KEYCODE);
+ } else {
+ // Invalid key.
+ event = Ref<InputEvent>();
+ original_event = Ref<InputEvent>();
+ event_listener->clear_event();
+ event_as_text->set_text(TTR("No Event Configured"));
+
+ additional_options_container->hide();
+ input_list_tree->deselect_all();
+ _update_input_list();
+ return;
+ }
} else if (joyb.is_valid() || joym.is_valid() || mb.is_valid()) {
show_device = true;
_set_current_device(event->get_device());
@@ -84,11 +101,20 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, b
mod_container->set_visible(show_mods);
device_container->set_visible(show_device);
- physical_key_checkbox->set_visible(show_phys_key);
+ key_mode->set_visible(show_key);
additional_options_container->show();
+ // Update mode selector based on original key event.
+ Ref<InputEventKey> ko = p_original_event;
+ if (ko.is_valid()) {
+ key_mode->set_item_disabled(KEYMODE_KEYCODE, ko->get_keycode() == Key::NONE);
+ key_mode->set_item_disabled(KEYMODE_PHY_KEYCODE, ko->get_physical_keycode() == Key::NONE);
+ key_mode->set_item_disabled(KEYMODE_UNICODE, ko->get_key_label() == Key::NONE);
+ }
+
// Update selected item in input list.
if (p_update_input_list_selection && (k.is_valid() || joyb.is_valid() || joym.is_valid() || mb.is_valid())) {
+ in_tree_update = true;
TreeItem *category = input_list_tree->get_root()->get_first_child();
while (category) {
TreeItem *input_item = category->get_first_child();
@@ -97,6 +123,7 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, b
// input_type should always be > 0, unless the tree structure has been misconfigured.
int input_type = input_item->get_parent()->get_meta("__type", 0);
if (input_type == 0) {
+ in_tree_update = false;
return;
}
@@ -112,6 +139,7 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, b
category->set_collapsed(false);
input_item->select(0);
input_list_tree->ensure_cursor_is_visible();
+ in_tree_update = false;
return;
}
input_item = input_item->get_next();
@@ -122,10 +150,12 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, b
category->set_collapsed(true); // Event not in this category, so collapse;
category = category->get_next();
}
+ in_tree_update = false;
}
} else {
// Event is not valid, reset dialog
- event = p_event;
+ event = Ref<InputEvent>();
+ original_event = Ref<InputEvent>();
event_listener->clear_event();
event_as_text->set_text(TTR("No Event Configured"));
@@ -141,8 +171,10 @@ void InputEventConfigurationDialog::_on_listen_input_changed(const Ref<InputEven
return;
}
- // Create an editable reference
+ // Create an editable reference and a copy of full event.
Ref<InputEvent> received_event = p_event;
+ Ref<InputEvent> received_original_event = received_event->duplicate();
+
// Check what the type is and if it is allowed.
Ref<InputEventKey> k = received_event;
Ref<InputEventJoypadButton> joyb = received_event;
@@ -169,12 +201,16 @@ void InputEventConfigurationDialog::_on_listen_input_changed(const Ref<InputEven
}
if (k.is_valid()) {
- k->set_pressed(false); // To avoid serialisation of 'pressed' property - doesn't matter for actions anyway.
- // Maintain physical keycode option state
- if (physical_key_checkbox->is_pressed()) {
+ k->set_pressed(false); // To avoid serialization of 'pressed' property - doesn't matter for actions anyway.
+ if (key_mode->get_selected_id() == KEYMODE_KEYCODE) {
+ k->set_physical_keycode(Key::NONE);
+ k->set_key_label(Key::NONE);
+ } else if (key_mode->get_selected_id() == KEYMODE_PHY_KEYCODE) {
k->set_keycode(Key::NONE);
- } else {
+ k->set_key_label(Key::NONE);
+ } else if (key_mode->get_selected_id() == KEYMODE_UNICODE) {
k->set_physical_keycode(Key::NONE);
+ k->set_keycode(Key::NONE);
}
}
@@ -186,7 +222,7 @@ void InputEventConfigurationDialog::_on_listen_input_changed(const Ref<InputEven
// Maintain device selection.
received_event->set_device(_get_current_device());
- _set_event(received_event);
+ _set_event(received_event, received_original_event);
}
void InputEventConfigurationDialog::_on_listen_focus_changed() {
@@ -326,14 +362,14 @@ void InputEventConfigurationDialog::_mod_toggled(bool p_checked, int p_index) {
}
}
- _set_event(ie);
+ _set_event(ie, original_event);
}
void InputEventConfigurationDialog::_autoremap_command_or_control_toggled(bool p_checked) {
Ref<InputEventWithModifiers> ie = event;
if (ie.is_valid()) {
ie->set_command_or_control_autoremap(p_checked);
- _set_event(ie);
+ _set_event(ie, original_event);
}
if (p_checked) {
@@ -345,27 +381,38 @@ void InputEventConfigurationDialog::_autoremap_command_or_control_toggled(bool p
}
}
-void InputEventConfigurationDialog::_physical_keycode_toggled(bool p_checked) {
+void InputEventConfigurationDialog::_key_mode_selected(int p_mode) {
Ref<InputEventKey> k = event;
-
- if (k.is_null()) {
+ Ref<InputEventKey> ko = original_event;
+ if (k.is_null() || ko.is_null()) {
return;
}
- if (p_checked) {
- k->set_physical_keycode(k->get_keycode());
+ if (key_mode->get_selected_id() == KEYMODE_KEYCODE) {
+ k->set_keycode(ko->get_keycode());
+ k->set_physical_keycode(Key::NONE);
+ k->set_key_label(Key::NONE);
+ } else if (key_mode->get_selected_id() == KEYMODE_PHY_KEYCODE) {
k->set_keycode(Key::NONE);
- } else {
- k->set_keycode((Key)k->get_physical_keycode());
+ k->set_physical_keycode(ko->get_physical_keycode());
+ k->set_key_label(Key::NONE);
+ } else if (key_mode->get_selected_id() == KEYMODE_UNICODE) {
k->set_physical_keycode(Key::NONE);
+ k->set_keycode(Key::NONE);
+ k->set_key_label(ko->get_key_label());
}
- _set_event(k);
+ _set_event(k, original_event);
}
void InputEventConfigurationDialog::_input_list_item_selected() {
TreeItem *selected = input_list_tree->get_selected();
+ // Called form _set_event, do not update for a second time.
+ if (in_tree_update) {
+ return;
+ }
+
// Invalid tree selection - type only exists on the "category" items, which are not a valid selection.
if (selected->has_meta("__type")) {
return;
@@ -379,15 +426,11 @@ void InputEventConfigurationDialog::_input_list_item_selected() {
Ref<InputEventKey> k;
k.instantiate();
- if (physical_key_checkbox->is_pressed()) {
- k->set_physical_keycode(keycode);
- k->set_keycode(Key::NONE);
- } else {
- k->set_physical_keycode(Key::NONE);
- k->set_keycode(keycode);
- }
+ k->set_physical_keycode(keycode);
+ k->set_keycode(keycode);
+ k->set_key_label(keycode);
- // Maintain modifier state from checkboxes
+ // Maintain modifier state from checkboxes.
k->set_alt_pressed(mod_checkboxes[MOD_ALT]->is_pressed());
k->set_shift_pressed(mod_checkboxes[MOD_SHIFT]->is_pressed());
if (autoremap_command_or_control_checkbox->is_pressed()) {
@@ -397,7 +440,23 @@ void InputEventConfigurationDialog::_input_list_item_selected() {
k->set_meta_pressed(mod_checkboxes[MOD_META]->is_pressed());
}
- _set_event(k, false);
+ Ref<InputEventKey> ko = k->duplicate();
+
+ if (key_mode->get_selected_id() == KEYMODE_UNICODE) {
+ key_mode->select(KEYMODE_PHY_KEYCODE);
+ }
+
+ if (key_mode->get_selected_id() == KEYMODE_KEYCODE) {
+ k->set_physical_keycode(Key::NONE);
+ k->set_keycode(keycode);
+ k->set_key_label(Key::NONE);
+ } else if (key_mode->get_selected_id() == KEYMODE_PHY_KEYCODE) {
+ k->set_physical_keycode(keycode);
+ k->set_keycode(Key::NONE);
+ k->set_key_label(Key::NONE);
+ }
+
+ _set_event(k, ko, false);
} break;
case INPUT_MOUSE_BUTTON: {
MouseButton idx = (MouseButton)(int)selected->get_meta("__index");
@@ -417,7 +476,7 @@ void InputEventConfigurationDialog::_input_list_item_selected() {
// Maintain selected device
mb->set_device(_get_current_device());
- _set_event(mb, false);
+ _set_event(mb, mb, false);
} break;
case INPUT_JOY_BUTTON: {
JoyButton idx = (JoyButton)(int)selected->get_meta("__index");
@@ -426,7 +485,7 @@ void InputEventConfigurationDialog::_input_list_item_selected() {
// Maintain selected device
jb->set_device(_get_current_device());
- _set_event(jb, false);
+ _set_event(jb, jb, false);
} break;
case INPUT_JOY_MOTION: {
JoyAxis axis = (JoyAxis)(int)selected->get_meta("__axis");
@@ -440,7 +499,7 @@ void InputEventConfigurationDialog::_input_list_item_selected() {
// Maintain selected device
jm->set_device(_get_current_device());
- _set_event(jm, false);
+ _set_event(jm, jm, false);
} break;
}
}
@@ -470,7 +529,9 @@ void InputEventConfigurationDialog::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
input_list_search->set_right_icon(input_list_search->get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
- physical_key_checkbox->set_icon(get_theme_icon(SNAME("KeyboardPhysical"), SNAME("EditorIcons")));
+ key_mode->set_item_icon(KEYMODE_KEYCODE, get_theme_icon(SNAME("Keyboard"), SNAME("EditorIcons")));
+ key_mode->set_item_icon(KEYMODE_PHY_KEYCODE, get_theme_icon(SNAME("KeyboardPhysical"), SNAME("EditorIcons")));
+ key_mode->set_item_icon(KEYMODE_UNICODE, get_theme_icon(SNAME("KeyboardLabel"), SNAME("EditorIcons")));
icon_cache.keyboard = get_theme_icon(SNAME("Keyboard"), SNAME("EditorIcons"));
icon_cache.mouse = get_theme_icon(SNAME("Mouse"), SNAME("EditorIcons"));
@@ -484,22 +545,22 @@ void InputEventConfigurationDialog::_notification(int p_what) {
void InputEventConfigurationDialog::popup_and_configure(const Ref<InputEvent> &p_event) {
if (p_event.is_valid()) {
- _set_event(p_event);
+ _set_event(p_event, p_event->duplicate());
} else {
// Clear Event
- _set_event(p_event);
+ _set_event(Ref<InputEvent>(), Ref<InputEvent>());
// Clear Checkbox Values
for (int i = 0; i < MOD_MAX; i++) {
mod_checkboxes[i]->set_pressed(false);
}
- // Enable the Physical Key checkbox by default to encourage its use.
+ // Enable the Physical Key by default to encourage its use.
// Physical Key should be used for most game inputs as it allows keys to work
// on non-QWERTY layouts out of the box.
// This is especially important for WASD movement layouts.
- physical_key_checkbox->set_pressed(true);
+ key_mode->select(KEYMODE_PHY_KEYCODE);
autoremap_command_or_control_checkbox->set_pressed(false);
// Select "All Devices" by default.
@@ -515,6 +576,7 @@ Ref<InputEvent> InputEventConfigurationDialog::get_event() const {
void InputEventConfigurationDialog::set_allowed_input_types(int p_type_masks) {
allowed_input_types = p_type_masks;
+ event_listener->set_allowed_input_types(p_type_masks);
}
InputEventConfigurationDialog::InputEventConfigurationDialog() {
@@ -620,14 +682,15 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
mod_container->hide();
additional_options_container->add_child(mod_container);
- // Physical Key Checkbox
+ // Key Mode Selection
- physical_key_checkbox = memnew(CheckBox);
- physical_key_checkbox->set_text(TTR("Use Physical Keycode"));
- physical_key_checkbox->set_tooltip_text(TTR("Stores the physical position of the key on the keyboard rather than the key's value. Used for compatibility with non-latin layouts.\nThis should generally be enabled for most game shortcuts, but not in non-game applications."));
- physical_key_checkbox->connect("toggled", callable_mp(this, &InputEventConfigurationDialog::_physical_keycode_toggled));
- physical_key_checkbox->hide();
- additional_options_container->add_child(physical_key_checkbox);
+ key_mode = memnew(OptionButton);
+ key_mode->add_item(TTR("Keycode (Latin Equivalent)"), KEYMODE_KEYCODE);
+ key_mode->add_item(TTR("Physical Keycode (Position on US QWERTY Keyboard)"), KEYMODE_PHY_KEYCODE);
+ key_mode->add_item(TTR("Key Label (Unicode, Case-Insensitive)"), KEYMODE_UNICODE);
+ key_mode->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_key_mode_selected));
+ key_mode->hide();
+ additional_options_container->add_child(key_mode);
main_vbox->add_child(additional_options_container);
}
diff --git a/editor/input_event_configuration_dialog.h b/editor/input_event_configuration_dialog.h
index 67906233dd..e7ab0da4d6 100644
--- a/editor/input_event_configuration_dialog.h
+++ b/editor/input_event_configuration_dialog.h
@@ -50,7 +50,10 @@ private:
Ref<Texture2D> joypad_axis;
} icon_cache;
- Ref<InputEvent> event = Ref<InputEvent>();
+ Ref<InputEvent> event;
+ Ref<InputEvent> original_event;
+
+ bool in_tree_update = false;
// Listening for input
EventListenerLineEdit *event_listener = nullptr;
@@ -88,9 +91,15 @@ private:
CheckBox *mod_checkboxes[MOD_MAX];
CheckBox *autoremap_command_or_control_checkbox = nullptr;
- CheckBox *physical_key_checkbox = nullptr;
+ enum KeyMode {
+ KEYMODE_KEYCODE,
+ KEYMODE_PHY_KEYCODE,
+ KEYMODE_UNICODE,
+ };
+
+ OptionButton *key_mode = nullptr;
- void _set_event(const Ref<InputEvent> &p_event, bool p_update_input_list_selection = true);
+ void _set_event(const Ref<InputEvent> &p_event, const Ref<InputEvent> &p_original_event, bool p_update_input_list_selection = true);
void _on_listen_input_changed(const Ref<InputEvent> &p_event);
void _on_listen_focus_changed();
@@ -100,7 +109,7 @@ private:
void _mod_toggled(bool p_checked, int p_index);
void _autoremap_command_or_control_toggled(bool p_checked);
- void _physical_keycode_toggled(bool p_checked);
+ void _key_mode_selected(int p_mode);
void _device_selection_changed(int p_option_button_index);
void _set_current_device(int p_device);
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index fbe01c26b0..52482ecb16 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -35,6 +35,7 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
+#include "editor/filesystem_dock.h"
#include "editor/plugins/script_editor_plugin.h"
InspectorDock *InspectorDock::singleton = nullptr;
@@ -86,6 +87,11 @@ void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) {
case RESOURCE_EDIT_CLIPBOARD: {
_paste_resource();
} break;
+ case RESOURCE_SHOW_IN_FILESYSTEM: {
+ Ref<Resource> current_res = _get_current_resource();
+ ERR_FAIL_COND(current_res.is_null());
+ FileSystemDock::get_singleton()->navigate_to_path(current_res->get_path());
+ } break;
case OBJECT_REQUEST_HELP: {
if (current) {
@@ -180,11 +186,10 @@ void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) {
}
}
- int history_id = editor_data->get_undo_redo()->get_history_for_object(current).id;
- editor_data->get_undo_redo()->clear_history(true, history_id);
+ int history_id = EditorUndoRedoManager::get_singleton()->get_history_for_object(current).id;
+ EditorUndoRedoManager::get_singleton()->clear_history(true, history_id);
- EditorNode::get_singleton()->get_editor_plugins_over()->edit(nullptr);
- EditorNode::get_singleton()->get_editor_plugins_over()->edit(current);
+ EditorNode::get_singleton()->edit_item(current, inspector);
}
} break;
@@ -257,12 +262,8 @@ void InspectorDock::_resource_file_selected(String p_file) {
}
void InspectorDock::_save_resource(bool save_as) {
- ObjectID current_id = EditorNode::get_singleton()->get_editor_selection_history()->get_current();
- Object *current_obj = current_id.is_valid() ? ObjectDB::get_instance(current_id) : nullptr;
-
- ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj));
-
- Ref<Resource> current_res = Ref<Resource>(Object::cast_to<Resource>(current_obj));
+ Ref<Resource> current_res = _get_current_resource();
+ ERR_FAIL_COND(current_res.is_null());
if (save_as) {
EditorNode::get_singleton()->save_resource_as(current_res);
@@ -272,24 +273,15 @@ void InspectorDock::_save_resource(bool save_as) {
}
void InspectorDock::_unref_resource() {
- ObjectID current_id = EditorNode::get_singleton()->get_editor_selection_history()->get_current();
- Object *current_obj = current_id.is_valid() ? ObjectDB::get_instance(current_id) : nullptr;
-
- ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj));
-
- Ref<Resource> current_res = Ref<Resource>(Object::cast_to<Resource>(current_obj));
+ Ref<Resource> current_res = _get_current_resource();
+ ERR_FAIL_COND(current_res.is_null());
current_res->set_path("");
EditorNode::get_singleton()->edit_current();
}
void InspectorDock::_copy_resource() {
- ObjectID current_id = EditorNode::get_singleton()->get_editor_selection_history()->get_current();
- Object *current_obj = current_id.is_valid() ? ObjectDB::get_instance(current_id) : nullptr;
-
- ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj));
-
- Ref<Resource> current_res = Ref<Resource>(Object::cast_to<Resource>(current_obj));
-
+ Ref<Resource> current_res = _get_current_resource();
+ ERR_FAIL_COND(current_res.is_null());
EditorSettings::get_singleton()->set_resource_clipboard(current_res);
}
@@ -304,6 +296,16 @@ void InspectorDock::_prepare_resource_extra_popup() {
Ref<Resource> r = EditorSettings::get_singleton()->get_resource_clipboard();
PopupMenu *popup = resource_extra_button->get_popup();
popup->set_item_disabled(popup->get_item_index(RESOURCE_EDIT_CLIPBOARD), r.is_null());
+
+ Ref<Resource> current_res = _get_current_resource();
+ ERR_FAIL_COND(current_res.is_null());
+ popup->set_item_disabled(popup->get_item_index(RESOURCE_SHOW_IN_FILESYSTEM), current_res->is_built_in());
+}
+
+Ref<Resource> InspectorDock::_get_current_resource() const {
+ ObjectID current_id = EditorNode::get_singleton()->get_editor_selection_history()->get_current();
+ Object *current_obj = current_id.is_valid() ? ObjectDB::get_instance(current_id) : nullptr;
+ return Ref<Resource>(Object::cast_to<Resource>(current_obj));
}
void InspectorDock::_prepare_history() {
@@ -662,6 +664,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
resource_extra_button->get_popup()->add_icon_shortcut(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")), ED_SHORTCUT("property_editor/copy_resource", TTR("Copy Resource")), RESOURCE_COPY);
resource_extra_button->get_popup()->set_item_disabled(1, true);
resource_extra_button->get_popup()->add_separator();
+ resource_extra_button->get_popup()->add_shortcut(ED_SHORTCUT("property_editor/show_in_filesystem", TTR("Show in FileSystem")), RESOURCE_SHOW_IN_FILESYSTEM);
resource_extra_button->get_popup()->add_shortcut(ED_SHORTCUT("property_editor/unref_resource", TTR("Make Resource Built-In")), RESOURCE_MAKE_BUILT_IN);
resource_extra_button->get_popup()->set_item_disabled(3, true);
resource_extra_button->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
index fb2e1d53b1..c2c1b55fb1 100644
--- a/editor/inspector_dock.h
+++ b/editor/inspector_dock.h
@@ -51,6 +51,7 @@ class InspectorDock : public VBoxContainer {
RESOURCE_LOAD,
RESOURCE_SAVE,
RESOURCE_SAVE_AS,
+ RESOURCE_SHOW_IN_FILESYSTEM,
RESOURCE_MAKE_BUILT_IN,
RESOURCE_COPY,
RESOURCE_EDIT_CLIPBOARD,
@@ -119,6 +120,7 @@ class InspectorDock : public VBoxContainer {
void _copy_resource();
void _paste_resource();
void _prepare_resource_extra_popup();
+ Ref<Resource> _get_current_resource() const;
void _info_pressed();
void _resource_created();
diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp
index 6fa980a8e5..5503645930 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -33,7 +33,6 @@
#include "core/config/project_settings.h"
#include "core/string/translation.h"
#include "editor/editor_file_dialog.h"
-#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_translation_parser.h"
#include "editor/editor_undo_redo_manager.h"
@@ -81,7 +80,7 @@ void LocalizationEditor::_translation_add(const PackedStringArray &p_paths) {
}
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Add %d Translations"), p_paths.size()));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", translations);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", GLOBAL_GET("internationalization/locale/translations"));
@@ -112,7 +111,7 @@ void LocalizationEditor::_translation_delete(Object *p_item, int p_column, int p
translations.remove_at(idx);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Translation"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", translations);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", GLOBAL_GET("internationalization/locale/translations"));
@@ -143,7 +142,7 @@ void LocalizationEditor::_translation_res_add(const PackedStringArray &p_paths)
}
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Translation Resource Remap: Add %d Path(s)"), p_paths.size()));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", prev);
@@ -175,7 +174,7 @@ void LocalizationEditor::_translation_res_option_add(const PackedStringArray &p_
}
remaps[key] = r;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Translation Resource Remap: Add %d Remap(s)"), p_paths.size()));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", GLOBAL_GET("internationalization/locale/translation_remaps"));
@@ -239,7 +238,7 @@ void LocalizationEditor::_translation_res_option_changed() {
updating_translations = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Resource Remap Language"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", GLOBAL_GET("internationalization/locale/translation_remaps"));
@@ -273,7 +272,7 @@ void LocalizationEditor::_translation_res_delete(Object *p_item, int p_column, i
remaps.erase(key);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Resource Remap"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", GLOBAL_GET("internationalization/locale/translation_remaps"));
@@ -313,7 +312,7 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co
r.remove_at(idx);
remaps[key] = r;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Resource Remap Option"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", GLOBAL_GET("internationalization/locale/translation_remaps"));
@@ -332,7 +331,7 @@ void LocalizationEditor::_pot_add(const PackedStringArray &p_paths) {
}
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Add %d file(s) for POT generation"), p_paths.size()));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", pot_translations);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", GLOBAL_GET("internationalization/locale/translations_pot_files"));
@@ -359,7 +358,7 @@ void LocalizationEditor::_pot_delete(Object *p_item, int p_column, int p_button,
pot_translations.remove_at(idx);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove file from POT generation"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", pot_translations);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", GLOBAL_GET("internationalization/locale/translations_pot_files"));
diff --git a/editor/multi_node_edit.cpp b/editor/multi_node_edit.cpp
index dbbcd57742..4f0db70681 100644
--- a/editor/multi_node_edit.cpp
+++ b/editor/multi_node_edit.cpp
@@ -48,6 +48,8 @@ bool MultiNodeEdit::_set_impl(const StringName &p_name, const Variant &p_value,
if (name == "scripts") { // Script set is intercepted at object level (check Variant Object::get()), so use a different name.
name = "script";
+ } else if (name.begins_with("Metadata/")) {
+ name = name.replace_first("Metadata/", "metadata/");
}
Node *node_path_target = nullptr;
@@ -55,7 +57,7 @@ bool MultiNodeEdit::_set_impl(const StringName &p_name, const Variant &p_value,
node_path_target = es->get_node(p_value);
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(vformat(TTR("Set %s on %d nodes"), name, get_node_count()), UndoRedo::MERGE_ENDS);
for (const NodePath &E : nodes) {
@@ -98,6 +100,8 @@ bool MultiNodeEdit::_get(const StringName &p_name, Variant &r_ret) const {
String name = p_name;
if (name == "scripts") { // Script set is intercepted at object level (check Variant Object::get()), so use a different name.
name = "script";
+ } else if (name.begins_with("Metadata/")) {
+ name = name.replace_first("Metadata/", "metadata/");
}
for (const NodePath &E : nodes) {
@@ -137,14 +141,18 @@ void MultiNodeEdit::_get_property_list(List<PropertyInfo> *p_list) const {
List<PropertyInfo> plist;
n->get_property_list(&plist, true);
- for (const PropertyInfo &F : plist) {
+ for (PropertyInfo F : plist) {
if (F.name == "script") {
continue; // Added later manually, since this is intercepted before being set (check Variant Object::get()).
+ } else if (F.name.begins_with("metadata/")) {
+ F.name = F.name.replace_first("metadata/", "Metadata/"); // Trick to not get actual metadata edited from MultiNodeEdit.
}
+
if (!usage.has(F.name)) {
PLData pld;
pld.uses = 0;
pld.info = F;
+ pld.info.name = F.name;
usage[F.name] = pld;
data_list.push_back(usage.getptr(F.name));
}
diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp
index 4f6487fa77..97398b8b69 100644
--- a/editor/plugin_config_dialog.cpp
+++ b/editor/plugin_config_dialog.cpp
@@ -92,7 +92,7 @@ void PluginConfigDialog::_on_confirmed() {
_clear_fields();
}
-void PluginConfigDialog::_on_cancelled() {
+void PluginConfigDialog::_on_canceled() {
_clear_fields();
}
@@ -162,7 +162,7 @@ void PluginConfigDialog::_notification(int p_what) {
case NOTIFICATION_READY: {
connect("confirmed", callable_mp(this, &PluginConfigDialog::_on_confirmed));
- get_cancel_button()->connect("pressed", callable_mp(this, &PluginConfigDialog::_on_cancelled));
+ get_cancel_button()->connect("pressed", callable_mp(this, &PluginConfigDialog::_on_canceled));
} break;
}
}
diff --git a/editor/plugin_config_dialog.h b/editor/plugin_config_dialog.h
index e8df308c54..50b901a39e 100644
--- a/editor/plugin_config_dialog.h
+++ b/editor/plugin_config_dialog.h
@@ -58,7 +58,7 @@ class PluginConfigDialog : public ConfirmationDialog {
void _clear_fields();
void _on_confirmed();
- void _on_cancelled();
+ void _on_canceled();
void _on_language_changed(const int p_language);
void _on_required_text_changed(const String &p_text);
String _get_subfolder();
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 3a83d9b9c2..7c23e19564 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -91,7 +91,7 @@ void AbstractPolygon2DEditor::_set_polygon(int p_idx, const Variant &p_polygon)
void AbstractPolygon2DEditor::_action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) {
Node2D *node = _get_node();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(node, "set_polygon", p_polygon);
undo_redo->add_undo_method(node, "set_polygon", p_previous);
}
@@ -101,7 +101,7 @@ Vector2 AbstractPolygon2DEditor::_get_offset(int p_idx) const {
}
void AbstractPolygon2DEditor::_commit_action() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(canvas_item_editor, "update_viewport");
undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
undo_redo->commit_action();
@@ -205,7 +205,7 @@ void AbstractPolygon2DEditor::_wip_close() {
if (_is_line()) {
_set_polygon(0, wip);
} else if (wip.size() >= (_is_line() ? 2 : 3)) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Create Polygon"));
_action_add_polygon(wip);
if (_has_uv()) {
@@ -257,7 +257,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
return false;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<InputEventMouseButton> mb = p_event;
if (!_has_resource()) {
@@ -410,7 +410,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
if (mm.is_valid()) {
Vector2 gpoint = mm->get_position();
- if (edited_point.valid() && (wip_active || (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE)) {
+ if (edited_point.valid() && (wip_active || mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
Vector2 cpoint = _get_node()->to_local(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint)));
//Move the point in a single axis. Should only work when editing a polygon and while holding shift.
@@ -619,7 +619,7 @@ void AbstractPolygon2DEditor::_bind_methods() {
}
void AbstractPolygon2DEditor::remove_point(const Vertex &p_vertex) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Vector<Vector2> vertices = _get_polygon(p_vertex.polygon);
if (vertices.size() > (_is_line() ? 2 : 3)) {
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index ec3f2b0f63..df94815105 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -38,6 +38,7 @@
#include "editor/editor_undo_redo_manager.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/gui/check_box.h"
+#include "scene/gui/option_button.h"
#include "scene/gui/panel_container.h"
StringName AnimationNodeBlendSpace1DEditor::get_blend_position_path() const {
@@ -157,7 +158,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Move Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "set_blend_point_position", selected_point, point);
undo_redo->add_undo_method(blend_space.ptr(), "set_blend_point_position", selected_point, blend_space->get_blend_point_position(selected_point));
@@ -200,7 +201,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
_update_edited_point_pos();
}
- if (mm.is_valid() && tool_blend->is_pressed() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (mm.is_valid() && tool_blend->is_pressed() && (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
float blend_pos = mm->get_position().x / blend_space_draw->get_size().x;
blend_pos *= blend_space->get_max_space() - blend_space->get_min_space();
blend_pos += blend_space->get_min_space();
@@ -335,6 +336,7 @@ void AnimationNodeBlendSpace1DEditor::_update_space() {
min_value->set_value(blend_space->get_min_space());
sync->set_pressed(blend_space->is_using_sync());
+ interpolation->select(blend_space->get_blend_mode());
label_value->set_text(blend_space->get_value_label());
@@ -351,7 +353,7 @@ void AnimationNodeBlendSpace1DEditor::_config_changed(double) {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change BlendSpace1D Config"));
undo_redo->add_do_method(blend_space.ptr(), "set_max_space", max_value->get_value());
undo_redo->add_undo_method(blend_space.ptr(), "set_max_space", blend_space->get_max_space());
@@ -361,6 +363,8 @@ void AnimationNodeBlendSpace1DEditor::_config_changed(double) {
undo_redo->add_undo_method(blend_space.ptr(), "set_snap", blend_space->get_snap());
undo_redo->add_do_method(blend_space.ptr(), "set_use_sync", sync->is_pressed());
undo_redo->add_undo_method(blend_space.ptr(), "set_use_sync", blend_space->is_using_sync());
+ undo_redo->add_do_method(blend_space.ptr(), "set_blend_mode", interpolation->get_selected());
+ undo_redo->add_undo_method(blend_space.ptr(), "set_blend_mode", blend_space->get_blend_mode());
undo_redo->add_do_method(this, "_update_space");
undo_redo->add_undo_method(this, "_update_space");
undo_redo->commit_action();
@@ -375,7 +379,7 @@ void AnimationNodeBlendSpace1DEditor::_labels_changed(String) {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change BlendSpace1D Labels"), UndoRedo::MERGE_ENDS);
undo_redo->add_do_method(blend_space.ptr(), "set_value_label", label_value->get_text());
undo_redo->add_undo_method(blend_space.ptr(), "set_value_label", blend_space->get_value_label());
@@ -431,7 +435,7 @@ void AnimationNodeBlendSpace1DEditor::_add_menu_type(int p_index) {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", node, add_point_pos);
undo_redo->add_undo_method(blend_space.ptr(), "remove_blend_point", blend_space->get_blend_point_count());
@@ -450,7 +454,7 @@ void AnimationNodeBlendSpace1DEditor::_add_animation_type(int p_index) {
anim->set_animation(animations_to_add[p_index]);
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Animation Point"));
undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", anim, add_point_pos);
undo_redo->add_undo_method(blend_space.ptr(), "remove_blend_point", blend_space->get_blend_point_count());
@@ -524,7 +528,7 @@ void AnimationNodeBlendSpace1DEditor::_erase_selected() {
if (selected_point != -1) {
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove BlendSpace1D Point"));
undo_redo->add_do_method(blend_space.ptr(), "remove_blend_point", selected_point);
undo_redo->add_undo_method(blend_space.ptr(), "add_blend_point", blend_space->get_blend_point_node(selected_point), blend_space->get_blend_point_position(selected_point), selected_point);
@@ -544,7 +548,7 @@ void AnimationNodeBlendSpace1DEditor::_edit_point_pos(double) {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Move BlendSpace1D Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "set_blend_point_position", selected_point, edit_value->get_value());
undo_redo->add_undo_method(blend_space.ptr(), "set_blend_point_position", selected_point, blend_space->get_blend_point_position(selected_point));
@@ -579,6 +583,10 @@ void AnimationNodeBlendSpace1DEditor::_notification(int p_what) {
tool_erase->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
snap->set_icon(get_theme_icon(SNAME("SnapGrid"), SNAME("EditorIcons")));
open_editor->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
+ interpolation->clear();
+ interpolation->add_icon_item(get_theme_icon(SNAME("TrackContinuous"), SNAME("EditorIcons")), "", 0);
+ interpolation->add_icon_item(get_theme_icon(SNAME("TrackDiscrete"), SNAME("EditorIcons")), "", 1);
+ interpolation->add_icon_item(get_theme_icon(SNAME("TrackCapture"), SNAME("EditorIcons")), "", 2);
} break;
case NOTIFICATION_PROCESS: {
@@ -639,6 +647,7 @@ void AnimationNodeBlendSpace1DEditor::edit(const Ref<AnimationNode> &p_node) {
min_value->set_editable(!read_only);
max_value->set_editable(!read_only);
sync->set_disabled(read_only);
+ interpolation->set_disabled(read_only);
}
AnimationNodeBlendSpace1DEditor *AnimationNodeBlendSpace1DEditor::singleton = nullptr;
@@ -707,6 +716,13 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
top_hb->add_child(sync);
sync->connect("toggled", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
+ top_hb->add_child(memnew(VSeparator));
+
+ top_hb->add_child(memnew(Label(TTR("Blend:"))));
+ interpolation = memnew(OptionButton);
+ top_hb->add_child(interpolation);
+ interpolation->connect("item_selected", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_config_changed));
+
edit_hb = memnew(HBoxContainer);
top_hb->add_child(edit_hb);
edit_hb->add_child(memnew(VSeparator));
diff --git a/editor/plugins/animation_blend_space_1d_editor.h b/editor/plugins/animation_blend_space_1d_editor.h
index e71a4bd1b9..90104fc310 100644
--- a/editor/plugins/animation_blend_space_1d_editor.h
+++ b/editor/plugins/animation_blend_space_1d_editor.h
@@ -41,6 +41,7 @@
#include "scene/gui/tree.h"
class CheckBox;
+class OptionButton;
class PanelContainer;
class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
@@ -66,6 +67,7 @@ class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
SpinBox *min_value = nullptr;
CheckBox *sync = nullptr;
+ OptionButton *interpolation = nullptr;
HBoxContainer *edit_hb = nullptr;
SpinBox *edit_value = nullptr;
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index 00e7f28bb5..0daf934e17 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -74,7 +74,6 @@ void AnimationNodeBlendSpace2DEditor::edit(const Ref<AnimationNode> &p_node) {
}
tool_create->set_disabled(read_only);
- interpolation->set_disabled(read_only);
max_x_value->set_editable(!read_only);
min_x_value->set_editable(!read_only);
max_y_value->set_editable(!read_only);
@@ -228,7 +227,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Triangle"));
undo_redo->add_do_method(blend_space.ptr(), "add_triangle", making_triangle[0], making_triangle[1], making_triangle[2]);
undo_redo->add_undo_method(blend_space.ptr(), "remove_triangle", blend_space->get_triangle_count());
@@ -254,7 +253,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
if (!read_only) {
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Move Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "set_blend_point_position", selected_point, point);
undo_redo->add_undo_method(blend_space.ptr(), "set_blend_point_position", selected_point, blend_space->get_blend_point_position(selected_point));
@@ -308,7 +307,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
blend_space_draw->queue_redraw();
}
- if (mm.is_valid() && tool_blend->is_pressed() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (mm.is_valid() && tool_blend->is_pressed() && (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
Vector2 blend_pos = (mm->get_position() / blend_space_draw->get_size());
blend_pos.y = 1.0 - blend_pos.y;
blend_pos *= (blend_space->get_max_space() - blend_space->get_min_space());
@@ -362,7 +361,7 @@ void AnimationNodeBlendSpace2DEditor::_add_menu_type(int p_index) {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", node, add_point_pos);
undo_redo->add_undo_method(blend_space.ptr(), "remove_blend_point", blend_space->get_blend_point_count());
@@ -381,7 +380,7 @@ void AnimationNodeBlendSpace2DEditor::_add_animation_type(int p_index) {
anim->set_animation(animations_to_add[p_index]);
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Animation Point"));
undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", anim, add_point_pos);
undo_redo->add_undo_method(blend_space.ptr(), "remove_blend_point", blend_space->get_blend_point_count());
@@ -676,7 +675,7 @@ void AnimationNodeBlendSpace2DEditor::_config_changed(double) {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change BlendSpace2D Config"));
undo_redo->add_do_method(blend_space.ptr(), "set_max_space", Vector2(max_x_value->get_value(), max_y_value->get_value()));
undo_redo->add_undo_method(blend_space.ptr(), "set_max_space", blend_space->get_max_space());
@@ -702,7 +701,7 @@ void AnimationNodeBlendSpace2DEditor::_labels_changed(String) {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change BlendSpace2D Labels"), UndoRedo::MERGE_ENDS);
undo_redo->add_do_method(blend_space.ptr(), "set_x_label", label_x->get_text());
undo_redo->add_undo_method(blend_space.ptr(), "set_x_label", blend_space->get_x_label());
@@ -715,7 +714,7 @@ void AnimationNodeBlendSpace2DEditor::_labels_changed(String) {
}
void AnimationNodeBlendSpace2DEditor::_erase_selected() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (selected_point != -1) {
updating = true;
undo_redo->create_action(TTR("Remove BlendSpace2D Point"));
@@ -778,7 +777,7 @@ void AnimationNodeBlendSpace2DEditor::_edit_point_pos(double) {
return;
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Move Node Point"));
undo_redo->add_do_method(blend_space.ptr(), "set_blend_point_position", selected_point, Vector2(edit_x->get_value(), edit_y->get_value()));
undo_redo->add_undo_method(blend_space.ptr(), "set_blend_point_position", selected_point, blend_space->get_blend_point_position(selected_point));
@@ -856,7 +855,7 @@ void AnimationNodeBlendSpace2DEditor::_open_editor() {
}
void AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Toggle Auto Triangles"));
undo_redo->add_do_method(blend_space.ptr(), "set_auto_triangles", auto_triangles->is_pressed());
undo_redo->add_undo_method(blend_space.ptr(), "set_auto_triangles", blend_space->get_auto_triangles());
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 0ebc780604..f5f9ec11b3 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -103,7 +103,7 @@ void AnimationNodeBlendTreeEditor::_property_changed(const StringName &p_propert
return;
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Parameter Changed:") + " " + String(p_property), UndoRedo::MERGE_ENDS);
undo_redo->add_do_property(tree, p_property, p_value);
undo_redo->add_undo_property(tree, p_property, tree->get(p_property));
@@ -187,7 +187,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
String base_path = AnimationTreeEditor::get_singleton()->get_base_path() + String(E) + "/" + F.name;
EditorProperty *prop = EditorInspector::instantiate_property_editor(tree, F.type, base_path, F.hint, F.hint_string, F.usage);
if (prop) {
- prop->set_read_only(read_only);
+ prop->set_read_only(read_only || (F.usage & PROPERTY_USAGE_READ_ONLY));
prop->set_object_and_property(tree, base_path);
prop->update_property();
prop->set_name_split_ratio(0);
@@ -363,7 +363,7 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
name = base_name + " " + itos(base);
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Node to BlendTree"));
undo_redo->add_do_method(blend_tree.ptr(), "add_node", name, anode, instance_pos / EDSCALE);
undo_redo->add_undo_method(blend_tree.ptr(), "remove_node", name);
@@ -425,9 +425,14 @@ void AnimationNodeBlendTreeEditor::_connection_from_empty(const String &p_to, in
}
}
+void AnimationNodeBlendTreeEditor::_popup_hide() {
+ to_node = "";
+ to_slot = -1;
+}
+
void AnimationNodeBlendTreeEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_to, const StringName &p_which) {
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Node Moved"));
undo_redo->add_do_method(blend_tree.ptr(), "set_node_position", p_which, p_to / EDSCALE);
undo_redo->add_undo_method(blend_tree.ptr(), "set_node_position", p_which, p_from / EDSCALE);
@@ -449,7 +454,7 @@ void AnimationNodeBlendTreeEditor::_connection_request(const String &p_from, int
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Nodes Connected"));
undo_redo->add_do_method(blend_tree.ptr(), "connect_node", p_to, p_to_index, p_from);
undo_redo->add_undo_method(blend_tree.ptr(), "disconnect_node", p_to, p_to_index);
@@ -466,7 +471,7 @@ void AnimationNodeBlendTreeEditor::_disconnection_request(const String &p_from,
graph->disconnect_node(p_from, p_from_index, p_to, p_to_index);
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Nodes Disconnected"));
undo_redo->add_do_method(blend_tree.ptr(), "disconnect_node", p_to, p_to_index);
undo_redo->add_undo_method(blend_tree.ptr(), "connect_node", p_to, p_to_index, p_from);
@@ -482,7 +487,7 @@ void AnimationNodeBlendTreeEditor::_anim_selected(int p_index, Array p_options,
Ref<AnimationNodeAnimation> anim = blend_tree->get_node(p_node);
ERR_FAIL_COND(!anim.is_valid());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Animation"));
undo_redo->add_do_method(anim.ptr(), "set_animation", option);
undo_redo->add_undo_method(anim.ptr(), "set_animation", anim->get_animation());
@@ -496,7 +501,7 @@ void AnimationNodeBlendTreeEditor::_delete_request(const String &p_which) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete Node"));
undo_redo->add_do_method(blend_tree.ptr(), "remove_node", p_which);
undo_redo->add_undo_method(blend_tree.ptr(), "add_node", p_which, blend_tree->get_node(p_which), blend_tree.ptr()->get_node_position(p_which));
@@ -541,7 +546,7 @@ void AnimationNodeBlendTreeEditor::_delete_nodes_request(const TypedArray<String
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete Node(s)"));
for (const StringName &F : to_erase) {
@@ -575,7 +580,7 @@ void AnimationNodeBlendTreeEditor::_open_in_editor(const String &p_which) {
void AnimationNodeBlendTreeEditor::_filter_toggled() {
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Toggle Filter On/Off"));
undo_redo->add_do_method(_filter_edit.ptr(), "set_filter_enabled", filter_enabled->is_pressed());
undo_redo->add_undo_method(_filter_edit.ptr(), "set_filter_enabled", _filter_edit->is_filter_enabled());
@@ -593,7 +598,7 @@ void AnimationNodeBlendTreeEditor::_filter_edited() {
bool filtered = edited->is_checked(0);
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Filter"));
undo_redo->add_do_method(_filter_edit.ptr(), "set_filter_path", edited_path, filtered);
undo_redo->add_undo_method(_filter_edit.ptr(), "set_filter_path", edited_path, _filter_edit->is_path_filtered(edited_path));
@@ -976,7 +981,7 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
String base_path = AnimationTreeEditor::get_singleton()->get_base_path();
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Node Renamed"));
undo_redo->add_do_method(blend_tree.ptr(), "rename_node", prev_name, name);
undo_redo->add_undo_method(blend_tree.ptr(), "rename_node", name, prev_name);
@@ -1096,6 +1101,7 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
add_node->set_text(TTR("Add Node..."));
graph->get_zoom_hbox()->move_child(add_node, 0);
add_node->get_popup()->connect("id_pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_add_node));
+ add_node->get_popup()->connect("popup_hide", callable_mp(this, &AnimationNodeBlendTreeEditor::_popup_hide), CONNECT_DEFERRED);
add_node->connect("about_to_popup", callable_mp(this, &AnimationNodeBlendTreeEditor::_update_options_menu).bind(false));
add_node->set_disabled(read_only);
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h
index b471d47df6..afb3394238 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.h
+++ b/editor/plugins/animation_blend_tree_editor_plugin.h
@@ -121,6 +121,7 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
void _popup_request(const Vector2 &p_position);
void _connection_to_empty(const String &p_from, int p_from_slot, const Vector2 &p_release_position);
void _connection_from_empty(const String &p_to, int p_to_slot, const Vector2 &p_release_position);
+ void _popup_hide();
void _property_changed(const StringName &p_property, const Variant &p_value, const String &p_field, bool p_changing);
diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp
index 9decbef51b..bf7e419fe4 100644
--- a/editor/plugins/animation_library_editor.cpp
+++ b/editor/plugins/animation_library_editor.cpp
@@ -94,7 +94,7 @@ void AnimationLibraryEditor::_add_library_validate(const String &p_name) {
void AnimationLibraryEditor::_add_library_confirm() {
if (adding_animation) {
String anim_name = add_library_name->get_text();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<AnimationLibrary> al = player->call("get_animation_library", adding_animation_to_library);
ERR_FAIL_COND(!al.is_valid());
@@ -111,7 +111,7 @@ void AnimationLibraryEditor::_add_library_confirm() {
} else {
String lib_name = add_library_name->get_text();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<AnimationLibrary> al;
al.instantiate();
@@ -211,7 +211,7 @@ void AnimationLibraryEditor::_file_popup_selected(int p_id) {
ald->add_animation(animation_name, animation);
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Make Animation Library Unique: %s"), lib_name));
undo_redo->add_do_method(player, "remove_animation_library", lib_name);
undo_redo->add_do_method(player, "add_animation_library", lib_name, ald);
@@ -280,7 +280,7 @@ void AnimationLibraryEditor::_file_popup_selected(int p_id) {
Ref<Animation> animd = anim->duplicate();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Make Animation Unique: %s"), anim_name));
undo_redo->add_do_method(al.ptr(), "remove_animation", anim_name);
undo_redo->add_do_method(al.ptr(), "add_animation", anim_name, animd);
@@ -328,7 +328,7 @@ void AnimationLibraryEditor::_load_file(String p_path) {
name = p_path.get_file().get_basename() + " " + itos(attempt);
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Add Animation Library: %s"), name));
undo_redo->add_do_method(player, "add_animation_library", name, al);
@@ -366,7 +366,7 @@ void AnimationLibraryEditor::_load_file(String p_path) {
name = p_path.get_file().get_basename() + " " + itos(attempt);
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Load Animation into Library: %s"), name));
undo_redo->add_do_method(al.ptr(), "add_animation", name, anim);
@@ -382,7 +382,7 @@ void AnimationLibraryEditor::_load_file(String p_path) {
EditorNode::get_singleton()->save_resource_in_path(al, p_path);
if (al->get_path() != prev_path) { // Save successful.
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Save Animation library to File: %s"), file_dialog_library));
undo_redo->add_do_method(al.ptr(), "set_path", al->get_path());
@@ -403,7 +403,7 @@ void AnimationLibraryEditor::_load_file(String p_path) {
String prev_path = anim->get_path();
EditorNode::get_singleton()->save_resource_in_path(anim, p_path);
if (anim->get_path() != prev_path) { // Save successful.
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Save Animation to File: %s"), file_dialog_animation));
undo_redo->add_do_method(anim.ptr(), "set_path", anim->get_path());
@@ -421,7 +421,7 @@ void AnimationLibraryEditor::_item_renamed() {
String text = ti->get_text(0);
String old_text = ti->get_metadata(0);
bool restore_text = false;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (String(text).contains("/") || String(text).contains(":") || String(text).contains(",") || String(text).contains("[")) {
restore_text = true;
@@ -535,7 +535,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
name = base_name + " (" + itos(attempt) + ")";
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Add Animation to Library: %s"), name));
undo_redo->add_do_method(al.ptr(), "add_animation", name, anim);
@@ -554,14 +554,14 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
file_popup->add_separator();
file_popup->add_item(TTR("Open in Inspector"), FILE_MENU_EDIT_LIBRARY);
Rect2 pos = tree->get_item_rect(p_item, 1, 0);
- Vector2 popup_pos = tree->get_screen_position() + pos.position + Vector2(0, pos.size.height);
+ Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height));
file_popup->popup(Rect2(popup_pos, Size2()));
file_dialog_animation = StringName();
file_dialog_library = lib_name;
} break;
case LIB_BUTTON_DELETE: {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Remove Animation Library: %s"), lib_name));
undo_redo->add_do_method(player, "remove_animation_library", lib_name);
undo_redo->add_undo_method(player, "add_animation_library", lib_name, al);
@@ -594,7 +594,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
file_popup->add_separator();
file_popup->add_item(TTR("Open in Inspector"), FILE_MENU_EDIT_ANIMATION);
Rect2 pos = tree->get_item_rect(p_item, 1, 0);
- Vector2 popup_pos = tree->get_screen_position() + pos.position + Vector2(0, pos.size.height);
+ Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height));
file_popup->popup(Rect2(popup_pos, Size2()));
file_dialog_animation = anim_name;
@@ -602,7 +602,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
} break;
case ANIM_BUTTON_DELETE: {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Remove Animation from Library: %s"), anim_name));
undo_redo->add_do_method(al.ptr(), "remove_animation", anim_name);
undo_redo->add_undo_method(al.ptr(), "add_animation", anim_name, anim);
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index ec3eb1a494..b33ad67f23 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -94,6 +94,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
// Need the last frame after it stopped.
frame->set_value(player->get_current_animation_position());
track_editor->set_anim_pos(player->get_current_animation_position());
+ stop->set_icon(stop_icon);
}
last_active = player->is_playing();
@@ -119,8 +120,15 @@ void AnimationPlayerEditor::_notification(int p_what) {
case NOTIFICATION_TRANSLATION_CHANGED:
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
case NOTIFICATION_THEME_CHANGED: {
- autoplay->set_icon(get_theme_icon(SNAME("AutoPlay"), SNAME("EditorIcons")));
+ stop_icon = get_theme_icon(SNAME("Stop"), SNAME("EditorIcons"));
+ pause_icon = get_theme_icon(SNAME("Pause"), SNAME("EditorIcons"));
+ if (player && player->is_playing()) {
+ stop->set_icon(pause_icon);
+ } else {
+ stop->set_icon(stop_icon);
+ }
+ autoplay->set_icon(get_theme_icon(SNAME("AutoPlay"), SNAME("EditorIcons")));
play->set_icon(get_theme_icon(SNAME("PlayStart"), SNAME("EditorIcons")));
play_from->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
play_bw->set_icon(get_theme_icon(SNAME("PlayStartBackwards"), SNAME("EditorIcons")));
@@ -137,7 +145,6 @@ void AnimationPlayerEditor::_notification(int p_what) {
autoplay_reset_img->blit_rect(reset_img, Rect2i(Point2i(), icon_size), Point2i(icon_size.x, 0));
autoplay_reset_icon = ImageTexture::create_from_image(autoplay_reset_img);
}
- stop->set_icon(get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
onion_toggle->set_icon(get_theme_icon(SNAME("Onion"), SNAME("EditorIcons")));
onion_skinning->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
@@ -170,7 +177,7 @@ void AnimationPlayerEditor::_autoplay_pressed() {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
String current = animation->get_item_text(animation->get_selected());
if (player->get_autoplay() == current) {
//unset
@@ -204,7 +211,7 @@ void AnimationPlayerEditor::_play_pressed() {
}
//unstop
- stop->set_pressed(false);
+ stop->set_icon(pause_icon);
}
void AnimationPlayerEditor::_play_from_pressed() {
@@ -221,7 +228,7 @@ void AnimationPlayerEditor::_play_from_pressed() {
}
//unstop
- stop->set_pressed(false);
+ stop->set_icon(pause_icon);
}
String AnimationPlayerEditor::_get_current() const {
@@ -238,11 +245,11 @@ void AnimationPlayerEditor::_play_bw_pressed() {
player->stop(); //so it won't blend with itself
}
ERR_FAIL_COND_EDMSG(!_validate_tracks(player->get_animation(current)), "Animation tracks may have any invalid key, abort playing.");
- player->play(current, -1, -1, true);
+ player->play_backwards(current);
}
//unstop
- stop->set_pressed(false);
+ stop->set_icon(pause_icon);
}
void AnimationPlayerEditor::_play_bw_from_pressed() {
@@ -255,11 +262,11 @@ void AnimationPlayerEditor::_play_bw_from_pressed() {
}
ERR_FAIL_COND_EDMSG(!_validate_tracks(player->get_animation(current)), "Animation tracks may have any invalid key, abort playing.");
player->seek(time);
- player->play(current, -1, -1, true);
+ player->play_backwards(current);
}
//unstop
- stop->set_pressed(false);
+ stop->set_icon(pause_icon);
}
void AnimationPlayerEditor::_stop_pressed() {
@@ -267,9 +274,16 @@ void AnimationPlayerEditor::_stop_pressed() {
return;
}
- player->stop(false);
- play->set_pressed(false);
- stop->set_pressed(true);
+ if (player->is_playing()) {
+ player->pause();
+ } else {
+ String current = _get_current();
+ player->stop();
+ player->set_assigned_animation(current);
+ frame->set_value(0);
+ track_editor->set_anim_pos(0);
+ }
+ stop->set_icon(stop_icon);
}
void AnimationPlayerEditor::_animation_selected(int p_which) {
@@ -310,7 +324,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) {
void AnimationPlayerEditor::_animation_new() {
int count = 1;
- String base = TTR("New Anim");
+ String base = "new_animation";
String current_library_name = "";
if (animation->has_selectable_items()) {
String current_animation_name = animation->get_item_text(animation->get_selected());
@@ -323,7 +337,7 @@ void AnimationPlayerEditor::_animation_new() {
while (true) {
String attempt = base;
if (count > 1) {
- attempt += " (" + itos(count) + ")";
+ attempt += vformat("_%d", count);
}
if (player->has_animation(attempt_prefix + attempt)) {
count++;
@@ -388,7 +402,7 @@ void AnimationPlayerEditor::_animation_remove_confirmed() {
if (current.contains("/")) {
current = current.get_slice("/", 1);
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Animation"));
if (player->get_autoplay() == current) {
undo_redo->add_do_method(player, "set_autoplay", "");
@@ -438,7 +452,9 @@ float AnimationPlayerEditor::_get_editor_step() const {
}
void AnimationPlayerEditor::_animation_name_edited() {
- player->stop();
+ if (player->is_playing()) {
+ player->stop();
+ }
String new_name = name->get_text();
if (!AnimationLibrary::is_valid_animation_name(new_name)) {
@@ -464,7 +480,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (name_dialog_op) {
case TOOL_RENAME_ANIM: {
String current = animation->get_item_text(animation->get_selected());
@@ -599,7 +615,7 @@ void AnimationPlayerEditor::_blend_editor_next_changed(const int p_idx) {
String current = animation->get_item_text(animation->get_selected());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Blend Next Changed"));
undo_redo->add_do_method(player, "animation_set_next", current, blend_editor.next->get_item_text(p_idx));
undo_redo->add_undo_method(player, "animation_set_next", current, player->animation_get_next(current));
@@ -686,7 +702,7 @@ void AnimationPlayerEditor::_blend_edited() {
float blend_time = selected->get_range(1);
float prev_blend_time = player->get_blend_time(current, to);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Blend Time"));
undo_redo->add_do_method(player, "set_blend_time", current, to, blend_time);
undo_redo->add_undo_method(player, "set_blend_time", current, to, prev_blend_time);
@@ -798,12 +814,9 @@ void AnimationPlayerEditor::_update_animation() {
updating = true;
if (player->is_playing()) {
- play->set_pressed(true);
- stop->set_pressed(false);
-
+ stop->set_icon(pause_icon);
} else {
- play->set_pressed(false);
- stop->set_pressed(true);
+ stop->set_icon(stop_icon);
}
scale->set_text(String::num(player->get_speed_scale(), 2));
@@ -1092,9 +1105,24 @@ void AnimationPlayerEditor::_animation_duplicate() {
return;
}
+ int count = 2;
String new_name = current;
- while (player->has_animation(new_name)) {
- new_name = new_name + " (copy)";
+ PackedStringArray split = new_name.split("_");
+ int last_index = split.size() - 1;
+ if (last_index > 0 && split[last_index].is_valid_int() && split[last_index].to_int() >= 0) {
+ count = split[last_index].to_int();
+ split.remove_at(last_index);
+ new_name = String("_").join(split);
+ }
+ while (true) {
+ String attempt = new_name;
+ attempt += vformat("_%d", count);
+ if (player->has_animation(attempt)) {
+ count++;
+ continue;
+ }
+ new_name = attempt;
+ break;
}
if (new_name.contains("/")) {
@@ -1155,7 +1183,7 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_set, bool
player->seek_delta(pos, pos - cpos);
} else {
- player->stop(true);
+ player->stop();
player->seek(pos, true);
}
}
@@ -1663,9 +1691,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
stop = memnew(Button);
stop->set_flat(true);
- stop->set_toggle_mode(true);
hb->add_child(stop);
- stop->set_tooltip_text(TTR("Stop animation playback. (S)"));
+ stop->set_tooltip_text(TTR("Pause/stop animation playback. (S)"));
play = memnew(Button);
play->set_flat(true);
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index 6c690c812c..327200506f 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -101,6 +101,8 @@ class AnimationPlayerEditor : public VBoxContainer {
OptionButton *library = nullptr;
Label *name_title = nullptr;
+ Ref<Texture2D> stop_icon;
+ Ref<Texture2D> pause_icon;
Ref<Texture2D> autoplay_icon;
Ref<Texture2D> reset_icon;
Ref<ImageTexture> autoplay_reset_icon;
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 4ea2f0c561..9632670658 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -246,7 +246,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
Ref<AnimationNode> an = state_machine->get_node(selected_node);
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Move Node"));
for (int i = 0; i < node_rects.size(); i++) {
@@ -337,7 +337,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
Ref<InputEventMouseMotion> mm = p_event;
// Pan window
- if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_MIDDLE) != MouseButton::NONE) {
+ if (mm.is_valid() && mm->get_button_mask().has_flag(MouseButtonMask::MIDDLE)) {
h_scroll->set_value(h_scroll->get_value() - mm->get_relative().x);
v_scroll->set_value(v_scroll->get_value() - mm->get_relative().y);
}
@@ -543,7 +543,7 @@ void AnimationNodeStateMachineEditor::_group_selected_nodes() {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action("Group");
// Move selected nodes to the new state machine
@@ -658,7 +658,7 @@ void AnimationNodeStateMachineEditor::_ungroup_selected_nodes() {
Vector<TransitionUR> transitions_ur;
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action("Ungroup");
// Move all child nodes to current state machine
@@ -935,7 +935,7 @@ void AnimationNodeStateMachineEditor::_stop_connecting() {
void AnimationNodeStateMachineEditor::_delete_selected() {
TreeItem *item = delete_tree->get_next_selected(nullptr);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
while (item) {
if (!updating) {
updating = true;
@@ -963,7 +963,7 @@ void AnimationNodeStateMachineEditor::_delete_all() {
selected_multi_transition = TransitionLine();
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action("Transition(s) Removed");
_erase_selected(true);
for (int i = 0; i < multi_transitions.size(); i++) {
@@ -1043,7 +1043,7 @@ void AnimationNodeStateMachineEditor::_add_menu_type(int p_index) {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Node and Transition"));
undo_redo->add_do_method(state_machine.ptr(), "add_node", name, node, add_node_pos);
undo_redo->add_undo_method(state_machine.ptr(), "remove_node", name);
@@ -1070,7 +1070,7 @@ void AnimationNodeStateMachineEditor::_add_animation_type(int p_index) {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Node and Transition"));
undo_redo->add_do_method(state_machine.ptr(), "add_node", name, anim, add_node_pos);
undo_redo->add_undo_method(state_machine.ptr(), "remove_node", name);
@@ -1100,7 +1100,7 @@ void AnimationNodeStateMachineEditor::_add_transition(const bool p_nested_action
tr->set_advance_mode(auto_advance->is_pressed() ? AnimationNodeStateMachineTransition::AdvanceMode::ADVANCE_MODE_AUTO : AnimationNodeStateMachineTransition::AdvanceMode::ADVANCE_MODE_ENABLED);
tr->set_switch_mode(AnimationNodeStateMachineTransition::SwitchMode(switch_mode->get_selected()));
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (!p_nested_action) {
updating = true;
undo_redo->create_action(TTR("Add Transition"));
@@ -1127,7 +1127,7 @@ void AnimationNodeStateMachineEditor::_add_transition(const bool p_nested_action
connecting = false;
}
-void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, const Vector2 &p_to, AnimationNodeStateMachineTransition::SwitchMode p_mode, bool p_enabled, bool p_selected, bool p_travel, bool p_auto_advance, bool p_multi_transitions) {
+void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, const Vector2 &p_to, AnimationNodeStateMachineTransition::SwitchMode p_mode, bool p_enabled, bool p_selected, bool p_travel, float p_fade_ratio, bool p_auto_advance, bool p_multi_transitions) {
Color linecolor = get_theme_color(SNAME("font_color"), SNAME("Label"));
Color icon_color(1, 1, 1);
Color accent = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
@@ -1138,7 +1138,7 @@ void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, co
accent.a *= 0.6;
}
- const Ref<Texture2D> icons[6] = {
+ const Ref<Texture2D> icons[] = {
get_theme_icon(SNAME("TransitionImmediateBig"), SNAME("EditorIcons")),
get_theme_icon(SNAME("TransitionSyncBig"), SNAME("EditorIcons")),
get_theme_icon(SNAME("TransitionEndBig"), SNAME("EditorIcons")),
@@ -1146,6 +1146,7 @@ void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, co
get_theme_icon(SNAME("TransitionSyncAutoBig"), SNAME("EditorIcons")),
get_theme_icon(SNAME("TransitionEndAutoBig"), SNAME("EditorIcons"))
};
+ const int ICON_COUNT = sizeof(icons) / sizeof(*icons);
if (p_selected) {
state_machine_draw->draw_line(p_from, p_to, accent, 6);
@@ -1153,12 +1154,18 @@ void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, co
if (p_travel) {
linecolor = accent;
- linecolor.set_hsv(1.0, linecolor.get_s(), linecolor.get_v());
}
state_machine_draw->draw_line(p_from, p_to, linecolor, 2);
- Ref<Texture2D> icon = icons[p_mode + (p_auto_advance ? 3 : 0)];
+ if (p_fade_ratio > 0.0) {
+ Color fade_linecolor = accent;
+ fade_linecolor.set_hsv(1.0, fade_linecolor.get_s(), fade_linecolor.get_v());
+ state_machine_draw->draw_line(p_from, p_from.lerp(p_to, p_fade_ratio), fade_linecolor, 2);
+ }
+ int icon_index = p_mode + (p_auto_advance ? ICON_COUNT / 2 : 0);
+ ERR_FAIL_COND(icon_index >= ICON_COUNT);
+ Ref<Texture2D> icon = icons[icon_index];
Transform2D xf;
xf.columns[0] = (p_to - p_from).normalized();
@@ -1237,7 +1244,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
if (playback.is_valid()) {
playing = playback->is_playing();
current = playback->get_current_node();
- blend_from = playback->get_blend_from_node();
+ blend_from = playback->get_fading_from_node();
travel_path = playback->get_travel_path();
}
@@ -1327,7 +1334,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
}
}
- _connection_draw(from, to, AnimationNodeStateMachineTransition::SwitchMode(switch_mode->get_selected()), true, false, false, false, false);
+ _connection_draw(from, to, AnimationNodeStateMachineTransition::SwitchMode(switch_mode->get_selected()), true, false, false, 0.0, false, false);
}
Ref<Texture2D> tr_reference_icon = get_theme_icon(SNAME("TransitionImmediateBig"), SNAME("EditorIcons"));
@@ -1357,6 +1364,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
tl.mode = tr->get_switch_mode();
tl.width = tr_bidi_offset;
tl.travel = false;
+ tl.fade_ratio = 0.0;
tl.hidden = false;
if (state_machine->has_local_transition(local_to, local_from)) { //offset if same exists
@@ -1378,6 +1386,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
if (blend_from == local_from && current == local_to) {
tl.travel = true;
+ tl.fade_ratio = MIN(1.0, fading_pos / fading_time);
}
if (travel_path.size()) {
@@ -1418,7 +1427,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
for (int i = 0; i < transition_lines.size(); i++) {
TransitionLine tl = transition_lines[i];
if (!tl.hidden) {
- _connection_draw(tl.from, tl.to, tl.mode, !tl.disabled, tl.selected, tl.travel, tl.auto_advance, !tl.multi_transitions.is_empty());
+ _connection_draw(tl.from, tl.to, tl.mode, !tl.disabled, tl.selected, tl.travel, tl.fade_ratio, tl.auto_advance, !tl.multi_transitions.is_empty());
}
}
@@ -1508,25 +1517,24 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
state_machine_play_pos->queue_redraw();
}
-void AnimationNodeStateMachineEditor::_state_machine_pos_draw() {
+void AnimationNodeStateMachineEditor::_state_machine_pos_draw_individual(String p_name, float p_ratio) {
AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
if (!tree) {
return;
}
Ref<AnimationNodeStateMachinePlayback> playback = tree->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
-
if (!playback.is_valid() || !playback->is_playing()) {
return;
}
- if (playback->get_current_node() == state_machine->start_node || playback->get_current_node() == state_machine->end_node) {
+ if (p_name == state_machine->start_node || p_name == state_machine->end_node || p_name.is_empty()) {
return;
}
int idx = -1;
for (int i = 0; i < node_rects.size(); i++) {
- if (node_rects[i].node_name == playback->get_current_node()) {
+ if (node_rects[i].node_name == p_name) {
idx = i;
break;
}
@@ -1550,10 +1558,7 @@ void AnimationNodeStateMachineEditor::_state_machine_pos_draw() {
}
to.y = from.y;
- float len = MAX(0.0001, current_length);
-
- float pos = CLAMP(play_pos, 0, len);
- float c = pos / len;
+ float c = p_ratio;
Color fg = get_theme_color(SNAME("font_color"), SNAME("Label"));
Color bg = fg;
bg.a *= 0.3;
@@ -1565,6 +1570,32 @@ void AnimationNodeStateMachineEditor::_state_machine_pos_draw() {
state_machine_play_pos->draw_line(from, to, fg, 2);
}
+void AnimationNodeStateMachineEditor::_state_machine_pos_draw_all() {
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
+ Ref<AnimationNodeStateMachinePlayback> playback = tree->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
+ if (!playback.is_valid() || !playback->is_playing()) {
+ return;
+ }
+
+ {
+ float len = MAX(0.0001, current_length);
+ float pos = CLAMP(current_play_pos, 0, len);
+ float c = pos / len;
+ _state_machine_pos_draw_individual(playback->get_current_node(), c);
+ }
+
+ {
+ float len = MAX(0.0001, fade_from_length);
+ float pos = CLAMP(fade_from_current_play_pos, 0, len);
+ float c = pos / len;
+ _state_machine_pos_draw_individual(playback->get_fading_from_node(), c);
+ }
+}
+
void AnimationNodeStateMachineEditor::_update_graph() {
if (updating) {
return;
@@ -1687,17 +1718,28 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
Vector<StringName> tp;
bool is_playing = false;
StringName current_node;
- StringName blend_from_node;
- play_pos = 0;
+ StringName fading_from_node;
+
+ current_play_pos = 0;
current_length = 0;
+ fade_from_current_play_pos = 0;
+ fade_from_length = 0;
+
+ fading_time = 0;
+ fading_pos = 0;
+
if (playback.is_valid()) {
tp = playback->get_travel_path();
is_playing = playback->is_playing();
current_node = playback->get_current_node();
- blend_from_node = playback->get_blend_from_node();
- play_pos = playback->get_current_play_pos();
+ fading_from_node = playback->get_fading_from_node();
+ current_play_pos = playback->get_current_play_pos();
current_length = playback->get_current_length();
+ fade_from_current_play_pos = playback->get_fade_from_play_pos();
+ fade_from_length = playback->get_fade_from_length();
+ fading_time = playback->get_fading_time();
+ fading_pos = playback->get_fading_pos();
}
{
@@ -1714,12 +1756,19 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
}
//redraw if travel state changed
- if (!same_travel_path || last_active != is_playing || last_current_node != current_node || last_blend_from_node != blend_from_node) {
+ if (!same_travel_path ||
+ last_active != is_playing ||
+ last_current_node != current_node ||
+ last_fading_from_node != fading_from_node ||
+ last_fading_time != fading_time ||
+ last_fading_pos != fading_pos) {
state_machine_draw->queue_redraw();
last_travel_path = tp;
last_current_node = current_node;
last_active = is_playing;
- last_blend_from_node = blend_from_node;
+ last_fading_from_node = fading_from_node;
+ last_fading_time = fading_time;
+ last_fading_pos = fading_pos;
state_machine_play_pos->queue_redraw();
}
@@ -1737,14 +1786,15 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
// when current_node is a state machine, use playback of current_node to set play_pos
if (current_node_playback.is_valid()) {
- play_pos = current_node_playback->get_current_play_pos();
+ current_play_pos = current_node_playback->get_current_play_pos();
current_length = current_node_playback->get_current_length();
}
}
}
- if (last_play_pos != play_pos) {
- last_play_pos = play_pos;
+ if (last_play_pos != current_play_pos || fade_from_last_play_pos != fade_from_current_play_pos) {
+ last_play_pos = current_play_pos;
+ fade_from_last_play_pos = fade_from_current_play_pos;
state_machine_play_pos->queue_redraw();
}
} break;
@@ -1778,7 +1828,7 @@ void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) {
}
updating = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Node Renamed"));
undo_redo->add_do_method(state_machine.ptr(), "rename_node", prev_name, name);
undo_redo->add_undo_method(state_machine.ptr(), "rename_node", name, prev_name);
@@ -1813,7 +1863,7 @@ void AnimationNodeStateMachineEditor::_erase_selected(const bool p_nested_action
if (!p_nested_action) {
updating = true;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Node Removed"));
for (int i = 0; i < node_rects.size(); i++) {
@@ -1882,7 +1932,7 @@ void AnimationNodeStateMachineEditor::_erase_selected(const bool p_nested_action
if (!p_nested_action) {
updating = true;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Transition Removed"));
undo_redo->add_do_method(state_machine.ptr(), "remove_transition", selected_transition_from, selected_transition_to);
undo_redo->add_undo_method(state_machine.ptr(), "add_transition", selected_transition_from, selected_transition_to, tr);
@@ -2048,7 +2098,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
state_machine_draw->add_child(state_machine_play_pos);
state_machine_play_pos->set_mouse_filter(MOUSE_FILTER_PASS); //pass all to parent
state_machine_play_pos->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
- state_machine_play_pos->connect("draw", callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_pos_draw));
+ state_machine_play_pos->connect("draw", callable_mp(this, &AnimationNodeStateMachineEditor::_state_machine_pos_draw_all));
v_scroll = memnew(VScrollBar);
state_machine_draw->add_child(v_scroll);
diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h
index 46fe13ccc1..66338c820e 100644
--- a/editor/plugins/animation_state_machine_editor.h
+++ b/editor/plugins/animation_state_machine_editor.h
@@ -85,9 +85,12 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
static AnimationNodeStateMachineEditor *singleton;
void _state_machine_gui_input(const Ref<InputEvent> &p_event);
- void _connection_draw(const Vector2 &p_from, const Vector2 &p_to, AnimationNodeStateMachineTransition::SwitchMode p_mode, bool p_enabled, bool p_selected, bool p_travel, bool p_auto_advance, bool p_multi_transitions);
+ void _connection_draw(const Vector2 &p_from, const Vector2 &p_to, AnimationNodeStateMachineTransition::SwitchMode p_mode, bool p_enabled, bool p_selected, bool p_travel, float p_fade_ratio, bool p_auto_advance, bool p_multi_transitions);
+
void _state_machine_draw();
- void _state_machine_pos_draw();
+
+ void _state_machine_pos_draw_individual(String p_name, float p_ratio);
+ void _state_machine_pos_draw_all();
void _update_graph();
@@ -150,6 +153,7 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
float width = 0;
bool selected;
bool travel;
+ float fade_ratio;
bool hidden;
int transition_index;
Vector<TransitionLine> multi_transitions;
@@ -204,13 +208,23 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
void _delete_tree_draw();
bool last_active = false;
- StringName last_blend_from_node;
+ StringName last_fading_from_node;
StringName last_current_node;
Vector<StringName> last_travel_path;
+
+ float fade_from_last_play_pos = 0.0f;
+ float fade_from_current_play_pos = 0.0f;
+ float fade_from_length = 0.0f;
+
float last_play_pos = 0.0f;
- float play_pos = 0.0f;
+ float current_play_pos = 0.0f;
float current_length = 0.0f;
+ float last_fading_time = 0.0f;
+ float last_fading_pos = 0.0f;
+ float fading_time = 0.0f;
+ float fading_pos = 0.0f;
+
float error_time = 0.0f;
String error_text;
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 720deb0b92..ab46e8f04a 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -65,13 +65,14 @@ void AnimationTreeEditor::edit(AnimationTree *p_tree) {
tree = p_tree;
Vector<String> path;
- if (tree && tree->has_meta("_tree_edit_path")) {
- path = tree->get_meta("_tree_edit_path");
- } else {
- current_root = ObjectID();
+ if (tree) {
+ if (tree->has_meta("_tree_edit_path")) {
+ path = tree->get_meta("_tree_edit_path");
+ } else {
+ current_root = ObjectID();
+ }
+ edit_path(path);
}
-
- edit_path(path);
}
void AnimationTreeEditor::_node_removed(Node *p_node) {
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index c2dac83416..2639765283 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -107,7 +107,7 @@ void EditorAssetLibraryItem::_bind_methods() {
EditorAssetLibraryItem::EditorAssetLibraryItem() {
Ref<StyleBoxEmpty> border;
border.instantiate();
- border->set_default_margin_all(5 * EDSCALE);
+ border->set_content_margin_all(5 * EDSCALE);
add_theme_style_override("panel", border);
HBoxContainer *hb = memnew(HBoxContainer);
@@ -293,7 +293,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
preview = memnew(TextureRect);
previews_vbox->add_child(preview);
- preview->set_ignore_texture_size(true);
+ preview->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
preview->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
preview->set_custom_minimum_size(Size2(640 * EDSCALE, 345 * EDSCALE));
preview->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -705,6 +705,12 @@ const char *EditorAssetLibrary::support_key[SUPPORT_MAX] = {
"testing",
};
+const char *EditorAssetLibrary::support_text[SUPPORT_MAX] = {
+ TTRC("Official"),
+ TTRC("Community"),
+ TTRC("Testing"),
+};
+
void EditorAssetLibrary::_select_author(int p_id) {
// Open author window.
}
@@ -1242,15 +1248,28 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
library_vb->add_child(asset_bottom_page);
if (result.is_empty()) {
+ String support_list;
+ for (int i = 0; i < SUPPORT_MAX; i++) {
+ if (support->get_popup()->is_item_checked(i)) {
+ if (!support_list.is_empty()) {
+ support_list += ", ";
+ }
+ support_list += TTRGET(support_text[i]);
+ }
+ }
+ if (support_list.is_empty()) {
+ support_list = "-";
+ }
+
if (!filter->get_text().is_empty()) {
library_info->set_text(
- vformat(TTR("No results for \"%s\"."), filter->get_text()));
+ vformat(TTR("No results for \"%s\" for support level(s): %s."), filter->get_text(), support_list));
} else {
// No results, even though the user didn't search for anything specific.
// This is typically because the version number changed recently
// and no assets compatible with the new version have been published yet.
library_info->set_text(
- vformat(TTR("No results compatible with %s %s."), String(VERSION_SHORT_NAME).capitalize(), String(VERSION_BRANCH)));
+ vformat(TTR("No results compatible with %s %s for support level(s): %s.\nCheck the enabled support levels using the 'Support' button in the top-right corner."), String(VERSION_SHORT_NAME).capitalize(), String(VERSION_BRANCH), support_list));
}
library_info->show();
} else {
@@ -1510,9 +1529,9 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
search_hb2->add_child(support);
support->set_text(TTR("Support"));
support->get_popup()->set_hide_on_checkable_item_selection(false);
- support->get_popup()->add_check_item(TTR("Official"), SUPPORT_OFFICIAL);
- support->get_popup()->add_check_item(TTR("Community"), SUPPORT_COMMUNITY);
- support->get_popup()->add_check_item(TTR("Testing"), SUPPORT_TESTING);
+ support->get_popup()->add_check_item(TTRGET(support_text[SUPPORT_OFFICIAL]), SUPPORT_OFFICIAL);
+ support->get_popup()->add_check_item(TTRGET(support_text[SUPPORT_COMMUNITY]), SUPPORT_COMMUNITY);
+ support->get_popup()->add_check_item(TTRGET(support_text[SUPPORT_TESTING]), SUPPORT_TESTING);
support->get_popup()->set_item_checked(SUPPORT_OFFICIAL, true);
support->get_popup()->set_item_checked(SUPPORT_COMMUNITY, true);
support->get_popup()->connect("id_pressed", callable_mp(this, &EditorAssetLibrary::_support_toggled));
@@ -1530,7 +1549,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
Ref<StyleBoxEmpty> border2;
border2.instantiate();
- border2->set_default_margin_individual(15 * EDSCALE, 15 * EDSCALE, 35 * EDSCALE, 15 * EDSCALE);
+ border2->set_content_margin_individual(15 * EDSCALE, 15 * EDSCALE, 35 * EDSCALE, 15 * EDSCALE);
PanelContainer *library_vb_border = memnew(PanelContainer);
library_scroll->add_child(library_vb_border);
diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h
index 0667f474da..8c74da0e2a 100644
--- a/editor/plugins/asset_library_editor_plugin.h
+++ b/editor/plugins/asset_library_editor_plugin.h
@@ -234,6 +234,7 @@ class EditorAssetLibrary : public PanelContainer {
static const char *sort_key[SORT_MAX];
static const char *sort_text[SORT_MAX];
static const char *support_key[SUPPORT_MAX];
+ static const char *support_text[SUPPORT_MAX];
///MainListing
diff --git a/editor/plugins/audio_stream_randomizer_editor_plugin.cpp b/editor/plugins/audio_stream_randomizer_editor_plugin.cpp
index acd3271f97..bb3b8a124e 100644
--- a/editor/plugins/audio_stream_randomizer_editor_plugin.cpp
+++ b/editor/plugins/audio_stream_randomizer_editor_plugin.cpp
@@ -44,8 +44,8 @@ void AudioStreamRandomizerEditorPlugin::make_visible(bool p_visible) {
}
void AudioStreamRandomizerEditorPlugin::_move_stream_array_element(Object *p_undo_redo, Object *p_edited, String p_array_prefix, int p_from_index, int p_to_pos) {
- Ref<EditorUndoRedoManager> undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
- ERR_FAIL_COND(undo_redo_man.is_null());
+ EditorUndoRedoManager *undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
+ ERR_FAIL_NULL(undo_redo_man);
AudioStreamRandomizer *randomizer = Object::cast_to<AudioStreamRandomizer>(p_edited);
if (!randomizer) {
diff --git a/editor/plugins/bit_map_editor_plugin.cpp b/editor/plugins/bit_map_editor_plugin.cpp
index 4f82aaf071..30fc60b0e0 100644
--- a/editor/plugins/bit_map_editor_plugin.cpp
+++ b/editor/plugins/bit_map_editor_plugin.cpp
@@ -53,7 +53,7 @@ BitMapEditor::BitMapEditor() {
// Reduce extra padding on top and bottom of size label.
Ref<StyleBoxEmpty> stylebox;
stylebox.instantiate();
- stylebox->set_default_margin(SIDE_RIGHT, 4 * EDSCALE);
+ stylebox->set_content_margin(SIDE_RIGHT, 4 * EDSCALE);
size_label->add_theme_style_override("normal", stylebox);
}
diff --git a/editor/plugins/bone_map_editor_plugin.cpp b/editor/plugins/bone_map_editor_plugin.cpp
index dfcf9256c4..3d94dd13a7 100644
--- a/editor/plugins/bone_map_editor_plugin.cpp
+++ b/editor/plugins/bone_map_editor_plugin.cpp
@@ -316,7 +316,7 @@ void BoneMapper::create_editor() {
profile_texture = memnew(TextureRect);
profile_texture->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
- profile_texture->set_ignore_texture_size(true);
+ profile_texture->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
profile_texture->set_h_size_flags(Control::SIZE_FILL);
profile_texture->set_v_size_flags(Control::SIZE_FILL);
bone_mapper_field->add_child(profile_texture);
@@ -566,9 +566,9 @@ int BoneMapper::search_bone_by_name(Skeleton3D *p_skeleton, Vector<String> p_pic
if (hit_list.size() > 0) {
shortest = hit_list[0];
- for (uint32_t i = 0; i < hit_list.size(); i++) {
- if (hit_list[i].length() < shortest.length()) {
- shortest = hit_list[i]; // Prioritize parent.
+ for (const String &hit : hit_list) {
+ if (hit.length() < shortest.length()) {
+ shortest = hit; // Prioritize parent.
}
}
}
@@ -592,9 +592,9 @@ int BoneMapper::search_bone_by_name(Skeleton3D *p_skeleton, Vector<String> p_pic
if (hit_list.size() > 0) {
shortest = hit_list[0];
- for (uint32_t i = 0; i < hit_list.size(); i++) {
- if (hit_list[i].length() <= shortest.length()) {
- shortest = hit_list[i]; // Prioritize parent.
+ for (const String &hit : hit_list) {
+ if (hit.length() <= shortest.length()) {
+ shortest = hit; // Prioritize parent.
}
}
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 24e4aeb358..0f9ce89f02 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -246,7 +246,7 @@ public:
}
};
-bool CanvasItemEditor::_is_node_locked(const Node *p_node) {
+bool CanvasItemEditor::_is_node_locked(const Node *p_node) const {
return p_node->get_meta("_edit_lock_", false);
}
@@ -770,7 +770,7 @@ bool CanvasItemEditor::_select_click_on_item(CanvasItem *item, Point2 p_click_po
return still_selected;
}
-List<CanvasItem *> CanvasItemEditor::_get_edited_canvas_items(bool retrieve_locked, bool remove_canvas_item_if_parent_in_selection) {
+List<CanvasItem *> CanvasItemEditor::_get_edited_canvas_items(bool retrieve_locked, bool remove_canvas_item_if_parent_in_selection) const {
List<CanvasItem *> selection;
for (const KeyValue<Node *, Object *> &E : editor_selection->get_selection()) {
CanvasItem *ci = Object::cast_to<CanvasItem>(E.key);
@@ -868,7 +868,7 @@ void CanvasItemEditor::_commit_canvas_item_state(List<CanvasItem *> p_canvas_ite
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(action_name);
for (CanvasItem *ci : modified_canvas_items) {
CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci);
@@ -933,7 +933,7 @@ void CanvasItemEditor::_add_node_pressed(int p_result) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Move Node(s) to Position"));
for (Node *node : nodes_to_move) {
CanvasItem *ci = Object::cast_to<CanvasItem>(node);
@@ -1022,7 +1022,7 @@ void CanvasItemEditor::_on_grid_menu_id_pressed(int p_id) {
}
bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_event) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<InputEventMouseButton> b = p_event;
Ref<InputEventMouseMotion> m = p_event;
@@ -1226,7 +1226,6 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo
bool panner_active = panner->gui_input(p_event, warped_panning ? viewport->get_global_rect() : Rect2());
if (panner->is_panning() != pan_pressed) {
pan_pressed = panner->is_panning();
- _update_cursor();
}
if (panner_active) {
@@ -1260,57 +1259,25 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo
}
}
- Ref<InputEventMagnifyGesture> magnify_gesture = p_event;
- if (magnify_gesture.is_valid() && !p_already_accepted) {
- // Zoom gesture
- _zoom_on_position(zoom * magnify_gesture->get_factor(), magnify_gesture->get_position());
- return true;
- }
-
- Ref<InputEventPanGesture> pan_gesture = p_event;
- if (pan_gesture.is_valid() && !p_already_accepted) {
- // If ctrl key pressed, then zoom instead of pan.
- if (pan_gesture->is_ctrl_pressed()) {
- const real_t factor = pan_gesture->get_delta().y;
-
- zoom_widget->set_zoom_by_increments(1);
- if (factor != 1.f) {
- zoom_widget->set_zoom(zoom * ((zoom_widget->get_zoom() / zoom - 1.f) * factor + 1.f));
- }
- _zoom_on_position(zoom_widget->get_zoom(), pan_gesture->get_position());
-
- return true;
- }
-
- // Pan gesture
- const Vector2 delta = (pan_speed / zoom) * pan_gesture->get_delta();
- view_offset.x += delta.x;
- view_offset.y += delta.y;
- update_viewport();
- return true;
- }
-
return false;
}
-void CanvasItemEditor::_scroll_callback(Vector2 p_scroll_vec, bool p_alt) {
- _pan_callback(-p_scroll_vec * pan_speed);
-}
-
-void CanvasItemEditor::_pan_callback(Vector2 p_scroll_vec) {
+void CanvasItemEditor::_pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event) {
view_offset.x -= p_scroll_vec.x / zoom;
view_offset.y -= p_scroll_vec.y / zoom;
update_viewport();
}
-void CanvasItemEditor::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) {
- int scroll_sign = (int)SIGN(p_scroll_vec.y);
- // Inverted so that scrolling up (-1) zooms in, scrolling down (+1) zooms out.
- zoom_widget->set_zoom_by_increments(-scroll_sign, p_alt);
- if (!Math::is_equal_approx(ABS(p_scroll_vec.y), (real_t)1.0)) {
- // Handle high-precision (analog) scrolling.
- zoom_widget->set_zoom(zoom * ((zoom_widget->get_zoom() / zoom - 1.f) * ABS(p_scroll_vec.y) + 1.f));
+void CanvasItemEditor::_zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event) {
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid()) {
+ // Special behvior for scroll events, as the zoom_by_increment method can smartly end up on powers of two.
+ int increment = p_zoom_factor > 1.0 ? 1 : -1;
+ zoom_widget->set_zoom_by_increments(increment, mb->is_alt_pressed());
+ } else {
+ zoom_widget->set_zoom(zoom_widget->get_zoom() * p_zoom_factor);
}
+
_zoom_on_position(zoom_widget->get_zoom(), p_origin);
}
@@ -1322,7 +1289,7 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) {
// Drag the pivot (in pivot mode / with V key)
if (drag_type == DRAG_NONE) {
if ((b.is_valid() && b->is_pressed() && b->get_button_index() == MouseButton::LEFT && tool == TOOL_EDIT_PIVOT) ||
- (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == Key::V && tool == TOOL_SELECT && k->get_modifiers_mask() == Key::NONE)) {
+ (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == Key::V && tool == TOOL_SELECT && k->get_modifiers_mask().is_empty())) {
List<CanvasItem *> selection = _get_edited_canvas_items();
// Filters the selection with nodes that allow setting the pivot
@@ -1850,7 +1817,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) {
// Drag resize handles
if (drag_type == DRAG_NONE) {
- if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && ((b->is_alt_pressed() && b->is_ctrl_pressed()) || tool == TOOL_SCALE)) {
+ if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && ((b->is_alt_pressed() && b->is_command_or_control_pressed()) || tool == TOOL_SCALE)) {
List<CanvasItem *> selection = _get_edited_canvas_items();
if (selection.size() == 1) {
CanvasItem *ci = selection[0];
@@ -1897,7 +1864,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) {
Transform2D simple_xform = (viewport->get_transform() * unscaled_transform).affine_inverse() * transform;
bool uniform = m->is_shift_pressed();
- bool is_ctrl = Input::get_singleton()->is_key_pressed(Key::CTRL);
+ bool is_ctrl = m->is_ctrl_pressed();
Point2 drag_from_local = simple_xform.xform(drag_from);
Point2 drag_to_local = simple_xform.xform(drag_to);
@@ -1989,7 +1956,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
if (drag_type == DRAG_NONE) {
//Start moving the nodes
if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed()) {
- if ((b->is_alt_pressed() && !b->is_ctrl_pressed()) || tool == TOOL_MOVE) {
+ if ((b->is_alt_pressed() && !b->is_command_or_control_pressed()) || tool == TOOL_MOVE) {
List<CanvasItem *> selection = _get_edited_canvas_items();
drag_selection.clear();
@@ -2570,8 +2537,10 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
// Handles the mouse hovering
_gui_input_hover(p_event);
- // Change the cursor
- _update_cursor();
+ if (mb.is_valid()) {
+ // Update the default cursor.
+ _update_cursor();
+ }
// Grab focus
if (!viewport->has_focus() && (!get_viewport()->gui_get_focus_owner() || !get_viewport()->gui_get_focus_owner()->is_text_field())) {
@@ -2580,6 +2549,31 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
}
void CanvasItemEditor::_update_cursor() {
+ // Choose the correct default cursor.
+ CursorShape c = CURSOR_ARROW;
+ switch (tool) {
+ case TOOL_MOVE:
+ c = CURSOR_MOVE;
+ break;
+ case TOOL_EDIT_PIVOT:
+ c = CURSOR_CROSS;
+ break;
+ case TOOL_PAN:
+ c = CURSOR_DRAG;
+ break;
+ case TOOL_RULER:
+ c = CURSOR_CROSS;
+ break;
+ default:
+ break;
+ }
+ if (pan_pressed) {
+ c = CURSOR_DRAG;
+ }
+ set_default_cursor_shape(c);
+}
+
+Control::CursorShape CanvasItemEditor::get_cursor_shape(const Point2 &p_pos) const {
// Compute an eventual rotation of the cursor
const CursorShape rotation_array[4] = { CURSOR_HSIZE, CURSOR_BDIAGSIZE, CURSOR_VSIZE, CURSOR_FDIAGSIZE };
int rotation_array_index = 0;
@@ -2601,26 +2595,8 @@ void CanvasItemEditor::_update_cursor() {
}
// Choose the correct cursor
- CursorShape c = CURSOR_ARROW;
+ CursorShape c = get_default_cursor_shape();
switch (drag_type) {
- case DRAG_NONE:
- switch (tool) {
- case TOOL_MOVE:
- c = CURSOR_MOVE;
- break;
- case TOOL_EDIT_PIVOT:
- c = CURSOR_CROSS;
- break;
- case TOOL_PAN:
- c = CURSOR_DRAG;
- break;
- case TOOL_RULER:
- c = CURSOR_CROSS;
- break;
- default:
- break;
- }
- break;
case DRAG_LEFT:
case DRAG_RIGHT:
c = rotation_array[rotation_array_index];
@@ -2662,16 +2638,7 @@ void CanvasItemEditor::_update_cursor() {
if (pan_pressed) {
c = CURSOR_DRAG;
}
-
- if (c != viewport->get_default_cursor_shape()) {
- viewport->set_default_cursor_shape(c);
-
- // Force refresh cursor if it's over the viewport.
- if (viewport->get_global_rect().has_point(get_global_mouse_position())) {
- DisplayServer::CursorShape ds_cursor_shape = (DisplayServer::CursorShape)viewport->get_default_cursor_shape();
- DisplayServer::get_singleton()->cursor_set_shape(ds_cursor_shape);
- }
- }
+ return c;
}
void CanvasItemEditor::_draw_text_at_position(Point2 p_position, String p_string, Side p_side) {
@@ -3418,7 +3385,7 @@ void CanvasItemEditor::_draw_selection() {
}
// Draw the move handles
- bool is_ctrl = Input::get_singleton()->is_key_pressed(Key::CTRL);
+ bool is_ctrl = Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL);
bool is_alt = Input::get_singleton()->is_key_pressed(Key::ALT);
if (tool == TOOL_MOVE && show_transformation_gizmos) {
if (_is_node_movable(ci)) {
@@ -3869,7 +3836,7 @@ void CanvasItemEditor::_update_editor_settings() {
context_menu_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("ContextualToolbar"), SNAME("EditorStyles")));
panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/2d_editor_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
- pan_speed = int(EDITOR_GET("editors/panning/2d_editor_pan_speed"));
+ panner->set_scroll_speed(EDITOR_GET("editors/panning/2d_editor_pan_speed"));
warped_panning = bool(EDITOR_GET("editors/panning/warped_mouse_panning"));
}
@@ -3958,8 +3925,8 @@ void CanvasItemEditor::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
select_sb->set_texture(get_theme_icon(SNAME("EditorRect2D"), SNAME("EditorIcons")));
- select_sb->set_margin_size_all(4);
- select_sb->set_default_margin_all(4);
+ select_sb->set_texture_margin_all(4);
+ select_sb->set_content_margin_all(4);
AnimationPlayerEditor::get_singleton()->get_track_editor()->connect("visibility_changed", callable_mp(this, &CanvasItemEditor::_keying_changed));
_keying_changed();
@@ -3990,6 +3957,10 @@ void CanvasItemEditor::_selection_changed() {
}
void CanvasItemEditor::edit(CanvasItem *p_canvas_item) {
+ if (!p_canvas_item) {
+ return;
+ }
+
Array selection = editor_selection->get_selected_nodes();
if (selection.size() != 1 || Object::cast_to<Node>(selection[0]) != p_canvas_item) {
_reset_drag();
@@ -4263,7 +4234,7 @@ void CanvasItemEditor::_update_override_camera_button(bool p_game_running) {
}
void CanvasItemEditor::_popup_callback(int p_op) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
last_option = MenuOption(p_op);
switch (p_op) {
case SHOW_ORIGIN: {
@@ -4370,8 +4341,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
show_rulers = !show_rulers;
int idx = view_menu->get_popup()->get_item_index(SHOW_RULERS);
view_menu->get_popup()->set_item_checked(idx, show_rulers);
- _update_scrollbars();
- viewport->queue_redraw();
+ update_viewport();
} break;
case SHOW_GUIDES: {
show_guides = !show_guides;
@@ -4683,25 +4653,18 @@ void CanvasItemEditor::_focus_selection(int p_op) {
} else {
rect = rect.merge(canvas_item_rect);
}
- };
-
- if (p_op == VIEW_CENTER_TO_SELECTION) {
- center = rect.get_center();
- Vector2 offset = viewport->get_size() / 2 - EditorNode::get_singleton()->get_scene_root()->get_global_canvas_transform().xform(center);
- view_offset -= (offset / zoom).round();
- update_viewport();
-
- } else { // VIEW_FRAME_TO_SELECTION
+ }
- if (rect.size.x > CMP_EPSILON && rect.size.y > CMP_EPSILON) {
- real_t scale_x = viewport->get_size().x / rect.size.x;
- real_t scale_y = viewport->get_size().y / rect.size.y;
- zoom = scale_x < scale_y ? scale_x : scale_y;
- zoom *= 0.90;
- viewport->queue_redraw();
- zoom_widget->set_zoom(zoom);
- call_deferred(SNAME("_popup_callback"), VIEW_CENTER_TO_SELECTION);
- }
+ if (p_op == VIEW_FRAME_TO_SELECTION && rect.size.x > CMP_EPSILON && rect.size.y > CMP_EPSILON) {
+ real_t scale_x = viewport->get_size().x / rect.size.x;
+ real_t scale_y = viewport->get_size().y / rect.size.y;
+ zoom = scale_x < scale_y ? scale_x : scale_y;
+ zoom *= 0.90;
+ zoom_widget->set_zoom(zoom);
+ viewport->queue_redraw(); // Redraw to update the global canvas transform after zoom changes.
+ call_deferred(SNAME("center_at"), rect.get_center()); // Defer because the updated transform is needed.
+ } else {
+ center_at(rect.get_center());
}
}
@@ -4715,6 +4678,7 @@ void CanvasItemEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_state"), &CanvasItemEditor::set_state);
ClassDB::bind_method(D_METHOD("update_viewport"), &CanvasItemEditor::update_viewport);
+ ClassDB::bind_method(D_METHOD("center_at", "position"), &CanvasItemEditor::center_at);
ClassDB::bind_method("_set_owner_for_node_and_children", &CanvasItemEditor::_set_owner_for_node_and_children);
@@ -4961,6 +4925,12 @@ void CanvasItemEditor::focus_selection() {
_focus_selection(VIEW_CENTER_TO_SELECTION);
}
+void CanvasItemEditor::center_at(const Point2 &p_pos) {
+ Vector2 offset = viewport->get_size() / 2 - EditorNode::get_singleton()->get_scene_root()->get_global_canvas_transform().xform(p_pos);
+ view_offset -= (offset / zoom).round();
+ update_viewport();
+}
+
CanvasItemEditor::CanvasItemEditor() {
zoom = 1.0 / MAX(1, EDSCALE);
view_offset = Point2(-150 - RULER_WIDTH, -95 - RULER_WIDTH);
@@ -5057,7 +5027,7 @@ CanvasItemEditor::CanvasItemEditor() {
zoom_widget->connect("zoom_changed", callable_mp(this, &CanvasItemEditor::_update_zoom));
panner.instantiate();
- panner->set_callbacks(callable_mp(this, &CanvasItemEditor::_scroll_callback), callable_mp(this, &CanvasItemEditor::_pan_callback), callable_mp(this, &CanvasItemEditor::_zoom_callback));
+ panner->set_callbacks(callable_mp(this, &CanvasItemEditor::_pan_callback), callable_mp(this, &CanvasItemEditor::_zoom_callback));
viewport = memnew(CanvasItemEditorViewport(this));
viewport_scrollable->add_child(viewport);
@@ -5431,11 +5401,13 @@ void CanvasItemEditorPlugin::make_visible(bool p_visible) {
canvas_item_editor->show();
canvas_item_editor->set_physics_process(true);
RenderingServer::get_singleton()->viewport_set_disable_2d(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), false);
+ RenderingServer::get_singleton()->viewport_set_environment_mode(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), RS::VIEWPORT_ENVIRONMENT_ENABLED);
} else {
canvas_item_editor->hide();
canvas_item_editor->set_physics_process(false);
RenderingServer::get_singleton()->viewport_set_disable_2d(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), true);
+ RenderingServer::get_singleton()->viewport_set_environment_mode(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), RS::VIEWPORT_ENVIRONMENT_DISABLED);
}
}
@@ -5571,7 +5543,7 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &
String name = path.get_file().get_basename();
child->set_name(Node::adjust_name_casing(name));
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<Texture2D> texture = ResourceCache::get_ref(path);
if (parent) {
@@ -5650,7 +5622,7 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path));
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(parent, "add_child", instantiated_scene, true);
undo_redo->add_do_method(instantiated_scene, "set_owner", edited_scene);
undo_redo->add_do_reference(instantiated_scene);
@@ -5691,7 +5663,7 @@ void CanvasItemEditorViewport::_perform_drop_data() {
Vector<String> error_files;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Create Node"));
for (int i = 0; i < selected_files.size(); i++) {
@@ -5926,7 +5898,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(CanvasItemEditor *p_canvas_it
EditorNode::get_singleton()->get_gui_base()->add_child(selector);
selector->set_title(TTR("Change Default Type"));
selector->connect("confirmed", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_confirmed));
- selector->connect("cancelled", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_closed));
+ selector->connect("canceled", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_closed));
VBoxContainer *vbc = memnew(VBoxContainer);
selector->add_child(vbc);
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 8f02f02c32..ebe87a56f7 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -363,12 +363,10 @@ private:
Ref<ViewPanner> panner;
bool warped_panning = true;
- int pan_speed = 20;
- void _scroll_callback(Vector2 p_scroll_vec, bool p_alt);
- void _pan_callback(Vector2 p_scroll_vec);
- void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt);
+ void _pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event);
+ void _zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event);
- bool _is_node_locked(const Node *p_node);
+ bool _is_node_locked(const Node *p_node) const;
bool _is_node_movable(const Node *p_node, bool p_popup_warning = false);
void _find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, Vector<_SelectResult> &r_items, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D());
void _get_canvas_items_at_pos(const Point2 &p_pos, Vector<_SelectResult> &r_items, bool p_allow_locked = false);
@@ -402,7 +400,7 @@ private:
void _prepare_grid_menu();
void _on_grid_menu_id_pressed(int p_id);
- List<CanvasItem *> _get_edited_canvas_items(bool retrieve_locked = false, bool remove_canvas_item_if_parent_in_selection = true);
+ List<CanvasItem *> _get_edited_canvas_items(bool retrieve_locked = false, bool remove_canvas_item_if_parent_in_selection = true) const;
Rect2 _get_encompassing_rect_from_list(List<CanvasItem *> p_list);
void _expand_encompassing_rect_using_children(Rect2 &r_rect, const Node *p_node, bool &r_first, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D(), bool include_locked_nodes = true);
Rect2 _get_encompassing_rect(const Node *p_node);
@@ -550,6 +548,9 @@ public:
void edit(CanvasItem *p_canvas_item);
void focus_selection();
+ void center_at(const Point2 &p_pos);
+
+ virtual CursorShape get_cursor_shape(const Point2 &p_pos) const override;
EditorSelection *editor_selection = nullptr;
diff --git a/editor/plugins/cast_2d_editor_plugin.cpp b/editor/plugins/cast_2d_editor_plugin.cpp
index 078198e64b..723082c293 100644
--- a/editor/plugins/cast_2d_editor_plugin.cpp
+++ b/editor/plugins/cast_2d_editor_plugin.cpp
@@ -77,7 +77,7 @@ bool Cast2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
return false;
}
} else if (pressed) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
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");
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index bed4658976..c2d5885e43 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -219,7 +219,7 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) {
}
void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Handle"));
switch (shape_type) {
diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp
index 0fff16bf24..3bf2b95c26 100644
--- a/editor/plugins/control_editor_plugin.cpp
+++ b/editor/plugins/control_editor_plugin.cpp
@@ -423,7 +423,7 @@ void EditorInspectorPluginControl::parse_group(Object *p_object, const String &p
add_custom_control(pos_warning);
}
-bool EditorInspectorPluginControl::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginControl::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
Control *control = Object::cast_to<Control>(p_object);
if (!control) {
return false;
@@ -721,12 +721,13 @@ void ControlEditorToolbar::_anchors_preset_selected(int p_preset) {
LayoutPreset preset = (LayoutPreset)p_preset;
List<Node *> selection = editor_selection->get_selected_node_list();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Anchors, Offsets, Grow Direction"));
for (Node *E : selection) {
Control *control = Object::cast_to<Control>(E);
if (control) {
+ undo_redo->add_do_property(control, "layout_mode", LayoutMode::LAYOUT_MODE_ANCHORS);
undo_redo->add_do_property(control, "anchors_preset", preset);
undo_redo->add_undo_method(control, "_edit_set_state", control->_edit_get_state());
}
@@ -741,7 +742,7 @@ void ControlEditorToolbar::_anchors_preset_selected(int p_preset) {
void ControlEditorToolbar::_anchors_to_current_ratio() {
List<Node *> selection = editor_selection->get_selected_node_list();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Anchors, Offsets (Keep Ratio)"));
for (Node *E : selection) {
@@ -792,7 +793,7 @@ void ControlEditorToolbar::_anchor_mode_toggled(bool p_status) {
void ControlEditorToolbar::_container_flags_selected(int p_flags, bool p_vertical) {
List<Node *> selection = editor_selection->get_selected_node_list();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (p_vertical) {
undo_redo->create_action(TTR("Change Vertical Size Flags"));
} else {
diff --git a/editor/plugins/control_editor_plugin.h b/editor/plugins/control_editor_plugin.h
index 779637317d..19e004a390 100644
--- a/editor/plugins/control_editor_plugin.h
+++ b/editor/plugins/control_editor_plugin.h
@@ -129,7 +129,7 @@ class EditorInspectorPluginControl : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
virtual void parse_group(Object *p_object, const String &p_group) override;
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
};
// Toolbar controls.
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index b0bcda946e..20710bac19 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -140,7 +140,7 @@ void CurveEditor::gui_input(const Ref<InputEvent> &p_event) {
if (!mb.is_pressed() && _dragging && mb.get_button_index() == MouseButton::LEFT) {
_dragging = false;
if (_has_undo_data) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(_selected_tangent == TANGENT_NONE ? TTR("Modify Curve Point") : TTR("Modify Curve Tangent"));
undo_redo->add_do_method(*_curve_ref, "_set_data", _curve_ref->get_data());
undo_redo->add_undo_method(*_curve_ref, "_set_data", _undo_data);
@@ -301,7 +301,7 @@ void CurveEditor::on_preset_item_selected(int preset_id) {
break;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Load Curve Preset"));
undo_redo->add_do_method(&curve, "_set_data", curve.get_data());
undo_redo->add_undo_method(&curve, "_set_data", previous_data);
@@ -433,7 +433,7 @@ CurveEditor::TangentIndex CurveEditor::get_tangent_at(Vector2 pos) const {
void CurveEditor::add_point(Vector2 pos) {
ERR_FAIL_COND(_curve_ref.is_null());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Curve Point"));
Vector2 point_pos = get_world_pos(pos);
@@ -455,7 +455,7 @@ void CurveEditor::add_point(Vector2 pos) {
void CurveEditor::remove_point(int index) {
ERR_FAIL_COND(_curve_ref.is_null());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Curve Point"));
Curve::Point p = _curve_ref->get_point(index);
@@ -477,7 +477,7 @@ void CurveEditor::remove_point(int index) {
void CurveEditor::toggle_linear(TangentIndex tangent) {
ERR_FAIL_COND(_curve_ref.is_null());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Toggle Curve Linear Tangent"));
if (tangent == TANGENT_NONE) {
@@ -621,8 +621,8 @@ struct CanvasItemPlotCurve {
color2(p_color2) {}
void operator()(Vector2 pos0, Vector2 pos1, bool in_definition) {
- // FIXME: Using a line width greater than 1 breaks curve rendering
- ci.draw_line(pos0, pos1, in_definition ? color1 : color2, 1);
+ // FIXME: Using a quad line breaks curve rendering.
+ ci.draw_line(pos0, pos1, in_definition ? color1 : color2, -1);
}
};
diff --git a/editor/plugins/dedicated_server_export_plugin.cpp b/editor/plugins/dedicated_server_export_plugin.cpp
new file mode 100644
index 0000000000..013706034e
--- /dev/null
+++ b/editor/plugins/dedicated_server_export_plugin.cpp
@@ -0,0 +1,139 @@
+/**************************************************************************/
+/* dedicated_server_export_plugin.cpp */
+/**************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/**************************************************************************/
+/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
+/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/**************************************************************************/
+
+#include "dedicated_server_export_plugin.h"
+
+EditorExportPreset::FileExportMode DedicatedServerExportPlugin::_get_export_mode_for_path(const String &p_path) {
+ Ref<EditorExportPreset> preset = get_export_preset();
+ ERR_FAIL_COND_V(preset.is_null(), EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED);
+
+ EditorExportPreset::FileExportMode mode = preset->get_file_export_mode(p_path);
+ if (mode != EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED) {
+ return mode;
+ }
+
+ String path = p_path;
+ if (path.begins_with("res://")) {
+ path = path.substr(6);
+ }
+
+ Vector<String> parts = path.split("/");
+
+ while (parts.size() > 0) {
+ parts.resize(parts.size() - 1);
+
+ String test_path = "res://";
+ if (parts.size() > 0) {
+ test_path += String("/").join(parts) + "/";
+ }
+
+ mode = preset->get_file_export_mode(test_path);
+ if (mode != EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED) {
+ break;
+ }
+ }
+
+ return mode;
+}
+
+PackedStringArray DedicatedServerExportPlugin::_get_export_features(const Ref<EditorExportPlatform> &p_platform, bool p_debug) const {
+ PackedStringArray ret;
+
+ Ref<EditorExportPreset> preset = get_export_preset();
+ ERR_FAIL_COND_V(preset.is_null(), ret);
+
+ if (preset->is_dedicated_server()) {
+ ret.append("dedicated_server");
+ }
+ return ret;
+}
+
+uint64_t DedicatedServerExportPlugin::_get_customization_configuration_hash() const {
+ Ref<EditorExportPreset> preset = get_export_preset();
+ ERR_FAIL_COND_V(preset.is_null(), 0);
+
+ if (preset->get_export_filter() != EditorExportPreset::EXPORT_CUSTOMIZED) {
+ return 0;
+ }
+
+ return preset->get_customized_files().hash();
+}
+
+bool DedicatedServerExportPlugin::_begin_customize_scenes(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) {
+ Ref<EditorExportPreset> preset = get_export_preset();
+ ERR_FAIL_COND_V(preset.is_null(), false);
+
+ current_export_mode = EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED;
+
+ return preset->get_export_filter() == EditorExportPreset::EXPORT_CUSTOMIZED;
+}
+
+bool DedicatedServerExportPlugin::_begin_customize_resources(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) {
+ Ref<EditorExportPreset> preset = get_export_preset();
+ ERR_FAIL_COND_V(preset.is_null(), false);
+
+ current_export_mode = EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED;
+
+ return preset->get_export_filter() == EditorExportPreset::EXPORT_CUSTOMIZED;
+}
+
+Node *DedicatedServerExportPlugin::_customize_scene(Node *p_root, const String &p_path) {
+ // Simply set the export mode based on the scene path. All the real
+ // customization happens in _customize_resource().
+ current_export_mode = _get_export_mode_for_path(p_path);
+ return nullptr;
+}
+
+Ref<Resource> DedicatedServerExportPlugin::_customize_resource(const Ref<Resource> &p_resource, const String &p_path) {
+ // If the resource has a path, we use that to get our export mode. But if it
+ // doesn't, we assume that this resource is embedded in the last resource with
+ // a path.
+ if (p_path != "") {
+ current_export_mode = _get_export_mode_for_path(p_path);
+ }
+
+ if (p_resource.is_valid() && current_export_mode == EditorExportPreset::MODE_FILE_STRIP && p_resource->has_method("create_placeholder")) {
+ Callable::CallError err;
+ Ref<Resource> result = const_cast<Resource *>(p_resource.ptr())->callp("create_placeholder", nullptr, 0, err);
+ if (err.error == Callable::CallError::CALL_OK) {
+ return result;
+ }
+ }
+
+ return Ref<Resource>();
+}
+
+void DedicatedServerExportPlugin::_end_customize_scenes() {
+ current_export_mode = EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED;
+}
+
+void DedicatedServerExportPlugin::_end_customize_resources() {
+ current_export_mode = EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED;
+}
diff --git a/editor/array_property_edit.h b/editor/plugins/dedicated_server_export_plugin.h
index 6e34a06943..cb014ae52d 100644
--- a/editor/array_property_edit.h
+++ b/editor/plugins/dedicated_server_export_plugin.h
@@ -1,5 +1,5 @@
/**************************************************************************/
-/* array_property_edit.h */
+/* dedicated_server_export_plugin.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,42 +28,31 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
-#ifndef ARRAY_PROPERTY_EDIT_H
-#define ARRAY_PROPERTY_EDIT_H
+#ifndef DEDICATED_SERVER_EXPORT_PLUGIN_H
+#define DEDICATED_SERVER_EXPORT_PLUGIN_H
-#include "scene/main/node.h"
+#include "editor/export/editor_export.h"
-class ArrayPropertyEdit : public RefCounted {
- GDCLASS(ArrayPropertyEdit, RefCounted);
+class DedicatedServerExportPlugin : public EditorExportPlugin {
+private:
+ EditorExportPreset::FileExportMode current_export_mode;
- int page;
- ObjectID obj;
- StringName property;
- String vtypes;
- String subtype_hint_string;
- PropertyHint subtype_hint;
- Variant::Type subtype;
- Variant get_array() const;
- Variant::Type default_type;
-
- void _notif_change();
- void _set_size(int p_size);
- void _set_value(int p_idx, const Variant &p_value);
-
- bool _dont_undo_redo();
+ EditorExportPreset::FileExportMode _get_export_mode_for_path(const String &p_path);
protected:
- static void _bind_methods();
- bool _set(const StringName &p_name, const Variant &p_value);
- bool _get(const StringName &p_name, Variant &r_ret) const;
- void _get_property_list(List<PropertyInfo> *p_list) const;
+ String _get_name() const override { return "DedicatedServer"; }
+
+ PackedStringArray _get_export_features(const Ref<EditorExportPlatform> &p_platform, bool p_debug) const override;
+ uint64_t _get_customization_configuration_hash() const override;
-public:
- void edit(Object *p_obj, const StringName &p_prop, const String &p_hint_string, Variant::Type p_deftype);
+ bool _begin_customize_scenes(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) override;
+ bool _begin_customize_resources(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) override;
- Node *get_node();
+ Node *_customize_scene(Node *p_root, const String &p_path) override;
+ Ref<Resource> _customize_resource(const Ref<Resource> &p_resource, const String &p_path) override;
- ArrayPropertyEdit();
+ void _end_customize_scenes() override;
+ void _end_customize_resources() override;
};
-#endif // ARRAY_PROPERTY_EDIT_H
+#endif // DEDICATED_SERVER_EXPORT_PLUGIN_H
diff --git a/editor/plugins/font_config_plugin.cpp b/editor/plugins/font_config_plugin.cpp
index db4a103624..d5f3b897c9 100644
--- a/editor/plugins/font_config_plugin.cpp
+++ b/editor/plugins/font_config_plugin.cpp
@@ -874,7 +874,7 @@ bool EditorInspectorPluginFontVariation::can_handle(Object *p_object) {
return (Object::cast_to<FontVariation>(p_object) != nullptr) || (Object::cast_to<DynamicFontImportSettingsData>(p_object) != nullptr);
}
-bool EditorInspectorPluginFontVariation::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginFontVariation::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
if (p_path == "variation_opentype") {
add_property_editor(p_path, memnew(EditorPropertyOTVariation));
return true;
@@ -976,7 +976,7 @@ void EditorInspectorPluginFontPreview::parse_begin(Object *p_object) {
add_custom_control(editor);
}
-bool EditorInspectorPluginFontPreview::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginFontPreview::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
return false;
}
@@ -1035,7 +1035,7 @@ bool EditorInspectorPluginSystemFont::can_handle(Object *p_object) {
return Object::cast_to<SystemFont>(p_object) != nullptr;
}
-bool EditorInspectorPluginSystemFont::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginSystemFont::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
if (p_path == "font_names") {
EditorPropertyFontNamesArray *editor = memnew(EditorPropertyFontNamesArray);
editor->setup(p_type, p_hint_text);
diff --git a/editor/plugins/font_config_plugin.h b/editor/plugins/font_config_plugin.h
index 150e97f7e2..6cea5967b2 100644
--- a/editor/plugins/font_config_plugin.h
+++ b/editor/plugins/font_config_plugin.h
@@ -212,7 +212,7 @@ class EditorInspectorPluginFontVariation : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
};
/*************************************************************************/
@@ -242,7 +242,7 @@ class EditorInspectorPluginFontPreview : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
virtual void parse_begin(Object *p_object) override;
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
};
/*************************************************************************/
@@ -269,7 +269,7 @@ class EditorInspectorPluginSystemFont : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
};
/*************************************************************************/
diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.cpp b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
index 1a51224198..04b2a9337e 100644
--- a/editor/plugins/gpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
@@ -113,7 +113,7 @@ void GPUParticles2DEditorPlugin::_menu_callback(int p_idx) {
cpu_particles->set_process_mode(particles->get_process_mode());
cpu_particles->set_z_index(particles->get_z_index());
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to CPUParticles2D"));
ur->add_do_method(SceneTreeDock::get_singleton(), "replace_node", particles, cpu_particles, true, false);
ur->add_do_reference(cpu_particles);
@@ -161,7 +161,7 @@ void GPUParticles2DEditorPlugin::_generate_visibility_rect() {
particles->set_emitting(false);
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Generate Visibility Rect"));
undo_redo->add_do_method(particles, "set_visibility_rect", rect);
undo_redo->add_undo_method(particles, "set_visibility_rect", particles->get_visibility_rect());
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
index 19ac553708..65f66c2661 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
@@ -274,7 +274,7 @@ void GPUParticles3DEditor::_menu_option(int p_option) {
cpu_particles->set_visible(node->is_visible());
cpu_particles->set_process_mode(node->get_process_mode());
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to CPUParticles3D"));
ur->add_do_method(SceneTreeDock::get_singleton(), "replace_node", node, cpu_particles, true, false);
ur->add_do_reference(cpu_particles);
@@ -324,7 +324,7 @@ void GPUParticles3DEditor::_generate_aabb() {
node->set_emitting(false);
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Generate Visibility AABB"));
ur->add_do_method(node, "set_visibility_aabb", rect);
ur->add_undo_method(node, "set_visibility_aabb", node->get_visibility_aabb());
diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
index 72c234c1d4..477a094d01 100644
--- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
@@ -77,7 +77,7 @@ void GPUParticlesCollisionSDF3DEditorPlugin::_notification(int p_what) {
const Vector3i size = col_sdf->get_estimated_cell_size();
- const Vector3 extents = col_sdf->get_extents();
+ const Vector3 extents = col_sdf->get_size() / 2;
int data_size = 2;
const double size_mb = size.x * size.y * size.z * data_size / (1024.0 * 1024.0);
diff --git a/editor/plugins/gradient_editor.cpp b/editor/plugins/gradient_editor.cpp
index 68aafd6fa8..2eb17b3f13 100644
--- a/editor/plugins/gradient_editor.cpp
+++ b/editor/plugins/gradient_editor.cpp
@@ -52,12 +52,12 @@ void GradientEditor::reverse_gradient() {
int GradientEditor::_get_point_from_pos(int x) {
int result = -1;
- int total_w = get_size().width - get_size().height - draw_spacing;
+ int total_w = get_size().width - get_size().height - draw_spacing - handle_width;
float min_distance = 1e20;
for (int i = 0; i < points.size(); i++) {
// Check if we clicked at point.
float distance = ABS(x - points[i].offset * total_w);
- float min = (handle_width / 2 * 1.7); // Make it easier to grab.
+ float min = handle_width * 0.85; // Allow the mouse to be more than half a handle width away for ease of grabbing.
if (distance <= min && distance < min_distance) {
result = i;
min_distance = distance;
@@ -99,7 +99,7 @@ void GradientEditor::_gradient_changed() {
void GradientEditor::_ramp_changed() {
editing = true;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Gradient Edited"), UndoRedo::MERGE_ENDS);
undo_redo->add_do_method(gradient.ptr(), "set_offsets", get_offsets());
undo_redo->add_do_method(gradient.ptr(), "set_colors", get_colors());
@@ -198,116 +198,87 @@ void GradientEditor::gui_input(const Ref<InputEvent> &p_event) {
}
Ref<InputEventMouseButton> mb = p_event;
- // Show color picker on double click.
- if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && mb->is_double_click() && mb->is_pressed()) {
- grabbed = _get_point_from_pos(mb->get_position().x);
- _show_color_picker();
- accept_event();
- return;
- }
-
- // Delete point on right click.
- if (mb.is_valid() && mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) {
- grabbed = _get_point_from_pos(mb->get_position().x);
- if (grabbed != -1) {
- points.remove_at(grabbed);
- grabbed = -1;
- grabbing = false;
- queue_redraw();
- emit_signal(SNAME("ramp_changed"));
- accept_event();
- }
- }
-
- // Hold alt key to duplicate selected color.
- if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed() && mb->is_alt_pressed()) {
- int x = mb->get_position().x;
- grabbed = _get_point_from_pos(x);
- if (grabbed != -1) {
- int total_w = get_size().width - get_size().height - draw_spacing;
- Gradient::Point new_point = points[grabbed];
- new_point.offset = CLAMP(x / float(total_w), 0, 1);
+ if (mb.is_valid() && mb->is_pressed()) {
+ float adjusted_mb_x = mb->get_position().x - handle_width / 2;
- points.push_back(new_point);
- points.sort();
- for (int i = 0; i < points.size(); ++i) {
- if (points[i].offset == new_point.offset) {
- grabbed = i;
- break;
- }
+ // Delete point on right click.
+ if (mb->get_button_index() == MouseButton::RIGHT) {
+ grabbed = _get_point_from_pos(adjusted_mb_x);
+ if (grabbed != -1) {
+ points.remove_at(grabbed);
+ grabbed = -1;
+ grabbing = false;
+ queue_redraw();
+ emit_signal(SNAME("ramp_changed"));
+ accept_event();
}
-
- emit_signal(SNAME("ramp_changed"));
- queue_redraw();
}
- }
- // Select.
- if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) {
- queue_redraw();
- int x = mb->get_position().x;
- int total_w = get_size().width - get_size().height - draw_spacing;
+ // Hold Alt key to duplicate selected color.
+ if (mb->get_button_index() == MouseButton::LEFT && mb->is_alt_pressed()) {
+ grabbed = _get_point_from_pos(adjusted_mb_x);
- //Check if color selector was clicked.
- if (x > total_w + draw_spacing) {
- _show_color_picker();
- return;
- }
-
- grabbing = true;
+ if (grabbed != -1) {
+ int total_w = get_size().width - get_size().height - draw_spacing - handle_width;
+ Gradient::Point new_point = points[grabbed];
+ new_point.offset = CLAMP(adjusted_mb_x / float(total_w), 0, 1);
+ points.push_back(new_point);
+ points.sort();
+ for (int i = 0; i < points.size(); ++i) {
+ if (points[i].offset == new_point.offset) {
+ grabbed = i;
+ break;
+ }
+ }
- grabbed = _get_point_from_pos(x);
- //grab or select
- if (grabbed != -1) {
- return;
+ emit_signal(SNAME("ramp_changed"));
+ queue_redraw();
+ }
}
- // Insert point.
- Gradient::Point new_point;
- new_point.offset = CLAMP(x / float(total_w), 0, 1);
-
- Gradient::Point prev;
- Gradient::Point next;
+ // Select.
+ if (mb->get_button_index() == MouseButton::LEFT) {
+ queue_redraw();
+ int total_w = get_size().width - get_size().height - draw_spacing - handle_width;
- int pos = -1;
- for (int i = 0; i < points.size(); i++) {
- if (points[i].offset < new_point.offset) {
- pos = i;
+ // Check if color selector was clicked or ramp was double-clicked.
+ if (adjusted_mb_x > total_w + draw_spacing) {
+ if (!mb->is_double_click()) {
+ _show_color_picker();
+ }
+ return;
+ } else if (mb->is_double_click()) {
+ grabbed = _get_point_from_pos(adjusted_mb_x);
+ _show_color_picker();
+ accept_event();
+ return;
}
- }
- if (pos == -1) {
- prev.color = Color(0, 0, 0);
- prev.offset = 0;
- if (points.size()) {
- next = points[0];
- } else {
- next.color = Color(1, 1, 1);
- next.offset = 1.0;
- }
- } else {
- if (pos == points.size() - 1) {
- next.color = Color(1, 1, 1);
- next.offset = 1.0;
- } else {
- next = points[pos + 1];
+ grabbing = true;
+ grabbed = _get_point_from_pos(adjusted_mb_x);
+
+ // Grab or select.
+ if (grabbed != -1) {
+ return;
}
- prev = points[pos];
- }
- new_point.color = prev.color.lerp(next.color, (new_point.offset - prev.offset) / (next.offset - prev.offset));
+ // Insert point.
+ Gradient::Point new_point;
+ new_point.offset = CLAMP(adjusted_mb_x / float(total_w), 0, 1);
+ new_point.color = gradient->get_color_at_offset(new_point.offset);
- points.push_back(new_point);
- points.sort();
- for (int i = 0; i < points.size(); i++) {
- if (points[i].offset == new_point.offset) {
- grabbed = i;
- break;
+ points.push_back(new_point);
+ points.sort();
+ for (int i = 0; i < points.size(); i++) {
+ if (points[i].offset == new_point.offset) {
+ grabbed = i;
+ break;
+ }
}
- }
- emit_signal(SNAME("ramp_changed"));
+ emit_signal(SNAME("ramp_changed"));
+ }
}
if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && !mb->is_pressed()) {
@@ -321,18 +292,16 @@ void GradientEditor::gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid() && grabbing) {
- int total_w = get_size().width - get_size().height - draw_spacing;
-
- int x = mm->get_position().x;
-
- float newofs = CLAMP(x / float(total_w), 0, 1);
+ float adjusted_mm_x = mm->get_position().x - handle_width / 2;
+ int total_w = get_size().width - get_size().height - draw_spacing - handle_width;
+ float newofs = CLAMP(adjusted_mm_x / float(total_w), 0, 1);
// Snap to "round" coordinates if holding Ctrl.
// Be more precise if holding Shift as well.
if (mm->is_ctrl_pressed()) {
newofs = Math::snapped(newofs, mm->is_shift_pressed() ? 0.025 : 0.1);
} else if (mm->is_shift_pressed()) {
- // Snap to nearest point if holding just Shift
+ // Snap to nearest point if holding just Shift.
const float snap_threshold = 0.03;
float smallest_ofs = snap_threshold;
bool found = false;
@@ -421,7 +390,7 @@ void GradientEditor::_notification(int p_what) {
// Draw borders around color ramp if in focus.
if (has_focus()) {
- draw_rect(Rect2(handle_width / 2, 0, total_w, h), Color(1, 1, 1, 0.9), false);
+ draw_rect(Rect2(handle_width / 2, 0, total_w, h), Color(1, 1, 1, 0.9), false, 1);
}
// Draw point markers.
@@ -432,18 +401,18 @@ void GradientEditor::_notification(int p_what) {
draw_line(Vector2(points[i].offset * total_w + handle_width / 2, 0), Vector2(points[i].offset * total_w + handle_width / 2, h / 2), col);
Rect2 rect = Rect2(points[i].offset * total_w, h / 2, handle_width, h / 2);
draw_rect(rect, points[i].color, true);
- draw_rect(rect, col, false);
+ draw_rect(rect, col, false, 1);
if (grabbed == i) {
const Color focus_color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
rect = rect.grow(-1);
if (has_focus()) {
- draw_rect(rect, focus_color, false);
+ draw_rect(rect, focus_color, false, 1);
} else {
- draw_rect(rect, focus_color.darkened(0.4), false);
+ draw_rect(rect, focus_color.darkened(0.4), false, 1);
}
rect = rect.grow(-1);
- draw_rect(rect, col, false);
+ draw_rect(rect, col, false, 1);
}
}
@@ -454,7 +423,7 @@ void GradientEditor::_notification(int p_what) {
// Draw with selection color.
draw_rect(Rect2(button_offset, 0, h, h), points[grabbed].color);
} else {
- // If no color selected draw grey color with 'X' on top.
+ // If no color selected draw gray color with 'X' on top.
draw_rect(Rect2(button_offset, 0, h, h), Color(0.5, 0.5, 0.5, 1));
draw_line(Vector2(button_offset, 0), Vector2(button_offset + h, h), Color(1, 1, 1, 0.6));
draw_line(Vector2(button_offset, h), Vector2(button_offset + h, 0), Color(1, 1, 1, 0.6));
diff --git a/editor/plugins/gradient_texture_2d_editor_plugin.cpp b/editor/plugins/gradient_texture_2d_editor_plugin.cpp
index 703a44403d..7bd159a5b8 100644
--- a/editor/plugins/gradient_texture_2d_editor_plugin.cpp
+++ b/editor/plugins/gradient_texture_2d_editor_plugin.cpp
@@ -55,7 +55,7 @@ void GradientTexture2DEditorRect::_update_fill_position() {
String property_name = handle == HANDLE_FILL_FROM ? "fill_from" : "fill_to";
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Set %s"), property_name), UndoRedo::MERGE_ENDS);
undo_redo->add_do_property(texture.ptr(), property_name, percent);
undo_redo->add_undo_property(texture.ptr(), property_name, handle == HANDLE_FILL_FROM ? texture->get_fill_from() : texture->get_fill_to());
@@ -178,7 +178,7 @@ void GradientTexture2DEditorRect::_notification(int p_what) {
GradientTexture2DEditorRect::GradientTexture2DEditorRect() {
checkerboard = memnew(TextureRect);
checkerboard->set_stretch_mode(TextureRect::STRETCH_TILE);
- checkerboard->set_ignore_texture_size(true);
+ checkerboard->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
checkerboard->set_draw_behind_parent(true);
add_child(checkerboard, false, INTERNAL_MODE_FRONT);
@@ -188,7 +188,7 @@ GradientTexture2DEditorRect::GradientTexture2DEditorRect() {
///////////////////////
void GradientTexture2DEditor::_reverse_button_pressed() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Swap GradientTexture2D Fill Points"));
undo_redo->add_do_property(texture.ptr(), "fill_from", texture->get_fill_to());
undo_redo->add_do_property(texture.ptr(), "fill_to", texture->get_fill_from());
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp
index bee1206b90..429add4540 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -84,7 +84,7 @@ void LightOccluder2DEditor::_set_polygon(int p_idx, const Variant &p_polygon) co
void LightOccluder2DEditor::_action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) {
Ref<OccluderPolygon2D> occluder = _ensure_occluder();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(occluder.ptr(), "set_polygon", p_polygon);
undo_redo->add_undo_method(occluder.ptr(), "set_polygon", p_previous);
}
@@ -98,7 +98,7 @@ void LightOccluder2DEditor::_create_resource() {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Create Occluder Polygon"));
undo_redo->add_do_method(node, "set_occluder_polygon", Ref<OccluderPolygon2D>(memnew(OccluderPolygon2D)));
undo_redo->add_undo_method(node, "set_occluder_polygon", Variant(Ref<RefCounted>()));
diff --git a/editor/plugins/lightmap_gi_editor_plugin.cpp b/editor/plugins/lightmap_gi_editor_plugin.cpp
index 1adcc2a3b4..519cfcaa94 100644
--- a/editor/plugins/lightmap_gi_editor_plugin.cpp
+++ b/editor/plugins/lightmap_gi_editor_plugin.cpp
@@ -35,12 +35,43 @@
void LightmapGIEditorPlugin::_bake_select_file(const String &p_file) {
if (lightmap) {
- LightmapGI::BakeError err;
+ LightmapGI::BakeError err = LightmapGI::BAKE_ERROR_OK;
const uint64_t time_started = OS::get_singleton()->get_ticks_msec();
- if (get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root() == lightmap) {
- err = lightmap->bake(lightmap, p_file, bake_func_step);
+ if (get_tree()->get_edited_scene_root()) {
+ Ref<LightmapGIData> lightmapGIData = lightmap->get_light_data();
+
+ if (lightmapGIData.is_valid()) {
+ String path = lightmapGIData->get_path();
+ if (!path.is_resource_file()) {
+ int srpos = path.find("::");
+ if (srpos != -1) {
+ String base = path.substr(0, srpos);
+ if (ResourceLoader::get_resource_type(base) == "PackedScene") {
+ if (!get_tree()->get_edited_scene_root() || get_tree()->get_edited_scene_root()->get_scene_file_path() != base) {
+ err = LightmapGI::BAKE_ERROR_FOREIGN_DATA;
+ }
+ } else {
+ if (FileAccess::exists(base + ".import")) {
+ err = LightmapGI::BAKE_ERROR_FOREIGN_DATA;
+ }
+ }
+ }
+ } else {
+ if (FileAccess::exists(path + ".import")) {
+ err = LightmapGI::BAKE_ERROR_FOREIGN_DATA;
+ }
+ }
+ }
+
+ if (err == LightmapGI::BAKE_ERROR_OK) {
+ if (get_tree()->get_edited_scene_root() == lightmap) {
+ err = lightmap->bake(lightmap, p_file, bake_func_step);
+ } else {
+ err = lightmap->bake(lightmap->get_parent(), p_file, bake_func_step);
+ }
+ }
} else {
- err = lightmap->bake(lightmap->get_parent(), p_file, bake_func_step);
+ err = LightmapGI::BAKE_ERROR_NO_SCENE_ROOT;
}
bake_func_end(time_started);
@@ -59,16 +90,21 @@ void LightmapGIEditorPlugin::_bake_select_file(const String &p_file) {
file_dialog->set_current_path(scene_path);
file_dialog->popup_file_dialog();
-
} break;
- case LightmapGI::BAKE_ERROR_NO_MESHES:
+ case LightmapGI::BAKE_ERROR_NO_MESHES: {
EditorNode::get_singleton()->show_warning(TTR("No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake Light' flag is on."));
- break;
- case LightmapGI::BAKE_ERROR_CANT_CREATE_IMAGE:
+ } break;
+ case LightmapGI::BAKE_ERROR_CANT_CREATE_IMAGE: {
EditorNode::get_singleton()->show_warning(TTR("Failed creating lightmap images, make sure path is writable."));
- break;
+ } break;
+ case LightmapGI::BAKE_ERROR_NO_SCENE_ROOT: {
+ EditorNode::get_singleton()->show_warning(TTR("No editor scene root found."));
+ } break;
+ case LightmapGI::BAKE_ERROR_FOREIGN_DATA: {
+ EditorNode::get_singleton()->show_warning(TTR("Lightmap data is not local to the scene."));
+ } break;
default: {
- }
+ } break;
}
}
}
diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp
index f2c487dd14..0185617c36 100644
--- a/editor/plugins/line_2d_editor_plugin.cpp
+++ b/editor/plugins/line_2d_editor_plugin.cpp
@@ -55,7 +55,7 @@ void Line2DEditor::_set_polygon(int p_idx, const Variant &p_polygon) const {
void Line2DEditor::_action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) {
Node2D *_node = _get_node();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(_node, "set_points", p_polygon);
undo_redo->add_undo_method(_node, "set_points", p_previous);
}
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index e66c5214a9..36c143ca8d 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -44,7 +44,7 @@ void MaterialEditor::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseMotion> mm = p_event;
- if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (mm.is_valid() && (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
rot.x -= mm->get_relative().y * 0.01;
rot.y -= mm->get_relative().x * 0.01;
@@ -291,8 +291,8 @@ void EditorInspectorPluginMaterial::parse_begin(Object *p_object) {
}
void EditorInspectorPluginMaterial::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value) {
- Ref<EditorUndoRedoManager> undo_redo = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
- ERR_FAIL_COND(!undo_redo.is_valid());
+ EditorUndoRedoManager *undo_redo = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
+ ERR_FAIL_NULL(undo_redo);
// For BaseMaterial3D, if a roughness or metallic textures is being assigned to an empty slot,
// set the respective metallic or roughness factor to 1.0 as a convenience feature
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index a9cbec00b5..ee555ae8d4 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -39,7 +39,7 @@ void MeshEditor::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseMotion> mm = p_event;
- if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (mm.is_valid() && (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
rot_x -= mm->get_relative().y * 0.01;
rot_y -= mm->get_relative().x * 0.01;
if (rot_x < -Math_PI / 2) {
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index 6cc551d367..e8976667dd 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -65,7 +65,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
switch (p_option) {
case MENU_OPTION_CREATE_STATIC_TRIMESH_BODY: {
EditorSelection *editor_selection = EditorNode::get_singleton()->get_editor_selection();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
List<Node *> selection = editor_selection->get_selected_node_list();
@@ -152,7 +152,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
Node *owner = get_tree()->get_edited_scene_root();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Create Trimesh Static Shape"));
@@ -182,7 +182,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
err_dialog->popup_centered();
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
if (simplify) {
ur->create_action(TTR("Create Simplified Convex Shape"));
@@ -222,7 +222,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
err_dialog->popup_centered();
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Create Multiple Convex Shapes"));
@@ -259,7 +259,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
Node *owner = get_tree()->get_edited_scene_root();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Create Navigation Mesh"));
ur->add_do_method(node, "add_child", nmi, true);
@@ -275,7 +275,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
outline_dialog->popup_centered(Vector2(200, 90));
} break;
case MENU_OPTION_CREATE_DEBUG_TANGENTS: {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Create Debug Tangents"));
MeshInstance3D *tangents = node->create_debug_tangents_node();
@@ -334,7 +334,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Unwrap UV2"));
ur->add_do_method(node, "set_mesh", unwrapped_mesh);
@@ -460,7 +460,7 @@ void MeshInstance3DEditor::_debug_uv_draw() {
debug_uv->draw_rect(Rect2(Vector2(), debug_uv->get_size()), get_theme_color(SNAME("dark_color_3"), SNAME("Editor")));
debug_uv->draw_set_transform(Vector2(), 0, debug_uv->get_size());
// Use a translucent color to allow overlapping triangles to be visible.
- debug_uv->draw_multiline(uv_lines, get_theme_color(SNAME("mono_color"), SNAME("Editor")) * Color(1, 1, 1, 0.5), Math::round(EDSCALE));
+ debug_uv->draw_multiline(uv_lines, get_theme_color(SNAME("mono_color"), SNAME("Editor")) * Color(1, 1, 1, 0.5));
}
void MeshInstance3DEditor::_create_outline_mesh() {
@@ -493,7 +493,7 @@ void MeshInstance3DEditor::_create_outline_mesh() {
mi->set_mesh(mesho);
Node *owner = get_tree()->get_edited_scene_root();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Create Outline"));
diff --git a/editor/plugins/navigation_link_2d_editor_plugin.cpp b/editor/plugins/navigation_link_2d_editor_plugin.cpp
index 53f9ff019f..dff92ced27 100644
--- a/editor/plugins/navigation_link_2d_editor_plugin.cpp
+++ b/editor/plugins/navigation_link_2d_editor_plugin.cpp
@@ -65,32 +65,32 @@ bool NavigationLink2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) {
if (mb->is_pressed()) {
- // Start location
- if (xform.xform(node->get_start_location()).distance_to(mb->get_position()) < grab_threshold) {
+ // Start position
+ if (xform.xform(node->get_start_position()).distance_to(mb->get_position()) < grab_threshold) {
start_grabbed = true;
- original_start_location = node->get_start_location();
+ original_start_position = node->get_start_position();
return true;
} else {
start_grabbed = false;
}
- // End location
- if (xform.xform(node->get_end_location()).distance_to(mb->get_position()) < grab_threshold) {
+ // End position
+ if (xform.xform(node->get_end_position()).distance_to(mb->get_position()) < grab_threshold) {
end_grabbed = true;
- original_end_location = node->get_end_location();
+ original_end_position = node->get_end_position();
return true;
} else {
end_grabbed = false;
}
} else {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (start_grabbed) {
- undo_redo->create_action(TTR("Set start_location"));
- undo_redo->add_do_method(node, "set_start_location", node->get_start_location());
+ undo_redo->create_action(TTR("Set start_position"));
+ undo_redo->add_do_method(node, "set_start_position", node->get_start_position());
undo_redo->add_do_method(canvas_item_editor, "update_viewport");
- undo_redo->add_undo_method(node, "set_start_location", original_start_location);
+ undo_redo->add_undo_method(node, "set_start_position", original_start_position);
undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
undo_redo->commit_action();
@@ -100,10 +100,10 @@ bool NavigationLink2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
}
if (end_grabbed) {
- undo_redo->create_action(TTR("Set end_location"));
- undo_redo->add_do_method(node, "set_end_location", node->get_end_location());
+ undo_redo->create_action(TTR("Set end_position"));
+ undo_redo->add_do_method(node, "set_end_position", node->get_end_position());
undo_redo->add_do_method(canvas_item_editor, "update_viewport");
- undo_redo->add_undo_method(node, "set_end_location", original_end_location);
+ undo_redo->add_undo_method(node, "set_end_position", original_end_position);
undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
undo_redo->commit_action();
@@ -120,14 +120,14 @@ bool NavigationLink2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
point = node->get_global_transform().affine_inverse().xform(point);
if (start_grabbed) {
- node->set_start_location(point);
+ node->set_start_position(point);
canvas_item_editor->update_viewport();
return true;
}
if (end_grabbed) {
- node->set_end_location(point);
+ node->set_end_position(point);
canvas_item_editor->update_viewport();
return true;
@@ -143,13 +143,13 @@ void NavigationLink2DEditor::forward_canvas_draw_over_viewport(Control *p_overla
}
Transform2D gt = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
- Vector2 global_start_location = gt.xform(node->get_start_location());
- Vector2 global_end_location = gt.xform(node->get_end_location());
+ Vector2 global_start_position = gt.xform(node->get_start_position());
+ Vector2 global_end_position = gt.xform(node->get_end_position());
// Only drawing the handles here, since the debug rendering will fill in the rest.
const Ref<Texture2D> handle = get_theme_icon(SNAME("EditorHandle"), SNAME("EditorIcons"));
- p_overlay->draw_texture(handle, global_start_location - handle->get_size() / 2);
- p_overlay->draw_texture(handle, global_end_location - handle->get_size() / 2);
+ p_overlay->draw_texture(handle, global_start_position - handle->get_size() / 2);
+ p_overlay->draw_texture(handle, global_end_position - handle->get_size() / 2);
}
void NavigationLink2DEditor::edit(NavigationLink2D *p_node) {
diff --git a/editor/plugins/navigation_link_2d_editor_plugin.h b/editor/plugins/navigation_link_2d_editor_plugin.h
index 76444403d0..ea731ca2cd 100644
--- a/editor/plugins/navigation_link_2d_editor_plugin.h
+++ b/editor/plugins/navigation_link_2d_editor_plugin.h
@@ -43,10 +43,10 @@ class NavigationLink2DEditor : public Control {
NavigationLink2D *node = nullptr;
bool start_grabbed = false;
- Vector2 original_start_location;
+ Vector2 original_start_position;
bool end_grabbed = false;
- Vector2 original_end_location;
+ Vector2 original_end_position;
protected:
void _notification(int p_what);
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index cbc225a7ff..957a520d8a 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -76,7 +76,7 @@ void NavigationPolygonEditor::_set_polygon(int p_idx, const Variant &p_polygon)
void NavigationPolygonEditor::_action_add_polygon(const Variant &p_polygon) {
Ref<NavigationPolygon> navpoly = _ensure_navpoly();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(navpoly.ptr(), "add_outline", p_polygon);
undo_redo->add_undo_method(navpoly.ptr(), "remove_outline", navpoly->get_outline_count());
undo_redo->add_do_method(navpoly.ptr(), "make_polygons_from_outlines");
@@ -85,7 +85,7 @@ void NavigationPolygonEditor::_action_add_polygon(const Variant &p_polygon) {
void NavigationPolygonEditor::_action_remove_polygon(int p_idx) {
Ref<NavigationPolygon> navpoly = _ensure_navpoly();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(navpoly.ptr(), "remove_outline", p_idx);
undo_redo->add_undo_method(navpoly.ptr(), "add_outline_at_index", navpoly->get_outline(p_idx), p_idx);
undo_redo->add_do_method(navpoly.ptr(), "make_polygons_from_outlines");
@@ -94,7 +94,7 @@ void NavigationPolygonEditor::_action_remove_polygon(int p_idx) {
void NavigationPolygonEditor::_action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) {
Ref<NavigationPolygon> navpoly = _ensure_navpoly();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(navpoly.ptr(), "set_outline", p_idx, p_polygon);
undo_redo->add_undo_method(navpoly.ptr(), "set_outline", p_idx, p_previous);
undo_redo->add_do_method(navpoly.ptr(), "make_polygons_from_outlines");
@@ -110,7 +110,7 @@ void NavigationPolygonEditor::_create_resource() {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Create Navigation Polygon"));
undo_redo->add_do_method(node, "set_navigation_polygon", Ref<NavigationPolygon>(memnew(NavigationPolygon)));
undo_redo->add_undo_method(node, "set_navigation_polygon", Variant(Ref<RefCounted>()));
diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp
index 74db91a309..e48a5bb95d 100644
--- a/editor/plugins/node_3d_editor_gizmos.cpp
+++ b/editor/plugins/node_3d_editor_gizmos.cpp
@@ -1337,13 +1337,13 @@ void Light3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_i
light->set_param(p_id == 0 ? Light3D::PARAM_RANGE : Light3D::PARAM_SPOT_ANGLE, p_restore);
} else if (p_id == 0) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Light Radius"));
ur->add_do_method(light, "set_param", Light3D::PARAM_RANGE, light->get_param(Light3D::PARAM_RANGE));
ur->add_undo_method(light, "set_param", Light3D::PARAM_RANGE, p_restore);
ur->commit_action();
} else if (p_id == 1) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Light Radius"));
ur->add_do_method(light, "set_param", Light3D::PARAM_SPOT_ANGLE, light->get_param(Light3D::PARAM_SPOT_ANGLE));
ur->add_undo_method(light, "set_param", Light3D::PARAM_SPOT_ANGLE, p_restore);
@@ -1562,7 +1562,7 @@ void AudioStreamPlayer3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gi
player->set_emission_angle(p_restore);
} else {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change AudioStreamPlayer3D Emission Angle"));
ur->add_do_method(player, "set_emission_angle", player->get_emission_angle());
ur->add_undo_method(player, "set_emission_angle", p_restore);
@@ -1805,7 +1805,7 @@ void Camera3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id,
} else {
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(0, 0, -1), Vector3(4096, 0, -1), s[0], s[1], ra, rb);
- float d = ra.x * 2.0;
+ float d = ra.x * 2;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::snapped(d, Node3DEditor::get_singleton()->get_translate_snap());
}
@@ -1823,7 +1823,7 @@ void Camera3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_
if (p_cancel) {
camera->set("fov", p_restore);
} else {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Camera FOV"));
ur->add_do_property(camera, "fov", camera->get_fov());
ur->add_undo_property(camera, "fov", p_restore);
@@ -1834,7 +1834,7 @@ void Camera3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_
if (p_cancel) {
camera->set("size", p_restore);
} else {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Camera Size"));
ur->add_do_property(camera, "size", camera->get_size());
ur->add_undo_property(camera, "size", p_restore);
@@ -2099,7 +2099,7 @@ void OccluderInstance3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo,
Ref<BoxOccluder3D> bo = o;
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
- float d = ra[p_id];
+ float d = ra[p_id] * 2;
if (snap_enabled) {
d = Math::snapped(d, snap);
}
@@ -2109,7 +2109,7 @@ void OccluderInstance3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo,
}
Vector3 he = bo->get_size();
- he[p_id] = d * 2;
+ he[p_id] = d;
bo->set_size(he);
}
@@ -2160,7 +2160,7 @@ void OccluderInstance3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_giz
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Sphere Shape Radius"));
ur->add_do_method(so.ptr(), "set_radius", so->get_radius());
ur->add_undo_method(so.ptr(), "set_radius", p_restore);
@@ -2174,7 +2174,7 @@ void OccluderInstance3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_giz
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Box Shape Size"));
ur->add_do_method(bo.ptr(), "set_size", bo->get_size());
ur->add_undo_method(bo.ptr(), "set_size", p_restore);
@@ -2188,7 +2188,7 @@ void OccluderInstance3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_giz
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Box Shape Size"));
ur->add_do_method(qo.ptr(), "set_size", qo->get_size());
ur->add_undo_method(qo.ptr(), "set_size", p_restore);
@@ -2902,7 +2902,7 @@ void VisibleOnScreenNotifier3DGizmoPlugin::commit_handle(const EditorNode3DGizmo
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Notifier AABB"));
ur->add_do_method(notifier, "set_aabb", notifier->get_aabb());
ur->add_undo_method(notifier, "set_aabb", p_restore);
@@ -3093,7 +3093,7 @@ void GPUParticles3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo,
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Particles AABB"));
ur->add_do_method(particles, "set_visibility_aabb", particles->get_visibility_aabb());
ur->add_undo_method(particles, "set_visibility_aabb", p_restore);
@@ -3184,7 +3184,7 @@ String GPUParticlesCollision3DGizmoPlugin::get_handle_name(const EditorNode3DGiz
}
if (Object::cast_to<GPUParticlesCollisionBox3D>(cs) || Object::cast_to<GPUParticlesAttractorBox3D>(cs) || Object::cast_to<GPUParticlesAttractorVectorField3D>(cs) || Object::cast_to<GPUParticlesCollisionSDF3D>(cs) || Object::cast_to<GPUParticlesCollisionHeightField3D>(cs)) {
- return "Extents";
+ return "Size";
}
return "";
@@ -3198,7 +3198,7 @@ Variant GPUParticlesCollision3DGizmoPlugin::get_handle_value(const EditorNode3DG
}
if (Object::cast_to<GPUParticlesCollisionBox3D>(cs) || Object::cast_to<GPUParticlesAttractorBox3D>(cs) || Object::cast_to<GPUParticlesAttractorVectorField3D>(cs) || Object::cast_to<GPUParticlesCollisionSDF3D>(cs) || Object::cast_to<GPUParticlesCollisionHeightField3D>(cs)) {
- return Vector3(p_gizmo->get_node_3d()->call("get_extents"));
+ return Vector3(p_gizmo->get_node_3d()->call("get_size"));
}
return Variant();
@@ -3235,7 +3235,7 @@ void GPUParticlesCollision3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_g
axis[p_id] = 1.0;
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
- float d = ra[p_id];
+ float d = ra[p_id] * 2;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::snapped(d, Node3DEditor::get_singleton()->get_translate_snap());
}
@@ -3244,9 +3244,9 @@ void GPUParticlesCollision3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_g
d = 0.001;
}
- Vector3 he = sn->call("get_extents");
+ Vector3 he = sn->call("get_size");
he[p_id] = d;
- sn->call("set_extents", he);
+ sn->call("set_size", he);
}
}
@@ -3259,7 +3259,7 @@ void GPUParticlesCollision3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Radius"));
ur->add_do_method(sn, "set_radius", sn->call("get_radius"));
ur->add_undo_method(sn, "set_radius", p_restore);
@@ -3268,14 +3268,14 @@ void GPUParticlesCollision3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *
if (Object::cast_to<GPUParticlesCollisionBox3D>(sn) || Object::cast_to<GPUParticlesAttractorBox3D>(sn) || Object::cast_to<GPUParticlesAttractorVectorField3D>(sn) || Object::cast_to<GPUParticlesCollisionSDF3D>(sn) || Object::cast_to<GPUParticlesCollisionHeightField3D>(sn)) {
if (p_cancel) {
- sn->call("set_extents", p_restore);
+ sn->call("set_size", p_restore);
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
- ur->create_action(TTR("Change Box Shape Extents"));
- ur->add_do_method(sn, "set_extents", sn->call("get_extents"));
- ur->add_undo_method(sn, "set_extents", p_restore);
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
+ ur->create_action(TTR("Change Box Shape Size"));
+ ur->add_do_method(sn, "set_size", sn->call("get_size"));
+ ur->add_undo_method(sn, "set_size", p_restore);
ur->commit_action();
}
}
@@ -3342,8 +3342,8 @@ void GPUParticlesCollision3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
if (Object::cast_to<GPUParticlesCollisionBox3D>(cs) || Object::cast_to<GPUParticlesAttractorBox3D>(cs) || Object::cast_to<GPUParticlesAttractorVectorField3D>(cs) || Object::cast_to<GPUParticlesCollisionSDF3D>(cs) || Object::cast_to<GPUParticlesCollisionHeightField3D>(cs)) {
Vector<Vector3> lines;
AABB aabb;
- aabb.position = -cs->call("get_extents").operator Vector3();
- aabb.size = aabb.position * -2;
+ aabb.size = cs->call("get_size").operator Vector3();
+ aabb.position = aabb.size / -2;
for (int i = 0; i < 12; i++) {
Vector3 a, b;
@@ -3356,7 +3356,7 @@ void GPUParticlesCollision3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
for (int i = 0; i < 3; i++) {
Vector3 ax;
- ax[i] = cs->call("get_extents").operator Vector3()[i];
+ ax[i] = cs->call("get_size").operator Vector3()[i] / 2;
handles.push_back(ax);
}
@@ -3442,11 +3442,11 @@ int ReflectionProbeGizmoPlugin::get_priority() const {
String ReflectionProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
switch (p_id) {
case 0:
- return "Extents X";
+ return "Size X";
case 1:
- return "Extents Y";
+ return "Size Y";
case 2:
- return "Extents Z";
+ return "Size Z";
case 3:
return "Origin X";
case 4:
@@ -3460,7 +3460,7 @@ String ReflectionProbeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gi
Variant ReflectionProbeGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_node_3d());
- return AABB(probe->get_extents(), probe->get_origin_offset());
+ return AABB(probe->get_origin_offset(), probe->get_size());
}
void ReflectionProbeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
@@ -3470,7 +3470,7 @@ void ReflectionProbeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, in
Transform3D gi = gt.affine_inverse();
if (p_id < 3) {
- Vector3 extents = probe->get_extents();
+ Vector3 size = probe->get_size();
Vector3 ray_from = p_camera->project_ray_origin(p_point);
Vector3 ray_dir = p_camera->project_ray_normal(p_point);
@@ -3482,7 +3482,7 @@ void ReflectionProbeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, in
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(), axis * 16384, sg[0], sg[1], ra, rb);
- float d = ra[p_id];
+ float d = ra[p_id] * 2;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::snapped(d, Node3DEditor::get_singleton()->get_translate_snap());
}
@@ -3491,8 +3491,8 @@ void ReflectionProbeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, in
d = 0.001;
}
- extents[p_id] = d;
- probe->set_extents(extents);
+ size[p_id] = d;
+ probe->set_size(size);
} else {
p_id -= 3;
@@ -3526,17 +3526,17 @@ void ReflectionProbeGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo,
AABB restore = p_restore;
if (p_cancel) {
- probe->set_extents(restore.position);
- probe->set_origin_offset(restore.size);
+ probe->set_origin_offset(restore.position);
+ probe->set_size(restore.size);
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
- ur->create_action(TTR("Change Probe Extents"));
- ur->add_do_method(probe, "set_extents", probe->get_extents());
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
+ ur->create_action(TTR("Change Probe Size"));
+ ur->add_do_method(probe, "set_size", probe->get_size());
ur->add_do_method(probe, "set_origin_offset", probe->get_origin_offset());
- ur->add_undo_method(probe, "set_extents", restore.position);
- ur->add_undo_method(probe, "set_origin_offset", restore.size);
+ ur->add_undo_method(probe, "set_size", restore.size);
+ ur->add_undo_method(probe, "set_origin_offset", restore.position);
ur->commit_action();
}
@@ -3547,11 +3547,11 @@ void ReflectionProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> lines;
Vector<Vector3> internal_lines;
- Vector3 extents = probe->get_extents();
+ Vector3 size = probe->get_size();
AABB aabb;
- aabb.position = -extents;
- aabb.size = extents * 2;
+ aabb.position = -size / 2;
+ aabb.size = size;
for (int i = 0; i < 12; i++) {
Vector3 a, b;
@@ -3593,7 +3593,7 @@ void ReflectionProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
if (p_gizmo->is_selected()) {
Ref<Material> solid_material = get_material("reflection_probe_solid_material", p_gizmo);
- p_gizmo->add_solid_box(solid_material, probe->get_extents() * 2.0);
+ p_gizmo->add_solid_box(solid_material, probe->get_size());
}
p_gizmo->add_unscaled_billboard(icon, 0.05);
@@ -3627,11 +3627,11 @@ int DecalGizmoPlugin::get_priority() const {
String DecalGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
switch (p_id) {
case 0:
- return "Extents X";
+ return "Size X";
case 1:
- return "Extents Y";
+ return "Size Y";
case 2:
- return "Extents Z";
+ return "Size Z";
}
return "";
@@ -3639,7 +3639,7 @@ String DecalGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p
Variant DecalGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
Decal *decal = Object::cast_to<Decal>(p_gizmo->get_node_3d());
- return decal->get_extents();
+ return decal->get_size();
}
void DecalGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
@@ -3648,7 +3648,7 @@ void DecalGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bo
Transform3D gi = gt.affine_inverse();
- Vector3 extents = decal->get_extents();
+ Vector3 size = decal->get_size();
Vector3 ray_from = p_camera->project_ray_origin(p_point);
Vector3 ray_dir = p_camera->project_ray_normal(p_point);
@@ -3660,7 +3660,7 @@ void DecalGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bo
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(), axis * 16384, sg[0], sg[1], ra, rb);
- float d = ra[p_id];
+ float d = ra[p_id] * 2;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::snapped(d, Node3DEditor::get_singleton()->get_translate_snap());
}
@@ -3669,8 +3669,8 @@ void DecalGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bo
d = 0.001;
}
- extents[p_id] = d;
- decal->set_extents(extents);
+ size[p_id] = d;
+ decal->set_size(size);
}
void DecalGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
@@ -3679,14 +3679,14 @@ void DecalGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id,
Vector3 restore = p_restore;
if (p_cancel) {
- decal->set_extents(restore);
+ decal->set_size(restore);
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
- ur->create_action(TTR("Change Decal Extents"));
- ur->add_do_method(decal, "set_extents", decal->get_extents());
- ur->add_undo_method(decal, "set_extents", restore);
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
+ ur->create_action(TTR("Change Decal Size"));
+ ur->add_do_method(decal, "set_size", decal->get_size());
+ ur->add_undo_method(decal, "set_size", restore);
ur->commit_action();
}
@@ -3696,11 +3696,11 @@ void DecalGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->clear();
Vector<Vector3> lines;
- Vector3 extents = decal->get_extents();
+ Vector3 size = decal->get_size();
AABB aabb;
- aabb.position = -extents;
- aabb.size = extents * 2;
+ aabb.position = -size / 2;
+ aabb.size = size;
for (int i = 0; i < 12; i++) {
Vector3 a, b;
@@ -3718,8 +3718,9 @@ void DecalGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
}
- lines.push_back(Vector3(0, extents.y, 0));
- lines.push_back(Vector3(0, extents.y * 1.2, 0));
+ float half_size_y = size.y / 2;
+ lines.push_back(Vector3(0, half_size_y, 0));
+ lines.push_back(Vector3(0, half_size_y * 1.2, 0));
Vector<Vector3> handles;
@@ -3767,11 +3768,11 @@ int VoxelGIGizmoPlugin::get_priority() const {
String VoxelGIGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
switch (p_id) {
case 0:
- return "Extents X";
+ return "Size X";
case 1:
- return "Extents Y";
+ return "Size Y";
case 2:
- return "Extents Z";
+ return "Size Z";
}
return "";
@@ -3779,7 +3780,7 @@ String VoxelGIGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int
Variant VoxelGIGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_node_3d());
- return probe->get_extents();
+ return probe->get_size();
}
void VoxelGIGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
@@ -3788,7 +3789,7 @@ void VoxelGIGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id,
Transform3D gt = probe->get_global_transform();
Transform3D gi = gt.affine_inverse();
- Vector3 extents = probe->get_extents();
+ Vector3 size = probe->get_size();
Vector3 ray_from = p_camera->project_ray_origin(p_point);
Vector3 ray_dir = p_camera->project_ray_normal(p_point);
@@ -3800,7 +3801,7 @@ void VoxelGIGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id,
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(), axis * 16384, sg[0], sg[1], ra, rb);
- float d = ra[p_id];
+ float d = ra[p_id] * 2;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::snapped(d, Node3DEditor::get_singleton()->get_translate_snap());
}
@@ -3809,8 +3810,8 @@ void VoxelGIGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id,
d = 0.001;
}
- extents[p_id] = d;
- probe->set_extents(extents);
+ size[p_id] = d;
+ probe->set_size(size);
}
void VoxelGIGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
@@ -3819,14 +3820,14 @@ void VoxelGIGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_i
Vector3 restore = p_restore;
if (p_cancel) {
- probe->set_extents(restore);
+ probe->set_size(restore);
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
- ur->create_action(TTR("Change Probe Extents"));
- ur->add_do_method(probe, "set_extents", probe->get_extents());
- ur->add_undo_method(probe, "set_extents", restore);
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
+ ur->create_action(TTR("Change Probe Size"));
+ ur->add_do_method(probe, "set_size", probe->get_size());
+ ur->add_undo_method(probe, "set_size", restore);
ur->commit_action();
}
@@ -3840,11 +3841,11 @@ void VoxelGIGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->clear();
Vector<Vector3> lines;
- Vector3 extents = probe->get_extents();
+ Vector3 size = probe->get_size();
static const int subdivs[VoxelGI::SUBDIV_MAX] = { 64, 128, 256, 512 };
- AABB aabb = AABB(-extents, extents * 2);
+ AABB aabb = AABB(-size / 2, size);
int subdiv = subdivs[probe->get_subdiv()];
float cell_size = aabb.get_longest_axis_size() / subdiv;
@@ -4363,7 +4364,7 @@ void CollisionShape3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, i
Ref<BoxShape3D> bs = s;
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
- float d = ra[p_id];
+ float d = ra[p_id] * 2;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::snapped(d, Node3DEditor::get_singleton()->get_translate_snap());
}
@@ -4373,7 +4374,7 @@ void CollisionShape3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, i
}
Vector3 he = bs->get_size();
- he[p_id] = d * 2;
+ he[p_id] = d;
bs->set_size(he);
}
@@ -4438,7 +4439,7 @@ void CollisionShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Sphere Shape Radius"));
ur->add_do_method(ss.ptr(), "set_radius", ss->get_radius());
ur->add_undo_method(ss.ptr(), "set_radius", p_restore);
@@ -4452,7 +4453,7 @@ void CollisionShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Box Shape Size"));
ur->add_do_method(ss.ptr(), "set_size", ss->get_size());
ur->add_undo_method(ss.ptr(), "set_size", p_restore);
@@ -4469,7 +4470,7 @@ void CollisionShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
if (p_id == 0) {
ur->create_action(TTR("Change Capsule Shape Radius"));
ur->add_do_method(ss.ptr(), "set_radius", ss->get_radius());
@@ -4494,7 +4495,7 @@ void CollisionShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
if (p_id == 0) {
ur->create_action(TTR("Change Cylinder Shape Radius"));
ur->add_do_method(ss.ptr(), "set_radius", ss->get_radius());
@@ -4519,7 +4520,7 @@ void CollisionShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Separation Ray Shape Length"));
ur->add_do_method(ss.ptr(), "set_length", ss->get_length());
ur->add_undo_method(ss.ptr(), "set_length", p_restore);
@@ -5057,8 +5058,8 @@ void NavigationLink3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector3 up_vector = NavigationServer3D::get_singleton()->map_get_up(nav_map);
Vector3::Axis up_axis = up_vector.max_axis_index();
- Vector3 start_location = link->get_start_location();
- Vector3 end_location = link->get_end_location();
+ Vector3 start_position = link->get_start_position();
+ Vector3 end_position = link->get_end_position();
Ref<Material> link_material = get_material("navigation_link_material", p_gizmo);
Ref<Material> link_material_disabled = get_material("navigation_link_material_disabled", p_gizmo);
@@ -5068,10 +5069,10 @@ void NavigationLink3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
// Draw line between the points.
Vector<Vector3> lines;
- lines.append(start_location);
- lines.append(end_location);
+ lines.append(start_position);
+ lines.append(end_position);
- // Draw start location search radius
+ // Draw start position search radius
for (int i = 0; i < 30; i++) {
// Create a circle
const float ra = Math::deg_to_rad((float)(i * 12));
@@ -5082,21 +5083,21 @@ void NavigationLink3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
// Draw axis-aligned circle
switch (up_axis) {
case Vector3::AXIS_X:
- lines.append(start_location + Vector3(0, a.x, a.y));
- lines.append(start_location + Vector3(0, b.x, b.y));
+ lines.append(start_position + Vector3(0, a.x, a.y));
+ lines.append(start_position + Vector3(0, b.x, b.y));
break;
case Vector3::AXIS_Y:
- lines.append(start_location + Vector3(a.x, 0, a.y));
- lines.append(start_location + Vector3(b.x, 0, b.y));
+ lines.append(start_position + Vector3(a.x, 0, a.y));
+ lines.append(start_position + Vector3(b.x, 0, b.y));
break;
case Vector3::AXIS_Z:
- lines.append(start_location + Vector3(a.x, a.y, 0));
- lines.append(start_location + Vector3(b.x, b.y, 0));
+ lines.append(start_position + Vector3(a.x, a.y, 0));
+ lines.append(start_position + Vector3(b.x, b.y, 0));
break;
}
}
- // Draw end location search radius
+ // Draw end position search radius
for (int i = 0; i < 30; i++) {
// Create a circle
const float ra = Math::deg_to_rad((float)(i * 12));
@@ -5107,16 +5108,16 @@ void NavigationLink3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
// Draw axis-aligned circle
switch (up_axis) {
case Vector3::AXIS_X:
- lines.append(end_location + Vector3(0, a.x, a.y));
- lines.append(end_location + Vector3(0, b.x, b.y));
+ lines.append(end_position + Vector3(0, a.x, a.y));
+ lines.append(end_position + Vector3(0, b.x, b.y));
break;
case Vector3::AXIS_Y:
- lines.append(end_location + Vector3(a.x, 0, a.y));
- lines.append(end_location + Vector3(b.x, 0, b.y));
+ lines.append(end_position + Vector3(a.x, 0, a.y));
+ lines.append(end_position + Vector3(b.x, 0, b.y));
break;
case Vector3::AXIS_Z:
- lines.append(end_location + Vector3(a.x, a.y, 0));
- lines.append(end_location + Vector3(b.x, b.y, 0));
+ lines.append(end_position + Vector3(a.x, a.y, 0));
+ lines.append(end_position + Vector3(b.x, b.y, 0));
break;
}
}
@@ -5125,8 +5126,8 @@ void NavigationLink3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_collision_segments(lines);
Vector<Vector3> handles;
- handles.append(start_location);
- handles.append(end_location);
+ handles.append(start_position);
+ handles.append(end_position);
p_gizmo->add_handles(handles, handles_material);
}
@@ -5136,7 +5137,7 @@ String NavigationLink3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_g
Variant NavigationLink3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
NavigationLink3D *link = Object::cast_to<NavigationLink3D>(p_gizmo->get_node_3d());
- return p_id == 0 ? link->get_start_location() : link->get_end_location();
+ return p_id == 0 ? link->get_start_position() : link->get_end_position();
}
void NavigationLink3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
@@ -5151,8 +5152,8 @@ void NavigationLink3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, i
Vector3 ray_from = p_camera->project_ray_origin(p_point);
Vector3 ray_dir = p_camera->project_ray_normal(p_point);
- Vector3 location = p_id == 0 ? link->get_start_location() : link->get_end_location();
- Plane move_plane = Plane(cam_dir, gt.xform(location));
+ Vector3 position = p_id == 0 ? link->get_start_position() : link->get_end_position();
+ Plane move_plane = Plane(cam_dir, gt.xform(position));
Vector3 intersection;
if (!move_plane.intersects_ray(ray_from, ray_dir, &intersection)) {
@@ -5164,11 +5165,11 @@ void NavigationLink3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, i
intersection.snap(Vector3(snap, snap, snap));
}
- location = gi.xform(intersection);
+ position = gi.xform(intersection);
if (p_id == 0) {
- link->set_start_location(location);
+ link->set_start_position(position);
} else if (p_id == 1) {
- link->set_end_location(location);
+ link->set_end_position(position);
}
}
@@ -5177,22 +5178,22 @@ void NavigationLink3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo
if (p_cancel) {
if (p_id == 0) {
- link->set_start_location(p_restore);
+ link->set_start_position(p_restore);
} else {
- link->set_end_location(p_restore);
+ link->set_end_position(p_restore);
}
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
if (p_id == 0) {
- ur->create_action(TTR("Change Start Location"));
- ur->add_do_method(link, "set_start_location", link->get_start_location());
- ur->add_undo_method(link, "set_start_location", p_restore);
+ ur->create_action(TTR("Change Start Position"));
+ ur->add_do_method(link, "set_start_position", link->get_start_position());
+ ur->add_undo_method(link, "set_start_position", p_restore);
} else {
- ur->create_action(TTR("Change End Location"));
- ur->add_do_method(link, "set_end_location", link->get_end_location());
- ur->add_undo_method(link, "set_end_location", p_restore);
+ ur->create_action(TTR("Change End Position"));
+ ur->add_do_method(link, "set_end_position", link->get_end_position());
+ ur->add_undo_method(link, "set_end_position", p_restore);
}
ur->commit_action();
@@ -5902,11 +5903,11 @@ int FogVolumeGizmoPlugin::get_priority() const {
}
String FogVolumeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- return "Extents";
+ return "Size";
}
Variant FogVolumeGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- return Vector3(p_gizmo->get_node_3d()->call("get_extents"));
+ return Vector3(p_gizmo->get_node_3d()->call("get_size"));
}
void FogVolumeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
@@ -5924,7 +5925,7 @@ void FogVolumeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id
axis[p_id] = 1.0;
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(), axis * 4096, sg[0], sg[1], ra, rb);
- float d = ra[p_id];
+ float d = ra[p_id] * 2;
if (Node3DEditor::get_singleton()->is_snap_enabled()) {
d = Math::snapped(d, Node3DEditor::get_singleton()->get_translate_snap());
}
@@ -5933,23 +5934,23 @@ void FogVolumeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id
d = 0.001;
}
- Vector3 he = sn->call("get_extents");
+ Vector3 he = sn->call("get_size");
he[p_id] = d;
- sn->call("set_extents", he);
+ sn->call("set_size", he);
}
void FogVolumeGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
Node3D *sn = p_gizmo->get_node_3d();
if (p_cancel) {
- sn->call("set_extents", p_restore);
+ sn->call("set_size", p_restore);
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
- ur->create_action(TTR("Change Fog Volume Extents"));
- ur->add_do_method(sn, "set_extents", sn->call("get_extents"));
- ur->add_undo_method(sn, "set_extents", p_restore);
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
+ ur->create_action(TTR("Change Fog Volume Size"));
+ ur->add_do_method(sn, "set_size", sn->call("get_size"));
+ ur->add_undo_method(sn, "set_size", p_restore);
ur->commit_action();
}
@@ -5968,8 +5969,8 @@ void FogVolumeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> lines;
AABB aabb;
- aabb.position = -cs->call("get_extents").operator Vector3();
- aabb.size = aabb.position * -2;
+ aabb.size = cs->call("get_size").operator Vector3();
+ aabb.position = aabb.size / -2;
for (int i = 0; i < 12; i++) {
Vector3 a, b;
@@ -5982,7 +5983,7 @@ void FogVolumeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
for (int i = 0; i < 3; i++) {
Vector3 ax;
- ax[i] = cs->call("get_extents").operator Vector3()[i];
+ ax[i] = cs->call("get_size").operator Vector3()[i] / 2;
handles.push_back(ax);
}
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 1147d5ff8c..36d1e54246 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -1414,7 +1414,7 @@ Transform3D Node3DEditorViewport::_compute_transform(TransformMode p_mode, const
// Recalculate orthogonalized scale without moving origin.
if (p_orthogonal) {
- s.basis = p_original_local.basis.scaled_orthogonal(p_motion + Vector3(1, 1, 1));
+ s.basis = p_original.basis.scaled_orthogonal(p_motion + Vector3(1, 1, 1));
// The scaled_orthogonal() does not require orthogonal Basis,
// but it may make a bit skew by precision problems.
s.basis.orthogonalize();
@@ -1911,7 +1911,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
}
- if (spatial_editor->get_current_hover_gizmo().is_null() && (m->get_button_mask() & MouseButton::MASK_LEFT) == MouseButton::NONE && !_edit.gizmo.is_valid()) {
+ if (spatial_editor->get_current_hover_gizmo().is_null() && !m->get_button_mask().has_flag(MouseButtonMask::LEFT) && !_edit.gizmo.is_valid()) {
_transform_gizmo_select(_edit.mouse_pos, true);
}
@@ -1924,7 +1924,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
String n = _edit.gizmo->get_handle_name(_edit.gizmo_handle, _edit.gizmo_handle_secondary);
set_message(n + ": " + String(v));
- } else if ((m->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE || _edit.instant) {
+ } else if (m->get_button_mask().has_flag(MouseButtonMask::LEFT) || _edit.instant) {
if (nav_scheme == NAVIGATION_MAYA && m->is_alt_pressed()) {
nav_mode = NAVIGATION_ORBIT;
} else if (nav_scheme == NAVIGATION_MODO && m->is_alt_pressed() && m->is_shift_pressed()) {
@@ -1963,7 +1963,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
update_transform(m->get_position(), _get_key_modifier(m) == Key::SHIFT);
}
- } else if ((m->get_button_mask() & MouseButton::MASK_RIGHT) != MouseButton::NONE || freelook_active) {
+ } else if (m->get_button_mask().has_flag(MouseButtonMask::RIGHT) || freelook_active) {
if (nav_scheme == NAVIGATION_MAYA && m->is_alt_pressed()) {
nav_mode = NAVIGATION_ZOOM;
} else if (freelook_active) {
@@ -1972,7 +1972,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
nav_mode = NAVIGATION_PAN;
}
- } else if ((m->get_button_mask() & MouseButton::MASK_MIDDLE) != MouseButton::NONE) {
+ } else if (m->get_button_mask().has_flag(MouseButtonMask::MIDDLE)) {
const Key mod = _get_key_modifier(m);
if (nav_scheme == NAVIGATION_GODOT) {
if (mod == _get_key_modifier_setting("editors/3d/navigation/pan_modifier")) {
@@ -2208,11 +2208,6 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (ED_IS_SHORTCUT("spatial_editor/focus_selection", p_event)) {
_menu_option(VIEW_CENTER_TO_SELECTION);
}
- // Orthgonal mode doesn't work in freelook.
- if (!freelook_active && ED_IS_SHORTCUT("spatial_editor/switch_perspective_orthogonal", p_event)) {
- _menu_option(orthogonal ? VIEW_PERSPECTIVE : VIEW_ORTHOGONAL);
- _update_name();
- }
if (ED_IS_SHORTCUT("spatial_editor/align_transform_with_view", p_event)) {
_menu_option(VIEW_ALIGN_TRANSFORM_WITH_VIEW);
}
@@ -3104,7 +3099,7 @@ void Node3DEditorViewport::_draw() {
}
void Node3DEditorViewport::_menu_option(int p_option) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (p_option) {
case VIEW_TOP: {
cursor.y_rot = 0;
@@ -3279,6 +3274,10 @@ void Node3DEditorViewport::_menu_option(int p_option) {
_update_name();
} break;
+ case VIEW_SWITCH_PERSPECTIVE_ORTHOGONAL: {
+ _menu_option(orthogonal ? VIEW_PERSPECTIVE : VIEW_ORTHOGONAL);
+
+ } break;
case VIEW_AUTO_ORTHOGONAL: {
int idx = view_menu->get_popup()->get_item_index(VIEW_AUTO_ORTHOGONAL);
bool current = view_menu->get_popup()->is_item_checked(idx);
@@ -3894,8 +3893,6 @@ Dictionary Node3DEditorViewport::get_state() const {
void Node3DEditorViewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("update_transform_gizmo_view"), &Node3DEditorViewport::update_transform_gizmo_view); // Used by call_deferred.
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &Node3DEditorViewport::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &Node3DEditorViewport::drop_data_fw);
ADD_SIGNAL(MethodInfo("toggle_maximize_view", PropertyInfo(Variant::OBJECT, "viewport")));
ADD_SIGNAL(MethodInfo("clicked", PropertyInfo(Variant::OBJECT, "viewport")));
@@ -4257,7 +4254,7 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po
instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path));
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(parent, "add_child", instantiated_scene, true);
undo_redo->add_do_method(instantiated_scene, "set_owner", EditorNode::get_singleton()->get_edited_scene());
undo_redo->add_do_reference(instantiated_scene);
@@ -4286,7 +4283,7 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po
}
void Node3DEditorViewport::_perform_drop_data() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (spatial_editor->get_preview_material_target().is_valid()) {
GeometryInstance3D *geometry_instance = Object::cast_to<GeometryInstance3D>(ObjectDB::get_instance(spatial_editor->get_preview_material_target()));
MeshInstance3D *mesh_instance = Object::cast_to<MeshInstance3D>(ObjectDB::get_instance(spatial_editor->get_preview_material_target()));
@@ -4496,7 +4493,7 @@ void Node3DEditorViewport::commit_transform() {
TTRC("Translate"),
TTRC("Scale"),
};
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(_transform_name[_edit.mode]);
List<Node *> &selection = editor_selection->get_selected_node_list();
@@ -4614,7 +4611,9 @@ void Node3DEditorViewport::update_transform(Point2 p_mousepos, bool p_shift) {
// TRANSLATORS: Refers to changing the scale of a node in the 3D editor.
set_message(TTR("Scaling:") + " (" + String::num(motion_snapped.x, snap_step_decimals) + ", " +
String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")");
- motion = _edit.original.basis.inverse().xform(motion);
+ if (local_coords) {
+ motion = _edit.original.basis.inverse().xform(motion);
+ }
List<Node *> &selection = editor_selection->get_selected_node_list();
for (Node *E : selection) {
@@ -4642,7 +4641,7 @@ void Node3DEditorViewport::update_transform(Point2 p_mousepos, bool p_shift) {
se->gizmo->set_subgizmo_transform(GE.key, new_xform);
}
} else {
- Transform3D new_xform = _compute_transform(TRANSFORM_SCALE, se->original, se->original_local, motion, snap, local_coords, sp->get_rotation_edit_mode() != Node3D::ROTATION_EDIT_MODE_BASIS);
+ Transform3D new_xform = _compute_transform(TRANSFORM_SCALE, se->original, se->original_local, motion, snap, local_coords, sp->get_rotation_edit_mode() != Node3D::ROTATION_EDIT_MODE_BASIS && _edit.plane != TRANSFORM_VIEW);
_transform_gizmo_apply(se->sp, new_xform, local_coords);
}
}
@@ -4715,7 +4714,9 @@ void Node3DEditorViewport::update_transform(Point2 p_mousepos, bool p_shift) {
// TRANSLATORS: Refers to changing the position of a node in the 3D editor.
set_message(TTR("Translating:") + " (" + String::num(motion_snapped.x, snap_step_decimals) + ", " +
String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")");
- motion = spatial_editor->get_gizmo_transform().basis.inverse().xform(motion);
+ if (local_coords) {
+ motion = spatial_editor->get_gizmo_transform().basis.inverse().xform(motion);
+ }
List<Node *> &selection = editor_selection->get_selected_node_list();
for (Node *E : selection) {
@@ -4921,7 +4922,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
c->add_child(viewport);
surface = memnew(Control);
- surface->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_CD(surface, Node3DEditorViewport);
add_child(surface);
surface->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
surface->set_clip_contents(true);
@@ -4954,8 +4955,9 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/front_view"), VIEW_FRONT);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/rear_view"), VIEW_REAR);
view_menu->get_popup()->add_separator();
- view_menu->get_popup()->add_radio_check_item(TTR("Perspective") + " (" + ED_GET_SHORTCUT("spatial_editor/switch_perspective_orthogonal")->get_as_text() + ")", VIEW_PERSPECTIVE);
- view_menu->get_popup()->add_radio_check_item(TTR("Orthogonal") + " (" + ED_GET_SHORTCUT("spatial_editor/switch_perspective_orthogonal")->get_as_text() + ")", VIEW_ORTHOGONAL);
+ view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/switch_perspective_orthogonal"), VIEW_SWITCH_PERSPECTIVE_ORTHOGONAL);
+ view_menu->get_popup()->add_radio_check_item(TTR("Perspective"), VIEW_PERSPECTIVE);
+ view_menu->get_popup()->add_radio_check_item(TTR("Orthogonal"), VIEW_ORTHOGONAL);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_PERSPECTIVE), true);
view_menu->get_popup()->add_check_item(TTR("Auto Orthogonal Enabled"), VIEW_AUTO_ORTHOGONAL);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_AUTO_ORTHOGONAL), true);
@@ -6014,7 +6016,7 @@ void Node3DEditor::_xform_dialog_action() {
t.basis.rotate(rotate);
t.origin = translate;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("XForm Dialog"));
const List<Node *> &selection = editor_selection->get_selected_node_list();
@@ -6126,7 +6128,7 @@ void Node3DEditor::_update_camera_override_viewport(Object *p_viewport) {
}
void Node3DEditor::_menu_item_pressed(int p_option) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (p_option) {
case MENU_TOOL_SELECT:
case MENU_TOOL_MOVE:
@@ -7312,7 +7314,7 @@ void Node3DEditor::_snap_selected_nodes_to_floor() {
}
if (snapped_to_floor) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Snap Nodes to Floor"));
// Perform snapping if at least one node can be snapped
@@ -7382,7 +7384,7 @@ void Node3DEditor::_add_sun_to_scene(bool p_already_added_environment) {
ERR_FAIL_COND(!base);
Node *new_sun = preview_sun->duplicate();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Preview Sun to Scene"));
undo_redo->add_do_method(base, "add_child", new_sun, true);
// Move to the beginning of the scene tree since more "global" nodes
@@ -7416,7 +7418,7 @@ void Node3DEditor::_add_environment_to_scene(bool p_already_added_sun) {
new_env->set_camera_attributes(preview_environment->get_camera_attributes()->duplicate(true));
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Preview Environment to Scene"));
undo_redo->add_do_method(base, "add_child", new_env, true);
// Move to the beginning of the scene tree since more "global" nodes
@@ -7995,7 +7997,7 @@ void Node3DEditor::_update_preview_environment() {
void Node3DEditor::_sun_direction_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
- if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (mm.is_valid() && (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
sun_rotation.x += mm->get_relative().y * (0.02 * EDSCALE);
sun_rotation.y -= mm->get_relative().x * (0.02 * EDSCALE);
sun_rotation.x = CLAMP(sun_rotation.x, -Math_TAU / 4, Math_TAU / 4);
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index edc09f115a..a1fd9757d0 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -117,6 +117,7 @@ class Node3DEditorViewport : public Control {
VIEW_PERSPECTIVE,
VIEW_ENVIRONMENT,
VIEW_ORTHOGONAL,
+ VIEW_SWITCH_PERSPECTIVE_ORTHOGONAL,
VIEW_HALF_RESOLUTION,
VIEW_AUDIO_LISTENER,
VIEW_AUDIO_DOPPLER,
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index b78ffb7612..63f6643ba3 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -120,7 +120,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
// Check for point deletion.
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if ((mb->get_button_index() == MouseButton::RIGHT && mode == MODE_EDIT) || (mb->get_button_index() == MouseButton::LEFT && mode == MODE_DELETE)) {
if (dist_to_p < grab_threshold) {
undo_redo->create_action(TTR("Remove Point from Curve"));
@@ -155,7 +155,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && ((mb->is_command_or_control_pressed() && mode == MODE_EDIT) || mode == MODE_CREATE)) {
Ref<Curve2D> curve = node->get_curve();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Point to Curve"));
undo_redo->add_do_method(curve.ptr(), "add_point", cpoint);
undo_redo->add_undo_method(curve.ptr(), "remove_point", curve->get_point_count());
@@ -191,7 +191,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
insertion_point = curve->get_point_count() - 2;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Split Curve"));
undo_redo->add_do_method(curve.ptr(), "add_point", xform.affine_inverse().xform(gpoint2), Vector2(0, 0), Vector2(0, 0), insertion_point + 1);
undo_redo->add_undo_method(curve.ptr(), "remove_point", insertion_point + 1);
@@ -215,7 +215,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (!mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && action != ACTION_NONE) {
Ref<Curve2D> curve = node->get_curve();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
switch (action) {
case ACTION_NONE:
@@ -491,7 +491,7 @@ void Path2DEditor::_mode_selected(int p_mode) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Point from Curve"));
undo_redo->add_do_method(node->get_curve().ptr(), "add_point", begin);
undo_redo->add_undo_method(node->get_curve().ptr(), "remove_point", node->get_curve()->get_point_count());
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index 917b8245a3..75cd04bee8 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -174,7 +174,7 @@ void Path3DGizmo::commit_handle(int p_id, bool p_secondary, const Variant &p_res
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
if (!p_secondary) {
if (p_cancel) {
@@ -409,7 +409,7 @@ EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_3d_gui_input(Camera3D *p
}
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
if (closest_seg != -1) {
//subdivide
@@ -451,21 +451,21 @@ EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_3d_gui_input(Camera3D *p
// Find the offset and point index of the place to break up.
// Also check for the control points.
if (dist_to_p < click_dist) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Remove Path Point"));
ur->add_do_method(c.ptr(), "remove_point", i);
ur->add_undo_method(c.ptr(), "add_point", c->get_point_position(i), c->get_point_in(i), c->get_point_out(i), i);
ur->commit_action();
return EditorPlugin::AFTER_GUI_INPUT_STOP;
} else if (dist_to_p_out < click_dist) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Remove Out-Control Point"));
ur->add_do_method(c.ptr(), "set_point_out", i, Vector3());
ur->add_undo_method(c.ptr(), "set_point_out", i, c->get_point_out(i));
ur->commit_action();
return EditorPlugin::AFTER_GUI_INPUT_STOP;
} else if (dist_to_p_in < click_dist) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Remove In-Control Point"));
ur->add_do_method(c.ptr(), "set_point_in", i, Vector3());
ur->add_undo_method(c.ptr(), "set_point_in", i, c->get_point_in(i));
@@ -544,7 +544,7 @@ void Path3DEditorPlugin::_close_curve() {
if (c->get_point_position(0) == c->get_point_position(c->get_point_count() - 1)) {
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Close Curve"));
ur->add_do_method(c.ptr(), "add_point", c->get_point_position(0), c->get_point_in(0), c->get_point_out(0), -1);
ur->add_undo_method(c.ptr(), "remove_point", c->get_point_count());
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 9d8f1a1578..fb35668310 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -156,7 +156,7 @@ void Polygon2DEditor::_sync_bones() {
Array new_bones = node->call("_get_bones");
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Sync Bones"));
undo_redo->add_do_method(node, "_set_bones", new_bones);
undo_redo->add_undo_method(node, "_set_bones", prev_bones);
@@ -286,7 +286,7 @@ void Polygon2DEditor::_uv_edit_popup_hide() {
}
void Polygon2DEditor::_menu_option(int p_option) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (p_option) {
case MODE_EDIT_UV: {
if (node->get_texture().is_null()) {
@@ -399,7 +399,7 @@ void Polygon2DEditor::_update_polygon_editing_state() {
void Polygon2DEditor::_commit_action() {
// Makes that undo/redoing actions made outside of the UV editor still affect its polygon.
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(uv_edit_draw, "queue_redraw");
undo_redo->add_undo_method(uv_edit_draw, "queue_redraw");
undo_redo->add_do_method(CanvasItemEditor::get_singleton(), "update_viewport");
@@ -467,7 +467,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
mtx.columns[2] = -uv_draw_ofs;
mtx.scale_basis(Vector2(uv_draw_zoom, uv_draw_zoom));
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<InputEventMouseButton> mb = p_input;
if (mb.is_valid()) {
@@ -939,21 +939,13 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
}
-void Polygon2DEditor::_uv_scroll_callback(Vector2 p_scroll_vec, bool p_alt) {
- _uv_pan_callback(-p_scroll_vec * 32);
-}
-
-void Polygon2DEditor::_uv_pan_callback(Vector2 p_scroll_vec) {
+void Polygon2DEditor::_uv_pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event) {
uv_hscroll->set_value(uv_hscroll->get_value() - p_scroll_vec.x);
uv_vscroll->set_value(uv_vscroll->get_value() - p_scroll_vec.y);
}
-void Polygon2DEditor::_uv_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) {
- if (p_scroll_vec.y < 0) {
- uv_zoom->set_value(uv_zoom->get_value() / (1 - (0.1 * Math::abs(p_scroll_vec.y))));
- } else {
- uv_zoom->set_value(uv_zoom->get_value() * (1 - (0.1 * Math::abs(p_scroll_vec.y))));
- }
+void Polygon2DEditor::_uv_zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event) {
+ uv_zoom->set_value(uv_zoom->get_value() * p_zoom_factor);
}
void Polygon2DEditor::_uv_scroll_changed(real_t) {
@@ -1254,7 +1246,7 @@ Polygon2DEditor::Polygon2DEditor() {
uv_edit = memnew(AcceptDialog);
add_child(uv_edit);
uv_edit->set_title(TTR("Polygon 2D UV Editor"));
- uv_edit->connect("cancelled", callable_mp(this, &Polygon2DEditor::_uv_edit_popup_hide));
+ uv_edit->connect("canceled", callable_mp(this, &Polygon2DEditor::_uv_edit_popup_hide));
VBoxContainer *uv_main_vb = memnew(VBoxContainer);
uv_edit->add_child(uv_main_vb);
@@ -1478,7 +1470,7 @@ Polygon2DEditor::Polygon2DEditor() {
bone_scroll->add_child(bone_scroll_vb);
uv_panner.instantiate();
- uv_panner->set_callbacks(callable_mp(this, &Polygon2DEditor::_uv_scroll_callback), callable_mp(this, &Polygon2DEditor::_uv_pan_callback), callable_mp(this, &Polygon2DEditor::_uv_zoom_callback));
+ uv_panner->set_callbacks(callable_mp(this, &Polygon2DEditor::_uv_pan_callback), callable_mp(this, &Polygon2DEditor::_uv_zoom_callback));
uv_edit_draw->connect("draw", callable_mp(this, &Polygon2DEditor::_uv_draw));
uv_edit_draw->connect("gui_input", callable_mp(this, &Polygon2DEditor::_uv_input));
diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h
index 7246c08bea..2c55a5f631 100644
--- a/editor/plugins/polygon_2d_editor_plugin.h
+++ b/editor/plugins/polygon_2d_editor_plugin.h
@@ -90,9 +90,8 @@ class Polygon2DEditor : public AbstractPolygon2DEditor {
TextureRect *uv_icon_zoom = nullptr;
Ref<ViewPanner> uv_panner;
- void _uv_scroll_callback(Vector2 p_scroll_vec, bool p_alt);
- void _uv_pan_callback(Vector2 p_scroll_vec);
- void _uv_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt);
+ void _uv_pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event);
+ void _uv_zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event);
VBoxContainer *bone_scroll_main_vb = nullptr;
ScrollContainer *bone_scroll = nullptr;
diff --git a/editor/plugins/polygon_3d_editor_plugin.cpp b/editor/plugins/polygon_3d_editor_plugin.cpp
index 294aa32444..9defb4de9b 100644
--- a/editor/plugins/polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/polygon_3d_editor_plugin.cpp
@@ -96,7 +96,7 @@ void Polygon3DEditor::_menu_option(int p_option) {
void Polygon3DEditor::_wip_close() {
Object *obj = node_resource.is_valid() ? (Object *)node_resource.ptr() : node;
ERR_FAIL_COND_MSG(!obj, "Edited object is not valid.");
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Create Polygon3D"));
undo_redo->add_undo_method(obj, "set_polygon", obj->call("get_polygon"));
undo_redo->add_do_method(obj, "set_polygon", wip);
@@ -186,7 +186,7 @@ EditorPlugin::AfterGUIInput Polygon3DEditor::forward_3d_gui_input(Camera3D *p_ca
if (mb->is_pressed()) {
if (mb->is_ctrl_pressed()) {
if (poly.size() < 3) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_undo_method(obj, "set_polygon", poly);
poly.push_back(cpoint);
@@ -265,7 +265,7 @@ EditorPlugin::AfterGUIInput Polygon3DEditor::forward_3d_gui_input(Camera3D *p_ca
ERR_FAIL_INDEX_V(edited_point, poly.size(), EditorPlugin::AFTER_GUI_INPUT_PASS);
poly.write[edited_point] = edited_point_pos;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_do_method(obj, "set_polygon", poly);
undo_redo->add_undo_method(obj, "set_polygon", pre_move_edit);
@@ -294,7 +294,7 @@ EditorPlugin::AfterGUIInput Polygon3DEditor::forward_3d_gui_input(Camera3D *p_ca
}
if (closest_idx >= 0) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
undo_redo->add_undo_method(obj, "set_polygon", poly);
poly.remove_at(closest_idx);
@@ -313,7 +313,7 @@ EditorPlugin::AfterGUIInput Polygon3DEditor::forward_3d_gui_input(Camera3D *p_ca
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
- if (edited_point != -1 && (wip_active || (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE)) {
+ if (edited_point != -1 && (wip_active || mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
Vector2 gpoint = mm->get_position();
Vector3 ray_from = p_camera->project_ray_origin(gpoint);
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index 27cad1cb7e..dcbff2c756 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -71,7 +71,7 @@ void ResourcePreloaderEditor::_files_load_request(const Vector<String> &p_paths)
name = basename + " " + itos(counter);
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Resource"));
undo_redo->add_do_method(preloader, "add_resource", name, resource);
undo_redo->add_undo_method(preloader, "remove_resource", name);
@@ -116,7 +116,7 @@ void ResourcePreloaderEditor::_item_edited() {
}
Ref<Resource> samp = preloader->get_resource(old_name);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Rename Resource"));
undo_redo->add_do_method(preloader, "remove_resource", old_name);
undo_redo->add_do_method(preloader, "add_resource", new_name, samp);
@@ -129,7 +129,7 @@ void ResourcePreloaderEditor::_item_edited() {
}
void ResourcePreloaderEditor::_remove_resource(const String &p_to_remove) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete Resource"));
undo_redo->add_do_method(preloader, "remove_resource", p_to_remove);
undo_redo->add_undo_method(preloader, "add_resource", p_to_remove, preloader->get_resource(p_to_remove));
@@ -163,7 +163,7 @@ void ResourcePreloaderEditor::_paste_pressed() {
name = basename + " " + itos(counter);
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Paste Resource"));
undo_redo->add_do_method(preloader, "add_resource", name, r);
undo_redo->add_undo_method(preloader, "remove_resource", name);
@@ -322,7 +322,7 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2 &p_point, const Variant
name = basename + "_" + itos(counter);
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Resource"));
undo_redo->add_do_method(preloader, "add_resource", name, r);
undo_redo->add_undo_method(preloader, "remove_resource", name);
@@ -342,10 +342,6 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2 &p_point, const Variant
void ResourcePreloaderEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_library"), &ResourcePreloaderEditor::_update_library);
ClassDB::bind_method(D_METHOD("_remove_resource", "to_remove"), &ResourcePreloaderEditor::_remove_resource);
-
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &ResourcePreloaderEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &ResourcePreloaderEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &ResourcePreloaderEditor::drop_data_fw);
}
ResourcePreloaderEditor::ResourcePreloaderEditor() {
@@ -379,7 +375,7 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
tree->set_column_expand(1, true);
tree->set_v_size_flags(SIZE_EXPAND_FILL);
- tree->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(tree, ResourcePreloaderEditor);
vbc->add_child(tree);
dialog = memnew(AcceptDialog);
diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp
index d894ba4c4a..e8abecd115 100644
--- a/editor/plugins/root_motion_editor_plugin.cpp
+++ b/editor/plugins/root_motion_editor_plugin.cpp
@@ -229,7 +229,7 @@ bool EditorInspectorRootMotionPlugin::can_handle(Object *p_object) {
return true; // Can handle everything.
}
-bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
if (p_path == "root_motion_track" && p_object->is_class("AnimationTree") && p_type == Variant::NODE_PATH) {
EditorPropertyRootMotion *editor = memnew(EditorPropertyRootMotion);
add_property_editor(p_path, editor);
diff --git a/editor/plugins/root_motion_editor_plugin.h b/editor/plugins/root_motion_editor_plugin.h
index f9b1a9f478..d27f0d30cc 100644
--- a/editor/plugins/root_motion_editor_plugin.h
+++ b/editor/plugins/root_motion_editor_plugin.h
@@ -63,7 +63,7 @@ class EditorInspectorRootMotionPlugin : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
};
#endif // ROOT_MOTION_EDITOR_PLUGIN_H
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 61bf51b6dc..e515b46b1e 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -223,7 +223,6 @@ void ScriptEditorBase::_bind_methods() {
ADD_SIGNAL(MethodInfo("request_open_script_at_line", PropertyInfo(Variant::OBJECT, "script"), PropertyInfo(Variant::INT, "line")));
ADD_SIGNAL(MethodInfo("request_save_history"));
ADD_SIGNAL(MethodInfo("go_to_help", PropertyInfo(Variant::STRING, "what")));
- // TODO: This signal is no use for VisualScript.
ADD_SIGNAL(MethodInfo("search_in_files_requested", PropertyInfo(Variant::STRING, "text")));
ADD_SIGNAL(MethodInfo("replace_in_files_requested", PropertyInfo(Variant::STRING, "text")));
ADD_SIGNAL(MethodInfo("go_to_method", PropertyInfo(Variant::OBJECT, "script"), PropertyInfo(Variant::STRING, "method")));
@@ -440,6 +439,8 @@ void ScriptEditor::_goto_script_line(Ref<RefCounted> p_script, int p_line) {
} else if (current) {
current->goto_line(p_line, true);
}
+
+ _save_history();
}
}
}
@@ -2173,6 +2174,8 @@ Error ScriptEditor::_save_text_file(Ref<TextFile> p_text_file, const String &p_p
p_text_file->set_last_modified_time(FileAccess::get_modified_time(p_path));
}
+ EditorFileSystem::get_singleton()->update_file(p_path);
+
_res_saved_callback(sqscr);
return OK;
}
@@ -2205,8 +2208,7 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
if (use_external_editor &&
(EditorDebuggerNode::get_singleton()->get_dump_stack_script() != p_resource || EditorDebuggerNode::get_singleton()->get_debug_with_external_editor()) &&
- p_resource->get_path().is_resource_file() &&
- !p_resource->is_class("VisualScript")) {
+ p_resource->get_path().is_resource_file()) {
String path = EDITOR_GET("text_editor/external/exec_path");
String flags = EDITOR_GET("text_editor/external/exec_flags");
@@ -2256,11 +2258,14 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
args.push_back(script_path);
}
- Error err = OS::get_singleton()->create_process(path, args);
- if (err == OK) {
- return false;
+ if (!path.is_empty()) {
+ Error err = OS::get_singleton()->create_process(path, args);
+ if (err == OK) {
+ return false;
+ }
}
- WARN_PRINT("Couldn't open external text editor, using internal");
+
+ ERR_PRINT("Couldn't open external text editor, falling back to the internal editor. Review your `text_editor/external/` editor settings.");
}
for (int i = 0; i < tab_container->get_tab_count(); i++) {
@@ -2305,21 +2310,20 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
se->set_edited_resource(p_resource);
- if (!p_resource->is_class("VisualScript")) {
- bool highlighter_set = false;
- for (int i = 0; i < syntax_highlighters.size(); i++) {
- Ref<EditorSyntaxHighlighter> highlighter = syntax_highlighters[i]->_create();
- if (highlighter.is_null()) {
- continue;
- }
- se->add_syntax_highlighter(highlighter);
+ // Syntax highlighting.
+ bool highlighter_set = false;
+ for (int i = 0; i < syntax_highlighters.size(); i++) {
+ Ref<EditorSyntaxHighlighter> highlighter = syntax_highlighters[i]->_create();
+ if (highlighter.is_null()) {
+ continue;
+ }
+ se->add_syntax_highlighter(highlighter);
- if (scr != nullptr && !highlighter_set) {
- PackedStringArray languages = highlighter->_get_supported_languages();
- if (languages.has(scr->get_language()->get_name())) {
- se->set_syntax_highlighter(highlighter);
- highlighter_set = true;
- }
+ if (scr != nullptr && !highlighter_set) {
+ PackedStringArray languages = highlighter->_get_supported_languages();
+ if (languages.has(scr->get_language()->get_name())) {
+ se->set_syntax_highlighter(highlighter);
+ highlighter_set = true;
}
}
}
@@ -2490,7 +2494,6 @@ void ScriptEditor::save_all_scripts() {
}
_update_script_names();
- EditorFileSystem::get_singleton()->update_script_classes();
}
void ScriptEditor::apply_scripts() const {
@@ -2556,9 +2559,9 @@ void ScriptEditor::open_script_create_dialog(const String &p_base_name, const St
}
void ScriptEditor::open_text_file_create_dialog(const String &p_base_path, const String &p_base_name) {
- file_dialog->set_current_file(p_base_name);
- file_dialog->set_current_dir(p_base_path);
_menu_option(FILE_NEW_TEXTFILE);
+ file_dialog->set_current_dir(p_base_path);
+ file_dialog->set_current_file(p_base_name);
open_textfile_after_create = false;
}
@@ -2954,15 +2957,18 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
Ref<Resource> res = open_file(file);
if (res.is_valid()) {
- if (tab_container->get_tab_count() > num_tabs_before) {
+ const int num_tabs = tab_container->get_tab_count();
+ if (num_tabs > num_tabs_before) {
tab_container->move_child(tab_container->get_tab_control(tab_container->get_tab_count() - 1), new_index);
- num_tabs_before = tab_container->get_tab_count();
- } else { /* Maybe script was already open */
+ num_tabs_before = num_tabs;
+ } else if (num_tabs > 0) { /* Maybe script was already open */
tab_container->move_child(tab_container->get_tab_control(tab_container->get_current_tab()), new_index);
}
}
}
- tab_container->set_current_tab(new_index);
+ if (tab_container->get_tab_count() > 0) {
+ tab_container->set_current_tab(new_index);
+ }
_update_script_names();
}
}
@@ -3610,10 +3616,6 @@ void ScriptEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("register_syntax_highlighter", "syntax_highlighter"), &ScriptEditor::register_syntax_highlighter);
ClassDB::bind_method(D_METHOD("unregister_syntax_highlighter", "syntax_highlighter"), &ScriptEditor::unregister_syntax_highlighter);
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw", "point", "from"), &ScriptEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw", "point", "data", "from"), &ScriptEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw", "point", "data", "from"), &ScriptEditor::drop_data_fw);
-
ClassDB::bind_method(D_METHOD("goto_line", "line_number"), &ScriptEditor::_goto_script_line2);
ClassDB::bind_method(D_METHOD("get_current_script"), &ScriptEditor::_get_current_script);
ClassDB::bind_method(D_METHOD("get_open_scripts"), &ScriptEditor::_get_open_scripts);
@@ -3669,7 +3671,7 @@ ScriptEditor::ScriptEditor() {
_sort_list_on_update = true;
script_list->connect("item_clicked", callable_mp(this, &ScriptEditor::_script_list_clicked), CONNECT_DEFERRED);
script_list->set_allow_rmb_select(true);
- script_list->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(script_list, ScriptEditor);
context_menu = memnew(PopupMenu);
add_child(context_menu);
@@ -4005,12 +4007,6 @@ void ScriptEditorPlugin::apply_changes() {
script_editor->apply_scripts();
}
-void ScriptEditorPlugin::restore_global_state() {
-}
-
-void ScriptEditorPlugin::save_global_state() {
-}
-
void ScriptEditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) {
script_editor->set_window_layout(p_layout);
}
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index d4c80c416b..988d07621c 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -542,9 +542,6 @@ public:
virtual void save_external_data() override;
virtual void apply_changes() override;
- virtual void restore_global_state() override;
- virtual void save_global_state() override;
-
virtual void set_window_layout(Ref<ConfigFile> p_layout) override;
virtual void get_window_layout(Ref<ConfigFile> p_layout) override;
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 9406701ade..6b4e7184d9 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -252,12 +252,14 @@ void ScriptTextEditor::_warning_clicked(Variant p_line) {
} else if (p_line.get_type() == Variant::DICTIONARY) {
Dictionary meta = p_line.operator Dictionary();
const int line = meta["line"].operator int64_t() - 1;
+ const String code = meta["code"].operator String();
+ const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
CodeEdit *text_editor = code_editor->get_text_editor();
String prev_line = line > 0 ? text_editor->get_line(line - 1) : "";
if (prev_line.contains("@warning_ignore")) {
const int closing_bracket_idx = prev_line.find(")");
- const String text_to_insert = ", " + meta["code"].operator String();
+ const String text_to_insert = ", " + code.quote(quote_style);
prev_line = prev_line.insert(closing_bracket_idx, text_to_insert);
text_editor->set_line(line - 1, prev_line);
} else {
@@ -268,7 +270,7 @@ void ScriptTextEditor::_warning_clicked(Variant p_line) {
} else {
annotation_indent = String(" ").repeat(text_editor->get_indent_size() * indent);
}
- text_editor->insert_line_at(line, annotation_indent + "@warning_ignore(" + meta["code"].operator String() + ")");
+ text_editor->insert_line_at(line, annotation_indent + "@warning_ignore(" + code.quote(quote_style) + ")");
}
_validate_script();
@@ -1490,14 +1492,6 @@ void ScriptTextEditor::_notification(int p_what) {
}
}
-void ScriptTextEditor::_bind_methods() {
- ClassDB::bind_method("_update_connected_methods", &ScriptTextEditor::_update_connected_methods);
-
- ClassDB::bind_method("_get_drag_data_fw", &ScriptTextEditor::get_drag_data_fw);
- ClassDB::bind_method("_can_drop_data_fw", &ScriptTextEditor::can_drop_data_fw);
- ClassDB::bind_method("_drop_data_fw", &ScriptTextEditor::drop_data_fw);
-}
-
Control *ScriptTextEditor::get_edit_menu() {
return edit_hb;
}
@@ -2167,7 +2161,7 @@ ScriptTextEditor::ScriptTextEditor() {
connection_info_dialog = memnew(ConnectionInfoDialog);
- code_editor->get_text_editor()->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(code_editor->get_text_editor(), ScriptTextEditor);
}
ScriptTextEditor::~ScriptTextEditor() {
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 9db0191128..1d96376748 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -176,7 +176,6 @@ protected:
void _warning_clicked(Variant p_line);
void _notification(int p_what);
- static void _bind_methods();
HashMap<String, Ref<EditorSyntaxHighlighter>> highlighters;
void _change_syntax_highlighter(int p_idx);
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index da6a1ea0af..907bc81674 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -43,10 +43,10 @@
void ShaderEditorPlugin::_update_shader_list() {
shader_list->clear();
- for (uint32_t i = 0; i < edited_shaders.size(); i++) {
- Ref<Resource> shader = edited_shaders[i].shader;
+ for (EditedShader &edited_shader : edited_shaders) {
+ Ref<Resource> shader = edited_shader.shader;
if (shader.is_null()) {
- shader = edited_shaders[i].shader_inc;
+ shader = edited_shader.shader_inc;
}
String path = shader->get_path();
@@ -62,8 +62,8 @@ void ShaderEditorPlugin::_update_shader_list() {
}
bool unsaved = false;
- if (edited_shaders[i].shader_editor) {
- unsaved = edited_shaders[i].shader_editor->is_unsaved();
+ if (edited_shader.shader_editor) {
+ unsaved = edited_shader.shader_editor->is_unsaved();
}
// TODO: Handle visual shaders too.
@@ -86,7 +86,7 @@ void ShaderEditorPlugin::_update_shader_list() {
}
for (int i = FILE_SAVE; i < FILE_MAX; i++) {
- file_menu->get_popup()->set_item_disabled(file_menu->get_popup()->get_item_index(i), edited_shaders.size() == 0);
+ file_menu->get_popup()->set_item_disabled(file_menu->get_popup()->get_item_index(i), edited_shaders.is_empty());
}
_update_shader_list_status();
@@ -117,6 +117,10 @@ void ShaderEditorPlugin::_move_shader_tab(int p_from, int p_to) {
}
void ShaderEditorPlugin::edit(Object *p_object) {
+ if (!p_object) {
+ return;
+ }
+
EditedShader es;
ShaderInclude *si = Object::cast_to<ShaderInclude>(p_object);
@@ -175,36 +179,36 @@ void ShaderEditorPlugin::selected_notify() {
}
TextShaderEditor *ShaderEditorPlugin::get_shader_editor(const Ref<Shader> &p_for_shader) {
- for (uint32_t i = 0; i < edited_shaders.size(); i++) {
- if (edited_shaders[i].shader == p_for_shader) {
- return edited_shaders[i].shader_editor;
+ for (EditedShader &edited_shader : edited_shaders) {
+ if (edited_shader.shader == p_for_shader) {
+ return edited_shader.shader_editor;
}
}
return nullptr;
}
VisualShaderEditor *ShaderEditorPlugin::get_visual_shader_editor(const Ref<Shader> &p_for_shader) {
- for (uint32_t i = 0; i < edited_shaders.size(); i++) {
- if (edited_shaders[i].shader == p_for_shader) {
- return edited_shaders[i].visual_shader_editor;
+ for (EditedShader &edited_shader : edited_shaders) {
+ if (edited_shader.shader == p_for_shader) {
+ return edited_shader.visual_shader_editor;
}
}
return nullptr;
}
void ShaderEditorPlugin::save_external_data() {
- for (uint32_t i = 0; i < edited_shaders.size(); i++) {
- if (edited_shaders[i].shader_editor) {
- edited_shaders[i].shader_editor->save_external_data();
+ for (EditedShader &edited_shader : edited_shaders) {
+ if (edited_shader.shader_editor) {
+ edited_shader.shader_editor->save_external_data();
}
}
_update_shader_list();
}
void ShaderEditorPlugin::apply_changes() {
- for (uint32_t i = 0; i < edited_shaders.size(); i++) {
- if (edited_shaders[i].shader_editor) {
- edited_shaders[i].shader_editor->apply_shaders();
+ for (EditedShader &edited_shader : edited_shaders) {
+ if (edited_shader.shader_editor) {
+ edited_shader.shader_editor->apply_shaders();
}
}
}
@@ -229,13 +233,13 @@ void ShaderEditorPlugin::_close_shader(int p_index) {
memdelete(c);
edited_shaders.remove_at(p_index);
_update_shader_list();
- EditorNode::get_undo_redo()->clear_history(); // To prevent undo on deleted graphs.
+ EditorUndoRedoManager::get_singleton()->clear_history(); // To prevent undo on deleted graphs.
}
void ShaderEditorPlugin::_resource_saved(Object *obj) {
// May have been renamed on save.
- for (uint32_t i = 0; i < edited_shaders.size(); i++) {
- if (edited_shaders[i].shader.ptr() == obj) {
+ for (EditedShader &edited_shader : edited_shaders) {
+ if (edited_shader.shader.ptr() == obj) {
_update_shader_list();
return;
}
@@ -413,12 +417,6 @@ void ShaderEditorPlugin::drop_data_fw(const Point2 &p_point, const Variant &p_da
}
}
-void ShaderEditorPlugin::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw", "point", "from"), &ShaderEditorPlugin::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw", "point", "data", "from"), &ShaderEditorPlugin::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw", "point", "data", "from"), &ShaderEditorPlugin::drop_data_fw);
-}
-
ShaderEditorPlugin::ShaderEditorPlugin() {
main_split = memnew(HSplitContainer);
@@ -451,7 +449,7 @@ ShaderEditorPlugin::ShaderEditorPlugin() {
vb->add_child(shader_list);
shader_list->connect("item_selected", callable_mp(this, &ShaderEditorPlugin::_shader_selected));
shader_list->connect("item_clicked", callable_mp(this, &ShaderEditorPlugin::_shader_list_clicked));
- shader_list->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(shader_list, ShaderEditorPlugin);
main_split->add_child(vb);
vb->set_custom_minimum_size(Size2(200, 300) * EDSCALE);
diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h
index 8ca4a534ab..408d08ade0 100644
--- a/editor/plugins/shader_editor_plugin.h
+++ b/editor/plugins/shader_editor_plugin.h
@@ -92,9 +92,6 @@ class ShaderEditorPlugin : public EditorPlugin {
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
-protected:
- static void _bind_methods();
-
public:
virtual String get_name() const override { return "Shader"; }
virtual void edit(Object *p_object) override;
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index d90d6b6756..06db696330 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -61,7 +61,7 @@ void Skeleton2DEditor::_menu_option(int p_option) {
err_dialog->popup_centered();
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Rest Pose to Bones"));
for (int i = 0; i < node->get_bone_count(); i++) {
Bone2D *bone = node->get_bone(i);
@@ -77,7 +77,7 @@ void Skeleton2DEditor::_menu_option(int p_option) {
err_dialog->popup_centered();
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Create Rest Pose from Bones"));
for (int i = 0; i < node->get_bone_count(); i++) {
Bone2D *bone = node->get_bone(i);
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index 0c8fc08795..782e365138 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -116,7 +116,7 @@ void BoneTransformEditor::_value_changed(const String &p_property, Variant p_val
return;
}
if (skeleton) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Bone Transform"), UndoRedo::MERGE_ENDS);
undo_redo->add_undo_property(skeleton, p_property, skeleton->get(p_property));
undo_redo->add_do_property(skeleton, p_property, p_value);
@@ -266,15 +266,15 @@ void Skeleton3DEditor::reset_pose(const bool p_all_bones) {
if (!skeleton) {
return;
}
- const int bone_len = skeleton->get_bone_count();
- if (!bone_len) {
+ const int bone_count = skeleton->get_bone_count();
+ if (!bone_count) {
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Bone Transform"), UndoRedo::MERGE_ENDS);
if (p_all_bones) {
- for (int i = 0; i < bone_len; i++) {
+ for (int i = 0; i < bone_count; i++) {
ur->add_undo_method(skeleton, "set_bone_pose_position", i, skeleton->get_bone_pose_position(i));
ur->add_undo_method(skeleton, "set_bone_pose_rotation", i, skeleton->get_bone_pose_rotation(i));
ur->add_undo_method(skeleton, "set_bone_pose_scale", i, skeleton->get_bone_pose_scale(i));
@@ -333,15 +333,15 @@ void Skeleton3DEditor::pose_to_rest(const bool p_all_bones) {
if (!skeleton) {
return;
}
- const int bone_len = skeleton->get_bone_count();
- if (!bone_len) {
+ const int bone_count = skeleton->get_bone_count();
+ if (!bone_count) {
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Bone Rest"), UndoRedo::MERGE_ENDS);
if (p_all_bones) {
- for (int i = 0; i < bone_len; i++) {
+ for (int i = 0; i < bone_count; i++) {
ur->add_do_method(skeleton, "set_bone_rest", i, skeleton->get_bone_pose(i));
ur->add_undo_method(skeleton, "set_bone_rest", i, skeleton->get_bone_rest(i));
}
@@ -358,61 +358,60 @@ void Skeleton3DEditor::pose_to_rest(const bool p_all_bones) {
}
void Skeleton3DEditor::create_physical_skeleton() {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ERR_FAIL_COND(!get_tree());
Node *owner = get_tree()->get_edited_scene_root();
- const int bc = skeleton->get_bone_count();
+ const int bone_count = skeleton->get_bone_count();
- if (!bc) {
+ if (!bone_count) {
+ EditorNode::get_singleton()->show_warning(vformat(TTR("Cannot create a physical skeleton for a Skeleton3D node with no bones.")));
return;
}
Vector<BoneInfo> bones_infos;
- bones_infos.resize(bc);
+ bones_infos.resize(bone_count);
- if (bc > 0) {
- ur->create_action(TTR("Create physical bones"), UndoRedo::MERGE_ALL);
- for (int bone_id = 0; bc > bone_id; ++bone_id) {
- const int parent = skeleton->get_bone_parent(bone_id);
+ ur->create_action(TTR("Create physical bones"), UndoRedo::MERGE_ALL);
+ for (int bone_id = 0; bone_count > bone_id; ++bone_id) {
+ const int parent = skeleton->get_bone_parent(bone_id);
- if (parent < 0) {
- bones_infos.write[bone_id].relative_rest = skeleton->get_bone_rest(bone_id);
- } else {
- const int parent_parent = skeleton->get_bone_parent(parent);
-
- bones_infos.write[bone_id].relative_rest = bones_infos[parent].relative_rest * skeleton->get_bone_rest(bone_id);
-
- // Create physical bone on parent.
- if (!bones_infos[parent].physical_bone) {
- PhysicalBone3D *physical_bone = create_physical_bone(parent, bone_id, bones_infos);
- if (physical_bone && physical_bone->get_child(0)) {
- CollisionShape3D *collision_shape = Object::cast_to<CollisionShape3D>(physical_bone->get_child(0));
- if (collision_shape) {
- bones_infos.write[parent].physical_bone = physical_bone;
-
- ur->add_do_method(skeleton, "add_child", physical_bone);
- ur->add_do_method(physical_bone, "set_owner", owner);
- ur->add_do_method(collision_shape, "set_owner", owner);
- ur->add_do_property(physical_bone, "bone_name", skeleton->get_bone_name(parent));
-
- // Create joint between parent of parent.
- if (parent_parent != -1) {
- ur->add_do_method(physical_bone, "set_joint_type", PhysicalBone3D::JOINT_TYPE_PIN);
- }
+ if (parent < 0) {
+ bones_infos.write[bone_id].relative_rest = skeleton->get_bone_rest(bone_id);
+ } else {
+ const int parent_parent = skeleton->get_bone_parent(parent);
+
+ bones_infos.write[bone_id].relative_rest = bones_infos[parent].relative_rest * skeleton->get_bone_rest(bone_id);
+
+ // Create physical bone on parent.
+ if (!bones_infos[parent].physical_bone) {
+ PhysicalBone3D *physical_bone = create_physical_bone(parent, bone_id, bones_infos);
+ if (physical_bone && physical_bone->get_child(0)) {
+ CollisionShape3D *collision_shape = Object::cast_to<CollisionShape3D>(physical_bone->get_child(0));
+ if (collision_shape) {
+ bones_infos.write[parent].physical_bone = physical_bone;
+
+ ur->add_do_method(skeleton, "add_child", physical_bone);
+ ur->add_do_method(physical_bone, "set_owner", owner);
+ ur->add_do_method(collision_shape, "set_owner", owner);
+ ur->add_do_property(physical_bone, "bone_name", skeleton->get_bone_name(parent));
+
+ // Create joint between parent of parent.
+ if (parent_parent != -1) {
+ ur->add_do_method(physical_bone, "set_joint_type", PhysicalBone3D::JOINT_TYPE_PIN);
+ }
- ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, physical_bone);
- ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, collision_shape);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, physical_bone);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, collision_shape);
- ur->add_do_reference(physical_bone);
- ur->add_undo_method(skeleton, "remove_child", physical_bone);
- }
+ ur->add_do_reference(physical_bone);
+ ur->add_undo_method(skeleton, "remove_child", physical_bone);
}
}
}
}
- ur->commit_action();
}
+ ur->commit_action();
}
PhysicalBone3D *Skeleton3DEditor::create_physical_bone(int bone_id, int bone_child_id, const Vector<BoneInfo> &bones_infos) {
@@ -457,6 +456,11 @@ PhysicalBone3D *Skeleton3DEditor::create_physical_bone(int bone_id, int bone_chi
}
void Skeleton3DEditor::export_skeleton_profile() {
+ if (!skeleton->get_bone_count()) {
+ EditorNode::get_singleton()->show_warning(vformat(TTR("Cannot export a SkeletonProfile for a Skeleton3D node with no bones.")));
+ return;
+ }
+
file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
file_dialog->set_title(TTR("Export Skeleton Profile As..."));
@@ -481,9 +485,9 @@ void Skeleton3DEditor::_file_selected(const String &p_file) {
Vector2 position_max;
Vector2 position_min;
- int len = skeleton->get_bone_count();
- sp->set_bone_size(len);
- for (int i = 0; i < len; i++) {
+ const int bone_count = skeleton->get_bone_count();
+ sp->set_bone_size(bone_count);
+ for (int i = 0; i < bone_count; i++) {
sp->set_bone_name(i, skeleton->get_bone_name(i));
int parent = skeleton->get_bone_parent(i);
if (parent >= 0) {
@@ -509,7 +513,7 @@ void Skeleton3DEditor::_file_selected(const String &p_file) {
Vector2 center = Vector2((position_max.x + position_min.x) * 0.5, (position_max.y + position_min.y) * 0.5);
float nrm = MAX(bound.x, bound.y);
if (nrm > 0) {
- for (int i = 0; i < len; i++) {
+ for (int i = 0; i < bone_count; i++) {
handle_positions.write[i] = (handle_positions[i] - center) / nrm * 0.9;
sp->set_handle_offset(i, Vector2(0.5 + handle_positions[i].x, 0.5 - handle_positions[i].y));
}
@@ -593,7 +597,7 @@ void Skeleton3DEditor::move_skeleton_bone(NodePath p_skeleton_path, int32_t p_se
Node *node = get_node_or_null(p_skeleton_path);
Skeleton3D *skeleton_node = Object::cast_to<Skeleton3D>(node);
ERR_FAIL_NULL(skeleton_node);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Bone Parentage"));
// If the target is a child of ourselves, we move only *us* and not our children.
if (skeleton_node->is_bone_parent_of(p_target_boneidx, p_selected_boneidx)) {
@@ -813,7 +817,7 @@ void Skeleton3DEditor::create_editors() {
joint_tree->set_v_size_flags(SIZE_EXPAND_FILL);
joint_tree->set_h_size_flags(SIZE_EXPAND_FILL);
joint_tree->set_allow_rmb_select(true);
- joint_tree->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(joint_tree, Skeleton3DEditor);
s_con->add_child(joint_tree);
pose_editor = memnew(BoneTransformEditor(skeleton));
@@ -889,10 +893,6 @@ void Skeleton3DEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_properties"), &Skeleton3DEditor::_update_properties);
ClassDB::bind_method(D_METHOD("_on_click_skeleton_option"), &Skeleton3DEditor::_on_click_skeleton_option);
- ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &Skeleton3DEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &Skeleton3DEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("drop_data_fw"), &Skeleton3DEditor::drop_data_fw);
-
ClassDB::bind_method(D_METHOD("move_skeleton_bone"), &Skeleton3DEditor::move_skeleton_bone);
ClassDB::bind_method(D_METHOD("_draw_gizmo"), &Skeleton3DEditor::_draw_gizmo);
@@ -984,25 +984,31 @@ void Skeleton3DEditor::_draw_gizmo() {
}
void Skeleton3DEditor::_draw_handles() {
- handles_mesh_instance->show();
+ const int bone_count = skeleton->get_bone_count();
- const int bone_len = skeleton->get_bone_count();
handles_mesh->clear_surfaces();
- handles_mesh->surface_begin(Mesh::PRIMITIVE_POINTS);
- for (int i = 0; i < bone_len; i++) {
- Color c;
- if (i == selected_bone) {
- c = Color(1, 1, 0);
- } else {
- c = Color(0.1, 0.25, 0.8);
+ if (bone_count) {
+ handles_mesh_instance->show();
+
+ handles_mesh->surface_begin(Mesh::PRIMITIVE_POINTS);
+
+ for (int i = 0; i < bone_count; i++) {
+ Color c;
+ if (i == selected_bone) {
+ c = Color(1, 1, 0);
+ } else {
+ c = Color(0.1, 0.25, 0.8);
+ }
+ Vector3 point = skeleton->get_bone_global_pose(i).origin;
+ handles_mesh->surface_set_color(c);
+ handles_mesh->surface_add_vertex(point);
}
- Vector3 point = skeleton->get_bone_global_pose(i).origin;
- handles_mesh->surface_set_color(c);
- handles_mesh->surface_add_vertex(point);
+ handles_mesh->surface_end();
+ handles_mesh->surface_set_material(0, handle_material);
+ } else {
+ handles_mesh_instance->hide();
}
- handles_mesh->surface_end();
- handles_mesh->surface_set_material(0, handle_material);
}
TreeItem *Skeleton3DEditor::_find(TreeItem *p_node, const NodePath &p_path) {
@@ -1257,8 +1263,8 @@ int Skeleton3DGizmoPlugin::subgizmos_intersect_ray(const EditorNode3DGizmo *p_gi
Transform3D gt = skeleton->get_global_transform();
int closest_idx = -1;
real_t closest_dist = 1e10;
- const int bone_len = skeleton->get_bone_count();
- for (int i = 0; i < bone_len; i++) {
+ const int bone_count = skeleton->get_bone_count();
+ for (int i = 0; i < bone_count; i++) {
Vector3 joint_pos_3d = gt.xform(skeleton->get_bone_global_pose(i).origin);
Vector2 joint_pos_2d = p_camera->unproject_position(joint_pos_3d);
real_t dist_3d = ray_from.distance_to(joint_pos_3d);
@@ -1323,7 +1329,7 @@ void Skeleton3DGizmoPlugin::commit_subgizmos(const EditorNode3DGizmo *p_gizmo, c
Skeleton3DEditor *se = Skeleton3DEditor::get_singleton();
Node3DEditor *ne = Node3DEditor::get_singleton();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Bone Transform"));
if (ne->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT || ne->get_tool_mode() == Node3DEditor::TOOL_MODE_MOVE) {
for (int i = 0; i < p_ids.size(); i++) {
@@ -1353,6 +1359,10 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
+ if (!skeleton->get_bone_count()) {
+ return;
+ }
+
int selected = -1;
Skeleton3DEditor *se = Skeleton3DEditor::get_singleton();
if (se) {
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index 2a8994d239..0d00bfa8fd 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -344,7 +344,7 @@ void Sprite2DEditor::_convert_to_mesh_2d_node() {
MeshInstance2D *mesh_instance = memnew(MeshInstance2D);
mesh_instance->set_mesh(mesh);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to MeshInstance2D"));
ur->add_do_method(SceneTreeDock::get_singleton(), "replace_node", node, mesh_instance, true, false);
ur->add_do_reference(mesh_instance);
@@ -402,7 +402,7 @@ void Sprite2DEditor::_convert_to_polygon_2d_node() {
polygon_2d_instance->set_polygon(polygon);
polygon_2d_instance->set_polygons(polys);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to Polygon2D"));
ur->add_do_method(SceneTreeDock::get_singleton(), "replace_node", node, polygon_2d_instance, true, false);
ur->add_do_reference(polygon_2d_instance);
@@ -424,7 +424,7 @@ void Sprite2DEditor::_create_collision_polygon_2d_node() {
CollisionPolygon2D *collision_polygon_2d_instance = memnew(CollisionPolygon2D);
collision_polygon_2d_instance->set_polygon(outline);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Create CollisionPolygon2D Sibling"));
ur->add_do_method(this, "_add_as_sibling_or_child", node, collision_polygon_2d_instance);
ur->add_do_reference(collision_polygon_2d_instance);
@@ -457,7 +457,7 @@ void Sprite2DEditor::_create_light_occluder_2d_node() {
LightOccluder2D *light_occluder_2d_instance = memnew(LightOccluder2D);
light_occluder_2d_instance->set_occluder_polygon(polygon);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Create LightOccluder2D Sibling"));
ur->add_do_method(this, "_add_as_sibling_or_child", node, light_occluder_2d_instance);
ur->add_do_reference(light_occluder_2d_instance);
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 4fa56189bb..14b5f7cefb 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -40,7 +40,6 @@
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/scene_tree_dock.h"
-#include "scene/3d/sprite_3d.h"
#include "scene/gui/center_container.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/panel_container.h"
@@ -197,7 +196,7 @@ void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) {
}
const Ref<InputEventMouseMotion> mm = p_event;
- if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (mm.is_valid() && (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
// Select by holding down the mouse button on frames.
const int idx = _sheet_preview_position_to_frame_index(mm->get_position());
@@ -238,7 +237,7 @@ void SpriteFramesEditor::_sheet_scroll_input(const Ref<InputEvent> &p_event) {
}
const Ref<InputEventMouseMotion> mm = p_event;
- if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_MIDDLE) != MouseButton::NONE) {
+ if (mm.is_valid() && mm->get_button_mask().has_flag(MouseButtonMask::MIDDLE)) {
const Vector2 dragged = Input::get_singleton()->warp_mouse_motion(mm, split_sheet_scroll->get_global_rect());
split_sheet_scroll->set_h_scroll(split_sheet_scroll->get_h_scroll() - dragged.x);
split_sheet_scroll->set_v_scroll(split_sheet_scroll->get_v_scroll() - dragged.y);
@@ -251,9 +250,8 @@ void SpriteFramesEditor::_sheet_add_frames() {
const Size2i offset = _get_offset();
const Size2i separation = _get_separation();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Add Frame"));
-
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Add Frame"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
int fc = frames->get_frame_count(edited_anim);
for (const int &E : frames_selected) {
@@ -265,8 +263,8 @@ void SpriteFramesEditor::_sheet_add_frames() {
at->set_atlas(split_sheet_preview->get_texture());
at->set_region(Rect2(offset + frame_coords * (frame_size + separation), frame_size));
- undo_redo->add_do_method(frames, "add_frame", edited_anim, at, 1.0, -1);
- undo_redo->add_undo_method(frames, "remove_frame", edited_anim, fc);
+ undo_redo->add_do_method(frames.ptr(), "add_frame", edited_anim, at, 1.0, -1);
+ undo_redo->add_undo_method(frames.ptr(), "remove_frame", edited_anim, fc);
}
undo_redo->add_do_method(this, "_update_library");
@@ -415,8 +413,24 @@ void SpriteFramesEditor::_prepare_sprite_sheet(const String &p_file) {
void SpriteFramesEditor::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_ENTER_TREE:
+ case NOTIFICATION_ENTER_TREE: {
+ get_tree()->connect("node_removed", callable_mp(this, &SpriteFramesEditor::_node_removed));
+
+ [[fallthrough]];
+ }
case NOTIFICATION_THEME_CHANGED: {
+ autoplay_icon = get_theme_icon(SNAME("AutoPlay"), SNAME("EditorIcons"));
+ stop_icon = get_theme_icon(SNAME("Stop"), SNAME("EditorIcons"));
+ pause_icon = get_theme_icon(SNAME("Pause"), SNAME("EditorIcons"));
+ _update_stop_icon();
+
+ autoplay->set_icon(get_theme_icon(SNAME("AutoPlay"), SNAME("EditorIcons")));
+ anim_loop->set_icon(get_theme_icon(SNAME("Loop"), SNAME("EditorIcons")));
+ play->set_icon(get_theme_icon(SNAME("PlayStart"), SNAME("EditorIcons")));
+ play_from->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
+ play_bw->set_icon(get_theme_icon(SNAME("PlayStartBackwards"), SNAME("EditorIcons")));
+ play_bw_from->set_icon(get_theme_icon(SNAME("PlayBackwards"), SNAME("EditorIcons")));
+
load->set_icon(get_theme_icon(SNAME("Load"), SNAME("EditorIcons")));
load_sheet->set_icon(get_theme_icon(SNAME("SpriteSheet"), SNAME("EditorIcons")));
copy->set_icon(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")));
@@ -441,6 +455,10 @@ void SpriteFramesEditor::_notification(int p_what) {
case NOTIFICATION_READY: {
add_theme_constant_override("autohide", 1); // Fixes the dragger always showing up.
} break;
+
+ case NOTIFICATION_EXIT_TREE: {
+ get_tree()->disconnect("node_removed", callable_mp(this, &SpriteFramesEditor::_node_removed));
+ } break;
}
}
@@ -470,15 +488,15 @@ void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Add Frame"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Add Frame"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
int fc = frames->get_frame_count(edited_anim);
int count = 0;
for (const Ref<Texture2D> &E : resources) {
- undo_redo->add_do_method(frames, "add_frame", edited_anim, E, 1.0, p_at_pos == -1 ? -1 : p_at_pos + count);
- undo_redo->add_undo_method(frames, "remove_frame", edited_anim, p_at_pos == -1 ? fc : p_at_pos);
+ undo_redo->add_do_method(frames.ptr(), "add_frame", edited_anim, E, 1.0, p_at_pos == -1 ? -1 : p_at_pos + count);
+ undo_redo->add_undo_method(frames.ptr(), "remove_frame", edited_anim, p_at_pos == -1 ? fc : p_at_pos);
count++;
}
undo_redo->add_do_method(this, "_update_library");
@@ -541,10 +559,10 @@ void SpriteFramesEditor::_paste_pressed() {
return; ///beh should show an error i guess
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Paste Frame"));
- undo_redo->add_do_method(frames, "add_frame", edited_anim, texture, duration);
- undo_redo->add_undo_method(frames, "remove_frame", edited_anim, frames->get_frame_count(edited_anim));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Paste Frame"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "add_frame", edited_anim, texture, duration);
+ undo_redo->add_undo_method(frames.ptr(), "remove_frame", edited_anim, frames->get_frame_count(edited_anim));
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
@@ -584,10 +602,10 @@ void SpriteFramesEditor::_empty_pressed() {
Ref<Texture2D> texture;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Add Empty"));
- undo_redo->add_do_method(frames, "add_frame", edited_anim, texture, 1.0, from);
- undo_redo->add_undo_method(frames, "remove_frame", edited_anim, from);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Add Empty"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "add_frame", edited_anim, texture, 1.0, from);
+ undo_redo->add_undo_method(frames.ptr(), "remove_frame", edited_anim, from);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
@@ -608,10 +626,10 @@ void SpriteFramesEditor::_empty2_pressed() {
Ref<Texture2D> texture;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Add Empty"));
- undo_redo->add_do_method(frames, "add_frame", edited_anim, texture, 1.0, from + 1);
- undo_redo->add_undo_method(frames, "remove_frame", edited_anim, from + 1);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Add Empty"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "add_frame", edited_anim, texture, 1.0, from + 1);
+ undo_redo->add_undo_method(frames.ptr(), "remove_frame", edited_anim, from + 1);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
@@ -632,12 +650,12 @@ void SpriteFramesEditor::_up_pressed() {
sel = to_move;
sel -= 1;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Move Frame"));
- undo_redo->add_do_method(frames, "set_frame", edited_anim, to_move, frames->get_frame_texture(edited_anim, to_move - 1), frames->get_frame_duration(edited_anim, to_move - 1));
- undo_redo->add_do_method(frames, "set_frame", edited_anim, to_move - 1, frames->get_frame_texture(edited_anim, to_move), frames->get_frame_duration(edited_anim, to_move));
- undo_redo->add_undo_method(frames, "set_frame", edited_anim, to_move, frames->get_frame_texture(edited_anim, to_move), frames->get_frame_duration(edited_anim, to_move));
- undo_redo->add_undo_method(frames, "set_frame", edited_anim, to_move - 1, frames->get_frame_texture(edited_anim, to_move - 1), frames->get_frame_duration(edited_anim, to_move - 1));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Move Frame"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "set_frame", edited_anim, to_move, frames->get_frame_texture(edited_anim, to_move - 1), frames->get_frame_duration(edited_anim, to_move - 1));
+ undo_redo->add_do_method(frames.ptr(), "set_frame", edited_anim, to_move - 1, frames->get_frame_texture(edited_anim, to_move), frames->get_frame_duration(edited_anim, to_move));
+ undo_redo->add_undo_method(frames.ptr(), "set_frame", edited_anim, to_move, frames->get_frame_texture(edited_anim, to_move), frames->get_frame_duration(edited_anim, to_move));
+ undo_redo->add_undo_method(frames.ptr(), "set_frame", edited_anim, to_move - 1, frames->get_frame_texture(edited_anim, to_move - 1), frames->get_frame_duration(edited_anim, to_move - 1));
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
@@ -658,12 +676,12 @@ void SpriteFramesEditor::_down_pressed() {
sel = to_move;
sel += 1;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Move Frame"));
- undo_redo->add_do_method(frames, "set_frame", edited_anim, to_move, frames->get_frame_texture(edited_anim, to_move + 1), frames->get_frame_duration(edited_anim, to_move + 1));
- undo_redo->add_do_method(frames, "set_frame", edited_anim, to_move + 1, frames->get_frame_texture(edited_anim, to_move), frames->get_frame_duration(edited_anim, to_move));
- undo_redo->add_undo_method(frames, "set_frame", edited_anim, to_move, frames->get_frame_texture(edited_anim, to_move), frames->get_frame_duration(edited_anim, to_move));
- undo_redo->add_undo_method(frames, "set_frame", edited_anim, to_move + 1, frames->get_frame_texture(edited_anim, to_move + 1), frames->get_frame_duration(edited_anim, to_move + 1));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Move Frame"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "set_frame", edited_anim, to_move, frames->get_frame_texture(edited_anim, to_move + 1), frames->get_frame_duration(edited_anim, to_move + 1));
+ undo_redo->add_do_method(frames.ptr(), "set_frame", edited_anim, to_move + 1, frames->get_frame_texture(edited_anim, to_move), frames->get_frame_duration(edited_anim, to_move));
+ undo_redo->add_undo_method(frames.ptr(), "set_frame", edited_anim, to_move, frames->get_frame_texture(edited_anim, to_move), frames->get_frame_duration(edited_anim, to_move));
+ undo_redo->add_undo_method(frames.ptr(), "set_frame", edited_anim, to_move + 1, frames->get_frame_texture(edited_anim, to_move + 1), frames->get_frame_duration(edited_anim, to_move + 1));
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
@@ -681,16 +699,16 @@ void SpriteFramesEditor::_delete_pressed() {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Delete Resource"));
- undo_redo->add_do_method(frames, "remove_frame", edited_anim, to_delete);
- undo_redo->add_undo_method(frames, "add_frame", edited_anim, frames->get_frame_texture(edited_anim, to_delete), frames->get_frame_duration(edited_anim, to_delete), to_delete);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Delete Resource"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "remove_frame", edited_anim, to_delete);
+ undo_redo->add_undo_method(frames.ptr(), "add_frame", edited_anim, frames->get_frame_texture(edited_anim, to_delete), frames->get_frame_duration(edited_anim, to_delete), to_delete);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
}
-void SpriteFramesEditor::_animation_select() {
+void SpriteFramesEditor::_animation_selected() {
if (updating) {
return;
}
@@ -705,9 +723,42 @@ void SpriteFramesEditor::_animation_select() {
TreeItem *selected = animations->get_selected();
ERR_FAIL_COND(!selected);
edited_anim = selected->get_text(0);
+
+ if (animated_sprite) {
+ sprite_node_updating = true;
+ animated_sprite->call("set_animation", edited_anim);
+ sprite_node_updating = false;
+ }
+
_update_library(true);
}
+void SpriteFramesEditor::_sync_animation() {
+ if (!animated_sprite || sprite_node_updating) {
+ return;
+ }
+ _select_animation(animated_sprite->call("get_animation"), false);
+ _update_stop_icon();
+}
+
+void SpriteFramesEditor::_select_animation(const String &p_name, bool p_update_node) {
+ TreeItem *selected = nullptr;
+ selected = animations->get_item_with_text(p_name);
+ if (!selected) {
+ return;
+ };
+
+ edited_anim = selected->get_text(0);
+
+ if (animated_sprite) {
+ if (p_update_node) {
+ animated_sprite->call("set_animation", edited_anim);
+ }
+ }
+
+ _update_library();
+}
+
static void _find_anim_sprites(Node *p_node, List<Node *> *r_nodes, Ref<SpriteFrames> p_sfames) {
Node *edited = EditorNode::get_singleton()->get_edited_scene();
if (!edited) {
@@ -765,55 +816,67 @@ void SpriteFramesEditor::_animation_name_edited() {
name = new_name + " " + itos(counter);
}
- List<Node *> nodes;
- _find_anim_sprites(EditorNode::get_singleton()->get_edited_scene(), &nodes, Ref<SpriteFrames>(frames));
-
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Rename Animation"));
- undo_redo->add_do_method(frames, "rename_animation", edited_anim, name);
- undo_redo->add_undo_method(frames, "rename_animation", name, edited_anim);
-
- for (Node *E : nodes) {
- String current = E->call("get_animation");
- undo_redo->add_do_method(E, "set_animation", name);
- undo_redo->add_undo_method(E, "set_animation", edited_anim);
- }
-
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Rename Animation"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ _rename_node_animation(undo_redo, false, edited_anim, "", "");
+ undo_redo->add_do_method(frames.ptr(), "rename_animation", edited_anim, name);
+ undo_redo->add_undo_method(frames.ptr(), "rename_animation", name, edited_anim);
+ _rename_node_animation(undo_redo, false, edited_anim, name, name);
+ _rename_node_animation(undo_redo, true, edited_anim, edited_anim, edited_anim);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
+ undo_redo->commit_action();
+
+ _select_animation(name);
+ animations->grab_focus();
+}
- edited_anim = name;
+void SpriteFramesEditor::_rename_node_animation(EditorUndoRedoManager *undo_redo, bool is_undo, const String &p_filter, const String &p_new_animation, const String &p_new_autoplay) {
+ List<Node *> nodes;
+ _find_anim_sprites(EditorNode::get_singleton()->get_edited_scene(), &nodes, Ref<SpriteFrames>(frames));
- undo_redo->commit_action();
+ if (is_undo) {
+ for (Node *E : nodes) {
+ String current_name = E->call("get_animation");
+ if (current_name == p_filter) {
+ undo_redo->add_undo_method(E, "set_animation", p_new_animation);
+ }
+ String autoplay_name = E->call("get_autoplay");
+ if (autoplay_name == p_filter) {
+ undo_redo->add_undo_method(E, "set_autoplay", p_new_autoplay);
+ }
+ }
+ } else {
+ for (Node *E : nodes) {
+ String current_name = E->call("get_animation");
+ if (current_name == p_filter) {
+ undo_redo->add_do_method(E, "set_animation", p_new_animation);
+ }
+ String autoplay_name = E->call("get_autoplay");
+ if (autoplay_name == p_filter) {
+ undo_redo->add_do_method(E, "set_autoplay", p_new_autoplay);
+ }
+ }
+ }
}
void SpriteFramesEditor::_animation_add() {
- String name = "New Anim";
+ String name = "new_animation";
int counter = 0;
while (frames->has_animation(name)) {
counter++;
- name = "New Anim " + itos(counter);
+ name = vformat("new_animation_%d", counter);
}
- List<Node *> nodes;
- _find_anim_sprites(EditorNode::get_singleton()->get_edited_scene(), &nodes, Ref<SpriteFrames>(frames));
-
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Add Animation"));
- undo_redo->add_do_method(frames, "add_animation", name);
- undo_redo->add_undo_method(frames, "remove_animation", name);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Add Animation"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "add_animation", name);
+ undo_redo->add_undo_method(frames.ptr(), "remove_animation", name);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
-
- for (Node *E : nodes) {
- String current = E->call("get_animation");
- undo_redo->add_do_method(E, "set_animation", name);
- undo_redo->add_undo_method(E, "set_animation", current);
- }
-
- edited_anim = name;
-
undo_redo->commit_action();
+
+ _select_animation(name);
animations->grab_focus();
}
@@ -831,24 +894,39 @@ void SpriteFramesEditor::_animation_remove() {
}
void SpriteFramesEditor::_animation_remove_confirmed() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Remove Animation"));
- undo_redo->add_do_method(frames, "remove_animation", edited_anim);
- undo_redo->add_undo_method(frames, "add_animation", edited_anim);
- undo_redo->add_undo_method(frames, "set_animation_speed", edited_anim, frames->get_animation_speed(edited_anim));
- undo_redo->add_undo_method(frames, "set_animation_loop", edited_anim, frames->get_animation_loop(edited_anim));
+ StringName new_edited;
+ List<StringName> anim_names;
+ frames->get_animation_list(&anim_names);
+ anim_names.sort_custom<StringName::AlphCompare>();
+ if (anim_names.size() >= 2) {
+ if (edited_anim == anim_names[0]) {
+ new_edited = anim_names[1];
+ } else {
+ new_edited = anim_names[0];
+ }
+ } else {
+ new_edited = StringName();
+ }
+
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Remove Animation"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ _rename_node_animation(undo_redo, false, edited_anim, new_edited, "");
+ undo_redo->add_do_method(frames.ptr(), "remove_animation", edited_anim);
+ undo_redo->add_undo_method(frames.ptr(), "add_animation", edited_anim);
+ _rename_node_animation(undo_redo, true, edited_anim, edited_anim, edited_anim);
+ undo_redo->add_undo_method(frames.ptr(), "set_animation_speed", edited_anim, frames->get_animation_speed(edited_anim));
+ undo_redo->add_undo_method(frames.ptr(), "set_animation_loop", edited_anim, frames->get_animation_loop(edited_anim));
int fc = frames->get_frame_count(edited_anim);
for (int i = 0; i < fc; i++) {
Ref<Texture2D> texture = frames->get_frame_texture(edited_anim, i);
float duration = frames->get_frame_duration(edited_anim, i);
- undo_redo->add_undo_method(frames, "add_frame", edited_anim, texture, duration);
+ undo_redo->add_undo_method(frames.ptr(), "add_frame", edited_anim, texture, duration);
}
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
-
- edited_anim = StringName();
-
undo_redo->commit_action();
+
+ _select_animation(new_edited);
}
void SpriteFramesEditor::_animation_search_text_changed(const String &p_text) {
@@ -860,10 +938,10 @@ void SpriteFramesEditor::_animation_loop_changed() {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Change Animation Loop"));
- undo_redo->add_do_method(frames, "set_animation_loop", edited_anim, anim_loop->is_pressed());
- undo_redo->add_undo_method(frames, "set_animation_loop", edited_anim, frames->get_animation_loop(edited_anim));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Change Animation Loop"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "set_animation_loop", edited_anim, anim_loop->is_pressed());
+ undo_redo->add_undo_method(frames.ptr(), "set_animation_loop", edited_anim, frames->get_animation_loop(edited_anim));
undo_redo->add_do_method(this, "_update_library", true);
undo_redo->add_undo_method(this, "_update_library", true);
undo_redo->commit_action();
@@ -874,10 +952,10 @@ void SpriteFramesEditor::_animation_speed_changed(double p_value) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Change Animation FPS"), UndoRedo::MERGE_ENDS);
- undo_redo->add_do_method(frames, "set_animation_speed", edited_anim, p_value);
- undo_redo->add_undo_method(frames, "set_animation_speed", edited_anim, frames->get_animation_speed(edited_anim));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Change Animation FPS"), UndoRedo::MERGE_ENDS, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "set_animation_speed", edited_anim, p_value);
+ undo_redo->add_undo_method(frames.ptr(), "set_animation_speed", edited_anim, frames->get_animation_speed(edited_anim));
undo_redo->add_do_method(this, "_update_library", true);
undo_redo->add_undo_method(this, "_update_library", true);
undo_redo->commit_action();
@@ -926,10 +1004,10 @@ void SpriteFramesEditor::_frame_duration_changed(double p_value) {
Ref<Texture2D> texture = frames->get_frame_texture(edited_anim, index);
float old_duration = frames->get_frame_duration(edited_anim, index);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Set Frame Duration"));
- undo_redo->add_do_method(frames, "set_frame", edited_anim, index, texture, p_value);
- undo_redo->add_undo_method(frames, "set_frame", edited_anim, index, texture, old_duration);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Set Frame Duration"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "set_frame", edited_anim, index, texture, p_value);
+ undo_redo->add_undo_method(frames.ptr(), "set_frame", edited_anim, index, texture, old_duration);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
@@ -968,6 +1046,10 @@ void SpriteFramesEditor::_zoom_reset() {
}
void SpriteFramesEditor::_update_library(bool p_skip_selector) {
+ if (frames.is_null()) {
+ return;
+ }
+
updating = true;
frame_duration->set_value(1.0); // Default.
@@ -998,12 +1080,27 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
it->set_text(0, name);
it->set_editable(0, true);
+ if (animated_sprite) {
+ if (name == String(animated_sprite->call("get_autoplay"))) {
+ it->set_icon(0, autoplay_icon);
+ }
+ }
+
if (E == edited_anim) {
it->select(0);
}
}
}
+ if (animated_sprite) {
+ String autoplay_name = animated_sprite->call("get_autoplay");
+ if (autoplay_name.is_empty()) {
+ autoplay->set_pressed(false);
+ } else {
+ autoplay->set_pressed(String(edited_anim) == autoplay_name);
+ }
+ }
+
frame_list->clear();
if (!frames->has_animation(edited_anim)) {
@@ -1018,18 +1115,19 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
}
for (int i = 0; i < frames->get_frame_count(edited_anim); i++) {
- String name;
+ String name = itos(i);
Ref<Texture2D> texture = frames->get_frame_texture(edited_anim, i);
float duration = frames->get_frame_duration(edited_anim, i);
- String duration_string;
- if (duration != 1.0f) {
- duration_string = String::utf8(" [ ×") + String::num_real(frames->get_frame_duration(edited_anim, i)) + " ]";
- }
if (texture.is_null()) {
- name = itos(i) + ": " + TTR("(empty)") + duration_string;
- } else {
- name = itos(i) + ": " + texture->get_name() + duration_string;
+ texture = empty_icon;
+ name += ": " + TTR("(empty)");
+ } else if (!texture->get_name().is_empty()) {
+ name += ": " + texture->get_name();
+ }
+
+ if (duration != 1.0f) {
+ name += String::utf8(" [× ") + String::num(duration, 2) + "]";
}
frame_list->add_item(name, texture);
@@ -1061,20 +1159,25 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
updating = false;
}
-void SpriteFramesEditor::edit(SpriteFrames *p_frames) {
- bool new_read_only_state = false;
- if (p_frames) {
- new_read_only_state = EditorNode::get_singleton()->is_resource_read_only(p_frames);
+void SpriteFramesEditor::_edit() {
+ if (!animated_sprite) {
+ return;
}
+ edit(animated_sprite->call("get_sprite_frames"));
+}
+
+void SpriteFramesEditor::edit(Ref<SpriteFrames> p_frames) {
+ _update_stop_icon();
- if (frames == p_frames && new_read_only_state == read_only) {
+ if (!p_frames.is_valid()) {
+ frames.unref();
return;
}
frames = p_frames;
- read_only = new_read_only_state;
+ read_only = EditorNode::get_singleton()->is_resource_read_only(p_frames);
- if (p_frames) {
+ if (p_frames.is_valid()) {
if (!p_frames->has_animation(edited_anim)) {
List<StringName> anim_names;
frames->get_animation_list(&anim_names);
@@ -1107,6 +1210,8 @@ void SpriteFramesEditor::edit(SpriteFrames *p_frames) {
move_up->set_disabled(read_only);
move_down->set_disabled(read_only);
delete_frame->set_disabled(read_only);
+
+ _fetch_sprite_node(); // Fetch node after set frames.
}
Variant SpriteFramesEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
@@ -1206,7 +1311,7 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
reorder = true;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (reorder) { //drop is from reordering frames
int from_frame = -1;
float duration = 1.0;
@@ -1215,18 +1320,18 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
duration = frames->get_frame_duration(edited_anim, from_frame);
}
- undo_redo->create_action(TTR("Move Frame"));
- undo_redo->add_do_method(frames, "remove_frame", edited_anim, from_frame == -1 ? frames->get_frame_count(edited_anim) : from_frame);
- undo_redo->add_do_method(frames, "add_frame", edited_anim, texture, duration, at_pos == -1 ? -1 : at_pos);
- undo_redo->add_undo_method(frames, "remove_frame", edited_anim, at_pos == -1 ? frames->get_frame_count(edited_anim) - 1 : at_pos);
- undo_redo->add_undo_method(frames, "add_frame", edited_anim, texture, duration, from_frame);
+ undo_redo->create_action(TTR("Move Frame"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "remove_frame", edited_anim, from_frame == -1 ? frames->get_frame_count(edited_anim) : from_frame);
+ undo_redo->add_do_method(frames.ptr(), "add_frame", edited_anim, texture, duration, at_pos == -1 ? -1 : at_pos);
+ undo_redo->add_undo_method(frames.ptr(), "remove_frame", edited_anim, at_pos == -1 ? frames->get_frame_count(edited_anim) - 1 : at_pos);
+ undo_redo->add_undo_method(frames.ptr(), "add_frame", edited_anim, texture, duration, from_frame);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
} else {
- undo_redo->create_action(TTR("Add Frame"));
- undo_redo->add_do_method(frames, "add_frame", edited_anim, texture, 1.0, at_pos == -1 ? -1 : at_pos);
- undo_redo->add_undo_method(frames, "remove_frame", edited_anim, at_pos == -1 ? frames->get_frame_count(edited_anim) : at_pos);
+ undo_redo->create_action(TTR("Add Frame"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_method(frames.ptr(), "add_frame", edited_anim, texture, 1.0, at_pos == -1 ? -1 : at_pos);
+ undo_redo->add_undo_method(frames.ptr(), "remove_frame", edited_anim, at_pos == -1 ? frames->get_frame_count(edited_anim) : at_pos);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
@@ -1245,11 +1350,154 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
}
}
+void SpriteFramesEditor::_update_stop_icon() {
+ bool is_playing = false;
+ if (animated_sprite) {
+ is_playing = animated_sprite->call("is_playing");
+ }
+ if (is_playing) {
+ stop->set_icon(pause_icon);
+ } else {
+ stop->set_icon(stop_icon);
+ }
+}
+
+void SpriteFramesEditor::_remove_sprite_node() {
+ if (!animated_sprite) {
+ return;
+ }
+ if (animated_sprite->is_connected("sprite_frames_changed", callable_mp(this, &SpriteFramesEditor::_edit))) {
+ animated_sprite->disconnect("sprite_frames_changed", callable_mp(this, &SpriteFramesEditor::_edit));
+ }
+ if (animated_sprite->is_connected("animation_changed", callable_mp(this, &SpriteFramesEditor::_sync_animation))) {
+ animated_sprite->disconnect("animation_changed", callable_mp(this, &SpriteFramesEditor::_sync_animation));
+ }
+ if (animated_sprite->is_connected("animation_finished", callable_mp(this, &SpriteFramesEditor::_update_stop_icon))) {
+ animated_sprite->disconnect("animation_finished", callable_mp(this, &SpriteFramesEditor::_update_stop_icon));
+ }
+ animated_sprite = nullptr;
+}
+
+void SpriteFramesEditor::_fetch_sprite_node() {
+ Node *selected = nullptr;
+ EditorSelection *editor_selection = EditorNode::get_singleton()->get_editor_selection();
+ if (editor_selection->get_selected_node_list().size() == 1) {
+ selected = editor_selection->get_selected_node_list()[0];
+ }
+
+ bool show_node_edit = false;
+ AnimatedSprite2D *as2d = Object::cast_to<AnimatedSprite2D>(selected);
+ AnimatedSprite3D *as3d = Object::cast_to<AnimatedSprite3D>(selected);
+ if (as2d || as3d) {
+ if (frames != selected->call("get_sprite_frames")) {
+ _remove_sprite_node();
+ } else {
+ animated_sprite = selected;
+ if (!animated_sprite->is_connected("sprite_frames_changed", callable_mp(this, &SpriteFramesEditor::_edit))) {
+ animated_sprite->connect("sprite_frames_changed", callable_mp(this, &SpriteFramesEditor::_edit));
+ }
+ if (!animated_sprite->is_connected("animation_changed", callable_mp(this, &SpriteFramesEditor::_sync_animation))) {
+ animated_sprite->connect("animation_changed", callable_mp(this, &SpriteFramesEditor::_sync_animation), CONNECT_DEFERRED);
+ }
+ if (!animated_sprite->is_connected("animation_finished", callable_mp(this, &SpriteFramesEditor::_update_stop_icon))) {
+ animated_sprite->connect("animation_finished", callable_mp(this, &SpriteFramesEditor::_update_stop_icon));
+ }
+ show_node_edit = true;
+ }
+ } else {
+ _remove_sprite_node();
+ }
+
+ if (show_node_edit) {
+ _sync_animation();
+ autoplay_container->show();
+ playback_container->show();
+ } else {
+ _update_library(); // To init autoplay icon.
+ autoplay_container->hide();
+ playback_container->hide();
+ }
+}
+
+void SpriteFramesEditor::_play_pressed() {
+ if (animated_sprite) {
+ animated_sprite->call("stop");
+ animated_sprite->call("play", animated_sprite->call("get_animation"));
+ }
+ _update_stop_icon();
+}
+
+void SpriteFramesEditor::_play_from_pressed() {
+ if (animated_sprite) {
+ animated_sprite->call("play", animated_sprite->call("get_animation"));
+ }
+ _update_stop_icon();
+}
+
+void SpriteFramesEditor::_play_bw_pressed() {
+ if (animated_sprite) {
+ animated_sprite->call("stop");
+ animated_sprite->call("play_backwards", animated_sprite->call("get_animation"));
+ }
+ _update_stop_icon();
+}
+
+void SpriteFramesEditor::_play_bw_from_pressed() {
+ if (animated_sprite) {
+ animated_sprite->call("play_backwards", animated_sprite->call("get_animation"));
+ }
+ _update_stop_icon();
+}
+
+void SpriteFramesEditor::_stop_pressed() {
+ if (animated_sprite) {
+ if (animated_sprite->call("is_playing")) {
+ animated_sprite->call("pause");
+ } else {
+ animated_sprite->call("stop");
+ }
+ }
+ _update_stop_icon();
+}
+
+void SpriteFramesEditor::_autoplay_pressed() {
+ if (updating) {
+ return;
+ }
+
+ if (animated_sprite) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Toggle Autoplay"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
+ String current = animated_sprite->call("get_animation");
+ String current_auto = animated_sprite->call("get_autoplay");
+ if (current == current_auto) {
+ //unset
+ undo_redo->add_do_method(animated_sprite, "set_autoplay", "");
+ undo_redo->add_undo_method(animated_sprite, "set_autoplay", current_auto);
+ } else {
+ //set
+ undo_redo->add_do_method(animated_sprite, "set_autoplay", current);
+ undo_redo->add_undo_method(animated_sprite, "set_autoplay", current_auto);
+ }
+ undo_redo->add_do_method(this, "_update_library");
+ undo_redo->add_undo_method(this, "_update_library");
+ undo_redo->commit_action();
+ }
+
+ _update_library();
+}
+
void SpriteFramesEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_library", "skipsel"), &SpriteFramesEditor::_update_library, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &SpriteFramesEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &SpriteFramesEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &SpriteFramesEditor::drop_data_fw);
+}
+
+void SpriteFramesEditor::_node_removed(Node *p_node) {
+ if (animated_sprite) {
+ if (animated_sprite != p_node) {
+ return;
+ }
+ _remove_sprite_node();
+ }
}
SpriteFramesEditor::SpriteFramesEditor() {
@@ -1275,8 +1523,37 @@ SpriteFramesEditor::SpriteFramesEditor() {
delete_anim->set_disabled(true);
delete_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_remove));
+ autoplay_container = memnew(HBoxContainer);
+ hbc_animlist->add_child(autoplay_container);
+
+ autoplay_container->add_child(memnew(VSeparator));
+
+ autoplay = memnew(Button);
+ autoplay->set_flat(true);
+ autoplay->set_tooltip_text(TTR("Autoplay on Load"));
+ autoplay_container->add_child(autoplay);
+
+ hbc_animlist->add_child(memnew(VSeparator));
+
+ anim_loop = memnew(Button);
+ anim_loop->set_toggle_mode(true);
+ anim_loop->set_flat(true);
+ anim_loop->set_tooltip_text(TTR("Animation Looping"));
+ anim_loop->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_loop_changed));
+ hbc_animlist->add_child(anim_loop);
+
+ anim_speed = memnew(SpinBox);
+ anim_speed->set_suffix(TTR("FPS"));
+ anim_speed->set_min(0);
+ anim_speed->set_max(120);
+ anim_speed->set_step(0.01);
+ anim_speed->set_custom_arrow_step(1);
+ anim_speed->set_tooltip_text(TTR("Animation Speed"));
+ anim_speed->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_animation_speed_changed));
+ hbc_animlist->add_child(anim_speed);
+
anim_search_box = memnew(LineEdit);
- hbc_animlist->add_child(anim_search_box);
+ sub_vb->add_child(anim_search_box);
anim_search_box->set_h_size_flags(SIZE_EXPAND_FILL);
anim_search_box->set_placeholder(TTR("Filter Animations"));
anim_search_box->set_clear_button_enabled(true);
@@ -1286,7 +1563,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
sub_vb->add_child(animations);
animations->set_v_size_flags(SIZE_EXPAND_FILL);
animations->set_hide_root(true);
- animations->connect("cell_selected", callable_mp(this, &SpriteFramesEditor::_animation_select));
+ animations->connect("cell_selected", callable_mp(this, &SpriteFramesEditor::_animation_selected));
animations->connect("item_edited", callable_mp(this, &SpriteFramesEditor::_animation_name_edited));
animations->set_allow_reselect(true);
@@ -1295,23 +1572,6 @@ SpriteFramesEditor::SpriteFramesEditor() {
delete_anim->set_shortcut_context(animations);
delete_anim->set_shortcut(ED_SHORTCUT("sprite_frames/delete_animation", TTR("Delete Animation"), Key::KEY_DELETE));
- HBoxContainer *hbc_anim_speed = memnew(HBoxContainer);
- hbc_anim_speed->add_child(memnew(Label(TTR("Speed:"))));
- vbc_animlist->add_child(hbc_anim_speed);
- anim_speed = memnew(SpinBox);
- anim_speed->set_suffix(TTR("FPS"));
- anim_speed->set_min(0);
- anim_speed->set_max(120);
- anim_speed->set_step(0.01);
- anim_speed->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc_anim_speed->add_child(anim_speed);
- anim_speed->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_animation_speed_changed));
-
- anim_loop = memnew(CheckButton);
- anim_loop->set_text(TTR("Loop"));
- vbc_animlist->add_child(anim_loop);
- anim_loop->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_loop_changed));
-
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
vbc->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1322,6 +1582,44 @@ SpriteFramesEditor::SpriteFramesEditor() {
HBoxContainer *hbc = memnew(HBoxContainer);
sub_vb->add_child(hbc);
+ playback_container = memnew(HBoxContainer);
+ hbc->add_child(playback_container);
+
+ play_bw_from = memnew(Button);
+ play_bw_from->set_flat(true);
+ play_bw_from->set_tooltip_text(TTR("Play selected animation backwards from current pos. (A)"));
+ playback_container->add_child(play_bw_from);
+
+ play_bw = memnew(Button);
+ play_bw->set_flat(true);
+ play_bw->set_tooltip_text(TTR("Play selected animation backwards from end. (Shift+A)"));
+ playback_container->add_child(play_bw);
+
+ stop = memnew(Button);
+ stop->set_flat(true);
+ stop->set_tooltip_text(TTR("Pause/stop animation playback. (S)"));
+ playback_container->add_child(stop);
+
+ play = memnew(Button);
+ play->set_flat(true);
+ play->set_tooltip_text(TTR("Play selected animation from start. (Shift+D)"));
+ playback_container->add_child(play);
+
+ play_from = memnew(Button);
+ play_from->set_flat(true);
+ play_from->set_tooltip_text(TTR("Play selected animation from current pos. (D)"));
+ playback_container->add_child(play_from);
+
+ playback_container->add_child(memnew(VSeparator));
+
+ autoplay->connect("pressed", callable_mp(this, &SpriteFramesEditor::_autoplay_pressed));
+ autoplay->set_toggle_mode(true);
+ play->connect("pressed", callable_mp(this, &SpriteFramesEditor::_play_pressed));
+ play_from->connect("pressed", callable_mp(this, &SpriteFramesEditor::_play_from_pressed));
+ play_bw->connect("pressed", callable_mp(this, &SpriteFramesEditor::_play_bw_pressed));
+ play_bw_from->connect("pressed", callable_mp(this, &SpriteFramesEditor::_play_bw_from_pressed));
+ stop->connect("pressed", callable_mp(this, &SpriteFramesEditor::_stop_pressed));
+
load = memnew(Button);
load->set_flat(true);
hbc->add_child(load);
@@ -1372,9 +1670,11 @@ SpriteFramesEditor::SpriteFramesEditor() {
frame_duration = memnew(SpinBox);
frame_duration->set_prefix(String::utf8("×"));
- frame_duration->set_min(0);
+ frame_duration->set_min(SPRITE_FRAME_MINIMUM_DURATION); // Avoid zero div.
frame_duration->set_max(10);
frame_duration->set_step(0.01);
+ frame_duration->set_custom_arrow_step(0.1);
+ frame_duration->set_allow_lesser(false);
frame_duration->set_allow_greater(true);
hbc->add_child(frame_duration);
@@ -1408,7 +1708,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
frame_list->set_max_columns(0);
frame_list->set_icon_mode(ItemList::ICON_MODE_TOP);
frame_list->set_max_text_lines(2);
- frame_list->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(frame_list, SpriteFramesEditor);
frame_list->connect("gui_input", callable_mp(this, &SpriteFramesEditor::_frame_list_gui_input));
frame_list->connect("item_selected", callable_mp(this, &SpriteFramesEditor::_frame_list_item_selected));
@@ -1551,7 +1851,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_vb->add_child(split_sheet_panel);
split_sheet_preview = memnew(TextureRect);
- split_sheet_preview->set_ignore_texture_size(true);
+ split_sheet_preview->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
split_sheet_preview->set_mouse_filter(MOUSE_FILTER_PASS);
split_sheet_preview->connect("draw", callable_mp(this, &SpriteFramesEditor::_sheet_preview_draw));
split_sheet_preview->connect("gui_input", callable_mp(this, &SpriteFramesEditor::_sheet_preview_input));
@@ -1619,16 +1919,16 @@ SpriteFramesEditor::SpriteFramesEditor() {
}
void SpriteFramesEditorPlugin::edit(Object *p_object) {
- SpriteFrames *s;
+ Ref<SpriteFrames> s;
AnimatedSprite2D *animated_sprite = Object::cast_to<AnimatedSprite2D>(p_object);
if (animated_sprite) {
- s = *animated_sprite->get_sprite_frames();
+ s = animated_sprite->get_sprite_frames();
} else {
AnimatedSprite3D *animated_sprite_3d = Object::cast_to<AnimatedSprite3D>(p_object);
if (animated_sprite_3d) {
- s = *animated_sprite_3d->get_sprite_frames();
+ s = animated_sprite_3d->get_sprite_frames();
} else {
- s = Object::cast_to<SpriteFrames>(p_object);
+ s = p_object;
}
}
@@ -1653,9 +1953,7 @@ void SpriteFramesEditorPlugin::make_visible(bool p_visible) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(frames_editor);
} else {
button->hide();
- if (frames_editor->is_visible_in_tree()) {
- EditorNode::get_singleton()->hide_bottom_panel();
- }
+ frames_editor->edit(Ref<SpriteFrames>());
}
}
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index a5e0e54fb8..1dfb909388 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -33,6 +33,7 @@
#include "editor/editor_plugin.h"
#include "scene/2d/animated_sprite_2d.h"
+#include "scene/3d/sprite_3d.h"
#include "scene/gui/button.h"
#include "scene/gui/check_button.h"
#include "scene/gui/dialogs.h"
@@ -57,6 +58,9 @@ public:
class SpriteFramesEditor : public HSplitContainer {
GDCLASS(SpriteFramesEditor, HSplitContainer);
+ Ref<SpriteFrames> frames;
+ Node *animated_sprite = nullptr;
+
enum {
PARAM_USE_CURRENT, // Used in callbacks to indicate `dominant_param` should be not updated.
PARAM_FRAME_COUNT, // Keep "Horizontal" & "Vertical" values.
@@ -66,6 +70,18 @@ class SpriteFramesEditor : public HSplitContainer {
bool read_only = false;
+ Ref<Texture2D> autoplay_icon;
+ Ref<Texture2D> stop_icon;
+ Ref<Texture2D> pause_icon;
+ Ref<Texture2D> empty_icon = memnew(ImageTexture);
+
+ HBoxContainer *playback_container = nullptr;
+ Button *stop = nullptr;
+ Button *play = nullptr;
+ Button *play_from = nullptr;
+ Button *play_bw = nullptr;
+ Button *play_bw_from = nullptr;
+
Button *load = nullptr;
Button *load_sheet = nullptr;
Button *delete_frame = nullptr;
@@ -85,18 +101,19 @@ class SpriteFramesEditor : public HSplitContainer {
Button *add_anim = nullptr;
Button *delete_anim = nullptr;
- LineEdit *anim_search_box = nullptr;
+ SpinBox *anim_speed = nullptr;
+ Button *anim_loop = nullptr;
+
+ HBoxContainer *autoplay_container = nullptr;
+ Button *autoplay = nullptr;
+ LineEdit *anim_search_box = nullptr;
Tree *animations = nullptr;
- SpinBox *anim_speed = nullptr;
- CheckButton *anim_loop = nullptr;
EditorFileDialog *file = nullptr;
AcceptDialog *dialog = nullptr;
- SpriteFrames *frames = nullptr;
-
StringName edited_anim;
ConfirmationDialog *delete_dialog = nullptr;
@@ -146,7 +163,15 @@ class SpriteFramesEditor : public HSplitContainer {
void _frame_duration_changed(double p_value);
void _update_library(bool p_skip_selector = false);
- void _animation_select();
+ void _update_stop_icon();
+ void _play_pressed();
+ void _play_from_pressed();
+ void _play_bw_pressed();
+ void _play_bw_from_pressed();
+ void _autoplay_pressed();
+ void _stop_pressed();
+
+ void _animation_selected();
void _animation_name_edited();
void _animation_add();
void _animation_remove();
@@ -183,12 +208,24 @@ class SpriteFramesEditor : public HSplitContainer {
void _sheet_zoom_reset();
void _sheet_select_clear_all_frames();
+ void _edit();
+ void _regist_scene_undo(EditorUndoRedoManager *undo_redo);
+ void _fetch_sprite_node();
+ void _remove_sprite_node();
+
+ bool sprite_node_updating = false;
+ void _sync_animation();
+
+ void _select_animation(const String &p_name, bool p_update_node = true);
+ void _rename_node_animation(EditorUndoRedoManager *undo_redo, bool is_undo, const String &p_filter, const String &p_new_animation, const String &p_new_autoplay);
+
protected:
void _notification(int p_what);
+ void _node_removed(Node *p_node);
static void _bind_methods();
public:
- void edit(SpriteFrames *p_frames);
+ void edit(Ref<SpriteFrames> p_frames);
SpriteFramesEditor();
};
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index f3f0542b9b..a376699e54 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -649,8 +649,6 @@ TextEditor::TextEditor() {
goto_line_dialog = memnew(GotoLineDialog);
add_child(goto_line_dialog);
-
- code_editor->get_text_editor()->set_drag_forwarding(this);
}
TextEditor::~TextEditor() {
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp
index cd160f8b14..ffd9564816 100644
--- a/editor/plugins/text_shader_editor.cpp
+++ b/editor/plugins/text_shader_editor.cpp
@@ -301,7 +301,9 @@ void ShaderTextEditor::_load_theme_settings() {
syntax_highlighter->clear_color_regions();
syntax_highlighter->add_color_region("/*", "*/", comment_color, false);
syntax_highlighter->add_color_region("//", "", comment_color, true);
- syntax_highlighter->set_disabled_branch_color(comment_color);
+
+ // Disabled preprocessor branches use translucent text color to be easier to distinguish from comments.
+ syntax_highlighter->set_disabled_branch_color(Color(EDITOR_GET("text_editor/theme/highlighting/text_color")) * Color(1, 1, 1, 0.5));
te->clear_comment_delimiters();
te->add_comment_delimiter("/*", "*/", false);
@@ -381,11 +383,12 @@ void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptLa
List<ScriptLanguage::CodeCompletionOption> pp_defines;
ShaderPreprocessor preprocessor;
String code;
- complete_from_path = (shader.is_valid() ? shader->get_path() : shader_inc->get_path()).get_base_dir();
+ String resource_path = (shader.is_valid() ? shader->get_path() : shader_inc->get_path());
+ complete_from_path = resource_path.get_base_dir();
if (!complete_from_path.ends_with("/")) {
complete_from_path += "/";
}
- preprocessor.preprocess(p_code, "", code, nullptr, nullptr, nullptr, nullptr, &pp_options, &pp_defines, _complete_include_paths);
+ preprocessor.preprocess(p_code, resource_path, code, nullptr, nullptr, nullptr, nullptr, &pp_options, &pp_defines, _complete_include_paths);
complete_from_path = String();
if (pp_options.size()) {
for (const ScriptLanguage::CodeCompletionOption &E : pp_options) {
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 2dab3fa278..2fb624b713 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -128,7 +128,7 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) {
texture_display->set_texture(p_texture);
texture_display->set_anchors_preset(TextureRect::PRESET_FULL_RECT);
texture_display->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
- texture_display->set_ignore_texture_size(true);
+ texture_display->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
add_child(texture_display);
if (p_show_metadata) {
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index 9a3b157f5b..816d081617 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -36,7 +36,7 @@ void TextureLayeredEditor::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseMotion> mm = p_event;
- if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
+ if (mm.is_valid() && (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
y_rot += -mm->get_relative().x * 0.01;
x_rot += mm->get_relative().y * 0.01;
_update_material();
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 59f2159167..7fa16e6cc6 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -256,10 +256,10 @@ void TextureRegionEditor::_region_draw() {
margins[2] = node_ninepatch->get_patch_margin(SIDE_LEFT);
margins[3] = node_ninepatch->get_patch_margin(SIDE_RIGHT);
} else if (obj_styleBox.is_valid()) {
- margins[0] = obj_styleBox->get_margin_size(SIDE_TOP);
- margins[1] = obj_styleBox->get_margin_size(SIDE_BOTTOM);
- margins[2] = obj_styleBox->get_margin_size(SIDE_LEFT);
- margins[3] = obj_styleBox->get_margin_size(SIDE_RIGHT);
+ margins[0] = obj_styleBox->get_texture_margin(SIDE_TOP);
+ margins[1] = obj_styleBox->get_texture_margin(SIDE_BOTTOM);
+ margins[2] = obj_styleBox->get_texture_margin(SIDE_LEFT);
+ margins[3] = obj_styleBox->get_texture_margin(SIDE_RIGHT);
}
Vector2 pos[4] = {
@@ -300,7 +300,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
mtx.xform(rect.position + Vector2(0, rect.size.y / 2)) + Vector2(-handle_offset, 0)
};
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<InputEventMouseButton> mb = p_input;
if (mb.is_valid()) {
if (mb->get_button_index() == MouseButton::LEFT) {
@@ -314,10 +314,10 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
margins[2] = node_ninepatch->get_patch_margin(SIDE_LEFT);
margins[3] = node_ninepatch->get_patch_margin(SIDE_RIGHT);
} else if (obj_styleBox.is_valid()) {
- margins[0] = obj_styleBox->get_margin_size(SIDE_TOP);
- margins[1] = obj_styleBox->get_margin_size(SIDE_BOTTOM);
- margins[2] = obj_styleBox->get_margin_size(SIDE_LEFT);
- margins[3] = obj_styleBox->get_margin_size(SIDE_RIGHT);
+ margins[0] = obj_styleBox->get_texture_margin(SIDE_TOP);
+ margins[1] = obj_styleBox->get_texture_margin(SIDE_BOTTOM);
+ margins[2] = obj_styleBox->get_texture_margin(SIDE_LEFT);
+ margins[3] = obj_styleBox->get_texture_margin(SIDE_RIGHT);
}
Vector2 pos[4] = {
@@ -349,7 +349,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
for (const Rect2 &E : autoslice_cache) {
if (E.has_point(point)) {
rect = E;
- if (Input::get_singleton()->is_key_pressed(Key::CTRL) && !(Input::get_singleton()->is_key_pressed(Key(Key::SHIFT | Key::ALT)))) {
+ if (Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL) && !(Input::get_singleton()->is_key_pressed(Key(Key::SHIFT | Key::ALT)))) {
Rect2 r;
if (atlas_tex.is_valid()) {
r = atlas_tex->get_region();
@@ -431,8 +431,8 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
undo_redo->add_do_method(node_ninepatch, "set_patch_margin", side[edited_margin], node_ninepatch->get_patch_margin(side[edited_margin]));
undo_redo->add_undo_method(node_ninepatch, "set_patch_margin", side[edited_margin], prev_margin);
} else if (obj_styleBox.is_valid()) {
- undo_redo->add_do_method(obj_styleBox.ptr(), "set_margin_size", side[edited_margin], obj_styleBox->get_margin_size(side[edited_margin]));
- undo_redo->add_undo_method(obj_styleBox.ptr(), "set_margin_size", side[edited_margin], prev_margin);
+ undo_redo->add_do_method(obj_styleBox.ptr(), "set_texture_margin", side[edited_margin], obj_styleBox->get_texture_margin(side[edited_margin]));
+ undo_redo->add_undo_method(obj_styleBox.ptr(), "set_texture_margin", side[edited_margin], prev_margin);
obj_styleBox->emit_signal(CoreStringNames::get_singleton()->changed);
}
edited_margin = -1;
@@ -474,7 +474,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
node_ninepatch->set_patch_margin(side[edited_margin], prev_margin);
}
if (obj_styleBox.is_valid()) {
- obj_styleBox->set_margin_size(side[edited_margin], prev_margin);
+ obj_styleBox->set_texture_margin(side[edited_margin], prev_margin);
}
edited_margin = -1;
} else {
@@ -535,7 +535,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
node_ninepatch->set_patch_margin(side[edited_margin], new_margin);
}
if (obj_styleBox.is_valid()) {
- obj_styleBox->set_margin_size(side[edited_margin], new_margin);
+ obj_styleBox->set_texture_margin(side[edited_margin], new_margin);
}
} else {
Vector2 new_pos = mtx.affine_inverse().xform(mm->get_position());
@@ -620,22 +620,14 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
}
}
-void TextureRegionEditor::_scroll_callback(Vector2 p_scroll_vec, bool p_alt) {
- _pan_callback(-p_scroll_vec * 32);
-}
-
-void TextureRegionEditor::_pan_callback(Vector2 p_scroll_vec) {
+void TextureRegionEditor::_pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event) {
p_scroll_vec /= draw_zoom;
hscroll->set_value(hscroll->get_value() - p_scroll_vec.x);
vscroll->set_value(vscroll->get_value() - p_scroll_vec.y);
}
-void TextureRegionEditor::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) {
- if (p_scroll_vec.y < 0) {
- _zoom_on_position(draw_zoom * ((0.95 + (0.05 * Math::abs(p_scroll_vec.y))) / 0.95), p_origin);
- } else {
- _zoom_on_position(draw_zoom * (1 - (0.05 * Math::abs(p_scroll_vec.y))), p_origin);
- }
+void TextureRegionEditor::_zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event) {
+ _zoom_on_position(draw_zoom * p_zoom_factor, p_origin);
}
void TextureRegionEditor::_scroll_changed(float) {
@@ -748,6 +740,9 @@ void TextureRegionEditor::_update_rect() {
}
} else if (obj_styleBox.is_valid()) {
rect = obj_styleBox->get_region_rect();
+ if (rect == Rect2()) {
+ rect = Rect2(Vector2(), obj_styleBox->get_texture()->get_size());
+ }
}
}
@@ -824,10 +819,18 @@ void TextureRegionEditor::_update_autoslice() {
void TextureRegionEditor::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_ENTER_TREE:
+ case NOTIFICATION_EXIT_TREE: {
+ get_tree()->disconnect("node_removed", callable_mp(this, &TextureRegionEditor::_node_removed));
+ } break;
+
+ case NOTIFICATION_ENTER_TREE: {
+ get_tree()->connect("node_removed", callable_mp(this, &TextureRegionEditor::_node_removed));
+ [[fallthrough]];
+ }
case NOTIFICATION_THEME_CHANGED: {
edit_draw->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("Tree")));
} break;
+
case NOTIFICATION_READY: {
zoom_out->set_icon(get_theme_icon(SNAME("ZoomLess"), SNAME("EditorIcons")));
zoom_reset->set_icon(get_theme_icon(SNAME("ZoomReset"), SNAME("EditorIcons")));
@@ -840,11 +843,13 @@ void TextureRegionEditor::_notification(int p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/sub_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
} break;
+
case NOTIFICATION_VISIBILITY_CHANGED: {
if (snap_mode == SNAP_AUTOSLICE && is_visible() && autoslice_is_dirty) {
_update_autoslice();
}
} break;
+
case NOTIFICATION_WM_WINDOW_FOCUS_IN: {
// This happens when the user leaves the Editor and returns,
// they could have changed the textures, so the cache is cleared.
@@ -867,7 +872,6 @@ void TextureRegionEditor::_node_removed(Object *p_obj) {
void TextureRegionEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_edit_region"), &TextureRegionEditor::_edit_region);
- ClassDB::bind_method(D_METHOD("_node_removed"), &TextureRegionEditor::_node_removed);
ClassDB::bind_method(D_METHOD("_zoom_on_position"), &TextureRegionEditor::_zoom_on_position);
ClassDB::bind_method(D_METHOD("_update_rect"), &TextureRegionEditor::_update_rect);
}
@@ -1160,7 +1164,7 @@ TextureRegionEditor::TextureRegionEditor() {
hb_grid->hide();
panner.instantiate();
- panner->set_callbacks(callable_mp(this, &TextureRegionEditor::_scroll_callback), callable_mp(this, &TextureRegionEditor::_pan_callback), callable_mp(this, &TextureRegionEditor::_zoom_callback));
+ panner->set_callbacks(callable_mp(this, &TextureRegionEditor::_pan_callback), callable_mp(this, &TextureRegionEditor::_zoom_callback));
edit_draw = memnew(Panel);
vb->add_child(edit_draw);
@@ -1220,7 +1224,7 @@ void EditorInspectorPluginTextureRegion::_region_edit(Object *p_object) {
texture_region_editor->edit(p_object);
}
-bool EditorInspectorPluginTextureRegion::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginTextureRegion::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
if ((p_type == Variant::RECT2 || p_type == Variant::RECT2I)) {
if (((Object::cast_to<Sprite2D>(p_object) || Object::cast_to<Sprite3D>(p_object) || Object::cast_to<NinePatchRect>(p_object) || Object::cast_to<StyleBoxTexture>(p_object)) && p_path == "region_rect") || (Object::cast_to<AtlasTexture>(p_object) && p_path == "region")) {
Button *button = EditorInspector::create_inspector_action_button(TTR("Edit Region"));
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index 0325700d25..c303cec3f5 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -103,9 +103,8 @@ class TextureRegionEditor : public AcceptDialog {
bool request_center = false;
Ref<ViewPanner> panner;
- void _scroll_callback(Vector2 p_scroll_vec, bool p_alt);
- void _pan_callback(Vector2 p_scroll_vec);
- void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt);
+ void _pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event);
+ void _zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event);
void _set_snap_mode(int p_mode);
void _set_snap_off_x(float p_val);
@@ -157,7 +156,7 @@ class EditorInspectorPluginTextureRegion : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) override;
EditorInspectorPluginTextureRegion();
};
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 68c1041a0b..14ff59b442 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -800,7 +800,7 @@ void ThemeItemImportTree::_import_selected() {
ProgressDialog::get_singleton()->end_task("import_theme_items");
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Import Theme Items"));
ur->add_do_method(*edited_theme, "clear");
@@ -1498,7 +1498,7 @@ void ThemeItemEditorDialog::_item_tree_button_pressed(Object *p_item, int p_colu
String item_name = item->get_text(0);
int data_type = item->get_parent()->get_metadata(0);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Remove Theme Item"));
ur->add_do_method(*edited_theme, "clear_theme_item", (Theme::DataType)data_type, item_name, edited_item_type);
ur->add_undo_method(*edited_theme, "set_theme_item", (Theme::DataType)data_type, item_name, edited_item_type, edited_theme->get_theme_item((Theme::DataType)data_type, item_name, edited_item_type));
@@ -1517,7 +1517,7 @@ void ThemeItemEditorDialog::_add_theme_type(const String &p_new_text) {
const String new_type = edit_add_type_value->get_text().strip_edges();
edit_add_type_value->clear();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Add Theme Type"));
ur->add_do_method(*edited_theme, "add_type", new_type);
@@ -1529,7 +1529,7 @@ void ThemeItemEditorDialog::_add_theme_type(const String &p_new_text) {
}
void ThemeItemEditorDialog::_add_theme_item(Theme::DataType p_data_type, String p_item_name, String p_item_type) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Create Theme Item"));
switch (p_data_type) {
@@ -1574,7 +1574,7 @@ void ThemeItemEditorDialog::_remove_theme_type(const String &p_theme_type) {
Ref<Theme> old_snapshot = edited_theme->duplicate();
Ref<Theme> new_snapshot = edited_theme->duplicate();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Remove Theme Type"));
new_snapshot->remove_type(p_theme_type);
@@ -1597,7 +1597,7 @@ void ThemeItemEditorDialog::_remove_data_type_items(Theme::DataType p_data_type,
Ref<Theme> old_snapshot = edited_theme->duplicate();
Ref<Theme> new_snapshot = edited_theme->duplicate();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Remove Data Type Items From Theme"));
new_snapshot->get_theme_item_list(p_data_type, p_item_type, &names);
@@ -1626,7 +1626,7 @@ void ThemeItemEditorDialog::_remove_class_items() {
Ref<Theme> old_snapshot = edited_theme->duplicate();
Ref<Theme> new_snapshot = edited_theme->duplicate();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Remove Class Items From Theme"));
for (int dt = 0; dt < Theme::DATA_TYPE_MAX; dt++) {
@@ -1662,7 +1662,7 @@ void ThemeItemEditorDialog::_remove_custom_items() {
Ref<Theme> old_snapshot = edited_theme->duplicate();
Ref<Theme> new_snapshot = edited_theme->duplicate();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Remove Custom Items From Theme"));
for (int dt = 0; dt < Theme::DATA_TYPE_MAX; dt++) {
@@ -1698,7 +1698,7 @@ void ThemeItemEditorDialog::_remove_all_items() {
Ref<Theme> old_snapshot = edited_theme->duplicate();
Ref<Theme> new_snapshot = edited_theme->duplicate();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Remove All Items From Theme"));
for (int dt = 0; dt < Theme::DATA_TYPE_MAX; dt++) {
@@ -1802,7 +1802,7 @@ void ThemeItemEditorDialog::_confirm_edit_theme_item() {
if (item_popup_mode == CREATE_THEME_ITEM) {
_add_theme_item(edit_item_data_type, theme_item_name->get_text(), edited_item_type);
} else if (item_popup_mode == RENAME_THEME_ITEM) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Rename Theme Item"));
ur->add_do_method(*edited_theme, "rename_theme_item", edit_item_data_type, edit_item_old_name, theme_item_name->get_text(), edited_item_type);
@@ -2828,7 +2828,7 @@ void ThemeTypeEditor::_add_default_type_items() {
updating = false;
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Override All Default Theme Items"));
ur->add_do_method(*edited_theme, "merge_with", new_snapshot);
@@ -2848,7 +2848,7 @@ void ThemeTypeEditor::_item_add_cbk(int p_data_type, Control *p_control) {
}
String item_name = le->get_text().strip_edges();
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Add Theme Item"));
switch (p_data_type) {
@@ -2893,7 +2893,7 @@ void ThemeTypeEditor::_item_add_lineedit_cbk(String p_value, int p_data_type, Co
}
void ThemeTypeEditor::_item_override_cbk(int p_data_type, String p_item_name) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Override Theme Item"));
switch (p_data_type) {
@@ -2932,7 +2932,7 @@ void ThemeTypeEditor::_item_override_cbk(int p_data_type, String p_item_name) {
}
void ThemeTypeEditor::_item_remove_cbk(int p_data_type, String p_item_name) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Remove Theme Item"));
switch (p_data_type) {
@@ -3006,7 +3006,7 @@ void ThemeTypeEditor::_item_rename_confirmed(int p_data_type, String p_item_name
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Rename Theme Item"));
switch (p_data_type) {
@@ -3062,7 +3062,7 @@ void ThemeTypeEditor::_item_rename_canceled(int p_data_type, String p_item_name,
}
void ThemeTypeEditor::_color_item_changed(Color p_value, String p_item_name) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Color Item in Theme"), UndoRedo::MERGE_ENDS);
ur->add_do_method(*edited_theme, "set_color", p_item_name, edited_type, p_value);
ur->add_undo_method(*edited_theme, "set_color", p_item_name, edited_type, edited_theme->get_color(p_item_name, edited_type));
@@ -3070,7 +3070,7 @@ void ThemeTypeEditor::_color_item_changed(Color p_value, String p_item_name) {
}
void ThemeTypeEditor::_constant_item_changed(float p_value, String p_item_name) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Constant Item in Theme"));
ur->add_do_method(*edited_theme, "set_constant", p_item_name, edited_type, p_value);
ur->add_undo_method(*edited_theme, "set_constant", p_item_name, edited_type, edited_theme->get_constant(p_item_name, edited_type));
@@ -3078,7 +3078,7 @@ void ThemeTypeEditor::_constant_item_changed(float p_value, String p_item_name)
}
void ThemeTypeEditor::_font_size_item_changed(float p_value, String p_item_name) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Font Size Item in Theme"));
ur->add_do_method(*edited_theme, "set_font_size", p_item_name, edited_type, p_value);
ur->add_undo_method(*edited_theme, "set_font_size", p_item_name, edited_type, edited_theme->get_font_size(p_item_name, edited_type));
@@ -3090,7 +3090,7 @@ void ThemeTypeEditor::_edit_resource_item(Ref<Resource> p_resource, bool p_edit)
}
void ThemeTypeEditor::_font_item_changed(Ref<Font> p_value, String p_item_name) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Font Item in Theme"));
ur->add_do_method(*edited_theme, "set_font", p_item_name, edited_type, p_value.is_valid() ? p_value : Ref<Font>());
@@ -3107,7 +3107,7 @@ void ThemeTypeEditor::_font_item_changed(Ref<Font> p_value, String p_item_name)
}
void ThemeTypeEditor::_icon_item_changed(Ref<Texture2D> p_value, String p_item_name) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Icon Item in Theme"));
ur->add_do_method(*edited_theme, "set_icon", p_item_name, edited_type, p_value.is_valid() ? p_value : Ref<Texture2D>());
@@ -3124,7 +3124,7 @@ void ThemeTypeEditor::_icon_item_changed(Ref<Texture2D> p_value, String p_item_n
}
void ThemeTypeEditor::_stylebox_item_changed(Ref<StyleBox> p_value, String p_item_name) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Stylebox Item in Theme"));
ur->add_do_method(*edited_theme, "set_stylebox", p_item_name, edited_type, p_value.is_valid() ? p_value : Ref<StyleBox>());
@@ -3167,7 +3167,7 @@ void ThemeTypeEditor::_on_pin_leader_button_pressed(Control *p_editor, String p_
stylebox = Object::cast_to<EditorResourcePicker>(p_editor)->get_edited_resource();
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Pin Stylebox"));
ur->add_do_method(this, "_pin_leading_stylebox", p_item_name, stylebox);
@@ -3200,7 +3200,7 @@ void ThemeTypeEditor::_pin_leading_stylebox(String p_item_name, Ref<StyleBox> p_
}
void ThemeTypeEditor::_on_unpin_leader_button_pressed() {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Unpin Stylebox"));
ur->add_do_method(this, "_unpin_leading_stylebox");
ur->add_undo_method(this, "_pin_leading_stylebox", leading_stylebox.item_name, leading_stylebox.stylebox);
@@ -3269,7 +3269,7 @@ void ThemeTypeEditor::_update_stylebox_from_leading() {
}
void ThemeTypeEditor::_type_variation_changed(const String p_value) {
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Set Theme Type Variation"));
if (p_value.is_empty()) {
@@ -3335,8 +3335,10 @@ void ThemeTypeEditor::set_edited_theme(const Ref<Theme> &p_theme) {
}
edited_theme = p_theme;
- edited_theme->connect("changed", callable_mp(this, &ThemeTypeEditor::_update_type_list_debounced));
- _update_type_list();
+ if (edited_theme.is_valid()) {
+ edited_theme->connect("changed", callable_mp(this, &ThemeTypeEditor::_update_type_list_debounced));
+ _update_type_list();
+ }
add_type_dialog->set_edited_theme(edited_theme);
}
@@ -3496,7 +3498,9 @@ void ThemeEditor::edit(const Ref<Theme> &p_theme) {
preview_tab->set_preview_theme(p_theme);
}
- theme_name->set_text(TTR("Theme:") + " " + theme->get_path().get_file());
+ if (theme.is_valid()) {
+ theme_name->set_text(TTR("Theme:") + " " + theme->get_path().get_file());
+ }
}
Ref<Theme> ThemeEditor::get_edited_theme() {
diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp
index 7edf6e3a30..eaf72d36ba 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.cpp
+++ b/editor/plugins/tiles/atlas_merging_dialog.cpp
@@ -31,7 +31,6 @@
#include "atlas_merging_dialog.h"
#include "editor/editor_file_dialog.h"
-#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_undo_redo_manager.h"
@@ -56,7 +55,7 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla
new_texture_region_size = new_texture_region_size.max(atlas_source->get_texture_region_size());
}
- // Generate the merged TileSetAtlasSource.
+ // Generate the new texture.
Vector2i atlas_offset;
int line_height = 0;
for (int source_index = 0; source_index < p_atlas_sources.size(); source_index++) {
@@ -72,28 +71,6 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla
Rect2i new_tile_rect_in_altas = Rect2i(atlas_offset + tile_id, atlas_source->get_tile_size_in_atlas(tile_id));
- // Create tiles and alternatives, then copy their properties.
- for (int alternative_index = 0; alternative_index < atlas_source->get_alternative_tiles_count(tile_id); alternative_index++) {
- int alternative_id = atlas_source->get_alternative_tile_id(tile_id, alternative_index);
- if (alternative_id == 0) {
- merged->create_tile(new_tile_rect_in_altas.position, new_tile_rect_in_altas.size);
- } else {
- merged->create_alternative_tile(new_tile_rect_in_altas.position, alternative_index);
- }
-
- // Copy the properties.
- TileData *original_tile_data = atlas_source->get_tile_data(tile_id, alternative_id);
- List<PropertyInfo> properties;
- original_tile_data->get_property_list(&properties);
- for (List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
- const StringName &property_name = E->get().name;
- merged->set(property_name, original_tile_data->get(property_name));
- }
-
- // Add to the mapping.
- merged_mapping[source_index][tile_id] = new_tile_rect_in_altas.position;
- }
-
// Copy the texture.
for (int frame = 0; frame < atlas_source->get_tile_animation_frames_count(tile_id); frame++) {
Rect2i src_rect = atlas_source->get_tile_texture_region(tile_id, frame);
@@ -103,6 +80,9 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla
}
output_image->blit_rect(atlas_source->get_texture()->get_image(), src_rect, dst_rect_wide.get_center() - src_rect.size / 2);
}
+
+ // Add to the mapping.
+ merged_mapping[source_index][tile_id] = new_tile_rect_in_altas.position;
}
// Compute the atlas offset.
@@ -115,8 +95,43 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla
}
}
- merged->set_name(p_atlas_sources[0]->get_name());
merged->set_texture(ImageTexture::create_from_image(output_image));
+
+ // Copy the tiles to the merged TileSetAtlasSource.
+ for (int source_index = 0; source_index < p_atlas_sources.size(); source_index++) {
+ Ref<TileSetAtlasSource> atlas_source = p_atlas_sources[source_index];
+ for (KeyValue<Vector2i, Vector2i> tile_mapping : merged_mapping[source_index]) {
+ // Create tiles and alternatives, then copy their properties.
+ for (int alternative_index = 0; alternative_index < atlas_source->get_alternative_tiles_count(tile_mapping.key); alternative_index++) {
+ int alternative_id = atlas_source->get_alternative_tile_id(tile_mapping.key, alternative_index);
+ if (alternative_id == 0) {
+ merged->create_tile(tile_mapping.value, atlas_source->get_tile_size_in_atlas(tile_mapping.key));
+ } else {
+ merged->create_alternative_tile(tile_mapping.value, alternative_index);
+ }
+
+ // Copy the properties.
+ TileData *src_tile_data = atlas_source->get_tile_data(tile_mapping.key, alternative_id);
+ List<PropertyInfo> properties;
+ src_tile_data->get_property_list(&properties);
+
+ TileData *dst_tile_data = merged->get_tile_data(tile_mapping.value, alternative_id);
+ for (PropertyInfo property : properties) {
+ if (!(property.usage & PROPERTY_USAGE_STORAGE)) {
+ continue;
+ }
+ Variant value = src_tile_data->get(property.name);
+ Variant default_value = ClassDB::class_get_default_property_value("TileData", property.name);
+ if (default_value.get_type() != Variant::NIL && bool(Variant::evaluate(Variant::OP_EQUAL, value, default_value))) {
+ continue;
+ }
+ dst_tile_data->set(property.name, value);
+ }
+ }
+ }
+ }
+
+ merged->set_name(p_atlas_sources[0]->get_name());
merged->set_texture_region_size(new_texture_region_size);
}
}
@@ -151,10 +166,12 @@ void AtlasMergingDialog::_merge_confirmed(String p_path) {
Ref<ImageTexture> output_image_texture = merged->get_texture();
output_image_texture->get_image()->save_png(p_path);
+ ResourceLoader::import(p_path);
+
Ref<Texture2D> new_texture_resource = ResourceLoader::load(p_path, "Texture2D");
merged->set_texture(new_texture_resource);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Merge TileSetAtlasSource"));
int next_id = tile_set->get_next_source_id();
undo_redo->add_do_method(*tile_set, "add_source", merged, next_id);
@@ -194,7 +211,7 @@ void AtlasMergingDialog::ok_pressed() {
}
void AtlasMergingDialog::cancel_pressed() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (int i = 0; i < commited_actions_count; i++) {
undo_redo->undo();
}
@@ -225,6 +242,14 @@ bool AtlasMergingDialog::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
+void AtlasMergingDialog::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ _update_texture();
+ } break;
+ }
+}
+
void AtlasMergingDialog::update_tile_set(Ref<TileSet> p_tile_set) {
ERR_FAIL_COND(!p_tile_set.is_valid());
tile_set = p_tile_set;
@@ -300,7 +325,7 @@ AtlasMergingDialog::AtlasMergingDialog() {
preview = memnew(TextureRect);
preview->set_h_size_flags(Control::SIZE_EXPAND_FILL);
preview->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- preview->set_ignore_texture_size(true);
+ preview->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
preview->hide();
preview->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
atlas_merging_right_panel->add_child(preview);
diff --git a/editor/plugins/tiles/atlas_merging_dialog.h b/editor/plugins/tiles/atlas_merging_dialog.h
index 032541c90e..bf1b56894f 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.h
+++ b/editor/plugins/tiles/atlas_merging_dialog.h
@@ -75,6 +75,8 @@ protected:
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
+ void _notification(int p_what);
+
public:
void update_tile_set(Ref<TileSet> p_tile_set);
diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp
index 3c6ed0f049..fd651dd507 100644
--- a/editor/plugins/tiles/tile_atlas_view.cpp
+++ b/editor/plugins/tiles/tile_atlas_view.cpp
@@ -47,18 +47,14 @@ void TileAtlasView::gui_input(const Ref<InputEvent> &p_event) {
}
}
-void TileAtlasView::_scroll_callback(Vector2 p_scroll_vec, bool p_alt) {
- _pan_callback(-p_scroll_vec * 32);
-}
-
-void TileAtlasView::_pan_callback(Vector2 p_scroll_vec) {
+void TileAtlasView::_pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event) {
panning += p_scroll_vec;
_update_zoom_and_panning(true);
emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning);
}
-void TileAtlasView::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) {
- zoom_widget->set_zoom_by_increments(-p_scroll_vec.y * 2);
+void TileAtlasView::_zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event) {
+ zoom_widget->set_zoom(zoom_widget->get_zoom() * p_zoom_factor);
_update_zoom_and_panning(true);
emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning);
}
@@ -251,7 +247,7 @@ void TileAtlasView::_draw_base_tiles() {
for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(atlas_coords); frame++) {
// Update the y to max value.
Rect2i base_frame_rect = tile_set_atlas_source->get_tile_texture_region(atlas_coords, frame);
- Vector2i offset_pos = base_frame_rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, 0);
+ Vector2i offset_pos = base_frame_rect.get_center() + tile_set_atlas_source->get_tile_data(atlas_coords, 0)->get_texture_origin();
// Draw the tile.
TileMap::draw_tile(base_tiles_draw->get_canvas_item(), offset_pos, tile_set, source_id, atlas_coords, 0, frame);
@@ -326,18 +322,19 @@ void TileAtlasView::_draw_base_tiles_shape_grid() {
Vector2i tile_shape_size = tile_set->get_tile_size();
for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) {
Vector2i tile_id = tile_set_atlas_source->get_tile_id(i);
- Vector2 in_tile_base_offset = tile_set_atlas_source->get_tile_effective_texture_offset(tile_id, 0);
-
- for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(tile_id); frame++) {
- Color color = grid_color;
- if (frame > 0) {
- color.a *= 0.3;
+ Vector2 in_tile_base_offset = tile_set_atlas_source->get_tile_data(tile_id, 0)->get_texture_origin();
+ if (tile_set_atlas_source->is_position_in_tile_texture_region(tile_id, 0, -tile_shape_size / 2) && tile_set_atlas_source->is_position_in_tile_texture_region(tile_id, 0, tile_shape_size / 2 - Vector2(1, 1))) {
+ for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(tile_id); frame++) {
+ Color color = grid_color;
+ if (frame > 0) {
+ color.a *= 0.3;
+ }
+ Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(tile_id, frame);
+ Transform2D tile_xform;
+ tile_xform.set_origin(texture_region.get_center() + in_tile_base_offset);
+ tile_xform.set_scale(tile_shape_size);
+ tile_set->draw_tile_shape(base_tiles_shape_grid, tile_xform, color);
}
- Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(tile_id);
- Transform2D tile_xform;
- tile_xform.set_origin(texture_region.get_center() + in_tile_base_offset);
- tile_xform.set_scale(tile_shape_size);
- tile_set->draw_tile_shape(base_tiles_shape_grid, tile_xform, color);
}
}
}
@@ -376,10 +373,10 @@ void TileAtlasView::_draw_alternatives() {
// Update the y to max value.
Vector2i offset_pos;
if (transposed) {
- offset_pos = (current_pos + Vector2(texture_region_size.y, texture_region_size.x) / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, alternative_id));
+ offset_pos = (current_pos + Vector2(texture_region_size.y, texture_region_size.x) / 2 + tile_data->get_texture_origin());
y_increment = MAX(y_increment, texture_region_size.x);
} else {
- offset_pos = (current_pos + texture_region_size / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, alternative_id));
+ offset_pos = (current_pos + texture_region_size / 2 + tile_data->get_texture_origin());
y_increment = MAX(y_increment, texture_region_size.y);
}
@@ -454,21 +451,31 @@ void TileAtlasView::set_padding(Side p_side, int p_padding) {
margin_container_paddings[p_side] = p_padding;
}
-Vector2i TileAtlasView::get_atlas_tile_coords_at_pos(const Vector2 p_pos) const {
+Vector2i TileAtlasView::get_atlas_tile_coords_at_pos(const Vector2 p_pos, bool p_clamp) const {
Ref<Texture2D> texture = tile_set_atlas_source->get_texture();
- if (texture.is_valid()) {
- Vector2i margins = tile_set_atlas_source->get_margins();
- Vector2i separation = tile_set_atlas_source->get_separation();
- Vector2i texture_region_size = tile_set_atlas_source->get_texture_region_size();
+ if (!texture.is_valid()) {
+ return TileSetSource::INVALID_ATLAS_COORDS;
+ }
- // Compute index in atlas
- Vector2 pos = p_pos - margins;
- Vector2i ret = (pos / (texture_region_size + separation)).floor();
+ Vector2i margins = tile_set_atlas_source->get_margins();
+ Vector2i separation = tile_set_atlas_source->get_separation();
+ Vector2i texture_region_size = tile_set_atlas_source->get_texture_region_size();
- return ret;
+ // Compute index in atlas
+ Vector2 pos = p_pos - margins;
+ Vector2i ret = (pos / (texture_region_size + separation)).floor();
+
+ // Return invalid value (without clamp).
+ Rect2i rect = Rect2(Vector2i(), tile_set_atlas_source->get_atlas_grid_size());
+ if (!p_clamp && !rect.has_point(ret)) {
+ return TileSetSource::INVALID_ATLAS_COORDS;
}
- return TileSetSource::INVALID_ATLAS_COORDS;
+ // Clamp.
+ ret.x = CLAMP(ret.x, 0, rect.size.x - 1);
+ ret.y = CLAMP(ret.y, 0, rect.size.y - 1);
+
+ return ret;
}
void TileAtlasView::_update_alternative_tiles_rect_cache() {
@@ -573,7 +580,7 @@ TileAtlasView::TileAtlasView() {
add_child(button_center_view);
panner.instantiate();
- panner->set_callbacks(callable_mp(this, &TileAtlasView::_scroll_callback), callable_mp(this, &TileAtlasView::_pan_callback), callable_mp(this, &TileAtlasView::_zoom_callback));
+ panner->set_callbacks(callable_mp(this, &TileAtlasView::_pan_callback), callable_mp(this, &TileAtlasView::_zoom_callback));
panner->set_enable_rmb(true);
center_container = memnew(CenterContainer);
diff --git a/editor/plugins/tiles/tile_atlas_view.h b/editor/plugins/tiles/tile_atlas_view.h
index 166abca2a3..4a7547f34b 100644
--- a/editor/plugins/tiles/tile_atlas_view.h
+++ b/editor/plugins/tiles/tile_atlas_view.h
@@ -65,9 +65,8 @@ private:
virtual void gui_input(const Ref<InputEvent> &p_event) override;
Ref<ViewPanner> panner;
- void _scroll_callback(Vector2 p_scroll_vec, bool p_alt);
- void _pan_callback(Vector2 p_scroll_vec);
- void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt);
+ void _pan_callback(Vector2 p_scroll_vec, Ref<InputEvent> p_event);
+ void _zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref<InputEvent> p_event);
HashMap<Vector2, HashMap<int, Rect2i>> alternative_tiles_rect_cache;
void _update_alternative_tiles_rect_cache();
@@ -128,7 +127,7 @@ public:
void set_texture_grid_visible(bool p_visible) { base_tiles_texture_grid->set_visible(p_visible); };
void set_tile_shape_grid_visible(bool p_visible) { base_tiles_shape_grid->set_visible(p_visible); };
- Vector2i get_atlas_tile_coords_at_pos(const Vector2 p_pos) const;
+ Vector2i get_atlas_tile_coords_at_pos(const Vector2 p_pos, bool p_clamp = false) const;
void add_control_over_atlas_tiles(Control *p_control, bool scaled = true) {
if (scaled) {
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index fb4787f13c..3dd0c84ee7 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -169,8 +169,7 @@ void GenericTilePolygonEditor::_base_control_draw() {
}
// Draw the polygons.
- for (unsigned int i = 0; i < polygons.size(); i++) {
- const Vector<Vector2> &polygon = polygons[i];
+ for (const Vector<Vector2> &polygon : polygons) {
Color color = polygon_color;
if (!in_creation_polygon.is_empty()) {
color = color.darkened(0.3);
@@ -265,12 +264,12 @@ void GenericTilePolygonEditor::_zoom_changed() {
}
void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
- Ref<EditorUndoRedoManager> undo_redo;
+ EditorUndoRedoManager *undo_redo;
if (use_undo_redo) {
- undo_redo = EditorNode::get_undo_redo();
+ undo_redo = EditorUndoRedoManager::get_singleton();
} else {
// This nice hack allows for discarding undo actions without making code too complex.
- undo_redo.instantiate();
+ undo_redo = memnew(EditorUndoRedoManager);
}
switch (p_item_pressed) {
@@ -285,8 +284,8 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
undo_redo->add_do_method(base_control, "queue_redraw");
undo_redo->add_do_method(this, "emit_signal", "polygons_changed");
undo_redo->add_undo_method(this, "clear_polygons");
- for (unsigned int i = 0; i < polygons.size(); i++) {
- undo_redo->add_undo_method(this, "add_polygon", polygons[i]);
+ for (const PackedVector2Array &poly : polygons) {
+ undo_redo->add_undo_method(this, "add_polygon", poly);
}
undo_redo->add_undo_method(base_control, "queue_redraw");
undo_redo->add_undo_method(this, "emit_signal", "polygons_changed");
@@ -298,8 +297,8 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
undo_redo->add_do_method(base_control, "queue_redraw");
undo_redo->add_do_method(this, "emit_signal", "polygons_changed");
undo_redo->add_undo_method(this, "clear_polygons");
- for (unsigned int i = 0; i < polygons.size(); i++) {
- undo_redo->add_undo_method(this, "add_polygon", polygons[i]);
+ for (const PackedVector2Array &polygon : polygons) {
+ undo_redo->add_undo_method(this, "add_polygon", polygon);
}
undo_redo->add_undo_method(base_control, "queue_redraw");
undo_redo->add_undo_method(this, "emit_signal", "polygons_changed");
@@ -327,8 +326,8 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
}
for (unsigned int i = 0; i < polygons.size(); i++) {
Vector<Point2> new_polygon;
- for (int point_index = 0; point_index < polygons[i].size(); point_index++) {
- Vector2 point = polygons[i][point_index];
+ for (const Vector2 &vec : polygons[i]) {
+ Vector2 point = vec;
switch (p_item_pressed) {
case ROTATE_RIGHT: {
point = Vector2(-point.y, point.x);
@@ -351,8 +350,8 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
}
undo_redo->add_do_method(base_control, "queue_redraw");
undo_redo->add_do_method(this, "emit_signal", "polygons_changed");
- for (unsigned int i = 0; i < polygons.size(); i++) {
- undo_redo->add_undo_method(this, "set_polygon", polygons[i]);
+ for (const PackedVector2Array &polygon : polygons) {
+ undo_redo->add_undo_method(this, "set_polygon", polygon);
}
undo_redo->add_undo_method(base_control, "queue_redraw");
undo_redo->add_undo_method(this, "emit_signal", "polygons_changed");
@@ -361,6 +360,10 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
default:
break;
}
+
+ if (!use_undo_redo) {
+ memdelete(undo_redo);
+ }
}
void GenericTilePolygonEditor::_grab_polygon_point(Vector2 p_pos, const Transform2D &p_polygon_xform, int &r_polygon_index, int &r_point_index) {
@@ -445,12 +448,12 @@ void GenericTilePolygonEditor::_snap_to_half_pixel(Point2 &r_point) {
}
void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event) {
- Ref<EditorUndoRedoManager> undo_redo;
+ EditorUndoRedoManager *undo_redo;
if (use_undo_redo) {
- undo_redo = EditorNode::get_undo_redo();
+ undo_redo = EditorUndoRedoManager::get_singleton();
} else {
// This nice hack allows for discarding undo actions without making code too complex.
- undo_redo.instantiate();
+ undo_redo = memnew(EditorUndoRedoManager);
}
real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
@@ -493,11 +496,11 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event)
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
- if (mb->get_button_index() == MouseButton::WHEEL_UP && mb->is_ctrl_pressed()) {
+ if (mb->get_button_index() == MouseButton::WHEEL_UP && mb->is_command_or_control_pressed()) {
editor_zoom_widget->set_zoom_by_increments(1);
_zoom_changed();
accept_event();
- } else if (mb->get_button_index() == MouseButton::WHEEL_DOWN && mb->is_ctrl_pressed()) {
+ } else if (mb->get_button_index() == MouseButton::WHEEL_DOWN && mb->is_command_or_control_pressed()) {
editor_zoom_widget->set_zoom_by_increments(-1);
_zoom_changed();
accept_event();
@@ -643,6 +646,10 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event)
}
base_control->queue_redraw();
+
+ if (!use_undo_redo) {
+ memdelete(undo_redo);
+ }
}
void GenericTilePolygonEditor::set_use_undo_redo(bool p_use_undo_redo) {
@@ -902,7 +909,7 @@ Variant TileDataDefaultEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas_s
}
void TileDataDefaultEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) {
Vector2i coords = E.key.get_atlas_coords();
undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/%s", coords.x, coords.y, E.key.alternative_tile, property), E.value);
@@ -918,8 +925,8 @@ void TileDataDefaultEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas_
p_canvas_item->draw_set_transform_matrix(p_transform);
Rect2i rect;
- rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos));
- rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position())));
+ rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos, true));
+ rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position()), true));
rect = rect.abs();
RBSet<TileMapCell> edited;
@@ -953,7 +960,7 @@ void TileDataDefaultEditor::forward_painting_atlas_gui_input(TileAtlasView *p_ti
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
if (drag_type == DRAG_TYPE_PAINT) {
- Vector<Vector2i> line = Geometry2D::bresenham_line(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_last_pos), p_tile_atlas_view->get_atlas_tile_coords_at_pos(mm->get_position()));
+ Vector<Vector2i> line = Geometry2D::bresenham_line(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_last_pos, true), p_tile_atlas_view->get_atlas_tile_coords_at_pos(mm->get_position(), true));
for (int i = 0; i < line.size(); i++) {
Vector2i coords = p_tile_set_atlas_source->get_tile_at_coords(line[i]);
if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
@@ -971,19 +978,19 @@ void TileDataDefaultEditor::forward_painting_atlas_gui_input(TileAtlasView *p_ti
}
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
if (mb->get_button_index() == MouseButton::LEFT) {
if (mb->is_pressed()) {
- if (picker_button->is_pressed()) {
- Vector2i coords = p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position());
+ if (picker_button->is_pressed() || (mb->is_command_or_control_pressed() && !mb->is_shift_pressed())) {
+ Vector2i coords = p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position(), true);
coords = p_tile_set_atlas_source->get_tile_at_coords(coords);
if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
_set_painted_value(p_tile_set_atlas_source, coords, 0);
picker_button->set_pressed(false);
}
- } else if (mb->is_ctrl_pressed()) {
+ } else if (mb->is_command_or_control_pressed() && mb->is_shift_pressed()) {
drag_type = DRAG_TYPE_PAINT_RECT;
drag_modified.clear();
drag_painted_value = _get_painted_value();
@@ -992,7 +999,7 @@ void TileDataDefaultEditor::forward_painting_atlas_gui_input(TileAtlasView *p_ti
drag_type = DRAG_TYPE_PAINT;
drag_modified.clear();
drag_painted_value = _get_painted_value();
- Vector2i coords = p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position());
+ Vector2i coords = p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position(), true);
coords = p_tile_set_atlas_source->get_tile_at_coords(coords);
if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
TileMapCell cell;
@@ -1007,8 +1014,8 @@ void TileDataDefaultEditor::forward_painting_atlas_gui_input(TileAtlasView *p_ti
} else {
if (drag_type == DRAG_TYPE_PAINT_RECT) {
Rect2i rect;
- rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos));
- rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position()));
+ rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos, true));
+ rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position(), true));
rect = rect.abs();
drag_modified.clear();
@@ -1095,7 +1102,7 @@ void TileDataDefaultEditor::forward_painting_alternatives_gui_input(TileAtlasVie
drag_last_pos = mb->get_position();
}
} else {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Painting Tiles Property"));
_setup_undo_redo_action(p_tile_set_atlas_source, drag_modified, drag_painted_value);
undo_redo->commit_action(false);
@@ -1115,14 +1122,15 @@ void TileDataDefaultEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2
return;
}
+ Vector2 texture_origin = tile_data->get_texture_origin();
if (value.get_type() == Variant::BOOL) {
Ref<Texture2D> texture = (bool)value ? tile_bool_checked : tile_bool_unchecked;
int size = MIN(tile_set->get_tile_size().x, tile_set->get_tile_size().y) / 3;
- Rect2 rect = p_transform.xform(Rect2(Vector2(-size / 2, -size / 2), Vector2(size, size)));
+ Rect2 rect = p_transform.xform(Rect2(Vector2(-size / 2, -size / 2) - texture_origin, Vector2(size, size)));
p_canvas_item->draw_texture_rect(texture, rect);
} else if (value.get_type() == Variant::COLOR) {
int size = MIN(tile_set->get_tile_size().x, tile_set->get_tile_size().y) / 3;
- Rect2 rect = p_transform.xform(Rect2(Vector2(-size / 2, -size / 2), Vector2(size, size)));
+ Rect2 rect = p_transform.xform(Rect2(Vector2(-size / 2, -size / 2) - texture_origin, Vector2(size, size)));
p_canvas_item->draw_rect(rect, value);
} else {
Ref<Font> font = TileSetEditor::get_singleton()->get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
@@ -1159,8 +1167,8 @@ void TileDataDefaultEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2
}
Vector2 string_size = font->get_string_size(text, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size);
- p_canvas_item->draw_string_outline(font, p_transform.get_origin() + Vector2i(-string_size.x / 2, string_size.y / 2), text, HORIZONTAL_ALIGNMENT_CENTER, string_size.x, font_size, 1, Color(0, 0, 0, 1));
- p_canvas_item->draw_string(font, p_transform.get_origin() + Vector2i(-string_size.x / 2, string_size.y / 2), text, HORIZONTAL_ALIGNMENT_CENTER, string_size.x, font_size, color);
+ p_canvas_item->draw_string_outline(font, p_transform.xform(-texture_origin) + Vector2i(-string_size.x / 2, string_size.y / 2), text, HORIZONTAL_ALIGNMENT_CENTER, string_size.x, font_size, 1, Color(0, 0, 0, 1));
+ p_canvas_item->draw_string(font, p_transform.xform(-texture_origin) + Vector2i(-string_size.x / 2, string_size.y / 2), text, HORIZONTAL_ALIGNMENT_CENTER, string_size.x, font_size, color);
}
}
@@ -1234,20 +1242,38 @@ TileDataDefaultEditor::~TileDataDefaultEditor() {
memdelete(dummy_object);
}
-void TileDataTextureOffsetEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2D p_transform, TileMapCell p_cell, bool p_selected) {
+void TileDataTextureOriginEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2D p_transform, TileMapCell p_cell, bool p_selected) {
TileData *tile_data = _get_tile_data(p_cell);
ERR_FAIL_COND(!tile_data);
Vector2i tile_set_tile_size = tile_set->get_tile_size();
- Color color = Color(1.0, 0.0, 0.0);
+ Color color = Color(1.0, 1.0, 1.0);
if (p_selected) {
Color grid_color = EDITOR_GET("editors/tiles_editor/grid_color");
Color selection_color = Color().from_hsv(Math::fposmod(grid_color.get_h() + 0.5, 1.0), grid_color.get_s(), grid_color.get_v(), 1.0);
color = selection_color;
}
- Transform2D tile_xform;
- tile_xform.set_scale(tile_set_tile_size);
- tile_set->draw_tile_shape(p_canvas_item, p_transform * tile_xform, color);
+
+ TileSetSource *source = *(tile_set->get_source(p_cell.source_id));
+ TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source);
+ if (atlas_source->is_position_in_tile_texture_region(p_cell.get_atlas_coords(), p_cell.alternative_tile, -tile_set_tile_size / 2) && atlas_source->is_position_in_tile_texture_region(p_cell.get_atlas_coords(), p_cell.alternative_tile, tile_set_tile_size / 2 - Vector2(1, 1))) {
+ Transform2D tile_xform;
+ tile_xform.set_scale(tile_set_tile_size);
+ tile_set->draw_tile_shape(p_canvas_item, p_transform * tile_xform, color);
+ }
+
+ if (atlas_source->is_position_in_tile_texture_region(p_cell.get_atlas_coords(), p_cell.alternative_tile, Vector2())) {
+ Ref<Texture2D> position_icon = TileSetEditor::get_singleton()->get_theme_icon(SNAME("EditorPosition"), SNAME("EditorIcons"));
+ p_canvas_item->draw_texture(position_icon, p_transform.xform(Vector2()) - (position_icon->get_size() / 2), color);
+ } else {
+ Ref<Font> font = TileSetEditor::get_singleton()->get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
+ int font_size = TileSetEditor::get_singleton()->get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
+ Vector2 texture_origin = tile_data->get_texture_origin();
+ String text = vformat("%s", texture_origin);
+ Vector2 string_size = font->get_string_size(text, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size);
+ p_canvas_item->draw_string_outline(font, p_transform.xform(-texture_origin) + Vector2i(-string_size.x / 2, string_size.y / 2), text, HORIZONTAL_ALIGNMENT_CENTER, string_size.x, font_size, 1, Color(0, 0, 0, 1));
+ p_canvas_item->draw_string(font, p_transform.xform(-texture_origin) + Vector2i(-string_size.x / 2, string_size.y / 2), text, HORIZONTAL_ALIGNMENT_CENTER, string_size.x, font_size, color);
+ }
}
void TileDataPositionEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2D p_transform, TileMapCell p_cell, bool p_selected) {
@@ -1281,8 +1307,21 @@ void TileDataYSortEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2D
Color selection_color = Color().from_hsv(Math::fposmod(grid_color.get_h() + 0.5, 1.0), grid_color.get_s(), grid_color.get_v(), 1.0);
color = selection_color;
}
- Ref<Texture2D> position_icon = TileSetEditor::get_singleton()->get_theme_icon(SNAME("EditorPosition"), SNAME("EditorIcons"));
- p_canvas_item->draw_texture(position_icon, p_transform.xform(Vector2(0, tile_data->get_y_sort_origin())) - position_icon->get_size() / 2, color);
+ Vector2 texture_origin = tile_data->get_texture_origin();
+ TileSetSource *source = *(tile_set->get_source(p_cell.source_id));
+ TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source);
+ if (atlas_source->is_position_in_tile_texture_region(p_cell.get_atlas_coords(), p_cell.alternative_tile, Vector2(0, tile_data->get_y_sort_origin()))) {
+ Ref<Texture2D> position_icon = TileSetEditor::get_singleton()->get_theme_icon(SNAME("EditorPosition"), SNAME("EditorIcons"));
+ p_canvas_item->draw_texture(position_icon, p_transform.xform(Vector2(0, tile_data->get_y_sort_origin())) - position_icon->get_size() / 2, color);
+ } else {
+ Ref<Font> font = TileSetEditor::get_singleton()->get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
+ int font_size = TileSetEditor::get_singleton()->get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
+ String text = vformat("%s", tile_data->get_y_sort_origin());
+
+ Vector2 string_size = font->get_string_size(text, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size);
+ p_canvas_item->draw_string_outline(font, p_transform.xform(-texture_origin) + Vector2i(-string_size.x / 2, string_size.y / 2), text, HORIZONTAL_ALIGNMENT_CENTER, string_size.x, font_size, 1, Color(0, 0, 0, 1));
+ p_canvas_item->draw_string(font, p_transform.xform(-texture_origin) + Vector2i(-string_size.x / 2, string_size.y / 2), text, HORIZONTAL_ALIGNMENT_CENTER, string_size.x, font_size, color);
+ }
}
void TileDataOcclusionShapeEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2D p_transform, TileMapCell p_cell, bool p_selected) {
@@ -1326,7 +1365,7 @@ void TileDataOcclusionShapeEditor::_set_painted_value(TileSetAtlasSource *p_tile
if (occluder_polygon.is_valid()) {
polygon_editor->add_polygon(occluder_polygon->get_polygon());
}
- polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), p_tile_set_atlas_source->get_tile_effective_texture_offset(p_coords, p_alternative_tile), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
+ polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), tile_data->get_texture_origin(), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
}
void TileDataOcclusionShapeEditor::_set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) {
@@ -1335,7 +1374,7 @@ void TileDataOcclusionShapeEditor::_set_value(TileSetAtlasSource *p_tile_set_atl
Ref<OccluderPolygon2D> occluder_polygon = p_value;
tile_data->set_occluder(occlusion_layer, occluder_polygon);
- polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), p_tile_set_atlas_source->get_tile_effective_texture_offset(p_coords, p_alternative_tile), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
+ polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), tile_data->get_texture_origin(), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
}
Variant TileDataOcclusionShapeEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) {
@@ -1345,7 +1384,7 @@ Variant TileDataOcclusionShapeEditor::_get_value(TileSetAtlasSource *p_tile_set_
}
void TileDataOcclusionShapeEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) {
Vector2i coords = E.key.get_atlas_coords();
undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/occlusion_layer_%d/polygon", coords.x, coords.y, E.key.alternative_tile, occlusion_layer), E.value);
@@ -1482,7 +1521,7 @@ void TileDataCollisionEditor::_set_painted_value(TileSetAtlasSource *p_tile_set_
E.value->update_property();
}
- polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), p_tile_set_atlas_source->get_tile_effective_texture_offset(p_coords, p_alternative_tile), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
+ polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), tile_data->get_texture_origin(), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
}
void TileDataCollisionEditor::_set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) {
@@ -1501,7 +1540,7 @@ void TileDataCollisionEditor::_set_value(TileSetAtlasSource *p_tile_set_atlas_so
tile_data->set_collision_polygon_one_way_margin(physics_layer, i, polygon_dict["one_way_margin"]);
}
- polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), p_tile_set_atlas_source->get_tile_effective_texture_offset(p_coords, p_alternative_tile), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
+ polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), tile_data->get_texture_origin(), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
}
Variant TileDataCollisionEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) {
@@ -1524,26 +1563,32 @@ Variant TileDataCollisionEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas
}
void TileDataCollisionEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) {
- Array new_array = p_new_value;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ Dictionary new_dict = p_new_value;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (KeyValue<TileMapCell, Variant> &E : p_previous_values) {
- Array old_array = E.value;
-
Vector2i coords = E.key.get_atlas_coords();
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygons_count", coords.x, coords.y, E.key.alternative_tile, physics_layer), old_array.size());
- for (int i = 0; i < old_array.size(); i++) {
- Dictionary dict = old_array[i];
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/points", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["points"]);
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["one_way"]);
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way_margin", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["one_way_margin"]);
+
+ Dictionary old_dict = E.value;
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/linear_velocity", coords.x, coords.y, E.key.alternative_tile, physics_layer), old_dict["linear_velocity"]);
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/angular_velocity", coords.x, coords.y, E.key.alternative_tile, physics_layer), old_dict["angular_velocity"]);
+ Array old_polygon_array = old_dict["polygons"];
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygons_count", coords.x, coords.y, E.key.alternative_tile, physics_layer), old_polygon_array.size());
+ for (int i = 0; i < old_polygon_array.size(); i++) {
+ Dictionary polygon_dict = old_polygon_array[i];
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/points", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), polygon_dict["points"]);
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), polygon_dict["one_way"]);
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way_margin", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), polygon_dict["one_way_margin"]);
}
- undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygons_count", coords.x, coords.y, E.key.alternative_tile, physics_layer), new_array.size());
- for (int i = 0; i < new_array.size(); i++) {
- Dictionary dict = new_array[i];
- undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/points", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["points"]);
- undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["one_way"]);
- undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way_margin", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), dict["one_way_margin"]);
+ undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/linear_velocity", coords.x, coords.y, E.key.alternative_tile, physics_layer), new_dict["linear_velocity"]);
+ undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/angular_velocity", coords.x, coords.y, E.key.alternative_tile, physics_layer), new_dict["angular_velocity"]);
+ Array new_polygon_array = new_dict["polygons"];
+ undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygons_count", coords.x, coords.y, E.key.alternative_tile, physics_layer), new_polygon_array.size());
+ for (int i = 0; i < new_polygon_array.size(); i++) {
+ Dictionary polygon_dict = new_polygon_array[i];
+ undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/points", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), polygon_dict["points"]);
+ undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), polygon_dict["one_way"]);
+ undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/physics_layer_%d/polygon_%d/one_way_margin", coords.x, coords.y, E.key.alternative_tile, physics_layer, i), polygon_dict["one_way_margin"]);
}
}
}
@@ -1728,7 +1773,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas
TileData *tile_data = p_tile_set_atlas_source->get_tile_data(hovered_coords, 0);
int terrain_set = tile_data->get_terrain_set();
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(hovered_coords);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(hovered_coords, 0);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
if (terrain_set >= 0 && terrain_set == int(dummy_object->get("terrain_set"))) {
// Draw hovered bit.
@@ -1779,7 +1824,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas
// Text
p_canvas_item->draw_set_transform_matrix(Transform2D());
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
Color color = Color(1, 1, 1);
String text;
@@ -1804,8 +1849,8 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas
p_canvas_item->draw_set_transform_matrix(p_transform);
Rect2i rect;
- rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos));
- rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position())));
+ rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos, true));
+ rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position()), true));
rect = rect.abs();
RBSet<TileMapCell> edited;
@@ -1834,8 +1879,8 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas
int terrain_set = int(painted["terrain_set"]);
Rect2i rect;
- rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos));
- rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position())));
+ rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos, true));
+ rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(p_transform.affine_inverse().xform(p_canvas_item->get_local_mouse_position()), true));
rect = rect.abs();
RBSet<TileMapCell> edited;
@@ -1872,7 +1917,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas
Vector2i coords = E.get_atlas_coords();
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_data(coords, 0)->get_texture_origin();
Vector<Vector2> polygon = tile_set->get_terrain_polygon(terrain_set);
for (int j = 0; j < polygon.size(); j++) {
@@ -1917,7 +1962,7 @@ void TileDataTerrainsEditor::forward_draw_over_alternatives(TileAtlasView *p_til
TileData *tile_data = p_tile_set_atlas_source->get_tile_data(hovered_coords, hovered_alternative);
int terrain_set = tile_data->get_terrain_set();
Rect2i texture_region = p_tile_atlas_view->get_alternative_tile_rect(hovered_coords, hovered_alternative);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(hovered_coords, hovered_alternative);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
if (terrain_set == int(dummy_object->get("terrain_set"))) {
// Draw hovered bit.
@@ -1971,7 +2016,7 @@ void TileDataTerrainsEditor::forward_draw_over_alternatives(TileAtlasView *p_til
// Text
p_canvas_item->draw_set_transform_matrix(Transform2D());
Rect2i texture_region = p_tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
Color color = Color(1, 1, 1);
String text;
@@ -1995,7 +2040,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
if (drag_type == DRAG_TYPE_PAINT_TERRAIN_SET) {
- Vector<Vector2i> line = Geometry2D::bresenham_line(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_last_pos), p_tile_atlas_view->get_atlas_tile_coords_at_pos(mm->get_position()));
+ Vector<Vector2i> line = Geometry2D::bresenham_line(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_last_pos, true), p_tile_atlas_view->get_atlas_tile_coords_at_pos(mm->get_position(), true));
for (int i = 0; i < line.size(); i++) {
Vector2i coords = p_tile_set_atlas_source->get_tile_at_coords(line[i]);
if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
@@ -2029,7 +2074,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
} else if (drag_type == DRAG_TYPE_PAINT_TERRAIN_BITS) {
int terrain_set = Dictionary(drag_painted_value)["terrain_set"];
int terrain = Dictionary(drag_painted_value)["terrain"];
- Vector<Vector2i> line = Geometry2D::bresenham_line(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_last_pos), p_tile_atlas_view->get_atlas_tile_coords_at_pos(mm->get_position()));
+ Vector<Vector2i> line = Geometry2D::bresenham_line(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_last_pos, true), p_tile_atlas_view->get_atlas_tile_coords_at_pos(mm->get_position(), true));
for (int i = 0; i < line.size(); i++) {
Vector2i coords = p_tile_set_atlas_source->get_tile_at_coords(line[i]);
if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
@@ -2056,7 +2101,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
// Set the terrains bits.
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
Vector<Vector2> polygon = tile_set->get_terrain_polygon(tile_data->get_terrain_set());
if (Geometry2D::is_segment_intersecting_polygon(mm->get_position() - position, drag_last_pos - position, polygon)) {
@@ -2083,14 +2128,14 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
if (mb.is_valid()) {
if (mb->get_button_index() == MouseButton::LEFT || mb->get_button_index() == MouseButton::RIGHT) {
if (mb->is_pressed()) {
- if (mb->get_button_index() == MouseButton::LEFT && picker_button->is_pressed()) {
+ if (picker_button->is_pressed() || (mb->is_command_or_control_pressed() && !mb->is_shift_pressed())) {
Vector2i coords = p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position());
coords = p_tile_set_atlas_source->get_tile_at_coords(coords);
if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
TileData *tile_data = p_tile_set_atlas_source->get_tile_data(coords, 0);
int terrain_set = tile_data->get_terrain_set();
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
dummy_object->set("terrain_set", terrain_set);
dummy_object->set("terrain", -1);
@@ -2126,7 +2171,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
if (mb->get_button_index() == MouseButton::RIGHT) {
terrain_set = -1;
}
- if (mb->is_ctrl_pressed()) {
+ if (mb->is_command_or_control_pressed() && mb->is_shift_pressed()) {
// Paint terrain set with rect.
drag_type = DRAG_TYPE_PAINT_TERRAIN_SET_RECT;
drag_modified.clear();
@@ -2167,7 +2212,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
if (mb->get_button_index() == MouseButton::RIGHT) {
terrain = -1;
}
- if (mb->is_ctrl_pressed()) {
+ if (mb->is_command_or_control_pressed() && mb->is_shift_pressed()) {
// Paint terrain bits with rect.
drag_type = DRAG_TYPE_PAINT_TERRAIN_BITS_RECT;
drag_modified.clear();
@@ -2205,7 +2250,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
// Set the terrain bit.
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
Vector<Vector2> polygon = tile_set->get_terrain_polygon(terrain_set);
if (Geometry2D::is_point_in_polygon(mb->get_position() - position, polygon)) {
@@ -2227,11 +2272,11 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
}
}
} else {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (drag_type == DRAG_TYPE_PAINT_TERRAIN_SET_RECT) {
Rect2i rect;
- rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos));
- rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position()));
+ rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos, true));
+ rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position(), true));
rect = rect.abs();
RBSet<TileMapCell> edited;
@@ -2318,8 +2363,8 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
int terrain = int(painted["terrain"]);
Rect2i rect;
- rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos));
- rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position()));
+ rect.set_position(p_tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_pos, true));
+ rect.set_end(p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position(), true));
rect = rect.abs();
RBSet<TileMapCell> edited;
@@ -2352,7 +2397,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
TileData *tile_data = p_tile_set_atlas_source->get_tile_data(coords, 0);
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
Vector<Vector2> polygon = tile_set->get_terrain_polygon(terrain_set);
for (int j = 0; j < polygon.size(); j++) {
@@ -2452,7 +2497,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
// Set the terrains bits.
Rect2i texture_region = p_tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
Vector<Vector2> polygon = tile_set->get_terrain_polygon(tile_data->get_terrain_set());
if (Geometry2D::is_segment_intersecting_polygon(mm->get_position() - position, drag_last_pos - position, polygon)) {
@@ -2488,7 +2533,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
TileData *tile_data = p_tile_set_atlas_source->get_tile_data(coords, alternative_tile);
int terrain_set = tile_data->get_terrain_set();
Rect2i texture_region = p_tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
dummy_object->set("terrain_set", terrain_set);
dummy_object->set("terrain", -1);
@@ -2578,7 +2623,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
// Set the terrain bit.
Rect2i texture_region = p_tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
- Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
+ Vector2i position = texture_region.get_center() + tile_data->get_texture_origin();
Vector<Vector2> polygon = tile_set->get_terrain_polygon(terrain_set);
if (Geometry2D::is_point_in_polygon(mb->get_position() - position, polygon)) {
@@ -2600,7 +2645,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
}
}
} else {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (drag_type == DRAG_TYPE_PAINT_TERRAIN_SET) {
undo_redo->create_action(TTR("Painting Tiles Property"));
for (KeyValue<TileMapCell, Variant> &E : drag_modified) {
@@ -2728,7 +2773,7 @@ void TileDataNavigationEditor::_set_painted_value(TileSetAtlasSource *p_tile_set
polygon_editor->add_polygon(nav_polygon->get_outline(i));
}
}
- polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), p_tile_set_atlas_source->get_tile_effective_texture_offset(p_coords, p_alternative_tile), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
+ polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), tile_data->get_texture_origin(), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
}
void TileDataNavigationEditor::_set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) {
@@ -2737,7 +2782,7 @@ void TileDataNavigationEditor::_set_value(TileSetAtlasSource *p_tile_set_atlas_s
Ref<NavigationPolygon> nav_polygon = p_value;
tile_data->set_navigation_polygon(navigation_layer, nav_polygon);
- polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), p_tile_set_atlas_source->get_tile_effective_texture_offset(p_coords, p_alternative_tile), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
+ polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), tile_data->get_texture_origin(), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
}
Variant TileDataNavigationEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) {
@@ -2747,7 +2792,7 @@ Variant TileDataNavigationEditor::_get_value(TileSetAtlasSource *p_tile_set_atla
}
void TileDataNavigationEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (const KeyValue<TileMapCell, Variant> &E : p_previous_values) {
Vector2i coords = E.key.get_atlas_coords();
undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/navigation_layer_%d/polygon", coords.x, coords.y, E.key.alternative_tile, navigation_layer), E.value);
diff --git a/editor/plugins/tiles/tile_data_editors.h b/editor/plugins/tiles/tile_data_editors.h
index 02d4584428..1ebf30aecd 100644
--- a/editor/plugins/tiles/tile_data_editors.h
+++ b/editor/plugins/tiles/tile_data_editors.h
@@ -242,8 +242,8 @@ public:
~TileDataDefaultEditor();
};
-class TileDataTextureOffsetEditor : public TileDataDefaultEditor {
- GDCLASS(TileDataTextureOffsetEditor, TileDataDefaultEditor);
+class TileDataTextureOriginEditor : public TileDataDefaultEditor {
+ GDCLASS(TileDataTextureOriginEditor, TileDataDefaultEditor);
public:
virtual void draw_over_tile(CanvasItem *p_canvas_item, Transform2D p_transform, TileMapCell p_cell, bool p_selected = false) override;
diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp
index e7dc5d825b..f0a02a3768 100644
--- a/editor/plugins/tiles/tile_map_editor.cpp
+++ b/editor/plugins/tiles/tile_map_editor.cpp
@@ -266,14 +266,14 @@ void TileMapEditorTilesPlugin::_patterns_item_list_gui_input(const Ref<InputEven
}
Ref<TileSet> tile_set = tile_map->get_tileset();
- if (!tile_set.is_valid()) {
+ if (!tile_set.is_valid() || EditorNode::get_singleton()->is_resource_read_only(tile_set)) {
return;
}
if (ED_IS_SHORTCUT("tiles_editor/paste", p_event) && p_event->is_pressed() && !p_event->is_echo()) {
select_last_pattern = true;
int new_pattern_index = tile_set->get_patterns_count();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add TileSet pattern"));
undo_redo->add_do_method(*tile_set, "add_pattern", tile_map_clipboard, new_pattern_index);
undo_redo->add_undo_method(*tile_set, "remove_pattern", new_pattern_index);
@@ -283,7 +283,7 @@ void TileMapEditorTilesPlugin::_patterns_item_list_gui_input(const Ref<InputEven
if (ED_IS_SHORTCUT("tiles_editor/delete", p_event) && p_event->is_pressed() && !p_event->is_echo()) {
Vector<int> selected = patterns_item_list->get_selected_items();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove TileSet patterns"));
for (int i = 0; i < selected.size(); i++) {
int pattern_index = selected[i];
@@ -515,7 +515,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p
if (ED_IS_SHORTCUT("tiles_editor/cut", p_event)) {
// Delete selected tiles.
if (!tile_map_selection.is_empty()) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete tiles"));
for (const Vector2i &E : tile_map_selection) {
undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E, TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE);
@@ -547,7 +547,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p
if (ED_IS_SHORTCUT("tiles_editor/delete", p_event)) {
// Delete selected tiles.
if (!tile_map_selection.is_empty()) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete tiles"));
for (const Vector2i &E : tile_map_selection) {
undo_redo->add_do_method(tile_map, "set_cell", tile_map_layer, E, TileSet::INVALID_SOURCE, TileSetSource::INVALID_ATLAS_COORDS, TileSetSource::INVALID_TILE_ALTERNATIVE);
@@ -646,12 +646,12 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p
}
} else {
// Check if we are picking a tile.
- if (picker_button->is_pressed() || (Input::get_singleton()->is_key_pressed(Key::CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT))) {
+ if (picker_button->is_pressed() || (Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT))) {
drag_type = DRAG_TYPE_PICK;
drag_start_mouse_pos = mpos;
} else {
// Paint otherwise.
- if (tool_buttons_group->get_pressed_button() == paint_tool_button && !Input::get_singleton()->is_key_pressed(Key::CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT)) {
+ if (tool_buttons_group->get_pressed_button() == paint_tool_button && !Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT)) {
drag_type = DRAG_TYPE_PAINT;
drag_start_mouse_pos = mpos;
drag_modified.clear();
@@ -667,11 +667,11 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p
tile_map->set_cell(tile_map_layer, coords, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile);
}
_fix_invalid_tiles_in_tile_map_selection();
- } else if (tool_buttons_group->get_pressed_button() == line_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(Key::SHIFT) && !Input::get_singleton()->is_key_pressed(Key::CTRL))) {
+ } else if (tool_buttons_group->get_pressed_button() == line_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(Key::SHIFT) && !Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL))) {
drag_type = DRAG_TYPE_LINE;
drag_start_mouse_pos = mpos;
drag_modified.clear();
- } else if (tool_buttons_group->get_pressed_button() == rect_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(Key::SHIFT) && Input::get_singleton()->is_key_pressed(Key::CTRL))) {
+ } else if (tool_buttons_group->get_pressed_button() == rect_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(Key::SHIFT) && Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL))) {
drag_type = DRAG_TYPE_RECT;
drag_start_mouse_pos = mpos;
drag_modified.clear();
@@ -742,7 +742,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
// Draw the selection.
if ((tiles_bottom_panel->is_visible_in_tree() || patterns_bottom_panel->is_visible_in_tree()) && tool_buttons_group->get_pressed_button() == select_tool_button) {
// In select mode, we only draw the current selection if we are modifying it (pressing control or shift).
- if (drag_type == DRAG_TYPE_MOVE || (drag_type == DRAG_TYPE_SELECT && !Input::get_singleton()->is_key_pressed(Key::CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT))) {
+ if (drag_type == DRAG_TYPE_MOVE || (drag_type == DRAG_TYPE_SELECT && !Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT))) {
// Do nothing
} else {
Color grid_color = EDITOR_GET("editors/tiles_editor/grid_color");
@@ -812,7 +812,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
Vector2i coords = tile_map->map_pattern(tile_map->local_to_map(drag_last_mouse_pos - mouse_offset), clipboard_used_cells[i], tile_map_clipboard);
preview[coords] = TileMapCell(tile_map_clipboard->get_cell_source_id(clipboard_used_cells[i]), tile_map_clipboard->get_cell_atlas_coords(clipboard_used_cells[i]), tile_map_clipboard->get_cell_alternative_tile(clipboard_used_cells[i]));
}
- } else if (!picker_button->is_pressed() && !(drag_type == DRAG_TYPE_NONE && Input::get_singleton()->is_key_pressed(Key::CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT))) {
+ } else if (!picker_button->is_pressed() && !(drag_type == DRAG_TYPE_NONE && Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT))) {
bool expand_grid = false;
if (tool_buttons_group->get_pressed_button() == paint_tool_button && drag_type == DRAG_TYPE_NONE) {
// Preview for a single pattern.
@@ -897,7 +897,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
// Compute the offset
Rect2i source_rect = atlas_source->get_tile_texture_region(E.value.get_atlas_coords());
- Vector2i tile_offset = atlas_source->get_tile_effective_texture_offset(E.value.get_atlas_coords(), E.value.alternative_tile);
+ Vector2i tile_offset = tile_data->get_texture_origin();
// Compute the destination rectangle in the CanvasItem.
Rect2 dest_rect;
@@ -922,7 +922,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
// Get the tile modulation.
Color modulate = tile_data->get_modulate();
- Color self_modulate = tile_map->get_self_modulate();
+ Color self_modulate = tile_map->get_modulate_in_tree() * tile_map->get_self_modulate();
modulate *= self_modulate;
modulate *= tile_map->get_layer_modulate(tile_map_layer);
@@ -1240,20 +1240,20 @@ void TileMapEditorTilesPlugin::_stop_dragging() {
Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * tile_map->get_global_transform();
Vector2 mpos = xform.affine_inverse().xform(CanvasItemEditor::get_singleton()->get_viewport_control()->get_local_mouse_position());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (drag_type) {
case DRAG_TYPE_SELECT: {
undo_redo->create_action(TTR("Change selection"));
undo_redo->add_undo_method(this, "_set_tile_map_selection", _get_tile_map_selection());
- if (!Input::get_singleton()->is_key_pressed(Key::SHIFT) && !Input::get_singleton()->is_key_pressed(Key::CTRL)) {
+ if (!Input::get_singleton()->is_key_pressed(Key::SHIFT) && !Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL)) {
tile_map_selection.clear();
}
Rect2i rect = Rect2i(tile_map->local_to_map(drag_start_mouse_pos), tile_map->local_to_map(mpos) - tile_map->local_to_map(drag_start_mouse_pos)).abs();
for (int x = rect.position.x; x <= rect.get_end().x; x++) {
for (int y = rect.position.y; y <= rect.get_end().y; y++) {
Vector2i coords = Vector2i(x, y);
- if (Input::get_singleton()->is_key_pressed(Key::CTRL)) {
+ if (Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL)) {
if (tile_map_selection.has(coords)) {
tile_map_selection.erase(coords);
}
@@ -1277,13 +1277,15 @@ void TileMapEditorTilesPlugin::_stop_dragging() {
tile_map->set_cell(tile_map_layer, kv.key, kv.value.source_id, kv.value.get_atlas_coords(), kv.value.alternative_tile);
}
- // Creating a pattern in the pattern list.
- select_last_pattern = true;
- int new_pattern_index = tile_set->get_patterns_count();
- undo_redo->create_action(TTR("Add TileSet pattern"));
- undo_redo->add_do_method(*tile_set, "add_pattern", selection_pattern, new_pattern_index);
- undo_redo->add_undo_method(*tile_set, "remove_pattern", new_pattern_index);
- undo_redo->commit_action();
+ if (EditorNode::get_singleton()->is_resource_read_only(tile_set)) {
+ // Creating a pattern in the pattern list.
+ select_last_pattern = true;
+ int new_pattern_index = tile_set->get_patterns_count();
+ undo_redo->create_action(TTR("Add TileSet pattern"));
+ undo_redo->add_do_method(*tile_set, "add_pattern", selection_pattern, new_pattern_index);
+ undo_redo->add_undo_method(*tile_set, "remove_pattern", new_pattern_index);
+ undo_redo->commit_action();
+ }
} else {
// Get the top-left cell.
Vector2i top_left;
@@ -1716,8 +1718,8 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() {
// Draw the selection rect.
if (tile_set_dragging_selection) {
- Vector2i start_tile = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_set_drag_start_mouse_pos);
- Vector2i end_tile = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position());
+ Vector2i start_tile = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_set_drag_start_mouse_pos, true);
+ Vector2i end_tile = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position(), true);
Rect2i region = Rect2i(start_tile, end_tile - start_tile).abs();
region.size += Vector2i(1, 1);
@@ -1812,8 +1814,8 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_gui_input(const Ref<InputEven
tile_set_selection.clear();
}
// Compute the covered area.
- Vector2i start_tile = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_set_drag_start_mouse_pos);
- Vector2i end_tile = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position());
+ Vector2i start_tile = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_set_drag_start_mouse_pos, true);
+ Vector2i end_tile = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position(), true);
if (start_tile != TileSetSource::INVALID_ATLAS_COORDS && end_tile != TileSetSource::INVALID_ATLAS_COORDS) {
Rect2i region = Rect2i(start_tile, end_tile - start_tile).abs();
region.size += Vector2i(1, 1);
@@ -1989,6 +1991,15 @@ TypedArray<Vector2i> TileMapEditorTilesPlugin::_get_tile_map_selection() const {
void TileMapEditorTilesPlugin::edit(ObjectID p_tile_map_id, int p_tile_map_layer) {
_stop_dragging(); // Avoids staying in a wrong drag state.
+ // Disable sort button if the tileset is read-only
+ TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id));
+ if (tile_map) {
+ Ref<TileSet> tile_set = tile_map->get_tileset();
+ if (tile_set.is_valid()) {
+ source_sort_button->set_disabled(EditorNode::get_singleton()->is_resource_read_only(tile_set));
+ }
+ }
+
if (tile_map_id != p_tile_map_id) {
tile_map_id = p_tile_map_id;
@@ -2236,7 +2247,6 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
scene_tiles_list = memnew(ItemList);
scene_tiles_list->set_h_size_flags(Control::SIZE_EXPAND_FILL);
scene_tiles_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- scene_tiles_list->set_drag_forwarding(this);
scene_tiles_list->set_select_mode(ItemList::SELECT_MULTI);
scene_tiles_list->connect("multi_selected", callable_mp(this, &TileMapEditorTilesPlugin::_scenes_list_multi_selected));
scene_tiles_list->connect("empty_clicked", callable_mp(this, &TileMapEditorTilesPlugin::_scenes_list_lmb_empty_clicked));
@@ -2641,7 +2651,7 @@ void TileMapEditorTerrainsPlugin::_stop_dragging() {
Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * tile_map->get_global_transform();
Vector2 mpos = xform.affine_inverse().xform(CanvasItemEditor::get_singleton()->get_viewport_control()->get_local_mouse_position());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (drag_type) {
case DRAG_TYPE_PICK: {
Vector2i coords = tile_map->local_to_map(mpos);
@@ -2875,7 +2885,7 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent>
drag_type = DRAG_TYPE_PICK;
} else {
// Paint otherwise.
- if (tool_buttons_group->get_pressed_button() == paint_tool_button && !Input::get_singleton()->is_key_pressed(Key::CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT)) {
+ if (tool_buttons_group->get_pressed_button() == paint_tool_button && !Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT)) {
if (selected_terrain_set < 0 || selected_terrain < 0 || (selected_type == SELECTED_TYPE_PATTERN && !selected_terrains_pattern.is_valid())) {
return true;
}
@@ -2890,14 +2900,14 @@ bool TileMapEditorTerrainsPlugin::forward_canvas_gui_input(const Ref<InputEvent>
drag_modified[E.key] = tile_map->get_cell(tile_map_layer, E.key);
tile_map->set_cell(tile_map_layer, E.key, E.value.source_id, E.value.get_atlas_coords(), E.value.alternative_tile);
}
- } else if (tool_buttons_group->get_pressed_button() == line_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(Key::SHIFT) && !Input::get_singleton()->is_key_pressed(Key::CTRL))) {
+ } else if (tool_buttons_group->get_pressed_button() == line_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(Key::SHIFT) && !Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL))) {
if (selected_terrain_set < 0 || selected_terrain < 0 || (selected_type == SELECTED_TYPE_PATTERN && !selected_terrains_pattern.is_valid())) {
return true;
}
drag_type = DRAG_TYPE_LINE;
drag_start_mouse_pos = mpos;
drag_modified.clear();
- } else if (tool_buttons_group->get_pressed_button() == rect_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(Key::SHIFT) && Input::get_singleton()->is_key_pressed(Key::CTRL))) {
+ } else if (tool_buttons_group->get_pressed_button() == rect_tool_button || (tool_buttons_group->get_pressed_button() == paint_tool_button && Input::get_singleton()->is_key_pressed(Key::SHIFT) && Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL))) {
if (selected_terrain_set < 0 || selected_terrain < 0 || (selected_type == SELECTED_TYPE_PATTERN && !selected_terrains_pattern.is_valid())) {
return true;
}
@@ -2982,7 +2992,7 @@ void TileMapEditorTerrainsPlugin::forward_canvas_draw_over_viewport(Control *p_o
tile_xform.set_scale(tile_shape_size);
tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0), false);
}
- } else if (!picker_button->is_pressed() && !(drag_type == DRAG_TYPE_NONE && Input::get_singleton()->is_key_pressed(Key::CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT))) {
+ } else if (!picker_button->is_pressed() && !(drag_type == DRAG_TYPE_NONE && Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL) && !Input::get_singleton()->is_key_pressed(Key::SHIFT))) {
bool expand_grid = false;
if (tool_buttons_group->get_pressed_button() == paint_tool_button && drag_type == DRAG_TYPE_NONE) {
// Preview for a single tile.
@@ -3089,8 +3099,8 @@ void TileMapEditorTerrainsPlugin::_update_terrains_cache() {
per_terrain_terrains_patterns.resize(tile_set->get_terrain_sets_count());
for (int i = 0; i < tile_set->get_terrain_sets_count(); i++) {
per_terrain_terrains_patterns[i].resize(tile_set->get_terrains_count(i));
- for (int j = 0; j < (int)per_terrain_terrains_patterns[i].size(); j++) {
- per_terrain_terrains_patterns[i][j].clear();
+ for (RBSet<TileSet::TerrainsPattern> &pattern : per_terrain_terrains_patterns[i]) {
+ pattern.clear();
}
}
@@ -3303,12 +3313,16 @@ void TileMapEditorTerrainsPlugin::_update_theme() {
void TileMapEditorTerrainsPlugin::edit(ObjectID p_tile_map_id, int p_tile_map_layer) {
_stop_dragging(); // Avoids staying in a wrong drag state.
- tile_map_id = p_tile_map_id;
- tile_map_layer = p_tile_map_layer;
+ if (tile_map_id != p_tile_map_id) {
+ tile_map_id = p_tile_map_id;
- _update_terrains_cache();
- _update_terrains_tree();
- _update_tiles_list();
+ // Clear the selection.
+ _update_terrains_cache();
+ _update_terrains_tree();
+ _update_tiles_list();
+ }
+
+ tile_map_layer = p_tile_map_layer;
}
TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() {
@@ -3485,7 +3499,7 @@ void TileMapEditor::_advanced_menu_button_id_pressed(int p_id) {
}
if (p_id == 0) { // Replace Tile Proxies
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Replace Tiles with Proxies"));
for (int layer_index = 0; layer_index < tile_map->get_layers_count(); layer_index++) {
TypedArray<Vector2i> used_cells = tile_map->get_used_cells(layer_index);
@@ -3516,8 +3530,8 @@ void TileMapEditor::_update_bottom_panel() {
// Update the visibility of controls.
missing_tileset_label->set_visible(!tile_set.is_valid());
- for (unsigned int tab_index = 0; tab_index < tabs_data.size(); tab_index++) {
- tabs_data[tab_index].panel->hide();
+ for (TileMapEditorPlugin::TabData &tab_data : tabs_data) {
+ tab_data.panel->hide();
}
if (tile_set.is_valid()) {
tabs_data[tabs_bar->get_current_tab()].panel->show();
@@ -3606,15 +3620,15 @@ void TileMapEditor::_tab_changed(int p_tab_id) {
tabs_plugins[tabs_bar->get_current_tab()]->edit(tile_map_id, tile_map_layer);
// Update toolbar.
- for (unsigned int tab_index = 0; tab_index < tabs_data.size(); tab_index++) {
- tabs_data[tab_index].toolbar->hide();
+ for (TileMapEditorPlugin::TabData &tab_data : tabs_data) {
+ tab_data.toolbar->hide();
}
tabs_data[p_tab_id].toolbar->show();
// Update visible panel.
TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id));
- for (unsigned int tab_index = 0; tab_index < tabs_data.size(); tab_index++) {
- tabs_data[tab_index].panel->hide();
+ for (TileMapEditorPlugin::TabData &tab_data : tabs_data) {
+ tab_data.panel->hide();
}
if (tile_map && tile_map->get_tileset().is_valid()) {
tabs_data[tabs_bar->get_current_tab()].panel->show();
@@ -3702,8 +3716,8 @@ void TileMapEditor::_update_layers_selection() {
}
void TileMapEditor::_move_tile_map_array_element(Object *p_undo_redo, Object *p_edited, String p_array_prefix, int p_from_index, int p_to_pos) {
- Ref<EditorUndoRedoManager> undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
- ERR_FAIL_COND(undo_redo_man.is_null());
+ EditorUndoRedoManager *undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
+ ERR_FAIL_NULL(undo_redo_man);
TileMap *tile_map = Object::cast_to<TileMap>(p_edited);
if (!tile_map) {
@@ -3983,7 +3997,7 @@ TileMapEditor::TileMapEditor() {
tabs_bar->connect("tab_changed", callable_mp(this, &TileMapEditor::_tab_changed));
// --- TileMap toolbar ---
- tile_map_toolbar = memnew(HBoxContainer);
+ tile_map_toolbar = memnew(HFlowContainer);
tile_map_toolbar->set_h_size_flags(SIZE_EXPAND_FILL);
add_child(tile_map_toolbar);
@@ -3991,15 +4005,18 @@ TileMapEditor::TileMapEditor() {
tile_map_toolbar->add_child(tabs_bar);
// Tabs toolbars.
- for (unsigned int tab_index = 0; tab_index < tabs_data.size(); tab_index++) {
- tabs_data[tab_index].toolbar->hide();
- if (!tabs_data[tab_index].toolbar->get_parent()) {
- tile_map_toolbar->add_child(tabs_data[tab_index].toolbar);
+ for (TileMapEditorPlugin::TabData &tab_data : tabs_data) {
+ tab_data.toolbar->hide();
+ if (!tab_data.toolbar->get_parent()) {
+ tile_map_toolbar->add_child(tab_data.toolbar);
}
}
- // Wide empty separation control.
- tile_map_toolbar->add_spacer();
+ // Wide empty separation control. (like BoxContainer::add_spacer())
+ Control *c = memnew(Control);
+ c->set_mouse_filter(MOUSE_FILTER_PASS);
+ c->set_h_size_flags(SIZE_EXPAND_FILL);
+ tile_map_toolbar->add_child(c);
// Layer selector.
layers_selection_button = memnew(OptionButton);
diff --git a/editor/plugins/tiles/tile_map_editor.h b/editor/plugins/tiles/tile_map_editor.h
index fb9c2f3689..1cab1d1500 100644
--- a/editor/plugins/tiles/tile_map_editor.h
+++ b/editor/plugins/tiles/tile_map_editor.h
@@ -38,6 +38,7 @@
#include "scene/2d/tile_map.h"
#include "scene/gui/box_container.h"
#include "scene/gui/check_box.h"
+#include "scene/gui/flow_container.h"
#include "scene/gui/item_list.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/option_button.h"
@@ -323,7 +324,7 @@ private:
Vector<TileMapEditorPlugin *> tile_map_editor_plugins;
// Toolbar.
- HBoxContainer *tile_map_toolbar = nullptr;
+ HFlowContainer *tile_map_toolbar = nullptr;
OptionButton *layers_selection_button = nullptr;
Button *toggle_highlight_selected_layer_button = nullptr;
diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
index ef82e748a8..f6aeffa13f 100644
--- a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
+++ b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
@@ -30,10 +30,11 @@
#include "tile_proxies_manager_dialog.h"
-#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
+#include "scene/gui/dialogs.h"
+#include "scene/gui/popup_menu.h"
#include "scene/gui/separator.h"
void TileProxiesManagerDialog::_right_clicked(int p_item, Vector2 p_local_mouse_pos, MouseButton p_mouse_button_index, Object *p_item_list) {
@@ -55,7 +56,7 @@ void TileProxiesManagerDialog::_menu_id_pressed(int p_id) {
}
void TileProxiesManagerDialog::_delete_selected_bindings() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Tile Proxies"));
Vector<int> source_level_selected = source_level_list->get_selected_items();
@@ -155,7 +156,7 @@ void TileProxiesManagerDialog::_property_changed(const String &p_path, const Var
}
void TileProxiesManagerDialog::_add_button_pressed() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (from.source_id != TileSet::INVALID_SOURCE && to.source_id != TileSet::INVALID_SOURCE) {
Vector2i from_coords = from.get_atlas_coords();
Vector2i to_coords = to.get_atlas_coords();
@@ -196,7 +197,7 @@ void TileProxiesManagerDialog::_add_button_pressed() {
}
void TileProxiesManagerDialog::_clear_invalid_button_pressed() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete All Invalid Tile Proxies"));
undo_redo->add_do_method(*tile_set, "cleanup_invalid_tile_proxies");
@@ -224,7 +225,7 @@ void TileProxiesManagerDialog::_clear_invalid_button_pressed() {
}
void TileProxiesManagerDialog::_clear_all_button_pressed() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete All Tile Proxies"));
undo_redo->add_do_method(*tile_set, "clear_tile_proxies");
@@ -305,7 +306,7 @@ void TileProxiesManagerDialog::_unhandled_key_input(Ref<InputEvent> p_event) {
}
void TileProxiesManagerDialog::cancel_pressed() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (int i = 0; i < commited_actions_count; i++) {
undo_redo->undo();
}
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index 146a53f3dd..912fdb03a9 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -110,7 +110,7 @@ void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get_property_list
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, "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, ""));
}
@@ -164,7 +164,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
if (p_name == "atlas_coords") {
Vector2i as_vector2i = Vector2i(p_value);
bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(as_vector2i, tile_set_atlas_source->get_tile_size_in_atlas(coords), tile_set_atlas_source->get_tile_animation_columns(coords), tile_set_atlas_source->get_tile_animation_separation(coords), tile_set_atlas_source->get_tile_animation_frames_count(coords), coords);
- ERR_FAIL_COND_V(!has_room_for_tile, false);
+ ERR_FAIL_COND_V_EDMSG(!has_room_for_tile, false, "Cannot move the tile, invalid coordinates or not enough room in the atlas for the tile and its animation frames.");
if (tiles_set_atlas_source_editor->selection.front()->get().tile == coords) {
tiles_set_atlas_source_editor->selection.clear();
@@ -223,7 +223,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
for (TileSelection tile : tiles) {
bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(tile.tile, tile_set_atlas_source->get_tile_size_in_atlas(tile.tile), p_value, tile_set_atlas_source->get_tile_animation_separation(tile.tile), tile_set_atlas_source->get_tile_animation_frames_count(tile.tile), tile.tile);
if (!has_room_for_tile) {
- ERR_PRINT("No room for tile");
+ ERR_PRINT(vformat("Cannot change the number of columns to %s for tile animation. Not enough room in the atlas to layout %s frame(s).", p_value, tile_set_atlas_source->get_tile_animation_frames_count(tile.tile)));
} else {
tile_set_atlas_source->set_tile_animation_columns(tile.tile, p_value);
}
@@ -234,7 +234,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
for (TileSelection tile : tiles) {
bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(tile.tile, tile_set_atlas_source->get_tile_size_in_atlas(tile.tile), tile_set_atlas_source->get_tile_animation_columns(tile.tile), p_value, tile_set_atlas_source->get_tile_animation_frames_count(tile.tile), tile.tile);
if (!has_room_for_tile) {
- ERR_PRINT("No room for tile");
+ ERR_PRINT(vformat("Cannot change separation between frames of the animation to %s. Not enough room in the atlas to layout %s frame(s).", p_value, tile_set_atlas_source->get_tile_animation_frames_count(tile.tile)));
} else {
tile_set_atlas_source->set_tile_animation_separation(tile.tile, p_value);
}
@@ -249,11 +249,16 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
return true;
} else if (p_name == "animation_frames_count") {
for (TileSelection tile : tiles) {
- bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(tile.tile, tile_set_atlas_source->get_tile_size_in_atlas(tile.tile), tile_set_atlas_source->get_tile_animation_columns(tile.tile), tile_set_atlas_source->get_tile_animation_separation(tile.tile), p_value, tile.tile);
+ int frame_count = p_value;
+ if (frame_count == 0) {
+ frame_count = 1;
+ }
+
+ bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(tile.tile, tile_set_atlas_source->get_tile_size_in_atlas(tile.tile), tile_set_atlas_source->get_tile_animation_columns(tile.tile), tile_set_atlas_source->get_tile_animation_separation(tile.tile), frame_count, tile.tile);
if (!has_room_for_tile) {
- ERR_PRINT("No room for tile");
+ ERR_PRINT(vformat("Cannot add frames to the animation, not enough room in the atlas to layout %s frames.", frame_count));
} else {
- tile_set_atlas_source->set_tile_animation_frames_count(tile.tile, p_value);
+ tile_set_atlas_source->set_tile_animation_frames_count(tile.tile, frame_count);
}
}
notify_property_list_changed();
@@ -580,6 +585,7 @@ void TileSetAtlasSourceEditor::_update_atlas_source_inspector() {
// Update visibility.
bool inspector_visible = tools_button_group->get_pressed_button() == tool_setup_atlas_source_button;
atlas_source_inspector->set_visible(inspector_visible);
+ atlas_source_inspector->set_read_only(read_only);
}
void TileSetAtlasSourceEditor::_update_tile_inspector() {
@@ -594,6 +600,7 @@ void TileSetAtlasSourceEditor::_update_tile_inspector() {
tile_inspector->hide();
tile_inspector_no_tile_selected_label->hide();
}
+ tile_inspector->set_read_only(read_only);
}
void TileSetAtlasSourceEditor::_update_tile_data_editors() {
@@ -633,14 +640,14 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
// --- Rendering ---
ADD_TILE_DATA_EDITOR_GROUP("Rendering");
- ADD_TILE_DATA_EDITOR(group, "Texture Offset", "texture_offset");
- if (!tile_data_editors.has("texture_offset")) {
- TileDataTextureOffsetEditor *tile_data_texture_offset_editor = memnew(TileDataTextureOffsetEditor);
- tile_data_texture_offset_editor->hide();
- tile_data_texture_offset_editor->setup_property_editor(Variant::VECTOR2, "texture_offset");
- tile_data_texture_offset_editor->connect("needs_redraw", callable_mp((CanvasItem *)tile_atlas_control_unscaled, &Control::queue_redraw));
- tile_data_texture_offset_editor->connect("needs_redraw", callable_mp((CanvasItem *)alternative_tiles_control_unscaled, &Control::queue_redraw));
- tile_data_editors["texture_offset"] = tile_data_texture_offset_editor;
+ ADD_TILE_DATA_EDITOR(group, "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();
+ tile_data_texture_origin_editor->setup_property_editor(Variant::VECTOR2, "texture_origin");
+ tile_data_texture_origin_editor->connect("needs_redraw", callable_mp((CanvasItem *)tile_atlas_control_unscaled, &Control::queue_redraw));
+ tile_data_texture_origin_editor->connect("needs_redraw", callable_mp((CanvasItem *)alternative_tiles_control_unscaled, &Control::queue_redraw));
+ tile_data_editors["texture_origin"] = tile_data_texture_origin_editor;
}
ADD_TILE_DATA_EDITOR(group, "Modulate", "modulate");
@@ -965,19 +972,19 @@ void TileSetAtlasSourceEditor::_update_toolbar() {
current_tile_data_editor_toolbar->hide();
}
tools_settings_erase_button->show();
- tool_advanced_menu_buttom->show();
+ tool_advanced_menu_button->show();
} else if (tools_button_group->get_pressed_button() == tool_select_button) {
if (current_tile_data_editor_toolbar) {
current_tile_data_editor_toolbar->hide();
}
tools_settings_erase_button->hide();
- tool_advanced_menu_buttom->hide();
+ tool_advanced_menu_button->hide();
} else if (tools_button_group->get_pressed_button() == tool_paint_button) {
if (current_tile_data_editor_toolbar) {
current_tile_data_editor_toolbar->show();
}
tools_settings_erase_button->hide();
- tool_advanced_menu_buttom->hide();
+ tool_advanced_menu_button->hide();
}
}
@@ -1015,44 +1022,13 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
// Handle the event.
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
- Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos);
- Vector2i last_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_last_mouse_pos);
- Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position());
+ Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos, true);
+ Vector2i last_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_last_mouse_pos, true);
+ Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position(), true);
Vector2i grid_size = tile_set_atlas_source->get_atlas_grid_size();
- if (drag_type == DRAG_TYPE_NONE) {
- if (selection.size() == 1) {
- // Change the cursor depending on the hovered thing.
- TileSelection selected = selection.front()->get();
- if (selected.tile != TileSetSource::INVALID_ATLAS_COORDS && selected.alternative == 0) {
- Vector2 mouse_local_pos = tile_atlas_control->get_local_mouse_position();
- Vector2i size_in_atlas = tile_set_atlas_source->get_tile_size_in_atlas(selected.tile);
- Rect2 region = tile_set_atlas_source->get_tile_texture_region(selected.tile);
- Size2 zoomed_size = resize_handle->get_size() / tile_atlas_view->get_zoom();
- Rect2 rect = region.grow_individual(zoomed_size.x, zoomed_size.y, 0, 0);
- const Vector2i coords[] = { Vector2i(0, 0), Vector2i(1, 0), Vector2i(1, 1), Vector2i(0, 1) };
- const Vector2i directions[] = { Vector2i(0, -1), Vector2i(1, 0), Vector2i(0, 1), Vector2i(-1, 0) };
- CursorShape cursor_shape = CURSOR_ARROW;
- bool can_grow[4];
- for (int i = 0; i < 4; i++) {
- can_grow[i] = tile_set_atlas_source->has_room_for_tile(selected.tile + directions[i], tile_set_atlas_source->get_tile_size_in_atlas(selected.tile), tile_set_atlas_source->get_tile_animation_columns(selected.tile), tile_set_atlas_source->get_tile_animation_separation(selected.tile), tile_set_atlas_source->get_tile_animation_frames_count(selected.tile), selected.tile);
- can_grow[i] |= (i % 2 == 0) ? size_in_atlas.y > 1 : size_in_atlas.x > 1;
- }
- for (int i = 0; i < 4; i++) {
- Vector2 pos = rect.position + rect.size * coords[i];
- if (can_grow[i] && can_grow[(i + 3) % 4] && Rect2(pos, zoomed_size).has_point(mouse_local_pos)) {
- cursor_shape = (i % 2) ? CURSOR_BDIAGSIZE : CURSOR_FDIAGSIZE;
- }
- Vector2 next_pos = rect.position + rect.size * coords[(i + 1) % 4];
- if (can_grow[i] && Rect2((pos + next_pos) / 2.0, zoomed_size).has_point(mouse_local_pos)) {
- cursor_shape = (i % 2) ? CURSOR_HSIZE : CURSOR_VSIZE;
- }
- }
- tile_atlas_control->set_default_cursor_shape(cursor_shape);
- }
- }
- } else if (drag_type == DRAG_TYPE_CREATE_BIG_TILE) {
+ if (drag_type == DRAG_TYPE_CREATE_BIG_TILE) {
// Create big tile.
new_base_tiles_coords = new_base_tiles_coords.max(Vector2i(0, 0)).min(grid_size - Vector2i(1, 1));
@@ -1097,7 +1073,6 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
// Move tile.
Vector2 mouse_offset = (Vector2(tile_set_atlas_source->get_tile_size_in_atlas(drag_current_tile)) / 2.0 - Vector2(0.5, 0.5)) * tile_set->get_tile_size();
Vector2i coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position() - mouse_offset);
- coords = coords.max(Vector2i(0, 0)).min(grid_size - Vector2i(1, 1));
if (drag_current_tile != coords && tile_set_atlas_source->has_room_for_tile(coords, tile_set_atlas_source->get_tile_size_in_atlas(drag_current_tile), tile_set_atlas_source->get_tile_animation_columns(drag_current_tile), tile_set_atlas_source->get_tile_animation_separation(drag_current_tile), tile_set_atlas_source->get_tile_animation_frames_count(drag_current_tile), drag_current_tile)) {
tile_set_atlas_source->move_tile_in_atlas(drag_current_tile, coords);
selection.clear();
@@ -1243,7 +1218,6 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
Rect2 rect = region.grow_individual(zoomed_size.x, zoomed_size.y, 0, 0);
const Vector2i coords[] = { Vector2i(0, 0), Vector2i(1, 0), Vector2i(1, 1), Vector2i(0, 1) };
const Vector2i directions[] = { Vector2i(0, -1), Vector2i(1, 0), Vector2i(0, 1), Vector2i(-1, 0) };
- CursorShape cursor_shape = CURSOR_ARROW;
bool can_grow[4];
for (int i = 0; i < 4; i++) {
can_grow[i] = tile_set_atlas_source->has_room_for_tile(selected.tile + directions[i], tile_set_atlas_source->get_tile_size_in_atlas(selected.tile), tile_set_atlas_source->get_tile_animation_columns(selected.tile), tile_set_atlas_source->get_tile_animation_separation(selected.tile), tile_set_atlas_source->get_tile_animation_frames_count(selected.tile), selected.tile);
@@ -1257,7 +1231,6 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
drag_last_mouse_pos = drag_start_mouse_pos;
drag_current_tile = selected.tile;
drag_start_tile_shape = Rect2i(selected.tile, tile_set_atlas_source->get_tile_size_in_atlas(selected.tile));
- cursor_shape = (i % 2) ? CURSOR_BDIAGSIZE : CURSOR_FDIAGSIZE;
}
Vector2 next_pos = rect.position + rect.size * coords[(i + 1) % 4];
if (can_grow[i] && Rect2((pos + next_pos) / 2.0, zoomed_size).has_point(mouse_local_pos)) {
@@ -1266,10 +1239,8 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
drag_last_mouse_pos = drag_start_mouse_pos;
drag_current_tile = selected.tile;
drag_start_tile_shape = Rect2i(selected.tile, tile_set_atlas_source->get_tile_size_in_atlas(selected.tile));
- cursor_shape = (i % 2) ? CURSOR_HSIZE : CURSOR_VSIZE;
}
}
- tile_atlas_control->set_default_cursor_shape(cursor_shape);
}
}
@@ -1292,7 +1263,6 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
drag_last_mouse_pos = drag_start_mouse_pos;
drag_current_tile = selected.tile;
drag_start_tile_shape = Rect2i(selected.tile, tile_set_atlas_source->get_tile_size_in_atlas(selected.tile));
- tile_atlas_control->set_default_cursor_shape(CURSOR_MOVE);
} else {
// Start selection dragging.
drag_type = DRAG_TYPE_RECT_SELECT;
@@ -1332,7 +1302,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
}
void TileSetAtlasSourceEditor::_end_dragging() {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (drag_type) {
case DRAG_TYPE_CREATE_TILES:
undo_redo->create_action(TTR("Create tiles"));
@@ -1370,8 +1340,8 @@ void TileSetAtlasSourceEditor::_end_dragging() {
undo_redo->commit_action();
} break;
case DRAG_TYPE_CREATE_TILES_USING_RECT: {
- Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos);
- Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position());
+ Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos, true);
+ Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position(), true);
Rect2i area = Rect2i(start_base_tiles_coords, new_base_tiles_coords - start_base_tiles_coords).abs();
area.set_end((area.get_end() + Vector2i(1, 1)).min(tile_set_atlas_source->get_atlas_grid_size()));
undo_redo->create_action(TTR("Create tiles"));
@@ -1387,8 +1357,8 @@ void TileSetAtlasSourceEditor::_end_dragging() {
undo_redo->commit_action();
} break;
case DRAG_TYPE_REMOVE_TILES_USING_RECT: {
- Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos);
- Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position());
+ Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos, true);
+ Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position(), true);
Rect2i area = Rect2i(start_base_tiles_coords, new_base_tiles_coords - start_base_tiles_coords).abs();
area.set_end((area.get_end() + Vector2i(1, 1)).min(tile_set_atlas_source->get_atlas_grid_size()));
List<PropertyInfo> list;
@@ -1438,8 +1408,8 @@ void TileSetAtlasSourceEditor::_end_dragging() {
}
break;
case DRAG_TYPE_RECT_SELECT: {
- Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos);
- Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position());
+ Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos, true);
+ Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position(), true);
ERR_FAIL_COND(start_base_tiles_coords == TileSetSource::INVALID_ATLAS_COORDS);
ERR_FAIL_COND(new_base_tiles_coords == TileSetSource::INVALID_ATLAS_COORDS);
@@ -1509,12 +1479,12 @@ void TileSetAtlasSourceEditor::_end_dragging() {
// We have a tile.
menu_option_coords = selected.tile;
menu_option_alternative = 0;
- base_tile_popup_menu->popup(Rect2i(get_global_mouse_position(), Size2i()));
+ base_tile_popup_menu->popup(Rect2i(get_screen_transform().xform(get_local_mouse_position()), Size2i()));
} else if (hovered_base_tile_coords != TileSetSource::INVALID_ATLAS_COORDS) {
// We don't have a tile, but can create one.
menu_option_coords = hovered_base_tile_coords;
menu_option_alternative = TileSetSource::INVALID_TILE_ALTERNATIVE;
- empty_base_tile_popup_menu->popup(Rect2i(get_global_mouse_position(), Size2i()));
+ empty_base_tile_popup_menu->popup(Rect2i(get_screen_transform().xform(get_local_mouse_position()), Size2i()));
}
} break;
case DRAG_TYPE_RESIZE_TOP_LEFT:
@@ -1543,7 +1513,67 @@ void TileSetAtlasSourceEditor::_end_dragging() {
drag_modified_tiles.clear();
drag_type = DRAG_TYPE_NONE;
- tile_atlas_control->set_default_cursor_shape(CURSOR_ARROW);
+ // Change mouse accordingly.
+}
+
+Control::CursorShape TileSetAtlasSourceEditor::get_cursor_shape(const Point2 &p_pos) const {
+ Control::CursorShape cursor_shape = get_default_cursor_shape();
+ if (drag_type == DRAG_TYPE_NONE) {
+ if (selection.size() == 1) {
+ // Change the cursor depending on the hovered thing.
+ TileSelection selected = selection.front()->get();
+ if (selected.tile != TileSetSource::INVALID_ATLAS_COORDS && selected.alternative == 0) {
+ Transform2D xform = tile_atlas_control->get_global_transform().affine_inverse() * get_global_transform();
+ Vector2 mouse_local_pos = xform.xform(p_pos);
+ Vector2i size_in_atlas = tile_set_atlas_source->get_tile_size_in_atlas(selected.tile);
+ Rect2 region = tile_set_atlas_source->get_tile_texture_region(selected.tile);
+ Size2 zoomed_size = resize_handle->get_size() / tile_atlas_view->get_zoom();
+ Rect2 rect = region.grow_individual(zoomed_size.x, zoomed_size.y, 0, 0);
+ const Vector2i coords[] = { Vector2i(0, 0), Vector2i(1, 0), Vector2i(1, 1), Vector2i(0, 1) };
+ const Vector2i directions[] = { Vector2i(0, -1), Vector2i(1, 0), Vector2i(0, 1), Vector2i(-1, 0) };
+ bool can_grow[4];
+ for (int i = 0; i < 4; i++) {
+ can_grow[i] = tile_set_atlas_source->has_room_for_tile(selected.tile + directions[i], tile_set_atlas_source->get_tile_size_in_atlas(selected.tile), tile_set_atlas_source->get_tile_animation_columns(selected.tile), tile_set_atlas_source->get_tile_animation_separation(selected.tile), tile_set_atlas_source->get_tile_animation_frames_count(selected.tile), selected.tile);
+ can_grow[i] |= (i % 2 == 0) ? size_in_atlas.y > 1 : size_in_atlas.x > 1;
+ }
+ for (int i = 0; i < 4; i++) {
+ Vector2 pos = rect.position + rect.size * coords[i];
+ if (can_grow[i] && can_grow[(i + 3) % 4] && Rect2(pos, zoomed_size).has_point(mouse_local_pos)) {
+ cursor_shape = (i % 2) ? CURSOR_BDIAGSIZE : CURSOR_FDIAGSIZE;
+ }
+ Vector2 next_pos = rect.position + rect.size * coords[(i + 1) % 4];
+ if (can_grow[i] && Rect2((pos + next_pos) / 2.0, zoomed_size).has_point(mouse_local_pos)) {
+ cursor_shape = (i % 2) ? CURSOR_HSIZE : CURSOR_VSIZE;
+ }
+ }
+ }
+ }
+ } else {
+ switch (drag_type) {
+ case DRAG_TYPE_RESIZE_TOP_LEFT:
+ case DRAG_TYPE_RESIZE_BOTTOM_RIGHT:
+ cursor_shape = CURSOR_FDIAGSIZE;
+ break;
+ case DRAG_TYPE_RESIZE_TOP:
+ case DRAG_TYPE_RESIZE_BOTTOM:
+ cursor_shape = CURSOR_VSIZE;
+ break;
+ case DRAG_TYPE_RESIZE_TOP_RIGHT:
+ case DRAG_TYPE_RESIZE_BOTTOM_LEFT:
+ cursor_shape = CURSOR_BDIAGSIZE;
+ break;
+ case DRAG_TYPE_RESIZE_LEFT:
+ case DRAG_TYPE_RESIZE_RIGHT:
+ cursor_shape = CURSOR_HSIZE;
+ break;
+ case DRAG_TYPE_MOVE_TILE:
+ cursor_shape = CURSOR_MOVE;
+ break;
+ default:
+ break;
+ }
+ }
+ return cursor_shape;
}
HashMap<Vector2i, List<const PropertyInfo *>> TileSetAtlasSourceEditor::_group_properties_per_tiles(const List<PropertyInfo> &r_list, const TileSetAtlasSource *p_atlas) {
@@ -1563,7 +1593,7 @@ HashMap<Vector2i, List<const PropertyInfo *>> TileSetAtlasSourceEditor::_group_p
}
void TileSetAtlasSourceEditor::_menu_option(int p_option) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (p_option) {
case TILE_DELETE: {
@@ -1747,8 +1777,8 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
}
} else if (drag_type == DRAG_TYPE_RECT_SELECT || drag_type == DRAG_TYPE_REMOVE_TILES_USING_RECT) {
// Draw tiles to be removed.
- Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos);
- Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position());
+ Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos, true);
+ Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position(), true);
Rect2i area = Rect2i(start_base_tiles_coords, new_base_tiles_coords - start_base_tiles_coords).abs();
area.set_end((area.get_end() + Vector2i(1, 1)).min(tile_set_atlas_source->get_atlas_grid_size()));
@@ -1777,8 +1807,8 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
Vector2i separation = tile_set_atlas_source->get_separation();
Vector2i tile_size = tile_set_atlas_source->get_texture_region_size();
- Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos);
- Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position());
+ Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos, true);
+ Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position(), true);
Rect2i area = Rect2i(start_base_tiles_coords, new_base_tiles_coords - start_base_tiles_coords).abs();
area.set_end((area.get_end() + Vector2i(1, 1)).min(tile_set_atlas_source->get_atlas_grid_size()));
for (int x = area.get_position().x; x < area.get_end().x; x++) {
@@ -1795,8 +1825,8 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
// Draw the hovered tile.
if (drag_type == DRAG_TYPE_REMOVE_TILES_USING_RECT || drag_type == DRAG_TYPE_CREATE_TILES_USING_RECT) {
// Draw the rect.
- Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos);
- Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position());
+ Vector2i start_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(drag_start_mouse_pos, true);
+ Vector2i new_base_tiles_coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position(), true);
Rect2i area = Rect2i(start_base_tiles_coords, new_base_tiles_coords - start_base_tiles_coords).abs();
area.set_end((area.get_end() + Vector2i(1, 1)).min(tile_set_atlas_source->get_atlas_grid_size()));
Vector2i margins = tile_set_atlas_source->get_margins();
@@ -1834,7 +1864,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw() {
for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) {
Vector2i coords = tile_set_atlas_source->get_tile_id(i);
Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = texture_region.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + tile_set_atlas_source->get_tile_data(coords, 0)->get_texture_origin();
Transform2D xform = tile_atlas_control->get_parent_control()->get_transform();
xform.translate_local(position);
@@ -1857,7 +1887,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw() {
continue;
}
Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(E.tile);
- Vector2i position = texture_region.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(E.tile, 0);
+ Vector2i position = texture_region.get_center() + tile_set_atlas_source->get_tile_data(E.tile, 0)->get_texture_origin();
Transform2D xform = tile_atlas_control->get_parent_control()->get_transform();
xform.translate_local(position);
@@ -1950,7 +1980,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_gui_input(const Ref<In
selected = selection.front()->get();
menu_option_coords = selected.tile;
menu_option_alternative = selected.alternative;
- alternative_tile_popup_menu->popup(Rect2i(get_global_mouse_position(), Size2i()));
+ alternative_tile_popup_menu->popup(Rect2i(get_screen_transform().xform(get_local_mouse_position()), Size2i()));
}
}
@@ -2009,7 +2039,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
continue;
}
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
- Vector2 position = rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
+ Vector2 position = rect.get_center() + tile_set_atlas_source->get_tile_data(coords, alternative_tile)->get_texture_origin();
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
xform.translate_local(position);
@@ -2033,7 +2063,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
continue;
}
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E.tile, E.alternative);
- Vector2 position = rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(E.tile, E.alternative);
+ Vector2 position = rect.get_center() + tile_set_atlas_source->get_tile_data(E.tile, E.alternative)->get_texture_origin();
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
xform.translate_local(position);
@@ -2079,8 +2109,8 @@ void TileSetAtlasSourceEditor::_atlas_source_proxy_object_changed(String p_what)
}
void TileSetAtlasSourceEditor::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value) {
- Ref<EditorUndoRedoManager> undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
- ERR_FAIL_COND(!undo_redo_man.is_valid());
+ EditorUndoRedoManager *undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
+ ERR_FAIL_NULL(undo_redo_man);
#define ADD_UNDO(obj, property) undo_redo_man->add_undo_property(obj, property, obj->get(property));
@@ -2160,7 +2190,12 @@ void TileSetAtlasSourceEditor::edit(Ref<TileSet> p_tile_set, TileSetAtlasSource
ERR_FAIL_COND(p_source_id < 0);
ERR_FAIL_COND(p_tile_set->get_source(p_source_id) != p_tile_set_atlas_source);
- if (p_tile_set == tile_set && p_tile_set_atlas_source == tile_set_atlas_source && p_source_id == tile_set_atlas_source_id) {
+ bool new_read_only_state = false;
+ if (p_tile_set.is_valid()) {
+ new_read_only_state = EditorNode::get_singleton()->is_resource_read_only(p_tile_set);
+ }
+
+ if (p_tile_set == tile_set && p_tile_set_atlas_source == tile_set_atlas_source && p_source_id == tile_set_atlas_source_id && new_read_only_state == read_only) {
return;
}
@@ -2177,11 +2212,23 @@ void TileSetAtlasSourceEditor::edit(Ref<TileSet> p_tile_set, TileSetAtlasSource
tile_set_atlas_source = p_tile_set_atlas_source;
tile_set_atlas_source_id = p_source_id;
- // Add the listener again.
+ // Read-only is off by default.
+ read_only = new_read_only_state;
+
if (tile_set.is_valid()) {
tile_set->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_set_changed));
}
+ if (read_only && tools_button_group->get_pressed_button() == tool_paint_button) {
+ tool_paint_button->set_pressed(false);
+ tool_setup_atlas_source_button->set_pressed(true);
+ }
+
+ // Disable buttons in read-only mode.
+ tool_paint_button->set_disabled(read_only);
+ tools_settings_erase_button->set_disabled(read_only);
+ tool_advanced_menu_button->set_disabled(read_only);
+
// Update everything.
_update_source_inspector();
@@ -2210,7 +2257,7 @@ void TileSetAtlasSourceEditor::_auto_create_tiles() {
Vector2i separation = tile_set_atlas_source->get_separation();
Vector2i texture_region_size = tile_set_atlas_source->get_texture_region_size();
Size2i grid_size = tile_set_atlas_source->get_atlas_grid_size();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Create tiles in non-transparent texture regions"));
for (int y = 0; y < grid_size.y; y++) {
for (int x = 0; x < grid_size.x; x++) {
@@ -2256,7 +2303,7 @@ void TileSetAtlasSourceEditor::_auto_remove_tiles() {
Vector2i texture_region_size = tile_set_atlas_source->get_texture_region_size();
Vector2i grid_size = tile_set_atlas_source->get_atlas_grid_size();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove tiles in fully transparent texture regions"));
List<PropertyInfo> list;
@@ -2316,7 +2363,7 @@ void TileSetAtlasSourceEditor::_notification(int p_what) {
tools_settings_erase_button->set_icon(get_theme_icon(SNAME("Eraser"), SNAME("EditorIcons")));
- tool_advanced_menu_buttom->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
+ tool_advanced_menu_button->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
resize_handle = get_theme_icon(SNAME("EditorHandle"), SNAME("EditorIcons"));
resize_handle_disabled = get_theme_icon(SNAME("EditorHandleDisabled"), SNAME("EditorIcons"));
@@ -2324,6 +2371,18 @@ void TileSetAtlasSourceEditor::_notification(int p_what) {
case NOTIFICATION_INTERNAL_PROCESS: {
if (tile_set_changed_needs_update) {
+ // Read-only is off by default
+ read_only = false;
+ // Add the listener again and check for read-only status.
+ if (tile_set.is_valid()) {
+ read_only = EditorNode::get_singleton()->is_resource_read_only(tile_set);
+ }
+
+ // Disable buttons in read-only mode.
+ tool_paint_button->set_disabled(read_only);
+ tools_settings_erase_button->set_disabled(read_only);
+ tool_advanced_menu_button->set_disabled(read_only);
+
// Update everything.
_update_source_inspector();
@@ -2488,12 +2547,12 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
tools_settings_erase_button->set_shortcut_context(this);
tool_settings->add_child(tools_settings_erase_button);
- tool_advanced_menu_buttom = memnew(MenuButton);
- tool_advanced_menu_buttom->set_flat(true);
- tool_advanced_menu_buttom->get_popup()->add_item(TTR("Create Tiles in Non-Transparent Texture Regions"), ADVANCED_AUTO_CREATE_TILES);
- tool_advanced_menu_buttom->get_popup()->add_item(TTR("Remove Tiles in Fully Transparent Texture Regions"), ADVANCED_AUTO_REMOVE_TILES);
- tool_advanced_menu_buttom->get_popup()->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
- tool_settings->add_child(tool_advanced_menu_buttom);
+ tool_advanced_menu_button = memnew(MenuButton);
+ tool_advanced_menu_button->set_flat(true);
+ tool_advanced_menu_button->get_popup()->add_item(TTR("Create Tiles in Non-Transparent Texture Regions"), ADVANCED_AUTO_CREATE_TILES);
+ tool_advanced_menu_button->get_popup()->add_item(TTR("Remove Tiles in Fully Transparent Texture Regions"), ADVANCED_AUTO_REMOVE_TILES);
+ tool_advanced_menu_button->get_popup()->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
+ tool_settings->add_child(tool_advanced_menu_button);
_update_toolbar();
@@ -2645,7 +2704,7 @@ void EditorPropertyTilePolygon::update_property() {
Vector2i coords = atlas_tile_proxy_object->get_edited_tiles().front()->get().tile;
int alternative = atlas_tile_proxy_object->get_edited_tiles().front()->get().alternative;
TileData *tile_data = tile_set_atlas_source->get_tile_data(coords, alternative);
- generic_tile_polygon_editor->set_background(tile_set_atlas_source->get_texture(), tile_set_atlas_source->get_tile_texture_region(coords), tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
+ generic_tile_polygon_editor->set_background(tile_set_atlas_source->get_texture(), tile_set_atlas_source->get_tile_texture_region(coords), tile_data->get_texture_origin(), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
// Reset the polygons.
generic_tile_polygon_editor->clear_polygons();
@@ -2714,7 +2773,7 @@ bool EditorInspectorPluginTileData::can_handle(Object *p_object) {
return Object::cast_to<TileSetAtlasSourceEditor::AtlasTileProxyObject>(p_object) != nullptr;
}
-bool EditorInspectorPluginTileData::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginTileData::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
Vector<String> components = String(p_path).split("/", true, 2);
if (components.size() == 2 && components[0].begins_with("occlusion_layer_") && components[0].trim_prefix("occlusion_layer_").is_valid_int()) {
// Occlusion layers.
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.h b/editor/plugins/tiles/tile_set_atlas_source_editor.h
index 85f780ea26..5141824f79 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.h
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.h
@@ -113,6 +113,8 @@ public:
};
private:
+ bool read_only = false;
+
Ref<TileSet> tile_set;
TileSetAtlasSource *tile_set_atlas_source = nullptr;
int tile_set_atlas_source_id = TileSet::INVALID_SOURCE;
@@ -209,7 +211,7 @@ private:
HBoxContainer *tool_settings = nullptr;
HBoxContainer *tool_settings_tile_data_toolbar_container = nullptr;
Button *tools_settings_erase_button = nullptr;
- MenuButton *tool_advanced_menu_buttom = nullptr;
+ MenuButton *tool_advanced_menu_button = nullptr;
// Selection.
RBSet<TileSelection> selection;
@@ -277,6 +279,8 @@ public:
void edit(Ref<TileSet> p_tile_set, TileSetAtlasSource *p_tile_set_source, int p_source_id);
void init_source();
+ virtual CursorShape get_cursor_shape(const Point2 &p_pos) const override;
+
TileSetAtlasSourceEditor();
~TileSetAtlasSourceEditor();
};
@@ -308,7 +312,7 @@ class EditorInspectorPluginTileData : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
};
#endif // TILE_SET_ATLAS_SOURCE_EDITOR_H
diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp
index d269a7c0ec..39d17c718e 100644
--- a/editor/plugins/tiles/tile_set_editor.cpp
+++ b/editor/plugins/tiles/tile_set_editor.cpp
@@ -67,7 +67,7 @@ void TileSetEditor::_drop_data_fw(const Point2 &p_point, const Variant &p_data,
// Actually create the new source.
Ref<TileSetAtlasSource> atlas_source = memnew(TileSetAtlasSource);
atlas_source->set_texture(resource);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add a new atlas source"));
undo_redo->add_do_method(*tile_set, "add_source", atlas_source, source_id);
undo_redo->add_do_method(*atlas_source, "set_texture_region_size", tile_set->get_tile_size());
@@ -89,6 +89,10 @@ void TileSetEditor::_drop_data_fw(const Point2 &p_point, const Variant &p_data,
bool TileSetEditor::_can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
ERR_FAIL_COND_V(!tile_set.is_valid(), false);
+ if (read_only) {
+ return false;
+ }
+
if (p_from == sources_list) {
Dictionary d = p_data;
@@ -223,7 +227,7 @@ void TileSetEditor::_source_selected(int p_source_index) {
ERR_FAIL_COND(!tile_set.is_valid());
// Update the selected source.
- sources_delete_button->set_disabled(p_source_index < 0);
+ sources_delete_button->set_disabled(p_source_index < 0 || read_only);
if (p_source_index >= 0) {
int source_id = sources_list->get_item_metadata(p_source_index);
@@ -260,7 +264,7 @@ void TileSetEditor::_source_delete_pressed() {
Ref<TileSetSource> source = tile_set->get_source(to_delete);
// Remove the source.
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove source"));
undo_redo->add_do_method(*tile_set, "remove_source", to_delete);
undo_redo->add_undo_method(*tile_set, "add_source", source, to_delete);
@@ -279,7 +283,7 @@ void TileSetEditor::_source_add_id_pressed(int p_id_pressed) {
Ref<TileSetAtlasSource> atlas_source = memnew(TileSetAtlasSource);
// Add a new source.
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add atlas source"));
undo_redo->add_do_method(*tile_set, "add_source", atlas_source, source_id);
undo_redo->add_do_method(*atlas_source, "set_texture_region_size", tile_set->get_tile_size());
@@ -294,7 +298,7 @@ void TileSetEditor::_source_add_id_pressed(int p_id_pressed) {
Ref<TileSetScenesCollectionSource> scene_collection_source = memnew(TileSetScenesCollectionSource);
// Add a new source.
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add atlas source"));
undo_redo->add_do_method(*tile_set, "add_source", scene_collection_source, source_id);
undo_redo->add_undo_method(*tile_set, "remove_source", source_id);
@@ -356,8 +360,19 @@ void TileSetEditor::_notification(int p_what) {
if (tile_set.is_valid()) {
tile_set->set_edited(true);
}
+
+ read_only = false;
+ if (tile_set.is_valid()) {
+ read_only = EditorNode::get_singleton()->is_resource_read_only(tile_set);
+ }
+
_update_sources_list();
_update_patterns_list();
+
+ sources_add_button->set_disabled(read_only);
+ sources_advanced_menu_button->set_disabled(read_only);
+ source_sort_button->set_disabled(read_only);
+
tile_set_changed_needs_update = false;
}
} break;
@@ -367,9 +382,13 @@ void TileSetEditor::_notification(int p_what) {
void TileSetEditor::_patterns_item_list_gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(!tile_set.is_valid());
+ if (EditorNode::get_singleton()->is_resource_read_only(tile_set)) {
+ return;
+ }
+
if (ED_IS_SHORTCUT("tiles_editor/delete", p_event) && p_event->is_pressed() && !p_event->is_echo()) {
Vector<int> selected = patterns_item_list->get_selected_items();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove TileSet patterns"));
for (int i = 0; i < selected.size(); i++) {
int pattern_index = selected[i];
@@ -416,8 +435,8 @@ void TileSetEditor::_tab_changed(int p_tab_changed) {
}
void TileSetEditor::_move_tile_set_array_element(Object *p_undo_redo, Object *p_edited, String p_array_prefix, int p_from_index, int p_to_pos) {
- Ref<EditorUndoRedoManager> undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
- ERR_FAIL_COND(undo_redo_man.is_null());
+ EditorUndoRedoManager *undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
+ ERR_FAIL_NULL(undo_redo_man);
TileSet *ed_tile_set = Object::cast_to<TileSet>(p_edited);
if (!ed_tile_set) {
@@ -462,6 +481,35 @@ void TileSetEditor::_move_tile_set_array_element(Object *p_undo_redo, Object *p_
}
#define ADD_UNDO(obj, property) undo_redo_man->add_undo_property(obj, property, obj->get(property));
+
+ // Add undo method to adding array element.
+ if (p_array_prefix == "occlusion_layer_") {
+ if (p_from_index < 0) {
+ undo_redo_man->add_undo_method(ed_tile_set, "remove_occlusion_layer", p_to_pos < 0 ? ed_tile_set->get_occlusion_layers_count() : p_to_pos);
+ }
+ } else if (p_array_prefix == "physics_layer_") {
+ if (p_from_index < 0) {
+ undo_redo_man->add_undo_method(ed_tile_set, "remove_physics_layer", p_to_pos < 0 ? ed_tile_set->get_physics_layers_count() : p_to_pos);
+ }
+ } else if (p_array_prefix == "terrain_set_") {
+ if (p_from_index < 0) {
+ undo_redo_man->add_undo_method(ed_tile_set, "remove_terrain_set", p_to_pos < 0 ? ed_tile_set->get_terrain_sets_count() : p_to_pos);
+ }
+ } else if (components.size() >= 2 && components[0].begins_with("terrain_set_") && components[0].trim_prefix("terrain_set_").is_valid_int() && components[1] == "terrain_") {
+ int terrain_set = components[0].trim_prefix("terrain_set_").to_int();
+ if (p_from_index < 0) {
+ undo_redo_man->add_undo_method(ed_tile_set, "remove_terrain", terrain_set, p_to_pos < 0 ? ed_tile_set->get_terrains_count(terrain_set) : p_to_pos);
+ }
+ } else if (p_array_prefix == "navigation_layer_") {
+ if (p_from_index < 0) {
+ undo_redo_man->add_undo_method(ed_tile_set, "remove_navigation_layer", p_to_pos < 0 ? ed_tile_set->get_navigation_layers_count() : p_to_pos);
+ }
+ } else if (p_array_prefix == "custom_data_layer_") {
+ if (p_from_index < 0) {
+ undo_redo_man->add_undo_method(ed_tile_set, "remove_custom_data_layer", p_to_pos < 0 ? ed_tile_set->get_custom_data_layers_count() : p_to_pos);
+ }
+ }
+
// Save layers' properties.
List<PropertyInfo> properties;
ed_tile_set->get_property_list(&properties);
@@ -543,7 +591,7 @@ void TileSetEditor::_move_tile_set_array_element(Object *p_undo_redo, Object *p_
}
#undef ADD_UNDO
- // Add do method.
+ // Add do method to add/remove array element.
if (p_array_prefix == "occlusion_layer_") {
if (p_from_index < 0) {
undo_redo_man->add_do_method(ed_tile_set, "add_occlusion_layer", p_to_pos);
@@ -597,8 +645,8 @@ void TileSetEditor::_move_tile_set_array_element(Object *p_undo_redo, Object *p_
}
void TileSetEditor::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value) {
- Ref<EditorUndoRedoManager> undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
- ERR_FAIL_COND(undo_redo_man.is_null());
+ EditorUndoRedoManager *undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
+ ERR_FAIL_NULL(undo_redo_man);
#define ADD_UNDO(obj, property) undo_redo_man->add_undo_property(obj, property, obj->get(property));
TileSet *ed_tile_set = Object::cast_to<TileSet>(p_edited);
@@ -637,13 +685,13 @@ void TileSetEditor::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p
#undef ADD_UNDO
}
-void TileSetEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &TileSetEditor::_can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &TileSetEditor::_drop_data_fw);
-}
-
void TileSetEditor::edit(Ref<TileSet> p_tile_set) {
- if (p_tile_set == tile_set) {
+ bool new_read_only_state = false;
+ if (tile_set.is_valid()) {
+ new_read_only_state = EditorNode::get_singleton()->is_resource_read_only(p_tile_set);
+ }
+
+ if (p_tile_set == tile_set && new_read_only_state == read_only) {
return;
}
@@ -655,8 +703,15 @@ void TileSetEditor::edit(Ref<TileSet> p_tile_set) {
// Change the edited object.
tile_set = p_tile_set;
- // Add the listener again.
+ // Read-only status is false by default
+ read_only = new_read_only_state;
+
+ // Add the listener again and check for read-only status.
if (tile_set.is_valid()) {
+ sources_add_button->set_disabled(read_only);
+ sources_advanced_menu_button->set_disabled(read_only);
+ source_sort_button->set_disabled(read_only);
+
tile_set->connect("changed", callable_mp(this, &TileSetEditor::_tile_set_changed));
if (first_edit) {
first_edit = false;
@@ -666,10 +721,6 @@ void TileSetEditor::edit(Ref<TileSet> p_tile_set) {
}
_update_patterns_list();
}
-
- tile_set_atlas_source_editor->hide();
- tile_set_scenes_collection_source_editor->hide();
- no_source_selected_label->show();
}
TileSetEditor::TileSetEditor() {
@@ -728,7 +779,7 @@ TileSetEditor::TileSetEditor() {
sources_list->add_user_signal(MethodInfo("sort_request"));
sources_list->connect("sort_request", callable_mp(this, &TileSetEditor::_update_sources_list).bind(-1));
sources_list->set_texture_filter(CanvasItem::TEXTURE_FILTER_NEAREST);
- sources_list->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_CDU(sources_list, TileSetEditor);
split_container_left_side->add_child(sources_list);
HBoxContainer *sources_bottom_actions = memnew(HBoxContainer);
diff --git a/editor/plugins/tiles/tile_set_editor.h b/editor/plugins/tiles/tile_set_editor.h
index 33200a0632..d36d3bde41 100644
--- a/editor/plugins/tiles/tile_set_editor.h
+++ b/editor/plugins/tiles/tile_set_editor.h
@@ -45,6 +45,8 @@ class TileSetEditor : public VBoxContainer {
static TileSetEditor *singleton;
private:
+ bool read_only = false;
+
Ref<TileSet> tile_set;
bool tile_set_changed_needs_update = false;
HSplitContainer *split_container = nullptr;
@@ -97,7 +99,6 @@ private:
protected:
void _notification(int p_what);
- static void _bind_methods();
public:
_FORCE_INLINE_ static TileSetEditor *get_singleton() { return singleton; }
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 5af338caa0..cc276597fa 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
@@ -237,7 +237,7 @@ void TileSetScenesCollectionSourceEditor::_scenes_list_item_activated(int p_inde
void TileSetScenesCollectionSourceEditor::_source_add_pressed() {
int scene_id = tile_set_scenes_collection_source->get_next_scene_tile_id();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add a Scene Tile"));
undo_redo->add_do_method(tile_set_scenes_collection_source, "create_scene_tile", Ref<PackedScene>(), scene_id);
undo_redo->add_undo_method(tile_set_scenes_collection_source, "remove_scene_tile", scene_id);
@@ -252,7 +252,7 @@ void TileSetScenesCollectionSourceEditor::_source_delete_pressed() {
ERR_FAIL_COND(selected_indices.size() <= 0);
int scene_id = scene_tiles_list->get_item_metadata(selected_indices[0]);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove a Scene Tile"));
undo_redo->add_do_method(tile_set_scenes_collection_source, "remove_scene_tile", scene_id);
undo_redo->add_undo_method(tile_set_scenes_collection_source, "create_scene_tile", tile_set_scenes_collection_source->get_scene_tile_scene(scene_id), scene_id);
@@ -284,7 +284,7 @@ void TileSetScenesCollectionSourceEditor::_update_tile_inspector() {
void TileSetScenesCollectionSourceEditor::_update_action_buttons() {
Vector<int> selected_indices = scene_tiles_list->get_selected_items();
- scene_tile_delete_button->set_disabled(selected_indices.size() <= 0);
+ scene_tile_delete_button->set_disabled(selected_indices.size() <= 0 || read_only);
}
void TileSetScenesCollectionSourceEditor::_update_scenes_list() {
@@ -342,6 +342,12 @@ void TileSetScenesCollectionSourceEditor::_notification(int p_what) {
case NOTIFICATION_INTERNAL_PROCESS: {
if (tile_set_scenes_collection_source_changed_needs_update) {
+ read_only = false;
+ // Add the listener again and check for read-only status.
+ if (tile_set.is_valid()) {
+ read_only = EditorNode::get_singleton()->is_resource_read_only(tile_set);
+ }
+
// Update everything.
_update_source_inspector();
_update_scenes_list();
@@ -365,7 +371,12 @@ void TileSetScenesCollectionSourceEditor::edit(Ref<TileSet> p_tile_set, TileSetS
ERR_FAIL_COND(p_source_id < 0);
ERR_FAIL_COND(p_tile_set->get_source(p_source_id) != p_tile_set_scenes_collection_source);
- if (p_tile_set == tile_set && p_tile_set_scenes_collection_source == tile_set_scenes_collection_source && p_source_id == tile_set_source_id) {
+ bool new_read_only_state = false;
+ if (p_tile_set.is_valid()) {
+ new_read_only_state = EditorNode::get_singleton()->is_resource_read_only(p_tile_set);
+ }
+
+ if (p_tile_set == tile_set && p_tile_set_scenes_collection_source == tile_set_scenes_collection_source && p_source_id == tile_set_source_id && new_read_only_state == read_only) {
return;
}
@@ -379,6 +390,16 @@ void TileSetScenesCollectionSourceEditor::edit(Ref<TileSet> p_tile_set, TileSetS
tile_set_scenes_collection_source = p_tile_set_scenes_collection_source;
tile_set_source_id = p_source_id;
+ // Read-only status is false by default
+ read_only = new_read_only_state;
+
+ if (tile_set.is_valid()) {
+ scenes_collection_source_inspector->set_read_only(read_only);
+ tile_inspector->set_read_only(read_only);
+
+ scene_tile_add_button->set_disabled(read_only);
+ }
+
// Add the listener again.
if (tile_set_scenes_collection_source) {
tile_set_scenes_collection_source->connect("changed", callable_mp(this, &TileSetScenesCollectionSourceEditor::_tile_set_scenes_collection_source_changed));
@@ -404,7 +425,7 @@ void TileSetScenesCollectionSourceEditor::_drop_data_fw(const Point2 &p_point, c
Ref<PackedScene> resource = ResourceLoader::load(files[i]);
if (resource.is_valid()) {
int scene_id = tile_set_scenes_collection_source->get_next_scene_tile_id();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add a Scene Tile"));
undo_redo->add_do_method(tile_set_scenes_collection_source, "create_scene_tile", resource, scene_id);
undo_redo->add_undo_method(tile_set_scenes_collection_source, "remove_scene_tile", scene_id);
@@ -453,8 +474,6 @@ void TileSetScenesCollectionSourceEditor::_bind_methods() {
ADD_SIGNAL(MethodInfo("source_id_changed", PropertyInfo(Variant::INT, "source_id")));
ClassDB::bind_method(D_METHOD("_scene_thumbnail_done"), &TileSetScenesCollectionSourceEditor::_scene_thumbnail_done);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &TileSetScenesCollectionSourceEditor::_can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &TileSetScenesCollectionSourceEditor::_drop_data_fw);
}
TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
@@ -509,7 +528,7 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
scene_tiles_list = memnew(ItemList);
scene_tiles_list->set_h_size_flags(SIZE_EXPAND_FILL);
scene_tiles_list->set_v_size_flags(SIZE_EXPAND_FILL);
- scene_tiles_list->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_CDU(scene_tiles_list, TileSetScenesCollectionSourceEditor);
scene_tiles_list->connect("item_selected", callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_tile_inspector).unbind(1));
scene_tiles_list->connect("item_selected", callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_action_buttons).unbind(1));
scene_tiles_list->connect("item_activated", callable_mp(this, &TileSetScenesCollectionSourceEditor::_scenes_list_item_activated));
diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
index 0901205a29..2a0e8595c4 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
@@ -91,6 +91,8 @@ private:
};
private:
+ bool read_only = false;
+
Ref<TileSet> tile_set;
TileSetScenesCollectionSource *tile_set_scenes_collection_source = nullptr;
int tile_set_source_id = -1;
diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp
index b40e588e07..fad36660d9 100644
--- a/editor/plugins/tiles/tiles_editor_plugin.cpp
+++ b/editor/plugins/tiles/tiles_editor_plugin.cpp
@@ -101,12 +101,12 @@ void TilesEditorPlugin::_thread() {
encompassing_rect.expand_to(world_pos);
// Texture.
- Ref<TileSetAtlasSource> atlas_source = tile_set->get_source(tile_map->get_cell_source_id(0, cell));
+ Ref<TileSetAtlasSource> atlas_source = item.tile_set->get_source(tile_map->get_cell_source_id(0, cell));
if (atlas_source.is_valid()) {
Vector2i coords = tile_map->get_cell_atlas_coords(0, cell);
int alternative = tile_map->get_cell_alternative_tile(0, cell);
- Vector2 center = world_pos - atlas_source->get_tile_effective_texture_offset(coords, alternative);
+ Vector2 center = world_pos - atlas_source->get_tile_data(coords, alternative)->get_texture_origin();
encompassing_rect.expand_to(center - atlas_source->get_tile_texture_region(coords).size / 2);
encompassing_rect.expand_to(center + atlas_source->get_tile_texture_region(coords).size / 2);
}
@@ -185,26 +185,34 @@ void TilesEditorPlugin::_notification(int p_what) {
}
void TilesEditorPlugin::make_visible(bool p_visible) {
- is_visible = p_visible;
-
- if (is_visible) {
+ if (p_visible || is_tile_map_selected()) {
// Disable and hide invalid editors.
TileMap *tile_map = Object::cast_to<TileMap>(ObjectDB::get_instance(tile_map_id));
tileset_editor_button->set_visible(tile_set.is_valid());
tilemap_editor_button->set_visible(tile_map);
- if (tile_map && !is_editing_tile_set) {
+ if (tile_map && (!is_editing_tile_set || !p_visible)) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(tilemap_editor);
} else {
EditorNode::get_singleton()->make_bottom_panel_item_visible(tileset_editor);
}
-
+ is_visible = true;
} else {
tileset_editor_button->hide();
tilemap_editor_button->hide();
EditorNode::get_singleton()->hide_bottom_panel();
+ is_visible = false;
}
}
+bool TilesEditorPlugin::is_tile_map_selected() {
+ TypedArray<Node> selection = get_editor_interface()->get_selection()->get_selected_nodes();
+ if (selection.size() == 1 && Object::cast_to<TileMap>(selection[0])) {
+ return true;
+ }
+
+ return false;
+}
+
void TilesEditorPlugin::queue_pattern_preview(Ref<TileSet> p_tile_set, Ref<TileMapPattern> p_pattern, Callable p_callback) {
ERR_FAIL_COND(!p_tile_set.is_valid());
ERR_FAIL_COND(!p_pattern.is_valid());
@@ -362,19 +370,24 @@ void TilesEditorPlugin::edit(Object *p_object) {
} else if (p_object->is_class("TileSet")) {
tile_set = Ref<TileSet>(p_object);
if (tile_map) {
- if (tile_map->get_tileset() != tile_set || !tile_map->is_inside_tree()) {
+ if (tile_map->get_tileset() != tile_set || !tile_map->is_inside_tree() || !is_tile_map_selected()) {
tile_map = nullptr;
tile_map_id = ObjectID();
}
}
is_editing_tile_set = true;
- EditorNode::get_singleton()->make_bottom_panel_item_visible(tileset_editor);
}
}
// Update the editors.
_update_editors();
+ // If the tileset is being edited, the visibility function must be called
+ // here after _update_editors has been called.
+ if (is_editing_tile_set) {
+ EditorNode::get_singleton()->make_bottom_panel_item_visible(tileset_editor);
+ }
+
// Add change listener.
if (tile_map) {
tile_map->connect("changed", callable_mp(this, &TilesEditorPlugin::_tile_map_changed));
diff --git a/editor/plugins/tiles/tiles_editor_plugin.h b/editor/plugins/tiles/tiles_editor_plugin.h
index 5b91584aa3..50073e59c6 100644
--- a/editor/plugins/tiles/tiles_editor_plugin.h
+++ b/editor/plugins/tiles/tiles_editor_plugin.h
@@ -110,6 +110,8 @@ public:
virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) override { return tilemap_editor->forward_canvas_gui_input(p_event); }
virtual void forward_canvas_draw_over_viewport(Control *p_overlay) override { tilemap_editor->forward_canvas_draw_over_viewport(p_overlay); }
+ bool is_tile_map_selected();
+
// Pattern preview API.
void queue_pattern_preview(Ref<TileSet> p_tile_set, Ref<TileMapPattern> p_pattern, Callable p_callback);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 4cf397ffd0..59b5795ae3 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -40,6 +40,7 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
+#include "editor/filesystem_dock.h"
#include "editor/inspector_dock.h"
#include "editor/plugins/curve_editor_plugin.h"
#include "editor/plugins/shader_editor_plugin.h"
@@ -129,30 +130,32 @@ void VisualShaderGraphPlugin::set_connections(const List<VisualShader::Connectio
void VisualShaderGraphPlugin::show_port_preview(VisualShader::Type p_type, int p_node_id, int p_port_id) {
if (visual_shader->get_shader_type() == p_type && links.has(p_node_id) && links[p_node_id].output_ports.has(p_port_id)) {
- for (const KeyValue<int, Port> &E : links[p_node_id].output_ports) {
+ Link &link = links[p_node_id];
+
+ for (const KeyValue<int, Port> &E : link.output_ports) {
if (E.value.preview_button != nullptr) {
E.value.preview_button->set_pressed(false);
}
}
+ bool is_dirty = link.preview_pos < 0;
- if (links[p_node_id].preview_visible && !is_dirty() && links[p_node_id].preview_box != nullptr) {
- links[p_node_id].graph_node->remove_child(links[p_node_id].preview_box);
- memdelete(links[p_node_id].preview_box);
- links[p_node_id].graph_node->reset_size();
- links[p_node_id].preview_visible = false;
+ if (!is_dirty && link.preview_visible && link.preview_box != nullptr) {
+ link.graph_node->remove_child(link.preview_box);
+ memdelete(link.preview_box);
+ link.preview_box = nullptr;
+ link.graph_node->reset_size();
+ link.preview_visible = false;
}
- if (p_port_id != -1 && links[p_node_id].output_ports[p_port_id].preview_button != nullptr) {
- if (is_dirty()) {
- links[p_node_id].preview_pos = links[p_node_id].graph_node->get_child_count();
+ if (p_port_id != -1 && link.output_ports[p_port_id].preview_button != nullptr) {
+ if (is_dirty) {
+ link.preview_pos = link.graph_node->get_child_count();
}
VBoxContainer *vbox = memnew(VBoxContainer);
- links[p_node_id].graph_node->add_child(vbox);
- if (links[p_node_id].preview_pos != -1) {
- links[p_node_id].graph_node->move_child(vbox, links[p_node_id].preview_pos);
- }
- links[p_node_id].graph_node->set_slot_draw_stylebox(vbox->get_index(), false);
+ link.graph_node->add_child(vbox);
+ link.graph_node->move_child(vbox, link.preview_pos);
+ link.graph_node->set_slot_draw_stylebox(vbox->get_index(), false);
Control *offset = memnew(Control);
offset->set_custom_minimum_size(Size2(0, 5 * EDSCALE));
@@ -162,9 +165,9 @@ void VisualShaderGraphPlugin::show_port_preview(VisualShader::Type p_type, int p
port_preview->setup(visual_shader, visual_shader->get_shader_type(), p_node_id, p_port_id);
port_preview->set_h_size_flags(Control::SIZE_SHRINK_CENTER);
vbox->add_child(port_preview);
- links[p_node_id].preview_visible = true;
- links[p_node_id].preview_box = vbox;
- links[p_node_id].output_ports[p_port_id].preview_button->set_pressed(true);
+ link.preview_visible = true;
+ link.preview_box = vbox;
+ link.output_ports[p_port_id].preview_button->set_pressed(true);
}
}
}
@@ -177,8 +180,8 @@ void VisualShaderGraphPlugin::update_node(VisualShader::Type p_type, int p_node_
if (p_type != visual_shader->get_shader_type() || !links.has(p_node_id)) {
return;
}
- remove_node(p_type, p_node_id);
- add_node(p_type, p_node_id);
+ remove_node(p_type, p_node_id, true);
+ add_node(p_type, p_node_id, true);
}
void VisualShaderGraphPlugin::set_input_port_default_value(VisualShader::Type p_type, int p_node_id, int p_port_id, Variant p_value) {
@@ -305,8 +308,8 @@ void VisualShaderGraphPlugin::update_parameter_refs() {
for (KeyValue<int, Link> &E : links) {
VisualShaderNodeParameterRef *ref = Object::cast_to<VisualShaderNodeParameterRef>(E.value.visual_node);
if (ref) {
- remove_node(E.value.type, E.key);
- add_node(E.value.type, E.key);
+ remove_node(E.value.type, E.key, true);
+ add_node(E.value.type, E.key, true);
}
}
}
@@ -329,14 +332,6 @@ void VisualShaderGraphPlugin::clear_links() {
links.clear();
}
-bool VisualShaderGraphPlugin::is_dirty() const {
- return dirty;
-}
-
-void VisualShaderGraphPlugin::make_dirty(bool p_enabled) {
- dirty = p_enabled;
-}
-
void VisualShaderGraphPlugin::register_link(VisualShader::Type p_type, int p_id, VisualShaderNode *p_visual_node, GraphNode *p_graph_node) {
links.insert(p_id, { p_type, p_visual_node, p_graph_node, p_visual_node->get_output_port_for_preview() != -1, -1, HashMap<int, InputPort>(), HashMap<int, Port>(), nullptr, nullptr, nullptr, { nullptr, nullptr, nullptr } });
}
@@ -356,7 +351,7 @@ void VisualShaderGraphPlugin::update_theme() {
vector_expanded_color[3] = editor->get_theme_color(SNAME("axis_w_color"), SNAME("Editor")); // alpha
}
-void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
+void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool p_just_update) {
if (!visual_shader.is_valid() || p_type != visual_shader->get_shader_type()) {
return;
}
@@ -424,7 +419,18 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
graph->add_child(node);
node->set_theme(vstheme);
editor->_update_created_node(node);
- register_link(p_type, p_id, vsnode.ptr(), node);
+
+ if (p_just_update) {
+ Link &link = links[p_id];
+
+ link.graph_node = node;
+ link.preview_box = nullptr;
+ link.preview_pos = -1;
+ link.output_ports.clear();
+ link.input_ports.clear();
+ } else {
+ register_link(p_type, p_id, vsnode.ptr(), node);
+ }
if (is_resizable) {
size = resizable_node->get_size();
@@ -1038,11 +1044,13 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
}
}
-void VisualShaderGraphPlugin::remove_node(VisualShader::Type p_type, int p_id) {
+void VisualShaderGraphPlugin::remove_node(VisualShader::Type p_type, int p_id, bool p_just_update) {
if (visual_shader->get_shader_type() == p_type && links.has(p_id)) {
links[p_id].graph_node->get_parent()->remove_child(links[p_id].graph_node);
memdelete(links[p_id].graph_node);
- links.erase(p_id);
+ if (!p_just_update) {
+ links.erase(p_id);
+ }
}
}
@@ -1264,18 +1272,55 @@ Dictionary VisualShaderEditor::get_custom_node_data(Ref<VisualShaderNodeCustom>
return dict;
}
-void VisualShaderEditor::update_custom_type(const Ref<Resource> &p_resource) {
- Ref<Script> scr = Ref<Script>(p_resource.ptr());
- if (scr.is_null() || scr->get_instance_base_type() != "VisualShaderNodeCustom") {
+void VisualShaderEditor::_get_current_mode_limits(int &r_begin_type, int &r_end_type) const {
+ switch (visual_shader->get_mode()) {
+ case Shader::MODE_CANVAS_ITEM:
+ case Shader::MODE_SPATIAL: {
+ r_begin_type = 0;
+ r_end_type = 3;
+ } break;
+ case Shader::MODE_PARTICLES: {
+ r_begin_type = 3;
+ r_end_type = 5 + r_begin_type;
+ } break;
+ case Shader::MODE_SKY: {
+ r_begin_type = 8;
+ r_end_type = 1 + r_begin_type;
+ } break;
+ case Shader::MODE_FOG: {
+ r_begin_type = 9;
+ r_end_type = 1 + r_begin_type;
+ } break;
+ default: {
+ } break;
+ }
+}
+
+void VisualShaderEditor::_script_created(const Ref<Script> &p_script) {
+ if (p_script.is_null() || p_script->get_instance_base_type() != "VisualShaderNodeCustom") {
+ return;
+ }
+ Ref<VisualShaderNodeCustom> ref;
+ ref.instantiate();
+ ref->set_script(p_script);
+
+ Dictionary dict = get_custom_node_data(ref);
+ add_custom_type(dict["name"], dict["script"], dict["description"], dict["return_icon_type"], dict["category"], dict["highend"]);
+
+ _update_options_menu();
+}
+
+void VisualShaderEditor::_update_custom_script(const Ref<Script> &p_script) {
+ if (p_script.is_null() || p_script->get_instance_base_type() != "VisualShaderNodeCustom") {
return;
}
Ref<VisualShaderNodeCustom> ref;
ref.instantiate();
- ref->set_script(scr);
+ ref->set_script(p_script);
if (!ref->is_available(visual_shader->get_mode(), visual_shader->get_shader_type())) {
for (int i = 0; i < add_options.size(); i++) {
- if (add_options[i].is_custom && add_options[i].script == scr) {
+ if (add_options[i].is_custom && add_options[i].script == p_script) {
add_options.remove_at(i);
_update_options_menu();
// TODO: Make indication for the existed custom nodes with that script on graph to be disabled.
@@ -1289,8 +1334,8 @@ void VisualShaderEditor::update_custom_type(const Ref<Resource> &p_resource) {
bool found_type = false;
bool need_rebuild = false;
- for (int i = 0; i < add_options.size(); i++) {
- if (add_options[i].is_custom && add_options[i].script == scr) {
+ for (int i = custom_node_option_idx; i < add_options.size(); i++) {
+ if (add_options[i].script == p_script) {
found_type = true;
add_options.write[i].name = dict["name"];
@@ -1299,31 +1344,11 @@ void VisualShaderEditor::update_custom_type(const Ref<Resource> &p_resource) {
add_options.write[i].category = dict["category"];
add_options.write[i].highend = dict["highend"];
- int max_type = 0;
- int type_offset = 0;
- switch (visual_shader->get_mode()) {
- case Shader::MODE_CANVAS_ITEM:
- case Shader::MODE_SPATIAL: {
- max_type = 3;
- } break;
- case Shader::MODE_PARTICLES: {
- max_type = 5;
- type_offset = 3;
- } break;
- case Shader::MODE_SKY: {
- max_type = 1;
- type_offset = 8;
- } break;
- case Shader::MODE_FOG: {
- max_type = 1;
- type_offset = 9;
- } break;
- default: {
- } break;
- }
- max_type = type_offset + max_type;
+ int begin_type = 0;
+ int end_type = 0;
+ _get_current_mode_limits(begin_type, end_type);
- for (int t = type_offset; t < max_type; t++) {
+ for (int t = begin_type; t < end_type; t++) {
VisualShader::Type type = (VisualShader::Type)t;
Vector<int> nodes = visual_shader->get_node_list(type);
@@ -1332,28 +1357,27 @@ void VisualShaderEditor::update_custom_type(const Ref<Resource> &p_resource) {
List<VisualShader::Connection> custom_node_input_connections;
List<VisualShader::Connection> custom_node_output_connections;
+
for (const VisualShader::Connection &E : node_connections) {
int from = E.from_node;
- int from_idx = E.from_port;
+ int from_port = E.from_port;
int to = E.to_node;
- int to_idx = E.to_port;
+ int to_port = E.to_port;
- if (graph_plugin->get_node_script(from) == scr) {
- custom_node_output_connections.push_back({ from, from_idx, to, to_idx });
- } else if (graph_plugin->get_node_script(to) == scr) {
- custom_node_input_connections.push_back({ from, from_idx, to, to_idx });
+ if (graph_plugin->get_node_script(from) == p_script) {
+ custom_node_output_connections.push_back({ from, from_port, to, to_port });
+ } else if (graph_plugin->get_node_script(to) == p_script) {
+ custom_node_input_connections.push_back({ from, from_port, to, to_port });
}
}
- for (int j = 0; j < nodes.size(); j++) {
- int node_id = nodes[j];
-
+ for (int node_id : nodes) {
Ref<VisualShaderNode> vsnode = visual_shader->get_node(type, node_id);
if (vsnode.is_null()) {
continue;
}
Ref<VisualShaderNodeCustom> custom_node = Ref<VisualShaderNodeCustom>(vsnode.ptr());
- if (custom_node.is_null() || custom_node->get_script() != scr) {
+ if (custom_node.is_null() || custom_node->get_script() != p_script) {
continue;
}
need_rebuild = true;
@@ -1422,6 +1446,89 @@ void VisualShaderEditor::update_custom_type(const Ref<Resource> &p_resource) {
}
}
+void VisualShaderEditor::_resource_saved(const Ref<Resource> &p_resource) {
+ _update_custom_script(Ref<Script>(p_resource.ptr()));
+}
+
+void VisualShaderEditor::_resources_removed() {
+ bool has_any_instance = false;
+
+ for (const Ref<Script> &scr : custom_scripts_to_delete) {
+ for (int i = custom_node_option_idx; i < add_options.size(); i++) {
+ if (add_options[i].script == scr) {
+ add_options.remove_at(i);
+
+ // Removes all node instances using that script from the graph.
+ {
+ int begin_type = 0;
+ int end_type = 0;
+ _get_current_mode_limits(begin_type, end_type);
+
+ for (int t = begin_type; t < end_type; t++) {
+ VisualShader::Type type = (VisualShader::Type)t;
+
+ List<VisualShader::Connection> node_connections;
+ visual_shader->get_node_connections(type, &node_connections);
+
+ for (const VisualShader::Connection &E : node_connections) {
+ int from = E.from_node;
+ int from_port = E.from_port;
+ int to = E.to_node;
+ int to_port = E.to_port;
+
+ if (graph_plugin->get_node_script(from) == scr || graph_plugin->get_node_script(to) == scr) {
+ visual_shader->disconnect_nodes(type, from, from_port, to, to_port);
+ graph_plugin->disconnect_nodes(type, from, from_port, to, to_port);
+ }
+ }
+
+ Vector<int> nodes = visual_shader->get_node_list(type);
+ for (int node_id : nodes) {
+ Ref<VisualShaderNode> vsnode = visual_shader->get_node(type, node_id);
+ if (vsnode.is_null()) {
+ continue;
+ }
+ Ref<VisualShaderNodeCustom> custom_node = Ref<VisualShaderNodeCustom>(vsnode.ptr());
+ if (custom_node.is_null() || custom_node->get_script() != scr) {
+ continue;
+ }
+ visual_shader->remove_node(type, node_id);
+ graph_plugin->remove_node(type, node_id, false);
+
+ has_any_instance = true;
+ }
+ }
+ }
+
+ break;
+ }
+ }
+ }
+ if (has_any_instance) {
+ EditorUndoRedoManager::get_singleton()->clear_history(); // Need to clear undo history, otherwise it may lead to hard-detected errors and crashes (since the script was removed).
+ ResourceSaver::save(visual_shader, visual_shader->get_path());
+ }
+ _update_options_menu();
+
+ custom_scripts_to_delete.clear();
+ pending_custom_scripts_to_delete = false;
+}
+
+void VisualShaderEditor::_resource_removed(const Ref<Resource> &p_resource) {
+ Ref<Script> scr = Ref<Script>(p_resource.ptr());
+ if (scr.is_null() || scr->get_instance_base_type() != "VisualShaderNodeCustom") {
+ return;
+ }
+
+ custom_scripts_to_delete.push_back(scr);
+
+ if (!pending_custom_scripts_to_delete) {
+ pending_custom_scripts_to_delete = true;
+
+ call_deferred("_resources_removed");
+ }
+}
+
void VisualShaderEditor::_update_options_menu_deferred() {
_update_options_menu();
@@ -1854,7 +1961,7 @@ void VisualShaderEditor::_update_parameters(bool p_update_refs) {
}
void VisualShaderEditor::_update_parameter_refs(HashSet<String> &p_deleted_names) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (int i = 0; i < VisualShader::TYPE_MAX; i++) {
VisualShader::Type type = VisualShader::Type(i);
@@ -1909,15 +2016,12 @@ void VisualShaderEditor::_update_graph() {
_update_varyings();
graph_plugin->clear_links();
- graph_plugin->make_dirty(true);
graph_plugin->update_theme();
for (int n_i = 0; n_i < nodes.size(); n_i++) {
- graph_plugin->add_node(type, nodes[n_i]);
+ graph_plugin->add_node(type, nodes[n_i], false);
}
- graph_plugin->make_dirty(false);
-
for (const VisualShader::Connection &E : node_connections) {
int from = E.from_node;
int from_idx = E.from_port;
@@ -1954,7 +2058,7 @@ void VisualShaderEditor::_add_input_port(int p_node, int p_port, int p_port_type
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Input Port"));
undo_redo->add_do_method(node.ptr(), "add_input_port", p_port, p_port_type, p_name);
undo_redo->add_undo_method(node.ptr(), "remove_input_port", p_port);
@@ -1970,7 +2074,7 @@ void VisualShaderEditor::_add_output_port(int p_node, int p_port, int p_port_typ
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Output Port"));
undo_redo->add_do_method(node.ptr(), "add_output_port", p_port, p_port_type, p_name);
undo_redo->add_undo_method(node.ptr(), "remove_output_port", p_port);
@@ -1986,7 +2090,7 @@ void VisualShaderEditor::_change_input_port_type(int p_type, int p_node, int p_p
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Input Port Type"));
undo_redo->add_do_method(node.ptr(), "set_input_port_type", p_port, p_type);
undo_redo->add_undo_method(node.ptr(), "set_input_port_type", p_port, node->get_input_port_type(p_port));
@@ -2002,7 +2106,7 @@ void VisualShaderEditor::_change_output_port_type(int p_type, int p_node, int p_
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Output Port Type"));
undo_redo->add_do_method(node.ptr(), "set_output_port_type", p_port, p_type);
undo_redo->add_undo_method(node.ptr(), "set_output_port_type", p_port, node->get_output_port_type(p_port));
@@ -2031,7 +2135,7 @@ void VisualShaderEditor::_change_input_port_name(const String &p_text, Object *p
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Input Port Name"));
undo_redo->add_do_method(node.ptr(), "set_input_port_name", p_port_id, validated_name);
undo_redo->add_undo_method(node.ptr(), "set_input_port_name", p_port_id, node->get_input_port_name(p_port_id));
@@ -2058,7 +2162,7 @@ void VisualShaderEditor::_change_output_port_name(const String &p_text, Object *
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Output Port Name"));
undo_redo->add_do_method(node.ptr(), "set_output_port_name", p_port_id, validated_name);
undo_redo->add_undo_method(node.ptr(), "set_output_port_name", p_port_id, prev_name);
@@ -2071,7 +2175,7 @@ void VisualShaderEditor::_expand_output_port(int p_node, int p_port, bool p_expa
Ref<VisualShaderNode> node = visual_shader->get_node(type, p_node);
ERR_FAIL_COND(!node.is_valid());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (p_expand) {
undo_redo->create_action(TTR("Expand Output Port"));
} else {
@@ -2169,7 +2273,7 @@ void VisualShaderEditor::_remove_input_port(int p_node, int p_port) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Input Port"));
List<VisualShader::Connection> conns;
@@ -2219,7 +2323,7 @@ void VisualShaderEditor::_remove_output_port(int p_node, int p_port) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Output Port"));
List<VisualShader::Connection> conns;
@@ -2286,7 +2390,7 @@ void VisualShaderEditor::_expression_focus_out(Object *code_edit, int p_node) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set VisualShader Expression"));
undo_redo->add_do_method(node.ptr(), "set_expression", expression_box->get_text());
undo_redo->add_undo_method(node.ptr(), "set_expression", node->get_expression());
@@ -2350,7 +2454,7 @@ void VisualShaderEditor::_node_resized(const Vector2 &p_new_size, int p_type, in
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Resize VisualShader Node"), UndoRedo::MERGE_ENDS);
undo_redo->add_do_method(this, "_set_node_size", p_type, p_node, p_new_size);
undo_redo->add_undo_method(this, "_set_node_size", p_type, p_node, node->get_size());
@@ -2367,7 +2471,7 @@ void VisualShaderEditor::_preview_select_port(int p_node, int p_port) {
if (node->get_output_port_for_preview() == p_port) {
p_port = -1; //toggle it
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(p_port == -1 ? TTR("Hide Port Preview") : TTR("Show Port Preview"));
undo_redo->add_do_method(node.ptr(), "set_output_port_for_preview", p_port);
undo_redo->add_undo_method(node.ptr(), "set_output_port_for_preview", prev_port);
@@ -2413,7 +2517,7 @@ void VisualShaderEditor::_comment_title_popup_hide() {
if (node->get_title() == comment_title_change_edit->get_text()) {
return; // nothing changed - ignored
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Comment Node Title"));
undo_redo->add_do_method(node.ptr(), "set_title", comment_title_change_edit->get_text());
undo_redo->add_undo_method(node.ptr(), "set_title", node->get_title());
@@ -2456,7 +2560,7 @@ void VisualShaderEditor::_comment_desc_popup_hide() {
if (node->get_description() == comment_desc_change_edit->get_text()) {
return; // nothing changed - ignored
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Comment Node Description"));
undo_redo->add_do_method(node.ptr(), "set_description", comment_desc_change_edit->get_text());
undo_redo->add_undo_method(node.ptr(), "set_description", node->get_title());
@@ -2477,7 +2581,7 @@ void VisualShaderEditor::_parameter_line_edit_changed(const String &p_text, int
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Parameter Name"));
undo_redo->add_do_method(node.ptr(), "set_parameter_name", validated_name);
undo_redo->add_undo_method(node.ptr(), "set_parameter_name", node->get_parameter_name());
@@ -2513,7 +2617,7 @@ void VisualShaderEditor::_port_edited(const StringName &p_property, const Varian
Ref<VisualShaderNode> vsn = visual_shader->get_node(type, editing_node);
ERR_FAIL_COND(!vsn.is_valid());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Input Default Port"));
Ref<VisualShaderNodeCustom> custom = Object::cast_to<VisualShaderNodeCustom>(vsn.ptr());
@@ -2959,7 +3063,7 @@ void VisualShaderEditor::_add_node(int p_idx, const Vector<Variant> &p_ops, Stri
int id_to_use = visual_shader->get_valid_node_id(type);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (p_resource_path.is_empty()) {
undo_redo->create_action(TTR("Add Node to Visual Shader"));
} else {
@@ -2967,8 +3071,8 @@ void VisualShaderEditor::_add_node(int p_idx, const Vector<Variant> &p_ops, Stri
}
undo_redo->add_do_method(visual_shader.ptr(), "add_node", type, vsnode, position, id_to_use);
undo_redo->add_undo_method(visual_shader.ptr(), "remove_node", type, id_to_use);
- undo_redo->add_do_method(graph_plugin.ptr(), "add_node", type, id_to_use);
- undo_redo->add_undo_method(graph_plugin.ptr(), "remove_node", type, id_to_use);
+ undo_redo->add_do_method(graph_plugin.ptr(), "add_node", type, id_to_use, false);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "remove_node", type, id_to_use, false);
VisualShaderNodeExpression *expr = Object::cast_to<VisualShaderNodeExpression>(vsnode.ptr());
if (expr) {
@@ -3126,7 +3230,7 @@ void VisualShaderEditor::_add_node(int p_idx, const Vector<Variant> &p_ops, Stri
}
void VisualShaderEditor::_add_varying(const String &p_name, VisualShader::VaryingMode p_mode, VisualShader::VaryingType p_type) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Add Varying to Visual Shader: %s"), p_name));
undo_redo->add_do_method(visual_shader.ptr(), "add_varying", p_name, p_mode, p_type);
@@ -3161,7 +3265,7 @@ void VisualShaderEditor::_add_varying(const String &p_name, VisualShader::Varyin
}
void VisualShaderEditor::_remove_varying(const String &p_name) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Remove Varying from Visual Shader: %s"), p_name));
VisualShader::VaryingMode var_mode = visual_shader->get_varying_mode(p_name);
@@ -3249,7 +3353,7 @@ void VisualShaderEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_t
void VisualShaderEditor::_nodes_dragged() {
drag_dirty = false;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Node(s) Moved"));
for (const DragOp &E : drag_buffer) {
@@ -3273,7 +3377,7 @@ void VisualShaderEditor::_connection_request(const String &p_from, int p_from_in
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Nodes Connected"));
List<VisualShader::Connection> conns;
@@ -3305,7 +3409,7 @@ void VisualShaderEditor::_disconnection_request(const String &p_from, int p_from
int from = p_from.to_int();
int to = p_to.to_int();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Nodes Disconnected"));
undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from, p_from_index, to, p_to_index);
undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, from, p_from_index, to, p_to_index);
@@ -3345,7 +3449,7 @@ void VisualShaderEditor::_delete_nodes(int p_type, const List<int> &p_nodes) {
List<VisualShader::Connection> conns;
visual_shader->get_node_connections(type, &conns);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (const int &F : p_nodes) {
for (const VisualShader::Connection &E : conns) {
if (E.from_node == F || E.to_node == F) {
@@ -3361,7 +3465,7 @@ void VisualShaderEditor::_delete_nodes(int p_type, const List<int> &p_nodes) {
undo_redo->add_do_method(visual_shader.ptr(), "remove_node", type, F);
undo_redo->add_undo_method(visual_shader.ptr(), "add_node", type, node, visual_shader->get_node_position(type, F), F);
- undo_redo->add_undo_method(graph_plugin.ptr(), "add_node", type, F);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "add_node", type, F, false);
VisualShaderNodeParameter *parameter = Object::cast_to<VisualShaderNodeParameter>(node.ptr());
if (parameter) {
@@ -3391,7 +3495,7 @@ void VisualShaderEditor::_delete_nodes(int p_type, const List<int> &p_nodes) {
// delete nodes from the graph
for (const int &F : p_nodes) {
- undo_redo->add_do_method(graph_plugin.ptr(), "remove_node", type, F);
+ undo_redo->add_do_method(graph_plugin.ptr(), "remove_node", type, F, false);
}
// update parameter refs if any parameter has been deleted
@@ -3404,7 +3508,7 @@ void VisualShaderEditor::_delete_nodes(int p_type, const List<int> &p_nodes) {
}
void VisualShaderEditor::_replace_node(VisualShader::Type p_type_id, int p_node_id, const StringName &p_from, const StringName &p_to) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(visual_shader.ptr(), "replace_node", p_type_id, p_node_id, p_to);
undo_redo->add_undo_method(visual_shader.ptr(), "replace_node", p_type_id, p_node_id, p_from);
}
@@ -3439,7 +3543,7 @@ void VisualShaderEditor::_update_parameter(VisualShader::Type p_type_id, int p_n
void VisualShaderEditor::_convert_constants_to_parameters(bool p_vice_versa) {
VisualShader::Type type_id = get_current_shader_type();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (!p_vice_versa) {
undo_redo->create_action(TTR("Convert Constant Node(s) To Parameter(s)"));
} else {
@@ -3638,7 +3742,7 @@ void VisualShaderEditor::_delete_node_request(int p_type, int p_node) {
List<int> to_erase;
to_erase.push_back(p_node);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete VisualShader Node"));
_delete_nodes(p_type, to_erase);
undo_redo->commit_action();
@@ -3667,7 +3771,7 @@ void VisualShaderEditor::_delete_nodes_request(const TypedArray<StringName> &p_n
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete VisualShader Node(s)"));
_delete_nodes(get_current_shader_type(), to_erase);
undo_redo->commit_action();
@@ -4080,7 +4184,7 @@ void VisualShaderEditor::_dup_copy_nodes(int p_type, List<CopyItem> &r_items, Li
}
void VisualShaderEditor::_dup_paste_nodes(int p_type, List<CopyItem> &r_items, const List<VisualShader::Connection> &p_connections, const Vector2 &p_offset, bool p_duplicate) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (p_duplicate) {
undo_redo->create_action(TTR("Duplicate VisualShader Node(s)"));
} else {
@@ -4131,7 +4235,7 @@ void VisualShaderEditor::_dup_paste_nodes(int p_type, List<CopyItem> &r_items, c
}
undo_redo->add_do_method(visual_shader.ptr(), "add_node", type, node, item.position + p_offset, id_from);
- undo_redo->add_do_method(graph_plugin.ptr(), "add_node", type, id_from);
+ undo_redo->add_do_method(graph_plugin.ptr(), "add_node", type, id_from, false);
added_set.insert(id_from);
id_from++;
@@ -4153,7 +4257,7 @@ void VisualShaderEditor::_dup_paste_nodes(int p_type, List<CopyItem> &r_items, c
continue;
}
undo_redo->add_undo_method(visual_shader.ptr(), "remove_node", type, id_from);
- undo_redo->add_undo_method(graph_plugin.ptr(), "remove_node", type, id_from);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "remove_node", type, id_from, false);
id_from++;
}
@@ -4199,7 +4303,7 @@ void VisualShaderEditor::_copy_nodes(bool p_cut) {
_dup_copy_nodes(get_current_shader_type(), copy_items_buffer, copy_connections_buffer);
if (p_cut) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Cut VisualShader Node(s)"));
List<int> ids;
@@ -4286,7 +4390,7 @@ void VisualShaderEditor::_input_select_item(Ref<VisualShaderNodeInput> p_input,
bool type_changed = next_input_type != prev_input_type;
- Ref<EditorUndoRedoManager> &undo_redo_man = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo_man = EditorUndoRedoManager::get_singleton();
undo_redo_man->create_action(TTR("Visual Shader Input Type Changed"));
undo_redo_man->add_do_method(p_input.ptr(), "set_input_name", p_name);
@@ -4355,7 +4459,7 @@ void VisualShaderEditor::_parameter_ref_select_item(Ref<VisualShaderNodeParamete
bool type_changed = p_parameter_ref->get_parameter_type_by_name(p_name) != p_parameter_ref->get_parameter_type_by_name(prev_name);
- Ref<EditorUndoRedoManager> &undo_redo_man = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo_man = EditorUndoRedoManager::get_singleton();
undo_redo_man->create_action(TTR("ParameterRef Name Changed"));
undo_redo_man->add_do_method(p_parameter_ref.ptr(), "set_parameter_name", p_name);
@@ -4399,7 +4503,7 @@ void VisualShaderEditor::_varying_select_item(Ref<VisualShaderNodeVarying> p_var
bool is_getter = Ref<VisualShaderNodeVaryingGetter>(p_varying.ptr()).is_valid();
- Ref<EditorUndoRedoManager> &undo_redo_man = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo_man = EditorUndoRedoManager::get_singleton();
undo_redo_man->create_action(TTR("Varying Name Changed"));
undo_redo_man->add_do_method(p_varying.ptr(), "set_varying_name", p_name);
@@ -4470,7 +4574,7 @@ void VisualShaderEditor::_float_constant_selected(int p_which) {
return; // same
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Set Constant: %s"), float_constant_defs[p_which].name));
undo_redo->add_do_method(node.ptr(), "set_constant", float_constant_defs[p_which].value);
undo_redo->add_undo_method(node.ptr(), "set_constant", node->get_constant());
@@ -4734,7 +4838,7 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
saved_node_pos_dirty = true;
_add_node(idx, add_options[idx].ops);
} else if (d.has("files")) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Node(s) to Visual Shader"));
if (d["files"].get_type() == Variant::PACKED_STRING_ARRAY) {
@@ -4897,17 +5001,16 @@ void VisualShaderEditor::_bind_methods() {
ClassDB::bind_method("_expand_output_port", &VisualShaderEditor::_expand_output_port);
ClassDB::bind_method("_update_options_menu_deferred", &VisualShaderEditor::_update_options_menu_deferred);
ClassDB::bind_method("_rebuild_shader_deferred", &VisualShaderEditor::_rebuild_shader_deferred);
-
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &VisualShaderEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &VisualShaderEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &VisualShaderEditor::drop_data_fw);
+ ClassDB::bind_method("_resources_removed", &VisualShaderEditor::_resources_removed);
ClassDB::bind_method("_is_available", &VisualShaderEditor::_is_available);
}
VisualShaderEditor::VisualShaderEditor() {
ShaderLanguage::get_keyword_list(&keyword_list);
- EditorNode::get_singleton()->connect("resource_saved", callable_mp(this, &VisualShaderEditor::update_custom_type));
+ EditorNode::get_singleton()->connect("resource_saved", callable_mp(this, &VisualShaderEditor::_resource_saved));
+ FileSystemDock::get_singleton()->get_script_create_dialog()->connect("script_created", callable_mp(this, &VisualShaderEditor::_script_created));
+ FileSystemDock::get_singleton()->connect("resource_removed", callable_mp(this, &VisualShaderEditor::_resource_removed));
graph = memnew(GraphEdit);
graph->get_zoom_hbox()->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -4915,7 +5018,7 @@ VisualShaderEditor::VisualShaderEditor() {
graph->set_h_size_flags(SIZE_EXPAND_FILL);
graph->set_show_zoom_label(true);
add_child(graph);
- graph->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(graph, VisualShaderEditor);
float graph_minimap_opacity = EDITOR_GET("editors/visual_editors/minimap_opacity");
graph->set_minimap_opacity(graph_minimap_opacity);
float graph_lines_curvature = EDITOR_GET("editors/visual_editors/lines_curvature");
@@ -5146,7 +5249,7 @@ VisualShaderEditor::VisualShaderEditor() {
members = memnew(Tree);
members_vb->add_child(members);
- members->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(members, VisualShaderEditor);
members->set_h_size_flags(SIZE_EXPAND_FILL);
members->set_v_size_flags(SIZE_EXPAND_FILL);
members->set_hide_root(true);
@@ -5186,7 +5289,7 @@ VisualShaderEditor::VisualShaderEditor() {
members_dialog->set_ok_button_text(TTR("Create"));
members_dialog->get_ok_button()->connect("pressed", callable_mp(this, &VisualShaderEditor::_member_create));
members_dialog->get_ok_button()->set_disabled(true);
- members_dialog->connect("cancelled", callable_mp(this, &VisualShaderEditor::_member_cancel));
+ members_dialog->connect("canceled", callable_mp(this, &VisualShaderEditor::_member_cancel));
add_child(members_dialog);
// add varyings dialog
@@ -5433,6 +5536,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("ViewIndex", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "view_index", "VIEW_INDEX"), { "view_index" }, VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("ViewMonoLeft", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "view_mono_left", "VIEW_MONO_LEFT"), { "view_mono_left" }, VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("ViewRight", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "view_right", "VIEW_RIGHT"), { "view_right" }, VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
+ add_options.push_back(AddOption("EyeOffset", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "eye_offset", "EYE_OFFSET"), { "eye_offset" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("NodePositionWorld", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "node_position_world", "NODE_POSITION_WORLD"), { "node_position_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("CameraPositionWorld", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_position_world", "CAMERA_POSITION_WORLD"), { "camera_position_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("CameraDirectionWorld", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_direction_world", "CAMERA_DIRECTION_WORLD"), { "camera_direction_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
@@ -5441,11 +5545,9 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Binormal", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "binormal", "BINORMAL"), { "binormal" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("Color", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "color", "COLOR"), { "color" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
- add_options.push_back(AddOption("DepthTexture", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "depth_texture", "DEPTH_TEXTURE"), { "depth_texture" }, VisualShaderNode::PORT_TYPE_SAMPLER, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("FragCoord", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "fragcoord", "FRAGCOORD"), { "fragcoord" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("FrontFacing", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "front_facing", "FRONT_FACING"), { "front_facing" }, VisualShaderNode::PORT_TYPE_BOOLEAN, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("PointCoord", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "point_coord", "POINT_COORD"), { "point_coord" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
- add_options.push_back(AddOption("ScreenTexture", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_texture", "SCREEN_TEXTURE"), { "screen_texture" }, VisualShaderNode::PORT_TYPE_SAMPLER, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("ScreenUV", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_uv", "SCREEN_UV"), { "screen_uv" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("Tangent", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "tangent", "TANGENT"), { "tangent" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("Vertex", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "vertex", "VERTEX"), { "vertex" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
@@ -5453,6 +5555,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("ViewIndex", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "view_index", "VIEW_INDEX"), { "view_index" }, VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("ViewMonoLeft", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "view_mono_left", "VIEW_MONO_LEFT"), { "view_mono_left" }, VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("ViewRight", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "view_right", "VIEW_RIGHT"), { "view_right" }, VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
+ add_options.push_back(AddOption("EyeOffset", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "eye_offset", "EYE_OFFSET"), { "eye_offset" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("NodePositionWorld", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "node_position_world", "NODE_POSITION_WORLD"), { "node_position_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("CameraPositionWorld", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_position_world", "CAMERA_POSITION_WORLD"), { "camera_position_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("CameraDirectionWorld", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_direction_world", "CAMERA_DIRECTION_WORLD"), { "camera_direction_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
@@ -5488,7 +5591,6 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("NormalTexture", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "normal_texture", "NORMAL_TEXTURE"), { "normal_texture" }, VisualShaderNode::PORT_TYPE_SAMPLER, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("PointCoord", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "point_coord", "POINT_COORD"), { "point_coord" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("ScreenPixelSize", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_pixel_size", "SCREEN_PIXEL_SIZE"), { "screen_pixel_size" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
- add_options.push_back(AddOption("ScreenTexture", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_texture", "SCREEN_TEXTURE"), { "screen_texture" }, VisualShaderNode::PORT_TYPE_SAMPLER, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("ScreenUV", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "screen_uv", "SCREEN_UV"), { "screen_uv" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("SpecularShininess", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "specular_shininess", "SPECULAR_SHININESS"), { "specular_shininess" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("SpecularShininessTexture", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "specular_shininess_texture", "SPECULAR_SHININESS_TEXTURE"), { "specular_shininess_texture" }, VisualShaderNode::PORT_TYPE_SAMPLER, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
@@ -5547,7 +5649,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("WorldPosition", "Input/Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "world_position", "WORLD_POSITION"), { "world_position" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FOG, Shader::MODE_FOG));
add_options.push_back(AddOption("ObjectPosition", "Input/Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "object_position", "OBJECT_POSITION"), { "object_position" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FOG, Shader::MODE_FOG));
add_options.push_back(AddOption("UVW", "Input/Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "uvw", "UVW"), { "uvw" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FOG, Shader::MODE_FOG));
- add_options.push_back(AddOption("Extents", "Input/Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "extents", "EXTENTS"), { "extents" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FOG, Shader::MODE_FOG));
+ add_options.push_back(AddOption("Size", "Input/Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "size", "SIZE"), { "size" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FOG, Shader::MODE_FOG));
add_options.push_back(AddOption("SDF", "Input/Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "sdf", "SDF"), { "sdf" }, VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_FOG, Shader::MODE_FOG));
add_options.push_back(AddOption("Time", "Input/Fog", "VisualShaderNodeInput", vformat(input_param_for_fog_shader_mode, "time", "TIME"), { "time" }, VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_FOG, Shader::MODE_FOG));
@@ -5692,7 +5794,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("CurveTexture", "Textures/Functions", "VisualShaderNodeCurveTexture", TTR("Perform the curve texture lookup."), {}, VisualShaderNode::PORT_TYPE_SCALAR));
curve_xyz_node_option_idx = add_options.size();
add_options.push_back(AddOption("CurveXYZTexture", "Textures/Functions", "VisualShaderNodeCurveXYZTexture", TTR("Perform the three components curve texture lookup."), {}, VisualShaderNode::PORT_TYPE_VECTOR_3D));
- add_options.push_back(AddOption("LinearSceneDepth", "Textures/Functions", "VisualShaderNodeLinearSceneDepth", TTR("Returns the depth value of the DEPTH_TEXTURE node in a linear space."), {}, VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
+ add_options.push_back(AddOption("LinearSceneDepth", "Textures/Functions", "VisualShaderNodeLinearSceneDepth", TTR("Returns the depth value obtained from the depth prepass in a linear space."), {}, VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
texture2d_node_option_idx = add_options.size();
add_options.push_back(AddOption("Texture2D", "Textures/Functions", "VisualShaderNodeTexture", TTR("Perform the 2D texture lookup."), {}, VisualShaderNode::PORT_TYPE_VECTOR_4D));
texture2d_array_node_option_idx = add_options.size();
@@ -6165,7 +6267,7 @@ public:
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
updating = true;
undo_redo->create_action(TTR("Edit Visual Property:") + " " + p_property, UndoRedo::MERGE_ENDS);
@@ -6367,7 +6469,7 @@ void EditorPropertyVisualShaderMode::_option_selected(int p_which) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Visual Shader Mode Changed"));
//do is easy
undo_redo->add_do_method(visual_shader.ptr(), "set_mode", p_which);
@@ -6468,7 +6570,7 @@ bool EditorInspectorVisualShaderModePlugin::can_handle(Object *p_object) {
return true; // Can handle everything.
}
-bool EditorInspectorVisualShaderModePlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorVisualShaderModePlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
if (p_path == "mode" && p_object->is_class("VisualShader") && p_type == Variant::INT) {
EditorPropertyVisualShaderMode *mode_editor = memnew(EditorPropertyVisualShaderMode);
Vector<String> options = p_hint_text.split(",");
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index a43d44473f..142c8167a8 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -95,7 +95,6 @@ private:
Ref<VisualShader> visual_shader;
HashMap<int, Link> links;
List<VisualShader::Connection> connections;
- bool dirty = false;
Color vector_expanded_color[4];
@@ -115,12 +114,10 @@ public:
void clear_links();
void set_shader_type(VisualShader::Type p_type);
bool is_preview_visible(int p_id) const;
- bool is_dirty() const;
- void make_dirty(bool p_enabled);
void update_node(VisualShader::Type p_type, int p_id);
void update_node_deferred(VisualShader::Type p_type, int p_node_id);
- void add_node(VisualShader::Type p_type, int p_id);
- void remove_node(VisualShader::Type p_type, int p_id);
+ void add_node(VisualShader::Type p_type, int p_id, bool p_just_update);
+ void remove_node(VisualShader::Type p_type, int p_id, bool p_just_update);
void connect_nodes(VisualShader::Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port);
void disconnect_nodes(VisualShader::Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port);
void show_port_preview(VisualShader::Type p_type, int p_node_id, int p_port_id);
@@ -191,6 +188,9 @@ class VisualShaderEditor : public VBoxContainer {
PanelContainer *error_panel = nullptr;
Label *error_label = nullptr;
+ bool pending_custom_scripts_to_delete = false;
+ List<Ref<Script>> custom_scripts_to_delete;
+
bool _block_update_options_menu = false;
bool _block_rebuild_shader = false;
@@ -506,6 +506,13 @@ class VisualShaderEditor : public VBoxContainer {
void _visibility_changed();
+ void _get_current_mode_limits(int &r_begin_type, int &r_end_type) const;
+ void _update_custom_script(const Ref<Script> &p_script);
+ void _script_created(const Ref<Script> &p_script);
+ void _resource_saved(const Ref<Resource> &p_resource);
+ void _resource_removed(const Ref<Resource> &p_resource);
+ void _resources_removed();
+
protected:
void _notification(int p_what);
static void _bind_methods();
@@ -520,7 +527,6 @@ public:
void add_custom_type(const String &p_name, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, bool p_highend);
Dictionary get_custom_node_data(Ref<VisualShaderNodeCustom> &p_custom_node);
- void update_custom_type(const Ref<Resource> &p_resource);
virtual Size2 get_minimum_size() const override;
void edit(VisualShader *p_visual_shader);
@@ -555,7 +561,7 @@ class EditorInspectorVisualShaderModePlugin : public EditorInspectorPlugin {
public:
virtual bool can_handle(Object *p_object) override;
- virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
};
class VisualShaderNodePortPreview : public Control {
diff --git a/editor/plugins/voxel_gi_editor_plugin.cpp b/editor/plugins/voxel_gi_editor_plugin.cpp
index a3ccf392e6..1087a50df6 100644
--- a/editor/plugins/voxel_gi_editor_plugin.cpp
+++ b/editor/plugins/voxel_gi_editor_plugin.cpp
@@ -35,7 +35,9 @@
void VoxelGIEditorPlugin::_bake() {
if (voxel_gi) {
- if (voxel_gi->get_probe_data().is_null()) {
+ Ref<VoxelGIData> voxel_gi_data = voxel_gi->get_probe_data();
+
+ if (voxel_gi_data.is_null()) {
String path = get_tree()->get_edited_scene_root()->get_scene_file_path();
if (path.is_empty()) {
path = "res://" + voxel_gi->get_name() + "_data.res";
@@ -46,7 +48,32 @@ void VoxelGIEditorPlugin::_bake() {
probe_file->set_current_path(path);
probe_file->popup_file_dialog();
return;
+ } else {
+ String path = voxel_gi_data->get_path();
+ if (!path.is_resource_file()) {
+ int srpos = path.find("::");
+ if (srpos != -1) {
+ String base = path.substr(0, srpos);
+ if (ResourceLoader::get_resource_type(base) == "PackedScene") {
+ if (!get_tree()->get_edited_scene_root() || get_tree()->get_edited_scene_root()->get_scene_file_path() != base) {
+ EditorNode::get_singleton()->show_warning(TTR("Voxel GI data is not local to the scene."));
+ return;
+ }
+ } else {
+ if (FileAccess::exists(base + ".import")) {
+ EditorNode::get_singleton()->show_warning(TTR("Voxel GI data is part of an imported resource."));
+ return;
+ }
+ }
+ }
+ } else {
+ if (FileAccess::exists(path + ".import")) {
+ EditorNode::get_singleton()->show_warning(TTR("Voxel GI data is an imported resource."));
+ return;
+ }
+ }
}
+
voxel_gi->bake();
}
}
@@ -74,12 +101,12 @@ void VoxelGIEditorPlugin::_notification(int p_what) {
// Set information tooltip on the Bake button. This information is useful
// to optimize performance (video RAM size) and reduce light leaking (individual cell size).
- const Vector3i size = voxel_gi->get_estimated_cell_size();
+ const Vector3i cell_size = voxel_gi->get_estimated_cell_size();
- const Vector3 extents = voxel_gi->get_extents();
+ const Vector3 half_size = voxel_gi->get_size() / 2;
const int data_size = 4;
- const double size_mb = size.x * size.y * size.z * data_size / (1024.0 * 1024.0);
+ const double size_mb = cell_size.x * cell_size.y * cell_size.z * data_size / (1024.0 * 1024.0);
// Add a qualitative measurement to help the user assess whether a VoxelGI node is using a lot of VRAM.
String size_quality;
if (size_mb < 16.0) {
@@ -91,8 +118,8 @@ void VoxelGIEditorPlugin::_notification(int p_what) {
}
String text;
- text += vformat(TTR("Subdivisions: %s"), vformat(String::utf8("%d × %d × %d"), size.x, size.y, size.z)) + "\n";
- text += vformat(TTR("Cell size: %s"), vformat(String::utf8("%.3f × %.3f × %.3f"), extents.x / size.x, extents.y / size.y, extents.z / size.z)) + "\n";
+ text += vformat(TTR("Subdivisions: %s"), vformat(String::utf8("%d × %d × %d"), cell_size.x, cell_size.y, cell_size.z)) + "\n";
+ text += vformat(TTR("Cell size: %s"), vformat(String::utf8("%.3f × %.3f × %.3f"), half_size.x / cell_size.x, half_size.y / cell_size.y, half_size.z / cell_size.z)) + "\n";
text += vformat(TTR("Video RAM size: %s MB (%s)"), String::num(size_mb, 2), size_quality);
// Only update the tooltip when needed to avoid constant redrawing.
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp
index 4ecf3338bc..9695a7042d 100644
--- a/editor/progress_dialog.cpp
+++ b/editor/progress_dialog.cpp
@@ -32,6 +32,7 @@
#include "core/object/message_queue.h"
#include "core/os/os.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "main/main.h"
#include "servers/display_server.h"
@@ -133,6 +134,14 @@ void BackgroundProgress::end_task(const String &p_task) {
ProgressDialog *ProgressDialog::singleton = nullptr;
void ProgressDialog::_notification(int p_what) {
+ if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+ if (!is_visible()) {
+ Node *p = get_parent();
+ if (p) {
+ p->remove_child(this);
+ }
+ }
+ }
}
void ProgressDialog::_popup() {
@@ -146,8 +155,17 @@ void ProgressDialog::_popup() {
main->set_offset(SIDE_TOP, style->get_margin(SIDE_TOP));
main->set_offset(SIDE_BOTTOM, -style->get_margin(SIDE_BOTTOM));
- //raise();
- popup_centered(ms);
+ EditorNode *ed = EditorNode::get_singleton();
+ if (ed && !is_inside_tree()) {
+ Window *w = ed->get_window();
+ while (w && w->get_exclusive_child()) {
+ w = w->get_exclusive_child();
+ }
+ if (w && w != this) {
+ w->add_child(this);
+ popup_centered(ms);
+ }
+ }
}
void ProgressDialog::add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel) {
@@ -177,7 +195,7 @@ void ProgressDialog::add_task(const String &p_task, const String &p_label, int p
cancel_hb->hide();
}
cancel_hb->move_to_front();
- cancelled = false;
+ canceled = false;
_popup();
if (p_can_cancel) {
cancel->grab_focus();
@@ -185,12 +203,12 @@ void ProgressDialog::add_task(const String &p_task, const String &p_label, int p
}
bool ProgressDialog::task_step(const String &p_task, const String &p_state, int p_step, bool p_force_redraw) {
- ERR_FAIL_COND_V(!tasks.has(p_task), cancelled);
+ ERR_FAIL_COND_V(!tasks.has(p_task), canceled);
if (!p_force_redraw) {
uint64_t tus = OS::get_singleton()->get_ticks_usec();
if (tus - last_progress_tick < 200000) { //200ms
- return cancelled;
+ return canceled;
}
}
@@ -210,7 +228,7 @@ bool ProgressDialog::task_step(const String &p_task, const String &p_state, int
#ifndef ANDROID_ENABLED
Main::iteration(); // this will not work on a lot of platforms, so it's only meant for the editor
#endif
- return cancelled;
+ return canceled;
}
void ProgressDialog::end_task(const String &p_task) {
@@ -228,7 +246,7 @@ void ProgressDialog::end_task(const String &p_task) {
}
void ProgressDialog::_cancel_pressed() {
- cancelled = true;
+ canceled = true;
}
void ProgressDialog::_bind_methods() {
@@ -239,6 +257,7 @@ ProgressDialog::ProgressDialog() {
add_child(main);
main->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
set_exclusive(true);
+ set_flag(Window::FLAG_POPUP, false);
last_progress_tick = 0;
singleton = this;
cancel_hb = memnew(HBoxContainer);
diff --git a/editor/progress_dialog.h b/editor/progress_dialog.h
index 5346f01a9e..7ac4864c9c 100644
--- a/editor/progress_dialog.h
+++ b/editor/progress_dialog.h
@@ -85,7 +85,7 @@ class ProgressDialog : public PopupPanel {
void _popup();
void _cancel_pressed();
- bool cancelled = false;
+ bool canceled = false;
protected:
void _notification(int p_what);
diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp
index 22d118cd90..d3e16211f7 100644
--- a/editor/project_converter_3_to_4.cpp
+++ b/editor/project_converter_3_to_4.cpp
@@ -32,10 +32,11 @@
#include "modules/modules_enabled.gen.h"
-const int ERROR_CODE = 77;
-
+#ifndef DISABLE_DEPRECATED
#ifdef MODULE_REGEX_ENABLED
+const int ERROR_CODE = 77;
+
#include "modules/regex/regex.h"
#include "core/io/dir_access.h"
@@ -44,7 +45,7 @@ const int ERROR_CODE = 77;
#include "core/templates/list.h"
#include "core/templates/local_vector.h"
-static const char *enum_renames[][2] = {
+const char *ProjectConverter3To4::enum_renames[][2] = {
//// constants
{ "TYPE_COLOR_ARRAY", "TYPE_PACKED_COLOR_ARRAY" },
{ "TYPE_FLOAT64_ARRAY", "TYPE_PACKED_FLOAT64_ARRAY" },
@@ -122,9 +123,6 @@ static const char *enum_renames[][2] = {
{ "JOINT_SLIDER", "JOINT_TYPE_SLIDER" }, // PhysicsServer3D
{ "KEY_CONTROL", "KEY_CTRL" }, // Globals
{ "LOOP_PING_PONG", "LOOP_PINGPONG" }, // AudioStreamWAV
- { "MATH_RAND", "MATH_RANDF_RANGE" }, // VisualScriptBuiltinFunc
- { "MATH_RANDOM", "MATH_RANDI_RANGE" }, // VisualScriptBuiltinFunc
- { "MATH_STEPIFY", "MATH_STEP_DECIMALS" }, // VisualScriptBuiltinFunc
{ "MODE_KINEMATIC", "FREEZE_MODE_KINEMATIC" }, // RigidBody
{ "MODE_OPEN_ANY", "FILE_MODE_OPEN_ANY" }, // FileDialog
{ "MODE_OPEN_DIR", "FILE_MODE_OPEN_DIR" }, // FileDialog
@@ -167,7 +165,7 @@ static const char *enum_renames[][2] = {
{ nullptr, nullptr },
};
-static const char *gdscript_function_renames[][2] = {
+const char *ProjectConverter3To4::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
@@ -213,11 +211,11 @@ static const char *gdscript_function_renames[][2] = {
// { "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
{ "_about_to_show", "_about_to_popup" }, // ColorPickerButton
{ "_get_configuration_warning", "_get_configuration_warnings" }, // Node
{ "_set_current", "set_current" }, // Camera2D
{ "_set_editor_description", "set_editor_description" }, // Node
- { "_set_playing", "set_playing" }, // AnimatedSprite3D
{ "_toplevel_raise_self", "_top_level_raise_self" }, // CanvasItem
{ "_update_wrap_at", "_update_wrap_at_column" }, // TextEdit
{ "add_animation", "add_animation_library" }, // AnimationPlayer
@@ -239,10 +237,13 @@ static const char *gdscript_function_renames[][2] = {
{ "body_add_torque", "body_apply_torque" }, // PhysicsServer2D
{ "bumpmap_to_normalmap", "bump_map_to_normal_map" }, // Image
{ "can_be_hidden", "_can_be_hidden" }, // EditorNode3DGizmoPlugin
- { "can_drop_data_fw", "_can_drop_data_fw" }, // ScriptEditor
+ { "can_drop_data", "_can_drop_data" }, // Control
{ "can_generate_small_preview", "_can_generate_small_preview" }, // EditorResourcePreviewGenerator
{ "can_instance", "can_instantiate" }, // PackedScene, Script
{ "canvas_light_set_scale", "canvas_light_set_texture_scale" }, // RenderingServer
+ { "capture_get_device", "get_input_device" }, // AudioServer
+ { "capture_get_device_list", "get_input_device_list" }, // AudioServer
+ { "capture_set_device", "set_input_device" }, // AudioServer
{ "center_viewport_to_cursor", "center_viewport_to_caret" }, // TextEdit
{ "change_scene", "change_scene_to_file" }, // SceneTree
{ "change_scene_to", "change_scene_to_packed" }, // SceneTree
@@ -265,7 +266,7 @@ static const char *gdscript_function_renames[][2] = {
{ "delete_char_at_cursor", "delete_char_at_caret" }, // LineEdit
{ "deselect_items", "deselect_all" }, // FileDialog
{ "disable_plugin", "_disable_plugin" }, // EditorPlugin
- { "drop_data_fw", "_drop_data_fw" }, // ScriptEditor
+ { "drop_data", "_drop_data" }, // Control
{ "exclude_polygons_2d", "exclude_polygons" }, // Geometry2D
{ "find_node", "find_child" }, // Node
{ "find_scancode_from_string", "find_keycode_from_string" }, // OS
@@ -303,8 +304,9 @@ static const char *gdscript_function_renames[][2] = {
{ "get_cursor_position", "get_caret_column" }, // LineEdit
{ "get_d", "get_distance" }, // LineShape2D
{ "get_depth_bias_enable", "get_depth_bias_enabled" }, // RDPipelineRasterizationState
+ { "get_device", "get_output_device" }, // AudioServer
+ { "get_device_list", "get_output_device_list" }, // AudioServer
{ "get_drag_data", "_get_drag_data" }, // Control
- { "get_drag_data_fw", "_get_drag_data_fw" }, // ScriptEditor
{ "get_editor_viewport", "get_editor_main_screen" }, // EditorPlugin
{ "get_enabled_focus_mode", "get_focus_mode" }, // BaseButton
{ "get_endian_swap", "is_big_endian" }, // File
@@ -315,8 +317,8 @@ static const char *gdscript_function_renames[][2] = {
{ "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_distance_scale" }, //Area2D
- { "get_gravity_vector", "get_gravity_direction" }, //Area2D
+ { "get_gravity_distance_scale", "get_gravity_point_unit_distance" }, // Area(2D/3D)
+ { "get_gravity_vector", "get_gravity_direction" }, // Area(2D/3D)
{ "get_h_scrollbar", "get_h_scroll_bar" }, //ScrollContainer
{ "get_hand", "get_tracker_hand" }, // XRPositionalTracker
{ "get_handle_name", "_get_handle_name" }, // EditorNode3DGizmo
@@ -502,6 +504,7 @@ static const char *gdscript_function_renames[][2] = {
{ "set_cursor_position", "set_caret_column" }, // LineEdit
{ "set_d", "set_distance" }, // WorldMarginShape2D
{ "set_depth_bias_enable", "set_depth_bias_enabled" }, // RDPipelineRasterizationState
+ { "set_device", "set_output_device" }, // AudioServer
{ "set_doubleclick", "set_double_click" }, // InputEventMouseButton
{ "set_draw_red", "set_draw_warning" }, // EditorProperty
{ "set_enable_follow_smoothing", "set_position_smoothing_enabled" }, // Camera2D
@@ -513,8 +516,8 @@ static const char *gdscript_function_renames[][2] = {
{ "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_distance_scale" }, // Area2D
- { "set_gravity_vector", "set_gravity_direction" }, // Area2D
+ { "set_gravity_distance_scale", "set_gravity_point_unit_distance" }, // Area(2D/3D)
+ { "set_gravity_vector", "set_gravity_direction" }, // Area(2D/3D)
{ "set_h_drag_enabled", "set_drag_horizontal_enabled" }, // Camera2D
{ "set_icon_align", "set_icon_alignment" }, // Button
{ "set_interior_ambient", "set_ambient_color" }, // ReflectionProbe
@@ -623,7 +626,7 @@ static const char *gdscript_function_renames[][2] = {
};
// gdscript_function_renames clone with CamelCase
-static const char *csharp_function_renames[][2] = {
+const char *ProjectConverter3To4::csharp_function_renames[][2] = {
// { "_SetName", "GetTrackerName"}, // XRPositionalTracker - CameraFeed use this
// { "_UnhandledInput", "_UnhandledKeyInput"}, // BaseButton, ViewportContainer broke Node, FileDialog,SubViewportContainer
// { "CreateGizmo", "_CreateGizmo"}, // EditorNode3DGizmoPlugin - may be used
@@ -669,6 +672,7 @@ static const char *csharp_function_renames[][2] = {
// { "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
{ "_AboutToShow", "_AboutToPopup" }, // ColorPickerButton
@@ -694,10 +698,14 @@ static const char *csharp_function_renames[][2] = {
{ "BindChildNodeToBone", "SetBoneChildren" }, // Skeleton3D
{ "BumpmapToNormalmap", "BumpMapToNormalMap" }, // Image
{ "CanBeHidden", "_CanBeHidden" }, // EditorNode3DGizmoPlugin
+ { "CanDropData", "_CanDropData" }, // Control
{ "CanDropDataFw", "_CanDropDataFw" }, // ScriptEditor
{ "CanGenerateSmallPreview", "_CanGenerateSmallPreview" }, // EditorResourcePreviewGenerator
{ "CanInstance", "CanInstantiate" }, // PackedScene, Script
{ "CanvasLightSetScale", "CanvasLightSetTextureScale" }, // RenderingServer
+ { "CaptureGetDevice", "GetInputDevice" }, // AudioServer
+ { "CaptureGetDeviceList", "GetInputDeviceList" }, // AudioServer
+ { "CaptureSetDevice", "SetInputDevice" }, // AudioServer
{ "CenterViewportToCursor", "CenterViewportToCaret" }, // TextEdit
{ "ChangeScene", "ChangeSceneToFile" }, // SceneTree
{ "ChangeSceneTo", "ChangeSceneToPacked" }, // SceneTree
@@ -717,6 +725,7 @@ static const char *csharp_function_renames[][2] = {
{ "DampedStringJointSetParam", "DampedSpringJointSetParam" }, // PhysicsServer2D
{ "DeleteCharAtCursor", "DeleteCharAtCaret" }, // LineEdit
{ "DeselectItems", "DeselectAll" }, // FileDialog
+ { "DropData", "_DropData" }, // Control
{ "DropDataFw", "_DropDataFw" }, // ScriptEditor
{ "ExcludePolygons2d", "ExcludePolygons" }, // Geometry2D
{ "FindScancodeFromString", "FindKeycodeFromString" }, // OS
@@ -754,6 +763,8 @@ static const char *csharp_function_renames[][2] = {
{ "GetCursorPosition", "GetCaretColumn" }, // LineEdit
{ "GetD", "GetDistance" }, // LineShape2D
{ "GetDepthBiasEnable", "GetDepthBiasEnabled" }, // RDPipelineRasterizationState
+ { "GetDevice", "GetOutputDevice" }, // AudioServer
+ { "GetDeviceList", "GetOutputDeviceList" }, // AudioServer
{ "GetDragDataFw", "_GetDragDataFw" }, // ScriptEditor
{ "GetEditorViewport", "GetViewport" }, // EditorPlugin
{ "GetEnabledFocusMode", "GetFocusMode" }, // BaseButton
@@ -942,6 +953,7 @@ static const char *csharp_function_renames[][2] = {
{ "SetCursorPosition", "SetCaretColumn" }, // LineEdit
{ "SetD", "SetDistance" }, // WorldMarginShape2D
{ "SetDepthBiasEnable", "SetDepthBiasEnabled" }, // RDPipelineRasterizationState
+ { "SetDevice", "SetOutputDevice" }, // AudioServer
{ "SetDoubleclick", "SetDoubleClick" }, // InputEventMouseButton
{ "SetEnableFollowSmoothing", "SetFollowSmoothingEnabled" }, // Camera2D
{ "SetEnabledFocusMode", "SetFocusMode" }, // BaseButton
@@ -1057,7 +1069,7 @@ static const char *csharp_function_renames[][2] = {
};
// Some needs to be disabled, because users can use this names as variables
-static const char *gdscript_properties_renames[][2] = {
+const char *ProjectConverter3To4::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
@@ -1070,6 +1082,7 @@ static const char *gdscript_properties_renames[][2] = {
// // {"shift","shift_pressed"},// This may broke 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
// { "doubleclick", "double_click" }, // InputEventMouseButton
// { "group", "button_group" }, // BaseButton
// { "process_mode", "process_callback" }, // AnimationTree, Camera2D
@@ -1080,10 +1093,12 @@ static const char *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
{ "as_normalmap", "as_normal_map" }, // NoiseTexture
{ "bbcode_text", "text" }, // RichTextLabel
{ "bg", "panel" }, // Theme
{ "bg_focus", "focus" }, // Theme
+ { "capture_device", "input_device" }, // AudioServer
{ "caret_blink_speed", "caret_blink_interval" }, // TextEdit, LineEdit
{ "caret_moving_by_right_click", "caret_move_on_right_click" }, // TextEdit
{ "caret_position", "caret_column" }, // LineEdit
@@ -1111,10 +1126,11 @@ static const char *gdscript_properties_renames[][2] = {
{ "files_disabled", "file_disabled_color" }, // Theme
{ "folder_icon_modulate", "folder_icon_color" }, // Theme
{ "global_rate_scale", "playback_speed_scale" }, // AudioServer
- { "gravity_distance_scale", "gravity_point_distance_scale" }, // Area2D
- { "gravity_vec", "gravity_direction" }, // Area2D
+ { "gravity_distance_scale", "gravity_point_unit_distance" }, // Area(2D/3D)
+ { "gravity_vec", "gravity_direction" }, // Area(2D/3D)
{ "hint_tooltip", "tooltip_text" }, // Control
{ "hseparation", "h_separation" }, // Theme
+ { "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
@@ -1139,7 +1155,7 @@ static const char *gdscript_properties_renames[][2] = {
{ "rect_position", "position" }, // Control
{ "rect_global_position", "global_position" }, // Control
{ "rect_size", "size" }, // Control
- { "rect_min_size", "minimum_size" }, // Control
+ { "rect_min_size", "custom_minimum_size" }, // Control
{ "rect_rotation", "rotation" }, // Control
{ "rect_scale", "scale" }, // Control
{ "rect_pivot_offset", "pivot_offset" }, // Control
@@ -1166,12 +1182,13 @@ static const char *gdscript_properties_renames[][2] = {
{ "unit_db", "volume_db" }, // AudioStreamPlayer3D
{ "unit_offset", "progress_ratio" }, // PathFollow2D, PathFollow3D
{ "vseparation", "v_separation" }, // Theme
+ { "frames", "sprite_frames" }, // AnimatedSprite2D, AnimatedSprite3D
{ nullptr, nullptr },
};
// Some needs to be disabled, because users can use this names as variables
-static const char *csharp_properties_renames[][2] = {
+const char *ProjectConverter3To4::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
@@ -1194,6 +1211,7 @@ static const char *csharp_properties_renames[][2] = {
// { "WrapEnabled", "WrapMode" }, // TextEdit
// { "Zfar", "Far" }, // Camera3D
// { "Znear", "Near" }, // Camera3D
+ // { "Pressed", "ButtonPressed" }, // BaseButton - Will also rename the signal, skipping for now
{ "AsNormalmap", "AsNormalMap" }, // NoiseTexture
{ "BbcodeText", "Text" }, // RichTextLabel
{ "CaretBlinkSpeed", "CaretBlinkInterval" }, // TextEdit, LineEdit
@@ -1223,6 +1241,7 @@ static const char *csharp_properties_renames[][2] = {
{ "GravityVec", "GravityDirection" }, // Area2D
{ "HintTooltip", "TooltipText" }, // Control
{ "Hseparation", "HSeparation" }, // Theme
+ { "IconAlign", "IconAlignment" }, // Button
{ "IterationsPerSecond", "PhysicsTicksPerSecond" }, // Engine
{ "InvertEnable", "InvertEnabled" }, // Polygon2D
{ "MarginBottom", "OffsetBottom" }, // Control broke NinePatchRect, StyleBox
@@ -1274,13 +1293,15 @@ static const char *csharp_properties_renames[][2] = {
{ nullptr, nullptr },
};
-static const char *gdscript_signals_renames[][2] = {
+const char *ProjectConverter3To4::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
{ "about_to_show", "about_to_popup" }, // Popup
{ "button_release", "button_released" }, // XRController3D
+ { "cancelled", "canceled" }, // AcceptDialog
+ { "item_double_clicked", "item_icon_double_clicked" }, // Tree
{ "network_peer_connected", "peer_connected" }, // MultiplayerAPI
{ "network_peer_disconnected", "peer_disconnected" }, // MultiplayerAPI
{ "network_peer_packet", "peer_packet" }, // MultiplayerAPI
@@ -1297,7 +1318,7 @@ static const char *gdscript_signals_renames[][2] = {
{ nullptr, nullptr },
};
-static const char *csharp_signals_renames[][2] = {
+const char *ProjectConverter3To4::csharp_signals_renames[][2] = {
// {"Instantiate","Instance"}, // FileSystemDock
// { "Hide", "Hidden" }, // CanvasItem - function with same name exists
// { "TweenAllCompleted","LoopFinished"}, // Tween - TODO, not sure
@@ -1321,7 +1342,7 @@ static const char *csharp_signals_renames[][2] = {
};
-static const char *project_settings_renames[][2] = {
+const char *ProjectConverter3To4::project_settings_renames[][2] = {
{ "audio/channel_disable_threshold_db", "audio/buses/channel_disable_threshold_db" },
{ "audio/channel_disable_time", "audio/buses/channel_disable_time" },
{ "audio/default_bus_layout", "audio/buses/default_bus_layout" },
@@ -1356,16 +1377,29 @@ static const char *project_settings_renames[][2] = {
{ "rendering/quality/shadow_atlas/quadrant_3_subdiv", "rendering/lights_and_shadows/shadow_atlas/quadrant_3_subdiv" },
{ "rendering/quality/shadow_atlas/size", "rendering/lights_and_shadows/shadow_atlas/size" },
{ "rendering/quality/shadow_atlas/size.mobile", "rendering/lights_and_shadows/shadow_atlas/size.mobile" },
- { "rendering/vram_compression/import_bptc", "rendering/textures/vram_compression/import_bptc" },
- { "rendering/vram_compression/import_etc", "rendering/textures/vram_compression/import_etc" },
- { "rendering/vram_compression/import_etc2", "rendering/textures/vram_compression/import_etc2" },
- { "rendering/vram_compression/import_pvrtc", "rendering/textures/vram_compression/import_pvrtc" },
- { "rendering/vram_compression/import_s3tc", "rendering/textures/vram_compression/import_s3tc" },
+ { "rendering/vram_compression/import_etc2", "rendering/textures/vram_compression/import_etc2_astc" },
+ { "rendering/vram_compression/import_s3tc", "rendering/textures/vram_compression/import_s3tc_bptc" },
+ { "window/size/width", "window/size/viewport_width" },
+ { "window/size/height", "window/size/viewport_height" },
+ { "window/size/test_width", "window/size/window_width_override" },
+ { "window/size/test_height", "window/size/window_height_override" },
{ nullptr, nullptr },
};
-static const char *builtin_types_renames[][2] = {
+const char *ProjectConverter3To4::input_map_renames[][2] = {
+ { ",\"alt\":", ",\"alt_pressed\":" },
+ { ",\"shift\":", ",\"shift_pressed\":" },
+ { ",\"control\":", ",\"ctrl_pressed\":" },
+ { ",\"meta\":", ",\"meta_pressed\":" },
+ { ",\"scancode\":", ",\"keycode\":" },
+ { ",\"physical_scancode\":", ",\"physical_keycode\":" },
+ { ",\"doubleclick\":", ",\"double_click\":" },
+
+ { nullptr, nullptr },
+};
+
+const char *ProjectConverter3To4::builtin_types_renames[][2] = {
{ "PoolByteArray", "PackedByteArray" },
{ "PoolColorArray", "PackedColorArray" },
{ "PoolIntArray", "PackedInt32Array" },
@@ -1379,7 +1413,7 @@ static const char *builtin_types_renames[][2] = {
{ nullptr, nullptr },
};
-static const char *shaders_renames[][2] = {
+const char *ProjectConverter3To4::shaders_renames[][2] = {
{ "ALPHA_SCISSOR", "ALPHA_SCISSOR_THRESHOLD" },
{ "CAMERA_MATRIX", "INV_VIEW_MATRIX" },
{ "INV_CAMERA_MATRIX", "VIEW_MATRIX" },
@@ -1397,7 +1431,7 @@ static const char *shaders_renames[][2] = {
{ nullptr, nullptr },
};
-static const char *class_renames[][2] = {
+const char *ProjectConverter3To4::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
@@ -1622,7 +1656,7 @@ static const char *class_renames[][2] = {
{ nullptr, nullptr },
};
-static const char *color_renames[][2] = {
+const char *ProjectConverter3To4::ProjectConverter3To4::color_renames[][2] = {
{ "aliceblue", "ALICE_BLUE" },
{ "antiquewhite", "ANTIQUE_WHITE" },
{ "aqua", "AQUA" },
@@ -1773,6 +1807,19 @@ static const char *color_renames[][2] = {
{ nullptr, nullptr },
};
+// Find "OS.set_property(x)", capturing x into $1.
+static String make_regex_gds_os_property_set(String name_set) {
+ return String("\\bOS\\.") + name_set + "\\s*\\((.*)\\)";
+}
+// Find "OS.property = x", capturing x into $1 or $2.
+static String make_regex_gds_os_property_assign(String name) {
+ return String("\\bOS\\.") + name + "\\s*=\\s*([^#]+)";
+}
+// Find "OS.property" OR "OS.get_property()" / "OS.is_property()".
+static String make_regex_gds_os_property_get(String name, String get) {
+ return String("\\bOS\\.(") + get + "_)?" + name + "(\\s*\\(\\s*\\))?";
+}
+
class ProjectConverter3To4::RegExContainer {
public:
// Custom GDScript.
@@ -1790,8 +1837,37 @@ public:
RegEx reg_join = RegEx("([\\(\\)a-zA-Z0-9_]+)\\.join\\(([^\n^\\)]+)\\)");
RegEx reg_image_lock = RegEx("([a-zA-Z0-9_\\.]+)\\.lock\\(\\)");
RegEx reg_image_unlock = RegEx("([a-zA-Z0-9_\\.]+)\\.unlock\\(\\)");
- RegEx reg_os_fullscreen = RegEx("OS.window_fullscreen[= ]+([^#^\n]+)");
RegEx reg_instantiate = RegEx("\\.instance\\(([^\\)]*)\\)");
+ // Simple OS properties with getters/setters.
+ RegEx reg_os_current_screen = RegEx("\\bOS\\.(set_|get_)?current_screen\\b");
+ RegEx reg_os_min_window_size = RegEx("\\bOS\\.(set_|get_)?min_window_size\\b");
+ RegEx reg_os_max_window_size = RegEx("\\bOS\\.(set_|get_)?max_window_size\\b");
+ RegEx reg_os_window_position = RegEx("\\bOS\\.(set_|get_)?window_position\\b");
+ RegEx reg_os_window_size = RegEx("\\bOS\\.(set_|get_)?window_size\\b");
+ RegEx reg_os_getset_screen_orient = RegEx("\\bOS\\.(s|g)et_screen_orientation\\b");
+ // OS property getters/setters for non trivial replacements.
+ RegEx reg_os_set_window_resizable = RegEx(make_regex_gds_os_property_set("set_window_resizable"));
+ RegEx reg_os_assign_window_resizable = RegEx(make_regex_gds_os_property_assign("window_resizable"));
+ RegEx reg_os_is_window_resizable = RegEx(make_regex_gds_os_property_get("window_resizable", "is"));
+ RegEx reg_os_set_fullscreen = RegEx(make_regex_gds_os_property_set("set_window_fullscreen"));
+ RegEx reg_os_assign_fullscreen = RegEx(make_regex_gds_os_property_assign("window_fullscreen"));
+ RegEx reg_os_is_fullscreen = RegEx(make_regex_gds_os_property_get("window_fullscreen", "is"));
+ RegEx reg_os_set_maximized = RegEx(make_regex_gds_os_property_set("set_window_maximized"));
+ RegEx reg_os_assign_maximized = RegEx(make_regex_gds_os_property_assign("window_maximized"));
+ RegEx reg_os_is_maximized = RegEx(make_regex_gds_os_property_get("window_maximized", "is"));
+ RegEx reg_os_set_minimized = RegEx(make_regex_gds_os_property_set("set_window_minimized"));
+ RegEx reg_os_assign_minimized = RegEx(make_regex_gds_os_property_assign("window_minimized"));
+ RegEx reg_os_is_minimized = RegEx(make_regex_gds_os_property_get("window_minimized", "is"));
+ RegEx reg_os_set_vsync = RegEx(make_regex_gds_os_property_set("set_use_vsync"));
+ RegEx reg_os_assign_vsync = RegEx(make_regex_gds_os_property_assign("vsync_enabled"));
+ RegEx reg_os_is_vsync = RegEx(make_regex_gds_os_property_get("vsync_enabled", "is"));
+ // OS properties specific cases & specific replacements.
+ RegEx reg_os_assign_screen_orient = RegEx("^(\\s*)OS\\.screen_orientation\\s*=\\s*([^#]+)"); // $1 - indent, $2 - value
+ RegEx reg_os_set_always_on_top = RegEx(make_regex_gds_os_property_set("set_window_always_on_top"));
+ RegEx reg_os_is_always_on_top = RegEx("\\bOS\\.is_window_always_on_top\\s*\\(.*\\)");
+ RegEx reg_os_set_borderless = RegEx(make_regex_gds_os_property_set("set_borderless_window"));
+ RegEx reg_os_get_borderless = RegEx("\\bOS\\.get_borderless_window\\s*\\(\\s*\\)");
+ RegEx reg_os_screen_orient_enum = RegEx("\\bOS\\.SCREEN_ORIENTATION_(\\w+)\\b"); // $1 - constant suffix
// GDScript keywords.
RegEx keyword_gdscript_tool = RegEx("^tool");
@@ -1838,6 +1914,7 @@ public:
LocalVector<RegEx *> enum_regexes;
LocalVector<RegEx *> gdscript_function_regexes;
LocalVector<RegEx *> project_settings_regexes;
+ LocalVector<RegEx *> input_map_regexes;
LocalVector<RegEx *> gdscript_properties_regexes;
LocalVector<RegEx *> gdscript_signals_regexes;
LocalVector<RegEx *> shaders_regexes;
@@ -1861,6 +1938,10 @@ public:
for (unsigned int current_index = 0; project_settings_renames[current_index][0]; current_index++) {
project_settings_regexes.push_back(memnew(RegEx(String("\\b") + project_settings_renames[current_index][0] + "\\b")));
}
+ // Input Map.
+ for (unsigned int current_index = 0; input_map_renames[current_index][0]; current_index++) {
+ input_map_regexes.push_back(memnew(RegEx(String("\\b") + input_map_renames[current_index][0] + "\\b")));
+ }
// GDScript properties.
for (unsigned int current_index = 0; gdscript_properties_renames[current_index][0]; current_index++) {
gdscript_properties_regexes.push_back(memnew(RegEx(String("\\b") + gdscript_properties_renames[current_index][0] + "\\b")));
@@ -1914,8 +1995,8 @@ public:
}
}
~RegExContainer() {
- for (unsigned int i = 0; i < color_regexes.size(); i++) {
- memdelete(color_regexes[i]);
+ for (RegEx *regex : color_regexes) {
+ memdelete(regex);
}
for (unsigned int i = 0; i < class_tscn_regexes.size(); i++) {
memdelete(class_tscn_regexes[i]);
@@ -1923,35 +2004,38 @@ public:
memdelete(class_shader_regexes[i]);
memdelete(class_regexes[i]);
}
- for (unsigned int i = 0; i < enum_regexes.size(); i++) {
- memdelete(enum_regexes[i]);
+ for (RegEx *regex : enum_regexes) {
+ memdelete(regex);
+ }
+ for (RegEx *regex : gdscript_function_regexes) {
+ memdelete(regex);
}
- for (unsigned int i = 0; i < gdscript_function_regexes.size(); i++) {
- memdelete(gdscript_function_regexes[i]);
+ for (RegEx *regex : project_settings_regexes) {
+ memdelete(regex);
}
- for (unsigned int i = 0; i < project_settings_regexes.size(); i++) {
- memdelete(project_settings_regexes[i]);
+ for (RegEx *regex : input_map_regexes) {
+ memdelete(regex);
}
- for (unsigned int i = 0; i < gdscript_properties_regexes.size(); i++) {
- memdelete(gdscript_properties_regexes[i]);
+ for (RegEx *regex : gdscript_properties_regexes) {
+ memdelete(regex);
}
- for (unsigned int i = 0; i < gdscript_signals_regexes.size(); i++) {
- memdelete(gdscript_signals_regexes[i]);
+ for (RegEx *regex : gdscript_signals_regexes) {
+ memdelete(regex);
}
- for (unsigned int i = 0; i < shaders_regexes.size(); i++) {
- memdelete(shaders_regexes[i]);
+ for (RegEx *regex : shaders_regexes) {
+ memdelete(regex);
}
- for (unsigned int i = 0; i < builtin_types_regexes.size(); i++) {
- memdelete(builtin_types_regexes[i]);
+ for (RegEx *regex : builtin_types_regexes) {
+ memdelete(regex);
}
- for (unsigned int i = 0; i < csharp_function_regexes.size(); i++) {
- memdelete(csharp_function_regexes[i]);
+ for (RegEx *regex : csharp_function_regexes) {
+ memdelete(regex);
}
- for (unsigned int i = 0; i < csharp_properties_regexes.size(); i++) {
- memdelete(csharp_properties_regexes[i]);
+ for (RegEx *regex : csharp_properties_regexes) {
+ memdelete(regex);
}
- for (unsigned int i = 0; i < csharp_signal_regexes.size(); i++) {
- memdelete(csharp_signal_regexes[i]);
+ for (RegEx *regex : csharp_signal_regexes) {
+ memdelete(regex);
}
}
};
@@ -2083,6 +2167,7 @@ int ProjectConverter3To4::convert() {
} else if (file_name.ends_with("project.godot")) {
rename_common(project_settings_renames, reg_container.project_settings_regexes, lines);
rename_common(builtin_types_renames, reg_container.builtin_types_regexes, lines);
+ rename_common(input_map_renames, reg_container.input_map_regexes, lines);
} else if (file_name.ends_with(".csproj")) {
// TODO
} else {
@@ -2248,6 +2333,7 @@ int ProjectConverter3To4::validate_conversion() {
} else if (file_name.ends_with("project.godot")) {
changed_elements.append_array(check_for_rename_common(project_settings_renames, reg_container.project_settings_regexes, lines));
changed_elements.append_array(check_for_rename_common(builtin_types_renames, reg_container.builtin_types_regexes, lines));
+ changed_elements.append_array(check_for_rename_common(input_map_renames, reg_container.input_map_regexes, lines));
} else if (file_name.ends_with(".csproj")) {
// TODO
} else {
@@ -2384,6 +2470,8 @@ bool ProjectConverter3To4::test_conversion(RegExContainer &reg_container) {
valid = valid && test_conversion_basic("audio/channel_disable_threshold_db", "audio/buses/channel_disable_threshold_db", project_settings_renames, reg_container.project_settings_regexes, "project setting");
+ valid = valid && test_conversion_basic("\"device\":-1,\"alt\":false,\"shift\":false,\"control\":false,\"meta\":false,\"doubleclick\":false,\"scancode\":0,\"physical_scancode\":16777254,\"script\":null", "\"device\":-1,\"alt_pressed\":false,\"shift_pressed\":false,\"ctrl_pressed\":false,\"meta_pressed\":false,\"double_click\":false,\"keycode\":0,\"physical_keycode\":16777254,\"script\":null", input_map_renames, reg_container.input_map_regexes, "input map");
+
valid = valid && test_conversion_basic("Transform", "Transform3D", builtin_types_renames, reg_container.builtin_types_regexes, "builtin type");
// Custom Renames.
@@ -2401,8 +2489,41 @@ bool ProjectConverter3To4::test_conversion(RegExContainer &reg_container) {
valid = valid && test_conversion_with_regex("[Master]", "The master and mastersync rpc behavior is not officially supported anymore. Try using another keyword or making custom logic using Multiplayer.GetRemoteSenderId()\n[RPC]", &ProjectConverter3To4::rename_csharp_attributes, "custom rename csharp", reg_container);
valid = valid && test_conversion_with_regex("[MasterSync]", "The master and mastersync rpc behavior is not officially supported anymore. Try using another keyword or making custom logic using Multiplayer.GetRemoteSenderId()\n[RPC(CallLocal = true)]", &ProjectConverter3To4::rename_csharp_attributes, "custom rename csharp", reg_container);
- valid = valid && test_conversion_gdscript_builtin("OS.window_fullscreen = Settings.fullscreen", "if Settings.fullscreen:\n\tDisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)\nelse:\n\tDisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
- valid = valid && test_conversion_gdscript_builtin("OS.get_window_safe_area()", "DisplayServer.get_display_safe_area()", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.window_resizable: pass", "\tif (not get_window().unresizable): pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.is_window_resizable(): pass", "\tif (not get_window().unresizable): pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.set_window_resizable(Settings.resizable)", "\tget_window().unresizable = not (Settings.resizable)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.window_resizable = Settings.resizable", "\tget_window().unresizable = not (Settings.resizable)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.window_fullscreen: pass", "\tif ((get_window().mode == Window.MODE_EXCLUSIVE_FULLSCREEN) or (get_window().mode == Window.MODE_FULLSCREEN)): pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.is_window_fullscreen(): pass", "\tif ((get_window().mode == Window.MODE_EXCLUSIVE_FULLSCREEN) or (get_window().mode == Window.MODE_FULLSCREEN)): pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.set_window_fullscreen(Settings.fullscreen)", "\tget_window().mode = Window.MODE_EXCLUSIVE_FULLSCREEN if (Settings.fullscreen) else Window.MODE_WINDOWED", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.window_fullscreen = Settings.fullscreen", "\tget_window().mode = Window.MODE_EXCLUSIVE_FULLSCREEN if (Settings.fullscreen) else Window.MODE_WINDOWED", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.window_maximized: pass", "\tif (get_window().mode == Window.MODE_MAXIMIZED): pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.is_window_maximized(): pass", "\tif (get_window().mode == Window.MODE_MAXIMIZED): pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.set_window_maximized(Settings.maximized)", "\tget_window().mode = Window.MODE_MAXIMIZED if (Settings.maximized) else Window.MODE_WINDOWED", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.window_maximized = Settings.maximized", "\tget_window().mode = Window.MODE_MAXIMIZED if (Settings.maximized) else Window.MODE_WINDOWED", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.window_minimized: pass", "\tif (get_window().mode == Window.MODE_MINIMIZED): pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.is_window_minimized(): pass", "\tif (get_window().mode == Window.MODE_MINIMIZED): pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.set_window_minimized(Settings.minimized)", "\tget_window().mode = Window.MODE_MINIMIZED if (Settings.minimized) else Window.MODE_WINDOWED", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.window_minimized = Settings.minimized", "\tget_window().mode = Window.MODE_MINIMIZED if (Settings.minimized) else Window.MODE_WINDOWED", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.vsync_enabled: pass", "\tif (DisplayServer.window_get_vsync_mode() != DisplayServer.VSYNC_DISABLED): pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.is_vsync_enabled(): pass", "\tif (DisplayServer.window_get_vsync_mode() != DisplayServer.VSYNC_DISABLED): pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.set_use_vsync(Settings.vsync)", "\tDisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED if (Settings.vsync) else DisplayServer.VSYNC_DISABLED)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.vsync_enabled = Settings.vsync", "\tDisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED if (Settings.vsync) else DisplayServer.VSYNC_DISABLED)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.screen_orientation = OS.SCREEN_ORIENTATION_VERTICAL: pass", "\tif DisplayServer.screen_get_orientation() = DisplayServer.SCREEN_VERTICAL: pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.get_screen_orientation() = OS.SCREEN_ORIENTATION_LANDSCAPE: pass", "\tif DisplayServer.screen_get_orientation() = DisplayServer.SCREEN_LANDSCAPE: pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.set_screen_orientation(Settings.orient)", "\tDisplayServer.screen_set_orientation(Settings.orient)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.screen_orientation = Settings.orient", "\tDisplayServer.screen_set_orientation(Settings.orient)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.is_window_always_on_top(): pass", "\tif get_window().always_on_top: pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.set_window_always_on_top(Settings.alwaystop)", "\tget_window().always_on_top = (Settings.alwaystop)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+
+ valid = valid && test_conversion_gdscript_builtin("\tif OS.get_borderless_window(): pass", "\tif get_window().borderless: pass", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ valid = valid && test_conversion_gdscript_builtin("\tOS.set_borderless_window(Settings.borderless)", "\tget_window().borderless = (Settings.borderless)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
valid = valid && test_conversion_gdscript_builtin("\tvar aa = roman(r.move_and_slide( a, b, c, d, e, f )) # Roman", "\tr.set_velocity(a)\n\tr.set_up_direction(b)\n\tr.set_floor_stop_on_slope_enabled(c)\n\tr.set_max_slides(d)\n\tr.set_floor_max_angle(e)\n\t# TODOConverter40 infinite_inertia were removed in Godot 4.0 - previous value `f`\n\tr.move_and_slide()\n\tvar aa = roman(r.velocity) # Roman", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
valid = valid && test_conversion_gdscript_builtin("\tmove_and_slide( a, b, c, d, e, f ) # Roman", "\tset_velocity(a)\n\tset_up_direction(b)\n\tset_floor_stop_on_slope_enabled(c)\n\tset_max_slides(d)\n\tset_floor_max_angle(e)\n\t# TODOConverter40 infinite_inertia were removed in Godot 4.0 - previous value `f`\n\tmove_and_slide() # Roman", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
@@ -2444,14 +2565,14 @@ bool ProjectConverter3To4::test_conversion(RegExContainer &reg_container) {
valid = valid && test_conversion_with_regex("tool", "@tool", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
valid = valid && test_conversion_with_regex("\n tool", "\n tool", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
valid = valid && test_conversion_with_regex("\n\ntool", "\n\n@tool", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
- valid = valid && test_conversion_with_regex("\n\nremote func", "\n\n@rpc(any_peer) func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
- valid = valid && test_conversion_with_regex("\n\nremotesync func", "\n\n@rpc(any_peer, call_local) func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
- valid = valid && test_conversion_with_regex("\n\nsync func", "\n\n@rpc(any_peer, call_local) func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
+ valid = valid && test_conversion_with_regex("\n\nremote func", "\n\n@rpc(\"any_peer\") func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
+ valid = valid && test_conversion_with_regex("\n\nremotesync func", "\n\n@rpc(\"any_peer\", \"call_local\") func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
+ valid = valid && test_conversion_with_regex("\n\nsync func", "\n\n@rpc(\"any_peer\", \"call_local\") func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
valid = valid && test_conversion_with_regex("\n\nslave func", "\n\n@rpc func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
valid = valid && test_conversion_with_regex("\n\npuppet func", "\n\n@rpc func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
- valid = valid && test_conversion_with_regex("\n\npuppetsync func", "\n\n@rpc(call_local) func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
+ valid = valid && test_conversion_with_regex("\n\npuppetsync func", "\n\n@rpc(\"call_local\") func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
valid = valid && test_conversion_with_regex("\n\nmaster func", "\n\nThe master and mastersync rpc behavior is not officially supported anymore. Try using another keyword or making custom logic using get_multiplayer().get_remote_sender_id()\n@rpc func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
- valid = valid && test_conversion_with_regex("\n\nmastersync func", "\n\nThe master and mastersync rpc behavior is not officially supported anymore. Try using another keyword or making custom logic using get_multiplayer().get_remote_sender_id()\n@rpc(call_local) func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
+ valid = valid && test_conversion_with_regex("\n\nmastersync func", "\n\nThe master and mastersync rpc behavior is not officially supported anymore. Try using another keyword or making custom logic using get_multiplayer().get_remote_sender_id()\n@rpc(\"call_local\") func", &ProjectConverter3To4::rename_gdscript_keywords, "gdscript keyword", reg_container);
valid = valid && test_conversion_gdscript_builtin("var size : Vector2 = Vector2() setget set_function , get_function", "var size : Vector2 = Vector2() : get = get_function, set = set_function", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
valid = valid && test_conversion_gdscript_builtin("var size : Vector2 = Vector2() setget set_function , ", "var size : Vector2 = Vector2() : set = set_function", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
@@ -2739,6 +2860,7 @@ bool ProjectConverter3To4::test_array_names() {
valid = valid && test_single_array(shaders_renames, true);
valid = valid && test_single_array(gdscript_signals_renames);
valid = valid && test_single_array(project_settings_renames);
+ valid = valid && test_single_array(input_map_renames);
valid = valid && test_single_array(builtin_types_renames);
valid = valid && test_single_array(color_renames);
@@ -3165,9 +3287,96 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
line = reg_container.reg_setget_get.sub(line, "var $1$2: get = $3", true);
}
- // OS.window_fullscreen = a -> if a: DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN) else: DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
+ if (line.contains("window_resizable")) {
+ // OS.set_window_resizable(a) -> get_window().unresizable = not (a)
+ line = reg_container.reg_os_set_window_resizable.sub(line, "get_window().unresizable = not ($1)", true);
+ // OS.window_resizable = a -> same
+ line = reg_container.reg_os_assign_window_resizable.sub(line, "get_window().unresizable = not ($1)", true);
+ // OS.[is_]window_resizable() -> (not get_window().unresizable)
+ line = reg_container.reg_os_is_window_resizable.sub(line, "(not get_window().unresizable)", true);
+ }
+
if (line.contains("window_fullscreen")) {
- line = reg_container.reg_os_fullscreen.sub(line, "if $1:\n\tDisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)\nelse:\n\tDisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)", true);
+ // OS.window_fullscreen(a) -> get_window().mode = Window.MODE_EXCLUSIVE_FULLSCREEN if (a) else Window.MODE_WINDOWED
+ line = reg_container.reg_os_set_fullscreen.sub(line, "get_window().mode = Window.MODE_EXCLUSIVE_FULLSCREEN if ($1) else Window.MODE_WINDOWED", true);
+ // window_fullscreen = a -> same
+ line = reg_container.reg_os_assign_fullscreen.sub(line, "get_window().mode = Window.MODE_EXCLUSIVE_FULLSCREEN if ($1) else Window.MODE_WINDOWED", true);
+ // OS.[is_]window_fullscreen() -> ((get_window().mode == Window.MODE_EXCLUSIVE_FULLSCREEN) or (get_window().mode == Window.MODE_FULLSCREEN))
+ line = reg_container.reg_os_is_fullscreen.sub(line, "((get_window().mode == Window.MODE_EXCLUSIVE_FULLSCREEN) or (get_window().mode == Window.MODE_FULLSCREEN))", true);
+ }
+
+ if (line.contains("window_maximized")) {
+ // OS.window_maximized(a) -> get_window().mode = Window.MODE_MAXIMIZED if (a) else Window.MODE_WINDOWED
+ line = reg_container.reg_os_set_maximized.sub(line, "get_window().mode = Window.MODE_MAXIMIZED if ($1) else Window.MODE_WINDOWED", true);
+ // window_maximized = a -> same
+ line = reg_container.reg_os_assign_maximized.sub(line, "get_window().mode = Window.MODE_MAXIMIZED if ($1) else Window.MODE_WINDOWED", true);
+ // OS.[is_]window_maximized() -> (get_window().mode == Window.MODE_MAXIMIZED)
+ line = reg_container.reg_os_is_maximized.sub(line, "(get_window().mode == Window.MODE_MAXIMIZED)", true);
+ }
+
+ if (line.contains("window_minimized")) {
+ // OS.window_minimized(a) -> get_window().mode = Window.MODE_MINIMIZED if (a) else Window.MODE_WINDOWED
+ line = reg_container.reg_os_set_minimized.sub(line, "get_window().mode = Window.MODE_MINIMIZED if ($1) else Window.MODE_WINDOWED", true);
+ // window_minimized = a -> same
+ line = reg_container.reg_os_assign_minimized.sub(line, "get_window().mode = Window.MODE_MINIMIZED if ($1) else Window.MODE_WINDOWED", true);
+ // OS.[is_]window_minimized() -> (get_window().mode == Window.MODE_MINIMIZED)
+ line = reg_container.reg_os_is_minimized.sub(line, "(get_window().mode == Window.MODE_MINIMIZED)", true);
+ }
+
+ if (line.contains("set_use_vsync")) {
+ // OS.set_use_vsync(a) -> get_window().window_set_vsync_mode(DisplayServer.VSYNC_ENABLED if (a) else DisplayServer.VSYNC_DISABLED)
+ line = reg_container.reg_os_set_vsync.sub(line, "DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED if ($1) else DisplayServer.VSYNC_DISABLED)", true);
+ }
+ if (line.contains("vsync_enabled")) {
+ // vsync_enabled = a -> get_window().window_set_vsync_mode(DisplayServer.VSYNC_ENABLED if (a) else DisplayServer.VSYNC_DISABLED)
+ line = reg_container.reg_os_assign_vsync.sub(line, "DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED if ($1) else DisplayServer.VSYNC_DISABLED)", true);
+ // OS.[is_]vsync_enabled() -> (DisplayServer.window_get_vsync_mode() != DisplayServer.VSYNC_DISABLED)
+ line = reg_container.reg_os_is_vsync.sub(line, "(DisplayServer.window_get_vsync_mode() != DisplayServer.VSYNC_DISABLED)", true);
+ }
+
+ if (line.contains("OS.screen_orientation")) { // keep "OS." at start
+ // OS.screen_orientation = a -> DisplayServer.screen_set_orientation(a)
+ line = reg_container.reg_os_assign_screen_orient.sub(line, "$1DisplayServer.screen_set_orientation($2)", true); // assignment
+ line = line.replace("OS.screen_orientation", "DisplayServer.screen_get_orientation()"); // value access
+ }
+
+ if (line.contains("_window_always_on_top")) {
+ // OS.set_window_always_on_top(a) -> get_window().always_on_top = (a)
+ line = reg_container.reg_os_set_always_on_top.sub(line, "get_window().always_on_top = ($1)", true);
+ // OS.is_window_always_on_top() -> get_window().always_on_top
+ line = reg_container.reg_os_is_always_on_top.sub(line, "get_window().always_on_top", true);
+ }
+
+ if (line.contains("et_borderless_window")) {
+ // OS.set_borderless_window(a) -> get_window().borderless = (a)
+ line = reg_container.reg_os_set_borderless.sub(line, "get_window().borderless = ($1)", true);
+ // OS.get_borderless_window() -> get_window().borderless
+ line = reg_container.reg_os_get_borderless.sub(line, "get_window().borderless", true);
+ }
+
+ // OS.SCREEN_ORIENTATION_* -> DisplayServer.SCREEN_*
+ if (line.contains("OS.SCREEN_ORIENTATION_")) {
+ line = reg_container.reg_os_screen_orient_enum.sub(line, "DisplayServer.SCREEN_$1", true);
+ }
+
+ // OS -> Window simple replacements with optional set/get.
+ if (line.contains("current_screen")) {
+ line = reg_container.reg_os_current_screen.sub(line, "get_window().$1current_screen", true);
+ }
+ if (line.contains("min_window_size")) {
+ line = reg_container.reg_os_min_window_size.sub(line, "get_window().$1min_size", true);
+ }
+ if (line.contains("max_window_size")) {
+ line = reg_container.reg_os_max_window_size.sub(line, "get_window().$1max_size", true);
+ }
+ if (line.contains("window_position")) {
+ line = reg_container.reg_os_window_position.sub(line, "get_window().$1position", true);
+ }
+ if (line.contains("window_size")) {
+ line = reg_container.reg_os_window_size.sub(line, "get_window().$1size", true);
+ }
+ if (line.contains("et_screen_orientation")) {
+ line = reg_container.reg_os_getset_screen_orient.sub(line, "DisplayServer.screen_$1et_orientation", true);
}
// Instantiate
@@ -3668,11 +3877,85 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
if (line.contains("OS.get_datetime")) {
line = line.replace("OS.get_datetime", "Time.get_datetime_dict_from_system");
}
+
+ // OS -> DisplayServer
+ if (line.contains("OS.get_display_cutouts")) {
+ line = line.replace("OS.get_display_cutouts", "DisplayServer.get_display_cutouts");
+ }
+ if (line.contains("OS.get_screen_count")) {
+ line = line.replace("OS.get_screen_count", "DisplayServer.get_screen_count");
+ }
+ if (line.contains("OS.get_screen_dpi")) {
+ line = line.replace("OS.get_screen_dpi", "DisplayServer.screen_get_dpi");
+ }
+ if (line.contains("OS.get_screen_max_scale")) {
+ line = line.replace("OS.get_screen_max_scale", "DisplayServer.screen_get_max_scale");
+ }
+ if (line.contains("OS.get_screen_position")) {
+ line = line.replace("OS.get_screen_position", "DisplayServer.screen_get_position");
+ }
+ if (line.contains("OS.get_screen_refresh_rate")) {
+ line = line.replace("OS.get_screen_refresh_rate", "DisplayServer.screen_get_refresh_rate");
+ }
+ if (line.contains("OS.get_screen_scale")) {
+ line = line.replace("OS.get_screen_scale", "DisplayServer.screen_get_scale");
+ }
+ if (line.contains("OS.get_screen_size")) {
+ line = line.replace("OS.get_screen_size", "DisplayServer.screen_get_size");
+ }
+ if (line.contains("OS.set_icon")) {
+ line = line.replace("OS.set_icon", "DisplayServer.set_icon");
+ }
+ if (line.contains("OS.set_native_icon")) {
+ line = line.replace("OS.set_native_icon", "DisplayServer.set_native_icon");
+ }
+
+ // OS -> Window
+ if (line.contains("OS.window_borderless")) {
+ line = line.replace("OS.window_borderless", "get_window().borderless");
+ }
+ if (line.contains("OS.get_real_window_size")) {
+ line = line.replace("OS.get_real_window_size", "get_window().get_size_with_decorations");
+ }
+ if (line.contains("OS.is_window_focused")) {
+ line = line.replace("OS.is_window_focused", "get_window().has_focus");
+ }
+ if (line.contains("OS.move_window_to_foreground")) {
+ line = line.replace("OS.move_window_to_foreground", "get_window().move_to_foreground");
+ }
+ if (line.contains("OS.request_attention")) {
+ line = line.replace("OS.request_attention", "get_window().request_attention");
+ }
+ if (line.contains("OS.set_window_title")) {
+ line = line.replace("OS.set_window_title", "get_window().set_title");
+ }
+
+ // get_tree().set_input_as_handled() -> get_viewport().set_input_as_handled()
+ if (line.contains("get_tree().set_input_as_handled()")) {
+ line = line.replace("get_tree().set_input_as_handled()", "get_viewport().set_input_as_handled()");
+ }
+
+ // Fix the simple case of using _unhandled_key_input
+ // func _unhandled_key_input(event: InputEventKey) -> _unhandled_key_input(event: InputEvent)
+ if (line.contains("_unhandled_key_input(event: InputEventKey)")) {
+ line = line.replace("_unhandled_key_input(event: InputEventKey)", "_unhandled_key_input(event: InputEvent)");
+ }
}
void ProjectConverter3To4::process_csharp_line(String &line, const RegExContainer &reg_container) {
line = line.replace("OS.GetWindowSafeArea()", "DisplayServer.ScreenGetUsableRect()");
+ // GetTree().SetInputAsHandled() -> GetViewport().SetInputAsHandled()
+ if (line.contains("GetTree().SetInputAsHandled()")) {
+ line = line.replace("GetTree().SetInputAsHandled()", "GetViewport().SetInputAsHandled()");
+ }
+
+ // Fix the simple case of using _UnhandledKeyInput
+ // func _UnhandledKeyInput(InputEventKey @event) -> _UnhandledKeyInput(InputEvent @event)
+ if (line.contains("_UnhandledKeyInput(InputEventKey @event)")) {
+ line = line.replace("_UnhandledKeyInput(InputEventKey @event)", "_UnhandledKeyInput(InputEvent @event)");
+ }
+
// -- Connect(,,,things) -> Connect(,Callable(,),things) Object
if (line.contains("Connect(")) {
int start = line.find("Connect(");
@@ -3820,13 +4103,13 @@ void ProjectConverter3To4::rename_gdscript_keywords(Vector<String> &lines, const
line = reg_container.keyword_gdscript_onready.sub(line, "@onready", true);
}
if (line.contains("remote")) {
- line = reg_container.keyword_gdscript_remote.sub(line, "@rpc(any_peer) func", true);
+ line = reg_container.keyword_gdscript_remote.sub(line, "@rpc(\"any_peer\") func", true);
}
if (line.contains("remote")) {
- line = reg_container.keyword_gdscript_remotesync.sub(line, "@rpc(any_peer, call_local) func", true);
+ line = reg_container.keyword_gdscript_remotesync.sub(line, "@rpc(\"any_peer\", \"call_local\") func", true);
}
if (line.contains("sync")) {
- line = reg_container.keyword_gdscript_sync.sub(line, "@rpc(any_peer, call_local) func", true);
+ line = reg_container.keyword_gdscript_sync.sub(line, "@rpc(\"any_peer\", \"call_local\") func", true);
}
if (line.contains("slave")) {
line = reg_container.keyword_gdscript_slave.sub(line, "@rpc func", true);
@@ -3835,13 +4118,13 @@ void ProjectConverter3To4::rename_gdscript_keywords(Vector<String> &lines, const
line = reg_container.keyword_gdscript_puppet.sub(line, "@rpc func", true);
}
if (line.contains("puppet")) {
- line = reg_container.keyword_gdscript_puppetsync.sub(line, "@rpc(call_local) func", true);
+ line = reg_container.keyword_gdscript_puppetsync.sub(line, "@rpc(\"call_local\") func", true);
}
if (line.contains("master")) {
line = reg_container.keyword_gdscript_master.sub(line, error_message + "@rpc func", true);
}
if (line.contains("master")) {
- line = reg_container.keyword_gdscript_mastersync.sub(line, error_message + "@rpc(call_local) func", true);
+ line = reg_container.keyword_gdscript_mastersync.sub(line, error_message + "@rpc(\"call_local\") func", true);
}
}
}
@@ -3889,25 +4172,25 @@ Vector<String> ProjectConverter3To4::check_for_rename_gdscript_keywords(Vector<S
if (line.contains("remote")) {
old = line;
- line = reg_container.keyword_gdscript_remote.sub(line, "@rpc(any_peer) func", true);
+ line = reg_container.keyword_gdscript_remote.sub(line, "@rpc(\"any_peer\") func", true);
if (old != line) {
- found_renames.append(line_formatter(current_line, "remote func", "@rpc(any_peer) func", line));
+ found_renames.append(line_formatter(current_line, "remote func", "@rpc(\"any_peer\") func", line));
}
}
if (line.contains("remote")) {
old = line;
- line = reg_container.keyword_gdscript_remotesync.sub(line, "@rpc(any_peer, call_local)) func", true);
+ line = reg_container.keyword_gdscript_remotesync.sub(line, "@rpc(\"any_peer\", \"call_local\")) func", true);
if (old != line) {
- found_renames.append(line_formatter(current_line, "remotesync func", "@rpc(any_peer, call_local)) func", line));
+ found_renames.append(line_formatter(current_line, "remotesync func", "@rpc(\"any_peer\", \"call_local\")) func", line));
}
}
if (line.contains("sync")) {
old = line;
- line = reg_container.keyword_gdscript_sync.sub(line, "@rpc(any_peer, call_local)) func", true);
+ line = reg_container.keyword_gdscript_sync.sub(line, "@rpc(\"any_peer\", \"call_local\")) func", true);
if (old != line) {
- found_renames.append(line_formatter(current_line, "sync func", "@rpc(any_peer, call_local)) func", line));
+ found_renames.append(line_formatter(current_line, "sync func", "@rpc(\"any_peer\", \"call_local\")) func", line));
}
}
@@ -3929,9 +4212,9 @@ Vector<String> ProjectConverter3To4::check_for_rename_gdscript_keywords(Vector<S
if (line.contains("puppet")) {
old = line;
- line = reg_container.keyword_gdscript_puppetsync.sub(line, "@rpc(call_local) func", true);
+ line = reg_container.keyword_gdscript_puppetsync.sub(line, "@rpc(\"call_local\") func", true);
if (old != line) {
- found_renames.append(line_formatter(current_line, "puppetsync func", "@rpc(call_local) func", line));
+ found_renames.append(line_formatter(current_line, "puppetsync func", "@rpc(\"call_local\") func", line));
}
}
@@ -3945,9 +4228,9 @@ Vector<String> ProjectConverter3To4::check_for_rename_gdscript_keywords(Vector<S
if (line.contains("master")) {
old = line;
- line = reg_container.keyword_gdscript_master.sub(line, "@rpc(call_local) func", true);
+ line = reg_container.keyword_gdscript_master.sub(line, "@rpc(\"call_local\") func", true);
if (old != line) {
- found_renames.append(line_formatter(current_line, "mastersync func", "@rpc(call_local) func", line));
+ found_renames.append(line_formatter(current_line, "mastersync func", "@rpc(\"call_local\") func", line));
}
}
}
@@ -4082,3 +4365,4 @@ int ProjectConverter3To4::validate_conversion() {
}
#endif // MODULE_REGEX_ENABLED
+#endif // DISABLE_DEPRECATED
diff --git a/editor/project_converter_3_to_4.h b/editor/project_converter_3_to_4.h
index b3aa52f1e3..6ec2dd188d 100644
--- a/editor/project_converter_3_to_4.h
+++ b/editor/project_converter_3_to_4.h
@@ -29,6 +29,7 @@
/**************************************************************************/
#ifndef PROJECT_CONVERTER_3_TO_4_H
+#ifndef DISABLE_DEPRECATED
#define PROJECT_CONVERTER_3_TO_4_H
#include "core/io/file_access.h"
@@ -41,6 +42,19 @@ class RegEx;
class ProjectConverter3To4 {
public:
class RegExContainer;
+ static const char *enum_renames[][2];
+ static const char *gdscript_function_renames[][2];
+ static const char *csharp_function_renames[][2];
+ static const char *gdscript_properties_renames[][2];
+ static const char *csharp_properties_renames[][2];
+ static const char *gdscript_signals_renames[][2];
+ static const char *csharp_signals_renames[][2];
+ static const char *project_settings_renames[][2];
+ static const char *input_map_renames[][2];
+ static const char *builtin_types_renames[][2];
+ static const char *shaders_renames[][2];
+ static const char *class_renames[][2];
+ static const char *color_renames[][2];
private:
uint64_t maximum_file_size;
@@ -97,4 +111,6 @@ public:
int convert();
};
+#endif // DISABLE_DEPRECATED
+
#endif // PROJECT_CONVERTER_3_TO_4_H
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index dc755cab41..c4f5eb777e 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1233,7 +1233,7 @@ void ProjectList::load_project_icon(int p_index) {
// The default project icon is 128×128 to look crisp on hiDPI displays,
// but we want the actual displayed size to be 64×64 on loDPI displays.
- item.control->icon->set_ignore_texture_size(true);
+ item.control->icon->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
item.control->icon->set_custom_minimum_size(Size2(64, 64) * EDSCALE);
item.control->icon->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
@@ -1273,7 +1273,7 @@ ProjectList::Item ProjectList::load_project_data(const String &p_path, bool p_fa
PackedStringArray unsupported_features = ProjectSettings::get_unsupported_features(project_features);
uint64_t last_edited = 0;
- if (FileAccess::exists(conf)) {
+ if (cf_err == OK) {
// The modification date marks the date the project was last edited.
// This is because the `project.godot` file will always be modified
// when editing a project (but not when running it).
@@ -2653,8 +2653,9 @@ ProjectManager::ProjectManager() {
AcceptDialog::set_swap_cancel_ok(swap_cancel_ok == 2);
}
- set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
- set_theme(create_custom_theme());
+ Ref<Theme> theme = create_custom_theme();
+ set_theme(theme);
+ DisplayServer::set_early_window_clear_color_override(true, theme->get_color(SNAME("background"), SNAME("Editor")));
set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
@@ -3008,7 +3009,10 @@ ProjectManager::ProjectManager() {
SceneTree::get_singleton()->get_root()->connect("files_dropped", callable_mp(this, &ProjectManager::_files_dropped));
// Define a minimum window size to prevent UI elements from overlapping or being cut off.
- DisplayServer::get_singleton()->window_set_min_size(Size2(520, 350) * EDSCALE);
+ Window *w = Object::cast_to<Window>(SceneTree::get_singleton()->get_root());
+ if (w) {
+ w->set_min_size(Size2(520, 350) * EDSCALE);
+ }
// Resize the bootsplash window based on Editor display scale EDSCALE.
float scale_factor = MAX(1, EDSCALE);
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 69c21177f9..a43745b70f 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -114,7 +114,7 @@ void ProjectSettingsEditor::_add_setting() {
Variant value;
Variant::construct(Variant::Type(type_box->get_selected_id()), value, nullptr, 0, ce);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Project Setting"));
undo_redo->add_do_property(ps, setting, value);
undo_redo->add_undo_property(ps, setting, ps->has_setting(setting) ? ps->get(setting) : Variant());
@@ -134,7 +134,7 @@ void ProjectSettingsEditor::_delete_setting() {
Variant value = ps->get(setting);
int order = ps->get_order(setting);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete Item"));
undo_redo->add_do_method(ps, "clear", setting);
@@ -223,7 +223,7 @@ void ProjectSettingsEditor::_select_type(Variant::Type p_type) {
void ProjectSettingsEditor::shortcut_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
const Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed()) {
@@ -345,7 +345,7 @@ void ProjectSettingsEditor::_action_added(const String &p_name) {
action["events"] = Array();
action["deadzone"] = 0.5f;
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Input Action"));
undo_redo->add_do_method(ProjectSettings::get_singleton(), "set", name, action);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "clear", name);
@@ -361,7 +361,7 @@ void ProjectSettingsEditor::_action_edited(const String &p_name, const Dictionar
const String property_name = "input/" + p_name;
Dictionary old_val = GLOBAL_GET(property_name);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (old_val["deadzone"] != p_action["deadzone"]) {
// Deadzone Changed
undo_redo->create_action(TTR("Change Action deadzone"));
@@ -370,17 +370,7 @@ void ProjectSettingsEditor::_action_edited(const String &p_name, const Dictionar
} else {
// Events changed
- int act_event_count = ((Array)p_action["events"]).size();
- int old_event_count = ((Array)old_val["events"]).size();
-
- if (act_event_count == old_event_count) {
- undo_redo->create_action(TTR("Edit Input Action Event"));
- } else if (act_event_count > old_event_count) {
- undo_redo->create_action(TTR("Add Input Action Event"));
- } else {
- undo_redo->create_action(TTR("Remove Input Action Event"));
- }
-
+ undo_redo->create_action(TTR("Change Input Action Event(s)"));
undo_redo->add_do_method(ProjectSettings::get_singleton(), "set", property_name, p_action);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set", property_name, old_val);
}
@@ -398,7 +388,7 @@ void ProjectSettingsEditor::_action_removed(const String &p_name) {
Dictionary old_val = GLOBAL_GET(property_name);
int order = ProjectSettings::get_singleton()->get_order(property_name);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Erase Input Action"));
undo_redo->add_do_method(ProjectSettings::get_singleton(), "clear", property_name);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set", property_name, old_val);
@@ -421,7 +411,7 @@ void ProjectSettingsEditor::_action_renamed(const String &p_old_name, const Stri
int order = ProjectSettings::get_singleton()->get_order(old_property_name);
Dictionary action = GLOBAL_GET(old_property_name);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Rename Input Action Event"));
// Do: clear old, set new
undo_redo->add_do_method(ProjectSettings::get_singleton(), "clear", old_property_name);
@@ -451,7 +441,7 @@ void ProjectSettingsEditor::_action_reordered(const String &p_action_name, const
HashMap<String, Variant> action_values;
ProjectSettings::get_singleton()->get_property_list(&props);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Update Input Action Order"));
for (const PropertyInfo &prop : props) {
@@ -527,6 +517,8 @@ void ProjectSettingsEditor::_update_action_map_editor() {
if (is_builtin_input) {
action_info.editable = false;
action_info.icon = builtin_icon;
+ action_info.has_initial = true;
+ action_info.action_initial = ProjectSettings::get_singleton()->property_get_revert(property_name);
}
actions.push_back(action_info);
diff --git a/editor/register_editor_types.cpp b/editor/register_editor_types.cpp
index 5f6b5aa42f..061baaff7e 100644
--- a/editor/register_editor_types.cpp
+++ b/editor/register_editor_types.cpp
@@ -219,6 +219,4 @@ void unregister_editor_types() {
if (EditorPaths::get_singleton()) {
EditorPaths::free();
}
-
- EditorResourcePicker::clear_caches();
}
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index b7b316df64..c3a99e96ef 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -583,7 +583,7 @@ void RenameDialog::rename() {
_iterate_scene(root_node, selected_node_list, &global_count);
if (!to_rename.is_empty()) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Batch Rename"));
// Make sure to iterate reversed so that child nodes will find parents.
diff --git a/editor/scene_create_dialog.cpp b/editor/scene_create_dialog.cpp
index c1dbd4d6bc..c861fadcf0 100644
--- a/editor/scene_create_dialog.cpp
+++ b/editor/scene_create_dialog.cpp
@@ -171,7 +171,9 @@ Node *SceneCreateDialog::create_scene_root() {
break;
case ROOT_USER_INTERFACE: {
Control *gui_ctl = memnew(Control);
+ // Making the root control full rect by default is more useful for resizable UIs.
gui_ctl->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
+ gui_ctl->set_grow_direction_preset(Control::PRESET_FULL_RECT);
root = gui_ctl;
} break;
case ROOT_OTHER:
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index d2d5f249dd..d8f1d92e44 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -231,7 +231,7 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Instantiate Scene(s)"));
for (int i = 0; i < instances.size(); i++) {
@@ -275,7 +275,7 @@ void SceneTreeDock::_replace_with_branch_scene(const String &p_file, Node *base)
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Replace with Branch Scene"));
Node *parent = base->get_parent();
@@ -540,7 +540,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Detach Script"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
undo_redo->add_do_method(EditorNode::get_singleton(), "push_item", (Script *)nullptr);
@@ -611,7 +611,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break; // one or more nodes can not be moved
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (selection.size() == 1) {
undo_redo->create_action(TTR("Move Node In Parent"));
}
@@ -661,7 +661,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Duplicate Node(s)"), UndoRedo::MERGE_DISABLE, selection.front()->get());
undo_redo->add_do_method(editor_selection, "clear");
@@ -778,7 +778,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Make node as Root"));
undo_redo->add_do_method(node->get_parent(), "remove_child", node);
undo_redo->add_do_method(EditorNode::get_singleton(), "set_edited_scene", node);
@@ -1023,7 +1023,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Node *node = e->get();
if (node) {
Node *root = EditorNode::get_singleton()->get_edited_scene();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (!root) {
break;
}
@@ -1099,7 +1099,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
bool enabling = !first_selected->get()->is_unique_name_in_owner();
List<Node *> full_selection = editor_selection->get_full_selected_node_list();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (enabling) {
Vector<Node *> new_unique_nodes;
@@ -1184,7 +1184,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break;
case TOOL_CREATE_USER_INTERFACE: {
Control *node = memnew(Control);
- node->set_anchors_and_offsets_preset(PRESET_FULL_RECT); //more useful for resizable UIs.
+ // Making the root control full rect by default is more useful for resizable UIs.
+ node->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
+ node->set_grow_direction_preset(PRESET_FULL_RECT);
new_node = node;
} break;
@@ -1224,7 +1226,7 @@ void SceneTreeDock::_property_selected(int p_idx) {
}
void SceneTreeDock::_perform_property_drop(Node *p_node, String p_property, Ref<Resource> p_res) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Set %s"), p_property));
undo_redo->add_do_property(p_node, p_property, p_res);
undo_redo->add_undo_property(p_node, p_property, p_node->get(p_property));
@@ -1232,7 +1234,7 @@ void SceneTreeDock::_perform_property_drop(Node *p_node, String p_property, Ref<
}
void SceneTreeDock::add_root_node(Node *p_node) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action_for_history(TTR("New Scene Root"), editor_data->get_current_edited_scene_history_id());
undo_redo->add_do_method(EditorNode::get_singleton(), "set_edited_scene", p_node);
undo_redo->add_do_method(scene_tree, "update_tree");
@@ -1383,7 +1385,7 @@ void SceneTreeDock::_notification(int p_what) {
void SceneTreeDock::_node_replace_owner(Node *p_base, Node *p_node, Node *p_root, ReplaceOwnerMode p_mode) {
if (p_node->get_owner() == p_base && p_node != p_root) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (p_mode) {
case MODE_BIDI: {
bool disable_unique = p_node->is_unique_name_in_owner() && p_root->get_node_or_null(UNIQUE_NODE_PREFIX + String(p_node->get_name())) != nullptr;
@@ -1425,7 +1427,17 @@ void SceneTreeDock::_script_open_request(const Ref<Script> &p_script) {
}
void SceneTreeDock::_push_item(Object *p_object) {
- EditorNode::get_singleton()->push_item(p_object);
+ Node *node = Object::cast_to<Node>(p_object);
+ if (node || !p_object) {
+ // Assume that null object is a Node.
+ EditorNode::get_singleton()->push_node_item(node);
+ } else {
+ EditorNode::get_singleton()->push_item(p_object);
+ }
+
+ if (p_object == nullptr) {
+ EditorNode::get_singleton()->hide_unused_editors(this);
+ }
}
void SceneTreeDock::_handle_select(Node *p_node) {
@@ -1617,7 +1629,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath>
Variant old_variant = p_base->get(propertyname);
Variant updated_variant = old_variant;
if (_check_node_path_recursive(p_base, updated_variant, p_renames)) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_property(p_base, propertyname, updated_variant);
undo_redo->add_undo_property(p_base, propertyname, old_variant);
p_base->set(propertyname, updated_variant);
@@ -1664,7 +1676,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath>
}
HashMap<Node *, NodePath>::Iterator found_path = p_renames->find(n);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (found_path) {
if (found_path->value == NodePath()) {
//will be erased
@@ -1831,7 +1843,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
// Sort by tree order, so re-adding is easy.
p_nodes.sort_custom<Node::Comparator>();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Reparent Node"), UndoRedo::MERGE_DISABLE, p_nodes[0]);
HashMap<Node *, NodePath> path_renames;
@@ -1966,7 +1978,7 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Attach Script"), UndoRedo::MERGE_DISABLE, selected.front()->get());
for (Node *E : selected) {
Ref<Script> existing = E->get_script();
@@ -1992,7 +2004,7 @@ void SceneTreeDock::_shader_created(Ref<Shader> p_shader) {
Ref<Shader> existing = selected_shader_material->get_shader();
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Shader"));
undo_redo->add_do_method(selected_shader_material.ptr(), "set_shader", p_shader);
undo_redo->add_undo_method(selected_shader_material.ptr(), "set_shader", existing);
@@ -2002,13 +2014,13 @@ void SceneTreeDock::_shader_created(Ref<Shader> p_shader) {
void SceneTreeDock::_script_creation_closed() {
script_create_dialog->disconnect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
script_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed));
- script_create_dialog->disconnect("cancelled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
+ script_create_dialog->disconnect("canceled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
}
void SceneTreeDock::_shader_creation_closed() {
shader_create_dialog->disconnect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created));
shader_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
- shader_create_dialog->disconnect("cancelled", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
+ shader_create_dialog->disconnect("canceled", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
}
void SceneTreeDock::_toggle_editable_children_from_selection() {
@@ -2059,9 +2071,9 @@ void SceneTreeDock::_delete_confirm(bool p_cut) {
return;
}
- EditorNode::get_singleton()->get_editor_plugins_over()->make_visible(false);
+ EditorNode::get_singleton()->hide_unused_editors(this);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(p_cut ? TTR("Cut Node(s)") : TTR("Remove Node(s)"), UndoRedo::MERGE_DISABLE, remove_list.front()->get());
bool entire_scene = false;
@@ -2186,12 +2198,12 @@ void SceneTreeDock::_do_create(Node *p_parent) {
ERR_FAIL_COND(!child);
String new_name = p_parent->validate_child_name(child);
- if (GLOBAL_GET("editor/node_naming/name_casing").operator int() != NAME_CASING_PASCAL_CASE) {
+ if (GLOBAL_GET("editor/naming/node_name_casing").operator int() != NAME_CASING_PASCAL_CASE) {
new_name = adjust_name_casing(new_name);
}
child->set_name(new_name);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action_for_history(TTR("Create Node"), editor_data->get_current_edited_scene_history_id());
if (edited_scene) {
@@ -2260,7 +2272,7 @@ void SceneTreeDock::_create() {
List<Node *> selection = editor_selection->get_selected_node_list();
ERR_FAIL_COND(selection.size() <= 0);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change type of node(s)"), UndoRedo::MERGE_DISABLE, selection.front()->get());
for (Node *n : selection) {
@@ -2394,7 +2406,7 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop
}
//p_remove_old was added to support undo
if (p_remove_old) {
- EditorNode::get_undo_redo()->clear_history();
+ EditorUndoRedoManager::get_singleton()->clear_history();
}
newnode->set_name(newname);
@@ -2616,7 +2628,7 @@ void SceneTreeDock::_script_dropped(String p_file, NodePath p_to) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (Input::get_singleton()->is_key_pressed(Key::CTRL)) {
Object *obj = ClassDB::instantiate(scr->get_instance_base_type());
ERR_FAIL_NULL(obj);
@@ -3088,7 +3100,7 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) {
script_create_dialog->connect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
script_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed));
- script_create_dialog->connect("cancelled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
+ script_create_dialog->connect("canceled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
script_create_dialog->set_inheritance_base_type("Node");
script_create_dialog->config(inherits, path);
script_create_dialog->popup_centered();
@@ -3130,7 +3142,7 @@ void SceneTreeDock::attach_shader_to_selected(int p_preferred_mode) {
shader_create_dialog->connect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created));
shader_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
- shader_create_dialog->connect("cancelled", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
+ shader_create_dialog->connect("canceled", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
shader_create_dialog->config(path, true, true, -1, p_preferred_mode);
shader_create_dialog->popup_centered();
}
@@ -3188,7 +3200,7 @@ List<Node *> SceneTreeDock::paste_nodes() {
owner = paste_parent;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Paste Node(s)"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
ur->add_do_method(editor_selection, "clear");
@@ -3608,7 +3620,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
scene_tree->connect("script_dropped", callable_mp(this, &SceneTreeDock::_script_dropped));
scene_tree->connect("nodes_dragged", callable_mp(this, &SceneTreeDock::_nodes_drag_begin));
- scene_tree->get_scene_tree()->connect("item_double_clicked", callable_mp(this, &SceneTreeDock::_focus_node));
+ scene_tree->get_scene_tree()->connect("item_icon_double_clicked", callable_mp(this, &SceneTreeDock::_focus_node));
editor_selection->connect("selection_changed", callable_mp(this, &SceneTreeDock::_selection_changed));
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index dad584ea92..42801cdaf1 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -68,7 +68,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
Node *n = get_node(np);
ERR_FAIL_COND(!n);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (p_id == BUTTON_SUBSCENE) {
if (n == get_scene_node()) {
if (n && n->get_scene_inherited_state().is_valid()) {
@@ -176,7 +176,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
void SceneTreeEditor::_toggle_visible(Node *p_node) {
if (p_node->has_method("is_visible") && p_node->has_method("set_visible")) {
bool v = bool(p_node->call("is_visible"));
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(p_node, "set_visible", !v);
undo_redo->add_undo_method(p_node, "set_visible", v);
}
@@ -677,7 +677,7 @@ bool SceneTreeEditor::_item_matches_all_terms(TreeItem *p_item, PackedStringArra
for (int i = 0; i < p_terms.size(); i++) {
String term = p_terms[i];
- // Recognise special filter.
+ // Recognize special filter.
if (term.contains(":") && !term.get_slicec(':', 0).is_empty()) {
String parameter = term.get_slicec(':', 0);
String argument = term.get_slicec(':', 1);
@@ -971,7 +971,7 @@ void SceneTreeEditor::_renamed() {
String raw_new_name = which->get_text(0);
if (raw_new_name.strip_edges().is_empty()) {
// If name is empty, fallback to class name.
- if (GLOBAL_GET("editor/node_naming/name_casing").operator int() != NAME_CASING_PASCAL_CASE) {
+ if (GLOBAL_GET("editor/naming/node_name_casing").operator int() != NAME_CASING_PASCAL_CASE) {
raw_new_name = Node::adjust_name_casing(n->get_class());
} else {
raw_new_name = n->get_class();
@@ -993,6 +993,10 @@ void SceneTreeEditor::_renamed() {
}
if (new_name == n->get_name()) {
+ if (which->get_text(0).is_empty()) {
+ which->set_text(0, new_name);
+ }
+
return;
}
@@ -1011,7 +1015,7 @@ void SceneTreeEditor::_renamed() {
which->set_metadata(0, n->get_path());
emit_signal(SNAME("node_renamed"));
} else {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Rename Node"));
emit_signal(SNAME("node_prerename"), n, new_name);
undo_redo->add_do_method(this, "_rename_node", n->get_instance_id(), new_name);
@@ -1369,10 +1373,6 @@ void SceneTreeEditor::_bind_methods() {
ClassDB::bind_method("_rename_node", &SceneTreeEditor::_rename_node);
ClassDB::bind_method("_test_update_tree", &SceneTreeEditor::_test_update_tree);
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &SceneTreeEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &SceneTreeEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &SceneTreeEditor::drop_data_fw);
-
ClassDB::bind_method(D_METHOD("update_tree"), &SceneTreeEditor::update_tree);
ADD_SIGNAL(MethodInfo("node_selected"));
@@ -1415,7 +1415,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
add_child(tree);
- tree->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(tree, SceneTreeEditor);
if (p_can_rename) {
tree->set_allow_rmb_select(true);
tree->connect("item_mouse_selected", callable_mp(this, &SceneTreeEditor::_rmb_select));
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index 4ac0a5b672..800de431eb 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -70,7 +70,7 @@ class ShaderGlobalsEditorInterface : public Object {
GDCLASS(ShaderGlobalsEditorInterface, Object)
void _set_var(const StringName &p_name, const Variant &p_value, const Variant &p_prev_value) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Shader Global Variable"));
undo_redo->add_do_method(RS::get_singleton(), "global_shader_parameter_set", p_name, p_value);
@@ -399,7 +399,7 @@ void ShaderGlobalsEditor::_variable_added() {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Variant value = create_var(RS::GlobalShaderParameterType(variable_type->get_selected()));
@@ -418,7 +418,7 @@ void ShaderGlobalsEditor::_variable_added() {
}
void ShaderGlobalsEditor::_variable_deleted(const String &p_variable) {
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Shader Global Parameter"));
undo_redo->add_do_method(RS::get_singleton(), "global_shader_parameter_remove", p_variable);
diff --git a/editor/translations/af.po b/editor/translations/af.po
index a705eb58fb..605b30cf67 100644
--- a/editor/translations/af.po
+++ b/editor/translations/af.po
@@ -11201,7 +11201,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index 204dd9a41b..327332ae18 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -70,13 +70,14 @@
# xX-Void-Xx <arandomdude75@gmail.com>, 2022.
# أحمد النور <ahmed2699@gmail.com>, 2022.
# Commander Gordon <gordoncommander@gmail.com>, 2022.
+# Abdulrahman <abdelrahman.ramadan686@gmail.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-10-29 23:55+0000\n"
-"Last-Translator: Commander Gordon <gordoncommander@gmail.com>\n"
+"PO-Revision-Date: 2022-12-21 07:01+0000\n"
+"Last-Translator: Abdulrahman <abdelrahman.ramadan686@gmail.com>\n"
"Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/"
"godot/ar/>\n"
"Language: ar\n"
@@ -85,7 +86,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
-"X-Generator: Weblate 4.14.2-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -877,7 +878,7 @@ msgstr "مطابقة المسافات الطويلة"
#: core/project_settings.cpp
msgid "Compression Level"
-msgstr "ضغط المستوى"
+msgstr "مستوى الضغط"
#: core/project_settings.cpp
msgid "Window Log Size"
@@ -11177,7 +11178,7 @@ msgstr "نظر من الخلف"
msgid " [auto]"
msgstr " [auto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [البوابات مفعلة]"
@@ -28516,6 +28517,5 @@ msgid "Log Active Async Compiles Count"
msgstr ""
#: servers/visual_server.cpp
-#, fuzzy
msgid "Shader Cache Size (MB)"
-msgstr "غيّر حجم الكاميرا"
+msgstr "حجم ذاكرة التظليل المؤقتة (مب)"
diff --git a/editor/translations/az.po b/editor/translations/az.po
index b6b36d99e5..90dfffe257 100644
--- a/editor/translations/az.po
+++ b/editor/translations/az.po
@@ -10789,7 +10789,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index 262a6825a6..728ffabe29 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -10946,7 +10946,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index df79cd5d84..b601d6d668 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -13,13 +13,14 @@
# Hasibul Hasan <d1hasib@yahoo.com>, 2020.
# saitama <atik.wowspace@gmail.com>, 2022.
# Joysankar Majumdar <joymajumdar15828@gmail.com>, 2022.
+# Safuan <safuanhossain12616@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-06-29 10:04+0000\n"
-"Last-Translator: Joysankar Majumdar <joymajumdar15828@gmail.com>\n"
+"PO-Revision-Date: 2023-01-09 20:42+0000\n"
+"Last-Translator: Safuan <safuanhossain12616@gmail.com>\n"
"Language-Team: Bengali <https://hosted.weblate.org/projects/godot-engine/"
"godot/bn/>\n"
"Language: bn\n"
@@ -27,7 +28,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Weblate 4.13.1-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -50,14 +51,12 @@ msgid "V-Sync Enabled"
msgstr "ভি-সিঙ্ক সক্রিয় করুন"
#: core/bind/core_bind.cpp main/main.cpp
-#, fuzzy
msgid "V-Sync Via Compositor"
msgstr "কম্পসিটর দ্বারা ভি-সিঙ্ক করা"
#: core/bind/core_bind.cpp main/main.cpp
-#, fuzzy
msgid "Delta Smoothing"
-msgstr "ডেল্টা মসৃণ করন"
+msgstr "ডেল্টা মসৃণ"
#: core/bind/core_bind.cpp
#, fuzzy
@@ -86,7 +85,6 @@ msgstr "পর্দা ঝোঁক/ উপস্থাপন"
#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp
#: platform/uwp/os_uwp.cpp
-#, fuzzy
msgid "Window"
msgstr "উইন্ডো"
@@ -156,9 +154,8 @@ msgid "Target FPS"
msgstr "লক্ষ্য-এফপিএস(ফ্রেম-প্রতি-সেকেন্ড)"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Time Scale"
-msgstr "টাইম-স্কেল নোড"
+msgstr "টাইম-স্কেল"
#: core/bind/core_bind.cpp main/main.cpp
#, fuzzy
@@ -11772,7 +11769,7 @@ msgstr "পরিপ্রেক্ষিত (Perspective)"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/br.po b/editor/translations/br.po
index 0cfc29b4d1..41d6ac8ee8 100644
--- a/editor/translations/br.po
+++ b/editor/translations/br.po
@@ -10666,7 +10666,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index d3ced0a876..ab408a0d9f 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -11292,7 +11292,7 @@ msgstr "Perspectiva"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index 173d38c85c..ee5bb962be 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -32,13 +32,13 @@
# JoeMoos <josephmoose13@gmail.com>, 2022.
# Mirinek <mirek.nozicka77@gmail.com>, 2022.
# Lubomír Baloun <lubosbaloun@gmail.com>, 2022.
-# Ondřej Pavelka <flamekick97@gmail.com>, 2022.
+# Ondřej Pavelka <flamekick97@gmail.com>, 2022, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-12-12 09:46+0000\n"
+"PO-Revision-Date: 2023-01-06 09:58+0000\n"
"Last-Translator: Ondřej Pavelka <flamekick97@gmail.com>\n"
"Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/"
"cs/>\n"
@@ -47,7 +47,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -251,9 +251,8 @@ msgstr "Data"
#: modules/gdscript/language_server/gdscript_language_server.cpp
#: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h
#: scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Network"
-msgstr "Síťový profiler"
+msgstr "Síť"
#: core/io/file_access_network.cpp
#, fuzzy
@@ -605,9 +604,8 @@ msgid "Application"
msgstr "Akce"
#: core/project_settings.cpp main/main.cpp
-#, fuzzy
msgid "Config"
-msgstr "Nastavení přichycení"
+msgstr "Konfigurace"
#: core/project_settings.cpp
#, fuzzy
@@ -1582,9 +1580,8 @@ msgid "Editors"
msgstr "Editory"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Confirm Insert Track"
-msgstr "Animace: Vložit stopu a klíč"
+msgstr "Potvrdit vložení stopy"
#. TRANSLATORS: %s will be replaced by a phrase describing the target of track.
#: editor/animation_track_editor.cpp
@@ -4547,17 +4544,16 @@ msgid "Version Control"
msgstr "Správa verzí"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Username"
-msgstr "Přejmenovat"
+msgstr "Uživatelské jméno"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Public Key Path"
-msgstr ""
+msgstr "Cesta k veřejnému klíči SSH"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Private Key Path"
-msgstr ""
+msgstr "Cesta k soukromému klíči SSH"
#: editor/editor_node.cpp
msgid "Dock Position"
@@ -5191,12 +5187,11 @@ msgstr "Ladicí program"
#: editor/editor_profiler.cpp
msgid "Profiler Frame History Size"
-msgstr ""
+msgstr "Velikost historie profilovacího rámce"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Profiler Frame Max Functions"
-msgstr "Přejmenovat funkci"
+msgstr "Maximální počet funkcí profilovacího rámce"
#: editor/editor_properties.cpp
msgid "Edit Text:"
@@ -5723,82 +5718,78 @@ msgid "Show Members Overview"
msgstr "Zobrazit přehled členů"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Files"
-msgstr "Soubor"
+msgstr "Soubory"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Trim Trailing Whitespace On Save"
-msgstr "Osekat koncové mezery"
+msgstr "Osekat koncové mezery při uložení"
#: editor/editor_settings.cpp
msgid "Autosave Interval Secs"
-msgstr ""
+msgstr "Interval automatického ukládání v sekundách"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
msgid "Restore Scripts On Load"
-msgstr ""
+msgstr "Obnovit skripty při načtení"
#: editor/editor_settings.cpp
msgid "Auto Reload And Parse Scripts On Save"
-msgstr ""
+msgstr "Automaticky aktualizovat a parsovat skripty při uložení"
#: editor/editor_settings.cpp
msgid "Auto Reload Scripts On External Change"
-msgstr ""
+msgstr "Automaticky aktualizovat skripty při externí změně"
#: editor/editor_settings.cpp
msgid "Create Signal Callbacks"
-msgstr ""
+msgstr "Vytvořit callback signálu"
#: editor/editor_settings.cpp
msgid "Sort Members Outline Alphabetically"
-msgstr ""
+msgstr "Seřadit přehled členů abecedně"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Cursor"
-msgstr ""
+msgstr "Kurzor"
#: editor/editor_settings.cpp
msgid "Scroll Past End Of File"
-msgstr ""
+msgstr "Skrolovat za konec souboru"
#: editor/editor_settings.cpp
msgid "Block Caret"
-msgstr ""
+msgstr "Blokovat stříšku"
#: editor/editor_settings.cpp
msgid "Caret Blink"
-msgstr ""
+msgstr "Blikání stříšky"
#: editor/editor_settings.cpp
msgid "Caret Blink Speed"
-msgstr ""
+msgstr "Rychlost blikání stříšky"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Right Click Moves Caret"
-msgstr "Pravý klik pro přidání bodu"
+msgstr "Pravý klik posune stříšku"
#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp
#: modules/gdscript/gdscript_editor.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion"
-msgstr "Kopírovat výběr"
+msgstr "Dokončování"
#: editor/editor_settings.cpp
msgid "Idle Parse Delay"
-msgstr ""
+msgstr "Zpoždění parsování při nečinnosti"
#: editor/editor_settings.cpp
msgid "Auto Brace Complete"
-msgstr ""
+msgstr "Automatické doplnění závorky"
#: editor/editor_settings.cpp
msgid "Code Complete Delay"
-msgstr ""
+msgstr "Zpoždění dokončení kódu"
#: editor/editor_settings.cpp
msgid "Put Callhint Tooltip Below Current Line"
@@ -5806,87 +5797,76 @@ msgstr ""
#: editor/editor_settings.cpp
msgid "Callhint Tooltip Offset"
-msgstr ""
+msgstr "Posunutí nápovědy"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Complete File Paths"
-msgstr "Kopírovat cestu k uzlu"
+msgstr "Dokončit cestu k souboru"
#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp
-#, fuzzy
msgid "Add Type Hints"
-msgstr "Přidat typ"
+msgstr "Přidat nápovědy typů"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Use Single Quotes"
-msgstr "Nová dlaždice"
+msgstr "Používat jednoduché závorky"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Help Index"
-msgstr "Zobrazit pomocníky"
+msgstr "Zobrazit index nápovědy"
#: editor/editor_settings.cpp
msgid "Help Font Size"
-msgstr ""
+msgstr "Velikost fontu nápovědy"
#: editor/editor_settings.cpp
msgid "Help Source Font Size"
-msgstr ""
+msgstr "Velikost fontu zdroje nápovědy"
#: editor/editor_settings.cpp
msgid "Help Title Font Size"
-msgstr ""
+msgstr "Velikost fontu titulku nápovědy"
#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Mřížková mapa"
#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Pick Distance"
-msgstr "Vybrat vzdálenost:"
+msgstr "Výběrová vzdálenost"
#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Preview Size"
-msgstr "Náhled"
+msgstr "Velikost náhledu"
#: editor/editor_settings.cpp
msgid "Primary Grid Color"
-msgstr ""
+msgstr "Primární barva mřížky"
#: editor/editor_settings.cpp
msgid "Secondary Grid Color"
-msgstr ""
+msgstr "Sekundární barva mřížky"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Selection Box Color"
-msgstr "Pouze výběr"
+msgstr "Barva výběrového pole"
#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
-#, fuzzy
msgid "3D Gizmos"
-msgstr "Gizma"
+msgstr "3D Rukojeti"
#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
-#, fuzzy
msgid "Gizmo Colors"
-msgstr "Emisní barvy"
+msgstr "Barvy rukojetí"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Instanced"
-msgstr "Instance"
+msgstr "Instancováno"
#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Joint"
msgstr "Bod"
@@ -5897,12 +5877,11 @@ msgstr "Bod"
#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
msgid "Shape"
-msgstr ""
+msgstr "Tvar"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Primary Grid Steps"
-msgstr "Krok mřížky:"
+msgstr "Primární stupně mřížky"
#: editor/editor_settings.cpp
msgid "Grid Size"
@@ -5910,35 +5889,31 @@ msgstr "Velikost mřížky"
#: editor/editor_settings.cpp
msgid "Grid Division Level Max"
-msgstr ""
+msgstr "Maximální úroveň rozdělení mřížky"
#: editor/editor_settings.cpp
msgid "Grid Division Level Min"
-msgstr ""
+msgstr "Minimální úroveň rozdělení mřížky"
#: editor/editor_settings.cpp
msgid "Grid Division Level Bias"
-msgstr ""
+msgstr "Sklon úrovně rozdělení mřížky"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid XZ Plane"
-msgstr "Vykreslit GridMap"
+msgstr "Rovina XZ mřížky"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid XY Plane"
-msgstr "Vykreslit GridMap"
+msgstr "Rovina XY mřížky"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid YZ Plane"
-msgstr "Vykreslit GridMap"
+msgstr "Rovina YZ mřížky"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default FOV"
-msgstr "Výchozí"
+msgstr "Výchozí FOV"
#: editor/editor_settings.cpp
#, fuzzy
@@ -5946,222 +5921,194 @@ msgid "Default Z Near"
msgstr "Výchozí motiv"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Z Far"
-msgstr "Výchozí"
+msgstr "Výchozí Z limit dálky"
#: editor/editor_settings.cpp
msgid "Lightmap Baking Number Of CPU Threads"
-msgstr ""
+msgstr "Počet CPU vláken při zapékání světelných map"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Navigation Scheme"
-msgstr "Navigační režim"
+msgstr "Schéma navigace"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Invert Y Axis"
-msgstr "Editovat osu Y"
+msgstr "Invertovat osu Y"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Invert X Axis"
-msgstr "Editovat osu X"
+msgstr "Invertovat osu X"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Style"
-msgstr "Zmenšit"
+msgstr "Styl přiblížení"
#: editor/editor_settings.cpp
msgid "Emulate Numpad"
-msgstr ""
+msgstr "Emulovat numerickou klávesnici"
#: editor/editor_settings.cpp
msgid "Emulate 3 Button Mouse"
-msgstr ""
+msgstr "Emulovat třítlačítkovou myš"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Orbit Modifier"
-msgstr "Seřadit podle první změny"
+msgstr "Modifikátor orbitu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Modifier"
-msgstr "Režim posouvání"
+msgstr "Modifikátor posouvání"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Modifier"
-msgstr "Úpravy"
+msgstr "Modifikátor přiblížení"
#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Warped Mouse Panning"
-msgstr ""
+msgstr "Zkreslené posouvání myši"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Navigation Feel"
-msgstr "Navigační režim"
+msgstr "Pocit navigace"
#: editor/editor_settings.cpp
msgid "Orbit Sensitivity"
-msgstr ""
+msgstr "Citlivost orbitu"
#: editor/editor_settings.cpp
msgid "Orbit Inertia"
-msgstr ""
+msgstr "Setrvačnost orbitu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Translation Inertia"
-msgstr "Překlady"
+msgstr "Setrvačnost překladu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Inertia"
-msgstr "Zvětšit"
+msgstr "Setrvačnost přiblížení"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook"
-msgstr "Volný pohled nahoru"
+msgstr "Volný pohled"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Navigation Scheme"
-msgstr "Vytvořit Navigation Mesh"
+msgstr "Navigační schéma volného pohledu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Sensitivity"
-msgstr "Volný pohled doleva"
+msgstr "Senzitivita volného pohledu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Inertia"
-msgstr "Volný pohled doleva"
+msgstr "Setrvačnost volného pohledu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Base Speed"
-msgstr "Rychlost volného pohledu"
+msgstr "Základní rychlost volného pohledu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Activation Modifier"
-msgstr "Zpomalení volného pohledu"
+msgstr "Modifikátor aktivace volného pohledu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Speed Zoom Link"
-msgstr "Rychlost volného pohledu"
+msgstr "Link rychlo přiblížení volného pohledu"
#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Grid Color"
-msgstr "Vyberte barvu"
+msgstr "Barva mřížky"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Guides Color"
-msgstr "Vyberte barvu"
+msgstr "Barva vodítek"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Smart Snapping Line Color"
-msgstr "Chytré přichcování"
+msgstr "Barva linky chytrého přichycování"
#: editor/editor_settings.cpp
msgid "Bone Width"
-msgstr ""
+msgstr "Šířka kosti"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Color 1"
-msgstr "Odstranit položky třídy"
+msgstr "Barva kosti 1"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Color 2"
-msgstr "Odstranit položky třídy"
+msgstr "Barva kosti 2"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Selected Color"
-msgstr "Konfigurace vybraného profilu:"
+msgstr "Barva vybrané kosti"
#: editor/editor_settings.cpp
msgid "Bone IK Color"
-msgstr ""
+msgstr "Barva IK kosti"
#: editor/editor_settings.cpp
msgid "Bone Outline Color"
-msgstr ""
+msgstr "Barva obrysu kosti"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Outline Size"
-msgstr "Velikost obrysu:"
+msgstr "Velikost obrysu kosti"
#: editor/editor_settings.cpp
+#, fuzzy
msgid "Viewport Border Color"
-msgstr ""
+msgstr "Barva ohraničení výřezu"
#: editor/editor_settings.cpp
+#, fuzzy
msgid "Constrain Editor View"
-msgstr ""
+msgstr "Omezit pohled editoru"
#: editor/editor_settings.cpp
msgid "Simple Panning"
-msgstr ""
+msgstr "Jednoduché posouvání"
#: editor/editor_settings.cpp
msgid "Scroll To Pan"
-msgstr ""
+msgstr "Skrollovat pro posun"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Speed"
-msgstr "Rychlost:"
+msgstr "Rychlost posunu"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Poly Editor"
-msgstr "Polygon 2D UV Editor"
+msgstr "Editor polygonů"
#: editor/editor_settings.cpp
msgid "Point Grab Radius"
-msgstr ""
+msgstr "Dosah pro uchopení bodu"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Show Previous Outline"
-msgstr "Předchozí rovina"
+msgstr "Zobrazit předchozí obrys"
#: editor/editor_settings.cpp editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Autorename Animation Tracks"
-msgstr "Přejmenovat animaci"
+msgstr "Automaticky přejmenovat animační stopy"
#: editor/editor_settings.cpp
msgid "Default Create Bezier Tracks"
-msgstr ""
+msgstr "Výchozí vytváření beziérových stop"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Create Reset Tracks"
-msgstr "Vytvořit RESET stopu/stopy"
+msgstr "Výchozí vytváření resetovacích stop"
#: editor/editor_settings.cpp
msgid "Onion Layers Past Color"
-msgstr ""
+msgstr "Barva cibulových vrstev minulosti"
#: editor/editor_settings.cpp
msgid "Onion Layers Future Color"
-msgstr ""
+msgstr "Barva cibulových vrstev budoucnosti"
#: editor/editor_settings.cpp
msgid "Visual Editors"
@@ -6169,11 +6116,11 @@ msgstr "Vizuální editory"
#: editor/editor_settings.cpp
msgid "Minimap Opacity"
-msgstr ""
+msgstr "Průhlednost minimapy"
#: editor/editor_settings.cpp
msgid "Window Placement"
-msgstr ""
+msgstr "Umístění okna"
#: editor/editor_settings.cpp scene/2d/back_buffer_copy.cpp scene/2d/sprite.cpp
#: scene/2d/visibility_notifier_2d.cpp scene/3d/sprite_3d.cpp
@@ -6183,49 +6130,42 @@ msgid "Rect"
msgstr "Celý obdélník"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Rect Custom Position"
-msgstr "Nastavit bod z křivky"
+msgstr "Vlastní pozice okna"
#: editor/editor_settings.cpp platform/android/export/export_plugin.cpp
msgid "Screen"
msgstr ""
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Auto Save"
-msgstr "Automatický řez"
+msgstr "Automatické ukládání"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Save Before Running"
-msgstr "Uložit scénu před spuštěním..."
+msgstr "Uložit před spuštěním"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Font Size"
-msgstr "Pohled zepředu"
+msgstr "Velikost fontu"
#: editor/editor_settings.cpp
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Remote Host"
-msgstr "Vzdálený "
+msgstr "Vzdálený host"
#: editor/editor_settings.cpp
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Remote Port"
-msgstr "Odstranit bod"
+msgstr "Vzdálený port"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Editor SSL Certificates"
-msgstr "Nastavení editoru"
+msgstr "SSL certifikáty editoru"
#: editor/editor_settings.cpp
msgid "HTTP Proxy"
-msgstr ""
+msgstr "HTTP Proxy"
#: editor/editor_settings.cpp
msgid "Host"
@@ -6244,9 +6184,8 @@ msgstr "Správce projektů"
#. TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects.
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Sorting Order"
-msgstr "Přejmenování složky:"
+msgstr "Seřadit podle"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Symbol Color"
@@ -6322,11 +6261,11 @@ msgstr "Číslo řádku:"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Caret Color"
-msgstr "Barva vynechávky"
+msgstr "Barva stříšky"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Caret Background Color"
-msgstr "Barva pozadí vynechávky"
+msgstr "Barva pozadí stříšky"
#: editor/editor_settings.cpp
msgid "Text Selected Color"
@@ -7309,9 +7248,8 @@ msgid "Use Named Skins"
msgstr "Použít škálovací přichytávání"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "External Files"
-msgstr "Otevřít soubor"
+msgstr "Externí soubory"
#: editor/import/resource_importer_scene.cpp
msgid "Store In Subdir"
@@ -8293,7 +8231,7 @@ msgstr "Vynutit bílou modulaci"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Include Gizmos (3D)"
-msgstr "Zahrnout Gizmos (3D)"
+msgstr "Zahrnout rukojeti (3D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Pin AnimationPlayer"
@@ -8681,9 +8619,8 @@ msgid "Download Error"
msgstr "Chyba při stahování"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Available URLs"
-msgstr "Dostupné profily:"
+msgstr "Dostupné URL"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
@@ -8771,7 +8708,7 @@ msgstr "Kategorie:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Site:"
-msgstr "Web:"
+msgstr "Stránka:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Support"
@@ -9346,7 +9283,7 @@ msgstr "Vytvořit kosti z uzlů"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Clear Custom Bones"
-msgstr "Vymazat kosti"
+msgstr "Vymazat vlastní kosti"
#. TRANSLATORS: Noun, name of the 2D/3D View menus.
#: editor/plugins/canvas_item_editor_plugin.cpp
@@ -9715,7 +9652,7 @@ msgstr "Pravý klik pro přidání bodu"
#: editor/plugins/gi_probe_editor_plugin.cpp
msgid "Bake GI Probe"
-msgstr "Zapéct GI probe"
+msgstr "Zapéct GI sondu"
#: editor/plugins/gradient_editor_plugin.cpp
msgid "Gradient Edited"
@@ -10338,7 +10275,7 @@ msgstr "Rozdělit segment (v křivce)"
#: editor/plugins/physical_bone_plugin.cpp
msgid "Move Joint"
-msgstr "Přesunout kloub"
+msgstr "Posunout bod"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
@@ -10885,14 +10822,12 @@ msgid "External"
msgstr "Externí"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Use External Editor"
-msgstr "Debugovat v externím editoru"
+msgstr "Používat externí editor"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Exec Path"
-msgstr "Exportovat cestu"
+msgstr "Cesta k spuštění"
#: editor/plugins/script_editor_plugin.cpp
msgid "Script Temperature Enabled"
@@ -10920,11 +10855,11 @@ msgstr "Seřadit skripty podle"
#: editor/plugins/script_editor_plugin.cpp
msgid "List Script Names As"
-msgstr "Zobrazit názvy seznamu skriptů jako"
+msgstr "Zobrazit seznam názvů skriptů jako"
#: editor/plugins/script_editor_plugin.cpp
msgid "Exec Flags"
-msgstr ""
+msgstr "Parametry spuštění"
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Scripts"
@@ -11254,7 +11189,7 @@ msgstr "Perspektivní"
msgid " [auto]"
msgstr " [auto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [aktivní portály]"
@@ -11462,35 +11397,35 @@ msgstr "Není k dispozici při použití vykreslovacího modulu GLES2."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Left"
-msgstr "Volný pohled doleva"
+msgstr "Levý volný pohled"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Right"
-msgstr "Volný pohled doprava"
+msgstr "Pravý volný pohled"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Forward"
-msgstr "Volný pohled vpřed"
+msgstr "Přední volný pohled"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Backwards"
-msgstr "Volný pohled dozadu"
+msgstr "Zadní volný pohled"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Up"
-msgstr "Volný pohled nahoru"
+msgstr "Horní volný pohled"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Down"
-msgstr "Volný pohled dolů"
+msgstr "Dolní volný pohled"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Speed Modifier"
-msgstr "Rychlost volného pohledu"
+msgstr "Modifikátor rychlosti volného pohybu"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Slow Modifier"
-msgstr "Zpomalení volného pohledu"
+msgstr "Modifikátor zpomalení volného pohybu"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Toggle Camera Preview"
@@ -11756,16 +11691,15 @@ msgstr "Po"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Size"
-msgstr ""
+msgstr "Nastavení velikosti rukojeti"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Opacity"
-msgstr ""
+msgstr "Nastavení průhlednosti rukojeti"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Show Viewport Rotation Gizmo"
-msgstr "Uzamknout rotaci pohledu"
+msgstr "Zobrazit tlačítko rotace zobrazení"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unnamed Gizmo"
@@ -12748,55 +12682,46 @@ msgid "Clear Transform"
msgstr "Promazat transformaci"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Tile Map"
-msgstr "Nakreslit TileMap"
+msgstr "Mapa dlaždic"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Palette Min Width"
-msgstr ""
+msgstr "Minimální šířka palety"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Palette Item H Separation"
-msgstr "Nazvaný oddělovač"
+msgstr "H oddělování paletových položek"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Show Tile Names"
-msgstr "Zobrazit všechny jazyky"
+msgstr "Zobrazit názvy dlaždic"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Show Tile Ids"
-msgstr "Zobrazit pravítka"
+msgstr "Zobrazit Id dlaždic"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Sort Tiles By Name"
-msgstr "Seřadit soubory"
+msgstr "Řadit dlaždice podle názvu"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Bucket Fill Preview"
-msgstr "Vyplnit barvou"
+msgstr "Náhled vyplnění kbelíkem"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Editor Side"
-msgstr "Editor"
+msgstr "Strana editoru"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Display Grid"
-msgstr "Rentgen pohled"
+msgstr "Zobrazit mřížku"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Axis Color"
-msgstr "Vyberte barvu"
+msgstr "Barva osy"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Add Texture(s) to TileSet."
@@ -13331,7 +13256,7 @@ msgstr "Resetovat"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Version Control System"
-msgstr "Verzování (VCS)"
+msgstr "Systémy pro správu verzí"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Initialize"
@@ -13344,11 +13269,11 @@ msgstr "Odstranit bod"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Select SSH public key path"
-msgstr ""
+msgstr "Vybrat cestu k veřejnému klíči SSH"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Select SSH private key path"
-msgstr ""
+msgstr "Vybrat cestu k veřejnému klíči SSH"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Passphrase"
@@ -16148,15 +16073,15 @@ msgstr "Filtrovat dlaždice"
#: editor/script_editor_debugger.cpp
msgid "Auto Switch To Remote Scene Tree"
-msgstr ""
+msgstr "Automaticky přepnout na vzdálený strom scén"
#: editor/script_editor_debugger.cpp
msgid "Remote Scene Tree Refresh Interval"
-msgstr ""
+msgstr "Interval obnovení vzdáleného stromu scén"
#: editor/script_editor_debugger.cpp
msgid "Remote Inspect Refresh Interval"
-msgstr ""
+msgstr "Interval obnovení vzdálené kontroly"
#: editor/script_editor_debugger.cpp
msgid "Network Profiler"
@@ -16254,7 +16179,7 @@ msgstr "Změnit rádius světla"
#: editor/spatial_editor_gizmos.cpp
msgid "Stream Player 3D"
-msgstr ""
+msgstr "Stream Player 3D"
#: editor/spatial_editor_gizmos.cpp
msgid "Change AudioStreamPlayer3D Emission Angle"
@@ -16264,7 +16189,7 @@ msgstr "Změnit úhel vysílání uzlu AudioStreamPlayer3D"
#: platform/osx/export/export.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Camera"
-msgstr ""
+msgstr "Kamera"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
@@ -16276,7 +16201,7 @@ msgstr "Změnit velikost kamery"
#: editor/spatial_editor_gizmos.cpp
msgid "Visibility Notifier"
-msgstr ""
+msgstr "Oznamovatel viditelnosti"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Notifier AABB"
@@ -16287,23 +16212,20 @@ msgid "Change Particles AABB"
msgstr "Změnit částice AABB"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Reflection Probe"
-msgstr "Vybrat vlastnost"
+msgstr "Reflexní sonda"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
msgstr "Změnit rozsahy Probe"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "GI Probe"
-msgstr "Zapéct GI probe"
+msgstr "GI Sonda"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Baked Indirect Light"
-msgstr "Nepřímé osvětlení"
+msgstr "Zapečené nepřímé osvětlení"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Sphere Shape Radius"
@@ -16334,40 +16256,36 @@ msgid "Change Ray Shape Length"
msgstr "Změnit délku Ray Shape"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Edge"
-msgstr "Navigační režim"
+msgstr "Hrana navigace"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Edge Disabled"
-msgstr "Navigační režim"
+msgstr "Hrana navigace vypnuta"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Solid"
-msgstr "Navigační režim"
+msgstr "Pevná navigace"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Solid Disabled"
-msgstr "Navigační režim"
+msgstr "Pevná navigace vypnuta"
#: editor/spatial_editor_gizmos.cpp
msgid "Joint Body A"
-msgstr ""
+msgstr "Kloubové tělo A"
#: editor/spatial_editor_gizmos.cpp
msgid "Joint Body B"
-msgstr ""
+msgstr "Kloubové tělo B"
#: editor/spatial_editor_gizmos.cpp
msgid "Room Edge"
-msgstr ""
+msgstr "Hrana místnosti"
#: editor/spatial_editor_gizmos.cpp
msgid "Room Overlap"
-msgstr ""
+msgstr "Překrytí místností"
#: editor/spatial_editor_gizmos.cpp
#, fuzzy
@@ -16375,17 +16293,16 @@ msgid "Set Room Point Position"
msgstr "Nastavit pozici bodu křivky"
#: editor/spatial_editor_gizmos.cpp scene/3d/portal.cpp
-#, fuzzy
msgid "Portal Margin"
-msgstr "Nastavit okraj"
+msgstr "Okraj portálu"
#: editor/spatial_editor_gizmos.cpp
msgid "Portal Edge"
-msgstr ""
+msgstr "Hrana portálu"
#: editor/spatial_editor_gizmos.cpp
msgid "Portal Arrow"
-msgstr ""
+msgstr "Šipka portálu"
#: editor/spatial_editor_gizmos.cpp
#, fuzzy
@@ -16403,9 +16320,8 @@ msgstr "Jít zpět"
#: editor/spatial_editor_gizmos.cpp scene/2d/light_occluder_2d.cpp
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Occluder"
-msgstr "Režim okluze"
+msgstr "Okluzor"
#: editor/spatial_editor_gizmos.cpp
#, fuzzy
@@ -16849,7 +16765,7 @@ msgstr ""
#: modules/csg/csg_gizmos.cpp
msgid "CSG"
-msgstr ""
+msgstr "CSG"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -17215,18 +17131,16 @@ msgid "Object can't provide a length."
msgstr "Objekt nemůže poskytnout délku."
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Language Server"
-msgstr "Jazyk:"
+msgstr "Jazykový server"
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Enable Smart Resolve"
-msgstr "Nelze vyřešit"
+msgstr "Povolit funkci chytrého řešení"
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Show Native Symbols In Editor"
-msgstr ""
+msgstr "Zobrazení nativních symbolů v editoru"
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Use Thread"
@@ -17398,9 +17312,8 @@ msgid "Children"
msgstr "Upravitelní potomci"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Joints"
-msgstr "Bod"
+msgstr "Body"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
msgid "Roots"
@@ -17521,7 +17434,7 @@ msgstr ""
#: modules/gltf/gltf_state.cpp
msgid "Cameras"
-msgstr ""
+msgstr "Kamery"
#: modules/gltf/gltf_state.cpp servers/visual_server.cpp
#, fuzzy
@@ -17729,7 +17642,7 @@ msgstr "Nastavení GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Pick Distance:"
-msgstr "Vybrat vzdálenost:"
+msgstr "Výběrová vzdálenost:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Filter meshes"
@@ -18793,7 +18706,7 @@ msgstr "Prioritní mód"
#: modules/webrtc/webrtc_data_channel.h
msgid "WebRTC"
-msgstr ""
+msgstr "WebRTC"
#: modules/webrtc/webrtc_data_channel.h
msgid "Max Channel In Buffer (KB)"
@@ -18801,11 +18714,11 @@ msgstr ""
#: modules/websocket/websocket_client.cpp
msgid "Verify SSL"
-msgstr ""
+msgstr "Ověřit SSL"
#: modules/websocket/websocket_client.cpp
msgid "Trusted SSL Certificate"
-msgstr ""
+msgstr "Důvěryhodný certifikát SSL"
#: modules/websocket/websocket_macros.h
#, fuzzy
@@ -18844,7 +18757,7 @@ msgstr "Fyzická Klávesa"
#: modules/websocket/websocket_server.cpp platform/javascript/export/export.cpp
msgid "SSL Certificate"
-msgstr ""
+msgstr "Certifikát SSL"
#: modules/websocket/websocket_server.cpp
#, fuzzy
@@ -18896,28 +18809,27 @@ msgstr "Chytré přichcování"
#: platform/android/export/export.cpp
msgid "Android SDK Path"
-msgstr ""
+msgstr "Cesta k Android SDK"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Debug Keystore"
-msgstr "Ladicí program"
+msgstr "Ladění Keystore"
#: platform/android/export/export.cpp
msgid "Debug Keystore User"
-msgstr ""
+msgstr "Uživatel ladění Keystore"
#: platform/android/export/export.cpp
msgid "Debug Keystore Pass"
-msgstr ""
+msgstr "Průchod ladění Keystore"
#: platform/android/export/export.cpp
msgid "Force System User"
-msgstr ""
+msgstr "Vynutit systémového uživatele"
#: platform/android/export/export.cpp
msgid "Shutdown ADB On Exit"
-msgstr ""
+msgstr "Vypnout ADB při ukončení"
#: platform/android/export/export_plugin.cpp
msgid "Launcher Icons"
@@ -19000,7 +18912,7 @@ msgstr "Ladicí program"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
msgid "Debug Password"
-msgstr ""
+msgstr "Heslo ladění"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -19873,7 +19785,7 @@ msgstr "Chyba při spuštění serveru HTTP:"
#: platform/javascript/export/export.cpp
msgid "Web"
-msgstr ""
+msgstr "Web"
#: platform/javascript/export/export.cpp
msgid "HTTP Host"
@@ -19884,13 +19796,12 @@ msgid "HTTP Port"
msgstr ""
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Use SSL"
-msgstr "Použít přichycení"
+msgstr "Použít SSL"
#: platform/javascript/export/export.cpp
msgid "SSL Key"
-msgstr ""
+msgstr "Klíč SSL"
#: platform/osx/export/codesign.cpp
msgid "Can't get filesystem access."
@@ -19952,9 +19863,8 @@ msgid "Invalid entitlements file."
msgstr "Neplatná přípona."
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Invalid executable file."
-msgstr "Neplatná přípona."
+msgstr "Neplatný spouštěcí soubor."
#: platform/osx/export/codesign.cpp
msgid "Can't resize signature load command."
@@ -20442,7 +20352,7 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "Force Builtin Codesign"
-msgstr ""
+msgstr "Vynutit vestavěný codesign"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20580,6 +20490,8 @@ msgid ""
"Godot's Mono version does not support the UWP platform. Use the standard "
"build (no C# support) if you wish to target UWP."
msgstr ""
+"Mono verze Godotu nepodporuje platformu UWP. Použijte standartní build (bez "
+"podpory C#) pokud chcete použít platformu UWP."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -20635,7 +20547,7 @@ msgstr "Neplatné rozměry obrázku uvítací obrazovky (měly by být 620x300).
#: platform/uwp/export/export.cpp
msgid "UWP"
-msgstr ""
+msgstr "UWP"
#: platform/uwp/export/export.cpp platform/windows/export/export.cpp
#, fuzzy
@@ -20644,12 +20556,11 @@ msgstr "Signál"
#: platform/uwp/export/export.cpp
msgid "Debug Certificate"
-msgstr ""
+msgstr "Certifikát ladění"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Debug Algorithm"
-msgstr "Ladicí program"
+msgstr "Algoritmus ladění"
#: platform/windows/export/export.cpp
#, fuzzy
@@ -21715,9 +21626,8 @@ msgid "Capping"
msgstr ""
#: scene/2d/line_2d.cpp
-#, fuzzy
msgid "Joint Mode"
-msgstr "Režim ikony"
+msgstr "Mód bodu"
#: scene/2d/line_2d.cpp
#, fuzzy
@@ -22659,9 +22569,8 @@ msgid "Light Data"
msgstr "S daty"
#: scene/3d/bone_attachment.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Bone Name"
-msgstr "Název uzlu:"
+msgstr "Název kosti"
#: scene/3d/camera.cpp
msgid "Keep Aspect"
@@ -23827,18 +23736,16 @@ msgid "Overlap Warning Threshold"
msgstr ""
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Preview Camera"
-msgstr "Náhled"
+msgstr "Náhled kamery"
#: scene/3d/room_manager.cpp
msgid "Portal Depth Limit"
msgstr ""
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Default Portal Margin"
-msgstr "Nastavit okraj"
+msgstr "Výchozí okraj portálu"
#: scene/3d/room_manager.cpp
#, fuzzy
@@ -23875,6 +23782,9 @@ msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"Bylo detekováno překrytí místností, kamery nemusí fungovat správně v "
+"překryvajících oblastech.\n"
+"Podrobnosti najdete ve výstupním protokolu."
#: scene/3d/room_manager.cpp
msgid ""
@@ -24370,14 +24280,12 @@ msgid "Zero Y"
msgstr "Nula"
#: scene/animation/skeleton_ik.cpp
-#, fuzzy
msgid "Root Bone"
-msgstr "Název kořenového uzlu"
+msgstr "Kořenová kost"
#: scene/animation/skeleton_ik.cpp
-#, fuzzy
msgid "Tip Bone"
-msgstr "Kosti"
+msgstr "Špičková kost"
#: scene/animation/skeleton_ik.cpp
#, fuzzy
@@ -24904,7 +24812,7 @@ msgstr ""
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Caret"
-msgstr ""
+msgstr "Stříška"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink"
@@ -25554,7 +25462,7 @@ msgstr "Vynásobit %s"
#: scene/main/scene_tree.cpp scene/resources/mesh_library.cpp
#: scene/resources/shape_2d.cpp
msgid "Shapes"
-msgstr ""
+msgstr "Tvary"
#: scene/main/scene_tree.cpp
msgid "Shape Color"
@@ -25721,7 +25629,7 @@ msgstr "Levé lineární"
#: scene/main/viewport.cpp
msgid "Render Direct To Screen"
-msgstr ""
+msgstr "Vykreslovat přímo na obrazovku"
#: scene/main/viewport.cpp
#, fuzzy
@@ -26519,9 +26427,8 @@ msgid "Label Width"
msgstr "Vlevo po celé výšce"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Screen Picker"
-msgstr "Operátor screen."
+msgstr "Výběr obrazovky"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -27600,9 +27507,8 @@ msgid "Bind"
msgstr "Vazba"
#: scene/resources/skin.cpp
-#, fuzzy
msgid "Bone"
-msgstr "Kosti"
+msgstr "Kost"
#: scene/resources/sky.cpp
#, fuzzy
diff --git a/editor/translations/da.po b/editor/translations/da.po
index bb158fcada..5a9e684e85 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -11471,7 +11471,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/de.po b/editor/translations/de.po
index 61a5a51b9c..6d1c27e5b2 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -23,7 +23,7 @@
# Peter Friedland <peter_friedland@gmx.de>, 2016.
# No need for a name <endoplasmatik@gmx.net>, 2016.
# Sönke <me@eknoes.de>, 2018.
-# So Wieso <sowieso@dukun.de>, 2016-2018, 2019, 2020, 2021, 2022.
+# So Wieso <sowieso@dukun.de>, 2016-2018, 2019, 2020, 2021, 2022, 2023.
# Tim Schellenberg <smwleod@gmail.com>, 2017.
# Timo Schwarzer <account@timoschwarzer.com>, 2016-2018.
# viernullvier <hannes.breul+github@gmail.com>, 2016.
@@ -87,13 +87,14 @@
# Anonynonymouse <tom.spaine60388@gmail.com>, 2022.
# Felix Bitsch <felix.a.bitsch@gmail.com>, 2022.
# miguel <miguel-gonzalez@gmx.de>, 2022.
+# Least Significant Bite <leastsignificantbite@proton.me>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-12-13 13:21+0000\n"
-"Last-Translator: ‎ <artism90@googlemail.com>\n"
+"PO-Revision-Date: 2023-01-09 20:42+0000\n"
+"Last-Translator: So Wieso <sowieso@dukun.de>\n"
"Language-Team: German <https://hosted.weblate.org/projects/godot-engine/"
"godot/de/>\n"
"Language: de\n"
@@ -101,7 +102,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -482,7 +483,7 @@ msgstr "Gedrückt"
#: core/os/input_event.cpp
msgid "Scancode"
-msgstr "Scancode"
+msgstr "Tastencode"
#: core/os/input_event.cpp
msgid "Physical Scancode"
@@ -3751,7 +3752,7 @@ msgstr "Hoch"
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp
msgid "Node"
-msgstr "Knoten"
+msgstr "das Node"
#: editor/editor_network_profiler.cpp
msgid "Incoming RPC"
@@ -11038,7 +11039,7 @@ msgstr "Hinten perspektivisch"
msgid " [auto]"
msgstr " [auto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [Portale aktiv]"
@@ -14308,17 +14309,15 @@ msgid "Invalid project path (changed anything?)."
msgstr "Ungültiger Projektpfad (etwas geändert?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
-"Die Datei project.godot im Projektpfad konnte nicht geladen werden (Fehler "
-"%d). Sie könnte fehlen oder beschädigt sein."
+"Projekt in ‚%s‘ konnte nicht geladen werden (Fehler %d). Es ist "
+"möglicherweise nicht vorhanden oder beschädigt."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't save project at '%s' (error %d)."
-msgstr "Projekt in ‚%s‘ kann nicht geöffnet werden."
+msgstr "Projekt konnte nicht in ‚%s‘ gespeichert werden (Fehler %d)."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -23255,14 +23254,12 @@ msgid "AABB"
msgstr "AABB"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Sorting"
-msgstr "Sortiere"
+msgstr "Sortierung"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Use AABB Center"
-msgstr "Ambient verwenden"
+msgstr "AABB-Mittelpunkt verwenden"
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index 7b7bfd71cc..964eb46175 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -1,6 +1,6 @@
# LANGUAGE translation of the Godot Engine editor.
-# Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md).
+# Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.
# This file is distributed under the same license as the Godot source code.
#
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@@ -10564,7 +10564,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/el.po b/editor/translations/el.po
index 98873c7d40..fe89b69334 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -18,13 +18,14 @@
# JessicaLukatz <jessicalukatz32038@gmail.com>, 2022.
# Anthony V. <batmanplayer123@gmail.com>, 2022.
# Anthony V. <anthonyv156@outlook.com>, 2022.
+# Ilias Vasilakis <vaselas99@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-05-20 11:17+0000\n"
-"Last-Translator: Anthony V. <anthonyv156@outlook.com>\n"
+"PO-Revision-Date: 2023-01-15 13:34+0000\n"
+"Last-Translator: Ilias Vasilakis <vaselas99@gmail.com>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/"
"el/>\n"
"Language: el\n"
@@ -32,7 +33,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.13-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -622,7 +623,7 @@ msgstr "Εμφάνιση όλων"
#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp
#: scene/3d/label_3d.cpp scene/gui/text_edit.cpp scene/resources/texture.cpp
msgid "Width"
-msgstr ""
+msgstr "Πλάτος"
#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp
#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp
@@ -636,7 +637,7 @@ msgstr "Φως"
#: core/project_settings.cpp
msgid "Always On Top"
-msgstr ""
+msgstr "Πάντα στο επάνω μέρος"
#: core/project_settings.cpp
#, fuzzy
@@ -804,7 +805,7 @@ msgstr "Απόδοση"
#: scene/resources/multimesh.cpp servers/visual/visual_server_scene.cpp
#: servers/visual_server.cpp
msgid "Quality"
-msgstr ""
+msgstr "Ποιότητα"
#: core/project_settings.cpp scene/gui/file_dialog.cpp
#: scene/main/scene_tree.cpp scene/resources/navigation_mesh.cpp
@@ -863,7 +864,7 @@ msgstr ""
#: core/project_settings.cpp
msgid "Compression Level"
-msgstr ""
+msgstr "Βαθμός Συμπίεσης"
#: core/project_settings.cpp
msgid "Window Log Size"
@@ -1034,11 +1035,11 @@ msgstr ""
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Elements"
-msgstr ""
+msgstr "Μέγιστος αριθμός οπτικοποιήσημων στοιχείων"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Lights"
-msgstr ""
+msgstr "Μέγιστος αριθμός Οπτικοποιήσημων Φωτών"
#: drivers/gles3/rasterizer_scene_gles3.cpp
#, fuzzy
@@ -1081,7 +1082,7 @@ msgstr ""
#: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp
msgid "High Quality"
-msgstr ""
+msgstr "Υψηλή Ποιότητα"
#: drivers/gles3/rasterizer_storage_gles3.cpp
msgid "Blend Shape Max Buffer Size (KB)"
@@ -1196,7 +1197,7 @@ msgstr "Ποσότητα:"
#: editor/animation_track_editor.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
msgid "Args"
-msgstr ""
+msgstr "Ορίσματα"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/script_editor_debugger.cpp modules/gltf/gltf_accessor.cpp
@@ -2474,7 +2475,7 @@ msgstr ""
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
-msgstr ""
+msgstr "Περιεχόμενα Πόρου \"%s\" - Καμία Σύγκρουση αρχείων στο Έργο σου:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
@@ -2486,9 +2487,8 @@ msgid "The following files failed extraction from asset \"%s\":"
msgstr "Η εξαγωγή των ακόλουθων αρχείων από το πακέτο απέτυχε:"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "(and %s more files)"
-msgstr "Και %s αρχεία ακόμα."
+msgstr "Και %s αρχεία ακόμα"
#: editor/editor_asset_installer.cpp
#, fuzzy
@@ -2837,22 +2837,19 @@ msgstr "Επιλέξτε"
#: editor/editor_export.cpp
msgid "Project export for platform:"
-msgstr ""
+msgstr "Εξαγωγή Έργου για πλατφόρμα:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed with warnings."
-msgstr "Αντιγραφή διαδρομής κόμβου"
+msgstr "Ολοκληρώθηκε με Προειδοποιήσεις."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed successfully."
-msgstr "Το πακέτο εγκαταστάθηκε επιτυχώς!"
+msgstr "Επιτυχής Ολοκλήρωση."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed."
-msgstr "Απέτυχε:"
+msgstr "Απέτυχε."
#: editor/editor_export.cpp
msgid "Storing File:"
@@ -2877,14 +2874,12 @@ msgid "Cannot create file \"%s\"."
msgstr "Αδύνατη η δημιουργία φακέλου."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to export project files."
-msgstr "Απέτυχε η εγγραφή σε αρχείο:"
+msgstr "Απέτυχε η εξαγωγή αρχείων έργου."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Can't open file to read from path \"%s\"."
-msgstr "Αδύνατο το άνοιγμα αρχείου για εγγραφή:"
+msgstr "Αδύνατο το άνοιγμα αρχείου για ανάγνωση απο το μονοπάτι \"%s\"."
#: editor/editor_export.cpp
#, fuzzy
@@ -2962,9 +2957,8 @@ msgid "Release"
msgstr "Ελευθέρωση"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Binary Format"
-msgstr "Τελεστής χρώματος."
+msgstr "Δυαδική Μορφή"
#: editor/editor_export.cpp
msgid "64 Bits"
@@ -3017,14 +3011,12 @@ msgid "Prepare Template"
msgstr "Διαχείριση Προτύπων"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "The given export path doesn't exist."
-msgstr "Η δεδομένη διαδρομή εξαγωγής δεν υπάρχει:"
+msgstr "Η δεδομένη διαδρομή εξαγωγής δεν υπάρχει."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found: \"%s\"."
-msgstr "Δεν βρέθηκε αρχείο προτύπου:"
+msgstr "Δεν βρέθηκε το αρχείο προτύπου: \"%s\"."
#: editor/editor_export.cpp
#, fuzzy
@@ -3077,7 +3069,7 @@ msgstr "Πλατφόρμα Εισαγωγής"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "Επιτρέπει την προβολή και επεξεργασία τρισδιάστατων σκηνών."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
@@ -6103,9 +6095,8 @@ msgid "Bone Outline Color"
msgstr ""
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Outline Size"
-msgstr "Μέγεθος περιγράμματος:"
+msgstr "Μέγεθος περιγράμματος Κοκάλου"
#: editor/editor_settings.cpp
msgid "Viewport Border Color"
@@ -10857,7 +10848,7 @@ msgstr "Προηγούμενη Δέσμη Ενεργειών"
#: editor/plugins/script_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "File"
-msgstr "Αρχείο"
+msgstr "Φάκελος"
#: editor/plugins/script_editor_plugin.cpp
msgid "Open..."
@@ -11366,7 +11357,7 @@ msgstr "Προοπτική"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
@@ -16732,15 +16723,15 @@ msgstr "Χρήση κουμπώματος"
#: main/main.cpp
msgid "Per Pixel Transparency"
-msgstr ""
+msgstr "Διαφάνεια ανα Πίξελ"
#: main/main.cpp
msgid "Allowed"
-msgstr ""
+msgstr "Επιτρεπτό"
#: main/main.cpp
msgid "Intended Usage"
-msgstr ""
+msgstr "Προβλεπόμενη Χρήση"
#: main/main.cpp
#, fuzzy
@@ -16754,7 +16745,7 @@ msgstr "Σφάλμα αποθήκευσης"
#: main/main.cpp
msgid "Threads"
-msgstr ""
+msgstr "Νήματα"
#: main/main.cpp servers/physics_2d/physics_2d_server_wrap_mt.h
#, fuzzy
@@ -16767,7 +16758,7 @@ msgstr ""
#: main/main.cpp
msgid "Handheld"
-msgstr ""
+msgstr "Χειρός"
#: main/main.cpp platform/javascript/export/export.cpp
#: platform/uwp/export/export.cpp
@@ -16799,7 +16790,7 @@ msgstr ""
#: scene/gui/scroll_container.cpp scene/gui/text_edit.cpp scene/gui/tree.cpp
#: scene/main/viewport.cpp scene/register_scene_types.cpp
msgid "GUI"
-msgstr ""
+msgstr "Γραφική Διεπαφή Χρήσης"
#: main/main.cpp
msgid "Drop Mouse On GUI Input Disabled"
@@ -16811,7 +16802,7 @@ msgstr ""
#: main/main.cpp
msgid "Print FPS"
-msgstr ""
+msgstr "Δείξε Καρέ ανα Δευτερόλεπτο"
#: main/main.cpp
msgid "Verbose stdout"
@@ -16834,7 +16825,7 @@ msgstr "Καρέ Επιλογής"
#: main/main.cpp
msgid "Low Processor Mode"
-msgstr ""
+msgstr "Λειτουργεία Χαμηλής Χρήσης Επεξεργαστή"
#: main/main.cpp
msgid "Delta Sync After Draw"
@@ -16860,7 +16851,7 @@ msgstr "Σημείο"
#: main/main.cpp
msgid "Touch Delay"
-msgstr ""
+msgstr "Καθυστέρηση Επαφής"
#: main/main.cpp servers/visual_server.cpp
msgid "GLES3"
@@ -16884,7 +16875,7 @@ msgstr "Εμφάνιση περιβάλλοντος"
#: main/main.cpp
msgid "Default Clear Color"
-msgstr ""
+msgstr "Προκαθορισμένο Χρώμα Καθαρίσματος"
#: main/main.cpp
msgid "Boot Splash"
@@ -16897,11 +16888,11 @@ msgstr "Εμφάνιση Οστών"
#: main/main.cpp
msgid "Image"
-msgstr ""
+msgstr "Εικόνα"
#: main/main.cpp
msgid "Fullsize"
-msgstr ""
+msgstr "Πλήρης Μέγεθος"
#: main/main.cpp scene/resources/dynamic_font.cpp
#, fuzzy
@@ -16932,11 +16923,11 @@ msgstr ""
#: main/main.cpp
msgid "Emulate Touch From Mouse"
-msgstr ""
+msgstr "Προσομοίωση Αφής απο το Ποντίκι"
#: main/main.cpp
msgid "Emulate Mouse From Touch"
-msgstr ""
+msgstr "Προσομοίωση Ποντικιού απο Αφή"
#: main/main.cpp
#, fuzzy
@@ -16974,11 +16965,11 @@ msgstr "Λήξη χρονικού ορίου."
#: main/main.cpp
msgid "Runtime"
-msgstr ""
+msgstr "Χρόνος Εκτέλεσης"
#: main/main.cpp
msgid "Unhandled Exception Policy"
-msgstr ""
+msgstr "Πολιτική μη-χειριζόμενων Εξαίρεσεων"
#: main/main.cpp
#, fuzzy
@@ -16988,7 +16979,7 @@ msgstr "Εύρεση είδους κόμβου"
#: main/main.cpp scene/gui/texture_progress.cpp
#: scene/gui/viewport_container.cpp
msgid "Stretch"
-msgstr ""
+msgstr "Τέντωμα"
#: main/main.cpp
#, fuzzy
@@ -16997,11 +16988,11 @@ msgstr "Επιθεωρητής"
#: main/main.cpp
msgid "Shrink"
-msgstr ""
+msgstr "Συστολή"
#: main/main.cpp scene/main/scene_tree.cpp
msgid "Auto Accept Quit"
-msgstr ""
+msgstr "Αυτόματη Αποδοχή Εξόδου"
#: main/main.cpp scene/main/scene_tree.cpp
#, fuzzy
@@ -17015,11 +17006,11 @@ msgstr "Προσκόλληση σε Πλευρές Κόμβου"
#: main/main.cpp
msgid "Dynamic Fonts"
-msgstr ""
+msgstr "Δυναμικές Γραμματοσειρές"
#: main/main.cpp
msgid "Use Oversampling"
-msgstr ""
+msgstr "Χρήση Υπερδειγματοληψίας"
#: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp
msgid "Active Soft World"
@@ -17052,7 +17043,7 @@ msgstr "Επιλογές"
#: modules/csg/csg_shape.cpp
msgid "Calculate Tangents"
-msgstr ""
+msgstr "Υπολογεισμός Καθέτων"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -17110,7 +17101,7 @@ msgstr "Εμφάνιση Οδηγιών"
#: modules/csg/csg_shape.cpp
msgid "Cone"
-msgstr ""
+msgstr "Κώνος"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -17135,11 +17126,11 @@ msgstr "Πολύγωνα"
#: modules/csg/csg_shape.cpp
msgid "Spin Degrees"
-msgstr ""
+msgstr "Βαθμοί Περιστοφικής Κίνησης"
#: modules/csg/csg_shape.cpp
msgid "Spin Sides"
-msgstr ""
+msgstr "Πλευρές Περιστροφικής Κίνησης"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -17337,7 +17328,7 @@ msgstr "Δέσμες Ενεργειών"
#: modules/gdscript/editor/gdscript_highlighter.cpp
msgid "Function Definition Color"
-msgstr ""
+msgstr "Χρώμα Δήλωσης Συνάρτησης"
#: modules/gdscript/editor/gdscript_highlighter.cpp
#, fuzzy
@@ -17350,7 +17341,7 @@ msgstr ""
#: modules/gdscript/gdscript.cpp
msgid "Treat Warnings As Errors"
-msgstr ""
+msgstr "Συμπεριφορά σε προειδοποιήσεις ως σφάλματα"
#: modules/gdscript/gdscript.cpp
msgid "Exclude Addons"
@@ -17414,7 +17405,7 @@ msgstr ""
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Use Thread"
-msgstr ""
+msgstr "Χρήση Νήματος"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
#, fuzzy
@@ -17639,11 +17630,11 @@ msgstr ""
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Diffuse Factor"
-msgstr ""
+msgstr "Βαθμός Διάχυσης"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Gloss Factor"
-msgstr ""
+msgstr "Βαθμός Γυαλάδας"
#: modules/gltf/gltf_spec_gloss.cpp
#, fuzzy
@@ -17704,11 +17695,11 @@ msgstr "Δυνατότητες"
#: modules/gltf/gltf_state.cpp platform/uwp/export/export.cpp
msgid "Images"
-msgstr ""
+msgstr "Εικόνες"
#: modules/gltf/gltf_state.cpp
msgid "Cameras"
-msgstr ""
+msgstr "Κάμερες"
#: modules/gltf/gltf_state.cpp servers/visual_server.cpp
#, fuzzy
@@ -17782,7 +17773,7 @@ msgstr "Κέντρο"
#: scene/2d/tile_map.cpp scene/3d/collision_object.cpp scene/3d/soft_body.cpp
#: scene/resources/material.cpp
msgid "Mask"
-msgstr ""
+msgstr "Μάσκα"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
#, fuzzy
@@ -17932,7 +17923,7 @@ msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Προετοιμασία δομών δεδομένων"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
#, fuzzy
@@ -17966,19 +17957,19 @@ msgstr "Προετοιμασία Lightmaps"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Low Quality Ray Count"
-msgstr ""
+msgstr "Αριθμός Ακτινών Χαμηλής Ποιότητας"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Medium Quality Ray Count"
-msgstr ""
+msgstr "Αριθμός Ακτινών Μέτριας Ποιότητας"
#: modules/lightmapper_cpu/register_types.cpp
msgid "High Quality Ray Count"
-msgstr ""
+msgstr "Αριθμός Ακτινών Υψηλής Ποιότητας"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Ultra Quality Ray Count"
-msgstr ""
+msgstr "Αριθμός Ακτινών Ύψιστης Ποιότητας"
#: modules/minimp3/audio_stream_mp3.cpp
#: modules/minimp3/resource_importer_mp3.cpp
@@ -17990,7 +17981,7 @@ msgstr "Μετατόπιση:"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Eye Height"
-msgstr ""
+msgstr "Ύψος Ματιών"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "IOD"
@@ -18133,7 +18124,7 @@ msgstr ""
#: modules/opensimplex/noise_texture.cpp
msgid "Noise"
-msgstr ""
+msgstr "Θόρυβος"
#: modules/opensimplex/noise_texture.cpp
#, fuzzy
@@ -18142,11 +18133,11 @@ msgstr "Μετατόπιση Πλέγματος:"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Octaves"
-msgstr ""
+msgstr "Οκτάβες"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Period"
-msgstr ""
+msgstr "Περίοδος"
#: modules/opensimplex/open_simplex_noise.cpp
#, fuzzy
@@ -18155,7 +18146,7 @@ msgstr "Προοπτική"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Lacunarity"
-msgstr ""
+msgstr "Κενότητα"
#: modules/regex/regex.cpp
msgid "Subject"
@@ -18177,7 +18168,7 @@ msgstr ""
#: modules/upnp/upnp.cpp
msgid "Discover Local Port"
-msgstr ""
+msgstr "Εύρεση Τοπικής Θύρας"
#: modules/upnp/upnp.cpp
msgid "Discover IPv6"
@@ -18740,26 +18731,24 @@ msgid "Mod %s"
msgstr "Πρόσθεσε %s"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "ShiftLeft %s"
-msgstr "Θέσε %s"
+msgstr "Αριστερή μετατόπιση %s"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "ShiftRight %s"
-msgstr ""
+msgstr "Δεξιά μετατόπιση %s"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "BitAnd %s"
-msgstr "Πρόσθεσε %s"
+msgstr "Λογικό Και %s"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "BitOr %s"
-msgstr ""
+msgstr "ΛογικόΗ %s"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "BitXor %s"
-msgstr ""
+msgstr "ΛογικόΞορ %s"
#: modules/visual_script/visual_script_func_nodes.cpp
#, fuzzy
@@ -18895,9 +18884,8 @@ msgid "Get Self"
msgstr "Εαυτός"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "CustomNode"
-msgstr "Αποκοπή κόμβων"
+msgstr ""
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
@@ -18955,7 +18943,7 @@ msgstr "εσοδεία"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "Wait"
-msgstr ""
+msgstr "Περίμενε"
#: modules/visual_script/visual_script_yield_nodes.cpp
#, fuzzy
@@ -19605,10 +19593,11 @@ msgstr ""
#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
+"Μή Έγκυρο όνομα αρχείου! Το Android APK δέχεται μόνο την .apk κατάληξη."
#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!"
-msgstr ""
+msgstr "Μη αποδεκτή μορφή εξαγωγής!"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19661,7 +19650,7 @@ msgstr ""
#: platform/android/export/export_plugin.cpp
msgid "Moving output"
-msgstr ""
+msgstr "Μετακίνηση της εξόδου"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -21362,7 +21351,7 @@ msgstr "Συμπλήρωση"
#: scene/2d/canvas_item.cpp
msgid "Show Behind Parent"
-msgstr ""
+msgstr "Δείξε πίσω απο τον Γωνέα"
#: scene/2d/canvas_item.cpp
#, fuzzy
@@ -21377,7 +21366,7 @@ msgstr "Φως"
#: scene/2d/canvas_item.cpp
msgid "Use Parent Material"
-msgstr ""
+msgstr "Χρησιμποίησε το Υλικό του Γονέα"
#: scene/2d/canvas_modulate.cpp
msgid ""
@@ -21422,6 +21411,8 @@ msgstr "Ένα άδειο ColisionPollygon2D δεν επηρεάζει τη σύ
#: scene/2d/collision_polygon_2d.cpp
msgid "Invalid polygon. At least 3 points are needed in 'Solids' build mode."
msgstr ""
+"Μή έγκυρο πολύγωνο. Πρέπει να προσδιοριστούν τουλάχιστον τρία (3) σημεία για "
+"τη δημιουργία στερεού αντικειμένου."
#: scene/2d/collision_polygon_2d.cpp
msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode."
@@ -21499,7 +21490,7 @@ msgstr "Ρυθμίσεις:"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Lifetime"
-msgstr ""
+msgstr "Διάρκεια Ζωής"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp scene/main/timer.cpp
@@ -21516,7 +21507,7 @@ msgstr "Μετεπεξεργασία"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Explosiveness"
-msgstr ""
+msgstr "Εκρηκτικότητα"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -21527,7 +21518,7 @@ msgstr "Τυχαία επανεκκίνηση (δευτερόλεπτα):"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Lifetime Randomness"
-msgstr ""
+msgstr "Τυχαιότητα Διάρκειας Ζωής"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -21543,7 +21534,7 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Drawing"
-msgstr ""
+msgstr "Σχεδίαση"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -21554,7 +21545,7 @@ msgstr "Έργα"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Draw Order"
-msgstr ""
+msgstr "Σειρά Σχεδίασης"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21594,7 +21585,7 @@ msgstr "Κατευθήνσεις"
#: scene/resources/particles_material.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Spread"
-msgstr ""
+msgstr "Εύρος"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21612,7 +21603,7 @@ msgstr "Αρχικοποιήστε"
#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
msgid "Angular Velocity"
-msgstr ""
+msgstr "Γωνιακή ταχύτητα"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21623,7 +21614,7 @@ msgstr "Αρχικοποιήστε"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Orbit Velocity"
-msgstr ""
+msgstr "Τροχιακή ταχύτητα"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21651,12 +21642,12 @@ msgstr "Διαίρεση Καμπύλης"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Radial Accel"
-msgstr ""
+msgstr "Τροχιακή επιτάχυνση"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Tangential Accel"
-msgstr ""
+msgstr "Γωνιακή επιτάχυνση"
#: scene/2d/cpu_particles_2d.cpp scene/2d/joints_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/physics_body.cpp
@@ -21664,12 +21655,12 @@ msgstr ""
#: scene/resources/particles_material.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Damping"
-msgstr ""
+msgstr "Απόσβεση"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Damping Random"
-msgstr ""
+msgstr "Τυχαιότητα Απόσβεσης"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21680,12 +21671,12 @@ msgstr "Διαίρεση Καμπύλης"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp scene/3d/light.cpp
#: scene/resources/particles_material.cpp
msgid "Angle"
-msgstr ""
+msgstr "Γωνία"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Angle Random"
-msgstr ""
+msgstr "Τυχαιότητα Γωνίας"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21700,7 +21691,7 @@ msgstr "Ποσότητα:"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
msgid "Scale Amount Random"
-msgstr ""
+msgstr "Τυχαιότητα Ποσoύ Κλιμάκωσης"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#, fuzzy
@@ -21768,15 +21759,15 @@ msgstr "κλείσιμο καμπύλης"
#: scene/2d/joints_2d.cpp
msgid "Node A and Node B must be PhysicsBody2Ds"
-msgstr ""
+msgstr "Ο Κόμβος Α και ο Κόμβος Β πρέπει να είναι του τύπου PhysicsBody2Ds"
#: scene/2d/joints_2d.cpp
msgid "Node A must be a PhysicsBody2D"
-msgstr ""
+msgstr "Ο Κόμβος Α πρέπει να είναι του τύπου PhysicsBody2D"
#: scene/2d/joints_2d.cpp
msgid "Node B must be a PhysicsBody2D"
-msgstr ""
+msgstr "Ο κόμβος Β πρέπει να είναι του τύπου PhysicsBody2D"
#: scene/2d/joints_2d.cpp
msgid "Joint is not connected to two PhysicsBody2Ds"
@@ -22206,7 +22197,7 @@ msgstr "Λειτουργία Προτεραιότητας"
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid "Process Material"
-msgstr ""
+msgstr "Επεξεργασία Υλικού"
#: scene/2d/path_2d.cpp scene/3d/path.cpp scene/resources/sky.cpp
#: scene/resources/texture.cpp
@@ -22269,7 +22260,7 @@ msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Physics Material Override"
-msgstr ""
+msgstr "Παράκαμψη Υλικού Φυσικής"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: scene/resources/world.cpp scene/resources/world_2d.cpp
@@ -22460,11 +22451,11 @@ msgstr ""
#: scene/2d/ray_cast_2d.cpp scene/3d/camera.cpp scene/3d/ray_cast.cpp
msgid "Areas"
-msgstr ""
+msgstr "Τοποθεσίες"
#: scene/2d/ray_cast_2d.cpp scene/3d/camera.cpp scene/3d/ray_cast.cpp
msgid "Bodies"
-msgstr ""
+msgstr "Σώματα"
#: scene/2d/remote_transform_2d.cpp
msgid "Path property must point to a valid Node2D node to work."
@@ -22511,11 +22502,11 @@ msgstr ""
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
msgid "Hframes"
-msgstr ""
+msgstr "Οριζόντια Καρέ"
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
msgid "Vframes"
-msgstr ""
+msgstr "Κάθετα Καρέ"
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
#, fuzzy
@@ -22594,7 +22585,7 @@ msgstr "Λειτουργία Σύγκρουσης"
#: scene/2d/tile_map.cpp
msgid "Use Kinematic"
-msgstr ""
+msgstr "Χρήση Κινηματικού"
#: scene/2d/touch_screen_button.cpp
#, fuzzy
@@ -22630,7 +22621,7 @@ msgstr "Επικόλληση κίνησης"
#: scene/2d/visibility_notifier_2d.cpp scene/3d/visibility_notifier.cpp
msgid "Freeze Bodies"
-msgstr ""
+msgstr "Πάγωμα Σωμάτων"
#: scene/2d/visibility_notifier_2d.cpp
#, fuzzy
@@ -22666,11 +22657,11 @@ msgstr "Η ARVRCamera απαιτεί γονικό κόμβο ARVROrigin."
#: scene/3d/arvr_nodes.cpp
msgid "Controller ID"
-msgstr ""
+msgstr "Αναγνωρηστικό Χειριστηρίου"
#: scene/3d/arvr_nodes.cpp servers/arvr/arvr_positional_tracker.cpp
msgid "Rumble"
-msgstr ""
+msgstr "Δώνηση"
#: scene/3d/arvr_nodes.cpp
msgid "ARVRController must have an ARVROrigin node as its parent."
@@ -22729,7 +22720,7 @@ msgstr ""
#: scene/3d/audio_stream_player_3d.cpp
msgid "Out Of Range Mode"
-msgstr ""
+msgstr "Απομακρισμένη Λειτουργεία"
#: scene/3d/audio_stream_player_3d.cpp
#, fuzzy
@@ -22748,7 +22739,7 @@ msgstr "Κίνηση"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Attenuation Filter"
-msgstr ""
+msgstr "Φίλτρο Απόσβεσης"
#: scene/3d/audio_stream_player_3d.cpp
#: servers/audio/effects/audio_effect_chorus.cpp
@@ -22775,11 +22766,11 @@ msgstr "Πακετάρισμα"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/reflection_probe.cpp
msgid "Interior"
-msgstr ""
+msgstr "Εσωτερικό"
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Βρίσκοντας πλέγματα και φώτα"
#: scene/3d/baked_lightmap.cpp
msgid "Preparing geometry (%d/%d)"
@@ -22813,11 +22804,11 @@ msgstr "Μαραφέτια"
#: scene/3d/baked_lightmap.cpp
msgid "Tweaks"
-msgstr ""
+msgstr "Μικροδιορθώσεις"
#: scene/3d/baked_lightmap.cpp
msgid "Bounces"
-msgstr ""
+msgstr "Πηδήματα"
#: scene/3d/baked_lightmap.cpp
msgid "Bounce Indirect Energy"
@@ -22907,7 +22898,7 @@ msgstr ""
#: scene/3d/camera.cpp scene/3d/light.cpp scene/3d/reflection_probe.cpp
msgid "Cull Mask"
-msgstr ""
+msgstr "Μάσκα Αποκοπής"
#: scene/3d/camera.cpp
#, fuzzy
@@ -22921,7 +22912,7 @@ msgstr "Έργο"
#: scene/3d/camera.cpp
msgid "FOV"
-msgstr ""
+msgstr "Οπτικό Πεδίο"
#: scene/3d/camera.cpp
#, fuzzy
@@ -22935,7 +22926,7 @@ msgstr "Πλησιέστερη"
#: scene/3d/camera.cpp
msgid "Far"
-msgstr ""
+msgstr "Μακριά"
#: scene/3d/camera.cpp scene/3d/collision_polygon.cpp scene/3d/spring_arm.cpp
#: scene/gui/control.cpp scene/resources/default_theme/default_theme.cpp
@@ -22952,7 +22943,7 @@ msgstr "Περικοπή πάνω"
#: scene/3d/collision_object.cpp scene/3d/soft_body.cpp
msgid "Ray Pickable"
-msgstr ""
+msgstr "Επιλέξημη Ακτίνα"
#: scene/3d/collision_object.cpp
#, fuzzy
@@ -23068,7 +23059,7 @@ msgstr "Απενεργοποιημένο Στοιχείο"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
msgid "Flatness"
-msgstr ""
+msgstr "Ομαλότητα"
#: scene/3d/cull_instance.cpp servers/visual_server.cpp
#, fuzzy
@@ -23086,7 +23077,7 @@ msgstr ""
#: scene/3d/cull_instance.cpp
msgid "Allow Merging"
-msgstr ""
+msgstr "Επίτρεψε Συγχώνευση"
#: scene/3d/cull_instance.cpp
#, fuzzy
@@ -23118,7 +23109,7 @@ msgstr ""
#: scene/3d/gi_probe.cpp
msgid "Subdiv"
-msgstr ""
+msgstr "Υποδιαίρεση"
#: scene/3d/gi_probe.cpp
#, fuzzy
@@ -23137,7 +23128,7 @@ msgstr "Κούμπωμα στα εικονοστοιχεία"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Billboard"
-msgstr ""
+msgstr "Πινακίδα"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
#, fuzzy
@@ -23146,11 +23137,11 @@ msgstr "Πρόγραμμα Σκίασης"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Double Sided"
-msgstr ""
+msgstr "Δύο Όψεων"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/material.cpp
msgid "No Depth Test"
-msgstr ""
+msgstr "Χωρίς Έλεγχο Βάθους"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/material.cpp
#, fuzzy
@@ -23289,7 +23280,7 @@ msgstr ""
#: scene/3d/light.cpp
msgid "Spot"
-msgstr ""
+msgstr "Προβολέας"
#: scene/3d/light.cpp
#, fuzzy
@@ -23349,7 +23340,7 @@ msgstr ""
#: scene/3d/occluder.cpp
msgid "No shape is set."
-msgstr ""
+msgstr "Δεν έχει επιλεχθεί Σχήμα."
#: scene/3d/occluder.cpp
msgid "Only uniform scales are supported."
@@ -23452,15 +23443,15 @@ msgstr "Γραμμική"
#: scene/3d/physics_body.cpp
msgid "Angular X"
-msgstr ""
+msgstr "Γωνιώδης Χ"
#: scene/3d/physics_body.cpp
msgid "Angular Y"
-msgstr ""
+msgstr "Γωνιώδης Υ"
#: scene/3d/physics_body.cpp
msgid "Angular Z"
-msgstr ""
+msgstr "Γωνιώδης Ζ"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -23568,15 +23559,15 @@ msgstr "Κίνηση"
#: scene/3d/physics_body.cpp
msgid "X"
-msgstr ""
+msgstr "Χ"
#: scene/3d/physics_body.cpp
msgid "Y"
-msgstr ""
+msgstr "Υ"
#: scene/3d/physics_body.cpp
msgid "Z"
-msgstr ""
+msgstr "Ζ"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -23685,7 +23676,7 @@ msgstr "Αλλαγη Παραμέτρου"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit"
-msgstr ""
+msgstr "Γωνιώδης Ώριο"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23699,7 +23690,7 @@ msgstr "Πεζά"
#: scene/3d/physics_joint.cpp
msgid "Motor"
-msgstr ""
+msgstr "Μοτέρ"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23783,19 +23774,19 @@ msgstr "Γραμμική"
#: scene/3d/physics_joint.cpp
msgid "Equilibrium Point"
-msgstr ""
+msgstr "Μέρος Ισορροπείας"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit X"
-msgstr ""
+msgstr "Γωνιώδης Ώριο Χ"
#: scene/3d/physics_joint.cpp
msgid "Angular Motor X"
-msgstr ""
+msgstr "Γωνιώδης Μοτέρ Χ"
#: scene/3d/physics_joint.cpp
msgid "Angular Spring X"
-msgstr ""
+msgstr "Γωνιώδης Ελατήριο Χ"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23814,15 +23805,15 @@ msgstr "Γραμμική"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit Y"
-msgstr ""
+msgstr "Γωνιώδης Ώριο Υ"
#: scene/3d/physics_joint.cpp
msgid "Angular Motor Y"
-msgstr ""
+msgstr "Γωνιώδης Μοτέρ Υ"
#: scene/3d/physics_joint.cpp
msgid "Angular Spring Y"
-msgstr ""
+msgstr "Γωνιώδης Ελατήριο Υ"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23841,15 +23832,15 @@ msgstr "Γραμμική"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit Z"
-msgstr ""
+msgstr "Γωνιώδης Ώριο Ζ"
#: scene/3d/physics_joint.cpp
msgid "Angular Motor Z"
-msgstr ""
+msgstr "Γωνιώδης Μοτέρ Ζ"
#: scene/3d/physics_joint.cpp
msgid "Angular Spring Z"
-msgstr ""
+msgstr "Γωνιώδης Ελατήριο Ζ"
#: scene/3d/portal.cpp
msgid "The RoomManager should not be a child or grandchild of a Portal."
@@ -23870,7 +23861,7 @@ msgstr "Επιστροφή"
#: scene/3d/portal.cpp scene/resources/occluder_shape_polygon.cpp
msgid "Two Way"
-msgstr ""
+msgstr "Διπλής Κατεύθυνσης"
#: scene/3d/portal.cpp
#, fuzzy
@@ -23903,7 +23894,7 @@ msgstr "Αποσφαλματωτής"
#: scene/3d/ray_cast.cpp scene/resources/style_box.cpp
msgid "Thickness"
-msgstr ""
+msgstr "Πάχος"
#: scene/3d/reflection_probe.cpp scene/main/viewport.cpp
#, fuzzy
@@ -23950,7 +23941,7 @@ msgstr ""
#: scene/3d/room.cpp
msgid "A Room cannot have another Room as a child or grandchild."
-msgstr ""
+msgstr "Ενα δωμάτιο δεν μπορεί να έχει άλλο δωμάτιο ως παιδί ή εγγόνι."
#: scene/3d/room.cpp
msgid "The RoomManager should not be placed inside a Room."
@@ -23976,7 +23967,7 @@ msgstr ""
#: scene/3d/room.cpp
msgid "Bound"
-msgstr ""
+msgstr "Όριο"
#: scene/3d/room_group.cpp
#, fuzzy
@@ -24019,7 +24010,7 @@ msgstr "Ενέργεια"
#: scene/3d/room_manager.cpp
msgid "Roomlist"
-msgstr ""
+msgstr "Λίστα Δωματίων"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
#, fuzzy
@@ -24038,7 +24029,7 @@ msgstr "Αρχείο ZIP"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
msgid "Gameplay"
-msgstr ""
+msgstr "Παιχνίδι"
#: scene/3d/room_manager.cpp
#, fuzzy
@@ -25147,7 +25138,7 @@ msgstr ""
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Caret"
-msgstr ""
+msgstr "Καρέ"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink"
@@ -26123,7 +26114,7 @@ msgstr ""
#: scene/resources/default_theme/default_theme.cpp
msgid "Panel"
-msgstr ""
+msgstr "Πλαίσιο"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26162,7 +26153,7 @@ msgstr "Επανάληψη κίνησης"
#: scene/resources/default_theme/default_theme.cpp
msgid "Arrow"
-msgstr ""
+msgstr "Βέλος"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -27148,7 +27139,7 @@ msgstr "Αποσφαλμάτωση Καναλιού UV"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "Θόλωση"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -27770,7 +27761,7 @@ msgstr ""
#: scene/resources/physics_material.cpp
msgid "Absorbent"
-msgstr ""
+msgstr "Απορροφητικός"
#: scene/resources/plane_shape.cpp
#, fuzzy
@@ -27815,7 +27806,7 @@ msgstr "Πάνω Δεξιά"
#: scene/resources/primitive_meshes.cpp
msgid "Is Hemisphere"
-msgstr ""
+msgstr "Είναι Ημισφαίριο"
#: scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -27824,11 +27815,11 @@ msgstr "Διαίρεση Καμπύλης"
#: scene/resources/ray_shape.cpp scene/resources/segment_shape_2d.cpp
msgid "Slips On Slope"
-msgstr ""
+msgstr "Γλυστράει σε Κλίση"
#: scene/resources/segment_shape_2d.cpp
msgid "A"
-msgstr ""
+msgstr "Α"
#: scene/resources/shape_2d.cpp
msgid "Custom Solver Bias"
@@ -27856,7 +27847,7 @@ msgstr "Μέγεθος περιγράμματος:"
#: scene/resources/sky.cpp
msgid "Panorama"
-msgstr ""
+msgstr "Πανόραμα"
#: scene/resources/sky.cpp
#, fuzzy
@@ -27890,15 +27881,15 @@ msgstr "Αντικατάσταση"
#: scene/resources/sky.cpp
msgid "Longitude"
-msgstr ""
+msgstr "Γεωγραφικό Μήκος"
#: scene/resources/sky.cpp
msgid "Angle Min"
-msgstr ""
+msgstr "Ελάχιστη Γωνία"
#: scene/resources/sky.cpp
msgid "Angle Max"
-msgstr ""
+msgstr "Μέγιστη Γωνία"
#: scene/resources/style_box.cpp
#, fuzzy
@@ -27912,7 +27903,7 @@ msgstr "Ανάπτυξη Όλων"
#: scene/resources/style_box.cpp
msgid "Skew"
-msgstr ""
+msgstr "Λοξότητα"
#: scene/resources/style_box.cpp
#, fuzzy
@@ -27921,7 +27912,7 @@ msgstr "Αλλαγή Εσωτερική Ακτίνας Τόρου"
#: scene/resources/style_box.cpp
msgid "Corner Detail"
-msgstr ""
+msgstr "Λεπτομέρεια Γωνίας"
#: scene/resources/style_box.cpp
msgid "Anti Aliasing"
@@ -28024,9 +28015,8 @@ msgid "Depth Draw"
msgstr "Μέθοδος παρεμβολής"
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Cull"
-msgstr "Λειτουργία Χάρακα"
+msgstr "Αποκοπή"
#: scene/resources/visual_shader.cpp
#, fuzzy
@@ -28260,11 +28250,11 @@ msgstr ""
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Tap 1"
-msgstr ""
+msgstr "Πάτησε 1"
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Tap 2"
-msgstr ""
+msgstr "Πάτησε 2"
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_phaser.cpp
@@ -28326,7 +28316,7 @@ msgstr ""
#: servers/audio/effects/audio_effect_pitch_shift.cpp
msgid "Oversampling"
-msgstr ""
+msgstr "Υπερδειγματοληψία"
#: servers/audio/effects/audio_effect_pitch_shift.cpp
#: servers/audio/effects/audio_effect_spectrum_analyzer.cpp
diff --git a/editor/translations/en_Shaw.po b/editor/translations/en_Shaw.po
index 60caed0d9d..16e474d82d 100644
--- a/editor/translations/en_Shaw.po
+++ b/editor/translations/en_Shaw.po
@@ -10615,7 +10615,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/eo.po b/editor/translations/eo.po
index 04205e10d6..4ed8103686 100644
--- a/editor/translations/eo.po
+++ b/editor/translations/eo.po
@@ -11199,7 +11199,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/es.po b/editor/translations/es.po
index 5d683058c3..9e1868e4f9 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -14,7 +14,7 @@
# Diego López <diegodario21@gmail.com>, 2017.
# eon-s <emanuel.segretin@gmail.com>, 2018, 2019, 2020.
# Gustavo Leon <gleondiaz@gmail.com>, 2017-2018.
-# Javier Ocampos <xavier.ocampos@gmail.com>, 2018, 2019, 2020, 2021, 2022.
+# Javier Ocampos <xavier.ocampos@gmail.com>, 2018, 2019, 2020, 2021, 2022, 2023.
# Jose Maria Martinez <josemar1992@hotmail.com>, 2018.
# Juan Quiroga <juanquiroga9@gmail.com>, 2017.
# Kiji Pixel <raccoon.fella@gmail.com>, 2017.
@@ -90,14 +90,15 @@
# M3CG <cgmario1999@gmail.com>, 2022.
# Chalan <Valentin06ch@outlook.com>, 2022.
# Luis Miguel Soto Sánchez <luismiguelsoto@jerez.es>, 2022.
-# Victor Stancioiu <victorstancioiu@gmail.com>, 2022.
+# Victor Stancioiu <victorstancioiu@gmail.com>, 2022, 2023.
+# Daniel Miranda <danmiranda@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-11-16 22:47+0000\n"
-"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n"
+"PO-Revision-Date: 2023-01-20 10:19+0000\n"
+"Last-Translator: Daniel Miranda <danmiranda@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
"Language: es\n"
@@ -105,7 +106,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -11041,7 +11042,7 @@ msgstr "Perspectiva Trasera"
msgid " [auto]"
msgstr " [auto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [portales activos]"
@@ -14308,17 +14309,15 @@ msgid "Invalid project path (changed anything?)."
msgstr "La ruta del proyecto no es correcta (¿has cambiado algo?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
-"No se pudo cargar project.godot desde la ruta de proyecto (error %d). La "
-"ruta no existe o está corrupta."
+"No se pudo cargar el proyecto desde la ruta '%s' (error %d). La ruta no "
+"existe o está corrupta."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't save project at '%s' (error %d)."
-msgstr "No se puede abrir el proyecto en '%s'."
+msgstr "No se pudo guardar el proyecto en '%s' (error %d)."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -22304,7 +22303,7 @@ msgstr ""
#: scene/3d/mesh_instance.cpp
msgid "Transform Normals"
-msgstr "Transformar Normales"
+msgstr "Normales de Transformación"
#: scene/3d/navigation.cpp
msgid ""
@@ -23243,14 +23242,12 @@ msgid "AABB"
msgstr "AABB"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Sorting"
msgstr "Ordenar"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Use AABB Center"
-msgstr "Usar Ambiente"
+msgstr "Usar Centro de AABB"
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
@@ -25064,7 +25061,7 @@ msgstr "Marcar"
#: scene/resources/default_theme/default_theme.cpp
msgid "Updown"
-msgstr ""
+msgstr "Reducción"
#: scene/resources/default_theme/default_theme.cpp
msgid "Scaleborder Size"
@@ -25544,11 +25541,11 @@ msgstr "Grados de Rotación del Cielo"
#: scene/resources/environment.cpp
msgid "Canvas Max Layer"
-msgstr ""
+msgstr "Max de Capas del Lienzo"
#: scene/resources/environment.cpp scene/resources/texture.cpp
msgid "Camera Feed ID"
-msgstr ""
+msgstr "Feed ID de la Cámara"
#: scene/resources/environment.cpp
msgid "Ambient Light"
@@ -25688,7 +25685,7 @@ msgstr "Nitidez de Borde"
#: scene/resources/environment.cpp
msgid "DOF Far Blur"
-msgstr ""
+msgstr "DOF Desenfoque Lejano"
#: scene/resources/environment.cpp scene/resources/material.cpp
msgid "Distance"
@@ -25700,7 +25697,7 @@ msgstr "Transición"
#: scene/resources/environment.cpp
msgid "DOF Near Blur"
-msgstr ""
+msgstr "DOF Desenfoque Cercano"
#: scene/resources/environment.cpp
msgid "Glow"
@@ -25760,7 +25757,7 @@ msgstr "Escala HDR"
#: scene/resources/environment.cpp
msgid "Bicubic Upscale"
-msgstr ""
+msgstr "Escala Bicúbica Superior"
#: scene/resources/environment.cpp
msgid "Adjustments"
@@ -25816,7 +25813,7 @@ msgstr "Siguiente Paso"
#: scene/resources/material.cpp
msgid "Use Shadow To Opacity"
-msgstr ""
+msgstr "Usar Sombra para Opacidad"
#: scene/resources/material.cpp
msgid "Unshaded"
@@ -26655,15 +26652,15 @@ msgstr "Mezcla"
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Sidechain"
-msgstr ""
+msgstr "Sidechain"
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Tap 1"
-msgstr "Toque 1"
+msgstr "Tap 1"
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Tap 2"
-msgstr "Toque 2"
+msgstr "Tap 2"
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_phaser.cpp
@@ -26681,7 +26678,7 @@ msgstr "Pre-Ganancia"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Keep Hf Hz"
-msgstr "Mantener Hz Altas"
+msgstr "Mantener Hf Hz"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Drive"
@@ -26697,19 +26694,19 @@ msgstr "Resonancia"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Ceiling dB"
-msgstr "dB Tope"
+msgstr "Límite de dB"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Threshold dB"
-msgstr "Umbral dB"
+msgstr "Umbral de dB"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Soft Clip dB"
-msgstr ""
+msgstr "Soft Clip dB"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Soft Clip Ratio"
-msgstr ""
+msgstr "Soft Clip Ratio"
#: servers/audio/effects/audio_effect_phaser.cpp
msgid "Range Min Hz"
@@ -26721,7 +26718,7 @@ msgstr "Rango Hz Máximo"
#: servers/audio/effects/audio_effect_pitch_shift.cpp
msgid "Oversampling"
-msgstr "Sobremuestreo"
+msgstr "Oversampling"
#: servers/audio/effects/audio_effect_pitch_shift.cpp
#: servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -26730,7 +26727,7 @@ msgstr "Tamaño de FFT"
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Predelay"
-msgstr ""
+msgstr "Retraso"
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Msec"
@@ -27050,7 +27047,7 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Disable For Vendors"
-msgstr ""
+msgstr "Deshabilitar para Proveedores"
#: servers/visual_server.cpp
msgid "Anisotropic Filter Level"
@@ -27182,7 +27179,7 @@ msgstr "Usar PVS Simple"
#: servers/visual_server.cpp
msgid "PVS Logging"
-msgstr ""
+msgstr "Registro de PVS"
#: servers/visual_server.cpp
msgid "Use Signals"
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index fdb6b4f00d..24d38e14a7 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -22,13 +22,14 @@
# emnrx <emanuelermancia@gmail.com>, 2022.
# Mau_Restor <restor@gmail.com>, 2022.
# Leonardo Martínez <leonardomartinez85@gmail.com>, 2022.
+# LR <nancok@tuta.io>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-11-26 14:36+0000\n"
-"Last-Translator: emnrx <emanuelermancia@gmail.com>\n"
+"PO-Revision-Date: 2023-01-01 05:48+0000\n"
+"Last-Translator: LR <nancok@tuta.io>\n"
"Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/"
"godot-engine/godot/es_AR/>\n"
"Language: es_AR\n"
@@ -36,7 +37,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -286,11 +287,11 @@ msgstr ""
#: core/io/packet_peer.cpp
msgid "Input Buffer Max Size"
-msgstr ""
+msgstr "Tamaño maximo del bufer de entrada"
#: core/io/packet_peer.cpp
msgid "Output Buffer Max Size"
-msgstr ""
+msgstr "Tamaño maximo del buffer de salida"
#: core/io/packet_peer.cpp
msgid "Stream Peer"
@@ -505,8 +506,9 @@ msgid "Strength"
msgstr "Fuerza"
#: core/os/input_event.cpp
+#, fuzzy
msgid "Delta"
-msgstr ""
+msgstr "Delta"
#: core/os/input_event.cpp
msgid "Channel"
@@ -721,7 +723,7 @@ msgstr "Superior Derecha"
#: core/project_settings.cpp
msgid "UI Up"
-msgstr ""
+msgstr "Interfaz Arriba"
#: core/project_settings.cpp
#, fuzzy
@@ -735,7 +737,7 @@ msgstr "Página: "
#: core/project_settings.cpp
msgid "UI Page Down"
-msgstr ""
+msgstr "Interfaz Bajar Pagina"
#: core/project_settings.cpp
msgid "UI Home"
@@ -1013,7 +1015,7 @@ msgstr "Usar Muestreo Bicúbico"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Elements"
-msgstr ""
+msgstr "Cantidad Maxima de Elementos Renderizables"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Lights"
@@ -11251,7 +11253,7 @@ msgstr "Perspectiva Trasera"
msgid " [auto]"
msgstr " [auto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [portales activos]"
diff --git a/editor/translations/et.po b/editor/translations/et.po
index dc36ae0b94..c08335ed4f 100644
--- a/editor/translations/et.po
+++ b/editor/translations/et.po
@@ -8,19 +8,20 @@
# René <renepiik@gmail.com>, 2020.
# Kritzmensch <streef.gtx@gmail.com>, 2021, 2022.
# dogyx <aaronloit@zohomail.eu>, 2022.
+# Oskar U <oskar.unn2003@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2022-09-16 07:12+0000\n"
-"Last-Translator: dogyx <aaronloit@zohomail.eu>\n"
+"PO-Revision-Date: 2023-01-08 09:47+0000\n"
+"Last-Translator: Oskar U <oskar.unn2003@gmail.com>\n"
"Language-Team: Estonian <https://hosted.weblate.org/projects/godot-engine/"
"godot/et/>\n"
"Language: et\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.14.1-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -9377,18 +9378,18 @@ msgstr "Lülita jagamisrežiim sisse/välja"
#: scene/gui/rich_text_label.cpp scene/gui/text_edit.cpp
#: scene/resources/primitive_meshes.cpp
msgid "Text"
-msgstr ""
+msgstr "Tekst"
#: editor/plugins/item_list_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp main/main.cpp
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
#: scene/gui/button.cpp scene/gui/item_list.cpp
msgid "Icon"
-msgstr ""
+msgstr "Ikoon"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "ID"
-msgstr ""
+msgstr "ID"
#: editor/plugins/item_list_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
@@ -10857,7 +10858,7 @@ msgstr "Perspektiiv"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/eu.po b/editor/translations/eu.po
index 79da3d56fb..bfd4302fa8 100644
--- a/editor/translations/eu.po
+++ b/editor/translations/eu.po
@@ -10820,7 +10820,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index ad2a56e408..eb6c113057 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -28,7 +28,7 @@
# Aryan Azadeh <aryan@azadeh.email>, 2022.
# Mitsuha Miamizu <mitsuha.miamizu4444@gmail.com>, 2022.
# LordProfo <nimaentity30@gmail.com>, 2022.
-# LordProfo (Nima) <nimaentity30@gmail.com>, 2022.
+# LordProfo (Nima) <nimaentity30@gmail.com>, 2022, 2023.
# John Smith <pkafsharix@gmail.com>, 2022.
# Ali Jafari <ali.jafari.sn@gmail.com>, 2022.
# Ali Almasi <A710almasi@gmail.com>, 2022.
@@ -38,8 +38,8 @@ msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-11-16 22:47+0000\n"
-"Last-Translator: 2g.2d.2t <2g.2d.2t@gmail.com>\n"
+"PO-Revision-Date: 2023-01-01 05:48+0000\n"
+"Last-Translator: LordProfo (Nima) <nimaentity30@gmail.com>\n"
"Language-Team: Persian <https://hosted.weblate.org/projects/godot-engine/"
"godot/fa/>\n"
"Language: fa\n"
@@ -47,7 +47,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -2901,7 +2901,7 @@ msgstr "انتخاب حالت"
#: editor/editor_export.cpp
msgid "BPTC"
-msgstr ""
+msgstr "بی‌پی‌تی‌سی (BPTC)"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "S3TC"
@@ -2909,11 +2909,11 @@ msgstr "S3TC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "ETC"
-msgstr "ای‌تی‌سی"
+msgstr "ئی‌تی‌سی (ETC)"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "ETC2"
-msgstr "ای‌تی‌سی‌۲"
+msgstr "ئی‌تی‌سی‌۲ (ETC2)"
#: editor/editor_export.cpp
msgid "No BPTC Fallbacks"
@@ -2964,7 +2964,7 @@ msgstr "تبدیل منابع متنی به دوتایی هنگام خروجی"
#: editor/editor_feature_profile.cpp
msgid "3D Editor"
-msgstr "ویرایشگر 3بعدی"
+msgstr "ویرایشگر ۳بعدی"
#: editor/editor_feature_profile.cpp
msgid "Script Editor"
@@ -3801,13 +3801,15 @@ msgstr "ایجاد بند انگشتی"
#: editor/editor_node.cpp
msgid "This operation can't be done without a tree root."
-msgstr ""
+msgstr "این عمل را نمی‌توان بدون tree root انجام داد."
#: editor/editor_node.cpp
msgid ""
"This scene can't be saved because there is a cyclic instancing inclusion.\n"
"Please resolve it and then attempt to save again."
msgstr ""
+"این صحنه را نمی‌توان ذخیره کرد زیرا یک شامل نمونه‌سازی چرخه‌ای وجود دارد.\n"
+" لطفاً آن را حل کنید و سپس دوباره سعی کنید ذخیره کنید."
#: editor/editor_node.cpp
msgid ""
@@ -3873,6 +3875,9 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"این منبع متعلق به صحنه‌ای است که ایمپورت شده است، بنابراین قابل ویرایش نیست.\n"
+" لطفاً اسناد مربوط به وارد کردن صحنه‌ها را بخوانید تا این گردش کار را بهتر درک "
+"کنید."
#: editor/editor_node.cpp
msgid ""
@@ -6913,7 +6918,7 @@ msgstr ""
#: editor/import/editor_import_collada.cpp
msgid "Collada"
-msgstr ""
+msgstr "کولادا"
#: editor/import/editor_import_collada.cpp
msgid "Use Ambient"
@@ -11203,7 +11208,7 @@ msgstr ""
msgid " [auto]"
msgstr " [خودکار]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
@@ -17129,9 +17134,8 @@ msgid "Add an architecture entry"
msgstr ""
#: modules/gdnative/gdnative_library_editor_plugin.cpp
-#, fuzzy
msgid "GDNativeLibrary"
-msgstr "صادکردن فایل کتابخانه ای"
+msgstr "کتابخانهٔ جی‌دی‌نِیتیو"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Enabled GDNative Singleton"
@@ -18580,25 +18584,24 @@ msgid "Mod %s"
msgstr ""
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "ShiftLeft %s"
-msgstr "تنظیم %s"
+msgstr "ShiftLeft %s"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "ShiftRight %s"
-msgstr ""
+msgstr "ShiftRight %s"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "BitAnd %s"
-msgstr ""
+msgstr "BitAnd %s"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "BitOr %s"
-msgstr ""
+msgstr "BitOr %s"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "BitXor %s"
-msgstr ""
+msgstr "BitXor %s"
#: modules/visual_script/visual_script_func_nodes.cpp
#, fuzzy
@@ -18730,9 +18733,8 @@ msgid "Get Self"
msgstr ""
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "CustomNode"
-msgstr "ساختن گره"
+msgstr "نود سفارشی"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
@@ -18748,9 +18750,8 @@ msgstr ""
"(error) باشد."
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "SubCall"
-msgstr "فراخوانی"
+msgstr "ساب‌کال"
#: modules/visual_script/visual_script_nodes.cpp scene/gui/graph_node.cpp
msgid "Title"
@@ -18791,7 +18792,7 @@ msgstr ""
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "Wait"
-msgstr ""
+msgstr "صبرکردن"
#: modules/visual_script/visual_script_yield_nodes.cpp
#, fuzzy
@@ -20516,7 +20517,7 @@ msgstr "انتقال را در انیمیشن تغییر بده"
#: platform/uwp/export/export.cpp
msgid "Landscape"
-msgstr ""
+msgstr "چشم‌انداز"
#: platform/uwp/export/export.cpp
msgid "Portrait"
@@ -20826,7 +20827,7 @@ msgstr ""
#: platform/windows/export/export.cpp
msgid "Wine"
-msgstr ""
+msgstr "شراب"
#: platform/x11/export/export.cpp
msgid "32-bit executables cannot have embedded data >= 4 GiB."
@@ -22586,7 +22587,7 @@ msgstr ""
#: scene/3d/camera.cpp scene/3d/light.cpp scene/3d/reflection_probe.cpp
msgid "Cull Mask"
-msgstr ""
+msgstr "Cull Mask"
#: scene/3d/camera.cpp
#, fuzzy
@@ -26677,7 +26678,7 @@ msgstr ""
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "بلوری"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -27530,9 +27531,8 @@ msgid "Depth Draw"
msgstr "حالت درون یابی(درون‌یابی روشی است برای یافتن مقدار تابع درون یک بازه)"
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Cull"
-msgstr "انتخاب حالت"
+msgstr "Cull"
#: scene/resources/visual_shader.cpp
#, fuzzy
@@ -27735,9 +27735,8 @@ msgstr "سطح دسی‌بل"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_panner.cpp
-#, fuzzy
msgid "Pan"
-msgstr "بسته بندی"
+msgstr "Pan"
#: servers/audio/effects/audio_effect_compressor.cpp
#: servers/audio/effects/audio_effect_filter.cpp
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index 8aeba71bff..96267c77e3 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -11269,7 +11269,7 @@ msgstr "Takaperspektiivi"
msgid " [auto]"
msgstr " [automaattinen]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [portaalit aktiivisia]"
diff --git a/editor/translations/fil.po b/editor/translations/fil.po
index 71673d8255..2b6aa3a671 100644
--- a/editor/translations/fil.po
+++ b/editor/translations/fil.po
@@ -10674,7 +10674,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index 17063caae8..f6b1b5d1c9 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -105,14 +105,17 @@
# SCHUTZ Lucas <lucas.schutz0954@gmail.com>, 2022.
# EGuillemot <Elouen.Guillemot@gmail.com>, 2022.
# Entiz <maxime.salido@gmail.com>, 2022.
-# Callim Ethee <callimethee@gmail.com>, 2022.
+# Callim Ethee <callimethee@gmail.com>, 2022, 2023.
+# Hugo Berthet-Rambaud <hugoberthetrambaud@outlook.com>, 2023.
+# Nathan Chambrette <n.chambrette@gmail.com>, 2023.
+# slundi <slundi@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-10-10 18:06+0000\n"
-"Last-Translator: Helix Sir <vincentbarkmann@gmail.com>\n"
+"PO-Revision-Date: 2023-01-14 00:01+0000\n"
+"Last-Translator: slundi <slundi@gmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot/fr/>\n"
"Language: fr\n"
@@ -120,7 +123,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.14.1\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -325,7 +328,7 @@ msgstr "Pré-lecture de page"
#: core/io/http_client.cpp
msgid "Blocking Mode Enabled"
-msgstr "Mode De Blocage Activé"
+msgstr "Mode de blocage activé"
#: core/io/http_client.cpp
msgid "Connection"
@@ -333,11 +336,11 @@ msgstr "Connexion"
#: core/io/http_client.cpp
msgid "Read Chunk Size"
-msgstr "Taile des tronçons de lecture"
+msgstr "Lire la taille des fragment(s)"
#: core/io/marshalls.cpp
msgid "Object ID"
-msgstr "ID de l'Objet"
+msgstr "Identifiant de l'Objet"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
msgid "Allow Object Decoding"
@@ -596,7 +599,7 @@ msgstr "Message"
#: core/os/input_event.cpp
msgid "Pitch"
-msgstr "Pitch"
+msgstr "Angle d'attaque"
#: core/os/input_event.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/physics_body_2d.cpp scene/3d/cpu_particles.cpp
@@ -606,7 +609,7 @@ msgstr "Vélocité"
#: core/os/input_event.cpp
msgid "Instrument"
-msgstr "Instrument"
+msgstr "Appareil"
#: core/os/input_event.cpp
msgid "Controller Number"
@@ -5904,7 +5907,6 @@ msgid "Zoom Modifier"
msgstr "Touche de combinaison : Zoom"
#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Warped Mouse Panning"
msgstr "Panoramique déformé de la souris"
@@ -8843,15 +8845,15 @@ msgstr "Centré à Gauche"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Top"
-msgstr "Centrée en Haut"
+msgstr "Centré en Haut"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Right"
-msgstr "Centrée à droite"
+msgstr "Centré à droite"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Bottom"
-msgstr "Centrée en bas"
+msgstr "Centré en bas"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center"
@@ -11083,7 +11085,7 @@ msgstr "Perspective arrière"
msgid " [auto]"
msgstr " [auto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [portails actifs]"
@@ -16833,7 +16835,7 @@ msgstr "Ajouter une entrée architecture"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "GDNativeLibrary"
-msgstr "GDNativeLibrary"
+msgstr "Bibliothèque Native GD"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Enabled GDNative Singleton"
@@ -17153,7 +17155,6 @@ msgid "Specular Factor"
msgstr "Facteur Spéculaire"
#: modules/gltf/gltf_spec_gloss.cpp
-#, fuzzy
msgid "Spec Gloss Img"
msgstr "Img Spéculaire Brillante"
@@ -18172,23 +18173,23 @@ msgstr "Module de %s"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "ShiftLeft %s"
-msgstr "Décalage %s vers la gauche"
+msgstr "Déplacer Vers la Gauche"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "ShiftRight %s"
-msgstr "Décaler %s vers la droite"
+msgstr "Déplacer vers la Droite"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "BitAnd %s"
-msgstr "Et par bit %s"
+msgstr "ET Binaire"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "BitOr %s"
-msgstr "Ou par bit %s"
+msgstr "OU Binaire"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "BitXor %s"
-msgstr "Ou-exclusif par bit %s"
+msgstr "OU Exclusif Binaire"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Set Mode"
@@ -18303,7 +18304,7 @@ msgstr "Récupérer Self"
#: modules/visual_script/visual_script_nodes.cpp
msgid "CustomNode"
-msgstr "Nœud Personnalisé"
+msgstr "Noeud Personalisé"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
@@ -18357,7 +18358,7 @@ msgstr "Yield"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "Wait"
-msgstr "Wait"
+msgstr "Attente/Attendre"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "Next Frame"
@@ -19267,7 +19268,7 @@ msgstr "Projecteur 80 X 80"
#: platform/iphone/export/export.cpp
msgid "Storyboard"
-msgstr "Storyboard"
+msgstr "Story-board"
#: platform/iphone/export/export.cpp
msgid "Use Launch Screen Storyboard"
@@ -20272,15 +20273,14 @@ msgid "Could not find wine executable at \"%s\"."
msgstr "Impossible de trouver wine à l'emplacement \"%s\"."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid ""
"Could not start rcedit executable. Configure rcedit path in the Editor "
"Settings (Export > Windows > Rcedit), or disable \"Application > Modify "
"Resources\" in the export preset."
msgstr ""
-"L'outil « rcedit » doit être configuré dans les préférences de l'éditeur "
-"(Exporter > Windows > Rcedit) for modifier l'icône ou les informations de "
-"l'application."
+"Impossible de démarrer l'exécutable rcedit. Configurez le chemin vers rcedit "
+"dans les réglages de l'éditeur (Exporter > Windows > Rcedit), ou désactivez "
+"\"Application > Modifier les Ressources\" dans les préréglages de l'export."
#: platform/windows/export/export.cpp
msgid "rcedit failed to modify executable: %s."
@@ -20303,15 +20303,14 @@ msgid "Invalid timestamp server."
msgstr "Server d'horodatage invalide."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid ""
"Could not start signtool executable. Configure signtool path in the Editor "
"Settings (Export > Windows > Signtool), or disable \"Codesign\" in the "
"export preset."
msgstr ""
-"L'outil « rcedit » doit être configuré dans les préférences de l'éditeur "
-"(Exporter > Windows > Rcedit) for modifier l'icône ou les informations de "
-"l'application."
+"Impossible de démarrer l'exécutable signtool. Configurez le chemin vers "
+"signtool dans les réglages de l'éditeur (Exporter > Windows > Signtool) ou "
+"désactivez \"Codesign\" dans les préréglages de l'export."
#: platform/windows/export/export.cpp
msgid "Signtool failed to sign executable: %s."
@@ -20567,14 +20566,12 @@ msgid "Draw Margin"
msgstr "Afficher les marges"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Drag Margin H Enabled"
-msgstr "Définir la marge"
+msgstr "Marge de tirage H activée"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Drag Margin V Enabled"
-msgstr "Définir la marge"
+msgstr "Marge de tirage V activée"
#: scene/2d/camera_2d.cpp
msgid "Smoothing"
@@ -20589,9 +20586,8 @@ msgid "V"
msgstr "V"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Drag Margin"
-msgstr "Tirer la marge"
+msgstr "Marge Tirage"
#: scene/2d/camera_2d.cpp
msgid "Draw Screen"
@@ -20602,9 +20598,8 @@ msgid "Draw Limits"
msgstr "Afficher les limites"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Draw Drag Margin"
-msgstr "Définir la marge"
+msgstr "Dessiner la marge de tirage"
#: scene/2d/canvas_item.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp
@@ -21633,9 +21628,8 @@ msgid "Internal Vertex Count"
msgstr "Nombre de Sommet Interne"
#: scene/2d/position_2d.cpp
-#, fuzzy
msgid "Gizmo Extents"
-msgstr "Gadgets"
+msgstr "Etendues des Gadgets"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Exclude Parent"
@@ -23258,9 +23252,8 @@ msgid "Gizmo"
msgstr "Gizmo"
#: scene/3d/spatial_velocity_tracker.cpp
-#, fuzzy
msgid "Track Physics Step"
-msgstr "Image physique %"
+msgstr "Suivre les Etapes Physiques"
#: scene/3d/spring_arm.cpp
msgid "Spring Length"
@@ -23682,9 +23675,8 @@ msgid "Group"
msgstr "Groupe"
#: scene/gui/button.cpp scene/gui/label.cpp
-#, fuzzy
msgid "Clip Text"
-msgstr "Copier le texte"
+msgstr "Découper le texte"
#: scene/gui/button.cpp scene/gui/label.cpp scene/gui/line_edit.cpp
#: scene/gui/spin_box.cpp
@@ -23696,9 +23688,8 @@ msgid "Icon Align"
msgstr "Aligner l'icône"
#: scene/gui/button.cpp
-#, fuzzy
msgid "Expand Icon"
-msgstr "Développer tout"
+msgstr "Développer l'icône"
#: scene/gui/center_container.cpp
msgid "Use Top Left"
@@ -23795,9 +23786,8 @@ msgid "Pivot Offset"
msgstr "Décalage du Pivot"
#: scene/gui/control.cpp
-#, fuzzy
msgid "Clip Content"
-msgstr "Constante de classe"
+msgstr "Découper le contenu"
#: scene/gui/control.cpp scene/resources/visual_shader_nodes.cpp
msgid "Hint"
@@ -23845,7 +23835,7 @@ msgstr "Forme de Curseur par Défaut"
#: scene/gui/control.cpp
msgid "Pass On Modal Close Click"
-msgstr ""
+msgstr "Transmettre Clic de Fermeture du Mode"
#: scene/gui/control.cpp
msgid "Size Flags"
@@ -23856,9 +23846,8 @@ msgid "Stretch Ratio"
msgstr "Ratio d’étirement"
#: scene/gui/control.cpp
-#, fuzzy
msgid "Theme Type Variation"
-msgstr "Propriétés du thème"
+msgstr "Variation du Type du Thème"
#: scene/gui/dialogs.cpp
msgid "Window Title"
@@ -23881,18 +23870,16 @@ msgid "Please Confirm..."
msgstr "Veuillez confirmer…"
#: scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Mode Overrides Title"
-msgstr "Remplacer l'item"
+msgstr "Le Mode remplace le Titre"
#: scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Utilisez une extension valide."
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Right Disconnects"
-msgstr "Déconnecter"
+msgstr "La droite déconnecte"
#: scene/gui/graph_edit.cpp
msgid "Scroll Offset"
@@ -23928,9 +23915,8 @@ msgid "Enable grid minimap."
msgstr "Activer l'alignement."
#: scene/gui/graph_node.cpp
-#, fuzzy
msgid "Show Close"
-msgstr "Afficher les os"
+msgstr "Afficher la Fermeture"
#: scene/gui/graph_node.cpp scene/gui/option_button.cpp
#: scene/resources/default_theme/default_theme.cpp
@@ -23959,23 +23945,20 @@ msgid "Incremental Search Max Interval Msec"
msgstr "Intervalle max de recherche incrémentale (ms)"
#: scene/gui/item_list.cpp scene/gui/tree.cpp
-#, fuzzy
msgid "Allow Reselect"
-msgstr "Appliquer la réinitialisation"
+msgstr "Autoriser la Resélection"
#: scene/gui/item_list.cpp scene/gui/tree.cpp
-#, fuzzy
msgid "Allow RMB Select"
-msgstr "Remplir la sélection"
+msgstr "Autoriser la sélection par click droit"
#: scene/gui/item_list.cpp
msgid "Max Text Lines"
msgstr "Lignes de texte max"
#: scene/gui/item_list.cpp
-#, fuzzy
msgid "Auto Height"
-msgstr "En période de test"
+msgstr "Hauteur Auto"
#: scene/gui/item_list.cpp
msgid "Max Columns"
@@ -23994,23 +23977,20 @@ msgid "Icon Scale"
msgstr "Échelle de l'Icône"
#: scene/gui/item_list.cpp
-#, fuzzy
msgid "Fixed Icon Size"
-msgstr "Vue de devant"
+msgstr "Taille d'Icône Fixe"
#: scene/gui/label.cpp
-#, fuzzy
msgid "V Align"
-msgstr "Assigner"
+msgstr "Alignement V"
#: scene/gui/label.cpp scene/gui/rich_text_label.cpp
msgid "Visible Characters"
msgstr "Caractères visibles"
#: scene/gui/label.cpp scene/gui/rich_text_label.cpp
-#, fuzzy
msgid "Percent Visible"
-msgstr "Rendre visible"
+msgstr "Pourcentage visible"
#: scene/gui/label.cpp
msgid "Lines Skipped"
@@ -24037,34 +24017,28 @@ msgid "Expand To Text Length"
msgstr "Etendre à la longueur du texte"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Context Menu Enabled"
-msgstr "Aide contextuelle"
+msgstr "Menu Contextuel Activé"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Virtual Keyboard Enabled"
-msgstr "Filtrer les signaux"
+msgstr "Clavier Virtuel Activé"
#: scene/gui/line_edit.cpp
-#, fuzzy
msgid "Clear Button Enabled"
-msgstr "Filtrer les signaux"
+msgstr "Bouton de Nettoyage Activé"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Shortcut Keys Enabled"
-msgstr "Raccourcis"
+msgstr "Raccourcis activés"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Middle Mouse Paste Enabled"
-msgstr "Filtrer les signaux"
+msgstr "Collage avec le bouton central de la souris activé"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Selecting Enabled"
-msgstr "Sélection uniquement"
+msgstr "Sélection Activée"
#: scene/gui/line_edit.cpp scene/gui/rich_text_label.cpp
#: scene/gui/text_edit.cpp
@@ -24072,14 +24046,12 @@ msgid "Deselect On Focus Loss Enabled"
msgstr "Déselection à la perte de focus activée"
#: scene/gui/line_edit.cpp
-#, fuzzy
msgid "Right Icon"
-msgstr "Bouton droit"
+msgstr "Icône droite"
#: scene/gui/line_edit.cpp
-#, fuzzy
msgid "Placeholder"
-msgstr "Charger en tant qu'instance temporaire"
+msgstr "Substitut temporaire"
#: scene/gui/line_edit.cpp
msgid "Alpha"
@@ -24102,24 +24074,20 @@ msgid "Underline"
msgstr "Souligner"
#: scene/gui/menu_button.cpp
-#, fuzzy
msgid "Switch On Hover"
-msgstr "Switch"
+msgstr "Chnager au Survol"
#: scene/gui/nine_patch_rect.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Draw Center"
-msgstr "Centre"
+msgstr "Dessiner le Centre"
#: scene/gui/nine_patch_rect.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Region Rect"
-msgstr "Définir région rectangulaire"
+msgstr "Zone Rectangulaire"
#: scene/gui/nine_patch_rect.cpp
-#, fuzzy
msgid "Patch Margin"
-msgstr "Définir la marge"
+msgstr "Marge de patch"
#: scene/gui/nine_patch_rect.cpp scene/resources/style_box.cpp
msgid "Axis Stretch"
@@ -24138,7 +24106,6 @@ msgstr ""
"un étirement."
#: scene/gui/popup.cpp
-#, fuzzy
msgid "Popup"
msgstr "Fenêtre contextuelle"
@@ -24170,9 +24137,8 @@ msgid "Hide On State Item Selection"
msgstr "Cacher lors de la sélection de l'élément d'état"
#: scene/gui/popup_menu.cpp
-#, fuzzy
msgid "Submenu Popup Delay"
-msgstr "Délai du pop-up du sous-menu"
+msgstr "Délai de pop-up du sous-menu"
#: scene/gui/popup_menu.cpp
msgid "Allow Search"
@@ -24205,9 +24171,8 @@ msgid "Exp Edit"
msgstr "Édition Exponentielle"
#: scene/gui/range.cpp
-#, fuzzy
msgid "Rounded"
-msgstr "Arrondir"
+msgstr "Arrondi"
#: scene/gui/range.cpp
msgid "Allow Greater"
@@ -24238,9 +24203,8 @@ msgid "Elapsed Time"
msgstr "Temps Écoulé"
#: scene/gui/rich_text_effect.cpp
-#, fuzzy
msgid "Env"
-msgstr "Fin"
+msgstr "Alentours"
#: scene/gui/rich_text_effect.cpp
msgid "Character"
@@ -24298,18 +24262,16 @@ msgstr ""
"définissez manuellement la taille minimale personnalisée."
#: scene/gui/scroll_container.cpp
-#, fuzzy
msgid "Follow Focus"
-msgstr "Remplir la surface"
+msgstr "Suivre le focus"
#: scene/gui/scroll_container.cpp
msgid "Horizontal Enabled"
msgstr "Horizontal Activé"
#: scene/gui/scroll_container.cpp
-#, fuzzy
msgid "Vertical Enabled"
-msgstr "Filtrer les signaux"
+msgstr "Vertical Activé"
#: scene/gui/scroll_container.cpp
msgid "Default Scroll Deadzone"
@@ -24320,9 +24282,8 @@ msgid "Scrollable"
msgstr "Défilant"
#: scene/gui/slider.cpp
-#, fuzzy
msgid "Tick Count"
-msgstr "Prélever une couleur"
+msgstr "Compte des Tics"
#: scene/gui/slider.cpp
msgid "Ticks On Borders"
@@ -24341,14 +24302,12 @@ msgid "Split Offset"
msgstr "Décalage des écarts"
#: scene/gui/split_container.cpp scene/gui/tree.cpp
-#, fuzzy
msgid "Collapsed"
-msgstr "Réduire tout"
+msgstr "Réduit"
#: scene/gui/split_container.cpp
-#, fuzzy
msgid "Dragger Visibility"
-msgstr "Basculer la visibilité"
+msgstr "Visibilité du Tireur"
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
msgid "Tab Align"
@@ -24359,9 +24318,8 @@ msgid "Current Tab"
msgstr "Onglet actuel"
#: scene/gui/tab_container.cpp
-#, fuzzy
msgid "Tabs Visible"
-msgstr "Rendre visible"
+msgstr "Onglets Visibles"
#: scene/gui/tab_container.cpp
msgid "All Tabs In Front"
@@ -24388,33 +24346,28 @@ msgid "Readonly"
msgstr "Lecture Seule"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Bookmark Gutter"
-msgstr "Signets"
+msgstr "Bandeau à Marque-pages"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Breakpoint Gutter"
-msgstr "Passer les points d'arrêt"
+msgstr "Bandeau à points d'arrêt"
#: scene/gui/text_edit.cpp
msgid "Fold Gutter"
msgstr "Replier le bandeau"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Drag And Drop Selection Enabled"
-msgstr "Sélection uniquement"
+msgstr "Sélection en Glisser-déposer Activée"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Hiding Enabled"
-msgstr "Activer"
+msgstr "Cacher Activé"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Wrap Enabled"
-msgstr "Activer"
+msgstr "Déformation Activée"
#: scene/gui/text_edit.cpp
msgid "Scroll Vertical"
@@ -24429,9 +24382,8 @@ msgid "Draw"
msgstr "Dessiner"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Block Mode"
-msgstr "Déverrouiller le nœud"
+msgstr "Mode Bloc"
#: scene/gui/text_edit.cpp
msgid "Moving By Right Click"
@@ -24451,34 +24403,29 @@ msgid "Hover"
msgstr "Survoler"
#: scene/gui/texture_button.cpp
-#, fuzzy
msgid "Focused"
-msgstr "Focaliser le chemin"
+msgstr "Focalisé"
#: scene/gui/texture_button.cpp
-#, fuzzy
msgid "Click Mask"
-msgstr "Mode collision"
+msgstr "Masque de Clic"
#: scene/gui/texture_button.cpp scene/gui/texture_rect.cpp
#: scene/gui/video_player.cpp
-#, fuzzy
msgid "Expand"
-msgstr "Développer tout"
+msgstr "Développer"
#: scene/gui/texture_progress.cpp
msgid "Under"
msgstr "Sous"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Over"
-msgstr "Écraser"
+msgstr "Par-dessus"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Progress"
-msgstr "Propriétés du thème"
+msgstr "Progrès"
#: scene/gui/texture_progress.cpp
msgid "Progress Offset"
@@ -24497,43 +24444,36 @@ msgid "Radial Fill"
msgstr "Remplissage Radial"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Initial Angle"
-msgstr "Initialiser"
+msgstr "Angle Initial"
#: scene/gui/texture_progress.cpp
msgid "Fill Degrees"
msgstr "Degrés remplis"
#: scene/gui/texture_progress.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Center Offset"
-msgstr "Centré à Gauche"
+msgstr "Décalage du Centre"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Nine Patch Stretch"
-msgstr "Mode d’interpolation"
+msgstr "Etirement à Neuf Patchs"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Stretch Margin Left"
-msgstr "Définir la marge"
+msgstr "Etirer la marge à gauche"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Stretch Margin Top"
-msgstr "Définir la marge"
+msgstr "Etirer la marge en haut"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Stretch Margin Right"
-msgstr "Définir la marge"
+msgstr "Etirer la marge à droite"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Stretch Margin Bottom"
-msgstr "Mode sélection"
+msgstr "Etirer la marge en bas"
#: scene/gui/tree.cpp
msgid "Custom Minimum Height"
@@ -24544,14 +24484,12 @@ msgid "(Other)"
msgstr "(Autre)"
#: scene/gui/tree.cpp
-#, fuzzy
msgid "Column Titles Visible"
-msgstr "Rendre visible"
+msgstr "Titres des colonnes visibles"
#: scene/gui/tree.cpp
-#, fuzzy
msgid "Hide Folding"
-msgstr "Bouton désactivé"
+msgstr "Cacher les plis"
#: scene/gui/tree.cpp
msgid "Hide Root"
@@ -24562,43 +24500,36 @@ msgid "Drop Mode Flags"
msgstr "Options du Mode Abandon"
#: scene/gui/video_player.cpp
-#, fuzzy
msgid "Audio Track"
-msgstr "Ajouter une piste"
+msgstr "Piste Audio"
#: scene/gui/video_player.cpp scene/main/scene_tree.cpp scene/main/timer.cpp
msgid "Paused"
msgstr "En Pause"
#: scene/gui/video_player.cpp
-#, fuzzy
msgid "Buffering Msec"
-msgstr "Vue de derrière"
+msgstr "Mise en mémoire tampon ms"
#: scene/gui/video_player.cpp
-#, fuzzy
msgid "Stream Position"
-msgstr "Définir position d'entrée de la courbe"
+msgstr "Position Flux"
#: scene/gui/viewport_container.cpp
-#, fuzzy
msgid "Stretch Shrink"
-msgstr "Actualiser"
+msgstr "Etirer-Réduire"
#: scene/main/canvas_layer.cpp
-#, fuzzy
msgid "Follow Viewport"
-msgstr "Afficher le Viewport"
+msgstr "Suivre la fenêtre d'affichage"
#: scene/main/http_request.cpp
-#, fuzzy
msgid "Download File"
-msgstr "Télécharger"
+msgstr "Télécharger le Fichier"
#: scene/main/http_request.cpp
-#, fuzzy
msgid "Download Chunk Size"
-msgstr "Téléchargement en cours"
+msgstr "Taille des Blocs de Téléchargement"
#: scene/main/http_request.cpp
msgid "Body Size Limit"
@@ -24621,80 +24552,68 @@ msgstr ""
"'%s', car ce nom est déjà attribué à '%s'. Ce nœud n'est donc plus unique."
#: scene/main/node.cpp
-#, fuzzy
msgid "Name Num Separator"
-msgstr "Séparateur nommé"
+msgstr "Nom des séparateurs numériques"
#: scene/main/node.cpp
msgid "Name Casing"
msgstr "Convention de Nommage"
#: scene/main/node.cpp
-#, fuzzy
msgid "Editor Description"
-msgstr "Description"
+msgstr "Description de l'Editeur"
#: scene/main/node.cpp
-#, fuzzy
msgid "Pause Mode"
-msgstr "Mode navigation"
+msgstr "Mode Pause"
#: scene/main/node.cpp
-#, fuzzy
msgid "Physics Interpolation Mode"
-msgstr "Mode d’interpolation"
+msgstr "Mode d’interpolation physique"
#: scene/main/node.cpp
-#, fuzzy
msgid "Display Folded"
-msgstr "Afficher sans ombrage"
+msgstr "Afficher les repliés"
#: scene/main/node.cpp
-#, fuzzy
msgid "Filename"
-msgstr "Renommer"
+msgstr "Nom de fichier"
#: scene/main/node.cpp
msgid "Owner"
msgstr "Propriétaire"
#: scene/main/node.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Multiplayer"
-msgstr "Multiplier %s"
+msgstr "Multijoueur"
#: scene/main/node.cpp
msgid "Custom Multiplayer"
msgstr "Multijoueur Personnalisé"
#: scene/main/node.cpp
-#, fuzzy
msgid "Process Priority"
-msgstr "Activer la priorité"
+msgstr "Priorité de processus"
#: scene/main/scene_tree.cpp scene/main/timer.cpp
-#, fuzzy
msgid "Time Left"
-msgstr "En haut à gauche"
+msgstr "Temps restant"
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Debug Collisions Hint"
-msgstr "Mode collision"
+msgstr "Déboguer les indices de collision"
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Debug Navigation Hint"
-msgstr "Mode Navigation"
+msgstr "Déboguer les indices de navigation"
#: scene/main/scene_tree.cpp
msgid "Use Font Oversampling"
msgstr "Utiliser le Suréchantillonnage de Police"
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Edited Scene Root"
-msgstr "Nouvelle racine de scène"
+msgstr "Racine de scène modifiée"
#: scene/main/scene_tree.cpp
msgid "Root"
@@ -24778,9 +24697,8 @@ msgstr ""
"Environnement -> Environnement par défaut) ne peut pas être chargé."
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Enable Object Picking"
-msgstr "Activer l'effet « pelure d'oignon »"
+msgstr "Activer la sélection d'objet"
#: scene/main/timer.cpp
msgid ""
@@ -24829,14 +24747,12 @@ msgid "ARVR"
msgstr "ARVR"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Size Override Stretch"
-msgstr "Remplacer l'item"
+msgstr "La taille passe outre l'étirement"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Own World"
-msgstr "Propre Monde"
+msgstr "Monde Propre"
#: scene/main/viewport.cpp scene/resources/world_2d.cpp
msgid "World"
@@ -24859,9 +24775,8 @@ msgid "FXAA"
msgstr "FXAA"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Debanding"
-msgstr "Liaison"
+msgstr "Dé-banding"
#: scene/main/viewport.cpp
msgid "Disable 3D"
@@ -24888,9 +24803,8 @@ msgid "V Flip"
msgstr "Miroir V"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Clear Mode"
-msgstr "Mode Règle"
+msgstr "Mode Nettoyage"
#: scene/main/viewport.cpp
msgid "Enable 2D"
@@ -24901,18 +24815,16 @@ msgid "Enable 3D"
msgstr "Activer 3D"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Object Picking"
-msgstr "Activer l'effet « pelure d'oignon »"
+msgstr "Sélection d'objet"
#: scene/main/viewport.cpp
msgid "Disable Input"
msgstr "Désactiver entrées"
#: scene/main/viewport.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Shadow Atlas"
-msgstr "Nouvel Atlas"
+msgstr "Atlas d'ombres"
#: scene/main/viewport.cpp
msgid "Quad 0"
@@ -25000,9 +24912,8 @@ msgid "Segments"
msgstr "Segments"
#: scene/resources/curve.cpp
-#, fuzzy
msgid "Bake Resolution"
-msgstr "Demi résolution"
+msgstr "Précalculer la résolution"
#: scene/resources/curve.cpp
msgid "Bake Interval"
@@ -25133,19 +25044,16 @@ msgid "Cursor Color"
msgstr "Couleur du curseur"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Clear Button Color"
-msgstr "Filtrer les signaux"
+msgstr "Couleur du bouton de nettoyage"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Clear Button Color Pressed"
-msgstr "Filtrer les signaux"
+msgstr "Couleur du bouton de nettoyage appuyé"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Minimum Spaces"
-msgstr "Scène principale"
+msgstr "Espacement Minimum"
#: scene/resources/default_theme/default_theme.cpp
msgid "BG"
@@ -25251,12 +25159,11 @@ msgstr "Signet"
#: scene/resources/default_theme/default_theme.cpp
msgid "Updown"
-msgstr ""
+msgstr "Haut/Bas"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Scaleborder Size"
-msgstr "Pixels de bordure"
+msgstr "Taille de la bordure du cadre"
#: scene/resources/default_theme/default_theme.cpp
msgid "Title Font"
@@ -25307,9 +25214,8 @@ msgid "Font Separator"
msgstr "Séparateur de police"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color Accel"
-msgstr "Renommer l'item de couleur"
+msgstr "Accélération de la couleur de police"
#: scene/resources/default_theme/default_theme.cpp
msgid "Font Color Separator"
@@ -25328,14 +25234,12 @@ msgid "Default Frame"
msgstr "Trame par défaut"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Default Focus"
-msgstr "Défaut"
+msgstr "Focalisation par défaut"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Comment Focus"
-msgstr "Enregistrer"
+msgstr "Focalisation des commentaires"
#: scene/resources/default_theme/default_theme.cpp
msgid "Breakpoint"
@@ -25366,14 +25270,12 @@ msgid "Port Offset"
msgstr "Décalage du port"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "BG Focus"
-msgstr "Focaliser le chemin"
+msgstr "Focalisation de l'arrière-plan"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Selected Focus"
-msgstr "Sélectionner"
+msgstr "Focalisation de la sélection"
#: scene/resources/default_theme/default_theme.cpp
msgid "Cursor Unfocused"
@@ -25384,19 +25286,16 @@ msgid "Button Pressed"
msgstr "Bouton quand pressé"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Title Button Normal"
-msgstr "Bouton à bascule (toggle)"
+msgstr "Bouton de titre normal"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Title Button Pressed"
-msgstr "Bouton à bascule (toggle)"
+msgstr "Bouton de titre appuyé"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Title Button Hover"
-msgstr "Bouton à bascule (toggle)"
+msgstr "Bouton de titre survolé"
#: scene/resources/default_theme/default_theme.cpp
msgid "Custom Button"
@@ -25411,33 +25310,28 @@ msgid "Custom Button Hover"
msgstr "Bouton personnalisé au survol"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Select Arrow"
-msgstr "Tout sélectionner"
+msgstr "Flèche de sélection"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Arrow Collapsed"
-msgstr "Réduire tout"
+msgstr "Flèche réduite"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Title Button Font"
-msgstr "Bouton à bascule (toggle)"
+msgstr "Police du bouton de titre"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Title Button Color"
-msgstr "Couleur de la Sélection"
+msgstr "Couleur du bouton de titre"
#: scene/resources/default_theme/default_theme.cpp
msgid "Guide Color"
msgstr "Couleur des guides"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Drop Position Color"
-msgstr "Position du dock"
+msgstr "Couleur de position du dépôt"
#: scene/resources/default_theme/default_theme.cpp
msgid "Relationship Line Color"
@@ -25500,14 +25394,12 @@ msgid "Menu Highlight"
msgstr "Menu au survol"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color FG"
-msgstr "Renommer l'item de couleur"
+msgstr "Couleur de police premier plan"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color BG"
-msgstr "Renommer l'item de couleur"
+msgstr "Couleur de police arrière-plan"
#: scene/resources/default_theme/default_theme.cpp
msgid "Side Margin"
@@ -25519,11 +25411,11 @@ msgstr "Marge en haut"
#: scene/resources/default_theme/default_theme.cpp
msgid "Label V Align FG"
-msgstr ""
+msgstr "Alignement Vertical du Label Premier Plan"
#: scene/resources/default_theme/default_theme.cpp
msgid "Label V Align BG"
-msgstr ""
+msgstr "Alignement Vertical du Label Arrière-plan"
#: scene/resources/default_theme/default_theme.cpp
msgid "Large"
@@ -25546,19 +25438,16 @@ msgid "Files Disabled"
msgstr "Fichiers désactivés"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "SV Width"
-msgstr "Étendu à Gauche"
+msgstr "Largeur SV"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "SV Height"
-msgstr "Lumière"
+msgstr "Hauteur SV"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "H Width"
-msgstr "Étendu à Gauche"
+msgstr "Largeur H"
#: scene/resources/default_theme/default_theme.cpp
msgid "Label Width"
@@ -25673,9 +25562,8 @@ msgid "Activity"
msgstr "Activité"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Bezier Len Pos"
-msgstr "Déplacer des points de Bézier"
+msgstr "Position de longueur de Bézier"
#: scene/resources/default_theme/default_theme.cpp
msgid "Bezier Len Neg"
@@ -25842,9 +25730,8 @@ msgid "Max Luma"
msgstr "Lumen maximum"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "SS Reflections"
-msgstr "Mettre à l'échelle la sélection"
+msgstr "Reflets SS"
#: scene/resources/environment.cpp
msgid "Max Steps"
@@ -25879,14 +25766,12 @@ msgid "Intensity 2"
msgstr "Intensité 2"
#: scene/resources/environment.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Light Affect"
-msgstr "Étendu à Droite"
+msgstr "Influence de la lumière"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "AO Channel Affect"
-msgstr "Débogage du canal UV"
+msgstr "Influence du canal AO"
#: scene/resources/environment.cpp
msgid "Blur"
@@ -26158,12 +26043,11 @@ msgstr "NormalMap"
#: scene/resources/material.cpp
msgid "Rim"
-msgstr "Bord"
+msgstr "Bordure"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Clearcoat"
-msgstr "Effacer"
+msgstr "Coucheclaire"
#: scene/resources/material.cpp
msgid "Gloss"
@@ -26175,7 +26059,7 @@ msgstr "Anisotropie"
#: scene/resources/material.cpp
msgid "Flowmap"
-msgstr ""
+msgstr "Organigramme"
#: scene/resources/material.cpp
msgid "Ambient Occlusion"
@@ -26186,23 +26070,20 @@ msgid "Deep Parallax"
msgstr "Parallaxe Profonde"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Min Layers"
-msgstr "Calque"
+msgstr "Calques min"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Max Layers"
-msgstr "Calque"
+msgstr "Calques max"
#: scene/resources/material.cpp
msgid "Flip Tangent"
msgstr "Inverser la Tangente"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Flip Binormal"
-msgstr "Retourner le Portal"
+msgstr "Inversion Bi-normale"
#: scene/resources/material.cpp
msgid "Subsurf Scatter"
@@ -26241,9 +26122,8 @@ msgid "UV2"
msgstr "UV2"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Proximity Fade"
-msgstr "Mode prioritaire"
+msgstr "Fondu de proximité"
#: scene/resources/material.cpp
msgid "Distance Fade"
@@ -26254,9 +26134,8 @@ msgid "Async Mode"
msgstr "Mode asynchrone"
#: scene/resources/mesh.cpp
-#, fuzzy
msgid "Lightmap Size Hint"
-msgstr "LightMap Bake"
+msgstr "Indice de taille de la texture de lumière"
#: scene/resources/mesh.cpp scene/resources/primitive_meshes.cpp
msgid "Custom AABB"
@@ -26307,9 +26186,8 @@ msgid "Source Geometry Mode"
msgstr "Mode Géométrie Source"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Source Group Name"
-msgstr "Source"
+msgstr "Nom du groupe source"
#: scene/resources/navigation_mesh.cpp
msgid "Cells"
@@ -26332,18 +26210,16 @@ msgid "Regions"
msgstr "Régions"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Merge Size"
-msgstr "Fusionner depuis la scène"
+msgstr "Taille de la fusion"
#: scene/resources/navigation_mesh.cpp
msgid "Edges"
msgstr "Arêtes"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Max Error"
-msgstr "Erreur"
+msgstr "Erreur max"
#: scene/resources/navigation_mesh.cpp
msgid "Verts Per Poly"
@@ -26358,9 +26234,8 @@ msgid "Sample Distance"
msgstr "Échantillonner la distance"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Sample Max Error"
-msgstr "Échantillonneur"
+msgstr "Échantillon erreur max"
#: scene/resources/navigation_mesh.cpp
msgid "Low Hanging Obstacles"
@@ -26375,14 +26250,12 @@ msgid "Walkable Low Height Spans"
msgstr "Etendues de faible hauteur praticables"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Baking AABB"
-msgstr "Générer AABB"
+msgstr "Précalcul AABB"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Baking AABB Offset"
-msgstr "Décalage :"
+msgstr "Décalage du Précalcul AABB"
#: scene/resources/occluder_shape.cpp
msgid "Spheres"
@@ -26413,14 +26286,12 @@ msgid "Divisor"
msgstr "Diviseur"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Size Modifier"
-msgstr "Modificateur de vitesse de la vue libre"
+msgstr "Modificateur de taille"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Color Modifier"
-msgstr "Ralentissement de la vue libre"
+msgstr "Modificateur de couleur"
#: scene/resources/particles_material.cpp
msgid "Point Texture"
@@ -26431,9 +26302,8 @@ msgid "Normal Texture"
msgstr "Texture Normale"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Color Texture"
-msgstr "Thème de l'éditeur"
+msgstr "Texture de couleur"
#: scene/resources/particles_material.cpp
msgid "Point Count"
@@ -26444,9 +26314,8 @@ msgid "Scale Random"
msgstr "Échelle Aléatoire"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Scale Curve"
-msgstr "Fermer la courbe"
+msgstr "Courbe d'échelle"
#: scene/resources/physics_material.cpp
msgid "Rough"
@@ -26485,9 +26354,8 @@ msgid "Top Radius"
msgstr "Rayon Supérieur"
#: scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Bottom Radius"
-msgstr "En bas à droite"
+msgstr "Rayon bas"
#: scene/resources/primitive_meshes.cpp
msgid "Left To Right"
@@ -26574,18 +26442,16 @@ msgid "Content Margin"
msgstr "Marge de contenu"
#: scene/resources/style_box.cpp
-#, fuzzy
msgid "Expand Margin"
-msgstr "Développer tout"
+msgstr "Développer la marge"
#: scene/resources/style_box.cpp
msgid "Skew"
msgstr "Biseau"
#: scene/resources/style_box.cpp
-#, fuzzy
msgid "Corner Radius"
-msgstr "Changer le rayon intérieur de la tour"
+msgstr "Rayon de coin"
#: scene/resources/style_box.cpp
msgid "Corner Detail"
@@ -26604,9 +26470,8 @@ msgid "Grow End"
msgstr "Fin d'Expansion"
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Load Path"
-msgstr "Charger un préréglage"
+msgstr "Charger chemin"
#: scene/resources/texture.cpp
msgid "Base Texture"
@@ -26673,14 +26538,12 @@ msgid "Output Port For Preview"
msgstr "Port de sortie de l'aperçu"
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Depth Draw"
-msgstr "Mode d’interpolation"
+msgstr "Dessin en profondeur"
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Cull"
-msgstr "Mode Règle"
+msgstr "élaguer/élagage"
#: scene/resources/visual_shader.cpp
msgid "Diffuse"
@@ -26727,9 +26590,8 @@ msgid "Cube Map"
msgstr "Textures en cube"
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Default Value Enabled"
-msgstr "Profil des fonctionnalités de Godot"
+msgstr "Valeur par défaut activée"
#: scene/resources/visual_shader_nodes.cpp
msgid "Default Value"
@@ -26757,25 +26619,23 @@ msgstr "Carte de navigation"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
msgid "Direct Space State"
-msgstr ""
+msgstr "Etat de l'espace direct"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
msgid "Default Gravity Vector"
msgstr "Vecteur de gravité par défaut"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
-#, fuzzy
msgid "Default Linear Damp"
-msgstr "Linéaire gauche"
+msgstr "Amorti linéaire par défaut"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
msgid "Default Angular Damp"
-msgstr ""
+msgstr "Amorti Angulaire par Défaut"
#: scene/resources/world.cpp
-#, fuzzy
msgid "Default Map Up"
-msgstr "Défaut"
+msgstr "Haut de carte par défaut"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
msgid "Default Cell Size"
@@ -26807,7 +26667,7 @@ msgstr "AR"
#: servers/arvr/arvr_interface.cpp
msgid "Is Anchor Detection Enabled"
-msgstr ""
+msgstr "La détection d'ancre est-elle activée"
#: servers/arvr_server.cpp
msgid "Primary Interface"
@@ -26869,7 +26729,7 @@ msgstr "Niveau (dB)"
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_panner.cpp
msgid "Pan"
-msgstr "Pan"
+msgstr "Panoramique/faire un panoramique"
#: servers/audio/effects/audio_effect_compressor.cpp
#: servers/audio/effects/audio_effect_filter.cpp
@@ -26890,15 +26750,15 @@ msgstr "Mixer"
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Sidechain"
-msgstr ""
+msgstr "Sidechain"
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Tap 1"
-msgstr ""
+msgstr "Tap 1"
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Tap 2"
-msgstr ""
+msgstr "Tap 2"
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_phaser.cpp
@@ -26920,7 +26780,7 @@ msgstr "Garder haute fréquences (Hz)"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Drive"
-msgstr ""
+msgstr "Elan"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Post Gain"
@@ -26940,11 +26800,11 @@ msgstr "Seuil de dB"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Soft Clip dB"
-msgstr ""
+msgstr "dB de Coupure Douce"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Soft Clip Ratio"
-msgstr ""
+msgstr "Ratio de Coupure Douce"
#: servers/audio/effects/audio_effect_phaser.cpp
msgid "Range Min Hz"
@@ -26956,7 +26816,7 @@ msgstr "Borne supérieure de la plage (Hz)"
#: servers/audio/effects/audio_effect_pitch_shift.cpp
msgid "Oversampling"
-msgstr "Suréchantillonnage"
+msgstr "Sur-échantillonnage"
#: servers/audio/effects/audio_effect_pitch_shift.cpp
#: servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -26981,11 +26841,11 @@ msgstr "Passe-haut"
#: servers/audio/effects/audio_effect_spectrum_analyzer.cpp
msgid "Tap Back Pos"
-msgstr ""
+msgstr "Tap Position Arrière"
#: servers/audio/effects/audio_effect_stereo_enhance.cpp
msgid "Pan Pullout"
-msgstr ""
+msgstr "Retrait du Panoramique"
#: servers/audio/effects/audio_effect_stereo_enhance.cpp
msgid "Time Pullout (ms)"
@@ -27008,9 +26868,8 @@ msgid "Channel Disable Threshold dB"
msgstr "Désactiver le seuil de dB du canal"
#: servers/audio_server.cpp
-#, fuzzy
msgid "Channel Disable Time"
-msgstr "Changer le temps de mélange"
+msgstr "Temps de désactivation de canal"
#: servers/audio_server.cpp
msgid "Video Delay Compensation (ms)"
@@ -27054,7 +26913,7 @@ msgstr "Taille de la Table de Hachage BP"
#: servers/physics_2d/physics_2d_server_sw.cpp
msgid "Large Object Surface Threshold In Cells"
-msgstr ""
+msgstr "Seuil de Surface des Grands Objets dans les Cellules"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Inverse Mass"
@@ -27113,14 +26972,12 @@ msgid "Collision Depth"
msgstr "Profondeur de collision"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Collision Safe Fraction"
-msgstr "Mode collision"
+msgstr "Fraction anti-collisions"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Collision Unsafe Fraction"
-msgstr "Mode collision"
+msgstr "Fraction avec collisions potentielles"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Physics Engine"
@@ -27139,22 +26996,20 @@ msgid "Varying may not be assigned in the '%s' function."
msgstr "Varying ne peut pas être assigné dans la fonction '%s'."
#: servers/visual/shader_language.cpp
-#, fuzzy
msgid ""
"Varyings which were assigned in 'vertex' function may not be reassigned in "
"'fragment' or 'light'."
msgstr ""
-"Les Varyings assignées dans la fonction \"vertex\" ne peuvent pas être "
-"réassignées dans 'fragment' ou 'light'."
+"Les variations assignées dans la fonction \"sommet/vertex\" ne peuvent pas "
+"être réassignées dans \"fragment\" ou \"lumière/light\"."
#: servers/visual/shader_language.cpp
-#, fuzzy
msgid ""
"Varyings which were assigned in 'fragment' function may not be reassigned in "
"'vertex' or 'light'."
msgstr ""
-"Les Varyings attribuées dans la fonction 'fragment' ne peuvent pas être "
-"réattribuées dans 'vertex' ou 'light'."
+"Les variations attribuées dans la fonction \"fragment\" ne peuvent pas être "
+"réattribuées dans \"sommet/vertex\" ou \"lumière/light\"."
#: servers/visual/shader_language.cpp
msgid "Assignment to function."
@@ -27173,9 +27028,8 @@ msgid "Spatial Partitioning"
msgstr "Partitionnement Spatial"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Render Loop Enabled"
-msgstr "Filtrer les signaux"
+msgstr "Boucle de rendu activée"
#: servers/visual_server.cpp
msgid "VRAM Compression"
@@ -27215,28 +27069,27 @@ msgstr "Niveau de compression WebP"
#: servers/visual_server.cpp
msgid "Time Rollover Secs"
-msgstr ""
+msgstr "Temps de Roulement en Secondes"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Cubemap Size"
-msgstr "Changer la taille d'une caméra"
+msgstr "Taille de la Cubemap"
#: servers/visual_server.cpp
msgid "Quadrant 0 Subdiv"
-msgstr ""
+msgstr "Subdivisions Quadrant 0"
#: servers/visual_server.cpp
msgid "Quadrant 1 Subdiv"
-msgstr ""
+msgstr "Subdivision Quadrant 1"
#: servers/visual_server.cpp
msgid "Quadrant 2 Subdiv"
-msgstr ""
+msgstr "Subdivision Quadrant 2"
#: servers/visual_server.cpp
msgid "Quadrant 3 Subdiv"
-msgstr ""
+msgstr "Subdivision Quadrant 3"
#: servers/visual_server.cpp
msgid "Shadows"
@@ -27247,9 +27100,8 @@ msgid "Filter Mode"
msgstr "Mode de filtrage"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Texture Array Reflections"
-msgstr "Centrer sur la sélection"
+msgstr "Refléxions de la liste de textures"
#: servers/visual_server.cpp
msgid "High Quality GGX"
@@ -27257,7 +27109,7 @@ msgstr "GGX haute qualité"
#: servers/visual_server.cpp
msgid "Irradiance Max Size"
-msgstr ""
+msgstr "Taille Max Irradiance"
#: servers/visual_server.cpp
msgid "Shading"
@@ -27265,7 +27117,7 @@ msgstr "Ombrage"
#: servers/visual_server.cpp
msgid "Force Vertex Shading"
-msgstr ""
+msgstr "Forcer l'Ombrage des Sommets"
#: servers/visual_server.cpp
msgid "Force Lambert Over Burley"
@@ -27277,24 +27129,23 @@ msgstr "Forcer Blinn au lieu de GGX"
#: servers/visual_server.cpp
msgid "Mesh Storage"
-msgstr ""
+msgstr "Stockage de Maillage"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Split Stream"
-msgstr "Scinder la courbe"
+msgstr "Séparer flux"
#: servers/visual_server.cpp
msgid "Use Physical Light Attenuation"
-msgstr ""
+msgstr "Utiliser l'Atténuation Lumineuse Physique"
#: servers/visual_server.cpp
msgid "Depth Prepass"
-msgstr ""
+msgstr "Pré-passe de Profondeur"
#: servers/visual_server.cpp
msgid "Disable For Vendors"
-msgstr ""
+msgstr "Désactiver pour les Vendeurs"
#: servers/visual_server.cpp
msgid "Anisotropic Filter Level"
@@ -27310,15 +27161,15 @@ msgstr "Enveloppement"
#: servers/visual_server.cpp
msgid "Software Skinning Fallback"
-msgstr ""
+msgstr "Dépouillement Logiciel de Repli"
#: servers/visual_server.cpp
msgid "Force Software Skinning"
-msgstr ""
+msgstr "Forcer le Dépouillement Logiciel"
#: servers/visual_server.cpp
msgid "Use Software Skinning"
-msgstr ""
+msgstr "Utiliser Dépouillement Logiciel"
#: servers/visual_server.cpp
msgid "Ninepatch Mode"
@@ -27330,7 +27181,7 @@ msgstr "OpenGL"
#: servers/visual_server.cpp
msgid "Batching Send Null"
-msgstr ""
+msgstr "Traitement en Lot - Envoyer Null"
#: servers/visual_server.cpp
msgid "Batching Stream"
@@ -27338,11 +27189,11 @@ msgstr "Flux de traitement en lot"
#: servers/visual_server.cpp
msgid "Legacy Orphan Buffers"
-msgstr ""
+msgstr "Anciens Tampons Orphelins"
#: servers/visual_server.cpp
msgid "Legacy Stream"
-msgstr ""
+msgstr "Ancien Flux"
#: servers/visual_server.cpp
msgid "Batching"
@@ -27358,19 +27209,19 @@ msgstr "Utiliser le traitement en lot dans l'éditeur"
#: servers/visual_server.cpp
msgid "Single Rect Fallback"
-msgstr ""
+msgstr "Rectangle Unique de Repli"
#: servers/visual_server.cpp
msgid "Max Join Item Commands"
-msgstr ""
+msgstr "Commandes Max de Jointure d'Elements"
#: servers/visual_server.cpp
msgid "Colored Vertex Format Threshold"
-msgstr ""
+msgstr "Seuil de Format des Sommets Colorés"
#: servers/visual_server.cpp
msgid "Scissor Area Threshold"
-msgstr ""
+msgstr "Seuil d'Aire de Cisaillement"
#: servers/visual_server.cpp
msgid "Max Join Items"
@@ -27386,7 +27237,7 @@ msgstr "Anticipation de réorganisation d’éléments"
#: servers/visual_server.cpp
msgid "Flash Batching"
-msgstr ""
+msgstr "Traitement en Lot Flash"
#: servers/visual_server.cpp
msgid "Diagnose Frame"
@@ -27405,9 +27256,8 @@ msgid "Disable Half Float"
msgstr "Désactiver les demi Float"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Enable High Float"
-msgstr "Activer la priorité"
+msgstr "Activer les grands flottants"
#: servers/visual_server.cpp
msgid "Precision"
@@ -27434,19 +27284,16 @@ msgid "Use Signals"
msgstr "Utiliser les signaux"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Remove Danglers"
-msgstr "Supprimer la tuile"
+msgstr "Supprimer les pendouillants"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Flip Imported Portals"
-msgstr "Retourner les Portals"
+msgstr "Retourner les portails importés"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Occlusion Culling"
-msgstr "Voir la suppression de l'occlusion"
+msgstr "Elagage de l'occlusion"
#: servers/visual_server.cpp
msgid "Max Active Spheres"
diff --git a/editor/translations/ga.po b/editor/translations/ga.po
index 01810bb059..eea95f8656 100644
--- a/editor/translations/ga.po
+++ b/editor/translations/ga.po
@@ -10649,7 +10649,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/gl.po b/editor/translations/gl.po
index 1d2fbb333a..9bfb2b9309 100644
--- a/editor/translations/gl.po
+++ b/editor/translations/gl.po
@@ -11231,7 +11231,7 @@ msgstr "Perspetiva"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/he.po b/editor/translations/he.po
index 57b2386570..7458eedd15 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -26,13 +26,14 @@
# Tomer Ben Rachel <tomerpacific@gmail.com>, 2022.
# moshe mil <milgmoshe@gmail.com>, 2022.
# Blawnode <blawnode@gmail.com>, 2022.
+# Yoni m <yoni.meirov08@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-11-23 20:47+0000\n"
-"Last-Translator: Blawnode <blawnode@gmail.com>\n"
+"PO-Revision-Date: 2023-01-01 05:48+0000\n"
+"Last-Translator: Yoni m <yoni.meirov08@gmail.com>\n"
"Language-Team: Hebrew <https://hosted.weblate.org/projects/godot-engine/"
"godot/he/>\n"
"Language: he\n"
@@ -41,7 +42,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && "
"n % 10 == 0) ? 2 : 3));\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -274,9 +275,8 @@ msgid "Network Peer"
msgstr "מאפיין\\עמית רשת"
#: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp
-#, fuzzy
msgid "Root Node"
-msgstr "שינוי שם מפרק השורש"
+msgstr "מפרק השורש"
#: core/io/networked_multiplayer_peer.cpp
msgid "Refuse New Connections"
@@ -300,11 +300,11 @@ msgstr "פלוט גודל מירבי של החוצץ"
#: core/io/packet_peer.cpp
msgid "Stream Peer"
-msgstr ""
+msgstr "זרם עמיתים"
#: core/io/stream_peer.cpp
msgid "Big Endian"
-msgstr ""
+msgstr "אנדיאן גדול"
#: core/io/stream_peer.cpp
#, fuzzy
@@ -395,18 +395,16 @@ msgid "Device"
msgstr "מכשיר"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Alt"
-msgstr "הכל"
+msgstr "אלט"
#: core/os/input_event.cpp
msgid "Shift"
msgstr "הסט"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Control"
-msgstr "בקרת גירסאות"
+msgstr "לשלוט"
#: core/os/input_event.cpp
msgid "Meta"
@@ -417,9 +415,8 @@ msgid "Command"
msgstr "פקודה"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Physical"
-msgstr "פיזיקה"
+msgstr "פיזי"
#: core/os/input_event.cpp scene/2d/touch_screen_button.cpp
#: scene/gui/base_button.cpp scene/gui/texture_button.cpp
@@ -428,9 +425,8 @@ msgid "Pressed"
msgstr "לחוץ"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Scancode"
-msgstr "סריקת מקורות"
+msgstr "קוד סריקה"
#: core/os/input_event.cpp
msgid "Physical Scancode"
@@ -442,26 +438,23 @@ msgstr "יוניקוד"
#: core/os/input_event.cpp
msgid "Echo"
-msgstr ""
+msgstr "הד"
#: core/os/input_event.cpp scene/gui/base_button.cpp
-#, fuzzy
msgid "Button Mask"
-msgstr "כפתור"
+msgstr "מסכת כפתור"
#: core/os/input_event.cpp scene/2d/node_2d.cpp scene/gui/control.cpp
-#, fuzzy
msgid "Global Position"
-msgstr "קבוע"
+msgstr "מיקום גלובלי"
#: core/os/input_event.cpp
msgid "Factor"
msgstr "פקטור"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Button Index"
-msgstr "מפתח כפתורי עכבר:"
+msgstr "אינדקס הכפתורים"
#: core/os/input_event.cpp
msgid "Doubleclick"
@@ -477,12 +470,11 @@ msgstr "לחץ"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "עט הפוך"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Relative"
-msgstr "GDNative"
+msgstr "קרוב משפחה"
#: core/os/input_event.cpp scene/2d/camera_2d.cpp scene/2d/cpu_particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/interpolated_camera.cpp
@@ -497,9 +489,8 @@ msgid "Axis"
msgstr "ציר"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Axis Value"
-msgstr "(ערך)"
+msgstr "ערך ציר"
#: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp
msgid "Index"
@@ -529,16 +520,14 @@ msgid "Message"
msgstr "מסר"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pitch"
-msgstr "גובה צליל"
+msgstr "גובה הצליל"
#: core/os/input_event.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/physics_body_2d.cpp scene/3d/cpu_particles.cpp
#: scene/3d/physics_body.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Velocity"
-msgstr "הגדלת אות ראשונה"
+msgstr "מְהִירוּת"
#: core/os/input_event.cpp
msgid "Instrument"
@@ -559,14 +548,12 @@ msgid "Application"
msgstr "אפליקציה"
#: core/project_settings.cpp main/main.cpp
-#, fuzzy
msgid "Config"
-msgstr "הגדרת הצמדה"
+msgstr "הקונפדרציה"
#: core/project_settings.cpp
-#, fuzzy
msgid "Project Settings Override"
-msgstr "הגדרות מיזם..."
+msgstr "עקיפת הגדרות פרוייקט"
#: core/project_settings.cpp core/resource.cpp
#: editor/animation_track_editor.cpp editor/editor_autoload_settings.cpp
@@ -597,7 +584,7 @@ msgstr "הרצה"
#: core/project_settings.cpp editor/editor_node.cpp
#: editor/run_settings_dialog.cpp main/main.cpp
msgid "Main Scene"
-msgstr ""
+msgstr "סצנה ראשית"
#: core/project_settings.cpp
msgid "Disable stdout"
@@ -609,22 +596,21 @@ msgstr "השבת stderr"
#: core/project_settings.cpp
msgid "Use Hidden Project Data Directory"
-msgstr ""
+msgstr "שימוש בספריית נתוני פרוייקט מוסתרים"
#: core/project_settings.cpp
msgid "Use Custom User Dir"
-msgstr ""
+msgstr "השתמש ב- Dir משתמש מותאם אישית"
#: core/project_settings.cpp
msgid "Custom User Dir Name"
-msgstr ""
+msgstr "שם תיקיית משתמש מותאם אישית"
#: core/project_settings.cpp main/main.cpp
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
#: platform/uwp/os_uwp.cpp
-#, fuzzy
msgid "Display"
-msgstr "הצג הכל"
+msgstr "הצג"
#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp
#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp
@@ -643,7 +629,7 @@ msgstr "גבה"
#: core/project_settings.cpp
msgid "Always On Top"
-msgstr ""
+msgstr "תמיד עליון"
#: core/project_settings.cpp
msgid "Test Width"
@@ -672,30 +658,27 @@ msgstr "עורך"
#: core/project_settings.cpp
msgid "Main Run Args"
-msgstr ""
+msgstr "פרמטרים ראשיים לריצה"
#: core/project_settings.cpp
-#, fuzzy
msgid "Scene Naming"
-msgstr "נתיב סצנות:"
+msgstr "מתן שמות לסצינה"
#: core/project_settings.cpp
msgid "Search In File Extensions"
-msgstr ""
+msgstr "חיפוש בסיומות קבצים"
#: core/project_settings.cpp
msgid "Script Templates Search Path"
-msgstr ""
+msgstr "נתיב חיפוש של תבניות סקריפט"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Autoload On Startup"
-msgstr "בקרת גירסאות"
+msgstr "טעינה אוטומטית של בקרת גירסאות בעת האתחול"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Plugin Name"
-msgstr "בקרת גירסאות"
+msgstr "שם תוסף בקרת גרסאות"
#: core/project_settings.cpp scene/2d/collision_object_2d.cpp
#: scene/3d/collision_object.cpp scene/gui/control.cpp
@@ -704,62 +687,55 @@ msgstr "קלט"
#: core/project_settings.cpp
msgid "UI Accept"
-msgstr ""
+msgstr "ממשק משתמש - אישור"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Select"
-msgstr "בחירה"
+msgstr "בחירת ממשק משתמש"
#: core/project_settings.cpp
msgid "UI Cancel"
-msgstr ""
+msgstr "ביטול ממשק משתמש"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Focus Next"
-msgstr "מיקוד נתיב"
+msgstr "מיקוד ממשק המשתמש הבא"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Focus Prev"
-msgstr "מיקוד נתיב"
+msgstr "מיקוד ממשק משתמש קודם"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Left"
-msgstr "שמאל"
+msgstr "ממשק משתמש שמאל"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Right"
-msgstr "ימין"
+msgstr "ממשק משתמש ימין"
#: core/project_settings.cpp
msgid "UI Up"
-msgstr ""
+msgstr "ממשק משתמש למעלה"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Down"
-msgstr "הורדה"
+msgstr "ממשק משתמש למטה"
#: core/project_settings.cpp
msgid "UI Page Up"
-msgstr ""
+msgstr "עמוד למעלה ממשק המשתמש"
#: core/project_settings.cpp
msgid "UI Page Down"
-msgstr ""
+msgstr "עמוד למטה ממשק משתמש"
#: core/project_settings.cpp
msgid "UI Home"
-msgstr ""
+msgstr "ממשק משתמש בית"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI End"
-msgstr "בסוף"
+msgstr "ממשק משתמש סוף"
#: core/project_settings.cpp main/main.cpp modules/bullet/register_types.cpp
#: modules/bullet/space_bullet.cpp scene/2d/physics_body_2d.cpp
@@ -796,7 +772,7 @@ msgstr ""
#: scene/main/viewport.cpp servers/visual/visual_server_scene.cpp
#: servers/visual_server.cpp
msgid "Rendering"
-msgstr ""
+msgstr "רינדור"
#: core/project_settings.cpp drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_scene_gles3.cpp
@@ -816,7 +792,7 @@ msgstr "מסננים"
#: core/project_settings.cpp scene/main/viewport.cpp
msgid "Sharpen Intensity"
-msgstr ""
+msgstr "עוצמת חידוד"
#: core/project_settings.cpp editor/editor_export.cpp editor/editor_node.cpp
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
@@ -842,42 +818,40 @@ msgid "Profiler"
msgstr "מאפיין"
#: core/project_settings.cpp
-#, fuzzy
msgid "Max Functions"
-msgstr "יצירת פונקציה"
+msgstr "פונקציות מקסימום"
#: core/project_settings.cpp scene/3d/vehicle_body.cpp
msgid "Compression"
msgstr "כיווץ"
#: core/project_settings.cpp
-#, fuzzy
msgid "Formats"
-msgstr "תבנית"
+msgstr "פורמטים"
#: core/project_settings.cpp
msgid "Zstd"
-msgstr ""
+msgstr "Zstd"
#: core/project_settings.cpp
msgid "Long Distance Matching"
-msgstr ""
+msgstr "התאמה למרחקים ארוכים"
#: core/project_settings.cpp
msgid "Compression Level"
-msgstr ""
+msgstr "רמת דחיסה"
#: core/project_settings.cpp
msgid "Window Log Size"
-msgstr ""
+msgstr "גודל חלון יומן"
#: core/project_settings.cpp
msgid "Zlib"
-msgstr ""
+msgstr "ZLIB"
#: core/project_settings.cpp
msgid "Gzip"
-msgstr ""
+msgstr "Gzip"
#: core/project_settings.cpp platform/android/export/export.cpp
msgid "Android"
@@ -885,24 +859,23 @@ msgstr "Android"
#: core/project_settings.cpp
msgid "Modules"
-msgstr ""
+msgstr "מודולים"
#: core/register_core_types.cpp
msgid "TCP"
msgstr "TCP"
#: core/register_core_types.cpp
-#, fuzzy
msgid "Connect Timeout Seconds"
-msgstr "שניות קצובות להתחברות"
+msgstr "זמן קצוב לחיבור בשניות"
#: core/register_core_types.cpp
msgid "Packet Peer Stream"
-msgstr ""
+msgstr "זרם עמית מנות"
#: core/register_core_types.cpp
msgid "Max Buffer (Power of 2)"
-msgstr ""
+msgstr "גודל מחסנית מקסימלי (בחזקה)"
#: core/register_core_types.cpp editor/editor_settings.cpp main/main.cpp
msgid "SSL"
@@ -943,7 +916,7 @@ msgstr "בדיקה"
#: core/translation.cpp scene/resources/font.cpp
msgid "Fallback"
-msgstr ""
+msgstr "חזרה"
#: core/ustring.cpp scene/resources/segment_shape_2d.cpp
msgid "B"
@@ -979,7 +952,7 @@ msgstr "EiB"
#: drivers/gles3/rasterizer_scene_gles3.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp modules/gltf/gltf_state.cpp
msgid "Buffers"
-msgstr ""
+msgstr "מחסניות"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
@@ -1005,39 +978,36 @@ msgstr "2D"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
-#, fuzzy
msgid "Snapping"
-msgstr "הגדרות הצמדה"
+msgstr "הצמדה"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
-#, fuzzy
msgid "Use GPU Pixel Snap"
-msgstr "מצב מרחב מקומי (%s)"
+msgstr "שימוש בהצמדת פיקסלים של GPU"
#: drivers/gles2/rasterizer_scene_gles2.cpp
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Immediate Buffer Size (KB)"
-msgstr ""
+msgstr "גודל מחסנית מיידי (KB)"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
-#, fuzzy
msgid "Lightmapping"
-msgstr "אפיית Lightmaps"
+msgstr "מיפוי אורות"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
msgid "Use Bicubic Sampling"
-msgstr ""
+msgstr "השתמש בדגימה דו-כיוונית"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Elements"
-msgstr ""
+msgstr "מקסימום רכיבים הניתנים לרינדור"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Lights"
-msgstr ""
+msgstr "מקסימום אורות ניתנים לרינדור"
#: drivers/gles3/rasterizer_scene_gles3.cpp
#, fuzzy
@@ -1046,11 +1016,11 @@ msgstr "GridMap מחיקת הבחירה"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Lights Per Object"
-msgstr ""
+msgstr "מקסימום אורות לכל אובייקט"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Subsurface Scattering"
-msgstr ""
+msgstr "פיזור תת-שטח"
#: drivers/gles3/rasterizer_scene_gles3.cpp editor/animation_track_editor.cpp
#: editor/import/resource_importer_texture.cpp
@@ -1067,15 +1037,15 @@ msgstr "קנה מידה"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Follow Surface"
-msgstr ""
+msgstr "עקוב אחר פני השטח"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Weight Samples"
-msgstr ""
+msgstr "דוגמאות משקל"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Voxel Cone Tracing"
-msgstr ""
+msgstr "מעקב חרוט ווקסל"
#: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp
msgid "High Quality"
@@ -1192,7 +1162,7 @@ msgstr "כמות:"
#: editor/animation_track_editor.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
msgid "Args"
-msgstr ""
+msgstr "ארגומנטים"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/script_editor_debugger.cpp modules/gltf/gltf_accessor.cpp
@@ -1214,7 +1184,7 @@ msgstr ""
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/audio/audio_stream_player.cpp scene/gui/video_player.cpp
msgid "Stream"
-msgstr ""
+msgstr "זרם"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1238,7 +1208,7 @@ msgstr "הנפשה"
#: editor/animation_track_editor.cpp
msgid "Easing"
-msgstr ""
+msgstr "הקלה (אנימציה)"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
@@ -1373,7 +1343,7 @@ msgstr "קנה מידה:"
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Type:"
-msgstr ""
+msgstr "סוג:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1466,7 +1436,7 @@ msgstr "שכפול מפתח(ות)"
#: editor/animation_track_editor.cpp
msgid "Add RESET Value(s)"
-msgstr ""
+msgstr "הוסף ערכי איפוס"
#: editor/animation_track_editor.cpp
msgid "Delete Key(s)"
@@ -2232,7 +2202,7 @@ msgstr "פתיחה"
#: editor/dependency_editor.cpp
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "בעלים של: %s (סה\"כ: %d)"
#: editor/dependency_editor.cpp
msgid ""
@@ -2645,7 +2615,7 @@ msgstr "שם שגוי."
#: editor/editor_autoload_settings.cpp
msgid "Cannot begin with a digit."
-msgstr ""
+msgstr "לא ניתן להתחיל עם סיפרה."
#: editor/editor_autoload_settings.cpp
msgid "Valid characters:"
@@ -2790,7 +2760,7 @@ msgstr "בחירה"
#: editor/editor_export.cpp
msgid "Project export for platform:"
-msgstr ""
+msgstr "ייצוא פרויקט לפלטפורמה:"
#: editor/editor_export.cpp
#, fuzzy
@@ -2908,7 +2878,7 @@ msgstr "חברים"
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
#: platform/uwp/export/export.cpp
msgid "Release"
-msgstr ""
+msgstr "שחרר"
#: editor/editor_export.cpp
#, fuzzy
@@ -2917,7 +2887,7 @@ msgstr "התמרה"
#: editor/editor_export.cpp
msgid "64 Bits"
-msgstr ""
+msgstr "64 ביטים"
#: editor/editor_export.cpp
msgid "Embed PCK"
@@ -2930,23 +2900,23 @@ msgstr "מצב שינוי קנה מידה (R)"
#: editor/editor_export.cpp
msgid "BPTC"
-msgstr ""
+msgstr "BPTC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "S3TC"
-msgstr ""
+msgstr "S3TC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "ETC"
-msgstr ""
+msgstr "ETC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "ETC2"
-msgstr ""
+msgstr "ETC2"
#: editor/editor_export.cpp
msgid "No BPTC Fallbacks"
-msgstr ""
+msgstr "אין חזרות BPTC"
#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
@@ -2991,7 +2961,7 @@ msgstr "בייצוא ארכיטקטורת 32 ביט, ה PCK המובנה לא י
#: editor/editor_export.cpp
msgid "Convert Text Resources To Binary On Export"
-msgstr ""
+msgstr "המרת משאבי טקסט לבינאריים בייצוא"
#: editor/editor_feature_profile.cpp
msgid "3D Editor"
@@ -3315,7 +3285,7 @@ msgstr "הצג/הסתר קבצים מוסתרים"
#: editor/editor_file_dialog.cpp
msgid "Disable Overwrite Warning"
-msgstr ""
+msgstr "השבת את אזהרת החלפה"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
@@ -3471,16 +3441,16 @@ msgstr "קבועים"
#: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Fonts"
-msgstr ""
+msgstr "גופנים"
#: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp
#: platform/iphone/export/export.cpp
msgid "Icons"
-msgstr ""
+msgstr "סמלים"
#: editor/editor_help.cpp
msgid "Styles"
-msgstr ""
+msgstr "סגנונות"
#: editor/editor_help.cpp
msgid "Enumerations"
@@ -3530,7 +3500,7 @@ msgstr "עזרה"
#: editor/editor_help.cpp
msgid "Sort Functions Alphabetically"
-msgstr ""
+msgstr "מיון פונקציות בסדר אלפביתי"
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -3622,7 +3592,7 @@ msgstr "מתודות בלבד"
#: editor/editor_inspector.cpp editor/plugins/item_list_editor_plugin.cpp
msgid "Checkable"
-msgstr ""
+msgstr "ניתן לבדיקה"
#: editor/editor_inspector.cpp editor/plugins/item_list_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
@@ -3648,11 +3618,11 @@ msgstr "(ערך)"
#: editor/editor_inspector.cpp
msgid ""
"Pinning a value forces it to be saved even if it's equal to the default."
-msgstr ""
+msgstr "הצמדת ערך מאלצת אותו להישמר גם אם הוא שווה לברירת המחדל."
#: editor/editor_inspector.cpp
msgid "Pin value [Disabled because '%s' is editor-only]"
-msgstr ""
+msgstr "הצמדת ערך [מושבת מכיוון ש- '%s' הוא ל-עורך בלבד]"
#: editor/editor_inspector.cpp
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
@@ -3669,11 +3639,11 @@ msgstr "קביעה מרובה:"
#: editor/editor_inspector.cpp
msgid "Pinned %s"
-msgstr ""
+msgstr "הוצמד %s"
#: editor/editor_inspector.cpp
msgid "Unpinned %s"
-msgstr ""
+msgstr "בוטלה ההצמדה של %s"
#: editor/editor_inspector.cpp
#, fuzzy
@@ -3761,7 +3731,7 @@ msgstr "חלון חדש"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Unnamed Project"
-msgstr ""
+msgstr "פרויקט ללא שם"
#: editor/editor_node.cpp
msgid ""
@@ -3769,6 +3739,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"מסתובב כאשר חלון העורך מצייר מחדש.\n"
+"האפשרות 'עדכן רציף' מופעלת, מה שעלול להגביר את צריכת החשמל. לחץ כדי להשבית "
+"אותו."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -3895,6 +3868,8 @@ msgid ""
"An error occurred while trying to save the editor layout.\n"
"Make sure the editor's user data path is writable."
msgstr ""
+"אירעה שגיאה בעת ניסיון לשמור את פריסת העורך.\n"
+"ודא שנתיב נתוני המשתמש של העורך ניתן לכתיבה."
#: editor/editor_node.cpp
msgid ""
@@ -3902,6 +3877,9 @@ msgid ""
"To restore the Default layout to its base settings, use the Delete Layout "
"option and delete the Default layout."
msgstr ""
+"פריסת עורך ברירת המחדל נדרסת.\n"
+"כדי לשחזר את פריסת ברירת המחדל להגדרות הבסיס שלה, השתמש באפשרות מחק פריסה "
+"ומחק את פריסת ברירת המחדל."
#: editor/editor_node.cpp
msgid "Layout name not found!"
@@ -3963,7 +3941,7 @@ msgstr "אין סצנה מוגדרת להרצה."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "שמור סצנה לפני ריצה..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -4009,13 +3987,14 @@ msgstr "לשמור את השינויים ל־'%s' לפני הסגירה?"
#: editor/editor_node.cpp
msgid "%s no longer exists! Please specify a new save location."
-msgstr ""
+msgstr "%s כבר לא קיים! נא לציין מיקום שמירה חדש."
#: editor/editor_node.cpp
msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"לסצנה הנוכחית אין צומת שורש, אך %d משאבים חיצוניים ששונו נשמרו בכל מקרה."
#: editor/editor_node.cpp
#, fuzzy
@@ -11258,7 +11237,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/hi.po b/editor/translations/hi.po
index 657ee0ff41..229a1e6ee7 100644
--- a/editor/translations/hi.po
+++ b/editor/translations/hi.po
@@ -11065,7 +11065,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/hr.po b/editor/translations/hr.po
index 85fcb184f3..d3ea72cf63 100644
--- a/editor/translations/hr.po
+++ b/editor/translations/hr.po
@@ -8,12 +8,13 @@
# LeoClose <leoclose575@gmail.com>, 2020, 2021, 2022.
# Filip <fhomolka@protonmail.com>, 2022.
# Milo Ivir <mail@milotype.de>, 2022.
+# peter277 <ps2718@hotmail.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2022-09-27 21:37+0000\n"
-"Last-Translator: Milo Ivir <mail@milotype.de>\n"
+"PO-Revision-Date: 2022-12-21 07:02+0000\n"
+"Last-Translator: peter277 <ps2718@hotmail.com>\n"
"Language-Team: Croatian <https://hosted.weblate.org/projects/godot-engine/"
"godot/hr/>\n"
"Language: hr\n"
@@ -21,7 +22,7 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.14.1\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -3432,7 +3433,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Enumerations"
-msgstr ""
+msgstr "Nabrajanja"
#: editor/editor_help.cpp
msgid "Property Descriptions"
@@ -10824,7 +10825,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index b8bab10568..ad7ba523e3 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -11273,7 +11273,7 @@ msgstr "Perspektíva"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/id.po b/editor/translations/id.po
index 89153d88d3..47b026986a 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -41,13 +41,14 @@
# Primananda Kurnia <primakurnia71@gmail.com>, 2022.
# FellowMustard <rachmawanng33@gmail.com>, 2022.
# Muhammad Zainal Abidin <eviepk12@gmail.com>, 2022.
+# adfriz <aditiyaafrizal2@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-09-27 21:37+0000\n"
-"Last-Translator: Muhammad Zainal Abidin <eviepk12@gmail.com>\n"
+"PO-Revision-Date: 2023-01-04 10:47+0000\n"
+"Last-Translator: adfriz <aditiyaafrizal2@gmail.com>\n"
"Language-Team: Indonesian <https://hosted.weblate.org/projects/godot-engine/"
"godot/id/>\n"
"Language: id\n"
@@ -55,7 +56,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.14.1\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -11181,7 +11182,7 @@ msgstr "Perspektif Belakang"
msgid " [auto]"
msgstr " [auto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [portal aktif]"
@@ -20765,9 +20766,8 @@ msgid "Executable \"pck\" section not found."
msgstr ""
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Windows"
-msgstr "Jendela Baru"
+msgstr "Windows"
#: platform/windows/export/export.cpp
msgid "Rcedit"
diff --git a/editor/translations/ig.po b/editor/translations/ig.po
index e0c1a85c99..9acd1e98b7 100644
--- a/editor/translations/ig.po
+++ b/editor/translations/ig.po
@@ -10569,7 +10569,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/is.po b/editor/translations/is.po
index 7551598f22..fda8086f4b 100644
--- a/editor/translations/is.po
+++ b/editor/translations/is.po
@@ -10792,7 +10792,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/it.po b/editor/translations/it.po
index f1ff871a69..6010f082aa 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -73,7 +73,7 @@
# ale piccia <picciatialessio2@gmail.com>, 2022.
# Simone Starace <simone.starace93@gmail.com>, 2022.
# Daniele Giunta <danielegiunta2007@gmail.com>, 2022.
-# Damiano Guida <damiano.guida22@gmail.com>, 2022.
+# Damiano Guida <damiano.guida22@gmail.com>, 2022, 2023.
# Silvia Scaglione <sissisoad@gmail.com>, 2022.
# Cosimo Davide Viggiano <cosimod089@gmail.com>, 2022.
# Francesco Cammarata <francescocammarata.fr@gmail.com>, 2022.
@@ -82,8 +82,8 @@ msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-11-22 20:37+0000\n"
-"Last-Translator: Francesco Cammarata <francescocammarata.fr@gmail.com>\n"
+"PO-Revision-Date: 2023-01-15 13:34+0000\n"
+"Last-Translator: Damiano Guida <damiano.guida22@gmail.com>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/"
"godot/it/>\n"
"Language: it\n"
@@ -91,7 +91,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -11031,7 +11031,7 @@ msgstr "Prospettica da dietro"
msgid " [auto]"
msgstr " [auto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [portali attivi]"
@@ -26477,7 +26477,7 @@ msgstr "Debug del Canale UV"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "Sfocatura"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index dc17329ba7..e7016610d7 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -46,13 +46,13 @@
# Fire Dingo <snowsable113@icloud.com>, 2022.
# Narazaki Shuji <shujinarazaki@protonmail.com>, 2022.
# ta ko <neji.cion@gmail.com>, 2022.
-# T K <kidaaam@gmail.com>, 2022.
+# T K <kidaaam@gmail.com>, 2022, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-12-13 13:21+0000\n"
+"PO-Revision-Date: 2023-01-20 10:19+0000\n"
"Last-Translator: T K <kidaaam@gmail.com>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/"
"godot/ja/>\n"
@@ -61,7 +61,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -886,7 +886,6 @@ msgid "Connect Timeout Seconds"
msgstr "接続タイムアウトの秒数"
#: core/register_core_types.cpp
-#, fuzzy
msgid "Packet Peer Stream"
msgstr "パケットピアストリーム"
@@ -5288,12 +5287,11 @@ msgstr "ダイアログのポップアップ時にエディターを薄暗くす
#: editor/editor_settings.cpp main/main.cpp
msgid "Low Processor Mode Sleep (µsec)"
-msgstr "低プロセッサ モード スリープ (マイクロ秒)"
+msgstr "省エネモードスリープ時間 (マイクロ秒)"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Unfocused Low Processor Mode Sleep (µsec)"
-msgstr "フォーカスされていない低プロセッサ モード スリープ (マイクロ秒)"
+msgstr "非フォーカス時の省エネモードスリープ時間 (マイクロ秒)"
#: editor/editor_settings.cpp
msgid "Separate Distraction Mode"
@@ -5346,9 +5344,8 @@ msgid "Border Size"
msgstr "ボーダーサイズ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Use Graph Node Headers"
-msgstr "グラフ ノード ヘッダーを使用する"
+msgstr "グラフノードヘッダーを使用する"
#: editor/editor_settings.cpp
msgid "Additional Spacing"
@@ -5690,9 +5687,8 @@ msgid "Secondary Grid Color"
msgstr "グリッドのセカンダリの色"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Selection Box Color"
-msgstr "選択範囲のみ"
+msgstr "選択ボックスの色"
#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
@@ -5795,19 +5791,16 @@ msgid "Emulate 3 Button Mouse"
msgstr "3ボタンマウスをエミュレート"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Orbit Modifier"
-msgstr "更新日時が古い順で並び替え"
+msgstr "オービット操作の修飾キー"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Modifier"
-msgstr "パンモード"
+msgstr "パン操作の修飾キー"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Modifier"
-msgstr "変更済み"
+msgstr "ズーム操作の修飾キー"
#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -5815,38 +5808,32 @@ msgid "Warped Mouse Panning"
msgstr "ワープマウスパンニング"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Navigation Feel"
-msgstr "ナビゲーションモード"
+msgstr "ナビゲーション感度"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Orbit Sensitivity"
-msgstr "軌道感度"
+msgstr "オービット感度"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Orbit Inertia"
-msgstr "軌道慣性"
+msgstr "オービット慣性"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Translation Inertia"
-msgstr "翻訳"
+msgstr "移動の慣性"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Inertia"
-msgstr "ズームイン"
+msgstr "ズームの慣性"
#: editor/editor_settings.cpp
msgid "Freelook"
msgstr "フリールック"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Navigation Scheme"
-msgstr "ナビゲーションメッシュを生成"
+msgstr "フリールックナビゲーション方式"
#: editor/editor_settings.cpp
msgid "Freelook Sensitivity"
@@ -5861,14 +5848,12 @@ msgid "Freelook Base Speed"
msgstr "フリールックの基本速度"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Activation Modifier"
-msgstr "フリールックの減速調整"
+msgstr "フリールック有効化の修飾キー"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Speed Zoom Link"
-msgstr "フリールックの速度調整"
+msgstr "フリールックの速度をズーム値にリンク"
#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Grid Color"
@@ -5915,14 +5900,12 @@ msgid "Viewport Border Color"
msgstr "ビューポートのボーダーの色"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Constrain Editor View"
-msgstr "エディター ビューを制限"
+msgstr "エディタビューを束縛する"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Simple Panning"
-msgstr "簡易パンニング"
+msgstr "簡易パンニング操作"
#: editor/editor_settings.cpp
#, fuzzy
@@ -5930,23 +5913,20 @@ msgid "Scroll To Pan"
msgstr "スクロールしてパンニング"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Speed"
-msgstr "速度:"
+msgstr "パン速度"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Poly Editor"
msgstr "ポリゴンエディター"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Point Grab Radius"
-msgstr "ポイントグラブ半径"
+msgstr "ポイントの選択半径"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Show Previous Outline"
-msgstr "前の平面"
+msgstr "前のアウトラインを表示する"
#: editor/editor_settings.cpp editor/scene_tree_dock.cpp
msgid "Autorename Animation Tracks"
@@ -5961,19 +5941,16 @@ msgid "Default Create Reset Tracks"
msgstr "デフォルトでRESETトラックを作成"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Onion Layers Past Color"
msgstr "オニオンレイヤー過去の色"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Onion Layers Future Color"
msgstr "オニオンレイヤー将来の色"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Visual Editors"
-msgstr "グループエディター"
+msgstr "ビジュアルエディター"
#: editor/editor_settings.cpp
msgid "Minimap Opacity"
@@ -6086,29 +6063,24 @@ msgid "Background Color"
msgstr "背景色"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Background Color"
-msgstr "無効な背景色です。"
+msgstr "補完の背景色"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Selected Color"
-msgstr "選択されたものをインポート"
+msgstr "補完の選択中の色"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Existing Color"
-msgstr "既存の色の補完"
+msgstr "既に補完されている箇所の色"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Scroll Color"
-msgstr "スクロール色の補完"
+msgstr "補完ウインドウのスクロール色"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Font Color"
-msgstr "フォント色の補完"
+msgstr "補完のフォント色"
#: editor/editor_settings.cpp
msgid "Text Color"
@@ -6135,9 +6107,8 @@ msgid "Text Selected Color"
msgstr "選択されたテキストの色"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Selection Color"
-msgstr "選択範囲のみ"
+msgstr "選択色"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Brace Mismatch Color"
@@ -7235,14 +7206,12 @@ msgid "Fix Alpha Border"
msgstr "アルファボーダーを修正"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Premult Alpha"
-msgstr "ポリゴンを編集"
+msgstr "乗算済みアルファ"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Hdr As Srgb"
-msgstr "SrgbとしてHdr"
+msgstr "HDRをsRGBとして表示"
#: editor/import/resource_importer_texture.cpp
msgid "Invert Color"
@@ -10980,7 +10949,7 @@ msgstr "後面 透視投影"
msgid " [auto]"
msgstr " [自動]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [ポータル有効]"
@@ -14136,6 +14105,8 @@ msgid ""
"Note: Encryption key needs to be stored in the binary,\n"
"you need to build the export templates from source."
msgstr ""
+"注:暗号化キーはバイナリに格納する必要があります。\n"
+"ソースからエクスポートテンプレートをビルドする必要があります。"
#: editor/project_export.cpp
msgid "More Info..."
@@ -14242,17 +14213,15 @@ msgid "Invalid project path (changed anything?)."
msgstr "無効なプロジェクトパスです (なにか変更がありましたか?)。"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
-"プロジェクトパスの project.godot を読み込めませんでした。 (エラー %d)。見つか"
-"らないか破損している可能性があります。"
+"%s のプロジェクトを読み込めませんでした。 (エラー %d)。見つからないか破損して"
+"いる可能性があります。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't save project at '%s' (error %d)."
-msgstr "次の場所のプロジェクトを開けません '%s'。"
+msgstr "プロジェクトを '%s' に保存できませんでした (エラー %d)。"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15510,6 +15479,9 @@ msgid ""
"with the '%s' prefix in a node path.\n"
"Click to disable this."
msgstr ""
+"このノードには、ノード パスの先頭に '%s' プレフィックスを付けることで、シーン"
+"内のどこからでもアクセスできます。\n"
+"クリックすると無効になります。"
#: editor/scene_tree_editor.cpp
msgid ""
@@ -15911,7 +15883,7 @@ msgstr "光源の半径を変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Stream Player 3D"
-msgstr ""
+msgstr "ストリームプレイヤー3D"
#: editor/spatial_editor_gizmos.cpp
msgid "Change AudioStreamPlayer3D Emission Angle"
@@ -15933,7 +15905,7 @@ msgstr "カメラサイズを変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Visibility Notifier"
-msgstr ""
+msgstr "可視性通知"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Notifier AABB"
@@ -15941,7 +15913,7 @@ msgstr "NotifierのAABBを変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
-msgstr "パーティクルの軸平行境界ボックスを変更"
+msgstr "パーティクルのAABBを変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Reflection Probe"
@@ -16113,9 +16085,8 @@ msgid "RID Pool Prealloc"
msgstr "RIDプールの事前割り当て"
#: main/main.cpp
-#, fuzzy
msgid "Debugger stdout"
-msgstr "デバッガー"
+msgstr "デバッガーの標準出力"
#: main/main.cpp
msgid "Max Chars Per Second"
@@ -16155,7 +16126,7 @@ msgstr "ログのパス"
#: main/main.cpp
msgid "Max Log Files"
-msgstr ""
+msgstr "最大ログファイル数"
#: main/main.cpp
msgid "Driver"
@@ -16195,7 +16166,7 @@ msgstr "ピクセル単位の透明度"
#: main/main.cpp
msgid "Allowed"
-msgstr ""
+msgstr "許可"
#: main/main.cpp
msgid "Intended Usage"
@@ -16206,9 +16177,8 @@ msgid "Framebuffer Allocation"
msgstr "フレームバッファの割り当て"
#: main/main.cpp platform/uwp/os_uwp.cpp
-#, fuzzy
msgid "Energy Saving"
-msgstr "保存中にエラーが発生しました"
+msgstr "省エネルギー"
#: main/main.cpp
msgid "Threads"
@@ -16224,32 +16194,29 @@ msgstr "スレッドセーフなBVH"
#: main/main.cpp
msgid "Handheld"
-msgstr ""
+msgstr "ポータブル"
#: main/main.cpp platform/javascript/export/export.cpp
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Orientation"
-msgstr "オンラインドキュメント"
+msgstr "方向"
#: main/main.cpp scene/gui/scroll_container.cpp scene/gui/text_edit.cpp
#: scene/main/scene_tree.cpp scene/register_scene_types.cpp
-#, fuzzy
msgid "Common"
-msgstr "コミュニティ"
+msgstr "一般"
#: main/main.cpp
msgid "Physics FPS"
msgstr "物理FPS"
#: main/main.cpp
-#, fuzzy
msgid "Force FPS"
-msgstr "強制プッシュ"
+msgstr "強制FPS"
#: main/main.cpp
msgid "Enable Pause Aware Picking"
-msgstr ""
+msgstr "一時停止中の選択認識の有効化"
#: main/main.cpp scene/gui/item_list.cpp scene/gui/popup_menu.cpp
#: scene/gui/scroll_container.cpp scene/gui/text_edit.cpp scene/gui/tree.cpp
@@ -16287,11 +16254,11 @@ msgstr "フレーム遅延 (ミリ秒)"
#: main/main.cpp
msgid "Low Processor Mode"
-msgstr ""
+msgstr "低プロセッサモード"
#: main/main.cpp
msgid "Delta Sync After Draw"
-msgstr ""
+msgstr "描画後のデルタ同期"
#: main/main.cpp
msgid "iOS"
@@ -16299,7 +16266,7 @@ msgstr "iOS"
#: main/main.cpp
msgid "Hide Home Indicator"
-msgstr ""
+msgstr "ホームインジケーターを隠す"
#: main/main.cpp
msgid "Input Devices"
@@ -16322,9 +16289,8 @@ msgid "Shaders"
msgstr "シェーダー"
#: main/main.cpp
-#, fuzzy
msgid "Debug Shader Fallbacks"
-msgstr "シェーダーフォールバックを強制"
+msgstr "シェーダーフォールバックのデバッグ"
#: main/main.cpp scene/3d/baked_lightmap.cpp scene/3d/camera.cpp
#: scene/3d/world_environment.cpp scene/main/scene_tree.cpp
@@ -16334,16 +16300,15 @@ msgstr "環境"
#: main/main.cpp
msgid "Default Clear Color"
-msgstr ""
+msgstr "デフォルトのクリアー色"
#: main/main.cpp
msgid "Boot Splash"
msgstr "ブートスプラッシュ"
#: main/main.cpp
-#, fuzzy
msgid "Show Image"
-msgstr "ボーンを表示する"
+msgstr "画像を表示"
#: main/main.cpp
msgid "Image"
@@ -16375,7 +16340,7 @@ msgstr "バッファリング"
#: main/main.cpp
msgid "Agile Event Flushing"
-msgstr ""
+msgstr "即座にイベントフラッシュ"
#: main/main.cpp
msgid "Emulate Touch From Mouse"
@@ -16390,13 +16355,12 @@ msgid "Mouse Cursor"
msgstr "マウスカーソル"
#: main/main.cpp
-#, fuzzy
msgid "Custom Image"
-msgstr "ノードを切り取る"
+msgstr "カスタムイメージ"
#: main/main.cpp
msgid "Custom Image Hotspot"
-msgstr ""
+msgstr "カスタムイメージホットスポット"
#: main/main.cpp
msgid "Tooltip Position Offset"
@@ -16441,12 +16405,11 @@ msgstr "縮小"
#: main/main.cpp scene/main/scene_tree.cpp
msgid "Auto Accept Quit"
-msgstr ""
+msgstr "プログラム終了を自動的に受け入れる"
#: main/main.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Quit On Go Back"
-msgstr "戻る"
+msgstr "「戻る」時にプログラム終了する"
#: main/main.cpp scene/main/viewport.cpp
msgid "Snap Controls To Pixels"
@@ -16462,7 +16425,7 @@ msgstr "オーバーサンプリングを使用"
#: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp
msgid "Active Soft World"
-msgstr ""
+msgstr "SoftBodyを有効にする"
#: modules/csg/csg_gizmos.cpp
msgid "CSG"
@@ -16478,11 +16441,11 @@ msgstr "円柱の高さを変更"
#: modules/csg/csg_gizmos.cpp
msgid "Change Torus Inner Radius"
-msgstr "トーラスの内径を変更"
+msgstr "トーラスの内半径を変更"
#: modules/csg/csg_gizmos.cpp
msgid "Change Torus Outer Radius"
-msgstr "トーラスの外径を変更"
+msgstr "トーラスの外半径を変更"
#: modules/csg/csg_shape.cpp
msgid "Operation"
@@ -16546,14 +16509,12 @@ msgid "Cone"
msgstr "円錐"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Inner Radius"
-msgstr "トーラスの内径を変更"
+msgstr "内半径"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Outer Radius"
-msgstr "トーラスの外径を変更"
+msgstr "外半径"
#: modules/csg/csg_shape.cpp
msgid "Ring Sides"
@@ -16629,17 +16590,16 @@ msgid "Channel Count"
msgstr "チャンネルの数"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Always Ordered"
-msgstr "常にグリッドを表示"
+msgstr "常に順序付けをする"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "Server Relay"
-msgstr ""
+msgstr "サーバーリレー"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "DTLS Verify"
-msgstr ""
+msgstr "DTLS 検証"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "DTLS Hostname"
@@ -18014,17 +17974,16 @@ msgid "in order:"
msgstr ""
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Steps"
msgstr "ステップ"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Switch"
-msgstr ""
+msgstr "スイッチ"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "'input' is:"
-msgstr ""
+msgstr "入力は:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Type Cast"
@@ -18273,14 +18232,12 @@ msgid "Construct %s"
msgstr "定数"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Get Local Var"
-msgstr "ローカル空間を使用"
+msgstr "ローカル変数を使用"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Set Local Var"
-msgstr "ローカル空間を使用"
+msgstr "ローカル変数をセット"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Action %s"
@@ -19552,9 +19509,8 @@ msgstr "コード署名"
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Identity"
-msgstr "インデント"
+msgstr "識別子"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
#, fuzzy
@@ -19752,9 +19708,8 @@ msgid ""
msgstr ""
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "No identity found."
-msgstr "アイコンが見つかりませんでした。"
+msgstr "識別子が見つかりませんでした。"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19818,6 +19773,8 @@ msgid ""
"Ad-hoc signed applications require the 'Disable Library Validation' "
"entitlement to load dynamic libraries."
msgstr ""
+"アドホック署名付きアプリケーションでは、動的ライブラリを読み込むために「ライ"
+"ブラリ検証を無効にする」の権限が必要です。"
#: platform/osx/export/export.cpp
msgid "Code signing bundle"
@@ -19848,15 +19805,12 @@ msgid "Sending archive for notarization"
msgstr "公証をするためにアーカイブを送信中"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "ZIP Creation"
-msgstr "プロジェクト"
+msgstr "ZIP作成"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not open file to read from path \"%s\"."
-msgstr ""
-"プロジェクトファイルをgladleプロジェクトにエクスポートできませんでした\n"
+msgstr "パス \"%s\" からファイルを開けませんでした。"
#: platform/osx/export/export.cpp
msgid "Invalid bundle identifier:"
@@ -19867,12 +19821,17 @@ msgid ""
"Warning: Built-in \"codesign\" is selected in the Editor Settings. Code "
"signing is limited to ad-hoc signature only."
msgstr ""
+"警告: ビルトインの「コード署名」がエディター設定で選択されています。コード署"
+"名はアドホック署名のみに制限されています。"
#: platform/osx/export/export.cpp
msgid ""
"Warning: Xcode command line tools are not installed, using built-in "
"\"codesign\". Code signing is limited to ad-hoc signature only."
msgstr ""
+"警告: Xcodeのコマンドラインツールがインストールされていないため、ビルトインの"
+"「コード署名」が使用されます。コード署名はアドホック署名のみに制限されていま"
+"す。"
#: platform/osx/export/export.cpp
msgid "Notarization: Notarization with an ad-hoc signature is not supported."
@@ -19911,17 +19870,19 @@ msgid ""
"Code signing is disabled. The exported project will not run on Macs with "
"enabled Gatekeeper and Apple Silicon powered Macs."
msgstr ""
+"コード署名が無効になっています。エクスポートされたプロジェクトは、Gatekeeper "
+"が有効になっている Mac および Apple Silicon 搭載の Mac では動作しません。"
#: platform/osx/export/export.cpp
msgid ""
"Hardened Runtime is not compatible with ad-hoc signature, and will be "
"disabled!"
-msgstr ""
+msgstr "Hardened Runtime はアドホック署名と互換性がないため、無効になります!"
#: platform/osx/export/export.cpp
msgid ""
"Timestamping is not compatible with ad-hoc signature, and will be disabled!"
-msgstr ""
+msgstr "タイムスタンプはアドホック署名と互換性がないため、無効になります!"
#: platform/osx/export/export.cpp
msgid ""
@@ -19937,34 +19898,46 @@ msgid ""
"Privacy: Microphone access is enabled, but usage description is not "
"specified."
msgstr ""
+"プライバシー: マイクへのアクセスが有効になっていますが、使用方法の説明があり"
+"ません。"
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Camera access is enabled, but usage description is not specified."
msgstr ""
+"プライバシー: カメラへのアクセスが有効になっていますが、使用方法の説明があり"
+"ません。"
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Location information access is enabled, but usage description is "
"not specified."
msgstr ""
+"プライバシー: 位置情報へのアクセスが有効になっていますが、使用方法の説明があ"
+"りません。"
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Address book access is enabled, but usage description is not "
"specified."
msgstr ""
+"プライバシー: アドレス帳へのアクセスが有効になっていますが、使用方法の説明が"
+"ありません。"
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Calendar access is enabled, but usage description is not specified."
msgstr ""
+"プライバシー: カレンダーへのアクセスが有効になっていますが、使用方法の説明が"
+"ありません。"
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Photo library access is enabled, but usage description is not "
"specified."
msgstr ""
+"プライバシー:フォトライブラリへのアクセスが有効になっていますが、使用方法の説"
+"明がありません。"
#: platform/osx/export/export.cpp
msgid "macOS"
@@ -19972,40 +19945,35 @@ msgstr "macOS"
#: platform/osx/export/export.cpp
msgid "Force Builtin Codesign"
-msgstr ""
+msgstr "ビルドインコード署名を強制"
#: platform/uwp/export/export.cpp
msgid "Architecture"
msgstr "アーキテクチャ"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Display Name"
-msgstr "表示スケール"
+msgstr "表示名"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Short Name"
-msgstr "スクリプト名:"
+msgstr "略称"
#: platform/uwp/export/export.cpp
msgid "Publisher"
-msgstr ""
+msgstr "パブリッシャー"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Publisher Display Name"
-msgstr "パッケージ発行者の表示名が無効です。"
+msgstr "パブリッシャー表示名"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Product GUID"
-msgstr "無効なプロダクト GUIDです。"
+msgstr "プロダクト GUID"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Publisher GUID"
-msgstr "ガイドをクリアする"
+msgstr "パブリッシャー GUID"
#: platform/uwp/export/export.cpp
msgid "Signing"
@@ -20037,73 +20005,71 @@ msgstr "リビジョン"
#: platform/uwp/export/export.cpp
msgid "Landscape"
-msgstr ""
+msgstr "ランドスケープ"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Portrait"
-msgstr "ポート"
+msgstr "ポートレート"
#: platform/uwp/export/export.cpp
msgid "Landscape Flipped"
-msgstr ""
+msgstr "ランドスケープ反転"
#: platform/uwp/export/export.cpp
msgid "Portrait Flipped"
-msgstr ""
+msgstr "ポートレート反転"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Store Logo"
-msgstr "スケールモード"
+msgstr "ストアロゴ"
#: platform/uwp/export/export.cpp
msgid "Square 44 X 44 Logo"
-msgstr ""
+msgstr "正方形 44 x 44 ロゴ"
#: platform/uwp/export/export.cpp
msgid "Square 71 X 71 Logo"
-msgstr ""
+msgstr "正方形 71 x 71 ロゴ"
#: platform/uwp/export/export.cpp
msgid "Square 150 X 150 Logo"
-msgstr ""
+msgstr "正方形 150 x 150 ロゴ"
#: platform/uwp/export/export.cpp
msgid "Square 310 X 310 Logo"
-msgstr ""
+msgstr "正方形 310 x 310 ロゴ"
#: platform/uwp/export/export.cpp
msgid "Wide 310 X 150 Logo"
-msgstr ""
+msgstr "ワイド 310 x 150 ロゴ"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Splash Screen"
-msgstr "ドローコール:"
+msgstr "スプラッシュ・スクリーン"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Tiles"
-msgstr "ファイル"
+msgstr "タイル"
#: platform/uwp/export/export.cpp
msgid "Show Name On Square 150 X 150"
-msgstr ""
+msgstr "正方形 150×150 表示名"
#: platform/uwp/export/export.cpp
msgid "Show Name On Wide 310 X 150"
-msgstr ""
+msgstr "ワイド 310x150 表示名"
#: platform/uwp/export/export.cpp
msgid "Show Name On Square 310 X 310"
-msgstr ""
+msgstr "正方形 310×310 表示名"
#: platform/uwp/export/export.cpp
msgid ""
"Godot's Mono version does not support the UWP platform. Use the standard "
"build (no C# support) if you wish to target UWP."
msgstr ""
+"Godot の Mono バージョンは UWP プラットフォームをサポートしていません。UWP を"
+"対象としたい場合は、標準ビルド(C# 非サポート)を使用して下さい。"
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -20169,41 +20135,36 @@ msgid "UWP"
msgstr "UWP"
#: platform/uwp/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Signtool"
-msgstr "シグナル"
+msgstr "サインツール"
#: platform/uwp/export/export.cpp
msgid "Debug Certificate"
-msgstr ""
+msgstr "デバッグ証明書"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Debug Algorithm"
-msgstr "デバッガー"
+msgstr "デバッグアルゴリズム"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Failed to rename temporary file \"%s\"."
-msgstr "一時ファイルを削除できません:"
+msgstr "一時ファイル \"%s\" の名前の変更に失敗しました。"
#: platform/windows/export/export.cpp
msgid "Identity Type"
-msgstr ""
+msgstr "識別子タイプ"
#: platform/windows/export/export.cpp
msgid "Timestamp Server URL"
-msgstr ""
+msgstr "タイムスタンプサーバーURL"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Digest Algorithm"
-msgstr "デバッガー"
+msgstr "ダイジェストアルゴリズム"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Modify Resources"
-msgstr "リソースをコピー"
+msgstr "リソースの変更"
#: platform/windows/export/export.cpp
msgid "File Version"
@@ -20227,22 +20188,19 @@ msgstr "ファイルの説明"
#: platform/windows/export/export.cpp
msgid "Trademarks"
-msgstr ""
+msgstr "商標"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Resources Modification"
-msgstr "ランダムな回転:"
+msgstr "リソースの変更"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Could not find rcedit executable at \"%s\"."
-msgstr "キーストアが見つからないため、エクスポートできません。"
+msgstr "\"%s\" に rcedit 実行ファイルが見つかりませんでした。"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Could not find wine executable at \"%s\"."
-msgstr "キーストアが見つからないため、エクスポートできません。"
+msgstr "\"%s\" に wine 実行ファイルが見つかりませんでした。"
#: platform/windows/export/export.cpp
msgid ""
@@ -20250,31 +20208,29 @@ msgid ""
"Settings (Export > Windows > Rcedit), or disable \"Application > Modify "
"Resources\" in the export preset."
msgstr ""
+"rcedit 実行ファイルを開始できませんでした。エディター設定 (Export > Windows "
+"> Rcedit)から rcedit のパスを設定するか、エクスポートプリセットで \"アプリ"
+"ケーション > リソースの変更\"を無効にして下さい。"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "rcedit failed to modify executable: %s."
-msgstr "無効な実行可能ファイルです。"
+msgstr "rcedit は実行可能ファイルの変更に失敗しました: %s。"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Could not find signtool executable at \"%s\"."
-msgstr "キーストアが見つからないため、エクスポートできません。"
+msgstr "\"%s\" に サインツール実行ファイルが見つかりませんでした。"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Could not find osslsigncode executable at \"%s\"."
-msgstr "キーストアが見つからないため、エクスポートできません。"
+msgstr "\"%s\" に osslsigncode 実行ファイルが見つかりませんでした。"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Invalid identity type."
-msgstr "無効な識別子:"
+msgstr "無効な識別子タイプ。"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Invalid timestamp server."
-msgstr "無効な名前です。"
+msgstr "タイムスタンプサーバーが無効です。"
#: platform/windows/export/export.cpp
msgid ""
@@ -20282,22 +20238,25 @@ msgid ""
"Settings (Export > Windows > Signtool), or disable \"Codesign\" in the "
"export preset."
msgstr ""
+"サインツール実行ファイルを開始できませんでした。エディター設定 (Export > "
+"Windows > サインツール)からサインツールのパスを設定するか、エクスポートプリ"
+"セットで \"コード署名\"を無効にして下さい。"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Signtool failed to sign executable: %s."
-msgstr "無効な実行可能ファイルです。"
+msgstr "サインツールは実行可能ファイルの署名に失敗しました: %s。"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Failed to remove temporary file \"%s\"."
-msgstr "一時ファイルを削除できません:"
+msgstr "一時ファイル \"%s\" の削除に失敗しました。"
#: platform/windows/export/export.cpp
msgid ""
"The rcedit tool must be configured in the Editor Settings (Export > Windows "
"> Rcedit) to change the icon or app information data."
msgstr ""
+"アイコンやアプリ情報データを変更するには、エディター設定 (Export > Windows > "
+"Rcedit) で rcedit の設定を行う必要があります。"
#: platform/windows/export/export.cpp
msgid "Invalid icon path:"
@@ -20313,20 +20272,19 @@ msgstr "無効な製品バージョン:"
#: platform/windows/export/export.cpp
msgid "Windows executables cannot be >= 4 GiB."
-msgstr ""
+msgstr "Windows の実行ファイルは、4GiBを超えることはできません。"
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
-#, fuzzy
msgid "Failed to open executable file \"%s\"."
-msgstr "無効な実行可能ファイルです。"
+msgstr "実行ファイル \"%s\" を開くのに失敗しました。"
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
msgid "Executable file header corrupted."
-msgstr ""
+msgstr "実行ファイルのヘッダーが破損しています。"
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
msgid "Executable \"pck\" section not found."
-msgstr ""
+msgstr "実行可能な \"pck \"セクションが見つかりません。"
#: platform/windows/export/export.cpp
msgid "Windows"
@@ -20334,7 +20292,7 @@ msgstr "Windows"
#: platform/windows/export/export.cpp
msgid "Rcedit"
-msgstr ""
+msgstr "Rcedit"
#: platform/windows/export/export.cpp
msgid "Osslsigncode"
@@ -20363,21 +20321,18 @@ msgstr ""
#: scene/2d/animated_sprite.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/particles_2d.cpp scene/3d/cpu_particles.cpp scene/3d/particles.cpp
-#, fuzzy
msgid "Speed Scale"
-msgstr "スケール"
+msgstr "スピードスケール"
#: scene/2d/animated_sprite.cpp scene/2d/audio_stream_player_2d.cpp
#: scene/3d/audio_stream_player_3d.cpp scene/3d/sprite_3d.cpp
#: scene/audio/audio_stream_player.cpp
-#, fuzzy
msgid "Playing"
-msgstr "実行"
+msgstr "実行中"
#: scene/2d/animated_sprite.cpp scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
-#, fuzzy
msgid "Centered"
-msgstr "中央"
+msgstr "中央揃え"
#: scene/2d/animated_sprite.cpp scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
#: scene/gui/texture_button.cpp scene/gui/texture_rect.cpp
@@ -20390,52 +20345,45 @@ msgid "Flip V"
msgstr "垂直反転"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Monitoring"
-msgstr "モニター"
+msgstr "モニタリング"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Monitorable"
-msgstr "モニター"
+msgstr "モニター可能"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Physics Overrides"
msgstr "物理のオーバーライド"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Space Override"
-msgstr "上書き"
+msgstr "領域のオーバーライド"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Gravity Point"
-msgstr "ポイントを生成"
+msgstr "重力点"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Gravity Distance Scale"
-msgstr "インスタンス"
+msgstr "重力距離スケール"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Gravity Vec"
-msgstr "デフォルトのプレビュー"
+msgstr "重力ベクトル"
#: scene/2d/area_2d.cpp scene/2d/cpu_particles_2d.cpp scene/3d/area.cpp
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
msgid "Gravity"
-msgstr ""
+msgstr "重力"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Linear Damp"
-msgstr "リニア"
+msgstr "線形減衰"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Angular Damp"
-msgstr ""
+msgstr "角度減衰"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Audio Bus"
@@ -20453,9 +20401,8 @@ msgstr "ボリューム dB"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/audio/audio_stream_player.cpp
#: servers/audio/effects/audio_effect_pitch_shift.cpp
-#, fuzzy
msgid "Pitch Scale"
-msgstr "スケール"
+msgstr "ピッチスケール"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/audio/audio_stream_player.cpp scene/gui/video_player.cpp
@@ -20465,7 +20412,7 @@ msgstr "自動再生"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/audio/audio_stream_player.cpp
msgid "Stream Paused"
-msgstr ""
+msgstr "ストリームの一時停止"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/3d/light.cpp scene/3d/reflection_probe.cpp
@@ -20475,9 +20422,8 @@ msgid "Max Distance"
msgstr "最大距離"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/light.cpp
-#, fuzzy
msgid "Attenuation"
-msgstr "アニメーション"
+msgstr "減衰量"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/audio/audio_stream_player.cpp scene/gui/video_player.cpp
@@ -20486,22 +20432,19 @@ msgstr "バス"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
msgid "Area Mask"
-msgstr ""
+msgstr "エリアマスク"
#: scene/2d/back_buffer_copy.cpp
-#, fuzzy
msgid "Copy Mode"
-msgstr "ノードをコピー"
+msgstr "コピーモード"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Anchor Mode"
-msgstr "アイコンモード"
+msgstr "アンカーモード"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Rotating"
-msgstr "回転のステップ:"
+msgstr "回転"
#: scene/2d/camera_2d.cpp scene/2d/listener_2d.cpp scene/3d/camera.cpp
#: scene/3d/listener.cpp scene/animation/animation_blend_tree.cpp
@@ -20513,9 +20456,8 @@ msgid "Zoom"
msgstr "ズーム"
#: scene/2d/camera_2d.cpp scene/main/canvas_layer.cpp
-#, fuzzy
msgid "Custom Viewport"
-msgstr "1 ビューポート"
+msgstr "カスタムビューポート"
#: scene/2d/camera_2d.cpp scene/3d/camera.cpp scene/3d/interpolated_camera.cpp
#: scene/animation/animation_player.cpp scene/animation/animation_tree.cpp
@@ -20544,29 +20486,24 @@ msgid "Bottom"
msgstr "下"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Smoothed"
-msgstr "スムーズステップ"
+msgstr "スムージング"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Draw Margin"
-msgstr "マージンを設定する"
+msgstr "マージンを描画する"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Drag Margin H Enabled"
-msgstr "マージンを設定する"
+msgstr "水平方向のドラッグマージンにのみ有効"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Drag Margin V Enabled"
-msgstr "マージンを設定する"
+msgstr "垂直方向のドラッグマージンにのみ有効"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Smoothing"
-msgstr "スムーズステップ"
+msgstr "スムージング"
#: scene/2d/camera_2d.cpp
msgid "H"
@@ -20577,35 +20514,29 @@ msgid "V"
msgstr "垂直"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Drag Margin"
-msgstr "マージンを設定する"
+msgstr "ドラッグマージン"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Draw Screen"
-msgstr "ドローコール:"
+msgstr "スクリーンを描画する"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Draw Limits"
-msgstr "ドローコール:"
+msgstr "限界を描画する"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Draw Drag Margin"
-msgstr "マージンを設定する"
+msgstr "ドラッグマージンを描画する"
#: scene/2d/canvas_item.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp
-#, fuzzy
msgid "Blend Mode"
-msgstr "ブレンド2 ノード"
+msgstr "ブレンドモード"
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Light Mode"
-msgstr "右伸長"
+msgstr "ライトモード"
#: scene/2d/canvas_item.cpp
#, fuzzy
@@ -23582,14 +23513,12 @@ msgid "AABB"
msgstr ""
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Sorting"
msgstr "ソート"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Use AABB Center"
-msgstr "アンビエントを使用"
+msgstr "AABBセンターを使用"
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
diff --git a/editor/translations/ka.po b/editor/translations/ka.po
index 629afaa429..ce7502e5ac 100644
--- a/editor/translations/ka.po
+++ b/editor/translations/ka.po
@@ -11066,7 +11066,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/km.po b/editor/translations/km.po
index ade147ec7e..85f5081b6f 100644
--- a/editor/translations/km.po
+++ b/editor/translations/km.po
@@ -10598,7 +10598,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index f43830b1e9..9563bc6244 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -29,7 +29,7 @@
# 신동규 <rlsl0422@gmail.com>, 2021.
# Kiroo <elusive1102@naver.com>, 2021.
# JumpJetAvocado <dwkng@jbnu.ac.kr>, 2021.
-# Lee Minhak <minarihak@gmail.com>, 2022.
+# Lee Minhak <minarihak@gmail.com>, 2022, 2023.
# 한수현 <shh1473@ajou.ac.kr>, 2022.
# Taehun Yun <yooontehoon@naver.com>, 2022.
# vrSono <global.sonogong@gmail.com>, 2022.
@@ -41,13 +41,14 @@
# nulltable <un5450@naver.com>, 2022.
# Godoto <aicompose@gmail.com>, 2022.
# gaenyang <gaenyang@outlook.com>, 2022.
+# 오지훈 <jule1130@naver.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-10-24 12:41+0000\n"
-"Last-Translator: Godoto <aicompose@gmail.com>\n"
+"PO-Revision-Date: 2023-01-20 10:19+0000\n"
+"Last-Translator: 오지훈 <jule1130@naver.com>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/"
"godot/ko/>\n"
"Language: ko\n"
@@ -55,7 +56,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.14.2-dev\n"
+"X-Generator: Weblate 4.15.1\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -582,7 +583,7 @@ msgstr "이름"
#: modules/visual_script/visual_script_nodes.cpp platform/uwp/export/export.cpp
#: platform/windows/export/export.cpp
msgid "Description"
-msgstr "서술"
+msgstr "설명"
#: core/project_settings.cpp editor/editor_node.cpp editor/editor_settings.cpp
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
@@ -10886,7 +10887,7 @@ msgstr "후면 원근"
msgid " [auto]"
msgstr " [자동]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [포털 활성]"
@@ -17852,9 +17853,8 @@ msgid "Use Default Args"
msgstr "디폴트로 재설정"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Validate"
-msgstr "올바른 문자:"
+msgstr "올바른 문자"
#: modules/visual_script/visual_script_func_nodes.cpp
#, fuzzy
@@ -17984,24 +17984,20 @@ msgid "Preload"
msgstr "새로고침"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Get Index"
-msgstr "Z 인덱스"
+msgstr "인덱스 가져오기"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Set Index"
-msgstr "Z 인덱스"
+msgstr "인덱스 설정"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Global Constant"
-msgstr "상수"
+msgstr "전역 상수"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Class Constant"
-msgstr "상수"
+msgstr "클래스 상수"
#: modules/visual_script/visual_script_nodes.cpp
#, fuzzy
@@ -18009,24 +18005,21 @@ msgid "Basic Constant"
msgstr "상수"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Math Constant"
-msgstr "상수"
+msgstr "수학 상수"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Get Engine Singleton"
-msgstr "활성화된 GDNative 싱글톤"
+msgstr "엔진 싱글톤 가져오기"
#: modules/visual_script/visual_script_nodes.cpp
#, fuzzy
msgid "Get Scene Node"
-msgstr "시간 탐색 노드"
+msgstr "씬 Node 가져오기"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Get Scene Tree"
-msgstr "씬 트리 편집"
+msgstr "씬 트리 가져오기"
#: modules/visual_script/visual_script_nodes.cpp
#, fuzzy
@@ -18034,9 +18027,8 @@ msgid "Get Self"
msgstr "자체"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "CustomNode"
-msgstr "노드 잘라내기"
+msgstr ""
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
@@ -18096,18 +18088,16 @@ msgid "Wait"
msgstr "대기"
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "Next Frame"
-msgstr "프레임 이동"
+msgstr "다음 프레임"
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "Next Physics Frame"
-msgstr "물리 프레임 %"
+msgstr "다음 물리 프레임"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "%s sec(s)"
-msgstr ""
+msgstr "%s초"
#: modules/visual_script/visual_script_yield_nodes.cpp scene/main/timer.cpp
#, fuzzy
@@ -18136,7 +18126,7 @@ msgstr "우선 순위 모드"
#: modules/webrtc/webrtc_data_channel.h
msgid "WebRTC"
-msgstr ""
+msgstr "WebRTC"
#: modules/webrtc/webrtc_data_channel.h
msgid "Max Channel In Buffer (KB)"
@@ -18148,12 +18138,12 @@ msgstr ""
#: modules/websocket/websocket_client.cpp
msgid "Trusted SSL Certificate"
-msgstr ""
+msgstr "신뢰할 수 있는 SSL 인증서"
#: modules/websocket/websocket_macros.h
#, fuzzy
msgid "WebSocket Client"
-msgstr "네트워크 프로파일러"
+msgstr "WebSocket 클라이언트"
#: modules/websocket/websocket_macros.h
msgid "Max In Buffer (KB)"
@@ -18181,13 +18171,12 @@ msgid "Bind IP"
msgstr ""
#: modules/websocket/websocket_server.cpp
-#, fuzzy
msgid "Private Key"
-msgstr "물리 키"
+msgstr "개인 키"
#: modules/websocket/websocket_server.cpp platform/javascript/export/export.cpp
msgid "SSL Certificate"
-msgstr ""
+msgstr "SSL 인증서"
#: modules/websocket/websocket_server.cpp
#, fuzzy
@@ -18212,8 +18201,9 @@ msgid "Optional Features"
msgstr "선택적 기능"
#: modules/webxr/webxr_interface.cpp
+#, fuzzy
msgid "Requested Reference Space Types"
-msgstr ""
+msgstr "요청된 참조 공간 유형"
#: modules/webxr/webxr_interface.cpp
msgid "Reference Space Type"
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
index 5f0c068dbb..33cc2f8ae9 100644
--- a/editor/translations/lt.po
+++ b/editor/translations/lt.po
@@ -11054,7 +11054,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/lv.po b/editor/translations/lv.po
index 51836c627b..18c5c4242e 100644
--- a/editor/translations/lv.po
+++ b/editor/translations/lv.po
@@ -10997,7 +10997,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/mk.po b/editor/translations/mk.po
index 6d725ac82b..9f06f03d81 100644
--- a/editor/translations/mk.po
+++ b/editor/translations/mk.po
@@ -10624,7 +10624,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/ml.po b/editor/translations/ml.po
index 171cc17fdb..8a66f8b8b4 100644
--- a/editor/translations/ml.po
+++ b/editor/translations/ml.po
@@ -10647,7 +10647,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/mr.po b/editor/translations/mr.po
index 24300da41a..ac50228677 100644
--- a/editor/translations/mr.po
+++ b/editor/translations/mr.po
@@ -10634,7 +10634,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/ms.po b/editor/translations/ms.po
index 3b34efe6f2..7c87a4709d 100644
--- a/editor/translations/ms.po
+++ b/editor/translations/ms.po
@@ -11073,7 +11073,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index 9d831aee5d..f7aac38f70 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -4,7 +4,7 @@
# This file is distributed under the same license as the Godot source code.
# Allan Nordhøy <epost@anotheragency.no>, 2017-2018, 2019, 2020, 2021.
# Anonymous <GentleSaucepan@protonmail.com>, 2017, 2021.
-# Elias <eliasnykrem@gmail.com>, 2018.
+# Elias <eliasnykrem@gmail.com>, 2018, 2023.
# flesk <eivindkn@gmail.com>, 2017, 2019.
# Frank T. Rambol <frank@d-fect.com>, 2018, 2021.
# Jørgen Aarmo Lund <jorgen.aarmo@gmail.com>, 2016, 2019.
@@ -28,8 +28,8 @@ msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-12-08 10:28+0000\n"
-"Last-Translator: slasken06 <ask.skivdal@gmail.com>\n"
+"PO-Revision-Date: 2023-01-17 13:54+0000\n"
+"Last-Translator: Elias <eliasnykrem@gmail.com>\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/godot-"
"engine/godot/nb_NO/>\n"
"Language: nb\n"
@@ -37,7 +37,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -2281,7 +2281,7 @@ msgstr "Åpne"
#: editor/dependency_editor.cpp
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "Eiere av: %s (Totalt: %d)"
#: editor/dependency_editor.cpp
#, fuzzy
@@ -2868,22 +2868,19 @@ msgstr "Velg"
#: editor/editor_export.cpp
msgid "Project export for platform:"
-msgstr ""
+msgstr "Prosjekteksport til platform:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed with warnings."
-msgstr "Kopier Node-bane"
+msgstr "Fullført med varsler."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed successfully."
-msgstr "Vellykket Installering av Pakke!"
+msgstr "Fullført vellykket."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed."
-msgstr "Feilet:"
+msgstr "Feilet."
#: editor/editor_export.cpp
msgid "Storing File:"
@@ -2898,29 +2895,24 @@ msgid "Packing"
msgstr "Pakking"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Save PCK"
-msgstr "Lagre som"
+msgstr "Lagre PCK"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Cannot create file \"%s\"."
-msgstr "Kunne ikke opprette mappe."
+msgstr "Kunne ikke opprette filen \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to export project files."
-msgstr "Kunne ikke opprette mappe."
+msgstr "Kunne ikke eksportere prosjektfiler."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Can't open file to read from path \"%s\"."
-msgstr "Kan ikke åpne fil for skriving:"
+msgstr "Kan ikke åpne filen for å lese fra banen \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Save ZIP"
-msgstr "Lagre som"
+msgstr "Lagre ZIP"
#: editor/editor_export.cpp
msgid ""
@@ -2984,9 +2976,8 @@ msgstr ""
#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Custom Template"
-msgstr "Medlemmer"
+msgstr "Egendefinert mal"
#: editor/editor_export.cpp editor/project_export.cpp
#: platform/android/export/export_plugin.cpp platform/iphone/export/export.cpp
@@ -2996,22 +2987,20 @@ msgid "Release"
msgstr "Slipp"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Binary Format"
-msgstr "Anim Forandre Omforming"
+msgstr "Binærformat"
#: editor/editor_export.cpp
msgid "64 Bits"
-msgstr ""
+msgstr "64 Bits"
#: editor/editor_export.cpp
msgid "Embed PCK"
-msgstr ""
+msgstr "Innebygd PCK"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Texture Format"
-msgstr "Linjal Modus"
+msgstr "Teksturformat"
#: editor/editor_export.cpp
msgid "BPTC"
@@ -3031,9 +3020,8 @@ msgid "ETC2"
msgstr ""
#: editor/editor_export.cpp
-#, fuzzy
msgid "No BPTC Fallbacks"
-msgstr "Tilbakefall"
+msgstr "Ingen BPTC tilbakefall"
#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
@@ -3048,24 +3036,20 @@ msgid "Custom release template not found."
msgstr "Fant ikke tilpasset utgivelsesmal."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Prepare Template"
-msgstr "Håndter Eksportmaler"
+msgstr "Forbered mal"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "The given export path doesn't exist."
-msgstr "Fil eksisterer ikke."
+msgstr "Den angitte eksportbanen eksisterer ikke."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found: \"%s\"."
-msgstr "Malfil ble ikke funnet:"
+msgstr "Malfil ble ikke funnet \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to copy export template."
-msgstr "Håndter Eksportmaler"
+msgstr "Kunne ikke kopiere eksportmalen."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
@@ -3082,9 +3066,8 @@ msgid "Convert Text Resources To Binary On Export"
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "3D Editor"
-msgstr "Redigeringsverktøy"
+msgstr "3D Redigeringsverktøy"
#: editor/editor_feature_profile.cpp
msgid "Script Editor"
@@ -3097,7 +3080,7 @@ msgstr "Ressursbibliotek"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
-msgstr ""
+msgstr "Scenetre redigering"
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -3115,7 +3098,7 @@ msgstr "Importer"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "Lar deg se og redigere 3D scener."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
@@ -11529,7 +11512,7 @@ msgstr "Perspektiv"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
@@ -14991,9 +14974,8 @@ msgid "Project Path:"
msgstr "Prosjektsti:"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Project Installation Path:"
-msgstr "Prosjektsti:"
+msgstr "Prosjekt installasjonsti:"
#: editor/project_manager.cpp
msgid "Renderer:"
@@ -15005,7 +14987,7 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Not supported by your GPU drivers."
-msgstr ""
+msgstr "Støttes ikke av dine GPU-drivere."
#: editor/project_manager.cpp
msgid ""
@@ -15040,9 +15022,8 @@ msgid "Renderer can be changed later, but scenes may need to be adjusted."
msgstr "Rendrer kan endres senere, men scener må kanskje justeres."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Missing Project"
-msgstr "Importer Eksisterende Prosjekt"
+msgstr "Manglede Prosjekt"
#: editor/project_manager.cpp
msgid "Error: Project is missing on the filesystem."
@@ -15053,9 +15034,8 @@ msgid "Local"
msgstr "Lokal"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Local Projects"
-msgstr "Prosjekter"
+msgstr "Lokale prosjekter"
#: editor/project_manager.cpp
#, fuzzy
@@ -15063,9 +15043,8 @@ msgid "Asset Library Projects"
msgstr "Ressursbibliotek"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't open project at '%s'."
-msgstr "Kan ikke åpne prosjekt"
+msgstr "Kan ikke åpne prosjektet i '%s'."
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
@@ -15172,23 +15151,20 @@ msgid "Loading, please wait..."
msgstr "Henter fillager, vennligst vent..."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Edit Project"
-msgstr "Eksporter Prosjekt"
+msgstr "Rediger Prosjekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Run Project"
-msgstr "Endre Navn på Prosjekt"
+msgstr "Kjør prosjektet"
#: editor/project_manager.cpp
msgid "Scan"
-msgstr "Skann"
+msgstr "Søk"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Scan Projects"
-msgstr "Prosjekter"
+msgstr "Søk etter prosjekter"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
@@ -15199,19 +15175,16 @@ msgid "New Project"
msgstr "Nytt prosjekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Import Project"
-msgstr "Eksporter Prosjekt"
+msgstr "Importert prosjekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Project"
-msgstr "Endre Navn på Prosjekt"
+msgstr "Fjern prosjekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Missing"
-msgstr "Fjern punkt"
+msgstr "Fjern manglende"
#: editor/project_manager.cpp
msgid "About"
@@ -15227,7 +15200,7 @@ msgstr "Fjern alle"
#: editor/project_manager.cpp
msgid "Also delete project contents (no undo!)"
-msgstr ""
+msgstr "Slett også prosjektets innhold (kan ikke reverseres!)"
#: editor/project_manager.cpp
msgid "Can't run project"
@@ -15240,9 +15213,8 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Filter projects"
-msgstr "Lim inn Noder"
+msgstr "Filtre prosjekter"
#: editor/project_manager.cpp
msgid ""
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index 5e80c53732..0e47306f0d 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -11327,7 +11327,7 @@ msgstr "Perspectief"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index 47b7bfe98a..31048d3390 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -2,7 +2,7 @@
# Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur.
# Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
-# 8-bit Pixel <dawdejw@gmail.com>, 2016.
+# 8-bit Pixel <dawdejw@gmail.com>, 2016, 2023.
# Adam Wolanski <adam.wolanski94@gmail.com>, 2017.
# Adrian Węcławski <weclawskiadrian@gmail.com>, 2016.
# aelspire <aelspire@gmail.com>, 2017, 2019, 2020, 2021.
@@ -17,14 +17,14 @@
# Maksymilian Świąć <maksymilian.swiac@gmail.com>, 2017-2018.
# Mietek Szcześniak <ravaging@go2.pl>, 2016.
# NeverK <neverkoxu@gmail.com>, 2018, 2019, 2020, 2021, 2022.
-# Rafal Brozio <rafal.brozio@gmail.com>, 2016, 2019, 2020, 2021.
+# Rafal Brozio <rafal.brozio@gmail.com>, 2016, 2019, 2020, 2021, 2023.
# Rafał Ziemniak <synaptykq@gmail.com>, 2017.
-# RM <synaptykq@gmail.com>, 2018, 2020, 2022.
+# RM <synaptykq@gmail.com>, 2018, 2020, 2022, 2023.
# Sebastian Krzyszkowiak <dos@dosowisko.net>, 2017.
-# Sebastian Pasich <sebastian.pasich@gmail.com>, 2017, 2019, 2020, 2022.
+# Sebastian Pasich <sebastian.pasich@gmail.com>, 2017, 2019, 2020, 2022, 2023.
# siatek papieros <sbigneu@gmail.com>, 2016.
# Zatherz <zatherz@linux.pl>, 2017, 2020, 2021.
-# Tomek <kobewi4e@gmail.com>, 2018, 2019, 2020, 2021, 2022.
+# Tomek <kobewi4e@gmail.com>, 2018, 2019, 2020, 2021, 2022, 2023.
# Wojcieh Er Zet <wojcieh.rzepecki@gmail.com>, 2018.
# Dariusz Siek <dariuszynski@gmail.com>, 2018, 2019, 2020, 2021.
# Szymon Nowakowski <smnbdg13@gmail.com>, 2019.
@@ -45,7 +45,7 @@
# Piotr Grodzki <ziemniakglados@gmail.com>, 2020.
# Dzejkop <jakubtrad@gmail.com>, 2020, 2021.
# Mateusz Grzonka <alpinus4@gmail.com>, 2020.
-# gnu-ewm <gnu.ewm@protonmail.com>, 2021.
+# gnu-ewm <gnu.ewm@protonmail.com>, 2021, 2023.
# vrid <patryksoon@live.com>, 2021.
# Suchy Talerz <kacperkubis06@gmail.com>, 2021.
# Bartosz Stasiak <bs97086@amu.edu.pl>, 2021.
@@ -60,22 +60,23 @@
# Mateusz Zdrzałek <matjozohd@gmail.com>, 2022.
# Konrad <kobe-interactive@protonmail.com>, 2022.
# Pixel Zone - Godot Engine Tutorials <karoltomaszewskimusic@gmail.com>, 2022.
-# DK0492 <doriankaczmarek28@gmail.com>, 2022.
+# DK0492 <doriankaczmarek28@gmail.com>, 2022, 2023.
# Dawid Skubij <davidsd@tlen.pl>, 2022.
-# kingofsponges <q.patex.q@gmail.com>, 2022.
+# kingofsponges <q.patex.q@gmail.com>, 2022, 2023.
# Patryk Morawski <gormit7@gmail.com>, 2022.
# Adrians <adrianspl@o2.pl>, 2022.
# Wodorek <Krol.w94@gmail.com>, 2022.
# Filip Gliszczyński <filipgliszczynski@gmail.com>, 2022.
# Piotr Ślusarz <piotrekslusarz@outlook.com>, 2022.
# Jan Kurzak <Iqaz0oki@outlook.com>, 2022.
+# Wojciech Pluta <wojciech.pluta@oracle.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-12-12 09:46+0000\n"
-"Last-Translator: Tomek <kobewi4e@gmail.com>\n"
+"PO-Revision-Date: 2023-01-20 10:19+0000\n"
+"Last-Translator: RM <synaptykq@gmail.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/"
"godot/pl/>\n"
"Language: pl\n"
@@ -84,7 +85,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -104,7 +105,7 @@ msgstr "Kod zakończenia"
#: core/bind/core_bind.cpp
msgid "V-Sync Enabled"
-msgstr "V-Sync Włączone"
+msgstr "V-Sync włączone"
#: core/bind/core_bind.cpp main/main.cpp
msgid "V-Sync Via Compositor"
@@ -112,7 +113,7 @@ msgstr "V-Sync przez kompozytor"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Delta Smoothing"
-msgstr "Wygładzanie Delta"
+msgstr "Wygładzanie delta"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode"
@@ -5523,18 +5524,16 @@ msgid "Show Line Numbers"
msgstr "Pokaż numery linii"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Line Numbers Zero Padded"
-msgstr "Numer linii:"
+msgstr "Numery linii wyrównane zerami"
#: editor/editor_settings.cpp
msgid "Show Bookmark Gutter"
msgstr "Pokaż ciek zakładek"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Breakpoint Gutter"
-msgstr "Pomiń punkty wstrzymania"
+msgstr "Pokaż rynnę punktów wstrzymania"
#: editor/editor_settings.cpp
msgid "Show Info Gutter"
@@ -5561,9 +5560,8 @@ msgid "Line Length Guideline Hard Column"
msgstr "Wytyczne dotyczące długości linii twardej kolumny"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Script List"
-msgstr "Edytor skryptów"
+msgstr "Lista skryptów"
#: editor/editor_settings.cpp
msgid "Show Members Overview"
@@ -5594,9 +5592,8 @@ msgid "Auto Reload Scripts On External Change"
msgstr "Automatycznie przeładuj skrypty przy zmianie zewnętrznej"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Create Signal Callbacks"
-msgstr "Opóźnienia wymuszania shaderów"
+msgstr "Twórz wywołania zwrotne sygnałów"
#: editor/editor_settings.cpp
msgid "Sort Members Outline Alphabetically"
@@ -5623,9 +5620,8 @@ msgid "Caret Blink Speed"
msgstr "Prędkość migania karety"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Right Click Moves Caret"
-msgstr "Prawy klik, aby dodać punkt"
+msgstr "Prawy klik przesuwa kursor"
#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp
#: modules/gdscript/gdscript_editor.cpp
@@ -5647,56 +5643,51 @@ msgstr "Opóźnienie zakończenia kodu"
#: editor/editor_settings.cpp
msgid "Put Callhint Tooltip Below Current Line"
-msgstr ""
+msgstr "Ustaw dymek podpowiedzi pod aktualnym wierszem"
#: editor/editor_settings.cpp
msgid "Callhint Tooltip Offset"
-msgstr ""
+msgstr "Przesunięcie dymka podpowiedzi"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Complete File Paths"
-msgstr "Skopiuj ścieżkę węzła"
+msgstr "Uzupełniaj ścieżki plików"
#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp
-#, fuzzy
msgid "Add Type Hints"
-msgstr "Dodaj typ"
+msgstr "Dodaj wskazówki typów"
#: editor/editor_settings.cpp
msgid "Use Single Quotes"
msgstr "Użyj pojedynczych cudzysłowów"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Help Index"
-msgstr "Pokaż linie pomocnicze"
+msgstr "Pokaż indeks pomocy"
#: editor/editor_settings.cpp
msgid "Help Font Size"
-msgstr ""
+msgstr "Rozmiar czcionki pomocy"
#: editor/editor_settings.cpp
msgid "Help Source Font Size"
-msgstr ""
+msgstr "Rozmiar czcionki kodu w pomocy"
#: editor/editor_settings.cpp
msgid "Help Title Font Size"
-msgstr ""
+msgstr "Rozmiar czcionki tytułu w pomocy"
#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
msgstr "Siatka"
#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Pick Distance"
-msgstr "Wybierz odległość:"
+msgstr "Dystans łapania"
#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Preview Size"
-msgstr "Podgląd"
+msgstr "Rozmiar podglądu"
#: editor/editor_settings.cpp
msgid "Primary Grid Color"
@@ -5707,32 +5698,27 @@ msgid "Secondary Grid Color"
msgstr "Pomocniczy kolor siatki"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Selection Box Color"
-msgstr "Tylko zaznaczenie"
+msgstr "Kolor prostopadłościanu zaznaczenia"
#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
-#, fuzzy
msgid "3D Gizmos"
-msgstr "Uchwyty"
+msgstr "Uchwyty 3D"
#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
-#, fuzzy
msgid "Gizmo Colors"
-msgstr "Kolory emisji"
+msgstr "Kolory uchwytów"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Instanced"
-msgstr "Instancja"
+msgstr "Instancjonowany"
#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Joint"
-msgstr "Punkt"
+msgstr "Złącze"
#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp
@@ -5744,276 +5730,236 @@ msgid "Shape"
msgstr "Kształt"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Primary Grid Steps"
-msgstr "Krok siatki:"
+msgstr "Główne kroki siatki"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid Size"
-msgstr "Krok siatki:"
+msgstr "Rozmiar siatki"
#: editor/editor_settings.cpp
msgid "Grid Division Level Max"
-msgstr ""
+msgstr "Maksymalny poziom podziału siatki"
#: editor/editor_settings.cpp
msgid "Grid Division Level Min"
-msgstr ""
+msgstr "Minimalny poziom podziału siatki"
#: editor/editor_settings.cpp
msgid "Grid Division Level Bias"
-msgstr ""
+msgstr "Tendencja poziomu podziału siatki"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid XZ Plane"
-msgstr "Malowanie GridMap"
+msgstr "Płaszczyzna siatki XZ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid XY Plane"
-msgstr "Malowanie GridMap"
+msgstr "Płaszczyzna siatki XY"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid YZ Plane"
-msgstr "Malowanie GridMap"
+msgstr "Płaszczyzna siatki YZ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default FOV"
-msgstr "Domyślny"
+msgstr "Domyślne pole widzenia (FOV)"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Z Near"
-msgstr "Domyślny motyw"
+msgstr "Domyślne bliskie Z"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Z Far"
-msgstr "Domyślny"
+msgstr "Domyślne dalekie Z"
#: editor/editor_settings.cpp
msgid "Lightmap Baking Number Of CPU Threads"
-msgstr ""
+msgstr "Liczba wątków CPU dla wypalania map światła"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Navigation Scheme"
-msgstr "Tryb nawigacji"
+msgstr "Schemat nawigacji"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Invert Y Axis"
-msgstr "Edytuj oś Y"
+msgstr "Odwróć oś Y"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Invert X Axis"
-msgstr "Edytuj oś X"
+msgstr "Odwróć oś X"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Style"
-msgstr "Oddal"
+msgstr "Styl przybliżenia"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Emulate Numpad"
-msgstr "Włącz emulację klawiatury numerycznej"
+msgstr "Emuluj klawiaturę numeryczną"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Emulate 3 Button Mouse"
-msgstr "Włącz emulację środkowego przycisku myszy"
+msgstr "Emuluj trzyprzyciskową mysz"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Orbit Modifier"
-msgstr "Pierwsze zmodyfikowane"
+msgstr "Modyfikator orbity"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Modifier"
-msgstr "Tryb przesuwania"
+msgstr "Modyfikator przesuwania"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Modifier"
-msgstr "Zmodyfikowany"
+msgstr "Modyfikator przybliżenia"
#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Warped Mouse Panning"
-msgstr ""
+msgstr "Zawinięte przesuwanie myszą"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Navigation Feel"
-msgstr "Tryb nawigacji"
+msgstr "Preferencje nawigacji"
#: editor/editor_settings.cpp
msgid "Orbit Sensitivity"
-msgstr ""
+msgstr "Czułość orbity"
#: editor/editor_settings.cpp
msgid "Orbit Inertia"
-msgstr ""
+msgstr "Bezwładność orbity"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Translation Inertia"
-msgstr "Tłumaczenia"
+msgstr "Bezwładność przesunięcia"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Inertia"
-msgstr "Przybliż"
+msgstr "Bezwładność przybliżenia"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook"
-msgstr "\"Wolny widok\" w górę"
+msgstr "Wolny widok"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Navigation Scheme"
-msgstr "Utwórz siatkę nawigacyjną (Navigation Mesh)"
+msgstr "Schemat nawigacji wolnego widoku"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Sensitivity"
-msgstr "\"Wolny widok\" w lewo"
+msgstr "Czułość wolnego widoku"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Inertia"
-msgstr "\"Wolny widok\" w lewo"
+msgstr "Bezwładność wolnego widoku"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Base Speed"
-msgstr "Modyfikator prędkości swobodnego widoku"
+msgstr "Bazowa prędkość wolnego widoku"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Activation Modifier"
-msgstr "Wolny modyfikator swobodnego widoku"
+msgstr "Modyfikator aktywacji wolnego widoku"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Speed Zoom Link"
-msgstr "Modyfikator prędkości swobodnego widoku"
+msgstr "Szybkość swobodnego widoku zależna od przybliżenia"
#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Grid Color"
-msgstr "Wybierz Kolor"
+msgstr "Kolor siatki"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Guides Color"
-msgstr "Wybierz Kolor"
+msgstr "Kolor prowadnic"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Smart Snapping Line Color"
-msgstr "Inteligentne przyciąganie"
+msgstr "Kolor linii inteligentnego przyciągania"
#: editor/editor_settings.cpp
msgid "Bone Width"
-msgstr ""
+msgstr "Szerokość kości"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Color 1"
-msgstr "Zmień nazwę elementu koloru"
+msgstr "Kolor kości 1"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Color 2"
-msgstr "Zmień nazwę elementu koloru"
+msgstr "Kolor kości 2"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Selected Color"
-msgstr "Konfiguruj wybrany profil:"
+msgstr "Kolor zaznaczenia kości"
#: editor/editor_settings.cpp
msgid "Bone IK Color"
-msgstr ""
+msgstr "Kolor kości IK"
#: editor/editor_settings.cpp
msgid "Bone Outline Color"
-msgstr ""
+msgstr "Kolor obrysu kości"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Outline Size"
-msgstr "Rozmiar zarysu:"
+msgstr "Rozmiar obrysu kości"
#: editor/editor_settings.cpp
msgid "Viewport Border Color"
-msgstr ""
+msgstr "Kolor obwódki viewportu"
#: editor/editor_settings.cpp
msgid "Constrain Editor View"
-msgstr ""
+msgstr "Ogranicz widok edytora"
#: editor/editor_settings.cpp
msgid "Simple Panning"
-msgstr ""
+msgstr "Proste przesuwanie"
#: editor/editor_settings.cpp
msgid "Scroll To Pan"
-msgstr ""
+msgstr "Przewijanie przesuwa"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Speed"
-msgstr "Szybkość:"
+msgstr "Szybkość przesuwania"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Poly Editor"
-msgstr "Wielokąt 2D UV Edytor"
+msgstr "Edytor wielokątów"
#: editor/editor_settings.cpp
msgid "Point Grab Radius"
-msgstr ""
+msgstr "Promień chwytania punktów"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Show Previous Outline"
-msgstr "Poprzednia płaszczyzna"
+msgstr "Pokaż poprzedni obrys"
#: editor/editor_settings.cpp editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Autorename Animation Tracks"
-msgstr "Zmień nazwę animacji"
+msgstr "Automatycznie przemianuj ścieżki animacji"
#: editor/editor_settings.cpp
msgid "Default Create Bezier Tracks"
-msgstr ""
+msgstr "Twórz domyślnie ścieżki Beziera"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Create Reset Tracks"
-msgstr "Utwórz ścieżki RESET"
+msgstr "Domyślnie twórz ścieżki resetu"
#: editor/editor_settings.cpp
msgid "Onion Layers Past Color"
-msgstr ""
+msgstr "Przeszły kolor warstw cebuli"
#: editor/editor_settings.cpp
msgid "Onion Layers Future Color"
-msgstr ""
+msgstr "Przyszły kolor warstw cebuli"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Visual Editors"
-msgstr "Edytor grup"
+msgstr "Edytory wizualne"
#: editor/editor_settings.cpp
msgid "Minimap Opacity"
@@ -6021,69 +5967,61 @@ msgstr "Przezroczystość minimapy"
#: editor/editor_settings.cpp
msgid "Window Placement"
-msgstr ""
+msgstr "Ustawienie okna"
#: editor/editor_settings.cpp scene/2d/back_buffer_copy.cpp scene/2d/sprite.cpp
#: scene/2d/visibility_notifier_2d.cpp scene/3d/sprite_3d.cpp
#: scene/gui/control.cpp
-#, fuzzy
msgid "Rect"
-msgstr "Cały obszar"
+msgstr "Prostokąt"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Rect Custom Position"
-msgstr "Ustaw punkt kontrolny wychodzący z krzywej"
+msgstr "Własna pozycja prostokąta"
#: editor/editor_settings.cpp platform/android/export/export_plugin.cpp
msgid "Screen"
-msgstr ""
+msgstr "Ekran"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Auto Save"
-msgstr "Tnij automatycznie"
+msgstr "Autozapis"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Save Before Running"
-msgstr "Zapisz scenę przed uruchomieniem..."
+msgstr "Zapisz przed uruchomieniem"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Font Size"
-msgstr "Widok z przodu"
+msgstr "Rozmiar czcionki"
#: editor/editor_settings.cpp
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Remote Host"
-msgstr "Zdalny "
+msgstr "Zdalny host"
#: editor/editor_settings.cpp
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Remote Port"
-msgstr "Usuń punkt"
+msgstr "Zdalny port"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Editor SSL Certificates"
-msgstr "Ustawienia edytora"
+msgstr "Certyfikaty SSL edytora"
#: editor/editor_settings.cpp
msgid "HTTP Proxy"
-msgstr ""
+msgstr "Proxy HTTP"
#: editor/editor_settings.cpp
msgid "Host"
-msgstr ""
+msgstr "Host"
#: editor/editor_settings.cpp editor/fileserver/editor_file_server.cpp
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Port"
-msgstr ""
+msgstr "Port"
#. TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects.
#: editor/editor_settings.cpp
@@ -6092,171 +6030,150 @@ msgstr "Menedżer projektów"
#. TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects.
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Sorting Order"
-msgstr "w kolejności:"
+msgstr "Kolejność sortowania"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Symbol Color"
-msgstr ""
+msgstr "Kolor symbolu"
#: editor/editor_settings.cpp
msgid "Keyword Color"
-msgstr ""
+msgstr "Kolor słowa kluczowego"
#: editor/editor_settings.cpp
msgid "Control Flow Keyword Color"
-msgstr ""
+msgstr "Kolor słowa kluczowego kontroli przepływu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Base Type Color"
-msgstr "Zmień typ podstawowy"
+msgstr "Kolor typu bazowego"
#: editor/editor_settings.cpp
msgid "Engine Type Color"
-msgstr ""
+msgstr "Kolor typu silnika"
#: editor/editor_settings.cpp
msgid "User Type Color"
-msgstr ""
+msgstr "Kolor typu użytkownika"
#: editor/editor_settings.cpp
msgid "Comment Color"
-msgstr ""
+msgstr "Kolor komentarza"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "String Color"
-msgstr "Zapisywanie pliku:"
+msgstr "Kolor ciągu znaków"
#: editor/editor_settings.cpp platform/javascript/export/export.cpp
#: platform/uwp/export/export.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Background Color"
-msgstr "Kolor tła nieprawidłowy."
+msgstr "Kolor tła"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Background Color"
-msgstr "Kolor tła nieprawidłowy."
+msgstr "Kolor tła uzupełniania"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Selected Color"
-msgstr "Importuj zaznaczone"
+msgstr "Kolor zaznaczenia uzupełniania"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Existing Color"
-msgstr ""
+msgstr "Kolor istniejącego uzupełniania"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Scroll Color"
-msgstr ""
+msgstr "Kolor przewijania uzupełniania"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Font Color"
-msgstr ""
+msgstr "Kolor czcionki uzupełniania"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Text Color"
-msgstr "Następny poziom"
+msgstr "Kolor tekstu"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Line Number Color"
-msgstr "Numer linii:"
+msgstr "Kolor numerów linii"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Safe Line Number Color"
-msgstr "Numer linii:"
+msgstr "Kolor numerów bezpiecznych linii"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Caret Color"
-msgstr ""
+msgstr "Kolor kursora"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Caret Background Color"
-msgstr "Kolor tła nieprawidłowy."
+msgstr "Kolor tła kursora"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Text Selected Color"
-msgstr "Usuń zaznaczone"
+msgstr "Kolor zaznaczonego tekstu"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Selection Color"
-msgstr "Tylko zaznaczenie"
+msgstr "Kolor zaznaczenia"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Brace Mismatch Color"
-msgstr ""
+msgstr "Kolor niedopasowanych nawiasów"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Current Line Color"
-msgstr "Aktualna scena"
+msgstr "Kolor aktualnej linii"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Color"
-msgstr ""
+msgstr "Kolor prowadnicy długości linii"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Word Highlighted Color"
-msgstr "Podświetlacz składni"
+msgstr "Kolor podświetlonego słowa"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Number Color"
-msgstr ""
+msgstr "Kolor numeru"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Function Color"
-msgstr "Funkcja"
+msgstr "Kolor funkcji"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Member Variable Color"
-msgstr "Zmień nawę zmiennej"
+msgstr "Kolor zmiennej członkowskiej"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Mark Color"
-msgstr "Wybierz Kolor"
+msgstr "Kolor oznaczenia"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Bookmark Color"
-msgstr "Zakładki"
+msgstr "Kolor zakładki"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Breakpoint Color"
-msgstr "Punkty wstrzymania"
+msgstr "Kolor punktu wstrzymania"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Executing Line Color"
-msgstr ""
+msgstr "Kolor wywoływanej linii"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Code Folding Color"
-msgstr ""
+msgstr "Kolor zawinięcia kodu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Search Result Color"
-msgstr "Wyniki wyszukiwania"
+msgstr "Kolor wyniku wyszukiwania"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Search Result Border Color"
-msgstr "Wyniki wyszukiwania"
+msgstr "Kolor obramowania wyniku wyszukiwania"
#: editor/editor_spin_slider.cpp
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
@@ -6265,14 +6182,12 @@ msgstr ""
"bardziej precyzyjnych zmian."
#: editor/editor_spin_slider.cpp scene/gui/button.cpp
-#, fuzzy
msgid "Flat"
-msgstr "Płaskie 0"
+msgstr "Płaski"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hide Slider"
-msgstr "Tryb kolizji"
+msgstr "Ukryj suwak"
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
@@ -6563,7 +6478,7 @@ msgstr ""
#: editor/fileserver/editor_file_server.cpp
msgid "File Server"
-msgstr ""
+msgstr "Serwer plików"
#: editor/fileserver/editor_file_server.cpp
#: editor/plugins/version_control_editor_plugin.cpp
@@ -6936,43 +6851,40 @@ msgstr "Zarządzaj grupami"
#: editor/import/editor_import_collada.cpp
msgid "Collada"
-msgstr ""
+msgstr "Collada"
#: editor/import/editor_import_collada.cpp
msgid "Use Ambient"
-msgstr ""
+msgstr "Użyj otoczenia"
#: editor/import/resource_importer_bitmask.cpp
-#, fuzzy
msgid "Create From"
-msgstr "Utwórz katalog"
+msgstr "Utwórz z"
#: editor/import/resource_importer_bitmask.cpp
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Threshold"
-msgstr ""
+msgstr "Próg"
#: editor/import/resource_importer_csv_translation.cpp
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_scene.cpp
#: editor/import/resource_importer_texture.cpp
#: editor/import/resource_importer_wav.cpp scene/3d/gi_probe.cpp
-#, fuzzy
msgid "Compress"
-msgstr "Komponenty"
+msgstr "Skompresuj"
#: editor/import/resource_importer_csv_translation.cpp
msgid "Delimiter"
-msgstr ""
+msgstr "Separator"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "ColorCorrect"
-msgstr "Funkcja koloru."
+msgstr "ColorCorrect"
#: editor/import/resource_importer_layered_texture.cpp
msgid "No BPTC If RGB"
-msgstr ""
+msgstr "Bez BPTC jeśli RGB"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp scene/2d/cpu_particles_2d.cpp
@@ -6980,31 +6892,29 @@ msgstr ""
#: scene/resources/material.cpp scene/resources/particles_material.cpp
#: scene/resources/texture.cpp scene/resources/visual_shader.cpp
msgid "Flags"
-msgstr ""
+msgstr "Flagi"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp scene/animation/tween.cpp
#: scene/resources/texture.cpp
msgid "Repeat"
-msgstr ""
+msgstr "Powtórz"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp scene/2d/light_2d.cpp
#: scene/gui/control.cpp
-#, fuzzy
msgid "Filter"
-msgstr "Filtry:"
+msgstr "Filtr"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Mipmaps"
-msgstr "Sygnały"
+msgstr "Mipmapy"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
msgid "Anisotropic"
-msgstr ""
+msgstr "Anizotropowe"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
@@ -7012,51 +6922,43 @@ msgid "sRGB"
msgstr "sRGB"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "Slices"
-msgstr "Tnij automatycznie"
+msgstr "Kawałki"
#: editor/import/resource_importer_layered_texture.cpp
#: scene/gui/aspect_ratio_container.cpp scene/gui/control.cpp
#: scene/gui/nine_patch_rect.cpp scene/gui/scroll_container.cpp
#: scene/resources/style_box.cpp
-#, fuzzy
msgid "Horizontal"
-msgstr "Poziomo:"
+msgstr "Poziomo"
#: editor/import/resource_importer_layered_texture.cpp
#: scene/gui/aspect_ratio_container.cpp scene/gui/control.cpp
#: scene/gui/nine_patch_rect.cpp scene/gui/scroll_container.cpp
#: scene/resources/style_box.cpp
-#, fuzzy
msgid "Vertical"
-msgstr "Pionowo:"
+msgstr "Pionowo"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Generate Tangents"
-msgstr "Wygeneruj punkty"
+msgstr "Wygeneruj styczne"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Scale Mesh"
-msgstr "Tryb skalowania"
+msgstr "Skaluj siatkę"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Offset Mesh"
-msgstr "Przesunięcie:"
+msgstr "Przesuń siatkę"
#: editor/import/resource_importer_obj.cpp
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Octahedral Compression"
-msgstr "Kompresja"
+msgstr "Kompresja ośmiościenna"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Optimize Mesh Flags"
-msgstr "Rozmiar: "
+msgstr "Optymalizuj flagi siatki"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Single Scene"
@@ -7100,101 +7002,84 @@ msgstr "Importuj jako wiele scen + materiały"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Nodes"
-msgstr "Węzeł"
+msgstr "Węzły"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Type"
-msgstr "Wróć"
+msgstr "Typ korzenia"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Name"
-msgstr "Nazwa zdalnego repozytorium"
+msgstr "Nazwa korzenia"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Scale"
-msgstr "Skaluj"
+msgstr "Skala korzenia"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Custom Script"
-msgstr "NiestandardowyWęzeł"
+msgstr "Własny skrypt"
#: editor/import/resource_importer_scene.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Storage"
-msgstr "Zapisywanie pliku:"
+msgstr "Przechowywanie"
#: editor/import/resource_importer_scene.cpp
msgid "Use Legacy Names"
-msgstr ""
+msgstr "Użyj starszych nazw"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Materials"
-msgstr "Zmiany materiału:"
+msgstr "Materiały"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep On Reimport"
-msgstr "Importuj ponownie"
+msgstr "Zachowaj po reimporcie"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Meshes"
-msgstr "Siatka"
+msgstr "Siatki"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Ensure Tangents"
-msgstr "Modyfikuj styczną krzywej"
+msgstr "Zapewnij styczne"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Light Baking"
-msgstr "Lightmapping"
+msgstr "Wypalanie światła"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Lightmap Texel Size"
-msgstr "Stwórz Lightmaps"
+msgstr "Rozmiar teksela mapy światła"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
msgid "Skins"
-msgstr ""
+msgstr "Skórki"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Use Named Skins"
-msgstr "Użyj przyciągania skali"
+msgstr "Używaj nazwanych skórek"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "External Files"
-msgstr "Otwórz plik"
+msgstr "Pliki zewnętrzne"
#: editor/import/resource_importer_scene.cpp
msgid "Store In Subdir"
-msgstr ""
+msgstr "Przechowaj w podfolderze"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Filter Script"
-msgstr "Filtruj skrypty"
+msgstr "Skrypt filtra"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep Custom Tracks"
-msgstr "Przekształcanie"
+msgstr "Zachowaj własne ścieżki"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Optimizer"
-msgstr "Zoptymalizuj"
+msgstr "Optymalizator"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/item_list_editor_plugin.cpp main/main.cpp
@@ -7208,41 +7093,34 @@ msgstr "Zoptymalizuj"
#: scene/3d/sprite_3d.cpp scene/gui/graph_edit.cpp
#: scene/gui/rich_text_label.cpp scene/resources/curve.cpp
#: scene/resources/environment.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Enabled"
-msgstr "Włącz"
+msgstr "Włączony"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Linear Error"
-msgstr "Maks. błąd liniowy:"
+msgstr "Maks. błąd liniowy"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Angular Error"
-msgstr "Maks. błąd kątowy:"
+msgstr "Maks. błąd kątowy"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Angle"
-msgstr "Wartość"
+msgstr "Maksymalny kąt"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Remove Unused Tracks"
-msgstr "Usuń ścieżkę animacji"
+msgstr "Usuń nieużywane ścieżki"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Clips"
-msgstr "Klipy animacji"
+msgstr "Klipy"
#: editor/import/resource_importer_scene.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/particles_2d.cpp scene/3d/area.cpp scene/3d/cpu_particles.cpp
#: scene/3d/particles.cpp scene/resources/environment.cpp
-#, fuzzy
msgid "Amount"
-msgstr "Ilośc:"
+msgstr "Ilość"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7258,9 +7136,8 @@ msgid "Generating Lightmaps"
msgstr "Generowanie Lightmapy"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Generating for Mesh:"
-msgstr "Generowanie dla siatki: "
+msgstr "Generowanie dla siatki:"
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
@@ -7293,34 +7170,37 @@ msgid ""
"%s: Texture detected as used as a normal map in 3D. Enabling red-green "
"texture compression to reduce memory usage (blue channel is discarded)."
msgstr ""
+"%s: Tekstura wykryta jako mapa normalnych w 3D. Włączam czerwono-zieloną "
+"kompresję tekstury, by zmniejszyć zużycie pamięci (niebieski kanał jest "
+"odrzucony)."
#: editor/import/resource_importer_texture.cpp
msgid ""
"%s: Texture detected as used in 3D. Enabling filter, repeat, mipmap "
"generation and VRAM texture compression."
msgstr ""
+"%s: Tekstura wykryta jako używana w 3D. Włączam filtrowanie, powtarzanie, "
+"generację mipmap i kompresję tekstur VRAM."
#: editor/import/resource_importer_texture.cpp
msgid "2D, Detect 3D"
-msgstr ""
+msgstr "2D, wykryj 3D"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "2D Pixel"
-msgstr "Widoczne piksele"
+msgstr "2D piksel"
#: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp
msgid "Lossy Quality"
-msgstr ""
+msgstr "Stratna jakość"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "HDR Mode"
-msgstr "Tryb zaznaczenia"
+msgstr "Tryb HDR"
#: editor/import/resource_importer_texture.cpp
msgid "BPTC LDR"
-msgstr ""
+msgstr "LDR BPTC"
#: editor/import/resource_importer_texture.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/cpu_particles_2d.cpp
@@ -7330,105 +7210,94 @@ msgid "Normal Map"
msgstr "Mapa normalnych"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Process"
-msgstr "Przetwarzanie końcowe"
+msgstr "Przetwarzanie"
#: editor/import/resource_importer_texture.cpp
msgid "Fix Alpha Border"
-msgstr ""
+msgstr "Popraw obramowanie alfa"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Premult Alpha"
-msgstr "Edytuj wielokąt"
+msgstr "Wstępnie przemnóż alfę"
#: editor/import/resource_importer_texture.cpp
msgid "Hdr As Srgb"
-msgstr ""
+msgstr "HDR jako sRGB"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Invert Color"
-msgstr "Wierzchołki"
+msgstr "Odwróć kolor"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Normal Map Invert Y"
-msgstr "Losowa skala:"
+msgstr "Odwróć Y mapy normalnych"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Size Limit"
-msgstr "Limity"
+msgstr "Limit rozmiaru"
#: editor/import/resource_importer_texture.cpp
msgid "Detect 3D"
-msgstr ""
+msgstr "Wykryj 3D"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "SVG"
-msgstr "HSV"
+msgstr "SVG"
#: editor/import/resource_importer_texture.cpp
msgid ""
"Warning, no suitable PC VRAM compression enabled in Project Settings. This "
"texture will not display correctly on PC."
msgstr ""
+"Ostrzeżenie, brak ustawionej w ustawieniach projektu odpowiedniej kompresji "
+"PC VRAM. Ta tekstura nie będzie się poprawnie wyświetlać na PC."
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Atlas File"
-msgstr "Rozmiar zarysu:"
+msgstr "Plik atlasu"
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Import Mode"
-msgstr "Tryb eksportu:"
+msgstr "Tryb importu"
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Crop To Region"
-msgstr "Ustaw obszar Kafelka"
+msgstr "Przytnij do regionu"
#: editor/import/resource_importer_texture_atlas.cpp
msgid "Trim Alpha Border From Region"
-msgstr ""
+msgstr "Przytnij obramowanie alfy z regionu"
#: editor/import/resource_importer_wav.cpp scene/2d/physics_body_2d.cpp
-#, fuzzy
msgid "Force"
-msgstr "Wrzuć na siłę"
+msgstr "Siła"
#: editor/import/resource_importer_wav.cpp
msgid "8 Bit"
-msgstr ""
+msgstr "8 bitów"
#: editor/import/resource_importer_wav.cpp main/main.cpp
#: modules/mono/editor/csharp_project.cpp modules/mono/godotsharp_dirs.cpp
#: modules/mono/mono_gd/gd_mono.cpp
msgid "Mono"
-msgstr ""
+msgstr "Mono"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Max Rate"
-msgstr "Węzeł Mieszania"
+msgstr "Maksymalne tempo"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Max Rate Hz"
-msgstr "Węzeł Mieszania"
+msgstr "Maksymalne tempo Hz"
#: editor/import/resource_importer_wav.cpp
msgid "Trim"
-msgstr ""
+msgstr "Przytnij"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Normalize"
-msgstr "Format"
+msgstr "Normalizuj"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
@@ -7437,15 +7306,13 @@ msgstr "Tryb zapętlenia"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop Begin"
-msgstr "Tryb przesuwania"
+msgstr "Początek pętli"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop End"
-msgstr "Tryb przesuwania"
+msgstr "Koniec pętli"
#: editor/import_defaults_editor.cpp
msgid "Select Importer"
@@ -7523,27 +7390,24 @@ msgid "Failed to load resource."
msgstr "Nie udało się wczytać zasobu."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Property Name Style"
-msgstr "Nazwa projektu:"
+msgstr "Styl nazw właściwości"
#: editor/inspector_dock.cpp scene/gui/color_picker.cpp
msgid "Raw"
msgstr "Raw"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Capitalized"
-msgstr "Wielkie litery na początku słów"
+msgstr "Z wielkiej litery"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Localized"
-msgstr "Ustawienia regionalne"
+msgstr "Tłumaczone"
#: editor/inspector_dock.cpp
msgid "Localization not available for current language."
-msgstr ""
+msgstr "Tłumaczenie niedostępne dla aktualnego języka."
#: editor/inspector_dock.cpp
msgid "Copy Properties"
@@ -8088,9 +7952,8 @@ msgid "New"
msgstr "Nowy"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Paste As Reference"
-msgstr "Referencja klasy %s"
+msgstr "Wklej jako referencję"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Edit Transitions..."
@@ -8281,9 +8144,8 @@ msgid "Set the end animation. This is useful for sub-transitions."
msgstr "Ustaw koniec animacji. To jest przydatne dla podprzejść."
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition:"
-msgstr "Przejście: "
+msgstr "Przejście:"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Play Mode:"
@@ -8420,7 +8282,7 @@ msgstr "Filtry..."
#: editor/plugins/asset_library_editor_plugin.cpp scene/main/http_request.cpp
msgid "Use Threads"
-msgstr ""
+msgstr "Używaj wątków"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Contents:"
@@ -8548,9 +8410,8 @@ msgid "Download Error"
msgstr "Błąd pobierania"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Available URLs"
-msgstr "Dostępne profile:"
+msgstr "Dostępne URL"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
@@ -8585,25 +8446,21 @@ msgid "Loading..."
msgstr "Wczytywanie..."
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "First"
msgstr "Początek"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Previous"
msgstr "Wstecz"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Next"
msgstr "Dalej"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Last"
msgstr "Koniec"
@@ -8654,7 +8511,7 @@ msgstr "Testowanie"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed to get repository configuration."
-msgstr ""
+msgstr "Nie udało się uzyskać konfiguracji repozytorium."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
@@ -8713,7 +8570,7 @@ msgstr "Stwórz Lightmaps"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "LightMap Bake"
-msgstr ""
+msgstr "Wypal mapę światła"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Select lightmap bake file:"
@@ -9220,23 +9077,20 @@ msgid "View"
msgstr "Widok"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show"
-msgstr "Pokaż siatkę"
+msgstr "Pokaż"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show When Snapping"
-msgstr "Inteligentne przyciąganie"
+msgstr "Pokaż podczas przyciągania"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Hide"
-msgstr ""
+msgstr "Ukryj"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Grid"
-msgstr "Przełącz tryb"
+msgstr "Przełącz siatkę"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -9588,16 +9442,15 @@ msgstr "Gradient edytowany"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
msgid "Swap GradientTexture2D Fill Points"
-msgstr ""
+msgstr "Zamień punkty wypełnienia GradientTexture2D"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
msgid "Swap Gradient Fill Points"
-msgstr ""
+msgstr "Zamień punkty wypełnienia gradientu"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Grid Snap"
-msgstr "Przełącz tryb"
+msgstr "Przełącz przyciąganie do siatki"
#: editor/plugins/item_list_editor_plugin.cpp editor/project_export.cpp
#: scene/3d/label_3d.cpp scene/gui/button.cpp scene/gui/dialogs.cpp
@@ -9616,13 +9469,12 @@ msgstr "Ikona"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "ID"
-msgstr ""
+msgstr "ID"
#: editor/plugins/item_list_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Separator"
-msgstr "Separacja:"
+msgstr "Separator"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
@@ -9859,9 +9711,8 @@ msgstr ""
"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "MeshLibrary"
-msgstr "Biblioteka meshów"
+msgstr "Biblioteka siatek"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Add Item"
@@ -9884,14 +9735,12 @@ msgid "Update from Scene"
msgstr "Aktualizuj ze sceny"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Apply without Transforms"
-msgstr "Zastosuj transformacje MeshInstance"
+msgstr "Zastosuj bez transformacji"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Apply with Transforms"
-msgstr "Zastosuj transformacje MeshInstance"
+msgstr "Zastosuj z transformacjami"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
@@ -10059,9 +9908,8 @@ msgid "Volume"
msgstr "Głośność"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Source:"
-msgstr "Źródła emisji: "
+msgstr "Źródło emisji:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
@@ -10417,7 +10265,7 @@ msgstr "Synchronizuj kości z wielokątem"
#: editor/plugins/ray_cast_2d_editor_plugin.cpp
msgid "Set cast_to"
-msgstr ""
+msgstr "Ustaw cast_to"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ERROR: Couldn't load resource!"
@@ -10748,58 +10596,51 @@ msgstr "Wyniki wyszukiwania"
#: editor/plugins/script_editor_plugin.cpp
msgid "Open Dominant Script On Scene Change"
-msgstr ""
+msgstr "Otwórz dominujący skrypt przy zmianie sceny"
#: editor/plugins/script_editor_plugin.cpp
msgid "External"
-msgstr ""
+msgstr "Zewnętrzne"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Use External Editor"
-msgstr "Debugowanie z zewnętrznym edytorem"
+msgstr "Użyj zewnętrznego edytora"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Exec Path"
-msgstr "Ścieżka eksportu"
+msgstr "Ścieżka uruchomienia"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Script Temperature Enabled"
-msgstr "Wybierz plik szablonu"
+msgstr "Włącz temperaturę skryptów"
#: editor/plugins/script_editor_plugin.cpp
msgid "Highlight Current Script"
-msgstr ""
+msgstr "Podświetl aktualny skrypt"
#: editor/plugins/script_editor_plugin.cpp
msgid "Script Temperature History Size"
-msgstr ""
+msgstr "Rozmiar historii temperatury skryptów"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Current Script Background Color"
-msgstr "Kolor tła nieprawidłowy."
+msgstr "Kolor tła aktualnego skryptu"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Group Help Pages"
-msgstr "Grupuj wybrane"
+msgstr "Grupuj strony pomocy"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Sort Scripts By"
-msgstr "Utwórz Skrypt"
+msgstr "Sortuj skrypty po"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "List Script Names As"
-msgstr "Nazwa skryptu:"
+msgstr "Listuj nazwy skryptów jako"
#: editor/plugins/script_editor_plugin.cpp
msgid "Exec Flags"
-msgstr ""
+msgstr "Parametry uruchomienia"
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Scripts"
@@ -11118,7 +10959,7 @@ msgstr "Tył perspektywicznie"
msgid " [auto]"
msgstr " [auto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [portale aktywne]"
@@ -11160,15 +11001,13 @@ msgstr "Przesuń"
#. TRANSLATORS: Refers to changing the scale of a node in the 3D editor.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scaling:"
-msgstr "Skalowanie: "
+msgstr "Skalowanie:"
#. TRANSLATORS: Refers to changing the position of a node in the 3D editor.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translating:"
-msgstr "Przesuwanie: "
+msgstr "Przesuwanie:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
@@ -11316,13 +11155,14 @@ msgstr "Podgląd kinowy"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "(Not in GLES2)"
-msgstr ""
+msgstr "(Nie w GLES2)"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Debug draw modes are only available when using the GLES3 renderer, not GLES2."
-msgstr "Niedostępne dla renderera GLES2."
+msgstr ""
+"Tryby rysowania debugowego są dostępne tylko w przypadku korzystania z "
+"renderera GLES3, a nie GLES2."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Left"
@@ -11617,16 +11457,15 @@ msgstr "Po"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Size"
-msgstr ""
+msgstr "Regulacja wielkości uchwytu"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Opacity"
-msgstr ""
+msgstr "Regulacja przezroczystości uchwytu"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Show Viewport Rotation Gizmo"
-msgstr "Zablokuj obrót widoku"
+msgstr "Pokaż obrót widoku uchwytu"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unnamed Gizmo"
@@ -11678,9 +11517,8 @@ msgid "Invalid geometry, can't replace by mesh."
msgstr "Nieprawidłowa geometria, nie można zastąpić przez siatkę."
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Convert to MeshInstance2D"
-msgstr "Zamień na Mesh2D"
+msgstr "Konwertuj do MeshInstance2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
@@ -11711,19 +11549,16 @@ msgid "Sprite"
msgstr "Sprite"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Simplification:"
-msgstr "Uproszczenie: "
+msgstr "Uproszczenie:"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Shrink (Pixels):"
-msgstr "Zmniejsz (piksele): "
+msgstr "Zmniejsz (piksele):"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Grow (Pixels):"
-msgstr "Zwiększ (piksele): "
+msgstr "Zwiększ (piksele):"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Update Preview"
@@ -11786,9 +11621,8 @@ msgid "New Animation"
msgstr "Nowa animacja"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Filter animations"
-msgstr "Filtruj metody"
+msgstr "Filtruj animacje"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
@@ -12088,9 +11922,8 @@ msgstr ""
"Zamknąć tak czy inaczej?"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Type"
-msgstr "Usuń Kafelek"
+msgstr "Usuń typ"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -16481,7 +16314,7 @@ msgstr ""
#: main/main.cpp
msgid "Verbose stdout"
-msgstr ""
+msgstr "Werbalne stdout"
#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp
#, fuzzy
@@ -16500,11 +16333,11 @@ msgstr "Powiększ do zaznaczenia"
#: main/main.cpp
msgid "Low Processor Mode"
-msgstr ""
+msgstr "Tryb niskiego wykorzystania procesora"
#: main/main.cpp
msgid "Delta Sync After Draw"
-msgstr ""
+msgstr "Synchronizacja delta po wyświetlaniu"
#: main/main.cpp
msgid "iOS"
@@ -16512,7 +16345,7 @@ msgstr "iOS"
#: main/main.cpp
msgid "Hide Home Indicator"
-msgstr ""
+msgstr "Ukryj wskaźnik powitalny"
#: main/main.cpp
#, fuzzy
@@ -16526,11 +16359,11 @@ msgstr "Punkt"
#: main/main.cpp
msgid "Touch Delay"
-msgstr ""
+msgstr "Opóźnienie dotyku"
#: main/main.cpp servers/visual_server.cpp
msgid "GLES3"
-msgstr ""
+msgstr "GLES3"
#: main/main.cpp servers/visual_server.cpp
#, fuzzy
@@ -16555,43 +16388,39 @@ msgstr ""
#: main/main.cpp
msgid "Boot Splash"
-msgstr ""
+msgstr "Ekran uruchamiania"
#: main/main.cpp
-#, fuzzy
msgid "Show Image"
-msgstr "Pokaż kości"
+msgstr "Pokaż obraz"
#: main/main.cpp
msgid "Image"
-msgstr ""
+msgstr "Obraz"
#: main/main.cpp
msgid "Fullsize"
-msgstr ""
+msgstr "Pełny rozmiar"
#: main/main.cpp scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Use Filter"
-msgstr "Filtr:"
+msgstr "Użyj filtra"
#: main/main.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "BG Color"
-msgstr "Kolory"
+msgstr "Kolor tła"
#: main/main.cpp
-#, fuzzy
msgid "macOS Native Icon"
-msgstr "Ustaw ikonę Kafelka"
+msgstr "Ikona natywna macOS"
#: main/main.cpp
msgid "Windows Native Icon"
-msgstr ""
+msgstr "Ikona natywna Windows"
#: main/main.cpp
msgid "Buffering"
-msgstr ""
+msgstr "Buforowanie"
#: main/main.cpp
msgid "Agile Event Flushing"
@@ -16599,30 +16428,27 @@ msgstr ""
#: main/main.cpp
msgid "Emulate Touch From Mouse"
-msgstr ""
+msgstr "Emulacja dotyku za pomocą myszy"
#: main/main.cpp
msgid "Emulate Mouse From Touch"
-msgstr ""
+msgstr "Emulacja myszy za pomocą dotyku"
#: main/main.cpp
-#, fuzzy
msgid "Mouse Cursor"
-msgstr "Przycisk myszy"
+msgstr "Kursor myszy"
#: main/main.cpp
-#, fuzzy
msgid "Custom Image"
-msgstr "NiestandardowyWęzeł"
+msgstr "Niestandardowy obraz"
#: main/main.cpp
msgid "Custom Image Hotspot"
-msgstr ""
+msgstr "Własny punkt dostępu do obrazów"
#: main/main.cpp
-#, fuzzy
msgid "Tooltip Position Offset"
-msgstr "Offset obrotu:"
+msgstr "Przesunięcie pozycji podpowiedzi"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
#, fuzzy
@@ -16630,22 +16456,20 @@ msgid "Debugger Agent"
msgstr "Debugger"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
-#, fuzzy
msgid "Wait For Debugger"
-msgstr "Debugger"
+msgstr "Czekanie na Debuggera"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
-#, fuzzy
msgid "Wait Timeout"
-msgstr "Przekroczenie czasu."
+msgstr "Limit czasu oczekiwania"
#: main/main.cpp
msgid "Runtime"
-msgstr ""
+msgstr "Środowisko pracy"
#: main/main.cpp
msgid "Unhandled Exception Policy"
-msgstr ""
+msgstr "Polityka dotycząca wyjątków nieobsługiwanych"
#: main/main.cpp
#, fuzzy
@@ -16654,22 +16478,20 @@ msgstr "Znajdź typ węzła"
#: main/main.cpp scene/gui/texture_progress.cpp
#: scene/gui/viewport_container.cpp
-#, fuzzy
msgid "Stretch"
-msgstr "Załaduj"
+msgstr "Rozciągnij"
#: main/main.cpp
-#, fuzzy
msgid "Aspect"
-msgstr "Inspektor"
+msgstr "Aspekt"
#: main/main.cpp
msgid "Shrink"
-msgstr ""
+msgstr "Zmniejsz"
#: main/main.cpp scene/main/scene_tree.cpp
msgid "Auto Accept Quit"
-msgstr ""
+msgstr "Automatyczne akceptowanie zamknięcia"
#: main/main.cpp scene/main/scene_tree.cpp
#, fuzzy
@@ -16677,25 +16499,24 @@ msgid "Quit On Go Back"
msgstr "Wróć"
#: main/main.cpp scene/main/viewport.cpp
-#, fuzzy
msgid "Snap Controls To Pixels"
-msgstr "Przyciągaj do boków węzła"
+msgstr "Przymocuj elementy sterujące do pikseli"
#: main/main.cpp
msgid "Dynamic Fonts"
-msgstr ""
+msgstr "Czcionki dynamiczne"
#: main/main.cpp
msgid "Use Oversampling"
-msgstr ""
+msgstr "Zastosuj nadpróbkowanie"
#: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp
msgid "Active Soft World"
-msgstr ""
+msgstr "Aktywuj wsparcie SoftBody World"
#: modules/csg/csg_gizmos.cpp
msgid "CSG"
-msgstr ""
+msgstr "CSG"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -16714,30 +16535,26 @@ msgid "Change Torus Outer Radius"
msgstr "Zmień zewnętrzny promień torusa"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Operation"
-msgstr "Opcje"
+msgstr "Operacja"
#: modules/csg/csg_shape.cpp
msgid "Calculate Tangents"
-msgstr ""
+msgstr "Oblicz styczne"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Use Collision"
-msgstr "Kolizja"
+msgstr "Użyj kolizji"
#: modules/csg/csg_shape.cpp servers/physics_2d_server.cpp
-#, fuzzy
msgid "Collision Layer"
-msgstr "Tryb kolizji"
+msgstr "Warstwa kolizji"
#: modules/csg/csg_shape.cpp scene/2d/ray_cast_2d.cpp scene/3d/camera.cpp
#: scene/3d/ray_cast.cpp scene/3d/spring_arm.cpp
#: scene/resources/navigation_mesh.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Collision Mask"
-msgstr "Tryb kolizji"
+msgstr "Maska kolizji"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -16752,9 +16569,8 @@ msgstr "Zmień wielkość liter"
#: scene/resources/cylinder_shape.cpp scene/resources/environment.cpp
#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp
#: scene/resources/sphere_shape.cpp
-#, fuzzy
msgid "Radius"
-msgstr "Promień:"
+msgstr "Promień"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -16762,33 +16578,28 @@ msgid "Radial Segments"
msgstr "Argumenty głównej sceny:"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Rings"
-msgstr "Ostrzeżenia"
+msgstr "Pierścienie"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Smooth Faces"
-msgstr "Płynny Krok"
+msgstr "Gładkie twarze"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Sides"
-msgstr "Pokaż prowadnice"
+msgstr "Boki"
#: modules/csg/csg_shape.cpp
msgid "Cone"
-msgstr ""
+msgstr "Stożek"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Inner Radius"
-msgstr "Zmień wewnętrzny promień torusa"
+msgstr "Promień wewnętrzny"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Outer Radius"
-msgstr "Zmień zewnętrzny promień torusa"
+msgstr "promień zewnętrzny"
#: modules/csg/csg_shape.cpp
msgid "Ring Sides"
@@ -16797,7 +16608,6 @@ msgstr ""
#: modules/csg/csg_shape.cpp scene/2d/collision_polygon_2d.cpp
#: scene/2d/light_occluder_2d.cpp scene/2d/polygon_2d.cpp
#: scene/3d/collision_polygon.cpp
-#, fuzzy
msgid "Polygon"
msgstr "Wielokąt"
@@ -16810,9 +16620,8 @@ msgid "Spin Sides"
msgstr ""
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Node"
-msgstr "Wklej węzły"
+msgstr "Ścieżka węzła"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -16821,21 +16630,19 @@ msgstr "Utwórz wewnętrzny wierzchołek"
#: modules/csg/csg_shape.cpp
msgid "Path Interval"
-msgstr ""
+msgstr "Odstęp między ścieżkami"
#: modules/csg/csg_shape.cpp
msgid "Path Simplify Angle"
msgstr ""
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Rotation"
-msgstr "Obrót losowy:"
+msgstr "Obrót ścieżki"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Local"
-msgstr "Uczyń lokalnym"
+msgstr "Ścieżka lokalna"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -17046,7 +16853,7 @@ msgstr "Nie bazuje na pliku zasobów"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (missing @path)"
-msgstr "Niepoprawna instancja formatu słownika (brakujący @path)"
+msgstr "Niepoprawna instancja formatu słownika (brakuje @path)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (can't load script at @path)"
@@ -17059,7 +16866,7 @@ msgstr "Niepoprawna instancja formatu słownika (niepoprawny skrypt w @path)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary (invalid subclasses)"
-msgstr "Niepoprawna instancja słownika (niepoprawne podklasy)"
+msgstr "Niepoprawny słownik instancji (niepoprawne podklasy)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Object can't provide a length."
@@ -17288,27 +17095,27 @@ msgstr "Przesuń złącze"
#: modules/gltf/gltf_skin.cpp
msgid "Joint I To Bone I"
-msgstr ""
+msgstr "Staw I do kości I"
#: modules/gltf/gltf_skin.cpp
msgid "Joint I To Name"
-msgstr ""
+msgstr "Staw I do nazwy"
#: modules/gltf/gltf_skin.cpp
msgid "Godot Skin"
-msgstr ""
+msgstr "Skórka Godot"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Diffuse Img"
-msgstr ""
+msgstr "Rozmycie obrazu"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Diffuse Factor"
-msgstr ""
+msgstr "Współczynnik rozmycia"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Gloss Factor"
-msgstr ""
+msgstr "Współczynnik połysku"
#: modules/gltf/gltf_spec_gloss.cpp
#, fuzzy
@@ -17391,19 +17198,16 @@ msgid "Skeletons"
msgstr "Szkielet"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Skeleton To Node"
-msgstr "Wybierz węzeł"
+msgstr "Szkielet do węzła"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Animations"
-msgstr "Animacje:"
+msgstr "Animacje"
#: modules/gltf/gltf_texture.cpp
-#, fuzzy
msgid "Src Image"
-msgstr "Pokaż kości"
+msgstr "Obraz źródłowy"
#: modules/gridmap/grid_map.cpp
msgid "Mesh Library"
@@ -17421,33 +17225,29 @@ msgstr "Stwórz Lightmaps"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Cell"
-msgstr ""
+msgstr "Komórka"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Octant Size"
-msgstr "Widok z przodu"
+msgstr "Wielkość oktantu"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center X"
-msgstr "Wyśrodkowane"
+msgstr "Wyśrodkowanie X"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center Y"
-msgstr "Wyśrodkowane"
+msgstr "Wyśrodkowanie Y"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center Z"
-msgstr "Wyśrodkowane"
+msgstr "Wyśrodkowanie Z"
#: modules/gridmap/grid_map.cpp scene/2d/collision_object_2d.cpp
#: scene/2d/tile_map.cpp scene/3d/collision_object.cpp scene/3d/soft_body.cpp
#: scene/resources/material.cpp
msgid "Mask"
-msgstr ""
+msgstr "Maska"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
#, fuzzy
@@ -17458,9 +17258,8 @@ msgstr "Nawigacja"
#: scene/2d/navigation_agent_2d.cpp scene/2d/navigation_polygon.cpp
#: scene/2d/tile_map.cpp scene/3d/navigation.cpp scene/3d/navigation_agent.cpp
#: scene/3d/navigation_mesh_instance.cpp
-#, fuzzy
msgid "Navigation Layers"
-msgstr "Tryb nawigacji"
+msgstr "Warstwy nawigacji"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -17620,9 +17419,8 @@ msgid "Plotting lightmaps"
msgstr "Kreślenie map światła"
#: modules/lightmapper_cpu/register_types.cpp
-#, fuzzy
msgid "CPU Lightmapper"
-msgstr "Stwórz Lightmaps"
+msgstr "Mapper światła CPU"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Low Quality Ray Count"
@@ -17644,22 +17442,20 @@ msgstr ""
#: modules/minimp3/resource_importer_mp3.cpp
#: modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
#: modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
-#, fuzzy
msgid "Loop Offset"
-msgstr "Przesunięcie:"
+msgstr "Przesunięcie pętli"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Eye Height"
-msgstr ""
+msgstr "Wysokość oczu"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "IOD"
-msgstr ""
+msgstr "IOD"
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "Display Width"
-msgstr "Widok siatki"
+msgstr "Szerokość wyświetlacza"
#: modules/mobile_vr/mobile_vr_interface.cpp
#, fuzzy
@@ -17668,15 +17464,15 @@ msgstr "Widok bezcieniowy"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Oversample"
-msgstr ""
+msgstr "Nadpróbkowanie"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "K1"
-msgstr ""
+msgstr "K1"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "K2"
-msgstr ""
+msgstr "K2"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -17687,14 +17483,12 @@ msgid "Build Solution"
msgstr "Zbuduj rozwiązanie"
#: modules/mono/editor/csharp_project.cpp
-#, fuzzy
msgid "Auto Update Project"
-msgstr "Projekt bez nazwy"
+msgstr "Automatyczna aktualizacja projektu"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Assembly Name"
-msgstr "Pokaż wszystko"
+msgstr "Nazwa zespołu"
#: modules/mono/godotsharp_dirs.cpp
#, fuzzy
@@ -17702,9 +17496,8 @@ msgid "Solution Directory"
msgstr "Wybierz katalog"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "C# Project Directory"
-msgstr "Wybierz katalog"
+msgstr "Katalog projektów C#"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
@@ -17775,42 +17568,39 @@ msgstr "Parsowanie Geometrii..."
#: modules/navigation/navigation_mesh_generator.cpp
msgid "Done!"
-msgstr "Skończone!"
+msgstr "Gotowe!"
#: modules/opensimplex/noise_texture.cpp
msgid "Seamless"
msgstr ""
#: modules/opensimplex/noise_texture.cpp
-#, fuzzy
msgid "As Normal Map"
-msgstr "Losowa skala:"
+msgstr "Jako normalna mapa"
#: modules/opensimplex/noise_texture.cpp
msgid "Bump Strength"
-msgstr ""
+msgstr "Siła uderzenia"
#: modules/opensimplex/noise_texture.cpp
msgid "Noise"
-msgstr ""
+msgstr "Szum"
#: modules/opensimplex/noise_texture.cpp
-#, fuzzy
msgid "Noise Offset"
-msgstr "Offset siatki:"
+msgstr "Redukcja szumów"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Octaves"
-msgstr ""
+msgstr "Oktawy"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Period"
-msgstr ""
+msgstr "Okres"
#: modules/opensimplex/open_simplex_noise.cpp
-#, fuzzy
msgid "Persistence"
-msgstr "Perspektywa"
+msgstr "Trwałość"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Lacunarity"
@@ -17821,14 +17611,12 @@ msgid "Subject"
msgstr ""
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Names"
-msgstr "Nazwa"
+msgstr "Nazwy"
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Strings"
-msgstr "Ustawienia:"
+msgstr "Ciągi tekstowe"
#: modules/upnp/upnp.cpp
msgid "Discover Multicast If"
@@ -17901,7 +17689,9 @@ msgstr "Węzeł zwrócił niewłaściwą sekwencję wyjściową: "
#: modules/visual_script/visual_script.cpp
msgid "Found sequence bit but not the node in the stack, report bug!"
-msgstr "Znaleziono bit sekwencji, ale nie węzeł na stosie, zgłoś błąd!"
+msgstr ""
+"Nie znaleziono węzła w stosie, choć znaleziono ciąg bitów. Powiadom o "
+"błędzie!"
#: modules/visual_script/visual_script.cpp
#, fuzzy
@@ -18031,7 +17821,7 @@ msgstr "Wklej węzeł VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
-msgstr "Usuwanie węzłów VisualScript"
+msgstr "Usuń węzły VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Duplicate VisualScript Nodes"
@@ -18088,7 +17878,7 @@ msgstr ""
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Getter Property"
-msgstr "Dodaj właściwość Gettera"
+msgstr "Dodaj właściwość Getter"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Setter Property"
@@ -19165,14 +18955,12 @@ msgid "Code Signing"
msgstr "DMG podpisywania kodu"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"'apksigner' could not be found. Please check that the command is available "
"in the Android SDK build-tools directory. The resulting %s is unsigned."
msgstr ""
-"\"apksigner\" nie został znaleziony.\n"
-"Sprawdź, czy komenda jest dostępna w folderze narzędzi SDK Androida.\n"
-"Wynikowy %s jest niepodpisany."
+"\"apksigner\" nie został znaleziony. Sprawdź, czy komenda jest dostępna w "
+"folderze narzędzi SDK Androida. Wynikowy %s jest niepodpisany."
#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
@@ -19233,15 +19021,12 @@ msgstr ""
"informacja o wersji. Zainstaluj ponownie z menu \"Projekt\"."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"Android build version mismatch: Template installed: %s, Godot version: %s. "
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-"Niezgodna wersja buildu Androida:\n"
-" Zainstalowany szablon: %s\n"
-" Wersja Godota: %s\n"
-"Zainstaluj ponownie szablon z menu \"Projekt\"."
+"Niezgodna wersja buildu Androida: Zainstalowany szablon: %s Wersja Godota: "
+"%s. Zainstaluj ponownie szablon z menu \"Projekt\"."
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -19264,13 +19049,12 @@ msgid "Building Android Project (gradle)"
msgstr "Budowanie projektu Androida (gradle)"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"Building of Android project failed, check output for the error. "
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-"Budowanie projektu Androida się nie powiodło, sprawdź wyjście błędu.\n"
-"Alternatywnie, odwiedź docs.godotengine.org po dokumentację budowania dla "
+"Budowanie projektu Androida się nie powiodło, sprawdź dane wyjściowe błędu. "
+"Ewentualnie, odwiedź docs.godotengine.org po dokumentację budowania dla "
"Androida."
#: platform/android/export/export_plugin.cpp
@@ -19295,20 +19079,16 @@ msgid "Creating APK..."
msgstr "Tworzenie APK..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not find template APK to export: \"%s\"."
-msgstr ""
-"Nie udało się znaleźć szablonu APK do eksportu:\n"
-"%s"
+msgstr "Nie udało się znaleźć szablonu APK do eksportu: \"%s\"."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"Missing libraries in the export template for the selected architectures: %s. "
"Please build a template with all required libraries, or uncheck the missing "
"architectures in the export preset."
msgstr ""
-"Brakujące biblioteki w szablonie eksportu dla wybranej architektury: %s.\n"
+"Brakujące biblioteki w szablonie eksportu dla wybranej architektury: %s. "
"Zbuduj szablon ze wszystkimi wymaganymi bibliotekami lub odznacz brakujące "
"architektury w profilu eksportu."
@@ -21873,8 +21653,8 @@ msgid ""
"A material to process the particles is not assigned, so no behavior is "
"imprinted."
msgstr ""
-"Nie przypisano materiału do przetwarzania cząsteczek, więc zmiany nie będą "
-"widoczne."
+"Materiał nie jest przypisany do cząsteczek, więc ich zachowanie będzie "
+"niewidoczne."
#: scene/2d/particles_2d.cpp
msgid ""
@@ -22041,9 +21821,8 @@ msgid "Safe Margin"
msgstr "Ustaw margines"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Sync To Physics"
-msgstr " (fizyczny)"
+msgstr "Synchronizuj z fizyką"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -23067,7 +22846,8 @@ msgstr ""
msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
-"Nic nie jest widoczne, bo siatki nie zostały przypisane do kolejki rysowania."
+"Nic nie jest widoczne ponieważ siatki nie zostały przydzielone do przebiegów "
+"wyświetlających."
#: scene/3d/particles.cpp
msgid ""
@@ -26857,7 +26637,7 @@ msgstr "Debug kanału UV"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "Rozmazanie"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -27983,9 +27763,8 @@ msgstr ""
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_phaser.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
-#, fuzzy
msgid "Feedback"
-msgstr "Oceń dokumentację"
+msgstr "Informacja zwrotna"
#: servers/audio/effects/audio_effect_delay.cpp
#, fuzzy
@@ -27994,7 +27773,7 @@ msgstr "Omiń"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Pre Gain"
-msgstr ""
+msgstr "Wstępne wzmocnienie"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Keep Hf Hz"
@@ -28010,17 +27789,16 @@ msgid "Post Gain"
msgstr "Po"
#: servers/audio/effects/audio_effect_filter.cpp
-#, fuzzy
msgid "Resonance"
-msgstr "Zasoby"
+msgstr "Rezonans"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Ceiling dB"
-msgstr ""
+msgstr "Sufit dB"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Threshold dB"
-msgstr ""
+msgstr "Wartość progowa dB"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Soft Clip dB"
@@ -28462,13 +28240,12 @@ msgid "Legacy Stream"
msgstr ""
#: servers/visual_server.cpp
-#, fuzzy
msgid "Batching"
-msgstr "Wyszukiwanie..."
+msgstr "Tworzenie pakietów wsadowych"
#: servers/visual_server.cpp
msgid "Use Batching"
-msgstr ""
+msgstr "Użyj przetwarzania wsadowego"
#: servers/visual_server.cpp
#, fuzzy
@@ -28581,9 +28358,8 @@ msgid "Max Active Polygons"
msgstr "Przesuń Wielokąt"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Shader Compilation Mode"
-msgstr "Sposób interpolacji"
+msgstr "Sposób kompilacji shader'ów"
#: servers/visual_server.cpp
msgid "Max Simultaneous Compiles"
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index 45bbc8daf0..9b150194df 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -11039,7 +11039,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/pt.po b/editor/translations/pt.po
index 85814ded34..0fcc083b42 100644
--- a/editor/translations/pt.po
+++ b/editor/translations/pt.po
@@ -13,7 +13,7 @@
# Rueben Stevens <supercell03@gmail.com>, 2017.
# SARDON <fabio3_Santos@hotmail.com>, 2017.
# Vinicius Gonçalves <viniciusgoncalves21@gmail.com>, 2017.
-# ssantos <ssantos@web.de>, 2018, 2019, 2020, 2021, 2022.
+# ssantos <ssantos@web.de>, 2018, 2019, 2020, 2021, 2022, 2023.
# Gonçalo Dinis Guerreiro João <goncalojoao205@gmail.com>, 2019.
# Manuela Silva <mmsrs@sky.com>, 2020.
# Murilo Gama <murilovsky2030@gmail.com>, 2020, 2022.
@@ -31,12 +31,13 @@
# Tuily <brizolla.tuily@gmail.com>, 2022.
# Thuany <thutymsoares@gmail.com>, 2022.
# Isaque Mendes <isaquemendes405@gmail.com>, 2022.
+# Alex Bruno Boiniak <aboiniak@gmail.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-11-19 08:35+0000\n"
+"PO-Revision-Date: 2023-01-11 19:51+0000\n"
"Last-Translator: ssantos <ssantos@web.de>\n"
"Language-Team: Portuguese <https://hosted.weblate.org/projects/godot-engine/"
"godot/pt/>\n"
@@ -45,7 +46,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -183,7 +184,7 @@ msgstr "Erro"
#: core/bind/core_bind.cpp
msgid "Error String"
-msgstr "Erro String"
+msgstr "Cadeia de caracteres de erro"
#: core/bind/core_bind.cpp
msgid "Error Line"
@@ -383,7 +384,7 @@ msgstr "Tamanho Máximo (KB)"
#: core/os/input.cpp
msgid "Mouse Mode"
-msgstr "Modo Mouse"
+msgstr "Modo do Rato"
#: core/os/input.cpp
msgid "Use Accumulated Input"
@@ -4332,7 +4333,7 @@ msgstr "Restaurar Cenas quando carregar"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Show Thumbnail On Hover"
-msgstr "Mostrar Miniatura ao Passar o Mouse Por Cima"
+msgstr "Mostrar Miniatura ao Passar o Rato Por Cima"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Inspector"
@@ -5479,7 +5480,7 @@ msgstr "Largura do Minimapa"
#: editor/editor_settings.cpp
msgid "Mouse Extra Buttons Navigate History"
-msgstr "Botões extra do Mouse para Navegar no Histórico"
+msgstr "Botões extra do Rato para Navegar no Histórico"
#: editor/editor_settings.cpp
msgid "Drag And Drop Selection"
@@ -5773,7 +5774,7 @@ msgstr "Emular Teclado Numérico"
#: editor/editor_settings.cpp
msgid "Emulate 3 Button Mouse"
-msgstr "Emular Mouse de 3 Botões"
+msgstr "Emular Rato de 3 Botões"
#: editor/editor_settings.cpp
msgid "Orbit Modifier"
@@ -5789,7 +5790,7 @@ msgstr "Modificador de Zoom"
#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Warped Mouse Panning"
-msgstr "Panorama do Mouse Distorcido"
+msgstr "Panorama do Rato Distorcido"
#: editor/editor_settings.cpp
msgid "Navigation Feel"
@@ -6037,7 +6038,7 @@ msgstr "Cor do Comentário"
#: editor/editor_settings.cpp
msgid "String Color"
-msgstr "Cor da String"
+msgstr "Cor da cadeia de caracteres"
#: editor/editor_settings.cpp platform/javascript/export/export.cpp
#: platform/uwp/export/export.cpp
@@ -6887,9 +6888,8 @@ msgstr "Filtro"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Mipmaps"
-msgstr "Sinais"
+msgstr "Mipmaps"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
@@ -10925,7 +10925,7 @@ msgstr "Perspetiva Traseira"
msgid " [auto]"
msgstr " [auto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [portais ativos]"
@@ -14176,17 +14176,15 @@ msgid "Invalid project path (changed anything?)."
msgstr "Caminho de projeto inválido (alguma alteração?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
-"Não consegui carregar o project.godot no caminho do projeto (erro %d). "
-"Poderá estar em falta ou corrompido."
+"Não pode carregar o projeto em '%s' (error %d). Pode estar sumido ou "
+"corrompido."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't save project at '%s' (error %d)."
-msgstr "Incapaz de abrir projeto em '%s'."
+msgstr "Incapaz de salvar projeto em '%s' (error %d)."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -16187,7 +16185,7 @@ msgstr "Interface Gráfica"
#: main/main.cpp
msgid "Drop Mouse On GUI Input Disabled"
-msgstr "Desabilitar Soltar o Mouse na Entrada da Interface Gráfica"
+msgstr "Desabilitar Soltar o Rato na Entrada da Interface Gráfica"
#: main/main.cpp
msgid "stdout"
@@ -16305,15 +16303,15 @@ msgstr "Liberação Ágil de Eventos"
#: main/main.cpp
msgid "Emulate Touch From Mouse"
-msgstr "Emular Toque do Mouse"
+msgstr "Emular Toque do Rato"
#: main/main.cpp
msgid "Emulate Mouse From Touch"
-msgstr "Emular o Mouse do Toque"
+msgstr "Emular o Rato do Toque"
#: main/main.cpp
msgid "Mouse Cursor"
-msgstr "Cursor do Mouse"
+msgstr "Cursor do Rato"
#: main/main.cpp
msgid "Custom Image"
@@ -16516,9 +16514,8 @@ msgid "Path Local"
msgstr "Caminho Local"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Continuous U"
-msgstr "Contínuo"
+msgstr "Caminho Contínuo U"
#: modules/csg/csg_shape.cpp
msgid "Path U Distance"
@@ -16578,9 +16575,8 @@ msgstr "Carregar Apenas uma Vez"
#: modules/gdnative/gdnative.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Singleton"
-msgstr "Esqueleto"
+msgstr "Singleton"
#: modules/gdnative/gdnative.cpp
msgid "Symbol Prefix"
@@ -17426,7 +17422,7 @@ msgstr "Nomes"
#: modules/regex/regex.cpp
msgid "Strings"
-msgstr "Strings"
+msgstr "Cadeias"
#: modules/upnp/upnp.cpp
msgid "Discover Multicast If"
@@ -18436,9 +18432,8 @@ msgid "XR Mode"
msgstr "Modo XR"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Hand Tracking"
-msgstr "Empacotamento"
+msgstr "Rastreamento das Mãos"
#: platform/android/export/export_plugin.cpp
msgid "Hand Tracking Frequency"
@@ -18923,9 +18918,8 @@ msgid "Code Sign Identity Debug"
msgstr "Depuração de Identidade de Sinal de Código"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Method Debug"
-msgstr "Exportar com Depuração"
+msgstr "Exportar Método Depuração"
#: platform/iphone/export/export.cpp
msgid "Provisioning Profile UUID Release"
@@ -19001,9 +18995,8 @@ msgid "Microphone Usage Description"
msgstr "Descrição do Uso do Microfone"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Photolibrary Usage Description"
-msgstr "Descrições da Propriedade"
+msgstr "Descrição de Uso da Fotobiblioteca"
#: platform/iphone/export/export.cpp
msgid "iPhone 120 X 120"
@@ -19050,14 +19043,12 @@ msgid "Image Scale Mode"
msgstr "Modo de Escalonamento de Imagem"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom Image @2x"
-msgstr "CustomNode"
+msgstr "Personalizar Imagem @2x"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom Image @3x"
-msgstr "CustomNode"
+msgstr "Personalizar Imagem @3x"
#: platform/iphone/export/export.cpp
msgid "Use Custom BG Color"
@@ -19154,9 +19145,8 @@ msgid "Export Icon"
msgstr "Exportar Ícone"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Custom HTML Shell"
-msgstr "CustomNode"
+msgstr "HTML Shell Personalizado"
#: platform/javascript/export/export.cpp
msgid "Head Include"
@@ -23759,7 +23749,7 @@ msgstr "Anterior"
#: scene/gui/control.cpp
msgid "Mouse"
-msgstr "Mouse"
+msgstr "Rato"
#: scene/gui/control.cpp
msgid "Default Cursor Shape"
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index 8e574f992d..eb7b2ffde0 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -20,7 +20,7 @@
# MalcomRF <malcomkbk@gmail.com>, 2017.
# Marcus Correia <marknokalt@live.com>, 2017-2018.
# Michael Alexsander Silva Dias <michaelalexsander@protonmail.com>, 2017-2018.
-# Renato Rotenberg <renato.rotenberg@gmail.com>, 2017, 2019, 2021.
+# Renato Rotenberg <renato.rotenberg@gmail.com>, 2017, 2019, 2021, 2023.
# Rodolfo R Gomes <rodolforg@gmail.com>, 2017-2018, 2019.
# Tiago Almeida <thyagoeap@gmail.com>, 2017.
# Mauricio Luan Carneiro deSouza <newmailmlcs@gmail.com>, 2018.
@@ -156,13 +156,14 @@
# Murilo Gama <murilovsky2030@gmail.com>, 2022.
# Kauã Azevedo <Kazevic@pm.me>, 2022.
# Zer0-Zer0 <dankmemerson@tutanota.com>, 2022.
+# Levi Ferreira <leviferreiramorais@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: 2016-05-30\n"
-"PO-Revision-Date: 2022-12-10 02:13+0000\n"
-"Last-Translator: Julio Yagami <juliohenrique31501234@hotmail.com>\n"
+"PO-Revision-Date: 2023-01-14 00:01+0000\n"
+"Last-Translator: Levi Ferreira <leviferreiramorais@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_BR/>\n"
"Language: pt_BR\n"
@@ -170,7 +171,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -11075,7 +11076,7 @@ msgstr "Perspectiva Traseira"
msgid " [auto]"
msgstr " [automático]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [portais ativados]"
@@ -14331,17 +14332,15 @@ msgid "Invalid project path (changed anything?)."
msgstr "Caminho de projeto inválido (mudou alguma coisa?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
-"Não foi possível carregar project.godot no caminho do projeto (erro %d). Ele "
-"pode estar ausente ou corrompido."
+"Não foi possível carregar project.godot em '%s' (erro %d). Ele pode estar "
+"ausente ou corrompido."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't save project at '%s' (error %d)."
-msgstr "Não é possível abrir o projeto em '%s'."
+msgstr "Não foi possível salvar o projeto em '%s' (erro %d)."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -16200,9 +16199,8 @@ msgid "Multithreaded Server"
msgstr "Servidor com Multi-Thread"
#: main/main.cpp
-#, fuzzy
msgid "RID Pool Prealloc"
-msgstr "Pre-alocação de Pool RID"
+msgstr "Pool de Prealocação de RID"
#: main/main.cpp
msgid "Debugger stdout"
@@ -16310,7 +16308,7 @@ msgstr "Modelo de Thread"
#: main/main.cpp
msgid "Thread Safe BVH"
-msgstr ""
+msgstr "Thread Segura de BVH"
#: main/main.cpp
msgid "Handheld"
@@ -16675,9 +16673,8 @@ msgid "Path Local"
msgstr "Caminho Local"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Continuous U"
-msgstr "Caminho Contínuo"
+msgstr "Caminho Continuo U"
#: modules/csg/csg_shape.cpp
msgid "Path U Distance"
@@ -16943,11 +16940,11 @@ msgstr "Contagem Escassa"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Buffer View"
-msgstr ""
+msgstr "Visualização de Buffer dos Indices Esparsos"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Byte Offset"
-msgstr ""
+msgstr "Deslocação de Byte dos Índices Esparsos"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Component Type"
@@ -16955,11 +16952,11 @@ msgstr "Tipo de Componente de Índices Esparsos"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Values Buffer View"
-msgstr ""
+msgstr "Visualização de Buffer dos Valores Esparsos"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Values Byte Offset"
-msgstr ""
+msgstr "Deslocação de Byte dos Valores Esparsos"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Buffer"
@@ -16971,7 +16968,7 @@ msgstr "Largura do byte"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Byte Stride"
-msgstr ""
+msgstr "Separação dos Bytes"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Indices"
@@ -17031,11 +17028,11 @@ msgstr "Pai"
#: modules/gltf/gltf_node.cpp
msgid "Xform"
-msgstr ""
+msgstr "Xform"
#: modules/gltf/gltf_node.cpp scene/3d/mesh_instance.cpp
msgid "Skin"
-msgstr ""
+msgstr "Pele"
#: modules/gltf/gltf_node.cpp scene/3d/spatial.cpp
msgid "Translation"
@@ -17107,11 +17104,11 @@ msgstr "Fator Especular"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Spec Gloss Img"
-msgstr ""
+msgstr "Imagem Especular Lustrosa"
#: modules/gltf/gltf_state.cpp
msgid "Json"
-msgstr ""
+msgstr "Json"
#: modules/gltf/gltf_state.cpp
msgid "Major Version"
@@ -17127,7 +17124,7 @@ msgstr "Dados do GLB"
#: modules/gltf/gltf_state.cpp
msgid "Use Named Skin Binds"
-msgstr ""
+msgstr "Usar Associações de Pele com nome"
#: modules/gltf/gltf_state.cpp
msgid "Buffer Views"
@@ -17432,15 +17429,15 @@ msgstr "Exibir para as Lentes"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Oversample"
-msgstr ""
+msgstr "Amostragem em excesso"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "K1"
-msgstr ""
+msgstr "K1"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "K2"
-msgstr ""
+msgstr "K2"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -18019,7 +18016,7 @@ msgstr "Iterador"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "for (elem) in (input):"
-msgstr ""
+msgstr "for (elem) in (input):"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Input type not iterable:"
@@ -18191,7 +18188,7 @@ msgstr "Argumentos inválidos:"
#: modules/visual_script/visual_script_nodes.cpp
msgid "a if cond, else b"
-msgstr ""
+msgstr "a se cond, se não b"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Var Name"
@@ -18247,11 +18244,11 @@ msgstr "Obter Árvore de Cenas"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Get Self"
-msgstr "Obter Sí Mesmo"
+msgstr "Obter Si Mesmo"
#: modules/visual_script/visual_script_nodes.cpp
msgid "CustomNode"
-msgstr ""
+msgstr "Nó Personalizado"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
@@ -18269,7 +18266,7 @@ msgstr ""
#: modules/visual_script/visual_script_nodes.cpp
msgid "SubCall"
-msgstr ""
+msgstr "Sub-Chamada"
#: modules/visual_script/visual_script_nodes.cpp scene/gui/graph_node.cpp
msgid "Title"
@@ -18301,11 +18298,11 @@ msgstr "Buscar VisualScript"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "Yield"
-msgstr ""
+msgstr "Aguardar Retorno"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "Wait"
-msgstr ""
+msgstr "Esperar"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "Next Frame"
@@ -18325,7 +18322,7 @@ msgstr "Tempo de Espera"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "WaitSignal"
-msgstr ""
+msgstr "EsperarSinal"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "WaitNodeSignal"
@@ -18341,7 +18338,7 @@ msgstr "Modo de Escrita"
#: modules/webrtc/webrtc_data_channel.h
msgid "WebRTC"
-msgstr ""
+msgstr "WebRTC"
#: modules/webrtc/webrtc_data_channel.h
msgid "Max Channel In Buffer (KB)"
@@ -18381,7 +18378,7 @@ msgstr "Servidor WebSocket"
#: modules/websocket/websocket_server.cpp
msgid "Bind IP"
-msgstr ""
+msgstr "Atrelar IP"
#: modules/websocket/websocket_server.cpp
msgid "Private Key"
@@ -18441,11 +18438,11 @@ msgstr "Depurar Keystore"
#: platform/android/export/export.cpp
msgid "Debug Keystore User"
-msgstr ""
+msgstr "Usuário da Keystore de Depuração"
#: platform/android/export/export.cpp
msgid "Debug Keystore Pass"
-msgstr ""
+msgstr "Senha da Keystore de Depuração"
#: platform/android/export/export.cpp
msgid "Force System User"
@@ -19033,43 +19030,43 @@ msgstr "Telas de Inicialização de Paisagem"
#: platform/iphone/export/export.cpp
msgid "iPhone 2436 X 1125"
-msgstr "IPhone 2436 X 1125"
+msgstr "iPhone 2436 X 1125"
#: platform/iphone/export/export.cpp
msgid "iPhone 2208 X 1242"
-msgstr ""
+msgstr "iPhone 2208 X 1242"
#: platform/iphone/export/export.cpp
msgid "iPad 1024 X 768"
-msgstr ""
+msgstr "iPad 1024 X 768"
#: platform/iphone/export/export.cpp
msgid "iPad 2048 X 1536"
-msgstr ""
+msgstr "iPad 2048 X 1536"
#: platform/iphone/export/export.cpp
msgid "Portrait Launch Screens"
-msgstr ""
+msgstr "Tela de Apresentação em Retrato"
#: platform/iphone/export/export.cpp
msgid "iPhone 640 X 960"
-msgstr ""
+msgstr "iPhone 640 X 960"
#: platform/iphone/export/export.cpp
msgid "iPhone 640 X 1136"
-msgstr ""
+msgstr "iPhone 640 X 1136"
#: platform/iphone/export/export.cpp
msgid "iPhone 750 X 1334"
-msgstr ""
+msgstr "iPhone 750 X 1334"
#: platform/iphone/export/export.cpp
msgid "iPhone 1125 X 2436"
-msgstr ""
+msgstr "iPhone 1125 X 2436"
#: platform/iphone/export/export.cpp
msgid "iPad 768 X 1024"
-msgstr ""
+msgstr "iPad 768 X 1024"
#: platform/iphone/export/export.cpp
msgid "iPad 1536 X 2048"
diff --git a/editor/translations/ro.po b/editor/translations/ro.po
index 906d6aee71..9e2d8b5c96 100644
--- a/editor/translations/ro.po
+++ b/editor/translations/ro.po
@@ -20,13 +20,15 @@
# Psynt <nichita@cadvegra.com>, 2022.
# Ilie Adrian Avramescu <himark1977@protonmail.com>, 2022.
# Andres Ene <grassiscomplex420@gmail.com>, 2022.
+# Claudiu Ceia <claudiu.ceia@gmail.com>, 2022.
+# Random Videos <istudordanadenis@gmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-11-22 20:37+0000\n"
-"Last-Translator: Andres Ene <grassiscomplex420@gmail.com>\n"
+"PO-Revision-Date: 2023-01-13 03:04+0000\n"
+"Last-Translator: Random Videos <istudordanadenis@gmail.com>\n"
"Language-Team: Romanian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ro/>\n"
"Language: ro\n"
@@ -35,7 +37,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
"20)) ? 1 : 2;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -66,9 +68,8 @@ msgid "Delta Smoothing"
msgstr "Netezirea Delta"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Low Processor Usage Mode"
-msgstr "Mod Mutare"
+msgstr "Mod utilizare redusă a procesorului"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode Sleep (µsec)"
@@ -225,18 +226,16 @@ msgstr "Date"
#: modules/gdscript/language_server/gdscript_language_server.cpp
#: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h
#: scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Network"
-msgstr "Analizator Network"
+msgstr "Rețea"
#: core/io/file_access_network.cpp
-#, fuzzy
msgid "Remote FS"
-msgstr "Ștergeți"
+msgstr "Sistem de fișiere (FS) la distanță"
#: core/io/file_access_network.cpp
msgid "Page Size"
-msgstr "Marime Pagina"
+msgstr "Mărime Pagina"
#: core/io/file_access_network.cpp
msgid "Page Read Ahead"
@@ -248,29 +247,27 @@ msgstr "Mod de blocare Activat"
#: core/io/http_client.cpp
msgid "Connection"
-msgstr "Conexie"
+msgstr "Conexiune"
#: core/io/http_client.cpp
msgid "Read Chunk Size"
-msgstr ""
+msgstr "Dimensiunea fragmentului de citire"
#: core/io/marshalls.cpp
msgid "Object ID"
msgstr "ID Obiect"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
-#, fuzzy
msgid "Allow Object Decoding"
-msgstr "Activează Onion Skinning"
+msgstr "Permite Decodarea Obiectelor"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
msgid "Refuse New Network Connections"
msgstr "Refuza Conexiuni noi pe retea"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Network Peer"
-msgstr "Analizator Network"
+msgstr "Peer de Rețea"
#: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp
msgid "Root Node"
@@ -286,15 +283,15 @@ msgstr "Mod Transfer"
#: core/io/packet_peer.cpp
msgid "Encode Buffer Max Size"
-msgstr ""
+msgstr "Dimensiunea Maximă a Bufferului de Encodare"
#: core/io/packet_peer.cpp
msgid "Input Buffer Max Size"
-msgstr ""
+msgstr "Dimensiunea Maximă a Bufferului de Intrare"
#: core/io/packet_peer.cpp
msgid "Output Buffer Max Size"
-msgstr ""
+msgstr "Dimensiunea Maximă a Bufferului de Ieșire"
#: core/io/packet_peer.cpp
msgid "Stream Peer"
@@ -302,11 +299,11 @@ msgstr "Fluxul Peer"
#: core/io/stream_peer.cpp
msgid "Big Endian"
-msgstr ""
+msgstr "Big Endian"
#: core/io/stream_peer.cpp
msgid "Data Array"
-msgstr ""
+msgstr "Matrice Date"
#: core/io/stream_peer_ssl.cpp
msgid "Blocking Handshake"
@@ -367,9 +364,8 @@ msgid "Seed"
msgstr "Semințe"
#: core/math/random_number_generator.cpp
-#, fuzzy
msgid "State"
-msgstr "Mod Rotație"
+msgstr "State"
#: core/message_queue.cpp
msgid "Message Queue"
@@ -377,17 +373,15 @@ msgstr "Coada de mesaje"
#: core/message_queue.cpp
msgid "Max Size (KB)"
-msgstr ""
+msgstr "Dimensiune maximă (KB)"
#: core/os/input.cpp
-#, fuzzy
msgid "Mouse Mode"
-msgstr "Mod Mutare"
+msgstr "Mod Maus"
#: core/os/input.cpp
-#, fuzzy
msgid "Use Accumulated Input"
-msgstr "Șterge Intrare(Input)"
+msgstr "Utilizează Intrarea (Input) Acumulată"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: servers/audio_server.cpp
@@ -411,9 +405,8 @@ msgid "Meta"
msgstr "Meta"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Command"
-msgstr "Comunitate"
+msgstr "Comandă"
#: core/os/input_event.cpp
#, fuzzy
@@ -444,9 +437,8 @@ msgid "Echo"
msgstr "Ecou"
#: core/os/input_event.cpp scene/gui/base_button.cpp
-#, fuzzy
msgid "Button Mask"
-msgstr "Adaugă în Grup"
+msgstr "Mască Buton"
#: core/os/input_event.cpp scene/2d/node_2d.cpp scene/gui/control.cpp
msgid "Global Position"
@@ -457,9 +449,8 @@ msgid "Factor"
msgstr "Factor"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Button Index"
-msgstr "Mod În Jur"
+msgstr "Indice Buton"
#: core/os/input_event.cpp
msgid "Doubleclick"
@@ -498,9 +489,8 @@ msgid "Axis Value"
msgstr "Valoarea Axei"
#: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Index"
-msgstr "Mod În Jur"
+msgstr "Indice"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: modules/visual_script/visual_script_nodes.cpp
@@ -518,29 +508,26 @@ msgid "Delta"
msgstr "Delta"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Channel"
-msgstr "Schimbați"
+msgstr "Canal"
#: core/os/input_event.cpp main/main.cpp
-#, fuzzy
msgid "Message"
-msgstr "Sincronizează Modificările Scriptului"
+msgstr "Mesaj"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pitch"
-msgstr "Dimensiune:"
+msgstr "Înclinație"
#: core/os/input_event.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/physics_body_2d.cpp scene/3d/cpu_particles.cpp
#: scene/3d/physics_body.cpp scene/resources/particles_material.cpp
msgid "Velocity"
-msgstr ""
+msgstr "Viteză (velocity)"
#: core/os/input_event.cpp
msgid "Instrument"
-msgstr ""
+msgstr "Instrument"
#: core/os/input_event.cpp
msgid "Controller Number"
@@ -553,19 +540,16 @@ msgstr "Valoarea controlerului"
#: core/project_settings.cpp editor/editor_node.cpp main/main.cpp
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Application"
-msgstr "Acțiune"
+msgstr "Aplicație"
#: core/project_settings.cpp main/main.cpp
-#, fuzzy
msgid "Config"
-msgstr "Configurare Snap"
+msgstr "Configurare"
#: core/project_settings.cpp
-#, fuzzy
msgid "Project Settings Override"
-msgstr "Setări proiect..."
+msgstr "Suprascriere setări proiect"
#: core/project_settings.cpp core/resource.cpp
#: editor/animation_track_editor.cpp editor/editor_autoload_settings.cpp
@@ -596,29 +580,27 @@ msgstr "Execută"
#: core/project_settings.cpp editor/editor_node.cpp
#: editor/run_settings_dialog.cpp main/main.cpp
msgid "Main Scene"
-msgstr ""
+msgstr "Scena Principală"
#: core/project_settings.cpp
-#, fuzzy
msgid "Disable stdout"
-msgstr "Dezactivat"
+msgstr "Dezactivează stdout"
#: core/project_settings.cpp
-#, fuzzy
msgid "Disable stderr"
-msgstr "Dezactivat"
+msgstr "Dezactivează stderr"
#: core/project_settings.cpp
msgid "Use Hidden Project Data Directory"
-msgstr ""
+msgstr "Utilizează directorul de date de proiect ascuns"
#: core/project_settings.cpp
msgid "Use Custom User Dir"
-msgstr ""
+msgstr "Utilizează Director de Utilizator Personalizat"
#: core/project_settings.cpp
msgid "Custom User Dir Name"
-msgstr ""
+msgstr "Nume de Director de Utilizator Personalizat"
#: core/project_settings.cpp main/main.cpp
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
@@ -631,7 +613,7 @@ msgstr "Afișează Tot"
#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp
#: scene/3d/label_3d.cpp scene/gui/text_edit.cpp scene/resources/texture.cpp
msgid "Width"
-msgstr ""
+msgstr "Lățime"
#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp
#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp
@@ -640,21 +622,19 @@ msgstr ""
#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp
#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp
msgid "Height"
-msgstr ""
+msgstr "Înălțime"
#: core/project_settings.cpp
msgid "Always On Top"
-msgstr ""
+msgstr "Mereu Deasupra"
#: core/project_settings.cpp
-#, fuzzy
msgid "Test Width"
-msgstr "Stânga liniară"
+msgstr "Lățime de Test"
#: core/project_settings.cpp
-#, fuzzy
msgid "Test Height"
-msgstr "Se Testează"
+msgstr "Înălțime de Test"
#: core/project_settings.cpp editor/animation_track_editor.cpp
#: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp
@@ -662,9 +642,8 @@ msgid "Audio"
msgstr "Sunet"
#: core/project_settings.cpp
-#, fuzzy
msgid "Default Bus Layout"
-msgstr "Încarcă Schema de Pistă Audio implicită."
+msgstr "Schema de Pistă Audio Implicită"
#: core/project_settings.cpp editor/editor_export.cpp
#: editor/editor_file_system.cpp editor/editor_node.cpp
@@ -687,73 +666,64 @@ msgstr "Căutare în extensii de fișiere"
#: core/project_settings.cpp
msgid "Script Templates Search Path"
-msgstr ""
+msgstr "Cale de Căutare pentru Șabloane de Scripturi"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Autoload On Startup"
-msgstr "Control versiune"
+msgstr "Încărcare Automată de Control al Versiunii la Pornire"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Plugin Name"
-msgstr "Control versiune"
+msgstr "Numele Pluginului de Control al Versiunii"
#: core/project_settings.cpp scene/2d/collision_object_2d.cpp
#: scene/3d/collision_object.cpp scene/gui/control.cpp
-#, fuzzy
msgid "Input"
-msgstr "Adaugă Intrare(Input)"
+msgstr "Intrare (Input)"
#: core/project_settings.cpp
msgid "UI Accept"
-msgstr ""
+msgstr "Acceptare (UI)"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Select"
-msgstr "Selectează"
+msgstr "Selectează (UI)"
#: core/project_settings.cpp
msgid "UI Cancel"
-msgstr "Anulare interfață utilizator"
+msgstr "Anulare (UI)"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Focus Next"
-msgstr "Cale focalizare"
+msgstr "Focalizează Urmatorul (UI)"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Focus Prev"
-msgstr "Cale focalizare"
+msgstr "Focalizează Anteriorul (UI)"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Left"
-msgstr "Mod Rotație"
+msgstr "Stânga (UI)"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Right"
-msgstr "Rotație poligon"
+msgstr "Dreapta (UI)"
#: core/project_settings.cpp
msgid "UI Up"
-msgstr ""
+msgstr "Sus (UI)"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Down"
-msgstr "Descarcă"
+msgstr "JUos (UI)"
#: core/project_settings.cpp
msgid "UI Page Up"
-msgstr "Pagina UI în sus"
+msgstr "Pagina Ssus (UI)"
#: core/project_settings.cpp
msgid "UI Page Down"
-msgstr ""
+msgstr "Pagină Jos (UI)"
#: core/project_settings.cpp
msgid "UI Home"
@@ -783,7 +753,7 @@ msgstr "Cadru Fizic %"
#: scene/3d/physics_body.cpp scene/resources/world.cpp
#: servers/physics/space_sw.cpp servers/physics_server.cpp
msgid "3D"
-msgstr ""
+msgstr "3D"
#: core/project_settings.cpp
#, fuzzy
@@ -800,7 +770,7 @@ msgstr "Creează un Frate de Coliziune Trimesh"
#: scene/main/viewport.cpp servers/visual/visual_server_scene.cpp
#: servers/visual_server.cpp
msgid "Rendering"
-msgstr ""
+msgstr "Randare"
#: core/project_settings.cpp drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_scene_gles3.cpp
@@ -850,17 +820,16 @@ msgid "Max Functions"
msgstr "Faceți Funcția"
#: core/project_settings.cpp scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Compression"
-msgstr "Setare expresie"
+msgstr "Compresie"
#: core/project_settings.cpp
msgid "Formats"
-msgstr ""
+msgstr "Formate"
#: core/project_settings.cpp
msgid "Zstd"
-msgstr ""
+msgstr "Zstd"
#: core/project_settings.cpp
msgid "Long Distance Matching"
@@ -905,11 +874,11 @@ msgstr "Pachet Peer Stream"
#: core/register_core_types.cpp
msgid "Max Buffer (Power of 2)"
-msgstr ""
+msgstr "Buffer Maxim (Putere de-a lui 2)"
#: core/register_core_types.cpp editor/editor_settings.cpp main/main.cpp
msgid "SSL"
-msgstr ""
+msgstr "SSL"
#: core/register_core_types.cpp main/main.cpp
#, fuzzy
@@ -941,7 +910,7 @@ msgstr "Resursă"
#: core/translation.cpp editor/project_settings_editor.cpp
msgid "Locale"
-msgstr ""
+msgstr "Local"
#: core/translation.cpp
#, fuzzy
@@ -986,17 +955,17 @@ msgstr "EiB"
#: drivers/gles3/rasterizer_scene_gles3.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp modules/gltf/gltf_state.cpp
msgid "Buffers"
-msgstr ""
+msgstr "Buffere"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
msgid "Canvas Polygon Buffer Size (KB)"
-msgstr ""
+msgstr "Dimensiune Buffer Poligon de Canvas (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
msgid "Canvas Polygon Index Buffer Size (KB)"
-msgstr ""
+msgstr "Dimensiune Indice Buffer Poligon de Canvas (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp
@@ -1040,11 +1009,11 @@ msgstr "Utilizarea eșantionării bicubice"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Elements"
-msgstr ""
+msgstr "Numărul Maxim de Elemente Care se Pot Randa"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Lights"
-msgstr ""
+msgstr "Numărul Maxim de Lumini Care se Pot Randa"
#: drivers/gles3/rasterizer_scene_gles3.cpp
#, fuzzy
@@ -1053,7 +1022,7 @@ msgstr "Centrează Selecția"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Lights Per Object"
-msgstr ""
+msgstr "Numărul Maxim de Lumini per Obiect"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Subsurface Scattering"
@@ -1087,7 +1056,7 @@ msgstr ""
#: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp
msgid "High Quality"
-msgstr ""
+msgstr "Calitate Înaltă"
#: drivers/gles3/rasterizer_storage_gles3.cpp
msgid "Blend Shape Max Buffer Size (KB)"
@@ -1190,7 +1159,7 @@ msgstr "Rotație"
#: editor/animation_track_editor.cpp editor/script_editor_debugger.cpp
#: modules/visual_script/visual_script_nodes.cpp scene/gui/range.cpp
msgid "Value"
-msgstr ""
+msgstr "Valoare"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1200,14 +1169,14 @@ msgstr "Cantitate:"
#: editor/animation_track_editor.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
msgid "Args"
-msgstr ""
+msgstr "Argumente"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/script_editor_debugger.cpp modules/gltf/gltf_accessor.cpp
#: modules/gltf/gltf_light.cpp modules/visual_script/visual_script_nodes.cpp
#: scene/3d/physics_body.cpp scene/resources/visual_shader_nodes.cpp
msgid "Type"
-msgstr ""
+msgstr "Tip"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1380,7 +1349,7 @@ msgstr "Dimensiune:"
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Type:"
-msgstr ""
+msgstr "Tip:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1646,7 +1615,7 @@ msgstr "Anim Mutați Cheie"
#: servers/camera/camera_feed.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
msgid "Transform"
-msgstr ""
+msgstr "Transformă"
#: editor/animation_track_editor.cpp editor/editor_help.cpp
msgid "Methods"
@@ -2667,7 +2636,7 @@ msgstr "Nume nevalid."
#: editor/editor_autoload_settings.cpp
msgid "Cannot begin with a digit."
-msgstr ""
+msgstr "Nu poate începe cu o cifră"
#: editor/editor_autoload_settings.cpp
msgid "Valid characters:"
@@ -2949,7 +2918,7 @@ msgstr "Culoare uniformă."
#: editor/editor_export.cpp
msgid "64 Bits"
-msgstr ""
+msgstr "64 de biți"
#: editor/editor_export.cpp
msgid "Embed PCK"
@@ -3207,6 +3176,8 @@ msgstr "Opțiunii Extra:"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
msgstr ""
+"Creează sau importă un profil pentru a edita clasele si proprietățile "
+"disponibile"
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -3347,7 +3318,7 @@ msgstr "Comutați Fișiere Ascunse"
#: editor/editor_file_dialog.cpp
msgid "Disable Overwrite Warning"
-msgstr ""
+msgstr "Opreste suprascrierea avertizărilor"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
@@ -3496,7 +3467,7 @@ msgstr "Proprietățile Temei"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/gradient.cpp
msgid "Colors"
-msgstr ""
+msgstr "Culori"
#: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constants"
@@ -3504,16 +3475,16 @@ msgstr "Constante"
#: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Fonts"
-msgstr ""
+msgstr "Fonturi"
#: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp
#: platform/iphone/export/export.cpp
msgid "Icons"
-msgstr ""
+msgstr "Icoană"
#: editor/editor_help.cpp
msgid "Styles"
-msgstr ""
+msgstr "Stiluri"
#: editor/editor_help.cpp
msgid "Enumerations"
@@ -3645,7 +3616,7 @@ msgstr "Proprietate:"
#: editor/editor_inspector.cpp editor/editor_spin_slider.cpp
msgid "Label"
-msgstr ""
+msgstr "Etichetă"
#: editor/editor_inspector.cpp editor/editor_spin_slider.cpp
#: scene/resources/default_theme/default_theme.cpp
@@ -4213,14 +4184,14 @@ msgid "Unable to load addon script from path: '%s'."
msgstr "Nu a putut fi încărcat scriptul add-on din calea: '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"Unable to load addon script from path: '%s'. This might be due to a code "
"error in that script.\n"
"Disabling the addon at '%s' to prevent further errors."
msgstr ""
"Imposibil de încărcat scriptul addon din cale: '%s' Se pare că există o "
-"eroare în cod, verificați sintaxa."
+"eroare în cod, verificați sintaxa.\n"
+"Dezactivez addon-ul de la '%s' pentru a preveni erori ulterioare."
#: editor/editor_node.cpp
msgid ""
@@ -7317,9 +7288,8 @@ msgid "Generating Lightmaps"
msgstr "Se Genereaza Lightmaps"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Generating for Mesh:"
-msgstr "Se Generează pentru Mesh: "
+msgstr "Se Generează pentru Mesh:"
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
@@ -8967,36 +8937,32 @@ msgid "Center Top"
msgstr "Centrează Selecția"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Center Right"
-msgstr "Rotație poligon"
+msgstr "Centrează Dreapta"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Center Bottom"
-msgstr "Centrează Selecția"
+msgstr "Centrează Jos"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center"
-msgstr ""
+msgstr "Centrează"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Left Wide"
-msgstr "Stânga liniară"
+msgstr "Stânga Lat"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Top Wide"
-msgstr ""
+msgstr "Sus Lat"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Right Wide"
-msgstr "Dreapta liniară"
+msgstr "Dreapta Lat"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Bottom Wide"
-msgstr ""
+msgstr "Jos Lat"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "VCenter Wide"
@@ -9032,6 +8998,9 @@ msgid ""
"Project Camera Override\n"
"Overrides the running project's camera with the editor viewport camera."
msgstr ""
+"Suprascrierea Camerei de Proiect\n"
+"Suprascrie camera proiectului care rulează cu camera de vizualizare a "
+"editorului."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9040,48 +9009,45 @@ msgid ""
"No project instance running. Run the project from the editor to use this "
"feature."
msgstr ""
+"Suprascrierea Camerei de Proiect\n"
+"Nicio instanță de proiect nu rulează. Rulați proiectul din editor pentru a "
+"utiliza această caracteristică."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Lock Selected"
-msgstr "Selectează"
+msgstr "Blochează Selecția"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unlock Selected"
-msgstr ""
+msgstr "Deblochează Selecția"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Group Selected"
-msgstr "Elminați Selecția"
+msgstr "Grupează Selecția"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Ungroup Selected"
-msgstr "Elminați Selecția"
+msgstr "Degrupați selecția"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Paste Pose"
msgstr "Lipește Postura"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Clear Guides"
-msgstr "Curăță Postura"
+msgstr "Elimină Ghidurile"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Custom Bone(s) from Node(s)"
-msgstr "Creează Puncte de Emisie Din Mesh"
+msgstr "Crează Oase personalizate din Noduri"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Clear Bones"
-msgstr "Curăță Postura"
+msgstr "Elimină Oase"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Make IK Chain"
@@ -9112,36 +9078,31 @@ msgstr "Selectare mod"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Drag: Rotate selected node around pivot."
-msgstr "Ștergeți pista selectată."
+msgstr "Trage: Rotește nodul selectat în jurul pivotului."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Move selected node."
-msgstr "Alt+Trage: Mutare"
+msgstr "Alt+Trage: Mută nodul selectat."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Scale selected node."
-msgstr "Alt+Trage: Mutare"
+msgstr "Alt+Trage: Scalează nodul selectat."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "V: Set selected node's pivot position."
-msgstr "Ștergeți pista selectată."
+msgstr "V: Setează poziția pivotului nodului selectat."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Alt+RMB: Show list of all nodes at position clicked, including locked."
msgstr ""
-"Arată o listă a tuturor obiectelor la poziția clickului\n"
-"(similar cu Alt+RMB în modul selectare)."
+"Alt+RMB: Arată o listă a tuturor nodurilor la poziția clickului, inclusiv "
+"cele blocate."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "RMB: Adaugă nod la poziția clickului."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9155,13 +9116,12 @@ msgstr "Mod Rotație"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale Mode"
-msgstr "Mod Redimensionare (R)"
+msgstr "Mod Redimensionare"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Shift: Scale proportionally."
-msgstr ""
+msgstr "Shift: Redimensionare proporțională."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9189,21 +9149,18 @@ msgid "Toggle smart snapping."
msgstr "Comutați fixarea inteligentă."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Use Smart Snap"
-msgstr "Utilizează Snap"
+msgstr "Utilizează Snap Inteligent"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Toggle grid snapping."
msgstr "Comutare grilă fixare."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Use Grid Snap"
-msgstr "Snap Grilă"
+msgstr "Utilizează Snap Grilă"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snapping Options"
msgstr "Opțiuni Snapping"
@@ -9212,9 +9169,8 @@ msgid "Use Rotation Snap"
msgstr "Folosește Rotația Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Use Scale Snap"
-msgstr "Utilizează Snap"
+msgstr "Utilizează Snap Redimensionare"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
@@ -9225,9 +9181,8 @@ msgid "Use Pixel Snap"
msgstr "Utilizează Pixel Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Smart Snapping"
-msgstr "Snapping inteligent"
+msgstr "Snapping Inteligent"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9235,34 +9190,28 @@ msgid "Configure Snap..."
msgstr "Configurare Snap..."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Parent"
-msgstr "Snap către părinte"
+msgstr "Snap către Părinte"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Node Anchor"
-msgstr "Snap către ancora nodului"
+msgstr "Snap către Ancora Nodului"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Node Sides"
-msgstr "Snap pe fețele nodului"
+msgstr "Snap pe Fețele Nodului"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Node Center"
-msgstr "Snap către ancora nodului"
+msgstr "Snap către Centrul Nodului"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Other Nodes"
-msgstr "Snap către alte noduri"
+msgstr "Snap către Alte Noduri"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to Guides"
-msgstr "Snap pe ghizi"
+msgstr "Snap pe Ghiduri"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9271,9 +9220,8 @@ msgstr "Imobilizează obiectul selectat (nu poate fi mișcat)."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Lock Selected Node(s)"
-msgstr "Selectează"
+msgstr "Blochează Nodurile Selectate"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9282,9 +9230,8 @@ msgstr "Remobilizează obiectul selectat (poate fi mișcat)."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Unlock Selected Node(s)"
-msgstr "Selectează"
+msgstr "Deblochează Nodurile Selectate"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9293,9 +9240,8 @@ msgstr "Asigură-te că nu pot fi selectați copiii obiectului."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Group Selected Node(s)"
-msgstr "Elminați Selecția"
+msgstr "Grupează Nodurile Selectate"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9304,14 +9250,12 @@ msgstr "Restaurează abilitatea copiilor obiectului de a fi selectați."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Ungroup Selected Node(s)"
-msgstr "Elminați Selecția"
+msgstr "Degrupează Nodurile Selectate"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Skeleton Options"
-msgstr "Singleton (Unicat)"
+msgstr "Opțiuni Schelet"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Bones"
@@ -9322,9 +9266,8 @@ msgid "Make Custom Bone(s) from Node(s)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Clear Custom Bones"
-msgstr "Curăță Oasele"
+msgstr "Curăță Oasele Personalizate"
#. TRANSLATORS: Noun, name of the 2D/3D View menus.
#: editor/plugins/canvas_item_editor_plugin.cpp
@@ -9333,23 +9276,20 @@ msgid "View"
msgstr "Perspectivă"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show"
-msgstr "Arată Grila"
+msgstr "Arată"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show When Snapping"
-msgstr "Snapping inteligent"
+msgstr "Arată Când Faci Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Hide"
-msgstr ""
+msgstr "Ascunde"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Grid"
-msgstr "Comutare mod"
+msgstr "Comutare Grilă"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -9378,7 +9318,7 @@ msgstr "Arată Fereastra de Lucru"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Group And Lock Icons"
-msgstr ""
+msgstr "Arată Pictogramele de Grupare și Blocare"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
@@ -9390,7 +9330,7 @@ msgstr "Încadrează în Ecran Selecția"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Preview Canvas Scale"
-msgstr ""
+msgstr "Previzualizare Scară Canvas"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Layout"
@@ -9421,14 +9361,12 @@ msgid ""
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Auto Insert Key"
-msgstr "Anim Inserați Cheie"
+msgstr "Inserare Automată a Cheii"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Animation Key and Pose Options"
-msgstr "Lungime Animație (în secunde)"
+msgstr "Optiuni pentru Chei Animație și Postură"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key (Existing Tracks)"
@@ -9443,9 +9381,8 @@ msgid "Clear Pose"
msgstr "Curăță Postura"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Add Node Here"
-msgstr "Adaugă punct"
+msgstr "Adaugă Nod Aici"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -9467,49 +9404,43 @@ msgstr "Perspectivă Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 3.125%"
-msgstr ""
+msgstr "Magnificare la 3.125%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 6.25%"
-msgstr ""
+msgstr "Magnificare la 6.25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 12.5%"
-msgstr ""
+msgstr "Magnificare la 12.5%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 25%"
-msgstr "Departare"
+msgstr "Magnificare la 25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 50%"
-msgstr "Departare"
+msgstr "Magnificare la 50%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 100%"
-msgstr "Departare"
+msgstr "Magnificare la 100%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 200%"
-msgstr "Departare"
+msgstr "Magnificare la 200%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 400%"
-msgstr "Departare"
+msgstr "Magnificare la 400%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 800%"
-msgstr "Departare"
+msgstr "Magnificare la 800%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 1600%"
-msgstr ""
+msgstr "Magnificare la 1600%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Adding %s..."
@@ -9530,9 +9461,8 @@ msgid "Error instancing scene from %s"
msgstr "Eroare la instanțierea scenei din %s"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Change Default Type"
-msgstr "Schimbă tipul implicit"
+msgstr "Schimbă Tipul Implicit"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
@@ -9543,9 +9473,8 @@ msgstr ""
"Trage & lasă + Shift: Schimbă tipul nodului"
#: editor/plugins/collision_polygon_editor_plugin.cpp
-#, fuzzy
msgid "Create Polygon3D"
-msgstr "Crează Poligon"
+msgstr "Crează Poligon3D"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Edit Poly"
@@ -9595,7 +9524,7 @@ msgstr "Mască de Emisie"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Solid Pixels"
-msgstr ""
+msgstr "Pixeli Solizi"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -9618,9 +9547,8 @@ msgid "Emission Colors"
msgstr "Culori de Emisie"
#: editor/plugins/cpu_particles_editor_plugin.cpp
-#, fuzzy
msgid "CPUParticles"
-msgstr "Particule"
+msgstr "ParticuleCPU"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -9667,29 +9595,24 @@ msgid "Load Curve Preset"
msgstr "Încarcă Presetare a Curbei"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Add Point"
-msgstr "Adaugă punct"
+msgstr "Adaugă Punct"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Remove Point"
-msgstr "Elimină punct"
+msgstr "Elimină Punct"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Left Linear"
-msgstr "Stânga liniară"
+msgstr "Stânga Liniară"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Right Linear"
-msgstr "Dreapta liniară"
+msgstr "Dreapta Liniară"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Load Preset"
-msgstr "Încarcă presetare"
+msgstr "Încarcă Presetare"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Remove Curve Point"
@@ -9704,9 +9627,8 @@ msgid "Hold Shift to edit tangents individually"
msgstr "Ține apăsat Shift pentru a edita individual tangentele"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Right click to add point"
-msgstr "Click Drept: Ștergere punct"
+msgstr "Click dreapta pentru adăugare punct"
#: editor/plugins/gi_probe_editor_plugin.cpp
msgid "Bake GI Probe"
@@ -9714,7 +9636,7 @@ msgstr "Procesează Sonda GI"
#: editor/plugins/gradient_editor_plugin.cpp
msgid "Gradient Edited"
-msgstr ""
+msgstr "Gradient Dditat"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
msgid "Swap GradientTexture2D Fill Points"
@@ -9735,18 +9657,18 @@ msgstr "Comutare mod"
#: scene/gui/rich_text_label.cpp scene/gui/text_edit.cpp
#: scene/resources/primitive_meshes.cpp
msgid "Text"
-msgstr ""
+msgstr "Text"
#: editor/plugins/item_list_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp main/main.cpp
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
#: scene/gui/button.cpp scene/gui/item_list.cpp
msgid "Icon"
-msgstr ""
+msgstr "Pictogramă"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "ID"
-msgstr ""
+msgstr "ID"
#: editor/plugins/item_list_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
@@ -11288,7 +11210,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
@@ -18656,14 +18578,12 @@ msgid "Var Name"
msgstr "Nume"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "VariableGet not found in script:"
-msgstr "Metoda nu a fost găsită în obiect: "
+msgstr "VariableGet nu a fost găsită în obiect:"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "VariableSet not found in script:"
-msgstr "Metoda nu a fost găsită în obiect: "
+msgstr "Metoda VariableSet nu a fost găsită în obiect:"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Preload"
@@ -19354,11 +19274,8 @@ msgid "Signing debug %s..."
msgstr ""
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Signing release %s..."
-msgstr ""
-"Se Scanează Fișierele,\n"
-"Te Rog Așteaptă..."
+msgstr "Se semnează release-ul %s..."
#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index d746bb61ad..97e9723383 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -11029,7 +11029,7 @@ msgstr "Задний перспективный"
msgid " [auto]"
msgstr " [авто]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [порталы активны]"
diff --git a/editor/translations/si.po b/editor/translations/si.po
index d0fcba8cfd..af22d7b2d2 100644
--- a/editor/translations/si.po
+++ b/editor/translations/si.po
@@ -10744,7 +10744,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index 43c2fa6b5b..4f4e1107f3 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -12,13 +12,14 @@
# Anonymous <noreply@weblate.org>, 2020.
# Mario-projects-dev <m.vitek.mv@gmail.com>, 2021.
# Eliška Fichnová <eliska@fichna.sk>, 2021.
+# Adam Švidroň <adsvidro@gmail.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-07-07 15:34+0000\n"
-"Last-Translator: Eliška Fichnová <eliska@fichna.sk>\n"
+"PO-Revision-Date: 2022-12-21 07:01+0000\n"
+"Last-Translator: Adam Švidroň <adsvidro@gmail.com>\n"
"Language-Team: Slovak <https://hosted.weblate.org/projects/godot-engine/"
"godot/sk/>\n"
"Language: sk\n"
@@ -26,7 +27,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -34,7 +35,7 @@ msgstr ""
#: core/bind/core_bind.cpp
msgid "Clipboard"
-msgstr ""
+msgstr "Schránka"
#: core/bind/core_bind.cpp
#, fuzzy
@@ -11289,7 +11290,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index 864dac1b8d..3605bbeaf5 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -11456,7 +11456,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/sq.po b/editor/translations/sq.po
index 1215b7dbcb..e4d3ef6732 100644
--- a/editor/translations/sq.po
+++ b/editor/translations/sq.po
@@ -11222,7 +11222,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po
index 419e33c494..c2d0ffe462 100644
--- a/editor/translations/sr_Cyrl.po
+++ b/editor/translations/sr_Cyrl.po
@@ -12040,7 +12040,7 @@ msgstr "Перспективна пројекција"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po
index 7973756c7e..5693d06931 100644
--- a/editor/translations/sr_Latn.po
+++ b/editor/translations/sr_Latn.po
@@ -10752,7 +10752,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/sv.po b/editor/translations/sv.po
index 04965e6c69..dff36498be 100644
--- a/editor/translations/sv.po
+++ b/editor/translations/sv.po
@@ -25,15 +25,16 @@
# Leon <joel.lundborg@gmail.com>, 2021, 2022.
# Kent Jofur <kent.jofur@gmail.com>, 2021.
# Alex25820 <alexs25820@gmail.com>, 2021.
-# Björn Åkesson <bjorn.akesson@gmail.com>, 2022.
+# Björn Åkesson <bjorn.akesson@gmail.com>, 2022, 2023.
# Kenny Andersson <kenny@ordinary.se>, 2022.
+# Ludvig Svenonius <ludvig.svenonius@protonmail.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-09-29 19:16+0000\n"
-"Last-Translator: Kristoffer Grundström <swedishsailfishosuser@tutanota.com>\n"
+"PO-Revision-Date: 2023-01-20 11:20+0000\n"
+"Last-Translator: Ludvig Svenonius <ludvig.svenonius@protonmail.com>\n"
"Language-Team: Swedish <https://hosted.weblate.org/projects/godot-engine/"
"godot/sv/>\n"
"Language: sv\n"
@@ -41,7 +42,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.14.1\n"
+"X-Generator: Weblate 4.15.1\n"
#: core/bind/core_bind.cpp main/main.cpp
#, fuzzy
@@ -704,9 +705,8 @@ msgid "Script Templates Search Path"
msgstr "Sökväg för skriptmallar"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Autoload On Startup"
-msgstr "Versionshantering"
+msgstr "Automatisk Inläsning av Versionskontroll vid Start"
#: core/project_settings.cpp
#, fuzzy
@@ -8287,7 +8287,7 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Autoplay on Load"
-msgstr ""
+msgstr "Spela upp automatiskt efter inladdning"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Enable Onion Skinning"
@@ -11363,7 +11363,7 @@ msgstr "Perspektiv"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
@@ -15031,19 +15031,19 @@ msgstr ""
#: editor/project_settings_editor.cpp
msgid "Physical Key"
-msgstr ""
+msgstr "Fysisk tangent"
#: editor/project_settings_editor.cpp
msgid "Key "
-msgstr "Nyckel "
+msgstr "Tangent "
#: editor/project_settings_editor.cpp
msgid "Joy Button"
-msgstr ""
+msgstr "Styrspaksknapp"
#: editor/project_settings_editor.cpp
msgid "Joy Axis"
-msgstr ""
+msgstr "Styrspaksaxel"
#: editor/project_settings_editor.cpp
msgid "Mouse Button"
@@ -15072,9 +15072,8 @@ msgid "Add Input Action Event"
msgstr ""
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "All Devices"
-msgstr "Enhet"
+msgstr "Alla Enheter"
#: editor/project_settings_editor.cpp
msgid " (Physical)"
@@ -20908,11 +20907,11 @@ msgstr ""
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Monitoring"
-msgstr ""
+msgstr "Övervakning"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Monitorable"
-msgstr ""
+msgstr "Övervakningsbar"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
#, fuzzy
@@ -20985,7 +20984,7 @@ msgstr "Slå på/av Autoplay"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/audio/audio_stream_player.cpp
msgid "Stream Paused"
-msgstr ""
+msgstr "Pausad"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/3d/light.cpp scene/3d/reflection_probe.cpp
@@ -25655,39 +25654,32 @@ msgid "Swap OK Cancel"
msgstr "Avbryt"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "Layer Names"
-msgstr "Namn"
+msgstr "Skiktnamn"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "2D Render"
-msgstr "Renderare:"
+msgstr "2D-Rendering"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "3D Render"
-msgstr "Renderare:"
+msgstr "3D-Rendering"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "2D Physics"
-msgstr "Fysik Bildruta %"
+msgstr "2D-Fysik"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "3D Physics"
-msgstr "Fysik Bildruta %"
+msgstr "3D-Fysik"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "2D Navigation"
-msgstr "Animations-Node"
+msgstr "2D-Navigation"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "3D Navigation"
-msgstr "Animations-Node"
+msgstr "3D-Navigation"
#: scene/register_scene_types.cpp
msgid "Use hiDPI"
diff --git a/editor/translations/te.po b/editor/translations/te.po
index 22474ca4ba..f8a1f82710 100644
--- a/editor/translations/te.po
+++ b/editor/translations/te.po
@@ -10590,7 +10590,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/th.po b/editor/translations/th.po
index 5f4ee76a4d..c41428e6d1 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -11270,7 +11270,7 @@ msgstr "เพอร์สเปกทีฟ"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/tl.po b/editor/translations/tl.po
index 670e52056d..fa5f9a9aea 100644
--- a/editor/translations/tl.po
+++ b/editor/translations/tl.po
@@ -10910,7 +10910,7 @@ msgstr ""
msgid " [auto]"
msgstr " [kusa]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [mga aktibong portal]"
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index ac4b509150..73fbaec2cb 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -11032,7 +11032,7 @@ msgstr "Arka Perspektif"
msgid " [auto]"
msgstr " [Oto]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [portallar aktif]"
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index f9a6c787a5..a8d989d5ee 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -17,21 +17,23 @@
# Микола Тимошенко <9081@ukr.net>, 2020.
# Miroslav <zinmirx@gmail.com>, 2020.
# IllusiveMan196 <hamsterrv@gmail.com>, 2021, 2022.
-# KazanskiyMaks <kazanskiy.maks@gmail.com>, 2022.
+# KazanskiyMaks <kazanskiy.maks@gmail.com>, 2022, 2023.
# Мирослав <hlopukmyroslav@gmail.com>, 2022.
# Ostap <ostapbataj79@gmail.com>, 2022.
# Wald Sin <naaveranos@gmail.com>, 2022.
# Гліб Соколов <ramithes@i.ua>, 2022.
# Max Donchenko <maxx.donchenko@gmail.com>, 2022.
# Artem <artem@molotov.work>, 2022.
-# Teashrock <kajitsu22@gmail.com>, 2022.
+# Teashrock <kajitsu22@gmail.com>, 2022, 2023.
+# kirill7606 <k7606irill@gmail.com>, 2022.
+# Alex <anna.loban@yahoo.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Ukrainian (Godot Engine)\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-10-03 12:44+0000\n"
-"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
+"PO-Revision-Date: 2023-01-08 09:47+0000\n"
+"Last-Translator: KazanskiyMaks <kazanskiy.maks@gmail.com>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/"
"godot/uk/>\n"
"Language: uk\n"
@@ -40,7 +42,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.14.1\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -60,27 +62,27 @@ msgstr "Код виходу"
#: core/bind/core_bind.cpp
msgid "V-Sync Enabled"
-msgstr "Увімкнено верт. синхронізацію"
+msgstr "Увімкнено вертикальну синхронізацію"
#: core/bind/core_bind.cpp main/main.cpp
msgid "V-Sync Via Compositor"
-msgstr "Верт. синхр. через засіб композиції"
+msgstr "Вертикальна синхронізація через засіб композиції"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Delta Smoothing"
-msgstr "Згладжування різниці"
+msgstr "Дельта-згладжування"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode"
-msgstr "Режим низького споживання процесора"
+msgstr "Режим низького використання процесора"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode Sleep (µsec)"
-msgstr "Присипляння у режимі низького споживання процесора (мкс)"
+msgstr "Час сну в режимі низького використання процесора (мкс)"
#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp
msgid "Keep Screen On"
-msgstr "Залишити зневаджувач відкритим"
+msgstr "Не вимикати екран"
#: core/bind/core_bind.cpp
msgid "Min Window Size"
@@ -4533,7 +4535,7 @@ msgstr "Перезавантажити поточний проєкт"
#: editor/editor_node.cpp
msgid "Quit to Project List"
-msgstr "Вийти в список проєктів"
+msgstr "Вийти до списку проєктів"
#: editor/editor_node.cpp
msgid "Deploy with Remote Debug"
@@ -5496,9 +5498,8 @@ msgid "Mouse Extra Buttons Navigate History"
msgstr "Додаткові кнопки миші для навігації журналом"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Drag And Drop Selection"
-msgstr "Перетягніть виділене"
+msgstr "Виділення Drag And Drop"
#: editor/editor_settings.cpp
msgid "Stay In Script Editor On Node Selected"
@@ -10955,7 +10956,7 @@ msgstr "Задній перспективний"
msgid " [auto]"
msgstr " [авто]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [портали активні]"
@@ -14219,17 +14220,15 @@ msgid "Invalid project path (changed anything?)."
msgstr "Некоректний шлях до проєкту (щось змінилося?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
-"Не вдалося завантажити project.godot у каталозі проєкту (помилка %d). "
-"Можливо, файл вилучено або пошкоджено."
+"Не вдалося завантажити проєкт у '%s' (помилка %d). Можливо, файл вилучено "
+"або пошкоджено."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't save project at '%s' (error %d)."
-msgstr "Не вдалося відкрити проєкт у «%s»."
+msgstr "Не вдалося зберегти проєкт у '%s' (помилка %d)."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15272,18 +15271,16 @@ msgid "Make Local"
msgstr "Зробити локальним"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "Увімкнути унікальну назву сцени"
+msgstr "Увімкнути Унікальні Назви Сцен(и)"
#: editor/scene_tree_dock.cpp
msgid "Unique names already used by another node in the scene:"
msgstr "Цю унікальну назву у сцені вже використано іншим вузлом:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Disable Scene Unique Name(s)"
-msgstr "Вимкнути унікальна назва сцени"
+msgstr "Вимкнути Унікальні Назви Сцен(и)"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -16315,7 +16312,7 @@ msgstr "Середовище"
#: main/main.cpp
msgid "Default Clear Color"
-msgstr "Типовий колір очищення"
+msgstr "Типовий чистий колір"
#: main/main.cpp
msgid "Boot Splash"
@@ -16848,12 +16845,10 @@ msgid "Sparse Indices Component Type"
msgstr "Тип компонентів індексів розсіювання"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Sparse Values Buffer View"
-msgstr "Буферне подання розріджених значень"
+msgstr "Перегляд буфера розріджених значень"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Sparse Values Byte Offset"
msgstr "Зміщення байтів розріджених значень"
@@ -16879,7 +16874,7 @@ msgstr "Розмір поля зору"
#: modules/gltf/gltf_camera.cpp
msgid "Zfar"
-msgstr ""
+msgstr "Віддалення по Z"
#: modules/gltf/gltf_camera.cpp
msgid "Znear"
@@ -16982,20 +16977,22 @@ msgid "Joint I To Name"
msgstr "З'єднання I З Іменем"
#: modules/gltf/gltf_skin.cpp
+#, fuzzy
msgid "Godot Skin"
-msgstr ""
+msgstr "Godot текстура"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Diffuse Img"
-msgstr ""
+msgstr "Розсіяне зображення"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Diffuse Factor"
-msgstr ""
+msgstr "Фактор розсіювання"
#: modules/gltf/gltf_spec_gloss.cpp
+#, fuzzy
msgid "Gloss Factor"
-msgstr ""
+msgstr "Фактор блиску"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Specular Factor"
@@ -17003,7 +17000,7 @@ msgstr "Коефіцієнт дзеркальності"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Spec Gloss Img"
-msgstr ""
+msgstr "Дзеркальне глянцеве зображення"
#: modules/gltf/gltf_state.cpp
msgid "Json"
@@ -17022,8 +17019,9 @@ msgid "GLB Data"
msgstr "Дані GLB"
#: modules/gltf/gltf_state.cpp
+#, fuzzy
msgid "Use Named Skin Binds"
-msgstr ""
+msgstr "Використовуйте іменовані обшивки"
#: modules/gltf/gltf_state.cpp
msgid "Buffer Views"
@@ -17127,7 +17125,7 @@ msgstr "Навігація"
#: scene/3d/navigation_mesh_instance.cpp
#, fuzzy
msgid "Navigation Layers"
-msgstr "Поведінка навігації"
+msgstr "Навігаційні шари"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -17292,19 +17290,19 @@ msgstr "Запікати карти освітлення"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Low Quality Ray Count"
-msgstr ""
+msgstr "Кількість променів низької якості"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Medium Quality Ray Count"
-msgstr ""
+msgstr "Середня якість підрахунку променів"
#: modules/lightmapper_cpu/register_types.cpp
msgid "High Quality Ray Count"
-msgstr ""
+msgstr "Висока якість підрахунку променів"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Ultra Quality Ray Count"
-msgstr ""
+msgstr "Кількість променів високої якості"
#: modules/minimp3/audio_stream_mp3.cpp
#: modules/minimp3/resource_importer_mp3.cpp
@@ -17315,7 +17313,7 @@ msgstr "Зміщення циклу"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Eye Height"
-msgstr ""
+msgstr "Висота очей"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "IOD"
@@ -17331,7 +17329,7 @@ msgstr "Перегляд без тіней"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Oversample"
-msgstr ""
+msgstr "Надвибірка"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "K1"
@@ -17354,19 +17352,16 @@ msgid "Auto Update Project"
msgstr "Проєкт без назви"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Assembly Name"
-msgstr "Показана назва"
+msgstr "Назва збірки"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Solution Directory"
-msgstr "Виберіть каталог"
+msgstr "Каталог проєкту"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "C# Project Directory"
-msgstr "Виберіть каталог"
+msgstr "Каталог проєкту C#"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
@@ -17516,8 +17511,9 @@ msgid "IGD Service Type"
msgstr "Тип служби IGD"
#: modules/upnp/upnp_device.cpp
+#, fuzzy
msgid "IGD Our Addr"
-msgstr ""
+msgstr "IGD це Наша адреса"
#: modules/upnp/upnp_device.cpp
msgid "IGD Status"
@@ -18314,12 +18310,14 @@ msgid "Optional Features"
msgstr "Необов'язкові можливості"
#: modules/webxr/webxr_interface.cpp
+#, fuzzy
msgid "Requested Reference Space Types"
-msgstr ""
+msgstr "Запитані типи довідкового простору"
#: modules/webxr/webxr_interface.cpp
+#, fuzzy
msgid "Reference Space Type"
-msgstr ""
+msgstr "Довідка типу простору"
#: modules/webxr/webxr_interface.cpp
msgid "Visibility State"
@@ -18335,7 +18333,7 @@ msgstr "Стандартна прив'язка XR"
#: platform/android/export/export.cpp
msgid "Android SDK Path"
-msgstr ""
+msgstr "Шлях Android SDK"
#: platform/android/export/export.cpp
msgid "Debug Keystore"
@@ -18358,8 +18356,9 @@ msgid "Shutdown ADB On Exit"
msgstr ""
#: platform/android/export/export_plugin.cpp
+#, fuzzy
msgid "Launcher Icons"
-msgstr ""
+msgstr "Значки панелі запуску"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18367,12 +18366,14 @@ msgid "Main 192 X 192"
msgstr "iPhone 120 X 120"
#: platform/android/export/export_plugin.cpp
+#, fuzzy
msgid "Adaptive Foreground 432 X 432"
-msgstr ""
+msgstr "адаптивний передній план 432 x 432"
#: platform/android/export/export_plugin.cpp
+#, fuzzy
msgid "Adaptive Background 432 X 432"
-msgstr ""
+msgstr "адаптивний задній план(фон) 432 x 432"
#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
@@ -18447,8 +18448,9 @@ msgid "Release Password"
msgstr "Пароль випуску"
#: platform/android/export/export_plugin.cpp
+#, fuzzy
msgid "One Click Deploy"
-msgstr ""
+msgstr "Розгортання в один клік"
#: platform/android/export/export_plugin.cpp
msgid "Clear Previous Install"
@@ -18729,10 +18731,13 @@ msgid "\"Min SDK\" should be a valid integer, but got \"%s\" which is invalid."
msgstr ""
#: platform/android/export/export_plugin.cpp
+#, fuzzy
msgid ""
"\"Min SDK\" cannot be lower than %d, which is the version needed by the "
"Godot library."
msgstr ""
+"\"Min SDK\" не може бути нижчим за %d, що є версією, необхідною для "
+"бібліотеки Godot."
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18743,15 +18748,20 @@ msgstr ""
"збирання»."
#: platform/android/export/export_plugin.cpp
+#, fuzzy
msgid ""
"\"Target SDK\" should be a valid integer, but got \"%s\" which is invalid."
msgstr ""
+"\"Target SDK\" має бути дійсним цілим числом, але отримано \"%s\", яке не є "
+"дійсним."
#: platform/android/export/export_plugin.cpp
msgid ""
"\"Target SDK\" %d is higher than the default version %d. This may work, but "
"wasn't tested and may be unstable."
msgstr ""
+"\"Target SDK\" %d вищий за стандартну версію %d. Це може працювати, але це "
+"не було перевірено та може бути нестабільним."
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18930,8 +18940,9 @@ msgid "The character '%s' is not allowed in Identifier."
msgstr "У назві ідентифікатора не можна використовувати символи «%s»."
#: platform/iphone/export/export.cpp
+#, fuzzy
msgid "Landscape Launch Screens"
-msgstr ""
+msgstr "Альбомні екрани запуску"
#: platform/iphone/export/export.cpp
#, fuzzy
@@ -18954,8 +18965,9 @@ msgid "iPad 2048 X 1536"
msgstr "iPad 152 X 152"
#: platform/iphone/export/export.cpp
+#, fuzzy
msgid "Portrait Launch Screens"
-msgstr ""
+msgstr "Портретні початкові екрани"
#: platform/iphone/export/export.cpp
#, fuzzy
@@ -18994,15 +19006,16 @@ msgstr "iPhone 120 X 120"
#: platform/iphone/export/export.cpp
msgid "App Store Team ID"
-msgstr ""
+msgstr "Ідентифікатор команди App Store"
#: platform/iphone/export/export.cpp
+#, fuzzy
msgid "Provisioning Profile UUID Debug"
-msgstr ""
+msgstr "Налагодження профілю UUID"
#: platform/iphone/export/export.cpp
msgid "Code Sign Identity Debug"
-msgstr ""
+msgstr "Налагодження ідентифікації коду"
#: platform/iphone/export/export.cpp
msgid "Export Method Debug"
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index 1046f11996..bc15a001c9 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -10936,7 +10936,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/vi.po b/editor/translations/vi.po
index b4a5f4494b..0ff37e659e 100644
--- a/editor/translations/vi.po
+++ b/editor/translations/vi.po
@@ -11119,7 +11119,7 @@ msgstr "Phối cảnh"
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index 52f072e946..5b58752f63 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -92,7 +92,7 @@ msgstr ""
"Project-Id-Version: Chinese (Simplified) (Godot Engine)\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: 2018-01-20 12:15+0200\n"
-"PO-Revision-Date: 2022-12-05 08:51+0000\n"
+"PO-Revision-Date: 2022-12-28 00:54+0000\n"
"Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hans/>\n"
@@ -101,7 +101,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -145,15 +145,15 @@ msgstr "屏幕常亮"
#: core/bind/core_bind.cpp
msgid "Min Window Size"
-msgstr "最小窗口大小"
+msgstr "最小窗口尺寸"
#: core/bind/core_bind.cpp
msgid "Max Window Size"
-msgstr "最大窗口大小"
+msgstr "最大窗口尺寸"
#: core/bind/core_bind.cpp
msgid "Screen Orientation"
-msgstr "窗口朝向"
+msgstr "屏幕朝向"
#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp
#: platform/uwp/os_uwp.cpp
@@ -1097,7 +1097,7 @@ msgstr "权重采样"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Voxel Cone Tracing"
-msgstr "体素椎追踪"
+msgstr "体素锥追踪"
#: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp
msgid "High Quality"
@@ -5843,7 +5843,7 @@ msgstr "骨骼轮廓颜色"
#: editor/editor_settings.cpp
msgid "Viewport Border Color"
-msgstr "视区边框颜色"
+msgstr "视口边框颜色"
#: editor/editor_settings.cpp
msgid "Constrain Editor View"
@@ -8685,7 +8685,7 @@ msgid ""
"Overrides the running project's camera with the editor viewport camera."
msgstr ""
"项目相机覆盖\n"
-"使用编辑器视图相机覆盖正在运行的项目中的相机。"
+"使用编辑器视口相机覆盖正在运行的项目中的相机。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -10819,7 +10819,7 @@ msgstr "透视后视图"
msgid " [auto]"
msgstr " [自动]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [入口生效]"
@@ -11203,27 +11203,27 @@ msgstr "变换对话框..."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "1 Viewport"
-msgstr "1 个视窗"
+msgstr "1 个视口"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports"
-msgstr "2 个视窗"
+msgstr "2 个视口"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports (Alt)"
-msgstr "2 个视窗(备选)"
+msgstr "2 个视口(备选)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports"
-msgstr "3 个视窗"
+msgstr "3 个视口"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports (Alt)"
-msgstr "3 个视窗(备选)"
+msgstr "3 个视口(备选)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "4 Viewports"
-msgstr "4 个视窗"
+msgstr "4 个视口"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Gizmos"
@@ -11320,7 +11320,7 @@ msgstr "操作小工具不透明度"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Show Viewport Rotation Gizmo"
-msgstr "显示视区旋转小工具"
+msgstr "显示视口旋转小工具"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unnamed Gizmo"
@@ -14010,16 +14010,13 @@ msgid "Invalid project path (changed anything?)."
msgstr "项目路径无效(被外部修改?)。"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
-msgstr ""
-"无法在项目路径中加载 project.godot 文件(错误 %d)。该文件可能缺失或已损坏。"
+msgstr "无法加载位于“%s”的项目(错误 %d)。项目可能缺失或已损坏。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't save project at '%s' (error %d)."
-msgstr "无法打开位于“%s”的项目。"
+msgstr "无法保存位于“%s”的项目(错误 %d)。"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -14934,7 +14931,7 @@ msgstr "将节点设置为根节点"
#: editor/scene_tree_dock.cpp
msgid "Delete %d nodes and any children?"
-msgstr "是否删除节点 “%s” 及其子节点?"
+msgstr "是否删除 %d 个节点及其子节点?"
#: editor/scene_tree_dock.cpp
msgid "Delete %d nodes?"
@@ -19971,7 +19968,7 @@ msgstr "缩放"
#: scene/2d/camera_2d.cpp scene/main/canvas_layer.cpp
msgid "Custom Viewport"
-msgstr "自定义视区"
+msgstr "自定义视口"
#: scene/2d/camera_2d.cpp scene/3d/camera.cpp scene/3d/interpolated_camera.cpp
#: scene/animation/animation_player.cpp scene/animation/animation_tree.cpp
@@ -22699,14 +22696,12 @@ msgid "AABB"
msgstr "AABB"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Sorting"
msgstr "排序"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Use AABB Center"
-msgstr "使用环境光"
+msgstr "使用 AABB 中心"
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
@@ -23869,7 +23864,7 @@ msgstr "拉伸收缩"
#: scene/main/canvas_layer.cpp
msgid "Follow Viewport"
-msgstr "跟随视区"
+msgstr "跟随视口"
#: scene/main/http_request.cpp
msgid "Download File"
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index 8af64cfc4e..80c7658ff9 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -11433,7 +11433,7 @@ msgstr ""
msgid " [auto]"
msgstr ""
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index dd54885310..4d04c45976 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -38,13 +38,14 @@
# Shi-Xun Hong <jimmy3421@gmail.com>, 2022.
# Hugel <qihu@nfschina.com>, 2022.
# nitenook <admin@alterbaum.net>, 2022.
+# Edison Lee <edisonlee@edisonlee55.com>, 2023.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-10-16 07:25+0000\n"
-"Last-Translator: BinotaLIU <me@binota.org>\n"
+"PO-Revision-Date: 2023-01-14 10:06+0000\n"
+"Last-Translator: Edison Lee <edisonlee@edisonlee55.com>\n"
"Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hant/>\n"
"Language: zh_TW\n"
@@ -52,7 +53,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.15-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -1154,7 +1155,7 @@ msgstr "旋轉"
#: editor/animation_track_editor.cpp editor/script_editor_debugger.cpp
#: modules/visual_script/visual_script_nodes.cpp scene/gui/range.cpp
msgid "Value"
-msgstr "數值"
+msgstr "值"
#: editor/animation_track_editor.cpp
msgid "Arg Count"
@@ -10771,7 +10772,7 @@ msgstr "透視後視圖"
msgid " [auto]"
msgstr " [自動]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr " [入口生效]"
@@ -17787,9 +17788,8 @@ msgid "ShiftRight %s"
msgstr "將 %s 向右移動"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "BitAnd %s"
-msgstr "新增 %"
+msgstr ""
#: modules/visual_script/visual_script_func_nodes.cpp
#, fuzzy
@@ -18557,9 +18557,8 @@ msgstr "「Target Sdk」版本必須高於或于「Min Sdk」版本一致。"
#: platform/android/export/export_plugin.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Code Signing"
-msgstr "訊號"
+msgstr "程式碼簽章"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -18766,11 +18765,11 @@ msgstr ""
#: platform/iphone/export/export.cpp
msgid "App Store Team ID"
-msgstr ""
+msgstr "App Store 團隊 ID"
#: platform/iphone/export/export.cpp
msgid "Provisioning Profile UUID Debug"
-msgstr ""
+msgstr "部署描述檔 UUID 偵錯"
#: platform/iphone/export/export.cpp
msgid "Code Sign Identity Debug"
@@ -18848,19 +18847,16 @@ msgid "Accessible From iTunes Sharing"
msgstr ""
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Privacy"
-msgstr "實體按鍵"
+msgstr "隱私"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Camera Usage Description"
-msgstr "說明"
+msgstr "相機使用描述"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Microphone Usage Description"
-msgstr "屬性說明"
+msgstr "麥克風使用描述"
#: platform/iphone/export/export.cpp
#, fuzzy
@@ -18933,9 +18929,8 @@ msgid "Custom BG Color"
msgstr "剪下節點"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Icons"
-msgstr "展開全部"
+msgstr "匯出圖示"
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp
@@ -19017,7 +19012,7 @@ msgstr ""
#: platform/javascript/export/export.cpp
msgid "HTML"
-msgstr ""
+msgstr "HTML"
#: platform/javascript/export/export.cpp
#, fuzzy
@@ -19052,7 +19047,7 @@ msgstr ""
#: platform/javascript/export/export.cpp
msgid "Offline Page"
-msgstr ""
+msgstr "離線頁面"
#: platform/javascript/export/export.cpp
msgid "Icon 144 X 144"
@@ -19084,16 +19079,15 @@ msgstr ""
#: platform/javascript/export/export.cpp
msgid "HTTP Host"
-msgstr ""
+msgstr "HTTP 主機"
#: platform/javascript/export/export.cpp
msgid "HTTP Port"
-msgstr ""
+msgstr "HTTP 連接埠"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Use SSL"
-msgstr "使用吸附"
+msgstr "使用 SSL"
#: platform/javascript/export/export.cpp
msgid "SSL Key"
@@ -19159,9 +19153,8 @@ msgid "Invalid entitlements file."
msgstr "無效的副檔名。"
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Invalid executable file."
-msgstr "無效的副檔名。"
+msgstr "無效的執行檔。"
#: platform/osx/export/codesign.cpp
msgid "Can't resize signature load command."
@@ -19229,24 +19222,21 @@ msgid "Removable Volumes Usage Description"
msgstr ""
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Codesign"
-msgstr "節點"
+msgstr "程式碼簽章"
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Identity"
-msgstr "向左縮排"
+msgstr "身分"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Timestamp"
-msgstr "時間"
+msgstr "時間戳"
#: platform/osx/export/export.cpp
msgid "Hardened Runtime"
-msgstr ""
+msgstr "Hardened Runtime"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19259,9 +19249,8 @@ msgid "Entitlements"
msgstr "Gizmo"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Custom File"
-msgstr "剪下節點"
+msgstr "自訂檔案"
#: platform/osx/export/export.cpp
msgid "Allow JIT Code Execution"
@@ -19281,75 +19270,64 @@ msgid "Disable Library Validation"
msgstr "已停用的按鈕"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Audio Input"
-msgstr "新增輸入"
+msgstr "音源輸入"
#: platform/osx/export/export.cpp
msgid "Address Book"
-msgstr ""
+msgstr "地址簿"
#: platform/osx/export/export.cpp
msgid "Calendars"
-msgstr ""
+msgstr "日曆"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Photos Library"
-msgstr "匯出函式庫"
+msgstr "照片圖庫"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Apple Events"
-msgstr "新增事件"
+msgstr "Apple 活動"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Debugging"
msgstr "偵錯"
#: platform/osx/export/export.cpp
msgid "App Sandbox"
-msgstr ""
+msgstr "應用程式沙盒"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Network Server"
-msgstr "網路分析工具"
+msgstr "網路伺服器"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Network Client"
-msgstr "網路分析工具"
+msgstr "網路客戶端"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Device USB"
-msgstr "裝置"
+msgstr "裝置 USB"
#: platform/osx/export/export.cpp
msgid "Device Bluetooth"
-msgstr ""
+msgstr "裝置藍芽"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Downloads"
-msgstr "下載"
+msgstr "檔案下載"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Pictures"
-msgstr "功能"
+msgstr "檔案圖片"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Music"
-msgstr "檔案"
+msgstr "檔案音樂"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Movies"
-msgstr "篩選圖塊"
+msgstr "檔案影片"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
#, fuzzy
@@ -19362,15 +19340,15 @@ msgstr "公證"
#: platform/osx/export/export.cpp
msgid "Apple ID Name"
-msgstr ""
+msgstr "Apple ID 名稱"
#: platform/osx/export/export.cpp
msgid "Apple ID Password"
-msgstr ""
+msgstr "Apple ID 密碼"
#: platform/osx/export/export.cpp
msgid "Apple Team ID"
-msgstr ""
+msgstr "Apple 團隊 ID"
#: platform/osx/export/export.cpp
msgid "Could not open icon file \"%s\"."
@@ -20004,7 +19982,7 @@ msgstr ""
#: platform/windows/export/export.cpp
msgid "Wine"
-msgstr ""
+msgstr "Wine"
#: platform/x11/export/export.cpp
msgid "32-bit executables cannot have embedded data >= 4 GiB."
@@ -27006,7 +26984,7 @@ msgstr "混合 (Mix)"
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Sidechain"
-msgstr ""
+msgstr "側鏈"
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Tap 1"