summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/SCsub2
-rw-r--r--editor/action_map_editor.cpp868
-rw-r--r--editor/action_map_editor.h183
-rw-r--r--editor/animation_bezier_editor.cpp133
-rw-r--r--editor/animation_bezier_editor.h61
-rw-r--r--editor/animation_track_editor.cpp2520
-rw-r--r--editor/animation_track_editor.h182
-rw-r--r--editor/animation_track_editor_plugins.cpp204
-rw-r--r--editor/animation_track_editor_plugins.h58
-rw-r--r--editor/array_property_edit.cpp301
-rw-r--r--editor/array_property_edit.h69
-rw-r--r--editor/audio_stream_preview.cpp66
-rw-r--r--editor/audio_stream_preview.h58
-rw-r--r--editor/code_editor.cpp1010
-rw-r--r--editor/code_editor.h64
-rw-r--r--editor/connections_dialog.cpp241
-rw-r--r--editor/connections_dialog.h66
-rw-r--r--editor/create_dialog.cpp131
-rw-r--r--editor/create_dialog.h60
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_parser.cpp60
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_parser.h58
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_protocol.cpp72
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_protocol.h58
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_server.cpp70
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_server.h58
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_types.h58
-rw-r--r--editor/debugger/editor_debugger_inspector.cpp70
-rw-r--r--editor/debugger/editor_debugger_inspector.h58
-rw-r--r--editor/debugger/editor_debugger_node.cpp194
-rw-r--r--editor/debugger/editor_debugger_node.h77
-rw-r--r--editor/debugger/editor_debugger_server.cpp62
-rw-r--r--editor/debugger/editor_debugger_server.h58
-rw-r--r--editor/debugger/editor_debugger_tree.cpp100
-rw-r--r--editor/debugger/editor_debugger_tree.h67
-rw-r--r--editor/debugger/editor_network_profiler.cpp197
-rw-r--r--editor/debugger/editor_network_profiler.h72
-rw-r--r--editor/debugger/editor_performance_profiler.cpp67
-rw-r--r--editor/debugger/editor_performance_profiler.h58
-rw-r--r--editor/debugger/editor_profiler.cpp95
-rw-r--r--editor/debugger/editor_profiler.h62
-rw-r--r--editor/debugger/editor_visual_profiler.cpp88
-rw-r--r--editor/debugger/editor_visual_profiler.h61
-rw-r--r--editor/debugger/script_editor_debugger.cpp209
-rw-r--r--editor/debugger/script_editor_debugger.h76
-rw-r--r--editor/dependency_editor.cpp101
-rw-r--r--editor/dependency_editor.h60
-rw-r--r--editor/dictionary_property_edit.cpp177
-rw-r--r--editor/dictionary_property_edit.h64
-rw-r--r--editor/doc_tools.cpp148
-rw-r--r--editor/doc_tools.h58
-rw-r--r--editor/editor_about.cpp62
-rw-r--r--editor/editor_about.h58
-rw-r--r--editor/editor_asset_installer.cpp75
-rw-r--r--editor/editor_asset_installer.h58
-rw-r--r--editor/editor_atlas_packer.cpp58
-rw-r--r--editor/editor_atlas_packer.h58
-rw-r--r--editor/editor_audio_buses.cpp121
-rw-r--r--editor/editor_audio_buses.h59
-rw-r--r--editor/editor_autoload_settings.cpp176
-rw-r--r--editor/editor_autoload_settings.h58
-rw-r--r--editor/editor_build_profile.cpp65
-rw-r--r--editor/editor_build_profile.h59
-rw-r--r--editor/editor_builders.py5
-rw-r--r--editor/editor_command_palette.cpp82
-rw-r--r--editor/editor_command_palette.h65
-rw-r--r--editor/editor_data.cpp144
-rw-r--r--editor/editor_data.h66
-rw-r--r--editor/editor_dir_dialog.cpp60
-rw-r--r--editor/editor_dir_dialog.h58
-rw-r--r--editor/editor_feature_profile.cpp72
-rw-r--r--editor/editor_feature_profile.h61
-rw-r--r--editor/editor_file_dialog.cpp97
-rw-r--r--editor/editor_file_dialog.h75
-rw-r--r--editor/editor_file_system.cpp365
-rw-r--r--editor/editor_file_system.h73
-rw-r--r--editor/editor_folding.cpp58
-rw-r--r--editor/editor_folding.h58
-rw-r--r--editor/editor_fonts.cpp142
-rw-r--r--editor/editor_fonts.h58
-rw-r--r--editor/editor_help.cpp262
-rw-r--r--editor/editor_help.h60
-rw-r--r--editor/editor_help_search.cpp164
-rw-r--r--editor/editor_help_search.h61
-rw-r--r--editor/editor_inspector.cpp442
-rw-r--r--editor/editor_inspector.h97
-rw-r--r--editor/editor_layouts_dialog.cpp70
-rw-r--r--editor/editor_layouts_dialog.h58
-rw-r--r--editor/editor_locale_dialog.cpp91
-rw-r--r--editor/editor_locale_dialog.h61
-rw-r--r--editor/editor_log.cpp90
-rw-r--r--editor/editor_log.h58
-rw-r--r--editor/editor_native_shader_source_visualizer.cpp58
-rw-r--r--editor/editor_native_shader_source_visualizer.h58
-rw-r--r--editor/editor_node.cpp1150
-rw-r--r--editor/editor_node.h149
-rw-r--r--editor/editor_path.cpp72
-rw-r--r--editor/editor_path.h58
-rw-r--r--editor/editor_paths.cpp60
-rw-r--r--editor/editor_paths.h58
-rw-r--r--editor/editor_plugin.cpp191
-rw-r--r--editor/editor_plugin.h123
-rw-r--r--editor/editor_plugin_settings.cpp66
-rw-r--r--editor/editor_plugin_settings.h59
-rw-r--r--editor/editor_properties.cpp649
-rw-r--r--editor/editor_properties.h149
-rw-r--r--editor/editor_properties_array_dict.cpp165
-rw-r--r--editor/editor_properties_array_dict.h60
-rw-r--r--editor/editor_property_name_processor.cpp92
-rw-r--r--editor/editor_property_name_processor.h59
-rw-r--r--editor/editor_quick_open.cpp97
-rw-r--r--editor/editor_quick_open.h64
-rw-r--r--editor/editor_resource_picker.cpp344
-rw-r--r--editor/editor_resource_picker.h67
-rw-r--r--editor/editor_resource_preview.cpp82
-rw-r--r--editor/editor_resource_preview.h58
-rw-r--r--editor/editor_run.cpp106
-rw-r--r--editor/editor_run.h60
-rw-r--r--editor/editor_run_native.cpp169
-rw-r--r--editor/editor_run_native.h65
-rw-r--r--editor/editor_run_script.cpp58
-rw-r--r--editor/editor_run_script.h58
-rw-r--r--editor/editor_scale.cpp58
-rw-r--r--editor/editor_scale.h58
-rw-r--r--editor/editor_sectioned_inspector.cpp72
-rw-r--r--editor/editor_sectioned_inspector.h58
-rw-r--r--editor/editor_settings.cpp102
-rw-r--r--editor/editor_settings.h58
-rw-r--r--editor/editor_settings_dialog.cpp206
-rw-r--r--editor/editor_settings_dialog.h68
-rw-r--r--editor/editor_spin_slider.cpp232
-rw-r--r--editor/editor_spin_slider.h62
-rw-r--r--editor/editor_themes.cpp561
-rw-r--r--editor/editor_themes.h69
-rw-r--r--editor/editor_title_bar.cpp60
-rw-r--r--editor/editor_title_bar.h58
-rw-r--r--editor/editor_toaster.cpp129
-rw-r--r--editor/editor_toaster.h60
-rw-r--r--editor/editor_translation.cpp58
-rw-r--r--editor/editor_translation.h58
-rw-r--r--editor/editor_translation_parser.cpp58
-rw-r--r--editor/editor_translation_parser.h58
-rw-r--r--editor/editor_undo_redo_manager.cpp256
-rw-r--r--editor/editor_undo_redo_manager.h77
-rw-r--r--editor/editor_vcs_interface.cpp62
-rw-r--r--editor/editor_vcs_interface.h62
-rw-r--r--editor/editor_zoom_widget.cpp68
-rw-r--r--editor/editor_zoom_widget.h60
-rw-r--r--editor/event_listener_line_edit.cpp204
-rw-r--r--editor/event_listener_line_edit.h79
-rw-r--r--editor/export/editor_export.cpp70
-rw-r--r--editor/export/editor_export.h58
-rw-r--r--editor/export/editor_export_platform.cpp370
-rw-r--r--editor/export/editor_export_platform.h71
-rw-r--r--editor/export/editor_export_platform_pc.cpp71
-rw-r--r--editor/export/editor_export_platform_pc.h59
-rw-r--r--editor/export/editor_export_plugin.cpp99
-rw-r--r--editor/export/editor_export_plugin.h60
-rw-r--r--editor/export/editor_export_preset.cpp67
-rw-r--r--editor/export/editor_export_preset.h67
-rw-r--r--editor/export/editor_export_shared_object.h58
-rw-r--r--editor/export/export_template_manager.cpp89
-rw-r--r--editor/export/export_template_manager.h58
-rw-r--r--editor/export/project_export.cpp148
-rw-r--r--editor/export/project_export.h60
-rw-r--r--editor/fbx_importer_manager.cpp154
-rw-r--r--editor/fbx_importer_manager.h66
-rw-r--r--editor/fileserver/editor_file_server.cpp58
-rw-r--r--editor/fileserver/editor_file_server.h58
-rw-r--r--editor/filesystem_dock.cpp357
-rw-r--r--editor/filesystem_dock.h74
-rw-r--r--editor/find_in_files.cpp119
-rw-r--r--editor/find_in_files.h60
-rw-r--r--editor/groups_editor.cpp218
-rw-r--r--editor/groups_editor.h75
-rw-r--r--editor/history_dock.cpp253
-rw-r--r--editor/history_dock.h66
-rw-r--r--editor/icons/ArrowDown.svg2
-rw-r--r--editor/icons/ArrowLeft.svg2
-rw-r--r--editor/icons/ArrowRight.svg2
-rw-r--r--editor/icons/ArrowUp.svg2
-rw-r--r--editor/icons/AutoKey.svg2
-rw-r--r--editor/icons/Blend.svg2
-rw-r--r--editor/icons/Bone.svg2
-rw-r--r--editor/icons/BoneMapHumanBody.svg27
-rw-r--r--editor/icons/CPUParticles3D.svg2
-rw-r--r--editor/icons/CameraTexture.svg2
-rw-r--r--editor/icons/CanvasItem.svg2
-rw-r--r--editor/icons/CanvasLayer.svg2
-rw-r--r--editor/icons/CharacterBody3D.svg2
-rw-r--r--editor/icons/Clear.svg2
-rw-r--r--editor/icons/CollisionPolygon3D.svg2
-rw-r--r--editor/icons/CollisionShape3D.svg2
-rw-r--r--editor/icons/CompressedTexture2D.svg2
-rw-r--r--editor/icons/CurveTexture.svg2
-rw-r--r--editor/icons/DebugSkipBreakpointsOff.svg3
-rw-r--r--editor/icons/DebugSkipBreakpointsOn.svg3
-rw-r--r--editor/icons/DirectionalLight3D.svg2
-rw-r--r--editor/icons/EditorPlugin.svg2
-rw-r--r--editor/icons/Eraser.svg2
-rw-r--r--editor/icons/FogVolume.svg2
-rw-r--r--editor/icons/GPUParticles3D.svg2
-rw-r--r--editor/icons/GPUParticlesAttractorBox3D.svg2
-rw-r--r--editor/icons/GPUParticlesAttractorSphere3D.svg2
-rw-r--r--editor/icons/GPUParticlesAttractorVectorField3D.svg2
-rw-r--r--editor/icons/GPUParticlesCollisionBox3D.svg2
-rw-r--r--editor/icons/GPUParticlesCollisionSDF3D.svg2
-rw-r--r--editor/icons/GPUParticlesCollisionSphere3D.svg2
-rw-r--r--editor/icons/GradientTexture1D.svg2
-rw-r--r--editor/icons/GuiResizerTopLeft.svg1
-rw-r--r--editor/icons/GuiVisibilityHidden.svg2
-rw-r--r--editor/icons/GuiVisibilityVisible.svg2
-rw-r--r--editor/icons/GuiVisibilityXray.svg2
-rw-r--r--editor/icons/HTTPRequest.svg2
-rw-r--r--editor/icons/History.svg2
-rw-r--r--editor/icons/Hsize.svg2
-rw-r--r--editor/icons/Image.svg2
-rw-r--r--editor/icons/ImageTexture.svg2
-rw-r--r--editor/icons/JoyAxis.svg2
-rw-r--r--editor/icons/JoyButton.svg2
-rw-r--r--editor/icons/Joypad.svg2
-rw-r--r--editor/icons/Key.svg2
-rw-r--r--editor/icons/KeyNext.svg2
-rw-r--r--editor/icons/KeyPosition.svg2
-rw-r--r--editor/icons/KeyRotation.svg2
-rw-r--r--editor/icons/KeyScale.svg2
-rw-r--r--editor/icons/LightmapProbe.svg2
-rw-r--r--editor/icons/Line.svg1
-rw-r--r--editor/icons/ListSelect.svg2
-rw-r--r--editor/icons/Loop.svg2
-rw-r--r--editor/icons/Marker3D.svg2
-rw-r--r--editor/icons/MemberAnnotation.svg2
-rw-r--r--editor/icons/MeshInstance3D.svg2
-rw-r--r--editor/icons/MeshTexture.svg2
-rw-r--r--editor/icons/MethodOverride.svg1
-rw-r--r--editor/icons/MethodOverrideAndSlot.svg1
-rw-r--r--editor/icons/MirrorX.svg2
-rw-r--r--editor/icons/MirrorY.svg2
-rw-r--r--editor/icons/MoveDown.svg2
-rw-r--r--editor/icons/MoveLeft.svg2
-rw-r--r--editor/icons/MoveRight.svg2
-rw-r--r--editor/icons/MoveUp.svg2
-rw-r--r--editor/icons/MultiMeshInstance3D.svg2
-rw-r--r--editor/icons/Navigation3D.svg2
-rw-r--r--editor/icons/NavigationLink2D.svg4
-rw-r--r--editor/icons/NavigationLink3D.svg4
-rw-r--r--editor/icons/NavigationRegion3D.svg2
-rw-r--r--editor/icons/Node3D.svg2
-rw-r--r--editor/icons/OccluderInstance3D.svg2
-rw-r--r--editor/icons/OmniLight3D.svg2
-rw-r--r--editor/icons/OneWayTile.svg1
-rw-r--r--editor/icons/ParallaxBackground.svg2
-rw-r--r--editor/icons/Path3D.svg2
-rw-r--r--editor/icons/PathFollow3D.svg2
-rw-r--r--editor/icons/PickerShapeCircle.svg1
-rw-r--r--editor/icons/PickerShapeRectangle.svg1
-rw-r--r--editor/icons/PickerShapeRectangleWheel.svg58
-rw-r--r--editor/icons/PlayRemote.svg1
-rw-r--r--editor/icons/PreviewEnvironment.svg1
-rw-r--r--editor/icons/PreviewSun.svg1
-rw-r--r--editor/icons/Progress1.svg2
-rw-r--r--editor/icons/Progress2.svg2
-rw-r--r--editor/icons/Progress3.svg2
-rw-r--r--editor/icons/Progress4.svg2
-rw-r--r--editor/icons/Progress5.svg2
-rw-r--r--editor/icons/Progress6.svg2
-rw-r--r--editor/icons/Progress7.svg2
-rw-r--r--editor/icons/Progress8.svg2
-rw-r--r--editor/icons/ProxyTexture.svg2
-rw-r--r--editor/icons/Quad.svg2
-rw-r--r--editor/icons/README.md2
-rw-r--r--editor/icons/RayCast3D.svg2
-rw-r--r--editor/icons/ReflectionProbe.svg2
-rw-r--r--editor/icons/Reload.svg2
-rw-r--r--editor/icons/ReloadSmall.svg2
-rw-r--r--editor/icons/Remove.svg2
-rw-r--r--editor/icons/RigidBody3D.svg2
-rw-r--r--editor/icons/RotateLeft.svg2
-rw-r--r--editor/icons/RotateRight.svg2
-rw-r--r--editor/icons/Search.svg2
-rw-r--r--editor/icons/Shortcut.svg2
-rw-r--r--editor/icons/Skeleton3D.svg2
-rw-r--r--editor/icons/SoftBody3D.svg2
-rw-r--r--editor/icons/SpotLight3D.svg2
-rw-r--r--editor/icons/StaticBody3D.svg2
-rw-r--r--editor/icons/SubViewport.svg2
-rw-r--r--editor/icons/Texture2DArray.svg2
-rw-r--r--editor/icons/TileSelection.svg57
-rw-r--r--editor/icons/ToolMove.svg2
-rw-r--r--editor/icons/ToolPan.svg2
-rw-r--r--editor/icons/ToolRotate.svg2
-rw-r--r--editor/icons/ToolScale.svg2
-rw-r--r--editor/icons/TrackTrigger.svg1
-rw-r--r--editor/icons/TripleBar.svg2
-rw-r--r--editor/icons/VehicleBody3D.svg2
-rw-r--r--editor/icons/VehicleWheel3D.svg2
-rw-r--r--editor/icons/Viewport.svg2
-rw-r--r--editor/icons/ViewportSpeed.svg2
-rw-r--r--editor/icons/ViewportTexture.svg2
-rw-r--r--editor/icons/VisibleOnScreenEnabler3D.svg2
-rw-r--r--editor/icons/VisibleOnScreenNotifier3D.svg2
-rw-r--r--editor/icons/VisualScriptComment.svg1
-rw-r--r--editor/icons/VisualScriptExpression.svg1
-rw-r--r--editor/icons/VoxelGI.svg2
-rw-r--r--editor/icons/WorldEnvironment.svg2
-rw-r--r--editor/icons/Zoom.svg2
-rw-r--r--editor/import/audio_stream_import_settings.cpp117
-rw-r--r--editor/import/audio_stream_import_settings.h61
-rw-r--r--editor/import/collada.cpp230
-rw-r--r--editor/import/collada.h58
-rw-r--r--editor/import/dynamic_font_import_settings.cpp295
-rw-r--r--editor/import/dynamic_font_import_settings.h74
-rw-r--r--editor/import/editor_import_collada.cpp70
-rw-r--r--editor/import/editor_import_collada.h60
-rw-r--r--editor/import/editor_import_plugin.cpp62
-rw-r--r--editor/import/editor_import_plugin.h58
-rw-r--r--editor/import/post_import_plugin_skeleton_renamer.cpp266
-rw-r--r--editor/import/post_import_plugin_skeleton_renamer.h60
-rw-r--r--editor/import/post_import_plugin_skeleton_rest_fixer.cpp58
-rw-r--r--editor/import/post_import_plugin_skeleton_rest_fixer.h58
-rw-r--r--editor/import/post_import_plugin_skeleton_track_organizer.cpp58
-rw-r--r--editor/import/post_import_plugin_skeleton_track_organizer.h58
-rw-r--r--editor/import/resource_importer_bitmask.cpp58
-rw-r--r--editor/import/resource_importer_bitmask.h58
-rw-r--r--editor/import/resource_importer_bmfont.cpp61
-rw-r--r--editor/import/resource_importer_bmfont.h58
-rw-r--r--editor/import/resource_importer_csv_translation.cpp58
-rw-r--r--editor/import/resource_importer_csv_translation.h58
-rw-r--r--editor/import/resource_importer_dynamic_font.cpp72
-rw-r--r--editor/import/resource_importer_dynamic_font.h58
-rw-r--r--editor/import/resource_importer_image.cpp58
-rw-r--r--editor/import/resource_importer_image.h58
-rw-r--r--editor/import/resource_importer_imagefont.cpp110
-rw-r--r--editor/import/resource_importer_imagefont.h58
-rw-r--r--editor/import/resource_importer_layered_texture.cpp94
-rw-r--r--editor/import/resource_importer_layered_texture.h58
-rw-r--r--editor/import/resource_importer_obj.cpp110
-rw-r--r--editor/import/resource_importer_obj.h60
-rw-r--r--editor/import/resource_importer_scene.cpp365
-rw-r--r--editor/import/resource_importer_scene.h85
-rw-r--r--editor/import/resource_importer_shader_file.cpp59
-rw-r--r--editor/import/resource_importer_shader_file.h58
-rw-r--r--editor/import/resource_importer_texture.cpp107
-rw-r--r--editor/import/resource_importer_texture.h58
-rw-r--r--editor/import/resource_importer_texture_atlas.cpp62
-rw-r--r--editor/import/resource_importer_texture_atlas.h58
-rw-r--r--editor/import/resource_importer_wav.cpp68
-rw-r--r--editor/import/resource_importer_wav.h58
-rw-r--r--editor/import/scene_import_settings.cpp93
-rw-r--r--editor/import/scene_import_settings.h58
-rw-r--r--editor/import_defaults_editor.cpp60
-rw-r--r--editor/import_defaults_editor.h58
-rw-r--r--editor/import_dock.cpp60
-rw-r--r--editor/import_dock.h58
-rw-r--r--editor/input_event_configuration_dialog.cpp634
-rw-r--r--editor/input_event_configuration_dialog.h122
-rw-r--r--editor/inspector_dock.cpp128
-rw-r--r--editor/inspector_dock.h61
-rw-r--r--editor/localization_editor.cpp114
-rw-r--r--editor/localization_editor.h60
-rw-r--r--editor/multi_node_edit.cpp70
-rw-r--r--editor/multi_node_edit.h58
-rw-r--r--editor/node_dock.cpp60
-rw-r--r--editor/node_dock.h58
-rw-r--r--editor/plugin_config_dialog.cpp75
-rw-r--r--editor/plugin_config_dialog.h58
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp81
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.h62
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp108
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.h63
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp146
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.h66
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp270
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.h81
-rw-r--r--editor/plugins/animation_library_editor.cpp87
-rw-r--r--editor/plugins/animation_library_editor.h58
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp284
-rw-r--r--editor/plugins/animation_player_editor_plugin.h98
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp203
-rw-r--r--editor/plugins/animation_state_machine_editor.h79
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp98
-rw-r--r--editor/plugins/animation_tree_editor_plugin.h65
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp146
-rw-r--r--editor/plugins/asset_library_editor_plugin.h62
-rw-r--r--editor/plugins/audio_stream_editor_plugin.cpp280
-rw-r--r--editor/plugins/audio_stream_editor_plugin.h93
-rw-r--r--editor/plugins/audio_stream_randomizer_editor_plugin.cpp74
-rw-r--r--editor/plugins/audio_stream_randomizer_editor_plugin.h58
-rw-r--r--editor/plugins/bit_map_editor_plugin.cpp60
-rw-r--r--editor/plugins/bit_map_editor_plugin.h61
-rw-r--r--editor/plugins/bone_map_editor_plugin.cpp80
-rw-r--r--editor/plugins/bone_map_editor_plugin.h62
-rw-r--r--editor/plugins/camera_3d_editor_plugin.cpp58
-rw-r--r--editor/plugins/camera_3d_editor_plugin.h58
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp781
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h95
-rw-r--r--editor/plugins/cast_2d_editor_plugin.cpp63
-rw-r--r--editor/plugins/cast_2d_editor_plugin.h62
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.cpp58
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.h58
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp61
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.h60
-rw-r--r--editor/plugins/control_editor_plugin.cpp79
-rw-r--r--editor/plugins/control_editor_plugin.h63
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.cpp68
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.h65
-rw-r--r--editor/plugins/cpu_particles_3d_editor_plugin.cpp58
-rw-r--r--editor/plugins/cpu_particles_3d_editor_plugin.h58
-rw-r--r--editor/plugins/curve_editor_plugin.cpp129
-rw-r--r--editor/plugins/curve_editor_plugin.h59
-rw-r--r--editor/plugins/debugger_editor_plugin.cpp88
-rw-r--r--editor/plugins/debugger_editor_plugin.h61
-rw-r--r--editor/plugins/editor_debugger_plugin.cpp217
-rw-r--r--editor/plugins/editor_debugger_plugin.h109
-rw-r--r--editor/plugins/editor_preview_plugins.cpp87
-rw-r--r--editor/plugins/editor_preview_plugins.h78
-rw-r--r--editor/plugins/editor_resource_conversion_plugin.cpp81
-rw-r--r--editor/plugins/editor_resource_conversion_plugin.h58
-rw-r--r--editor/plugins/font_config_plugin.cpp83
-rw-r--r--editor/plugins/font_config_plugin.h58
-rw-r--r--editor/plugins/gdextension_export_plugin.h157
-rw-r--r--editor/plugins/gpu_particles_2d_editor_plugin.cpp73
-rw-r--r--editor/plugins/gpu_particles_2d_editor_plugin.h64
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.cpp86
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.h62
-rw-r--r--editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp58
-rw-r--r--editor/plugins/gpu_particles_collision_sdf_editor_plugin.h59
-rw-r--r--editor/plugins/gradient_editor.cpp110
-rw-r--r--editor/plugins/gradient_editor.h62
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp58
-rw-r--r--editor/plugins/gradient_editor_plugin.h59
-rw-r--r--editor/plugins/gradient_texture_2d_editor_plugin.cpp80
-rw-r--r--editor/plugins/gradient_texture_2d_editor_plugin.h63
-rw-r--r--editor/plugins/input_event_editor_plugin.cpp69
-rw-r--r--editor/plugins/input_event_editor_plugin.h58
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.cpp63
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.h58
-rw-r--r--editor/plugins/lightmap_gi_editor_plugin.cpp58
-rw-r--r--editor/plugins/lightmap_gi_editor_plugin.h58
-rw-r--r--editor/plugins/line_2d_editor_plugin.cpp68
-rw-r--r--editor/plugins/line_2d_editor_plugin.h58
-rw-r--r--editor/plugins/material_editor_plugin.cpp82
-rw-r--r--editor/plugins/material_editor_plugin.h63
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp70
-rw-r--r--editor/plugins/mesh_editor_plugin.h62
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp123
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.h63
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp78
-rw-r--r--editor/plugins/mesh_library_editor_plugin.h58
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp60
-rw-r--r--editor/plugins/multimesh_editor_plugin.h62
-rw-r--r--editor/plugins/navigation_link_2d_editor_plugin.cpp63
-rw-r--r--editor/plugins/navigation_link_2d_editor_plugin.h62
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp65
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.h58
-rw-r--r--editor/plugins/node_3d_editor_gizmos.cpp471
-rw-r--r--editor/plugins/node_3d_editor_gizmos.h68
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp765
-rw-r--r--editor/plugins/node_3d_editor_plugin.h150
-rw-r--r--editor/plugins/occluder_instance_3d_editor_plugin.cpp58
-rw-r--r--editor/plugins/occluder_instance_3d_editor_plugin.h58
-rw-r--r--editor/plugins/packed_scene_editor_plugin.cpp81
-rw-r--r--editor/plugins/packed_scene_editor_plugin.h68
-rw-r--r--editor/plugins/packed_scene_translation_parser_plugin.cpp58
-rw-r--r--editor/plugins/packed_scene_translation_parser_plugin.h58
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp65
-rw-r--r--editor/plugins/path_2d_editor_plugin.h63
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp153
-rw-r--r--editor/plugins/path_3d_editor_plugin.h62
-rw-r--r--editor/plugins/physical_bone_3d_editor_plugin.cpp59
-rw-r--r--editor/plugins/physical_bone_3d_editor_plugin.h58
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp74
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.h64
-rw-r--r--editor/plugins/polygon_3d_editor_plugin.cpp68
-rw-r--r--editor/plugins/polygon_3d_editor_plugin.h66
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp75
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.h64
-rw-r--r--editor/plugins/root_motion_editor_plugin.cpp173
-rw-r--r--editor/plugins/root_motion_editor_plugin.h63
-rw-r--r--editor/plugins/script_editor_plugin.cpp588
-rw-r--r--editor/plugins/script_editor_plugin.h96
-rw-r--r--editor/plugins/script_text_editor.cpp518
-rw-r--r--editor/plugins/script_text_editor.h73
-rw-r--r--editor/plugins/shader_editor_plugin.cpp1256
-rw-r--r--editor/plugins/shader_editor_plugin.h244
-rw-r--r--editor/plugins/shader_file_editor_plugin.cpp61
-rw-r--r--editor/plugins/shader_file_editor_plugin.h58
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp63
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.h61
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp150
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.h66
-rw-r--r--editor/plugins/skeleton_ik_3d_editor_plugin.cpp58
-rw-r--r--editor/plugins/skeleton_ik_3d_editor_plugin.h58
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp67
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.h62
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp464
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h93
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp65
-rw-r--r--editor/plugins/style_box_editor_plugin.h60
-rw-r--r--editor/plugins/sub_viewport_preview_editor_plugin.cpp58
-rw-r--r--editor/plugins/sub_viewport_preview_editor_plugin.h58
-rw-r--r--editor/plugins/text_editor.cpp106
-rw-r--r--editor/plugins/text_editor.h67
-rw-r--r--editor/plugins/text_shader_editor.cpp1198
-rw-r--r--editor/plugins/text_shader_editor.h200
-rw-r--r--editor/plugins/texture_3d_editor_plugin.cpp66
-rw-r--r--editor/plugins/texture_3d_editor_plugin.h61
-rw-r--r--editor/plugins/texture_editor_plugin.cpp64
-rw-r--r--editor/plugins/texture_editor_plugin.h62
-rw-r--r--editor/plugins/texture_layered_editor_plugin.cpp68
-rw-r--r--editor/plugins/texture_layered_editor_plugin.h60
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp164
-rw-r--r--editor/plugins/texture_region_editor_plugin.h66
-rw-r--r--editor/plugins/theme_editor_plugin.cpp150
-rw-r--r--editor/plugins/theme_editor_plugin.h60
-rw-r--r--editor/plugins/theme_editor_preview.cpp63
-rw-r--r--editor/plugins/theme_editor_preview.h58
-rw-r--r--editor/plugins/tiles/atlas_merging_dialog.cpp145
-rw-r--r--editor/plugins/tiles/atlas_merging_dialog.h63
-rw-r--r--editor/plugins/tiles/tile_atlas_view.cpp155
-rw-r--r--editor/plugins/tiles/tile_atlas_view.h60
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp512
-rw-r--r--editor/plugins/tiles/tile_data_editors.h72
-rw-r--r--editor/plugins/tiles/tile_map_editor.cpp309
-rw-r--r--editor/plugins/tiles/tile_map_editor.h65
-rw-r--r--editor/plugins/tiles/tile_proxies_manager_dialog.cpp82
-rw-r--r--editor/plugins/tiles/tile_proxies_manager_dialog.h64
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.cpp556
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.h77
-rw-r--r--editor/plugins/tiles/tile_set_editor.cpp214
-rw-r--r--editor/plugins/tiles/tile_set_editor.h66
-rw-r--r--editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp73
-rw-r--r--editor/plugins/tiles/tile_set_scenes_collection_source_editor.h62
-rw-r--r--editor/plugins/tiles/tiles_editor_plugin.cpp119
-rw-r--r--editor/plugins/tiles/tiles_editor_plugin.h66
-rw-r--r--editor/plugins/version_control_editor_plugin.cpp182
-rw-r--r--editor/plugins/version_control_editor_plugin.h66
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp1121
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h89
-rw-r--r--editor/plugins/voxel_gi_editor_plugin.cpp58
-rw-r--r--editor/plugins/voxel_gi_editor_plugin.h59
-rw-r--r--editor/pot_generator.cpp79
-rw-r--r--editor/pot_generator.h58
-rw-r--r--editor/progress_dialog.cpp80
-rw-r--r--editor/progress_dialog.h58
-rw-r--r--editor/project_converter_3_to_4.cpp536
-rw-r--r--editor/project_converter_3_to_4.h59
-rw-r--r--editor/project_manager.cpp417
-rw-r--r--editor/project_manager.h63
-rw-r--r--editor/project_settings_editor.cpp109
-rw-r--r--editor/project_settings_editor.h65
-rw-r--r--editor/property_selector.cpp58
-rw-r--r--editor/property_selector.h58
-rw-r--r--editor/register_editor_types.cpp222
-rw-r--r--editor/register_editor_types.h37
-rw-r--r--editor/register_exporters.h58
-rw-r--r--editor/rename_dialog.cpp75
-rw-r--r--editor/rename_dialog.h64
-rw-r--r--editor/reparent_dialog.cpp59
-rw-r--r--editor/reparent_dialog.h58
-rw-r--r--editor/scene_create_dialog.cpp70
-rw-r--r--editor/scene_create_dialog.h58
-rw-r--r--editor/scene_tree_dock.cpp705
-rw-r--r--editor/scene_tree_dock.h97
-rw-r--r--editor/scene_tree_editor.cpp216
-rw-r--r--editor/scene_tree_editor.h72
-rw-r--r--editor/script_create_dialog.cpp110
-rw-r--r--editor/script_create_dialog.h63
-rw-r--r--editor/shader_create_dialog.cpp88
-rw-r--r--editor/shader_create_dialog.h58
-rw-r--r--editor/shader_globals_editor.cpp111
-rw-r--r--editor/shader_globals_editor.h58
-rw-r--r--editor/translations/af.po26
-rw-r--r--editor/translations/ar.po658
-rw-r--r--editor/translations/az.po23
-rw-r--r--editor/translations/bg.po446
-rw-r--r--editor/translations/bn.po40
-rw-r--r--editor/translations/br.po23
-rw-r--r--editor/translations/ca.po27
-rw-r--r--editor/translations/cs.po1109
-rw-r--r--editor/translations/da.po35
-rw-r--r--editor/translations/de.po71
-rw-r--r--editor/translations/editor.pot26
-rw-r--r--editor/translations/el.po382
-rw-r--r--editor/translations/en_Shaw.po23
-rw-r--r--editor/translations/eo.po27
-rw-r--r--editor/translations/es.po1203
-rw-r--r--editor/translations/es_AR.po128
-rw-r--r--editor/translations/et.po906
-rw-r--r--editor/translations/eu.po35
-rwxr-xr-xeditor/translations/extract.py37
-rw-r--r--editor/translations/fa.po665
-rw-r--r--editor/translations/fi.po317
-rw-r--r--editor/translations/fil.po125
-rw-r--r--editor/translations/fr.po1285
-rw-r--r--editor/translations/ga.po23
-rw-r--r--editor/translations/gl.po27
-rw-r--r--editor/translations/he.po589
-rw-r--r--editor/translations/hi.po337
-rw-r--r--editor/translations/hr.po69
-rw-r--r--editor/translations/hu.po26
-rw-r--r--editor/translations/id.po50
-rw-r--r--editor/translations/ig.po22
-rw-r--r--editor/translations/is.po23
-rw-r--r--editor/translations/it.po1198
-rw-r--r--editor/translations/ja.po1901
-rw-r--r--editor/translations/ka.po23
-rw-r--r--editor/translations/km.po22
-rw-r--r--editor/translations/ko.po2086
-rw-r--r--editor/translations/lt.po23
-rw-r--r--editor/translations/lv.po23
-rw-r--r--editor/translations/mk.po45
-rw-r--r--editor/translations/ml.po22
-rw-r--r--editor/translations/mr.po22
-rw-r--r--editor/translations/ms.po23
-rw-r--r--editor/translations/nb.po147
-rw-r--r--editor/translations/nl.po152
-rw-r--r--editor/translations/pl.po1423
-rw-r--r--editor/translations/pr.po23
-rw-r--r--editor/translations/pt.po2635
-rw-r--r--editor/translations/pt_BR.po541
-rw-r--r--editor/translations/ro.po743
-rw-r--r--editor/translations/ru.po1591
-rw-r--r--editor/translations/si.po23
-rw-r--r--editor/translations/sk.po32
-rw-r--r--editor/translations/sl.po26
-rw-r--r--editor/translations/sq.po23
-rw-r--r--editor/translations/sr_Cyrl.po25
-rw-r--r--editor/translations/sr_Latn.po23
-rw-r--r--editor/translations/sv.po84
-rw-r--r--editor/translations/te.po23
-rw-r--r--editor/translations/th.po54
-rw-r--r--editor/translations/tl.po23
-rw-r--r--editor/translations/tr.po123
-rw-r--r--editor/translations/uk.po266
-rw-r--r--editor/translations/ur_PK.po23
-rw-r--r--editor/translations/vi.po40
-rw-r--r--editor/translations/zh_CN.po125
-rw-r--r--editor/translations/zh_HK.po26
-rw-r--r--editor/translations/zh_TW.po170
639 files changed, 40120 insertions, 37937 deletions
diff --git a/editor/SCsub b/editor/SCsub
index c217f162b4..32ad88add5 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -24,7 +24,7 @@ def _make_doc_data_class_path(to_path):
g.close()
-if env["tools"]:
+if env.editor_build:
# Register exporters
reg_exporters_inc = '#include "register_exporters.h"\n'
reg_exporters = "void register_exporters() {\n"
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index b6348c5952..cb8d98932d 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -1,758 +1,41 @@
-/*************************************************************************/
-/* action_map_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "action_map_editor.h"
-
-#include "core/input/input_map.h"
-#include "core/os/keyboard.h"
-#include "editor/editor_scale.h"
-#include "scene/gui/separator.h"
-
-/////////////////////////////////////////
-
-// Maps to 2*axis if value is neg, or 2*axis+1 if value is pos.
-static const char *_joy_axis_descriptions[(size_t)JoyAxis::MAX * 2] = {
- TTRC("Left Stick Left, Joystick 0 Left"),
- TTRC("Left Stick Right, Joystick 0 Right"),
- TTRC("Left Stick Up, Joystick 0 Up"),
- TTRC("Left Stick Down, Joystick 0 Down"),
- TTRC("Right Stick Left, Joystick 1 Left"),
- TTRC("Right Stick Right, Joystick 1 Right"),
- TTRC("Right Stick Up, Joystick 1 Up"),
- TTRC("Right Stick Down, Joystick 1 Down"),
- TTRC("Joystick 2 Left"),
- TTRC("Left Trigger, Sony L2, Xbox LT, Joystick 2 Right"),
- TTRC("Joystick 2 Up"),
- TTRC("Right Trigger, Sony R2, Xbox RT, Joystick 2 Down"),
- TTRC("Joystick 3 Left"),
- TTRC("Joystick 3 Right"),
- TTRC("Joystick 3 Up"),
- TTRC("Joystick 3 Down"),
- TTRC("Joystick 4 Left"),
- TTRC("Joystick 4 Right"),
- TTRC("Joystick 4 Up"),
- TTRC("Joystick 4 Down"),
-};
-
-String InputEventConfigurationDialog::get_event_text(const Ref<InputEvent> &p_event, bool p_include_device) const {
- 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();
-
- Ref<InputEventKey> key = p_event;
- if (key.is_valid() && key->is_command_or_control_autoremap()) {
-#ifdef MACOS_ENABLED
- text = text.replace("Command", "Command/Ctrl");
-#else
- text = text.replace("Ctrl", "Command/Ctrl");
-#endif
- }
- Ref<InputEventMouse> mouse = p_event;
- Ref<InputEventJoypadMotion> jp_motion = p_event;
- Ref<InputEventJoypadButton> jp_button = p_event;
- if (jp_motion.is_valid()) {
- // Joypad motion events will display slightly differently than what the event->as_text() provides. See #43660.
- String desc = TTR("Unknown Joypad Axis");
- if (jp_motion->get_axis() < JoyAxis::MAX) {
- desc = RTR(_joy_axis_descriptions[2 * (size_t)jp_motion->get_axis() + (jp_motion->get_axis_value() < 0 ? 0 : 1)]);
- }
-
- text = vformat("Joypad Axis %s %s (%s)", itos((int64_t)jp_motion->get_axis()), jp_motion->get_axis_value() < 0 ? "-" : "+", desc);
- }
- if (p_include_device && (mouse.is_valid() || jp_button.is_valid() || jp_motion.is_valid())) {
- String device_string = _get_device_string(p_event->get_device());
- text += vformat(" - %s", device_string);
- }
-
- return text;
-}
-
-void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, bool p_update_input_list_selection) {
- if (p_event.is_valid()) {
- event = p_event;
-
- // Update Label
- event_as_text->set_text(get_event_text(event, true));
-
- Ref<InputEventKey> k = p_event;
- Ref<InputEventMouseButton> mb = p_event;
- Ref<InputEventJoypadButton> joyb = p_event;
- Ref<InputEventJoypadMotion> joym = p_event;
- Ref<InputEventWithModifiers> mod = p_event;
-
- // Update option values and visibility
- bool show_mods = false;
- bool show_device = false;
- bool show_phys_key = false;
-
- if (mod.is_valid()) {
- show_mods = true;
- mod_checkboxes[MOD_ALT]->set_pressed(mod->is_alt_pressed());
- mod_checkboxes[MOD_SHIFT]->set_pressed(mod->is_shift_pressed());
- mod_checkboxes[MOD_CTRL]->set_pressed(mod->is_ctrl_pressed());
- mod_checkboxes[MOD_META]->set_pressed(mod->is_meta_pressed());
-
- autoremap_command_or_control_checkbox->set_pressed(mod->is_command_or_control_autoremap());
- }
-
- if (k.is_valid()) {
- show_phys_key = true;
- physical_key_checkbox->set_pressed(k->get_physical_keycode() != Key::NONE && k->get_keycode() == Key::NONE);
-
- } else if (joyb.is_valid() || joym.is_valid() || mb.is_valid()) {
- show_device = true;
- _set_current_device(event->get_device());
- }
-
- mod_container->set_visible(show_mods);
- device_container->set_visible(show_device);
- physical_key_checkbox->set_visible(show_phys_key);
- additional_options_container->show();
-
- // Update selected item in input list.
- if (p_update_input_list_selection && (k.is_valid() || joyb.is_valid() || joym.is_valid() || mb.is_valid())) {
- TreeItem *category = input_list_tree->get_root()->get_first_child();
- while (category) {
- TreeItem *input_item = category->get_first_child();
-
- if (input_item != nullptr) {
- // 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) {
- return;
- }
-
- // If event type matches input types of this category.
- if ((k.is_valid() && input_type == INPUT_KEY) || (joyb.is_valid() && input_type == INPUT_JOY_BUTTON) || (joym.is_valid() && input_type == INPUT_JOY_MOTION) || (mb.is_valid() && input_type == INPUT_MOUSE_BUTTON)) {
- // Loop through all items of this category until one matches.
- while (input_item) {
- bool key_match = k.is_valid() && (Variant(k->get_keycode()) == input_item->get_meta("__keycode") || Variant(k->get_physical_keycode()) == input_item->get_meta("__keycode"));
- bool joyb_match = joyb.is_valid() && Variant(joyb->get_button_index()) == input_item->get_meta("__index");
- bool joym_match = joym.is_valid() && Variant(joym->get_axis()) == input_item->get_meta("__axis") && joym->get_axis_value() == (float)input_item->get_meta("__value");
- bool mb_match = mb.is_valid() && Variant(mb->get_button_index()) == input_item->get_meta("__index");
- if (key_match || joyb_match || joym_match || mb_match) {
- category->set_collapsed(false);
- input_item->select(0);
- input_list_tree->ensure_cursor_is_visible();
- return;
- }
- input_item = input_item->get_next();
- }
- }
- }
-
- category->set_collapsed(true); // Event not in this category, so collapse;
- category = category->get_next();
- }
- }
- } else {
- // Event is not valid, reset dialog
- event = p_event;
- Vector<String> strings;
-
- // Reset message, promp for input according to which input types are allowed.
- String text = TTR("Perform an Input (%s).");
-
- if (allowed_input_types & INPUT_KEY) {
- strings.append(TTR("Key"));
- }
-
- if (allowed_input_types & INPUT_JOY_BUTTON) {
- strings.append(TTR("Joypad Button"));
- }
- if (allowed_input_types & INPUT_JOY_MOTION) {
- strings.append(TTR("Joypad Axis"));
- }
- if (allowed_input_types & INPUT_MOUSE_BUTTON) {
- strings.append(TTR("Mouse Button in area below"));
- }
- if (strings.size() == 0) {
- text = TTR("Input Event dialog has been misconfigured: No input types are allowed.");
- event_as_text->set_text(text);
- } else {
- String insert_text = String(", ").join(strings);
- event_as_text->set_text(vformat(text, insert_text));
- }
-
- additional_options_container->hide();
- input_list_tree->deselect_all();
- _update_input_list();
- }
-}
-
-void InputEventConfigurationDialog::_tab_selected(int p_tab) {
- Callable signal_method = callable_mp(this, &InputEventConfigurationDialog::_listen_window_input);
- if (p_tab == 0) {
- // Start Listening.
- if (!is_connected("window_input", signal_method)) {
- connect("window_input", signal_method);
- }
- } else {
- // Stop Listening.
- if (is_connected("window_input", signal_method)) {
- disconnect("window_input", signal_method);
- }
- input_list_tree->call_deferred(SNAME("ensure_cursor_is_visible"));
- if (input_list_tree->get_selected() == nullptr) {
- // If nothing selected, scroll to top.
- input_list_tree->scroll_to_item(input_list_tree->get_root());
- }
- }
-}
-
-void InputEventConfigurationDialog::_listen_window_input(const Ref<InputEvent> &p_event) {
- // Ignore if echo or not pressed
- if (p_event->is_echo() || !p_event->is_pressed()) {
- return;
- }
-
- // Ignore mouse motion
- Ref<InputEventMouseMotion> mm = p_event;
- if (mm.is_valid()) {
- return;
- }
-
- // Ignore mouse button if not in the detection rect
- Ref<InputEventMouseButton> mb = p_event;
- if (mb.is_valid()) {
- Rect2 r = mouse_detection_rect->get_rect();
- if (!r.has_point(mouse_detection_rect->get_local_mouse_position() + r.get_position())) {
- return;
- }
- }
-
- // Create an editable reference
- Ref<InputEvent> received_event = p_event;
-
- // Check what the type is and if it is allowed.
- Ref<InputEventKey> k = received_event;
- Ref<InputEventJoypadButton> joyb = received_event;
- Ref<InputEventJoypadMotion> joym = received_event;
-
- int type = 0;
- if (k.is_valid()) {
- type = INPUT_KEY;
- } else if (joyb.is_valid()) {
- type = INPUT_JOY_BUTTON;
- } else if (joym.is_valid()) {
- type = INPUT_JOY_MOTION;
- } else if (mb.is_valid()) {
- type = INPUT_MOUSE_BUTTON;
- }
-
- if (!(allowed_input_types & type)) {
- return;
- }
-
- if (joym.is_valid()) {
- float axis_value = joym->get_axis_value();
- if (ABS(axis_value) < 0.9) {
- // Ignore motion below 0.9 magnitude to avoid accidental touches
- return;
- } else {
- // Always make the value 1 or -1 for display consistency
- joym->set_axis_value(SIGN(axis_value));
- }
- }
-
- 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_keycode(Key::NONE);
- } else {
- k->set_physical_keycode(Key::NONE);
- }
- }
-
- Ref<InputEventWithModifiers> mod = received_event;
- if (mod.is_valid()) {
- mod->set_window_id(0);
- }
-
- // Maintain device selection.
- received_event->set_device(_get_current_device());
-
- _set_event(received_event);
- set_input_as_handled();
-}
-
-void InputEventConfigurationDialog::_search_term_updated(const String &) {
- _update_input_list();
-}
-
-void InputEventConfigurationDialog::_update_input_list() {
- input_list_tree->clear();
-
- TreeItem *root = input_list_tree->create_item();
- String search_term = input_list_search->get_text();
-
- bool collapse = input_list_search->get_text().is_empty();
-
- if (allowed_input_types & INPUT_KEY) {
- TreeItem *kb_root = input_list_tree->create_item(root);
- kb_root->set_text(0, TTR("Keyboard Keys"));
- kb_root->set_icon(0, icon_cache.keyboard);
- kb_root->set_collapsed(collapse);
- kb_root->set_meta("__type", INPUT_KEY);
-
- for (int i = 0; i < keycode_get_count(); i++) {
- String name = keycode_get_name_by_index(i);
-
- if (!search_term.is_empty() && name.findn(search_term) == -1) {
- continue;
- }
-
- TreeItem *item = input_list_tree->create_item(kb_root);
- item->set_text(0, name);
- item->set_meta("__keycode", keycode_get_value_by_index(i));
- }
- }
-
- if (allowed_input_types & INPUT_MOUSE_BUTTON) {
- TreeItem *mouse_root = input_list_tree->create_item(root);
- mouse_root->set_text(0, TTR("Mouse Buttons"));
- mouse_root->set_icon(0, icon_cache.mouse);
- mouse_root->set_collapsed(collapse);
- mouse_root->set_meta("__type", INPUT_MOUSE_BUTTON);
-
- MouseButton mouse_buttons[9] = { MouseButton::LEFT, MouseButton::RIGHT, MouseButton::MIDDLE, MouseButton::WHEEL_UP, MouseButton::WHEEL_DOWN, MouseButton::WHEEL_LEFT, MouseButton::WHEEL_RIGHT, MouseButton::MB_XBUTTON1, MouseButton::MB_XBUTTON2 };
- for (int i = 0; i < 9; i++) {
- Ref<InputEventMouseButton> mb;
- mb.instantiate();
- mb->set_button_index(mouse_buttons[i]);
- String desc = get_event_text(mb, false);
-
- if (!search_term.is_empty() && desc.findn(search_term) == -1) {
- continue;
- }
-
- TreeItem *item = input_list_tree->create_item(mouse_root);
- item->set_text(0, desc);
- item->set_meta("__index", mouse_buttons[i]);
- }
- }
-
- if (allowed_input_types & INPUT_JOY_BUTTON) {
- TreeItem *joyb_root = input_list_tree->create_item(root);
- joyb_root->set_text(0, TTR("Joypad Buttons"));
- joyb_root->set_icon(0, icon_cache.joypad_button);
- joyb_root->set_collapsed(collapse);
- joyb_root->set_meta("__type", INPUT_JOY_BUTTON);
-
- for (int i = 0; i < (int)JoyButton::MAX; i++) {
- Ref<InputEventJoypadButton> joyb;
- joyb.instantiate();
- joyb->set_button_index((JoyButton)i);
- String desc = get_event_text(joyb, false);
-
- if (!search_term.is_empty() && desc.findn(search_term) == -1) {
- continue;
- }
-
- TreeItem *item = input_list_tree->create_item(joyb_root);
- item->set_text(0, desc);
- item->set_meta("__index", i);
- }
- }
-
- if (allowed_input_types & INPUT_JOY_MOTION) {
- TreeItem *joya_root = input_list_tree->create_item(root);
- joya_root->set_text(0, TTR("Joypad Axes"));
- joya_root->set_icon(0, icon_cache.joypad_axis);
- joya_root->set_collapsed(collapse);
- joya_root->set_meta("__type", INPUT_JOY_MOTION);
-
- for (int i = 0; i < (int)JoyAxis::MAX * 2; i++) {
- int axis = i / 2;
- int direction = (i & 1) ? 1 : -1;
- Ref<InputEventJoypadMotion> joym;
- joym.instantiate();
- joym->set_axis((JoyAxis)axis);
- joym->set_axis_value(direction);
- String desc = get_event_text(joym, false);
-
- if (!search_term.is_empty() && desc.findn(search_term) == -1) {
- continue;
- }
-
- TreeItem *item = input_list_tree->create_item(joya_root);
- item->set_text(0, desc);
- item->set_meta("__axis", i >> 1);
- item->set_meta("__value", (i & 1) ? 1 : -1);
- }
- }
-}
-
-void InputEventConfigurationDialog::_mod_toggled(bool p_checked, int p_index) {
- Ref<InputEventWithModifiers> ie = event;
-
- // Not event with modifiers
- if (ie.is_null()) {
- return;
- }
-
- if (p_index == 0) {
- ie->set_alt_pressed(p_checked);
- } else if (p_index == 1) {
- ie->set_shift_pressed(p_checked);
- } else if (p_index == 2) {
- if (!autoremap_command_or_control_checkbox->is_pressed()) {
- ie->set_ctrl_pressed(p_checked);
- }
- } else if (p_index == 3) {
- if (!autoremap_command_or_control_checkbox->is_pressed()) {
- ie->set_meta_pressed(p_checked);
- }
- }
-
- _set_event(ie);
-}
-
-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);
- }
-
- if (p_checked) {
- mod_checkboxes[MOD_META]->hide();
- mod_checkboxes[MOD_CTRL]->hide();
- } else {
- mod_checkboxes[MOD_META]->show();
- mod_checkboxes[MOD_CTRL]->show();
- }
-}
+/**************************************************************************/
+/* action_map_editor.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 "editor/action_map_editor.h"
-void InputEventConfigurationDialog::_physical_keycode_toggled(bool p_checked) {
- Ref<InputEventKey> k = event;
-
- if (k.is_null()) {
- return;
- }
-
- if (p_checked) {
- k->set_physical_keycode(k->get_keycode());
- k->set_keycode(Key::NONE);
- } else {
- k->set_keycode((Key)k->get_physical_keycode());
- k->set_physical_keycode(Key::NONE);
- }
-
- _set_event(k);
-}
-
-void InputEventConfigurationDialog::_input_list_item_selected() {
- TreeItem *selected = input_list_tree->get_selected();
-
- // Invalid tree selection - type only exists on the "category" items, which are not a valid selection.
- if (selected->has_meta("__type")) {
- return;
- }
-
- InputEventConfigurationDialog::InputType input_type = (InputEventConfigurationDialog::InputType)(int)selected->get_parent()->get_meta("__type");
-
- switch (input_type) {
- case InputEventConfigurationDialog::INPUT_KEY: {
- Key keycode = (Key)(int)selected->get_meta("__keycode");
- 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);
- }
-
- // 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()) {
- k->set_command_or_control_autoremap(true);
- } else {
- k->set_ctrl_pressed(mod_checkboxes[MOD_CTRL]->is_pressed());
- k->set_meta_pressed(mod_checkboxes[MOD_META]->is_pressed());
- }
-
- _set_event(k, false);
- } break;
- case InputEventConfigurationDialog::INPUT_MOUSE_BUTTON: {
- MouseButton idx = (MouseButton)(int)selected->get_meta("__index");
- Ref<InputEventMouseButton> mb;
- mb.instantiate();
- mb->set_button_index(idx);
- // Maintain modifier state from checkboxes
- mb->set_alt_pressed(mod_checkboxes[MOD_ALT]->is_pressed());
- mb->set_shift_pressed(mod_checkboxes[MOD_SHIFT]->is_pressed());
- if (autoremap_command_or_control_checkbox->is_pressed()) {
- mb->set_command_or_control_autoremap(true);
- } else {
- mb->set_ctrl_pressed(mod_checkboxes[MOD_CTRL]->is_pressed());
- mb->set_meta_pressed(mod_checkboxes[MOD_META]->is_pressed());
- }
-
- // Maintain selected device
- mb->set_device(_get_current_device());
-
- _set_event(mb, false);
- } break;
- case InputEventConfigurationDialog::INPUT_JOY_BUTTON: {
- JoyButton idx = (JoyButton)(int)selected->get_meta("__index");
- Ref<InputEventJoypadButton> jb = InputEventJoypadButton::create_reference(idx);
-
- // Maintain selected device
- jb->set_device(_get_current_device());
-
- _set_event(jb, false);
- } break;
- case InputEventConfigurationDialog::INPUT_JOY_MOTION: {
- JoyAxis axis = (JoyAxis)(int)selected->get_meta("__axis");
- int value = selected->get_meta("__value");
-
- Ref<InputEventJoypadMotion> jm;
- jm.instantiate();
- jm->set_axis(axis);
- jm->set_axis_value(value);
-
- // Maintain selected device
- jm->set_device(_get_current_device());
-
- _set_event(jm, false);
- } break;
- }
-}
-
-void InputEventConfigurationDialog::_device_selection_changed(int p_option_button_index) {
- // Subtract 1 as option index 0 corresponds to "All Devices" (value of -1)
- // and option index 1 corresponds to device 0, etc...
- event->set_device(p_option_button_index - 1);
- event_as_text->set_text(get_event_text(event, true));
-}
-
-void InputEventConfigurationDialog::_set_current_device(int p_device) {
- device_id_option->select(p_device + 1);
-}
-
-int InputEventConfigurationDialog::_get_current_device() const {
- return device_id_option->get_selected() - 1;
-}
-
-String InputEventConfigurationDialog::_get_device_string(int p_device) const {
- if (p_device == InputMap::ALL_DEVICES) {
- return TTR("All Devices");
- }
- return TTR("Device") + " " + itos(p_device);
-}
-
-void InputEventConfigurationDialog::_notification(int p_what) {
- switch (p_what) {
- case NOTIFICATION_ENTER_TREE:
- 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")));
-
- icon_cache.keyboard = get_theme_icon(SNAME("Keyboard"), SNAME("EditorIcons"));
- icon_cache.mouse = get_theme_icon(SNAME("Mouse"), SNAME("EditorIcons"));
- icon_cache.joypad_button = get_theme_icon(SNAME("JoyButton"), SNAME("EditorIcons"));
- icon_cache.joypad_axis = get_theme_icon(SNAME("JoyAxis"), SNAME("EditorIcons"));
-
- _update_input_list();
- } break;
- }
-}
-
-void InputEventConfigurationDialog::popup_and_configure(const Ref<InputEvent> &p_event) {
- if (p_event.is_valid()) {
- _set_event(p_event);
- } else {
- // Clear Event
- _set_event(p_event);
-
- // 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.
- // 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);
-
- autoremap_command_or_control_checkbox->set_pressed(false);
- _set_current_device(0);
-
- // Switch to "Listen" tab
- tab_container->set_current_tab(0);
-
- // Select "All Devices" by default.
- device_id_option->select(0);
- }
-
- popup_centered(Size2(0, 400) * EDSCALE);
-}
-
-Ref<InputEvent> InputEventConfigurationDialog::get_event() const {
- return event;
-}
-
-void InputEventConfigurationDialog::set_allowed_input_types(int p_type_masks) {
- allowed_input_types = p_type_masks;
-}
-
-InputEventConfigurationDialog::InputEventConfigurationDialog() {
- allowed_input_types = INPUT_KEY | INPUT_MOUSE_BUTTON | INPUT_JOY_BUTTON | INPUT_JOY_MOTION | INPUT_MOUSE_BUTTON;
-
- set_title(TTR("Event Configuration"));
- set_min_size(Size2i(550 * EDSCALE, 0)); // Min width
-
- VBoxContainer *main_vbox = memnew(VBoxContainer);
- add_child(main_vbox);
-
- tab_container = memnew(TabContainer);
- tab_container->set_use_hidden_tabs_for_min_size(true);
- tab_container->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- tab_container->set_theme_type_variation("TabContainerOdd");
- tab_container->connect("tab_selected", callable_mp(this, &InputEventConfigurationDialog::_tab_selected));
- main_vbox->add_child(tab_container);
-
- // Listen to input tab
- VBoxContainer *vb = memnew(VBoxContainer);
- vb->set_name(TTR("Listen for Input"));
- event_as_text = memnew(Label);
- event_as_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
- vb->add_child(event_as_text);
- // Mouse button detection rect (Mouse button event outside this rect will be ignored)
- mouse_detection_rect = memnew(Panel);
- mouse_detection_rect->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- vb->add_child(mouse_detection_rect);
- tab_container->add_child(vb);
-
- // List of all input options to manually select from.
-
- VBoxContainer *manual_vbox = memnew(VBoxContainer);
- manual_vbox->set_name(TTR("Manual Selection"));
- manual_vbox->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- tab_container->add_child(manual_vbox);
-
- input_list_search = memnew(LineEdit);
- input_list_search->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- input_list_search->set_placeholder(TTR("Filter Inputs"));
- input_list_search->set_clear_button_enabled(true);
- input_list_search->connect("text_changed", callable_mp(this, &InputEventConfigurationDialog::_search_term_updated));
- manual_vbox->add_child(input_list_search);
-
- input_list_tree = memnew(Tree);
- input_list_tree->set_custom_minimum_size(Size2(0, 100 * EDSCALE)); // Min height for tree
- input_list_tree->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_input_list_item_selected));
- input_list_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- manual_vbox->add_child(input_list_tree);
-
- input_list_tree->set_hide_root(true);
- input_list_tree->set_columns(1);
-
- _update_input_list();
-
- // Additional Options
- additional_options_container = memnew(VBoxContainer);
- additional_options_container->hide();
-
- Label *opts_label = memnew(Label);
- opts_label->set_theme_type_variation("HeaderSmall");
- opts_label->set_text(TTR("Additional Options"));
- additional_options_container->add_child(opts_label);
-
- // Device Selection
- device_container = memnew(HBoxContainer);
- device_container->set_h_size_flags(Control::SIZE_EXPAND_FILL);
-
- Label *device_label = memnew(Label);
- device_label->set_theme_type_variation("HeaderSmall");
- device_label->set_text(TTR("Device:"));
- device_container->add_child(device_label);
-
- device_id_option = memnew(OptionButton);
- device_id_option->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- for (int i = -1; i < 8; i++) {
- device_id_option->add_item(_get_device_string(i));
- }
- device_id_option->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_device_selection_changed));
- _set_current_device(InputMap::ALL_DEVICES);
- device_container->add_child(device_id_option);
-
- device_container->hide();
- additional_options_container->add_child(device_container);
-
- // Modifier Selection
- mod_container = memnew(HBoxContainer);
- for (int i = 0; i < MOD_MAX; i++) {
- String name = mods[i];
- mod_checkboxes[i] = memnew(CheckBox);
- mod_checkboxes[i]->connect("toggled", callable_mp(this, &InputEventConfigurationDialog::_mod_toggled).bind(i));
- mod_checkboxes[i]->set_text(name);
- mod_checkboxes[i]->set_tooltip_text(TTR(mods_tip[i]));
- mod_container->add_child(mod_checkboxes[i]);
- }
-
- mod_container->add_child(memnew(VSeparator));
-
- autoremap_command_or_control_checkbox = memnew(CheckBox);
- autoremap_command_or_control_checkbox->connect("toggled", callable_mp(this, &InputEventConfigurationDialog::_autoremap_command_or_control_toggled));
- autoremap_command_or_control_checkbox->set_pressed(false);
- autoremap_command_or_control_checkbox->set_text(TTR("Command / Control (auto)"));
- autoremap_command_or_control_checkbox->set_tooltip_text(TTR("Automatically remaps between 'Meta' ('Command') and 'Control' depending on current platform."));
- mod_container->add_child(autoremap_command_or_control_checkbox);
-
- mod_container->hide();
- additional_options_container->add_child(mod_container);
-
- // Physical Key Checkbox
-
- 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);
-
- main_vbox->add_child(additional_options_container);
-
- // Default to first tab
- tab_container->set_current_tab(0);
-}
-
-/////////////////////////////////////////
+#include "editor/editor_scale.h"
+#include "editor/event_listener_line_edit.h"
+#include "editor/input_event_configuration_dialog.h"
+#include "scene/gui/check_button.h"
+#include "scene/gui/tree.h"
+#include "scene/scene_string_names.h"
static bool _is_action_name_valid(const String &p_name) {
const char32_t *cstr = p_name.get_data();
@@ -944,6 +227,12 @@ void ActionMapEditor::_search_term_updated(const String &) {
update_action_list();
}
+void ActionMapEditor::_search_by_event(const Ref<InputEvent> &p_event) {
+ if (p_event.is_null() || (p_event->is_pressed() && !p_event->is_echo())) {
+ update_action_list();
+ }
+}
+
Variant ActionMapEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
TreeItem *selected = action_tree->get_selected();
if (!selected) {
@@ -1065,15 +354,13 @@ 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")));
ADD_SIGNAL(MethodInfo("action_renamed", PropertyInfo(Variant::STRING, "old_name"), PropertyInfo(Variant::STRING, "new_name")));
ADD_SIGNAL(MethodInfo("action_reordered", PropertyInfo(Variant::STRING, "action_name"), PropertyInfo(Variant::STRING, "relative_to"), PropertyInfo(Variant::BOOL, "before")));
+ ADD_SIGNAL(MethodInfo(SNAME("filter_focused")));
+ ADD_SIGNAL(MethodInfo(SNAME("filter_unfocused")));
}
LineEdit *ActionMapEditor::get_search_box() const {
@@ -1084,6 +371,22 @@ InputEventConfigurationDialog *ActionMapEditor::get_configuration_dialog() {
return event_config_dialog;
}
+bool ActionMapEditor::_should_display_action(const String &p_name, const Array &p_events) const {
+ const Ref<InputEvent> search_ev = action_list_search_by_event->get_event();
+ bool event_match = true;
+ if (search_ev.is_valid()) {
+ event_match = false;
+ for (int i = 0; i < p_events.size(); ++i) {
+ const Ref<InputEvent> ev = p_events[i];
+ if (ev.is_valid() && ev->is_match(search_ev, true)) {
+ event_match = true;
+ }
+ }
+ }
+
+ return event_match && action_list_search->get_text().is_subsequence_ofn(p_name);
+}
+
void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_infos) {
if (!p_action_infos.is_empty()) {
actions_cache = p_action_infos;
@@ -1092,17 +395,11 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info
action_tree->clear();
TreeItem *root = action_tree->create_item();
- int uneditable_count = 0;
-
for (int i = 0; i < actions_cache.size(); i++) {
ActionInfo action_info = actions_cache[i];
- if (!action_info.editable) {
- uneditable_count++;
- }
-
- String search_term = action_list_search->get_text();
- if (!search_term.is_empty() && action_info.name.findn(search_term) == -1) {
+ const Array events = action_info.action["events"];
+ if (!_should_display_action(action_info.name, events)) {
continue;
}
@@ -1110,7 +407,6 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info
continue;
}
- const Array events = action_info.action["events"];
const Variant deadzone = action_info.action["deadzone"];
// Update Tree...
@@ -1146,7 +442,7 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info
TreeItem *event_item = action_tree->create_item(action_item);
// First Column - Text
- event_item->set_text(0, event_config_dialog->get_event_text(event, true));
+ event_item->set_text(0, EventListenerLineEdit::get_event_text(event, true));
event_item->set_meta("__event", event);
event_item->set_meta("__index", evnt_idx);
@@ -1195,6 +491,14 @@ void ActionMapEditor::use_external_search_box(LineEdit *p_searchbox) {
action_list_search->connect("text_changed", callable_mp(this, &ActionMapEditor::_search_term_updated));
}
+void ActionMapEditor::_on_filter_focused() {
+ emit_signal(SNAME("filter_focused"));
+}
+
+void ActionMapEditor::_on_filter_unfocused() {
+ emit_signal(SNAME("filter_unfocused"));
+}
+
ActionMapEditor::ActionMapEditor() {
// Main Vbox Container
VBoxContainer *main_vbox = memnew(VBoxContainer);
@@ -1206,16 +510,24 @@ ActionMapEditor::ActionMapEditor() {
action_list_search = memnew(LineEdit);
action_list_search->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- action_list_search->set_placeholder(TTR("Filter Actions"));
+ action_list_search->set_placeholder(TTR("Filter by name..."));
action_list_search->set_clear_button_enabled(true);
action_list_search->connect("text_changed", callable_mp(this, &ActionMapEditor::_search_term_updated));
top_hbox->add_child(action_list_search);
- show_builtin_actions_checkbutton = memnew(CheckButton);
- show_builtin_actions_checkbutton->set_pressed(false);
- show_builtin_actions_checkbutton->set_text(TTR("Show Built-in Actions"));
- show_builtin_actions_checkbutton->connect("toggled", callable_mp(this, &ActionMapEditor::set_show_builtin_actions));
- top_hbox->add_child(show_builtin_actions_checkbutton);
+ action_list_search_by_event = memnew(EventListenerLineEdit);
+ action_list_search_by_event->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ action_list_search_by_event->set_stretch_ratio(0.75);
+ action_list_search_by_event->connect("event_changed", callable_mp(this, &ActionMapEditor::_search_by_event));
+ action_list_search_by_event->connect(SceneStringNames::get_singleton()->focus_entered, callable_mp(this, &ActionMapEditor::_on_filter_focused));
+ action_list_search_by_event->connect(SceneStringNames::get_singleton()->focus_exited, callable_mp(this, &ActionMapEditor::_on_filter_unfocused));
+ top_hbox->add_child(action_list_search_by_event);
+
+ Button *clear_all_search = memnew(Button);
+ clear_all_search->set_text(TTR("Clear All"));
+ clear_all_search->connect("pressed", callable_mp(action_list_search_by_event, &EventListenerLineEdit::clear_event));
+ clear_all_search->connect("pressed", callable_mp(action_list_search, &LineEdit::clear));
+ top_hbox->add_child(clear_all_search);
// Adding Action line edit + button
add_hbox = memnew(HBoxContainer);
@@ -1236,6 +548,12 @@ ActionMapEditor::ActionMapEditor() {
// Disable the button and set its tooltip.
_add_edit_text_changed(add_edit->get_text());
+ show_builtin_actions_checkbutton = memnew(CheckButton);
+ show_builtin_actions_checkbutton->set_pressed(false);
+ show_builtin_actions_checkbutton->set_text(TTR("Show Built-in Actions"));
+ show_builtin_actions_checkbutton->connect("toggled", callable_mp(this, &ActionMapEditor::set_show_builtin_actions));
+ add_hbox->add_child(show_builtin_actions_checkbutton);
+
main_vbox->add_child(add_hbox);
// Action Editor Tree
@@ -1256,7 +574,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 36d21fe258..433a72a807 100644
--- a/editor/action_map_editor.h
+++ b/editor/action_map_editor.h
@@ -1,147 +1,54 @@
-/*************************************************************************/
-/* action_map_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* action_map_editor.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 ACTION_MAP_EDITOR_H
#define ACTION_MAP_EDITOR_H
-#include "scene/gui/check_box.h"
-#include "scene/gui/check_button.h"
-#include "scene/gui/color_rect.h"
-#include "scene/gui/dialogs.h"
-#include "scene/gui/label.h"
-#include "scene/gui/option_button.h"
-#include "scene/gui/tab_container.h"
-#include "scene/gui/tree.h"
+#include "scene/gui/control.h"
-// Confirmation Dialog used when configuring an input event.
-// Separate from ActionMapEditor for code cleanliness and separation of responsibilities.
-class InputEventConfigurationDialog : public ConfirmationDialog {
- GDCLASS(InputEventConfigurationDialog, ConfirmationDialog);
-
-public:
- enum InputType {
- INPUT_KEY = 1,
- INPUT_MOUSE_BUTTON = 2,
- INPUT_JOY_BUTTON = 4,
- INPUT_JOY_MOTION = 8
- };
-
-private:
- struct IconCache {
- Ref<Texture2D> keyboard;
- Ref<Texture2D> mouse;
- Ref<Texture2D> joypad_button;
- Ref<Texture2D> joypad_axis;
- } icon_cache;
-
- Ref<InputEvent> event = Ref<InputEvent>();
-
- TabContainer *tab_container = nullptr;
-
- // Listening for input
- Label *event_as_text = nullptr;
- Panel *mouse_detection_rect = nullptr;
-
- // List of All Key/Mouse/Joypad input options.
- int allowed_input_types;
- Tree *input_list_tree = nullptr;
- LineEdit *input_list_search = nullptr;
-
- // Additional Options, shown depending on event selected
- VBoxContainer *additional_options_container = nullptr;
-
- HBoxContainer *device_container = nullptr;
- OptionButton *device_id_option = nullptr;
-
- HBoxContainer *mod_container = nullptr; // Contains the subcontainer and the store command checkbox.
-
- enum ModCheckbox {
- MOD_ALT,
- MOD_SHIFT,
- MOD_CTRL,
- MOD_META,
- MOD_MAX
- };
-#if defined(MACOS_ENABLED)
- String mods[MOD_MAX] = { "Option", "Shift", "Ctrl", "Command" };
-#elif defined(WINDOWS_ENABLED)
- String mods[MOD_MAX] = { "Alt", "Shift", "Ctrl", "Windows" };
-#else
- String mods[MOD_MAX] = { "Alt", "Shift", "Ctrl", "Meta" };
-#endif
- String mods_tip[MOD_MAX] = { "Alt or Option key", "Shift key", "Control key", "Meta/Windows or Command key" };
-
- CheckBox *mod_checkboxes[MOD_MAX];
- CheckBox *autoremap_command_or_control_checkbox = nullptr;
-
- CheckBox *physical_key_checkbox = nullptr;
-
- void _set_event(const Ref<InputEvent> &p_event, bool p_update_input_list_selection = true);
-
- void _tab_selected(int p_tab);
- void _listen_window_input(const Ref<InputEvent> &p_event);
-
- void _search_term_updated(const String &p_term);
- void _update_input_list();
- void _input_list_item_selected();
-
- 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 _device_selection_changed(int p_option_button_index);
- void _set_current_device(int p_device);
- int _get_current_device() const;
- String _get_device_string(int p_device) const;
-
-protected:
- void _notification(int p_what);
-
-public:
- // Pass an existing event to configure it. Alternatively, pass no event to start with a blank configuration.
- void popup_and_configure(const Ref<InputEvent> &p_event = Ref<InputEvent>());
- Ref<InputEvent> get_event() const;
- String get_event_text(const Ref<InputEvent> &p_event, bool p_include_device) const;
-
- void set_allowed_input_types(int p_type_masks);
-
- InputEventConfigurationDialog();
-};
+class Button;
+class HBoxContainer;
+class EventListenerLineEdit;
+class LineEdit;
+class CheckButton;
+class AcceptDialog;
+class InputEventConfigurationDialog;
+class Tree;
class ActionMapEditor : public Control {
GDCLASS(ActionMapEditor, Control);
public:
struct ActionInfo {
- String name = String();
- Dictionary action = Dictionary();
+ String name;
+ Dictionary action;
Ref<Texture2D> icon = Ref<Texture2D>();
bool editable = true;
@@ -160,8 +67,8 @@ private:
// Storing which action/event is currently being edited in the InputEventConfigurationDialog.
- Dictionary current_action = Dictionary();
- String current_action_name = String();
+ Dictionary current_action;
+ String current_action_name;
int current_action_event_index = -1;
// Popups
@@ -174,6 +81,7 @@ private:
bool show_builtin_actions = false;
CheckButton *show_builtin_actions_checkbutton = nullptr;
LineEdit *action_list_search = nullptr;
+ EventListenerLineEdit *action_list_search_by_event = nullptr;
HBoxContainer *add_hbox = nullptr;
LineEdit *add_edit = nullptr;
@@ -191,11 +99,16 @@ private:
void _tree_button_pressed(Object *p_item, int p_column, int p_id, MouseButton p_button);
void _tree_item_activated();
void _search_term_updated(const String &p_search_term);
+ void _search_by_event(const Ref<InputEvent> &p_event);
+ bool _should_display_action(const String &p_name, const Array &p_events) 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;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
+ void _on_filter_focused();
+ void _on_filter_unfocused();
+
protected:
void _notification(int p_what);
static void _bind_methods();
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index 219f3fdbe1..639f5e6de5 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -1,37 +1,38 @@
-/*************************************************************************/
-/* animation_bezier_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_bezier_editor.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 "animation_bezier_editor.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/view_panner.h"
#include "scene/resources/text_line.h"
@@ -211,11 +212,11 @@ void AnimationBezierTrackEdit::_draw_line_clipped(const Vector2 &p_from, const V
void AnimationBezierTrackEdit::_notification(int p_what) {
switch (p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
+ panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
} break;
case NOTIFICATION_ENTER_TREE: {
- panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
+ panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
[[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
@@ -338,14 +339,14 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
Ref<Texture2D> unlock = get_theme_icon(SNAME("Unlock"), SNAME("EditorIcons"));
float lock_hpos = remove_hpos - hsep - lock->get_width();
- Ref<Texture2D> visible = get_theme_icon(SNAME("GuiVisibilityVisible"), SNAME("EditorIcons"));
- Ref<Texture2D> hidden = get_theme_icon(SNAME("GuiVisibilityHidden"), SNAME("EditorIcons"));
- float visibility_hpos = lock_hpos - hsep - visible->get_width();
+ Ref<Texture2D> visibility_visible = get_theme_icon(SNAME("GuiVisibilityVisible"), SNAME("EditorIcons"));
+ Ref<Texture2D> visibility_hidden = get_theme_icon(SNAME("GuiVisibilityHidden"), SNAME("EditorIcons"));
+ float visibility_hpos = lock_hpos - hsep - visibility_visible->get_width();
Ref<Texture2D> solo = get_theme_icon(SNAME("AudioBusSolo"), SNAME("EditorIcons"));
float solo_hpos = visibility_hpos - hsep - solo->get_width();
- float buttons_width = remove->get_width() + lock->get_width() + visible->get_width() + solo->get_width() + hsep * 3;
+ float buttons_width = remove->get_width() + lock->get_width() + visibility_visible->get_width() + solo->get_width() + hsep * 3;
for (int i = 0; i < tracks.size(); ++i) {
// RELATED TRACKS TITLES
@@ -418,11 +419,11 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
draw_texture(unlock, lock_rect.position);
}
- Rect2 visible_rect = Rect2(visibility_hpos, icon_start_height - visible->get_height() / 2.0, visible->get_width(), visible->get_height());
+ Rect2 visible_rect = Rect2(visibility_hpos, icon_start_height - visibility_visible->get_height() / 2.0, visibility_visible->get_width(), visibility_visible->get_height());
if (hidden_tracks.has(current_track)) {
- draw_texture(hidden, visible_rect.position);
+ draw_texture(visibility_hidden, visible_rect.position);
} else {
- draw_texture(visible, visible_rect.position);
+ draw_texture(visibility_visible, visible_rect.position);
}
Rect2 solo_rect = Rect2(solo_hpos, icon_start_height - solo->get_height() / 2.0, solo->get_width(), solo->get_height());
@@ -574,7 +575,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
ep.point_rect.size = bezier_icon->get_size();
if (selection.has(IntPair(i, j))) {
draw_texture(selected_icon, ep.point_rect.position);
- draw_string(font, ep.point_rect.position + Vector2(8, -font->get_height(font_size) - 8), TTR("Time:") + " " + TS->format_number(rtos(Math::snapped(offset, 0.001))), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, accent);
+ draw_string(font, ep.point_rect.position + Vector2(8, -font->get_height(font_size) - 8), TTR("Time:") + " " + TS->format_number(rtos(Math::snapped(offset, 0.0001))), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, accent);
draw_string(font, ep.point_rect.position + Vector2(8, -8), TTR("Value:") + " " + TS->format_number(rtos(Math::snapped(value, 0.001))), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, accent);
} else {
Color track_color = Color(1, 1, 1, 1);
@@ -655,10 +656,6 @@ Size2 AnimationBezierTrackEdit::get_minimum_size() const {
return Vector2(1, 1);
}
-void AnimationBezierTrackEdit::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
timeline = p_timeline;
timeline->connect("zoom_changed", callable_mp(this, &AnimationBezierTrackEdit::_zoom_changed));
@@ -667,8 +664,8 @@ void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
editor = p_editor;
- connect("clear_selection", Callable(editor, "_clear_selection").bind(false));
- connect("select_key", Callable(editor, "_key_selected"), CONNECT_DEFERRED);
+ connect("clear_selection", callable_mp(editor, &AnimationTrackEditor::_clear_selection).bind(false));
+ connect("select_key", callable_mp(editor, &AnimationTrackEditor::_key_selected), CONNECT_DEFERRED);
}
void AnimationBezierTrackEdit::_play_position_draw() {
@@ -791,6 +788,7 @@ void AnimationBezierTrackEdit::_clear_selection() {
}
void AnimationBezierTrackEdit::_change_selected_keys_handle_mode(Animation::HandleMode p_mode, bool p_auto) {
+ 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();
@@ -814,7 +812,7 @@ void AnimationBezierTrackEdit::_select_at_anim(const Ref<Animation> &p_anim, int
return;
}
- int idx = animation->track_find_key(p_track, p_pos, true);
+ int idx = animation->track_find_key(p_track, p_pos, Animation::FIND_MODE_APPROX);
ERR_FAIL_COND(idx < 0);
selection.insert(IntPair(p_track, idx));
@@ -903,11 +901,17 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
}
float zoom_value = timeline->get_zoom()->get_max() - zv;
- timeline->get_zoom()->set_value(zoom_value);
- timeline->call_deferred("set_value", minimum_time);
+ if (Math::is_finite(minimum_time) && Math::is_finite(maximum_time) && maximum_time - minimum_time > CMP_EPSILON) {
+ timeline->get_zoom()->set_value(zoom_value);
+ timeline->call_deferred("set_value", minimum_time);
+ }
- v_scroll = (maximum_value + minimum_value) / 2.0;
- v_zoom = (maximum_value - minimum_value) / ((get_size().height - timeline->get_size().height) * 0.9);
+ if (Math::is_finite(minimum_value) && Math::is_finite(maximum_value)) {
+ v_scroll = (maximum_value + minimum_value) / 2.0;
+ if (maximum_value - minimum_value > CMP_EPSILON) {
+ v_zoom = (maximum_value - minimum_value) / ((get_size().height - timeline->get_size().height) * 0.9);
+ }
+ }
queue_redraw();
accept_event();
@@ -938,9 +942,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
Vector2 popup_pos = get_screen_position() + mb->get_position();
menu->clear();
- if (!locked_tracks.has(selected_track) || locked_tracks.has(selected_track)) {
- menu->add_icon_item(bezier_icon, TTR("Insert Key Here"), MENU_KEY_INSERT);
- }
+ menu->add_icon_item(bezier_icon, TTR("Insert Key Here"), MENU_KEY_INSERT);
if (selection.size()) {
menu->add_separator();
menu->add_icon_item(get_theme_icon(SNAME("Duplicate"), SNAME("EditorIcons")), TTR("Duplicate Selected Key(s)"), MENU_KEY_DUPLICATE);
@@ -983,6 +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) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action("Remove Bezier Track");
undo_redo->add_do_method(this, "_update_locked_tracks_after", track);
@@ -1165,17 +1168,18 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
new_point[4] = 0;
real_t time = ((mb->get_position().x - limit) / timeline->get_zoom_scale()) + timeline->get_value();
- while (animation->track_find_key(selected_track, time, true) != -1) {
- time += 0.001;
+ while (animation->track_find_key(selected_track, time, Animation::FIND_MODE_APPROX) != -1) {
+ time += 0.0001;
}
+ 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);
undo_redo->commit_action();
//then attempt to move
- int index = animation->track_find_key(selected_track, time, true);
+ int index = animation->track_find_key(selected_track, time, Animation::FIND_MODE_APPROX);
ERR_FAIL_COND(index == -1);
_clear_selection();
selection.insert(IntPair(selected_track, index));
@@ -1266,6 +1270,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if (moving_selection) {
//combit it
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Move Bezier Points"));
List<AnimMoveRestore> to_restore;
@@ -1278,7 +1283,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
for (SelectionSet::Element *E = selection.back(); E; E = E->prev()) {
real_t newtime = editor->snap_time(animation->track_get_key_time(E->get().first, E->get().second) + moving_selection_offset.x);
- int idx = animation->track_find_key(E->get().first, newtime, true);
+ int idx = animation->track_find_key(E->get().first, newtime, Animation::FIND_MODE_APPROX);
if (idx == -1) {
continue;
}
@@ -1466,6 +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) {
+ 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;
@@ -1533,10 +1539,11 @@ void AnimationBezierTrackEdit::_menu_selected(int p_index) {
real_t time = ((menu_insert_key.x - limit) / timeline->get_zoom_scale()) + timeline->get_value();
- while (animation->track_find_key(selected_track, time, true) != -1) {
+ while (animation->track_find_key(selected_track, time, Animation::FIND_MODE_APPROX) != -1) {
time += 0.001;
}
+ 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);
@@ -1584,14 +1591,15 @@ void AnimationBezierTrackEdit::duplicate_selection() {
}
}
- undo_redo->create_action(TTR("Anim Duplicate Keys"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Animation Duplicate Keys"));
List<Pair<int, real_t>> new_selection_values;
for (SelectionSet::Element *E = selection.back(); E; E = E->prev()) {
real_t t = animation->track_get_key_time(E->get().first, E->get().second);
real_t dst_time = t + (timeline->get_play_position() - top_time);
- int existing_idx = animation->track_find_key(E->get().first, dst_time, true);
+ int existing_idx = animation->track_find_key(E->get().first, dst_time, Animation::FIND_MODE_APPROX);
undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->get().first, dst_time, animation->track_get_key_value(E->get().first, E->get().second), animation->track_get_key_transition(E->get().first, E->get().second));
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", E->get().first, dst_time);
@@ -1615,7 +1623,7 @@ void AnimationBezierTrackEdit::duplicate_selection() {
int track = E.first;
real_t time = E.second;
- int existing_idx = animation->track_find_key(track, time, true);
+ int existing_idx = animation->track_find_key(track, time, Animation::FIND_MODE_APPROX);
if (existing_idx == -1) {
continue;
@@ -1629,7 +1637,8 @@ void AnimationBezierTrackEdit::duplicate_selection() {
void AnimationBezierTrackEdit::delete_selection() {
if (selection.size()) {
- undo_redo->create_action(TTR("Anim Delete Keys"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Animation Delete Keys"));
for (SelectionSet::Element *E = selection.back(); E; E = E->prev()) {
undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->get().first, E->get().second);
diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h
index beb7a5e9c6..e6d6424ef2 100644
--- a/editor/animation_bezier_editor.h
+++ b/editor/animation_bezier_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_bezier_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_bezier_editor.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 ANIMATION_BEZIER_EDITOR_H
#define ANIMATION_BEZIER_EDITOR_H
@@ -34,7 +34,6 @@
#include "animation_track_editor.h"
#include "core/templates/hashfuncs.h"
-class EditorUndoRedoManager;
class ViewPanner;
class AnimationBezierTrackEdit : public Control {
@@ -53,7 +52,6 @@ class AnimationBezierTrackEdit : public Control {
};
AnimationTimelineEdit *timeline = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
Node *root = nullptr;
Control *play_position = nullptr; //separate control used to draw so updates for only position changed are much faster
real_t play_position_pos = 0;
@@ -197,7 +195,6 @@ public:
void set_animation_and_track(const Ref<Animation> &p_animation, int p_track, bool p_read_only);
virtual Size2 get_minimum_size() const override;
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
void set_timeline(AnimationTimelineEdit *p_timeline);
void set_editor(AnimationTrackEditor *p_editor);
void set_root(Node *p_root);
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 70b5501692..857a9a664a 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_track_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_track_editor.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 "animation_track_editor.h"
@@ -35,1362 +35,1195 @@
#include "editor/animation_bezier_editor.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
+#include "editor/inspector_dock.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "scene/animation/animation_player.h"
#include "scene/animation/tween.h"
+#include "scene/gui/grid_container.h"
#include "scene/gui/separator.h"
#include "scene/gui/view_panner.h"
#include "scene/main/window.h"
#include "scene/scene_string_names.h"
#include "servers/audio/audio_stream.h"
-class AnimationTrackKeyEdit : public Object {
- GDCLASS(AnimationTrackKeyEdit, Object);
-
-public:
- bool setting = false;
- bool animation_read_only = false;
+void AnimationTrackKeyEdit::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("_update_obj"), &AnimationTrackKeyEdit::_update_obj);
+ ClassDB::bind_method(D_METHOD("_key_ofs_changed"), &AnimationTrackKeyEdit::_key_ofs_changed);
+ ClassDB::bind_method(D_METHOD("_hide_script_from_inspector"), &AnimationTrackKeyEdit::_hide_script_from_inspector);
+ ClassDB::bind_method(D_METHOD("_hide_metadata_from_inspector"), &AnimationTrackKeyEdit::_hide_metadata_from_inspector);
+ ClassDB::bind_method(D_METHOD("get_root_path"), &AnimationTrackKeyEdit::get_root_path);
+ ClassDB::bind_method(D_METHOD("_dont_undo_redo"), &AnimationTrackKeyEdit::_dont_undo_redo);
+ ClassDB::bind_method(D_METHOD("_is_read_only"), &AnimationTrackKeyEdit::_is_read_only);
+}
- bool _hide_script_from_inspector() { return true; }
- bool _hide_metadata_from_inspector() { return true; }
- bool _dont_undo_redo() { return true; }
+void AnimationTrackKeyEdit::_fix_node_path(Variant &value) {
+ NodePath np = value;
- bool _is_read_only() {
- return animation_read_only;
+ if (np == NodePath()) {
+ return;
}
- static void _bind_methods() {
- ClassDB::bind_method(D_METHOD("_update_obj"), &AnimationTrackKeyEdit::_update_obj);
- ClassDB::bind_method(D_METHOD("_key_ofs_changed"), &AnimationTrackKeyEdit::_key_ofs_changed);
- ClassDB::bind_method(D_METHOD("_hide_script_from_inspector"), &AnimationTrackKeyEdit::_hide_script_from_inspector);
- ClassDB::bind_method(D_METHOD("_hide_metadata_from_inspector"), &AnimationTrackKeyEdit::_hide_metadata_from_inspector);
- ClassDB::bind_method(D_METHOD("get_root_path"), &AnimationTrackKeyEdit::get_root_path);
- ClassDB::bind_method(D_METHOD("_dont_undo_redo"), &AnimationTrackKeyEdit::_dont_undo_redo);
- ClassDB::bind_method(D_METHOD("_is_read_only"), &AnimationTrackKeyEdit::_is_read_only);
- }
+ Node *root = EditorNode::get_singleton()->get_tree()->get_root();
- void _fix_node_path(Variant &value) {
- NodePath np = value;
+ Node *np_node = root->get_node(np);
+ ERR_FAIL_COND(!np_node);
- if (np == NodePath()) {
- return;
- }
+ Node *edited_node = root->get_node(base);
+ ERR_FAIL_COND(!edited_node);
- Node *root = EditorNode::get_singleton()->get_tree()->get_root();
+ value = edited_node->get_path_to(np_node);
+}
- Node *np_node = root->get_node(np);
- ERR_FAIL_COND(!np_node);
+void AnimationTrackKeyEdit::_update_obj(const Ref<Animation> &p_anim) {
+ if (setting || animation != p_anim) {
+ return;
+ }
- Node *edited_node = root->get_node(base);
- ERR_FAIL_COND(!edited_node);
+ notify_change();
+}
- value = edited_node->get_path_to(np_node);
+void AnimationTrackKeyEdit::_key_ofs_changed(const Ref<Animation> &p_anim, float from, float to) {
+ if (animation != p_anim || from != key_ofs) {
+ return;
}
- void _update_obj(const Ref<Animation> &p_anim) {
- if (setting || animation != p_anim) {
- return;
- }
+ key_ofs = to;
- notify_change();
+ if (setting) {
+ return;
}
- void _key_ofs_changed(const Ref<Animation> &p_anim, float from, float to) {
- if (animation != p_anim || from != key_ofs) {
- return;
- }
+ notify_change();
+}
- key_ofs = to;
+bool AnimationTrackKeyEdit::_set(const StringName &p_name, const Variant &p_value) {
+ int key = animation->track_find_key(track, key_ofs, Animation::FIND_MODE_APPROX);
+ ERR_FAIL_COND_V(key == -1, false);
- if (setting) {
- return;
- }
+ String name = p_name;
+ if (name == "easing") {
+ float val = p_value;
+ float prev_val = animation->track_get_key_transition(track, key);
+ setting = true;
+ 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);
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ undo_redo->commit_action();
- notify_change();
+ setting = false;
+ return true;
}
- bool _set(const StringName &p_name, const Variant &p_value) {
- int key = animation->track_find_key(track, key_ofs, true);
- ERR_FAIL_COND_V(key == -1, false);
-
- String name = p_name;
- if (name == "time" || name == "frame") {
- float new_time = p_value;
-
- if (name == "frame") {
- float fps = animation->get_step();
- if (fps > 0) {
- fps = 1.0 / fps;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ switch (animation->track_get_type(track)) {
+ case Animation::TYPE_POSITION_3D:
+ case Animation::TYPE_ROTATION_3D:
+ case Animation::TYPE_SCALE_3D: {
+ if (name == "position" || name == "rotation" || name == "scale") {
+ Variant old = animation->track_get_key_value(track, key);
+ setting = true;
+ String chan;
+ switch (animation->track_get_type(track)) {
+ case Animation::TYPE_POSITION_3D:
+ chan = "Position3D";
+ break;
+ case Animation::TYPE_ROTATION_3D:
+ chan = "Rotation3D";
+ break;
+ case Animation::TYPE_SCALE_3D:
+ chan = "Scale3D";
+ break;
+ default: {
+ }
}
- new_time /= fps;
- }
- if (new_time == key_ofs) {
+ undo_redo->create_action(vformat(TTR("Animation Change %s"), chan));
+ undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, p_value);
+ undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, old);
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ undo_redo->commit_action();
+
+ setting = false;
return true;
}
- int existing = animation->track_find_key(track, new_time, true);
+ } break;
+ case Animation::TYPE_BLEND_SHAPE:
+ case Animation::TYPE_VALUE: {
+ if (name == "value") {
+ Variant value = p_value;
- setting = true;
- undo_redo->create_action(TTR("Anim Change Keyframe Time"), UndoRedo::MERGE_ENDS);
+ if (value.get_type() == Variant::NODE_PATH) {
+ _fix_node_path(value);
+ }
- Variant val = animation->track_get_key_value(track, key);
- float trans = animation->track_get_key_transition(track, key);
+ setting = true;
+ undo_redo->create_action(TTR("Animation Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ Variant prev = animation->track_get_key_value(track, key);
+ undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, value);
+ undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, prev);
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ undo_redo->commit_action();
- undo_redo->add_do_method(animation.ptr(), "track_remove_key", track, key);
- undo_redo->add_do_method(animation.ptr(), "track_insert_key", track, new_time, val, trans);
- undo_redo->add_do_method(this, "_key_ofs_changed", animation, key_ofs, new_time);
- undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", track, new_time);
- undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, key_ofs, val, trans);
- undo_redo->add_undo_method(this, "_key_ofs_changed", animation, new_time, key_ofs);
+ setting = false;
+ return true;
+ }
+ } break;
+ case Animation::TYPE_METHOD: {
+ Dictionary d_old = animation->track_get_key_value(track, key);
+ Dictionary d_new = d_old.duplicate();
+
+ bool change_notify_deserved = false;
+ bool mergeable = false;
+
+ if (name == "name") {
+ d_new["method"] = p_value;
+ } else if (name == "arg_count") {
+ Vector<Variant> args = d_old["args"];
+ args.resize(p_value);
+ d_new["args"] = args;
+ change_notify_deserved = true;
+ } else if (name.begins_with("args/")) {
+ Vector<Variant> args = d_old["args"];
+ int idx = name.get_slice("/", 1).to_int();
+ ERR_FAIL_INDEX_V(idx, args.size(), false);
+
+ String what = name.get_slice("/", 2);
+ if (what == "type") {
+ Variant::Type t = Variant::Type(int(p_value));
+
+ if (t != args[idx].get_type()) {
+ Callable::CallError err;
+ if (Variant::can_convert(args[idx].get_type(), t)) {
+ Variant old = args[idx];
+ Variant *ptrs[1] = { &old };
+ Variant::construct(t, args.write[idx], (const Variant **)ptrs, 1, err);
+ } else {
+ Variant::construct(t, args.write[idx], nullptr, 0, err);
+ }
+ change_notify_deserved = true;
+ d_new["args"] = args;
+ }
+ } else if (what == "value") {
+ Variant value = p_value;
+ if (value.get_type() == Variant::NODE_PATH) {
+ _fix_node_path(value);
+ }
- if (existing != -1) {
- Variant v = animation->track_get_key_value(track, existing);
- trans = animation->track_get_key_transition(track, existing);
- undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, new_time, v, trans);
+ args.write[idx] = value;
+ d_new["args"] = args;
+ mergeable = true;
+ }
}
- undo_redo->commit_action();
- setting = false;
- return true;
- }
+ if (mergeable) {
+ undo_redo->create_action(TTR("Animation Change Call"), UndoRedo::MERGE_ENDS);
+ } else {
+ undo_redo->create_action(TTR("Animation Change Call"));
+ }
- if (name == "easing") {
- float val = p_value;
- float prev_val = animation->track_get_key_transition(track, key);
setting = true;
- undo_redo->create_action(TTR("Anim 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);
+ undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, d_new);
+ undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, d_old);
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
setting = false;
+ if (change_notify_deserved) {
+ notify_change();
+ }
return true;
- }
-
- switch (animation->track_get_type(track)) {
- case Animation::TYPE_POSITION_3D:
- case Animation::TYPE_ROTATION_3D:
- case Animation::TYPE_SCALE_3D: {
- if (name == "position" || name == "rotation" || name == "scale") {
- Variant old = animation->track_get_key_value(track, key);
- setting = true;
- String chan;
- switch (animation->track_get_type(track)) {
- case Animation::TYPE_POSITION_3D:
- chan = "Position3D";
- break;
- case Animation::TYPE_ROTATION_3D:
- chan = "Rotation3D";
- break;
- case Animation::TYPE_SCALE_3D:
- chan = "Scale3D";
- break;
- default: {
- }
- }
-
- undo_redo->create_action(vformat(TTR("Anim Change %s"), chan));
- undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, p_value);
- undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, old);
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- undo_redo->commit_action();
+ } break;
+ case Animation::TYPE_BEZIER: {
+ if (name == "value") {
+ const Variant &value = p_value;
- setting = false;
- return true;
- }
+ setting = true;
+ undo_redo->create_action(TTR("Animation Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ float prev = animation->bezier_track_get_key_value(track, key);
+ undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_value", track, key, value);
+ undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_value", track, key, prev);
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ undo_redo->commit_action();
- } break;
- case Animation::TYPE_BLEND_SHAPE:
- case Animation::TYPE_VALUE: {
- if (name == "value") {
- Variant value = p_value;
+ setting = false;
+ return true;
+ }
- if (value.get_type() == Variant::NODE_PATH) {
- _fix_node_path(value);
- }
+ if (name == "in_handle") {
+ const Variant &value = p_value;
- setting = true;
- undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- Variant prev = animation->track_get_key_value(track, key);
- undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, value);
- undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, prev);
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- undo_redo->commit_action();
+ setting = true;
+ undo_redo->create_action(TTR("Animation Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ Vector2 prev = animation->bezier_track_get_key_in_handle(track, key);
+ undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_in_handle", track, key, value);
+ undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_in_handle", track, key, prev);
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ undo_redo->commit_action();
- setting = false;
- return true;
- }
- } break;
- case Animation::TYPE_METHOD: {
- Dictionary d_old = animation->track_get_key_value(track, key);
- Dictionary d_new = d_old.duplicate();
+ setting = false;
+ return true;
+ }
- bool change_notify_deserved = false;
- bool mergeable = false;
+ if (name == "out_handle") {
+ const Variant &value = p_value;
- if (name == "name") {
- d_new["method"] = p_value;
- } else if (name == "arg_count") {
- Vector<Variant> args = d_old["args"];
- args.resize(p_value);
- d_new["args"] = args;
- change_notify_deserved = true;
- } else if (name.begins_with("args/")) {
- Vector<Variant> args = d_old["args"];
- int idx = name.get_slice("/", 1).to_int();
- ERR_FAIL_INDEX_V(idx, args.size(), false);
-
- String what = name.get_slice("/", 2);
- if (what == "type") {
- Variant::Type t = Variant::Type(int(p_value));
-
- if (t != args[idx].get_type()) {
- Callable::CallError err;
- if (Variant::can_convert(args[idx].get_type(), t)) {
- Variant old = args[idx];
- Variant *ptrs[1] = { &old };
- Variant::construct(t, args.write[idx], (const Variant **)ptrs, 1, err);
- } else {
- Variant::construct(t, args.write[idx], nullptr, 0, err);
- }
- change_notify_deserved = true;
- d_new["args"] = args;
- }
- } else if (what == "value") {
- Variant value = p_value;
- if (value.get_type() == Variant::NODE_PATH) {
- _fix_node_path(value);
- }
+ setting = true;
+ undo_redo->create_action(TTR("Animation Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ Vector2 prev = animation->bezier_track_get_key_out_handle(track, key);
+ undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_out_handle", track, key, value);
+ undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_out_handle", track, key, prev);
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ undo_redo->commit_action();
- args.write[idx] = value;
- d_new["args"] = args;
- mergeable = true;
- }
- }
+ setting = false;
+ return true;
+ }
- if (mergeable) {
- undo_redo->create_action(TTR("Anim Change Call"), UndoRedo::MERGE_ENDS);
- } else {
- undo_redo->create_action(TTR("Anim Change Call"));
- }
+ if (name == "handle_mode") {
+ const Variant &value = p_value;
setting = true;
- undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, d_new);
- undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, d_old);
+ undo_redo->create_action(TTR("Animation Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ int prev = animation->bezier_track_get_key_handle_mode(track, key);
+ undo_redo->add_do_method(this, "_bezier_track_set_key_handle_mode", animation.ptr(), track, key, value);
+ undo_redo->add_undo_method(this, "_bezier_track_set_key_handle_mode", animation.ptr(), track, key, prev);
undo_redo->add_do_method(this, "_update_obj", animation);
undo_redo->add_undo_method(this, "_update_obj", animation);
undo_redo->commit_action();
setting = false;
- if (change_notify_deserved) {
- notify_change();
- }
return true;
- } break;
- case Animation::TYPE_BEZIER: {
- if (name == "value") {
- const Variant &value = p_value;
-
- setting = true;
- undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- float prev = animation->bezier_track_get_key_value(track, key);
- undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_value", track, key, value);
- undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_value", track, key, prev);
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- undo_redo->commit_action();
-
- setting = false;
- return true;
- }
+ }
+ } break;
+ case Animation::TYPE_AUDIO: {
+ if (name == "stream") {
+ Ref<AudioStream> stream = p_value;
- if (name == "in_handle") {
- const Variant &value = p_value;
+ setting = true;
+ undo_redo->create_action(TTR("Animation Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ Ref<Resource> prev = animation->audio_track_get_key_stream(track, key);
+ undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_stream", track, key, stream);
+ undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_stream", track, key, prev);
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ undo_redo->commit_action();
- setting = true;
- undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- Vector2 prev = animation->bezier_track_get_key_in_handle(track, key);
- undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_in_handle", track, key, value);
- undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_in_handle", track, key, prev);
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- undo_redo->commit_action();
-
- setting = false;
- return true;
- }
+ setting = false;
+ return true;
+ }
- if (name == "out_handle") {
- const Variant &value = p_value;
+ if (name == "start_offset") {
+ float value = p_value;
- setting = true;
- undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- Vector2 prev = animation->bezier_track_get_key_out_handle(track, key);
- undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_out_handle", track, key, value);
- undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_out_handle", track, key, prev);
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- undo_redo->commit_action();
-
- setting = false;
- return true;
- }
+ setting = true;
+ undo_redo->create_action(TTR("Animation Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ float prev = animation->audio_track_get_key_start_offset(track, key);
+ undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_start_offset", track, key, value);
+ undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_start_offset", track, key, prev);
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ undo_redo->commit_action();
- if (name == "handle_mode") {
- const Variant &value = p_value;
+ setting = false;
+ return true;
+ }
- setting = true;
- undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- int prev = animation->bezier_track_get_key_handle_mode(track, key);
- undo_redo->add_do_method(this, "_bezier_track_set_key_handle_mode", animation.ptr(), track, key, value);
- undo_redo->add_undo_method(this, "_bezier_track_set_key_handle_mode", animation.ptr(), track, key, prev);
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- undo_redo->commit_action();
-
- setting = false;
- return true;
- }
- } break;
- case Animation::TYPE_AUDIO: {
- if (name == "stream") {
- Ref<AudioStream> stream = p_value;
+ if (name == "end_offset") {
+ float value = p_value;
- setting = true;
- undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- Ref<Resource> prev = animation->audio_track_get_key_stream(track, key);
- undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_stream", track, key, stream);
- undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_stream", track, key, prev);
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- undo_redo->commit_action();
-
- setting = false;
- return true;
- }
+ setting = true;
+ undo_redo->create_action(TTR("Animation Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ float prev = animation->audio_track_get_key_end_offset(track, key);
+ undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_end_offset", track, key, value);
+ undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_end_offset", track, key, prev);
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ undo_redo->commit_action();
- if (name == "start_offset") {
- float value = p_value;
+ setting = false;
+ return true;
+ }
+ } break;
+ case Animation::TYPE_ANIMATION: {
+ if (name == "animation") {
+ StringName anim_name = p_value;
- setting = true;
- undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- float prev = animation->audio_track_get_key_start_offset(track, key);
- undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_start_offset", track, key, value);
- undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_start_offset", track, key, prev);
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- undo_redo->commit_action();
-
- setting = false;
- return true;
- }
+ setting = true;
+ undo_redo->create_action(TTR("Animation Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ StringName prev = animation->animation_track_get_key_animation(track, key);
+ undo_redo->add_do_method(animation.ptr(), "animation_track_set_key_animation", track, key, anim_name);
+ undo_redo->add_undo_method(animation.ptr(), "animation_track_set_key_animation", track, key, prev);
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ undo_redo->commit_action();
- if (name == "end_offset") {
- float value = p_value;
+ setting = false;
+ return true;
+ }
+ } break;
+ }
- setting = true;
- undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- float prev = animation->audio_track_get_key_end_offset(track, key);
- undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_end_offset", track, key, value);
- undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_end_offset", track, key, prev);
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- undo_redo->commit_action();
-
- setting = false;
- return true;
- }
- } break;
- case Animation::TYPE_ANIMATION: {
- if (name == "animation") {
- StringName anim_name = p_value;
+ return false;
+}
- setting = true;
- undo_redo->create_action(TTR("Anim Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- StringName prev = animation->animation_track_get_key_animation(track, key);
- undo_redo->add_do_method(animation.ptr(), "animation_track_set_key_animation", track, key, anim_name);
- undo_redo->add_undo_method(animation.ptr(), "animation_track_set_key_animation", track, key, prev);
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- undo_redo->commit_action();
-
- setting = false;
- return true;
- }
- } break;
- }
+bool AnimationTrackKeyEdit::_get(const StringName &p_name, Variant &r_ret) const {
+ int key = animation->track_find_key(track, key_ofs, Animation::FIND_MODE_APPROX);
+ ERR_FAIL_COND_V(key == -1, false);
- return false;
+ String name = p_name;
+ if (name == "easing") {
+ r_ret = animation->track_get_key_transition(track, key);
+ return true;
}
- bool _get(const StringName &p_name, Variant &r_ret) const {
- int key = animation->track_find_key(track, key_ofs, true);
- ERR_FAIL_COND_V(key == -1, false);
-
- String name = p_name;
- if (name == "time") {
- r_ret = key_ofs;
- return true;
- }
-
- if (name == "frame") {
- float fps = animation->get_step();
- if (fps > 0) {
- fps = 1.0 / fps;
+ switch (animation->track_get_type(track)) {
+ case Animation::TYPE_POSITION_3D:
+ case Animation::TYPE_ROTATION_3D:
+ case Animation::TYPE_SCALE_3D: {
+ if (name == "position" || name == "rotation" || name == "scale") {
+ r_ret = animation->track_get_key_value(track, key);
+ return true;
+ }
+ } break;
+ case Animation::TYPE_BLEND_SHAPE:
+ case Animation::TYPE_VALUE: {
+ if (name == "value") {
+ r_ret = animation->track_get_key_value(track, key);
+ return true;
}
- r_ret = key_ofs * fps;
- return true;
- }
- if (name == "easing") {
- r_ret = animation->track_get_key_transition(track, key);
- return true;
- }
+ } break;
+ case Animation::TYPE_METHOD: {
+ Dictionary d = animation->track_get_key_value(track, key);
- switch (animation->track_get_type(track)) {
- case Animation::TYPE_POSITION_3D:
- case Animation::TYPE_ROTATION_3D:
- case Animation::TYPE_SCALE_3D: {
- if (name == "position" || name == "rotation" || name == "scale") {
- r_ret = animation->track_get_key_value(track, key);
- return true;
- }
- } break;
- case Animation::TYPE_BLEND_SHAPE:
- case Animation::TYPE_VALUE: {
- if (name == "value") {
- r_ret = animation->track_get_key_value(track, key);
- return true;
- }
+ if (name == "name") {
+ ERR_FAIL_COND_V(!d.has("method"), false);
+ r_ret = d["method"];
+ return true;
+ }
- } break;
- case Animation::TYPE_METHOD: {
- Dictionary d = animation->track_get_key_value(track, key);
+ ERR_FAIL_COND_V(!d.has("args"), false);
- if (name == "name") {
- ERR_FAIL_COND_V(!d.has("method"), false);
- r_ret = d["method"];
- return true;
- }
+ Vector<Variant> args = d["args"];
- ERR_FAIL_COND_V(!d.has("args"), false);
+ if (name == "arg_count") {
+ r_ret = args.size();
+ return true;
+ }
- Vector<Variant> args = d["args"];
+ if (name.begins_with("args/")) {
+ int idx = name.get_slice("/", 1).to_int();
+ ERR_FAIL_INDEX_V(idx, args.size(), false);
- if (name == "arg_count") {
- r_ret = args.size();
+ String what = name.get_slice("/", 2);
+ if (what == "type") {
+ r_ret = args[idx].get_type();
return true;
}
- if (name.begins_with("args/")) {
- int idx = name.get_slice("/", 1).to_int();
- ERR_FAIL_INDEX_V(idx, args.size(), false);
-
- String what = name.get_slice("/", 2);
- if (what == "type") {
- r_ret = args[idx].get_type();
- return true;
- }
-
- if (what == "value") {
- r_ret = args[idx];
- return true;
- }
- }
-
- } break;
- case Animation::TYPE_BEZIER: {
- if (name == "value") {
- r_ret = animation->bezier_track_get_key_value(track, key);
+ if (what == "value") {
+ r_ret = args[idx];
return true;
}
+ }
- if (name == "in_handle") {
- r_ret = animation->bezier_track_get_key_in_handle(track, key);
- return true;
- }
+ } break;
+ case Animation::TYPE_BEZIER: {
+ if (name == "value") {
+ r_ret = animation->bezier_track_get_key_value(track, key);
+ return true;
+ }
- if (name == "out_handle") {
- r_ret = animation->bezier_track_get_key_out_handle(track, key);
- return true;
- }
+ if (name == "in_handle") {
+ r_ret = animation->bezier_track_get_key_in_handle(track, key);
+ return true;
+ }
- if (name == "handle_mode") {
- r_ret = animation->bezier_track_get_key_handle_mode(track, key);
- return true;
- }
+ if (name == "out_handle") {
+ r_ret = animation->bezier_track_get_key_out_handle(track, key);
+ return true;
+ }
- } break;
- case Animation::TYPE_AUDIO: {
- if (name == "stream") {
- r_ret = animation->audio_track_get_key_stream(track, key);
- return true;
- }
+ if (name == "handle_mode") {
+ r_ret = animation->bezier_track_get_key_handle_mode(track, key);
+ return true;
+ }
- if (name == "start_offset") {
- r_ret = animation->audio_track_get_key_start_offset(track, key);
- return true;
- }
+ } break;
+ case Animation::TYPE_AUDIO: {
+ if (name == "stream") {
+ r_ret = animation->audio_track_get_key_stream(track, key);
+ return true;
+ }
- if (name == "end_offset") {
- r_ret = animation->audio_track_get_key_end_offset(track, key);
- return true;
- }
+ if (name == "start_offset") {
+ r_ret = animation->audio_track_get_key_start_offset(track, key);
+ return true;
+ }
- } break;
- case Animation::TYPE_ANIMATION: {
- if (name == "animation") {
- r_ret = animation->animation_track_get_key_animation(track, key);
- return true;
- }
+ if (name == "end_offset") {
+ r_ret = animation->audio_track_get_key_end_offset(track, key);
+ return true;
+ }
- } break;
- }
+ } break;
+ case Animation::TYPE_ANIMATION: {
+ if (name == "animation") {
+ r_ret = animation->animation_track_get_key_animation(track, key);
+ return true;
+ }
- return false;
+ } break;
}
- void _get_property_list(List<PropertyInfo> *p_list) const {
- if (animation.is_null()) {
- return;
- }
- ERR_FAIL_INDEX(track, animation->get_track_count());
- int key = animation->track_find_key(track, key_ofs, true);
- ERR_FAIL_COND(key == -1);
+ return false;
+}
- if (use_fps && animation->get_step() > 0) {
- float max_frame = animation->get_length() / animation->get_step();
- p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("frame"), PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
- } else {
- p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("time"), PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
- }
+void AnimationTrackKeyEdit::_get_property_list(List<PropertyInfo> *p_list) const {
+ if (animation.is_null()) {
+ return;
+ }
- switch (animation->track_get_type(track)) {
- case Animation::TYPE_POSITION_3D: {
- p_list->push_back(PropertyInfo(Variant::VECTOR3, PNAME("position")));
- } break;
- case Animation::TYPE_ROTATION_3D: {
- p_list->push_back(PropertyInfo(Variant::QUATERNION, PNAME("rotation")));
- } break;
- case Animation::TYPE_SCALE_3D: {
- p_list->push_back(PropertyInfo(Variant::VECTOR3, PNAME("scale")));
- } break;
- case Animation::TYPE_BLEND_SHAPE: {
- p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("value")));
- } break;
- case Animation::TYPE_VALUE: {
- Variant v = animation->track_get_key_value(track, key);
+ ERR_FAIL_INDEX(track, animation->get_track_count());
+ int key = animation->track_find_key(track, key_ofs, Animation::FIND_MODE_APPROX);
+ ERR_FAIL_COND(key == -1);
- if (hint.type != Variant::NIL) {
- PropertyInfo pi = hint;
- pi.name = PNAME("value");
- p_list->push_back(pi);
- } else {
- PropertyHint val_hint = PROPERTY_HINT_NONE;
- String val_hint_string;
-
- if (v.get_type() == Variant::OBJECT) {
- // Could actually check the object property if exists..? Yes I will!
- Ref<Resource> res = v;
- if (res.is_valid()) {
- val_hint = PROPERTY_HINT_RESOURCE_TYPE;
- val_hint_string = res->get_class();
- }
- }
+ switch (animation->track_get_type(track)) {
+ case Animation::TYPE_POSITION_3D: {
+ p_list->push_back(PropertyInfo(Variant::VECTOR3, PNAME("position")));
+ } break;
+ case Animation::TYPE_ROTATION_3D: {
+ p_list->push_back(PropertyInfo(Variant::QUATERNION, PNAME("rotation")));
+ } break;
+ case Animation::TYPE_SCALE_3D: {
+ p_list->push_back(PropertyInfo(Variant::VECTOR3, PNAME("scale")));
+ } break;
+ case Animation::TYPE_BLEND_SHAPE: {
+ p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("value")));
+ } break;
+ case Animation::TYPE_VALUE: {
+ Variant v = animation->track_get_key_value(track, key);
- if (v.get_type() != Variant::NIL) {
- p_list->push_back(PropertyInfo(v.get_type(), PNAME("value"), val_hint, val_hint_string));
+ if (hint.type != Variant::NIL) {
+ PropertyInfo pi = hint;
+ pi.name = PNAME("value");
+ p_list->push_back(pi);
+ } else {
+ PropertyHint val_hint = PROPERTY_HINT_NONE;
+ String val_hint_string;
+
+ if (v.get_type() == Variant::OBJECT) {
+ // Could actually check the object property if exists..? Yes I will!
+ Ref<Resource> res = v;
+ if (res.is_valid()) {
+ val_hint = PROPERTY_HINT_RESOURCE_TYPE;
+ val_hint_string = res->get_class();
}
}
- } break;
- case Animation::TYPE_METHOD: {
- p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("name")));
- p_list->push_back(PropertyInfo(Variant::INT, PNAME("arg_count"), PROPERTY_HINT_RANGE, "0,32,1,or_greater"));
-
- Dictionary d = animation->track_get_key_value(track, key);
- ERR_FAIL_COND(!d.has("args"));
- Vector<Variant> args = d["args"];
- String vtypes;
- for (int i = 0; i < Variant::VARIANT_MAX; i++) {
- if (i > 0) {
- vtypes += ",";
- }
- vtypes += Variant::get_type_name(Variant::Type(i));
+ if (v.get_type() != Variant::NIL) {
+ p_list->push_back(PropertyInfo(v.get_type(), PNAME("value"), val_hint, val_hint_string));
}
+ }
- for (int i = 0; i < args.size(); i++) {
- p_list->push_back(PropertyInfo(Variant::INT, vformat("%s/%d/%s", PNAME("args"), i, PNAME("type")), PROPERTY_HINT_ENUM, vtypes));
- if (args[i].get_type() != Variant::NIL) {
- p_list->push_back(PropertyInfo(args[i].get_type(), vformat("%s/%d/%s", PNAME("args"), i, PNAME("value"))));
- }
+ } break;
+ case Animation::TYPE_METHOD: {
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("name")));
+ p_list->push_back(PropertyInfo(Variant::INT, PNAME("arg_count"), PROPERTY_HINT_RANGE, "0,32,1,or_greater"));
+
+ Dictionary d = animation->track_get_key_value(track, key);
+ ERR_FAIL_COND(!d.has("args"));
+ Vector<Variant> args = d["args"];
+ String vtypes;
+ for (int i = 0; i < Variant::VARIANT_MAX; i++) {
+ if (i > 0) {
+ vtypes += ",";
}
+ vtypes += Variant::get_type_name(Variant::Type(i));
+ }
- } break;
- case Animation::TYPE_BEZIER: {
- Animation::HandleMode hm = animation->bezier_track_get_key_handle_mode(track, key);
- p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("value")));
- if (hm == Animation::HANDLE_MODE_LINEAR) {
- p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("in_handle"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("out_handle"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY));
- } else {
- p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("in_handle")));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("out_handle")));
+ for (int i = 0; i < args.size(); i++) {
+ p_list->push_back(PropertyInfo(Variant::INT, vformat("%s/%d/%s", PNAME("args"), i, PNAME("type")), PROPERTY_HINT_ENUM, vtypes));
+ if (args[i].get_type() != Variant::NIL) {
+ p_list->push_back(PropertyInfo(args[i].get_type(), vformat("%s/%d/%s", PNAME("args"), i, PNAME("value"))));
}
- p_list->push_back(PropertyInfo(Variant::INT, PNAME("handle_mode"), PROPERTY_HINT_ENUM, "Free,Linear,Balanced,Mirrored"));
-
- } break;
- case Animation::TYPE_AUDIO: {
- p_list->push_back(PropertyInfo(Variant::OBJECT, PNAME("stream"), PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"));
- p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("start_offset"), PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
- p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("end_offset"), PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
+ }
- } break;
- case Animation::TYPE_ANIMATION: {
- String animations;
+ } break;
+ case Animation::TYPE_BEZIER: {
+ Animation::HandleMode hm = animation->bezier_track_get_key_handle_mode(track, key);
+ p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("value")));
+ if (hm == Animation::HANDLE_MODE_LINEAR) {
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("in_handle"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("out_handle"), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY));
+ } else {
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("in_handle")));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, PNAME("out_handle")));
+ }
+ p_list->push_back(PropertyInfo(Variant::INT, PNAME("handle_mode"), PROPERTY_HINT_ENUM, "Free,Linear,Balanced,Mirrored"));
- if (root_path && root_path->has_node(animation->track_get_path(track))) {
- AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(root_path->get_node(animation->track_get_path(track)));
- if (ap) {
- List<StringName> anims;
- ap->get_animation_list(&anims);
- for (const StringName &E : anims) {
- if (!animations.is_empty()) {
- animations += ",";
- }
+ } break;
+ case Animation::TYPE_AUDIO: {
+ p_list->push_back(PropertyInfo(Variant::OBJECT, PNAME("stream"), PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("start_offset"), PROPERTY_HINT_RANGE, "0,3600,0.0001,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("end_offset"), PROPERTY_HINT_RANGE, "0,3600,0.0001,or_greater"));
- animations += String(E);
+ } break;
+ case Animation::TYPE_ANIMATION: {
+ String animations;
+
+ if (root_path && root_path->has_node(animation->track_get_path(track))) {
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(root_path->get_node(animation->track_get_path(track)));
+ if (ap) {
+ List<StringName> anims;
+ ap->get_animation_list(&anims);
+ for (const StringName &E : anims) {
+ if (!animations.is_empty()) {
+ animations += ",";
}
+
+ animations += String(E);
}
}
+ }
- if (!animations.is_empty()) {
- animations += ",";
- }
- animations += "[stop]";
+ if (!animations.is_empty()) {
+ animations += ",";
+ }
+ animations += "[stop]";
- p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("animation"), PROPERTY_HINT_ENUM, animations));
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, PNAME("animation"), PROPERTY_HINT_ENUM, animations));
- } break;
- }
+ } break;
+ }
- if (animation->track_get_type(track) == Animation::TYPE_VALUE) {
- p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("easing"), PROPERTY_HINT_EXP_EASING));
- }
+ if (animation->track_get_type(track) == Animation::TYPE_VALUE) {
+ p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("easing"), PROPERTY_HINT_EXP_EASING));
}
+}
- Ref<EditorUndoRedoManager> undo_redo;
- Ref<Animation> animation;
- int track = -1;
- float key_ofs = 0;
- Node *root_path = nullptr;
+void AnimationTrackKeyEdit::notify_change() {
+ notify_property_list_changed();
+}
- PropertyInfo hint;
- NodePath base;
- bool use_fps = false;
+Node *AnimationTrackKeyEdit::get_root_path() {
+ return root_path;
+}
- void notify_change() {
- notify_property_list_changed();
- }
+void AnimationTrackKeyEdit::set_use_fps(bool p_enable) {
+ use_fps = p_enable;
+ notify_property_list_changed();
+}
- Node *get_root_path() {
- return root_path;
- }
+void AnimationMultiTrackKeyEdit::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("_update_obj"), &AnimationMultiTrackKeyEdit::_update_obj);
+ ClassDB::bind_method(D_METHOD("_key_ofs_changed"), &AnimationMultiTrackKeyEdit::_key_ofs_changed);
+ ClassDB::bind_method(D_METHOD("_hide_script_from_inspector"), &AnimationMultiTrackKeyEdit::_hide_script_from_inspector);
+ ClassDB::bind_method(D_METHOD("_hide_metadata_from_inspector"), &AnimationMultiTrackKeyEdit::_hide_metadata_from_inspector);
+ ClassDB::bind_method(D_METHOD("get_root_path"), &AnimationMultiTrackKeyEdit::get_root_path);
+ ClassDB::bind_method(D_METHOD("_dont_undo_redo"), &AnimationMultiTrackKeyEdit::_dont_undo_redo);
+ ClassDB::bind_method(D_METHOD("_is_read_only"), &AnimationMultiTrackKeyEdit::_is_read_only);
+}
- void set_use_fps(bool p_enable) {
- use_fps = p_enable;
- notify_property_list_changed();
+void AnimationMultiTrackKeyEdit::_fix_node_path(Variant &value, NodePath &base) {
+ NodePath np = value;
+
+ if (np == NodePath()) {
+ return;
}
-};
-class AnimationMultiTrackKeyEdit : public Object {
- GDCLASS(AnimationMultiTrackKeyEdit, Object);
+ Node *root = EditorNode::get_singleton()->get_tree()->get_root();
-public:
- bool setting = false;
- bool animation_read_only = false;
+ Node *np_node = root->get_node(np);
+ ERR_FAIL_COND(!np_node);
- bool _hide_script_from_inspector() { return true; }
- bool _hide_metadata_from_inspector() { return true; }
- bool _dont_undo_redo() { return true; }
+ Node *edited_node = root->get_node(base);
+ ERR_FAIL_COND(!edited_node);
- bool _is_read_only() {
- return animation_read_only;
- }
+ value = edited_node->get_path_to(np_node);
+}
- static void _bind_methods() {
- ClassDB::bind_method(D_METHOD("_update_obj"), &AnimationMultiTrackKeyEdit::_update_obj);
- ClassDB::bind_method(D_METHOD("_key_ofs_changed"), &AnimationMultiTrackKeyEdit::_key_ofs_changed);
- ClassDB::bind_method(D_METHOD("_hide_script_from_inspector"), &AnimationMultiTrackKeyEdit::_hide_script_from_inspector);
- ClassDB::bind_method(D_METHOD("_hide_metadata_from_inspector"), &AnimationMultiTrackKeyEdit::_hide_metadata_from_inspector);
- ClassDB::bind_method(D_METHOD("get_root_path"), &AnimationMultiTrackKeyEdit::get_root_path);
- ClassDB::bind_method(D_METHOD("_dont_undo_redo"), &AnimationMultiTrackKeyEdit::_dont_undo_redo);
- ClassDB::bind_method(D_METHOD("_is_read_only"), &AnimationMultiTrackKeyEdit::_is_read_only);
+void AnimationMultiTrackKeyEdit::_update_obj(const Ref<Animation> &p_anim) {
+ if (setting || animation != p_anim) {
+ return;
}
- void _fix_node_path(Variant &value, NodePath &base) {
- NodePath np = value;
+ notify_change();
+}
- if (np == NodePath()) {
- return;
- }
+void AnimationMultiTrackKeyEdit::_key_ofs_changed(const Ref<Animation> &p_anim, float from, float to) {
+ if (animation != p_anim) {
+ return;
+ }
- Node *root = EditorNode::get_singleton()->get_tree()->get_root();
+ for (const KeyValue<int, List<float>> &E : key_ofs_map) {
+ int key = 0;
+ for (const float &key_ofs : E.value) {
+ if (from != key_ofs) {
+ key++;
+ continue;
+ }
- Node *np_node = root->get_node(np);
- ERR_FAIL_COND(!np_node);
+ int track = E.key;
+ key_ofs_map[track][key] = to;
- Node *edited_node = root->get_node(base);
- ERR_FAIL_COND(!edited_node);
+ if (setting) {
+ return;
+ }
- value = edited_node->get_path_to(np_node);
- }
+ notify_change();
- void _update_obj(const Ref<Animation> &p_anim) {
- if (setting || animation != p_anim) {
return;
}
-
- notify_change();
}
+}
- void _key_ofs_changed(const Ref<Animation> &p_anim, float from, float to) {
- if (animation != p_anim) {
- return;
- }
-
- for (const KeyValue<int, List<float>> &E : key_ofs_map) {
- int key = 0;
- for (const float &key_ofs : E.value) {
- if (from != key_ofs) {
- key++;
- continue;
- }
+bool AnimationMultiTrackKeyEdit::_set(const StringName &p_name, const Variant &p_value) {
+ bool update_obj = false;
+ bool change_notify_deserved = false;
+ for (const KeyValue<int, List<float>> &E : key_ofs_map) {
+ int track = E.key;
+ for (const float &key_ofs : E.value) {
+ int key = animation->track_find_key(track, key_ofs, Animation::FIND_MODE_APPROX);
+ ERR_FAIL_COND_V(key == -1, false);
- int track = E.key;
- key_ofs_map[track][key] = to;
+ String name = p_name;
+ if (name == "easing") {
+ float val = p_value;
+ float prev_val = animation->track_get_key_transition(track, key);
- if (setting) {
- return;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ if (!setting) {
+ setting = true;
+ undo_redo->create_action(TTR("Animation Multi Change Transition"), UndoRedo::MERGE_ENDS);
}
-
- notify_change();
-
- return;
+ 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);
+ update_obj = true;
}
- }
- }
- bool _set(const StringName &p_name, const Variant &p_value) {
- bool update_obj = false;
- bool change_notify_deserved = false;
- for (const KeyValue<int, List<float>> &E : key_ofs_map) {
- int track = E.key;
- for (const float &key_ofs : E.value) {
- int key = animation->track_find_key(track, key_ofs, true);
- ERR_FAIL_COND_V(key == -1, false);
-
- String name = p_name;
- if (name == "time" || name == "frame") {
- float new_time = p_value;
-
- if (name == "frame") {
- float fps = animation->get_step();
- if (fps > 0) {
- fps = 1.0 / fps;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ switch (animation->track_get_type(track)) {
+ case Animation::TYPE_POSITION_3D:
+ case Animation::TYPE_ROTATION_3D:
+ case Animation::TYPE_SCALE_3D: {
+ Variant old = animation->track_get_key_value(track, key);
+ if (!setting) {
+ String chan;
+ switch (animation->track_get_type(track)) {
+ case Animation::TYPE_POSITION_3D:
+ chan = "Position3D";
+ break;
+ case Animation::TYPE_ROTATION_3D:
+ chan = "Rotation3D";
+ break;
+ case Animation::TYPE_SCALE_3D:
+ chan = "Scale3D";
+ break;
+ default: {
+ }
}
- new_time /= fps;
- }
- int existing = animation->track_find_key(track, new_time, true);
-
- if (!setting) {
setting = true;
- undo_redo->create_action(TTR("Anim Multi Change Keyframe Time"), UndoRedo::MERGE_ENDS);
+ undo_redo->create_action(vformat(TTR("Animation Multi Change %s"), chan));
}
+ undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, p_value);
+ undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, old);
+ update_obj = true;
+ } break;
+ case Animation::TYPE_BLEND_SHAPE:
+ case Animation::TYPE_VALUE: {
+ if (name == "value") {
+ Variant value = p_value;
- Variant val = animation->track_get_key_value(track, key);
- float trans = animation->track_get_key_transition(track, key);
-
- undo_redo->add_do_method(animation.ptr(), "track_remove_key", track, key);
- undo_redo->add_do_method(animation.ptr(), "track_insert_key", track, new_time, val, trans);
- undo_redo->add_do_method(this, "_key_ofs_changed", animation, key_ofs, new_time);
- undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", track, new_time);
- undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, key_ofs, val, trans);
- undo_redo->add_undo_method(this, "_key_ofs_changed", animation, new_time, key_ofs);
+ if (value.get_type() == Variant::NODE_PATH) {
+ _fix_node_path(value, base_map[track]);
+ }
- if (existing != -1) {
- Variant v = animation->track_get_key_value(track, existing);
- trans = animation->track_get_key_transition(track, existing);
- undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, new_time, v, trans);
+ if (!setting) {
+ setting = true;
+ undo_redo->create_action(TTR("Animation Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ }
+ Variant prev = animation->track_get_key_value(track, key);
+ undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, value);
+ undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, prev);
+ update_obj = true;
}
- } else if (name == "easing") {
- float val = p_value;
- float prev_val = animation->track_get_key_transition(track, key);
+ } break;
+ case Animation::TYPE_METHOD: {
+ Dictionary d_old = animation->track_get_key_value(track, key);
+ Dictionary d_new = d_old.duplicate();
- if (!setting) {
- setting = true;
- undo_redo->create_action(TTR("Anim Multi 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);
- update_obj = true;
- }
+ bool mergeable = false;
- switch (animation->track_get_type(track)) {
- case Animation::TYPE_POSITION_3D:
- case Animation::TYPE_ROTATION_3D:
- case Animation::TYPE_SCALE_3D: {
- Variant old = animation->track_get_key_value(track, key);
- if (!setting) {
- String chan;
- switch (animation->track_get_type(track)) {
- case Animation::TYPE_POSITION_3D:
- chan = "Position3D";
- break;
- case Animation::TYPE_ROTATION_3D:
- chan = "Rotation3D";
- break;
- case Animation::TYPE_SCALE_3D:
- chan = "Scale3D";
- break;
- default: {
+ if (name == "name") {
+ d_new["method"] = p_value;
+ } else if (name == "arg_count") {
+ Vector<Variant> args = d_old["args"];
+ args.resize(p_value);
+ d_new["args"] = args;
+ change_notify_deserved = true;
+ } else if (name.begins_with("args/")) {
+ Vector<Variant> args = d_old["args"];
+ int idx = name.get_slice("/", 1).to_int();
+ ERR_FAIL_INDEX_V(idx, args.size(), false);
+
+ String what = name.get_slice("/", 2);
+ if (what == "type") {
+ Variant::Type t = Variant::Type(int(p_value));
+
+ if (t != args[idx].get_type()) {
+ Callable::CallError err;
+ if (Variant::can_convert(args[idx].get_type(), t)) {
+ Variant old = args[idx];
+ Variant *ptrs[1] = { &old };
+ Variant::construct(t, args.write[idx], (const Variant **)ptrs, 1, err);
+ } else {
+ Variant::construct(t, args.write[idx], nullptr, 0, err);
}
+ change_notify_deserved = true;
+ d_new["args"] = args;
}
-
- setting = true;
- undo_redo->create_action(vformat(TTR("Anim Multi Change %s"), chan));
- }
- undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, p_value);
- undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, old);
- update_obj = true;
- } break;
- case Animation::TYPE_BLEND_SHAPE:
- case Animation::TYPE_VALUE: {
- if (name == "value") {
+ } else if (what == "value") {
Variant value = p_value;
-
if (value.get_type() == Variant::NODE_PATH) {
_fix_node_path(value, base_map[track]);
}
- if (!setting) {
- setting = true;
- undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- }
- Variant prev = animation->track_get_key_value(track, key);
- undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, value);
- undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, prev);
- update_obj = true;
+ args.write[idx] = value;
+ d_new["args"] = args;
+ mergeable = true;
}
- } break;
- case Animation::TYPE_METHOD: {
- Dictionary d_old = animation->track_get_key_value(track, key);
- Dictionary d_new = d_old.duplicate();
+ }
- bool mergeable = false;
+ Variant prev = animation->track_get_key_value(track, key);
- if (name == "name") {
- d_new["method"] = p_value;
- } else if (name == "arg_count") {
- Vector<Variant> args = d_old["args"];
- args.resize(p_value);
- d_new["args"] = args;
- change_notify_deserved = true;
- } else if (name.begins_with("args/")) {
- Vector<Variant> args = d_old["args"];
- int idx = name.get_slice("/", 1).to_int();
- ERR_FAIL_INDEX_V(idx, args.size(), false);
-
- String what = name.get_slice("/", 2);
- if (what == "type") {
- Variant::Type t = Variant::Type(int(p_value));
-
- if (t != args[idx].get_type()) {
- Callable::CallError err;
- if (Variant::can_convert(args[idx].get_type(), t)) {
- Variant old = args[idx];
- Variant *ptrs[1] = { &old };
- Variant::construct(t, args.write[idx], (const Variant **)ptrs, 1, err);
- } else {
- Variant::construct(t, args.write[idx], nullptr, 0, err);
- }
- change_notify_deserved = true;
- d_new["args"] = args;
- }
- } else if (what == "value") {
- Variant value = p_value;
- if (value.get_type() == Variant::NODE_PATH) {
- _fix_node_path(value, base_map[track]);
- }
+ if (!setting) {
+ if (mergeable) {
+ undo_redo->create_action(TTR("Animation Multi Change Call"), UndoRedo::MERGE_ENDS);
+ } else {
+ undo_redo->create_action(TTR("Animation Multi Change Call"));
+ }
- args.write[idx] = value;
- d_new["args"] = args;
- mergeable = true;
- }
+ setting = true;
+ }
+
+ undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, d_new);
+ undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, d_old);
+ update_obj = true;
+ } break;
+ case Animation::TYPE_BEZIER: {
+ if (name == "value") {
+ const Variant &value = p_value;
+
+ if (!setting) {
+ setting = true;
+ undo_redo->create_action(TTR("Animation Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
}
+ float prev = animation->bezier_track_get_key_value(track, key);
+ undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_value", track, key, value);
+ undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_value", track, key, prev);
+ update_obj = true;
+ } else if (name == "in_handle") {
+ const Variant &value = p_value;
- Variant prev = animation->track_get_key_value(track, key);
+ if (!setting) {
+ setting = true;
+ undo_redo->create_action(TTR("Animation Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ }
+ Vector2 prev = animation->bezier_track_get_key_in_handle(track, key);
+ undo_redo->add_do_method(this, "_bezier_track_set_key_in_handle", track, key, value);
+ undo_redo->add_undo_method(this, "_bezier_track_set_key_in_handle", track, key, prev);
+ update_obj = true;
+ } else if (name == "out_handle") {
+ const Variant &value = p_value;
if (!setting) {
- if (mergeable) {
- undo_redo->create_action(TTR("Anim Multi Change Call"), UndoRedo::MERGE_ENDS);
- } else {
- undo_redo->create_action(TTR("Anim Multi Change Call"));
- }
+ setting = true;
+ undo_redo->create_action(TTR("Animation Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ }
+ Vector2 prev = animation->bezier_track_get_key_out_handle(track, key);
+ undo_redo->add_do_method(this, "_bezier_track_set_key_out_handle", track, key, value);
+ undo_redo->add_undo_method(this, "_bezier_track_set_key_out_handle", track, key, prev);
+ update_obj = true;
+ } else if (name == "handle_mode") {
+ const Variant &value = p_value;
+ if (!setting) {
setting = true;
+ undo_redo->create_action(TTR("Animation Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
}
+ int prev = animation->bezier_track_get_key_handle_mode(track, key);
+ undo_redo->add_do_method(this, "_bezier_track_set_key_handle_mode", animation.ptr(), track, key, value);
+ undo_redo->add_undo_method(this, "_bezier_track_set_key_handle_mode", animation.ptr(), track, key, prev);
+ update_obj = true;
+ }
+ } break;
+ case Animation::TYPE_AUDIO: {
+ if (name == "stream") {
+ Ref<AudioStream> stream = p_value;
- undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, d_new);
- undo_redo->add_undo_method(animation.ptr(), "track_set_key_value", track, key, d_old);
+ if (!setting) {
+ setting = true;
+ undo_redo->create_action(TTR("Animation Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
+ }
+ Ref<Resource> prev = animation->audio_track_get_key_stream(track, key);
+ undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_stream", track, key, stream);
+ undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_stream", track, key, prev);
update_obj = true;
- } break;
- case Animation::TYPE_BEZIER: {
- if (name == "value") {
- const Variant &value = p_value;
+ } else if (name == "start_offset") {
+ float value = p_value;
- if (!setting) {
- setting = true;
- undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- }
- float prev = animation->bezier_track_get_key_value(track, key);
- undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_value", track, key, value);
- undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_value", track, key, prev);
- update_obj = true;
- } else if (name == "in_handle") {
- const Variant &value = p_value;
-
- if (!setting) {
- setting = true;
- undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- }
- Vector2 prev = animation->bezier_track_get_key_in_handle(track, key);
- undo_redo->add_do_method(this, "_bezier_track_set_key_in_handle", track, key, value);
- undo_redo->add_undo_method(this, "_bezier_track_set_key_in_handle", track, key, prev);
- update_obj = true;
- } else if (name == "out_handle") {
- const Variant &value = p_value;
-
- if (!setting) {
- setting = true;
- undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- }
- Vector2 prev = animation->bezier_track_get_key_out_handle(track, key);
- undo_redo->add_do_method(this, "_bezier_track_set_key_out_handle", track, key, value);
- undo_redo->add_undo_method(this, "_bezier_track_set_key_out_handle", track, key, prev);
- update_obj = true;
- } else if (name == "handle_mode") {
- const Variant &value = p_value;
-
- if (!setting) {
- setting = true;
- undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- }
- int prev = animation->bezier_track_get_key_handle_mode(track, key);
- undo_redo->add_do_method(this, "_bezier_track_set_key_handle_mode", animation.ptr(), track, key, value);
- undo_redo->add_undo_method(this, "_bezier_track_set_key_handle_mode", animation.ptr(), track, key, prev);
- update_obj = true;
+ if (!setting) {
+ setting = true;
+ undo_redo->create_action(TTR("Animation Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
}
- } break;
- case Animation::TYPE_AUDIO: {
- if (name == "stream") {
- Ref<AudioStream> stream = p_value;
+ float prev = animation->audio_track_get_key_start_offset(track, key);
+ undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_start_offset", track, key, value);
+ undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_start_offset", track, key, prev);
+ update_obj = true;
+ } else if (name == "end_offset") {
+ float value = p_value;
- if (!setting) {
- setting = true;
- undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- }
- Ref<Resource> prev = animation->audio_track_get_key_stream(track, key);
- undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_stream", track, key, stream);
- undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_stream", track, key, prev);
- update_obj = true;
- } else if (name == "start_offset") {
- float value = p_value;
-
- if (!setting) {
- setting = true;
- undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- }
- float prev = animation->audio_track_get_key_start_offset(track, key);
- undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_start_offset", track, key, value);
- undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_start_offset", track, key, prev);
- update_obj = true;
- } else if (name == "end_offset") {
- float value = p_value;
-
- if (!setting) {
- setting = true;
- undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- }
- float prev = animation->audio_track_get_key_end_offset(track, key);
- undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_end_offset", track, key, value);
- undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_end_offset", track, key, prev);
- update_obj = true;
+ if (!setting) {
+ setting = true;
+ undo_redo->create_action(TTR("Animation Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
}
- } break;
- case Animation::TYPE_ANIMATION: {
- if (name == "animation") {
- StringName anim_name = p_value;
+ float prev = animation->audio_track_get_key_end_offset(track, key);
+ undo_redo->add_do_method(animation.ptr(), "audio_track_set_key_end_offset", track, key, value);
+ undo_redo->add_undo_method(animation.ptr(), "audio_track_set_key_end_offset", track, key, prev);
+ update_obj = true;
+ }
+ } break;
+ case Animation::TYPE_ANIMATION: {
+ if (name == "animation") {
+ StringName anim_name = p_value;
- if (!setting) {
- setting = true;
- undo_redo->create_action(TTR("Anim Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
- }
- StringName prev = animation->animation_track_get_key_animation(track, key);
- undo_redo->add_do_method(animation.ptr(), "animation_track_set_key_animation", track, key, anim_name);
- undo_redo->add_undo_method(animation.ptr(), "animation_track_set_key_animation", track, key, prev);
- update_obj = true;
+ if (!setting) {
+ setting = true;
+ undo_redo->create_action(TTR("Animation Multi Change Keyframe Value"), UndoRedo::MERGE_ENDS);
}
- } break;
- }
+ StringName prev = animation->animation_track_get_key_animation(track, key);
+ undo_redo->add_do_method(animation.ptr(), "animation_track_set_key_animation", track, key, anim_name);
+ undo_redo->add_undo_method(animation.ptr(), "animation_track_set_key_animation", track, key, prev);
+ update_obj = true;
+ }
+ } break;
}
}
+ }
- if (setting) {
- if (update_obj) {
- undo_redo->add_do_method(this, "_update_obj", animation);
- undo_redo->add_undo_method(this, "_update_obj", animation);
- }
-
- undo_redo->commit_action();
- setting = false;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ if (setting) {
+ if (update_obj) {
+ undo_redo->add_do_method(this, "_update_obj", animation);
+ undo_redo->add_undo_method(this, "_update_obj", animation);
+ }
- if (change_notify_deserved) {
- notify_change();
- }
+ undo_redo->commit_action();
+ setting = false;
- return true;
+ if (change_notify_deserved) {
+ notify_change();
}
- return false;
+ return true;
}
- bool _get(const StringName &p_name, Variant &r_ret) const {
- for (const KeyValue<int, List<float>> &E : key_ofs_map) {
- int track = E.key;
- for (const float &key_ofs : E.value) {
- int key = animation->track_find_key(track, key_ofs, true);
- ERR_CONTINUE(key == -1);
+ return false;
+}
- String name = p_name;
- if (name == "time") {
- r_ret = key_ofs;
- return true;
- }
+bool AnimationMultiTrackKeyEdit::_get(const StringName &p_name, Variant &r_ret) const {
+ for (const KeyValue<int, List<float>> &E : key_ofs_map) {
+ int track = E.key;
+ for (const float &key_ofs : E.value) {
+ int key = animation->track_find_key(track, key_ofs, Animation::FIND_MODE_APPROX);
+ ERR_CONTINUE(key == -1);
- if (name == "frame") {
- float fps = animation->get_step();
- if (fps > 0) {
- fps = 1.0 / fps;
+ String name = p_name;
+ if (name == "easing") {
+ r_ret = animation->track_get_key_transition(track, key);
+ return true;
+ }
+
+ switch (animation->track_get_type(track)) {
+ case Animation::TYPE_POSITION_3D:
+ case Animation::TYPE_ROTATION_3D:
+ case Animation::TYPE_SCALE_3D: {
+ if (name == "position" || name == "rotation" || name == "scale") {
+ r_ret = animation->track_get_key_value(track, key);
+ return true;
}
- r_ret = key_ofs * fps;
- return true;
- }
- if (name == "easing") {
- r_ret = animation->track_get_key_transition(track, key);
- return true;
- }
+ } break;
+ case Animation::TYPE_BLEND_SHAPE:
+ case Animation::TYPE_VALUE: {
+ if (name == "value") {
+ r_ret = animation->track_get_key_value(track, key);
+ return true;
+ }
- switch (animation->track_get_type(track)) {
- case Animation::TYPE_POSITION_3D:
- case Animation::TYPE_ROTATION_3D:
- case Animation::TYPE_SCALE_3D: {
- if (name == "position" || name == "rotation" || name == "scale") {
- r_ret = animation->track_get_key_value(track, key);
- return true;
- }
+ } break;
+ case Animation::TYPE_METHOD: {
+ Dictionary d = animation->track_get_key_value(track, key);
- } break;
- case Animation::TYPE_BLEND_SHAPE:
- case Animation::TYPE_VALUE: {
- if (name == "value") {
- r_ret = animation->track_get_key_value(track, key);
- return true;
- }
+ if (name == "name") {
+ ERR_FAIL_COND_V(!d.has("method"), false);
+ r_ret = d["method"];
+ return true;
+ }
- } break;
- case Animation::TYPE_METHOD: {
- Dictionary d = animation->track_get_key_value(track, key);
+ ERR_FAIL_COND_V(!d.has("args"), false);
- if (name == "name") {
- ERR_FAIL_COND_V(!d.has("method"), false);
- r_ret = d["method"];
- return true;
- }
+ Vector<Variant> args = d["args"];
- ERR_FAIL_COND_V(!d.has("args"), false);
+ if (name == "arg_count") {
+ r_ret = args.size();
+ return true;
+ }
- Vector<Variant> args = d["args"];
+ if (name.begins_with("args/")) {
+ int idx = name.get_slice("/", 1).to_int();
+ ERR_FAIL_INDEX_V(idx, args.size(), false);
- if (name == "arg_count") {
- r_ret = args.size();
+ String what = name.get_slice("/", 2);
+ if (what == "type") {
+ r_ret = args[idx].get_type();
return true;
}
- if (name.begins_with("args/")) {
- int idx = name.get_slice("/", 1).to_int();
- ERR_FAIL_INDEX_V(idx, args.size(), false);
-
- String what = name.get_slice("/", 2);
- if (what == "type") {
- r_ret = args[idx].get_type();
- return true;
- }
-
- if (what == "value") {
- r_ret = args[idx];
- return true;
- }
- }
-
- } break;
- case Animation::TYPE_BEZIER: {
- if (name == "value") {
- r_ret = animation->bezier_track_get_key_value(track, key);
+ if (what == "value") {
+ r_ret = args[idx];
return true;
}
+ }
- if (name == "in_handle") {
- r_ret = animation->bezier_track_get_key_in_handle(track, key);
- return true;
- }
+ } break;
+ case Animation::TYPE_BEZIER: {
+ if (name == "value") {
+ r_ret = animation->bezier_track_get_key_value(track, key);
+ return true;
+ }
- if (name == "out_handle") {
- r_ret = animation->bezier_track_get_key_out_handle(track, key);
- return true;
- }
+ if (name == "in_handle") {
+ r_ret = animation->bezier_track_get_key_in_handle(track, key);
+ return true;
+ }
- if (name == "handle_mode") {
- r_ret = animation->bezier_track_get_key_handle_mode(track, key);
- return true;
- }
+ if (name == "out_handle") {
+ r_ret = animation->bezier_track_get_key_out_handle(track, key);
+ return true;
+ }
- } break;
- case Animation::TYPE_AUDIO: {
- if (name == "stream") {
- r_ret = animation->audio_track_get_key_stream(track, key);
- return true;
- }
+ if (name == "handle_mode") {
+ r_ret = animation->bezier_track_get_key_handle_mode(track, key);
+ return true;
+ }
- if (name == "start_offset") {
- r_ret = animation->audio_track_get_key_start_offset(track, key);
- return true;
- }
+ } break;
+ case Animation::TYPE_AUDIO: {
+ if (name == "stream") {
+ r_ret = animation->audio_track_get_key_stream(track, key);
+ return true;
+ }
- if (name == "end_offset") {
- r_ret = animation->audio_track_get_key_end_offset(track, key);
- return true;
- }
+ if (name == "start_offset") {
+ r_ret = animation->audio_track_get_key_start_offset(track, key);
+ return true;
+ }
- } break;
- case Animation::TYPE_ANIMATION: {
- if (name == "animation") {
- r_ret = animation->animation_track_get_key_animation(track, key);
- return true;
- }
+ if (name == "end_offset") {
+ r_ret = animation->audio_track_get_key_end_offset(track, key);
+ return true;
+ }
- } break;
- }
+ } break;
+ case Animation::TYPE_ANIMATION: {
+ if (name == "animation") {
+ r_ret = animation->animation_track_get_key_animation(track, key);
+ return true;
+ }
+
+ } break;
}
}
+ }
- return false;
+ return false;
+}
+
+void AnimationMultiTrackKeyEdit::_get_property_list(List<PropertyInfo> *p_list) const {
+ if (animation.is_null()) {
+ return;
}
- void _get_property_list(List<PropertyInfo> *p_list) const {
- if (animation.is_null()) {
- return;
- }
- int first_track = -1;
- float first_key = -1.0;
+ int first_track = -1;
+ float first_key = -1.0;
- bool show_time = true;
- bool same_track_type = true;
- bool same_key_type = true;
- for (const KeyValue<int, List<float>> &E : key_ofs_map) {
- int track = E.key;
- ERR_FAIL_INDEX(track, animation->get_track_count());
+ bool same_track_type = true;
+ bool same_key_type = true;
+ for (const KeyValue<int, List<float>> &E : key_ofs_map) {
+ int track = E.key;
+ ERR_FAIL_INDEX(track, animation->get_track_count());
- if (first_track < 0) {
- first_track = track;
- }
+ if (first_track < 0) {
+ first_track = track;
+ }
- if (show_time && E.value.size() > 1) {
- show_time = false;
+ if (same_track_type) {
+ if (animation->track_get_type(first_track) != animation->track_get_type(track)) {
+ same_track_type = false;
+ same_key_type = false;
}
- if (same_track_type) {
- if (animation->track_get_type(first_track) != animation->track_get_type(track)) {
- same_track_type = false;
- same_key_type = false;
+ for (const float &F : E.value) {
+ int key = animation->track_find_key(track, F, Animation::FIND_MODE_APPROX);
+ ERR_FAIL_COND(key == -1);
+ if (first_key < 0) {
+ first_key = key;
}
- for (const float &F : E.value) {
- int key = animation->track_find_key(track, F, true);
- ERR_FAIL_COND(key == -1);
- if (first_key < 0) {
- first_key = key;
- }
-
- if (animation->track_get_key_value(first_track, first_key).get_type() != animation->track_get_key_value(track, key).get_type()) {
- same_key_type = false;
- }
+ if (animation->track_get_key_value(first_track, first_key).get_type() != animation->track_get_key_value(track, key).get_type()) {
+ same_key_type = false;
}
}
}
+ }
- if (show_time) {
- if (use_fps && animation->get_step() > 0) {
- float max_frame = animation->get_length() / animation->get_step();
- p_list->push_back(PropertyInfo(Variant::FLOAT, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
- } else {
- p_list->push_back(PropertyInfo(Variant::FLOAT, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
- }
- }
-
- if (same_track_type) {
- switch (animation->track_get_type(first_track)) {
- case Animation::TYPE_POSITION_3D: {
- p_list->push_back(PropertyInfo(Variant::VECTOR3, "position"));
- } break;
- case Animation::TYPE_ROTATION_3D: {
- p_list->push_back(PropertyInfo(Variant::QUATERNION, "scale"));
- } break;
- case Animation::TYPE_SCALE_3D: {
- p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale"));
- } break;
- case Animation::TYPE_BLEND_SHAPE: {
- p_list->push_back(PropertyInfo(Variant::FLOAT, "value"));
- } break;
- case Animation::TYPE_VALUE: {
- if (same_key_type) {
- Variant v = animation->track_get_key_value(first_track, first_key);
+ if (same_track_type) {
+ switch (animation->track_get_type(first_track)) {
+ case Animation::TYPE_POSITION_3D: {
+ p_list->push_back(PropertyInfo(Variant::VECTOR3, "position"));
+ } break;
+ case Animation::TYPE_ROTATION_3D: {
+ p_list->push_back(PropertyInfo(Variant::QUATERNION, "scale"));
+ } break;
+ case Animation::TYPE_SCALE_3D: {
+ p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale"));
+ } break;
+ case Animation::TYPE_BLEND_SHAPE: {
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "value"));
+ } break;
+ case Animation::TYPE_VALUE: {
+ if (same_key_type) {
+ Variant v = animation->track_get_key_value(first_track, first_key);
- if (hint.type != Variant::NIL) {
- PropertyInfo pi = hint;
- pi.name = "value";
- p_list->push_back(pi);
- } else {
- PropertyHint val_hint = PROPERTY_HINT_NONE;
- String val_hint_string;
-
- if (v.get_type() == Variant::OBJECT) {
- // Could actually check the object property if exists..? Yes I will!
- Ref<Resource> res = v;
- if (res.is_valid()) {
- val_hint = PROPERTY_HINT_RESOURCE_TYPE;
- val_hint_string = res->get_class();
- }
+ if (hint.type != Variant::NIL) {
+ PropertyInfo pi = hint;
+ pi.name = "value";
+ p_list->push_back(pi);
+ } else {
+ PropertyHint val_hint = PROPERTY_HINT_NONE;
+ String val_hint_string;
+
+ if (v.get_type() == Variant::OBJECT) {
+ // Could actually check the object property if exists..? Yes I will!
+ Ref<Resource> res = v;
+ if (res.is_valid()) {
+ val_hint = PROPERTY_HINT_RESOURCE_TYPE;
+ val_hint_string = res->get_class();
}
+ }
- if (v.get_type() != Variant::NIL) {
- p_list->push_back(PropertyInfo(v.get_type(), "value", val_hint, val_hint_string));
- }
+ if (v.get_type() != Variant::NIL) {
+ p_list->push_back(PropertyInfo(v.get_type(), "value", val_hint, val_hint_string));
}
}
+ }
- p_list->push_back(PropertyInfo(Variant::FLOAT, "easing", PROPERTY_HINT_EXP_EASING));
- } break;
- case Animation::TYPE_METHOD: {
- p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "easing", PROPERTY_HINT_EXP_EASING));
+ } break;
+ case Animation::TYPE_METHOD: {
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name"));
- p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,32,1,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,32,1,or_greater"));
- Dictionary d = animation->track_get_key_value(first_track, first_key);
- ERR_FAIL_COND(!d.has("args"));
- Vector<Variant> args = d["args"];
- String vtypes;
- for (int i = 0; i < Variant::VARIANT_MAX; i++) {
- if (i > 0) {
- vtypes += ",";
- }
- vtypes += Variant::get_type_name(Variant::Type(i));
+ Dictionary d = animation->track_get_key_value(first_track, first_key);
+ ERR_FAIL_COND(!d.has("args"));
+ Vector<Variant> args = d["args"];
+ String vtypes;
+ for (int i = 0; i < Variant::VARIANT_MAX; i++) {
+ if (i > 0) {
+ vtypes += ",";
}
+ vtypes += Variant::get_type_name(Variant::Type(i));
+ }
- for (int i = 0; i < args.size(); i++) {
- p_list->push_back(PropertyInfo(Variant::INT, "args/" + itos(i) + "/type", PROPERTY_HINT_ENUM, vtypes));
- if (args[i].get_type() != Variant::NIL) {
- p_list->push_back(PropertyInfo(args[i].get_type(), "args/" + itos(i) + "/value"));
- }
- }
- } break;
- case Animation::TYPE_BEZIER: {
- p_list->push_back(PropertyInfo(Variant::FLOAT, "value"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle"));
- p_list->push_back(PropertyInfo(Variant::INT, "handle_mode", PROPERTY_HINT_ENUM, "Free,Linear,Balanced,Mirrored"));
- } break;
- case Animation::TYPE_AUDIO: {
- p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"));
- p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
- p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
- } break;
- case Animation::TYPE_ANIMATION: {
- if (key_ofs_map.size() > 1) {
- break;
+ for (int i = 0; i < args.size(); i++) {
+ p_list->push_back(PropertyInfo(Variant::INT, "args/" + itos(i) + "/type", PROPERTY_HINT_ENUM, vtypes));
+ if (args[i].get_type() != Variant::NIL) {
+ p_list->push_back(PropertyInfo(args[i].get_type(), "args/" + itos(i) + "/value"));
}
+ }
+ } break;
+ case Animation::TYPE_BEZIER: {
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "value"));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle"));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle"));
+ p_list->push_back(PropertyInfo(Variant::INT, "handle_mode", PROPERTY_HINT_ENUM, "Free,Linear,Balanced,Mirrored"));
+ } break;
+ case Animation::TYPE_AUDIO: {
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.0001,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.0001,or_greater"));
+ } break;
+ case Animation::TYPE_ANIMATION: {
+ if (key_ofs_map.size() > 1) {
+ break;
+ }
- String animations;
-
- if (root_path && root_path->has_node(animation->track_get_path(first_track))) {
- AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(root_path->get_node(animation->track_get_path(first_track)));
- if (ap) {
- List<StringName> anims;
- ap->get_animation_list(&anims);
- for (List<StringName>::Element *G = anims.front(); G; G = G->next()) {
- if (!animations.is_empty()) {
- animations += ",";
- }
+ String animations;
- animations += String(G->get());
+ if (root_path && root_path->has_node(animation->track_get_path(first_track))) {
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(root_path->get_node(animation->track_get_path(first_track)));
+ if (ap) {
+ List<StringName> anims;
+ ap->get_animation_list(&anims);
+ for (List<StringName>::Element *G = anims.front(); G; G = G->next()) {
+ if (!animations.is_empty()) {
+ animations += ",";
}
+
+ animations += String(G->get());
}
}
+ }
- if (!animations.is_empty()) {
- animations += ",";
- }
- animations += "[stop]";
+ if (!animations.is_empty()) {
+ animations += ",";
+ }
+ animations += "[stop]";
- p_list->push_back(PropertyInfo(Variant::STRING_NAME, "animation", PROPERTY_HINT_ENUM, animations));
- } break;
- }
+ p_list->push_back(PropertyInfo(Variant::STRING_NAME, "animation", PROPERTY_HINT_ENUM, animations));
+ } break;
}
}
+}
- Ref<Animation> animation;
-
- RBMap<int, List<float>> key_ofs_map;
- RBMap<int, NodePath> base_map;
- PropertyInfo hint;
-
- Node *root_path = nullptr;
-
- bool use_fps = false;
-
- Ref<EditorUndoRedoManager> undo_redo;
-
- void notify_change() {
- notify_property_list_changed();
- }
+void AnimationMultiTrackKeyEdit::notify_change() {
+ notify_property_list_changed();
+}
- Node *get_root_path() {
- return root_path;
- }
+Node *AnimationMultiTrackKeyEdit::get_root_path() {
+ return root_path;
+}
- void set_use_fps(bool p_enable) {
- use_fps = p_enable;
- notify_property_list_changed();
- }
-};
+void AnimationMultiTrackKeyEdit::set_use_fps(bool p_enable) {
+ use_fps = p_enable;
+ notify_property_list_changed();
+}
void AnimationTimelineEdit::_zoom_changed(double) {
queue_redraw();
@@ -1413,13 +1246,14 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) {
return;
}
- p_new_len = MAX(0.001, p_new_len);
+ p_new_len = MAX(0.0001, p_new_len);
if (use_fps && animation->get_step() > 0) {
p_new_len *= animation->get_step();
}
editing = true;
- 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();
@@ -1431,6 +1265,7 @@ void AnimationTimelineEdit::_anim_length_changed(double p_new_len) {
void AnimationTimelineEdit::_anim_loop_pressed() {
if (!read_only) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Animation Loop"));
switch (animation->get_loop_mode()) {
case Animation::LOOP_NONE: {
@@ -1445,7 +1280,9 @@ void AnimationTimelineEdit::_anim_loop_pressed() {
default:
break;
}
+ undo_redo->add_do_method(this, "update_values");
undo_redo->add_undo_method(animation.ptr(), "set_loop_mode", animation->get_loop_mode());
+ undo_redo->add_undo_method(this, "update_values");
undo_redo->commit_action();
} else {
String base_path = animation->get_path();
@@ -1485,7 +1322,7 @@ void AnimationTimelineEdit::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
+ panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
add_track->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
loop->set_icon(get_theme_icon(SNAME("Loop"), SNAME("EditorIcons")));
time_icon->set_texture(get_theme_icon(SNAME("Time"), SNAME("EditorIcons")));
@@ -1503,7 +1340,7 @@ void AnimationTimelineEdit::_notification(int p_what) {
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
+ panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
} break;
case NOTIFICATION_RESIZED: {
@@ -1528,7 +1365,7 @@ void AnimationTimelineEdit::_notification(int p_what) {
float l = animation->get_length();
if (l <= 0) {
- l = 0.001; // Avoid crashor.
+ l = 0.0001; // Avoid crashor.
}
Ref<Texture2D> hsize_icon = get_theme_icon(SNAME("Hsize"), SNAME("EditorIcons"));
@@ -1589,7 +1426,7 @@ void AnimationTimelineEdit::_notification(int p_what) {
end_px = zoomw;
}
- draw_rect(Rect2(Point2(get_name_limit() + begin_px, 0), Point2(end_px - begin_px - 1, h)), timecolor);
+ draw_rect(Rect2(Point2(get_name_limit() + begin_px, 0), Point2(end_px - begin_px, h)), timecolor);
}
}
@@ -1676,6 +1513,7 @@ void AnimationTimelineEdit::_notification(int p_what) {
}
draw_line(Vector2(0, get_size().height), get_size(), linecolor, Math::round(EDSCALE));
+ update_values();
} break;
}
}
@@ -1698,7 +1536,6 @@ void AnimationTimelineEdit::set_animation(const Ref<Animation> &p_animation, boo
play_position->hide();
}
queue_redraw();
- update_values();
}
Size2 AnimationTimelineEdit::get_minimum_size() const {
@@ -1710,10 +1547,6 @@ Size2 AnimationTimelineEdit::get_minimum_size() const {
return ms;
}
-void AnimationTimelineEdit::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
void AnimationTimelineEdit::set_zoom(Range *p_zoom) {
zoom = p_zoom;
zoom->connect("value_changed", callable_mp(this, &AnimationTimelineEdit::_zoom_changed));
@@ -1747,9 +1580,12 @@ void AnimationTimelineEdit::update_values() {
length->set_step(1);
length->set_tooltip_text(TTR("Animation length (frames)"));
time_icon->set_tooltip_text(TTR("Animation length (frames)"));
+ if (track_edit) {
+ track_edit->editor->_update_key_edit();
+ }
} else {
length->set_value(animation->get_length());
- length->set_step(0.001);
+ length->set_step(0.0001);
length->set_tooltip_text(TTR("Animation length (seconds)"));
time_icon->set_tooltip_text(TTR("Animation length (seconds)"));
}
@@ -1891,7 +1727,6 @@ void AnimationTimelineEdit::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origi
void AnimationTimelineEdit::set_use_fps(bool p_use_fps) {
use_fps = p_use_fps;
- update_values();
queue_redraw();
}
@@ -1913,6 +1748,8 @@ void AnimationTimelineEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag"), PropertyInfo(Variant::BOOL, "timeline_only")));
ADD_SIGNAL(MethodInfo("track_added", PropertyInfo(Variant::INT, "track")));
ADD_SIGNAL(MethodInfo("length_changed", PropertyInfo(Variant::FLOAT, "size")));
+
+ ClassDB::bind_method(D_METHOD("update_values"), &AnimationTimelineEdit::update_values);
}
AnimationTimelineEdit::AnimationTimelineEdit() {
@@ -1939,9 +1776,9 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
time_icon->set_tooltip_text(TTR("Animation length (seconds)"));
len_hb->add_child(time_icon);
length = memnew(EditorSpinSlider);
- length->set_min(0.001);
+ length->set_min(0.0001);
length->set_max(36000);
- length->set_step(0.001);
+ length->set_step(0.0001);
length->set_allow_greater(true);
length->set_custom_minimum_size(Vector2(70 * EDSCALE, 0));
length->set_hide_slider(true);
@@ -2025,14 +1862,14 @@ void AnimationTrackEdit::_notification(int p_what) {
draw_texture(check, check_rect.position);
ofs += check->get_width() + hsep;
- Ref<Texture2D> type_icon = _get_key_type_icon();
- draw_texture(type_icon, Point2(ofs, int(get_size().height - type_icon->get_height()) / 2));
- ofs += type_icon->get_width() + hsep;
+ Ref<Texture2D> key_type_icon = _get_key_type_icon();
+ draw_texture(key_type_icon, Point2(ofs, int(get_size().height - key_type_icon->get_height()) / 2));
+ ofs += key_type_icon->get_width() + hsep;
- NodePath path = animation->track_get_path(track);
+ NodePath anim_path = animation->track_get_path(track);
Node *node = nullptr;
- if (root && root->has_node(path)) {
- node = root->get_node(path);
+ if (root && root->has_node(anim_path)) {
+ node = root->get_node(anim_path);
}
String text;
@@ -2047,9 +1884,9 @@ void AnimationTrackEdit::_notification(int p_what) {
} else if (animation->track_get_type(track) == Animation::TYPE_AUDIO) {
text = TTR("Audio Clips:");
} else if (animation->track_get_type(track) == Animation::TYPE_ANIMATION) {
- text = TTR("Anim Clips:");
+ text = TTR("Animation Clips:");
} else {
- text += path.get_concatenated_subnames();
+ text += anim_path.get_concatenated_subnames();
}
text_color.a *= 0.7;
} else if (node) {
@@ -2058,14 +1895,14 @@ void AnimationTrackEdit::_notification(int p_what) {
draw_texture(icon, Point2(ofs, int(get_size().height - icon->get_height()) / 2));
icon_cache = icon;
- text = String() + node->get_name() + ":" + path.get_concatenated_subnames();
+ text = String() + node->get_name() + ":" + anim_path.get_concatenated_subnames();
ofs += hsep;
ofs += icon->get_width();
} else {
- icon_cache = type_icon;
+ icon_cache = key_type_icon;
- text = path;
+ text = anim_path;
}
path_cache = text;
@@ -2123,10 +1960,9 @@ void AnimationTrackEdit::_notification(int p_what) {
get_theme_icon(SNAME("InterpLinearAngle"), SNAME("EditorIcons")),
get_theme_icon(SNAME("InterpCubicAngle"), SNAME("EditorIcons")),
};
- Ref<Texture2D> cont_icon[4] = {
+ Ref<Texture2D> cont_icon[3] = {
get_theme_icon(SNAME("TrackContinuous"), SNAME("EditorIcons")),
get_theme_icon(SNAME("TrackDiscrete"), SNAME("EditorIcons")),
- get_theme_icon(SNAME("TrackTrigger"), SNAME("EditorIcons")),
get_theme_icon(SNAME("TrackCapture"), SNAME("EditorIcons"))
};
@@ -2510,14 +2346,6 @@ Size2 AnimationTrackEdit::get_minimum_size() const {
return Vector2(1, max_h + separation);
}
-void AnimationTrackEdit::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
-Ref<EditorUndoRedoManager> AnimationTrackEdit::get_undo_redo() const {
- return undo_redo;
-}
-
void AnimationTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
timeline = p_timeline;
timeline->set_track_edit(this);
@@ -2564,6 +2392,7 @@ void AnimationTrackEdit::_zoom_changed() {
}
void AnimationTrackEdit::_path_submitted(const String &p_text) {
+ 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));
@@ -2667,7 +2496,7 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
}
if (key_idx != -1) {
- String text = TTR("Time (s):") + " " + rtos(animation->track_get_key_time(track, key_idx)) + "\n";
+ String text = TTR("Time (s):") + " " + TS->format_number(rtos(Math::snapped(animation->track_get_key_time(track, key_idx), 0.0001))) + "\n";
switch (animation->track_get_type(track)) {
case Animation::TYPE_POSITION_3D: {
Vector3 t = animation->track_get_key_value(track, key_idx);
@@ -2801,6 +2630,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if (!read_only) {
if (check_rect.has_point(pos)) {
+ 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));
@@ -2824,7 +2654,6 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
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("TrackTrigger"), SNAME("EditorIcons")), TTR("Trigger"), MENU_CALL_MODE_TRIGGER);
menu->add_icon_item(get_theme_icon(SNAME("TrackCapture"), SNAME("EditorIcons")), TTR("Capture"), MENU_CALL_MODE_CAPTURE);
menu->reset_size();
@@ -2849,9 +2678,9 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if (ape) {
AnimationPlayer *ap = ape->get_player();
if (ap) {
- NodePath path = animation->track_get_path(track);
- Node *nd = ap->get_node(ap->get_root())->get_node(NodePath(path.get_concatenated_names()));
- StringName prop = path.get_concatenated_subnames();
+ NodePath npath = animation->track_get_path(track);
+ Node *nd = ap->get_node(ap->get_root())->get_node(NodePath(npath.get_concatenated_names()));
+ StringName prop = npath.get_concatenated_subnames();
PropertyInfo prop_info;
ClassDB::get_property_info(nd->get_class(), prop, &prop_info);
bool is_angle = prop_info.type == Variant::FLOAT && prop_info.hint_string.find("radians") != -1;
@@ -3090,7 +2919,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"));
@@ -3189,9 +3018,9 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
switch (p_index) {
case MENU_CALL_MODE_CONTINUOUS:
case MENU_CALL_MODE_DISCRETE:
- case MENU_CALL_MODE_TRIGGER:
case MENU_CALL_MODE_CAPTURE: {
Animation::UpdateMode update_mode = Animation::UpdateMode(p_index);
+ 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));
@@ -3205,6 +3034,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);
+ 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));
@@ -3214,6 +3044,7 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
case MENU_LOOP_WRAP:
case MENU_LOOP_CLAMP: {
bool loop_wrap = p_index == MENU_LOOP_WRAP;
+ 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));
@@ -3420,9 +3251,6 @@ void AnimationTrackEditGroup::_zoom_changed() {
queue_redraw();
}
-void AnimationTrackEditGroup::_bind_methods() {
-}
-
AnimationTrackEditGroup::AnimationTrackEditGroup() {
set_mouse_filter(MOUSE_FILTER_PASS);
}
@@ -3445,8 +3273,7 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim, bool p_re
track_edits[_get_track_selected()]->release_focus();
}
if (animation.is_valid()) {
- animation->disconnect("tracks_changed", callable_mp(this, &AnimationTrackEditor::_animation_changed));
- animation->disconnect("changed", callable_mp(this, &AnimationTrackEditor::_sync_animation_change));
+ animation->disconnect("changed", callable_mp(this, &AnimationTrackEditor::_animation_changed));
_clear_selection();
}
animation = p_anim;
@@ -3457,8 +3284,7 @@ void AnimationTrackEditor::set_animation(const Ref<Animation> &p_anim, bool p_re
_update_tracks();
if (animation.is_valid()) {
- animation->connect("tracks_changed", callable_mp(this, &AnimationTrackEditor::_animation_changed), CONNECT_DEFERRED);
- animation->connect("changed", callable_mp(this, &AnimationTrackEditor::_sync_animation_change), CONNECT_DEFERRED);
+ animation->connect("changed", callable_mp(this, &AnimationTrackEditor::_animation_changed));
hscroll->show();
edit->set_disabled(read_only);
@@ -3612,7 +3438,8 @@ 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()) {
- undo_redo->create_action(TTR("Remove Anim Track"));
+ 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.
AnimationPlayer *player = AnimationPlayerEditor::get_singleton()->get_player();
@@ -3812,7 +3639,8 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) {
}
void AnimationTrackEditor::_insert_track(bool p_reset_wanted, bool p_create_beziers) {
- undo_redo->create_action(TTR("Anim Insert"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Animation Insert Key"));
Ref<Animation> reset_anim;
if (p_reset_wanted) {
@@ -3849,7 +3677,7 @@ void AnimationTrackEditor::insert_transform_key(Node3D *p_node, const String &p_
}
// Let's build a node path.
- String path = root->get_path_to(p_node);
+ String path = root->get_path_to(p_node, true);
if (!p_sub.is_empty()) {
path += ":" + p_sub;
}
@@ -3889,7 +3717,7 @@ bool AnimationTrackEditor::has_track(Node3D *p_node, const String &p_sub, const
}
// Let's build a node path.
- String path = root->get_path_to(p_node);
+ String path = root->get_path_to(p_node, true);
if (!p_sub.is_empty()) {
path += ":" + p_sub;
}
@@ -3937,11 +3765,10 @@ void AnimationTrackEditor::_insert_animation_key(NodePath p_path, const Variant
void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_property, const Variant &p_value, bool p_only_if_exists) {
ERR_FAIL_COND(!root);
- // Let's build a node path.
+ // Let's build a node path.
Node *node = p_node;
-
- String path = root->get_path_to(node);
+ String path = root->get_path_to(node, true);
if (Object::cast_to<AnimationPlayer>(node) && p_property == "current_animation") {
if (node == AnimationPlayerEditor::get_singleton()->get_player()) {
@@ -4035,14 +3862,13 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari
EditorSelectionHistory *history = EditorNode::get_singleton()->get_editor_selection_history();
ERR_FAIL_COND(!root);
- // Let's build a node path.
ERR_FAIL_COND(history->get_path_size() == 0);
Object *obj = ObjectDB::get_instance(history->get_path_object(0));
ERR_FAIL_COND(!Object::cast_to<Node>(obj));
+ // Let's build a node path.
Node *node = Object::cast_to<Node>(obj);
-
- String path = root->get_path_to(node);
+ String path = root->get_path_to(node, true);
if (Object::cast_to<AnimationPlayer>(node) && p_property == "current_animation") {
if (node == AnimationPlayerEditor::get_singleton()->get_player()) {
@@ -4142,6 +3968,7 @@ Ref<Animation> AnimationTrackEditor::_create_and_get_reset_animation() {
Ref<Animation> reset_anim;
reset_anim.instantiate();
reset_anim->set_length(ANIM_MIN_LENGTH);
+ 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);
@@ -4151,7 +3978,8 @@ Ref<Animation> AnimationTrackEditor::_create_and_get_reset_animation() {
}
void AnimationTrackEditor::_confirm_insert_list() {
- undo_redo->create_action(TTR("Anim Create & Insert"));
+ 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();
Ref<Animation> reset_anim;
@@ -4317,13 +4145,10 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD
h.type == Variant::TRANSFORM3D) {
update_mode = Animation::UPDATE_CONTINUOUS;
}
-
- if (h.usage & PROPERTY_USAGE_ANIMATE_AS_TRIGGER) {
- update_mode = Animation::UPDATE_TRIGGER;
- }
}
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (create_normal_track) {
if (p_create_beziers) {
bool valid;
@@ -4341,7 +4166,6 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD
}
}
created = true;
- undo_redo->create_action(TTR("Anim Insert Track & Key"));
p_id.track_idx = p_next_tracks.normal;
@@ -4350,9 +4174,6 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD
if (p_id.type == Animation::TYPE_VALUE) {
undo_redo->add_do_method(animation.ptr(), "value_track_set_update_mode", p_id.track_idx, update_mode);
}
-
- } else {
- undo_redo->create_action(TTR("Anim Insert Key"));
}
float time = timeline->get_play_position();
@@ -4395,7 +4216,7 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD
p_next_tracks.normal++;
} else {
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", p_id.track_idx, time);
- int existing = animation->track_find_key(p_id.track_idx, time, true);
+ int existing = animation->track_find_key(p_id.track_idx, time, Animation::FIND_MODE_APPROX);
if (existing != -1) {
Variant v = animation->track_get_key_value(p_id.track_idx, existing);
float trans = animation->track_get_key_transition(p_id.track_idx, existing);
@@ -4423,8 +4244,6 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD
}
}
- undo_redo->commit_action();
-
return p_next_tracks;
}
@@ -4462,24 +4281,24 @@ void AnimationTrackEditor::_update_tracks() {
return;
}
- bool read_only = false;
+ bool file_read_only = false;
if (!animation->get_path().is_resource_file()) {
int srpos = animation->get_path().find("::");
if (srpos != -1) {
String base = animation->get_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) {
- read_only = true;
+ file_read_only = true;
}
} else {
if (FileAccess::exists(base + ".import")) {
- read_only = true;
+ file_read_only = true;
}
}
}
} else {
if (FileAccess::exists(animation->get_path() + ".import")) {
- read_only = true;
+ file_read_only = true;
}
}
@@ -4608,10 +4427,9 @@ void AnimationTrackEditor::_update_tracks() {
track_vbox->add_child(track_edit);
}
- track_edit->set_undo_redo(undo_redo);
track_edit->set_timeline(timeline);
track_edit->set_root(root);
- track_edit->set_animation_and_track(animation, i, read_only);
+ track_edit->set_animation_and_track(animation, i, file_read_only);
track_edit->set_play_position(timeline->get_play_position());
track_edit->set_editor(this);
@@ -4649,29 +4467,25 @@ void AnimationTrackEditor::_redraw_groups() {
}
}
-void AnimationTrackEditor::_sync_animation_change() {
- bezier_edit->queue_redraw();
-}
-
void AnimationTrackEditor::_animation_changed() {
if (animation_changing_awaiting_update) {
return; // All will be updated, don't bother with anything.
}
if (key_edit) {
- _update_key_edit();
- }
-
- if (key_edit && key_edit->setting) {
- // If editing a key, just redraw the edited track, makes refresh less costly.
- if (key_edit->track < track_edits.size()) {
- if (animation->track_get_type(key_edit->track) == Animation::TYPE_BEZIER) {
- bezier_edit->queue_redraw();
- } else {
- track_edits[key_edit->track]->queue_redraw();
+ if (key_edit->setting) {
+ // If editing a key, just redraw the edited track, makes refresh less costly.
+ if (key_edit->track < track_edits.size()) {
+ if (animation->track_get_type(key_edit->track) == Animation::TYPE_BEZIER) {
+ bezier_edit->queue_redraw();
+ } else {
+ track_edits[key_edit->track]->queue_redraw();
+ }
}
+ return;
+ } else {
+ _update_key_edit();
}
- return;
}
animation_changing_awaiting_update = true;
@@ -4752,11 +4566,11 @@ MenuButton *AnimationTrackEditor::get_edit_menu() {
void AnimationTrackEditor::_notification(int p_what) {
switch (p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
+ panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
} break;
case NOTIFICATION_ENTER_TREE: {
- panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
+ panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
[[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
@@ -4786,12 +4600,14 @@ void AnimationTrackEditor::_update_scroll(double) {
}
void AnimationTrackEditor::_update_step(double p_new_step) {
+ 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()) {
if (step_value != 0.0) {
step_value = 1.0 / step_value;
}
+ timeline->queue_redraw();
}
undo_redo->add_do_method(animation.ptr(), "set_step", step_value);
undo_redo->add_undo_method(animation.ptr(), "set_step", animation->get_step());
@@ -4811,6 +4627,7 @@ void AnimationTrackEditor::_dropped_track(int p_from_track, int p_to_track) {
}
_clear_selection(true);
+ 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.
@@ -4825,7 +4642,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
ERR_FAIL_COND(!root);
Node *node = get_node(p_path);
ERR_FAIL_COND(!node);
- NodePath path_to = root->get_path_to(node);
+ NodePath path_to = root->get_path_to(node, true);
if (adding_track_type == Animation::TYPE_BLEND_SHAPE && !node->is_class("MeshInstance3D")) {
EditorNode::get_singleton()->show_warning(TTR("Blend Shape tracks only apply to MeshInstance3D nodes."));
@@ -4854,6 +4671,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
case Animation::TYPE_ROTATION_3D:
case Animation::TYPE_SCALE_3D:
case Animation::TYPE_METHOD: {
+ 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);
@@ -4882,6 +4700,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
return;
}
+ 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);
@@ -4900,6 +4719,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
return;
}
+ 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);
@@ -4924,6 +4744,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;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (adding_track_type == Animation::TYPE_VALUE) {
Animation::UpdateMode update_mode = Animation::UPDATE_DISCRETE;
{
@@ -4945,10 +4766,6 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) {
h.type == Variant::TRANSFORM3D) {
update_mode = Animation::UPDATE_CONTINUOUS;
}
-
- if (h.usage & PROPERTY_USAGE_ANIMATE_AS_TRIGGER) {
- update_mode = Animation::UPDATE_TRIGGER;
- }
}
undo_redo->create_action(TTR("Add Track"));
@@ -5014,10 +4831,11 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
if (snap->is_pressed() && step->get_value() != 0) {
p_ofs = snap_time(p_ofs);
}
- while (animation->track_find_key(p_track, p_ofs, true) != -1) { // Make sure insertion point is valid.
- p_ofs += 0.001;
+ while (animation->track_find_key(p_track, p_ofs, Animation::FIND_MODE_APPROX) != -1) { // Make sure insertion point is valid.
+ p_ofs += 0.0001;
}
+ 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))) {
@@ -5071,10 +4889,8 @@ void AnimationTrackEditor::_insert_key_from_track(float p_ofs, int p_track) {
return;
}
- Vector3 scale = base->get_scale();
-
undo_redo->create_action(TTR("Add Scale Key"));
- undo_redo->add_do_method(animation.ptr(), "scale_track_insert_key", p_track, p_ofs, scale);
+ undo_redo->add_do_method(animation.ptr(), "scale_track_insert_key", p_track, p_ofs, base->get_scale());
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", p_track, p_ofs);
undo_redo->commit_action();
@@ -5175,6 +4991,7 @@ void AnimationTrackEditor::_add_method_key(const String &p_method) {
}
d["args"] = params;
+ 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);
@@ -5284,13 +5101,17 @@ void AnimationTrackEditor::_update_key_edit() {
key_edit->track = selection.front()->key().track;
key_edit->use_fps = timeline->is_using_fps();
- float ofs = animation->track_get_key_time(key_edit->track, selection.front()->key().key);
+ int key_id = selection.front()->key().key;
+ if (key_id >= animation->track_get_key_count(key_edit->track)) {
+ _clear_key_edit();
+ return; // Probably in the process of rearranging the keys.
+ }
+ float ofs = animation->track_get_key_time(key_edit->track, key_id);
key_edit->key_ofs = ofs;
key_edit->root_path = root;
NodePath np;
key_edit->hint = _find_hint_for_track(key_edit->track, np);
- key_edit->undo_redo = undo_redo;
key_edit->base = np;
EditorNode::get_singleton()->push_item(key_edit);
@@ -5313,18 +5134,19 @@ void AnimationTrackEditor::_update_key_edit() {
base_map[track] = NodePath();
}
+ int key_id = E.key.key;
+ if (key_id >= animation->track_get_key_count(track)) {
+ _clear_key_edit();
+ return; // Probably in the process of rearranging the keys.
+ }
key_ofs_map[track].push_back(animation->track_get_key_time(track, E.key.key));
}
multi_key_edit->key_ofs_map = key_ofs_map;
multi_key_edit->base_map = base_map;
multi_key_edit->hint = _find_hint_for_track(first_track, base_map[first_track]);
-
multi_key_edit->use_fps = timeline->is_using_fps();
-
multi_key_edit->root_path = root;
- multi_key_edit->undo_redo = undo_redo;
-
EditorNode::get_singleton()->push_item(multi_key_edit);
}
}
@@ -5342,7 +5164,7 @@ void AnimationTrackEditor::_select_at_anim(const Ref<Animation> &p_anim, int p_t
return;
}
- int idx = animation->track_find_key(p_track, p_pos, true);
+ int idx = animation->track_find_key(p_track, p_pos, Animation::FIND_MODE_APPROX);
ERR_FAIL_COND(idx < 0);
SelectedKey sk;
@@ -5352,10 +5174,12 @@ void AnimationTrackEditor::_select_at_anim(const Ref<Animation> &p_anim, int p_t
ki.pos = p_pos;
selection.insert(sk, ki);
+ _update_key_edit();
}
void AnimationTrackEditor::_move_selection_commit() {
- undo_redo->create_action(TTR("Anim Move Keys"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Animation Move Keys"));
List<_AnimMoveRestore> to_restore;
@@ -5367,7 +5191,7 @@ void AnimationTrackEditor::_move_selection_commit() {
// 2 - Remove overlapped keys.
for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
float newtime = snap_time(E->get().pos + motion);
- int idx = animation->track_find_key(E->key().track, newtime, true);
+ int idx = animation->track_find_key(E->key().track, newtime, Animation::FIND_MODE_APPROX);
if (idx == -1) {
continue;
}
@@ -5427,7 +5251,6 @@ void AnimationTrackEditor::_move_selection_commit() {
undo_redo->add_do_method(this, "_redraw_tracks");
undo_redo->add_undo_method(this, "_redraw_tracks");
undo_redo->commit_action();
- _update_key_edit();
}
void AnimationTrackEditor::_move_selection_cancel() {
@@ -5486,7 +5309,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;
@@ -5607,7 +5430,8 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
int start_track = transpose ? _get_track_selected() : top_track;
- undo_redo->create_action(TTR("Anim Duplicate Keys"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Animation Duplicate Keys"));
List<Pair<int, float>> new_selection_values;
@@ -5627,7 +5451,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
continue;
}
- int existing_idx = animation->track_find_key(dst_track, dst_time, true);
+ int existing_idx = animation->track_find_key(dst_track, dst_time, Animation::FIND_MODE_APPROX);
undo_redo->add_do_method(animation.ptr(), "track_insert_key", dst_track, dst_time, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key));
undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", dst_track, dst_time);
@@ -5657,7 +5481,6 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
undo_redo->add_do_method(this, "_redraw_tracks");
undo_redo->add_undo_method(this, "_redraw_tracks");
undo_redo->commit_action();
- _update_key_edit();
}
}
@@ -5670,18 +5493,18 @@ void AnimationTrackEditor::goto_prev_step(bool p_from_mouse_event) {
if (animation.is_null()) {
return;
}
- float step = animation->get_step();
- if (step == 0) {
- step = 1;
+ float anim_step = animation->get_step();
+ if (anim_step == 0) {
+ anim_step = 1;
}
if (p_from_mouse_event && Input::get_singleton()->is_key_pressed(Key::SHIFT)) {
// Use more precise snapping when holding Shift.
// This is used when scrobbling the timeline using Alt + Mouse wheel.
- step *= 0.25;
+ anim_step *= 0.25;
}
float pos = timeline->get_play_position();
- pos = Math::snapped(pos - step, step);
+ pos = Math::snapped(pos - anim_step, anim_step);
if (pos < 0) {
pos = 0;
}
@@ -5693,21 +5516,21 @@ void AnimationTrackEditor::goto_next_step(bool p_from_mouse_event, bool p_timeli
if (animation.is_null()) {
return;
}
- float step = animation->get_step();
- if (step == 0) {
- step = 1;
+ float anim_step = animation->get_step();
+ if (anim_step == 0) {
+ anim_step = 1;
}
if (p_from_mouse_event && Input::get_singleton()->is_key_pressed(Key::SHIFT)) {
// Use more precise snapping when holding Shift.
// This is used when scrobbling the timeline using Alt + Mouse wheel.
// Do not use precise snapping when using the menu action or keyboard shortcut,
// as the default keyboard shortcut requires pressing Shift.
- step *= 0.25;
+ anim_step *= 0.25;
}
float pos = timeline->get_play_position();
- pos = Math::snapped(pos + step, step);
+ pos = Math::snapped(pos + anim_step, anim_step);
if (pos > animation->get_length()) {
pos = animation->get_length();
}
@@ -5800,9 +5623,9 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
} break;
case EDIT_COPY_TRACKS_CONFIRM: {
track_clipboard.clear();
- TreeItem *root = track_copy_select->get_root();
- if (root) {
- TreeItem *it = root->get_first_child();
+ TreeItem *tree_root = track_copy_select->get_root();
+ if (tree_root) {
+ TreeItem *it = tree_root->get_first_child();
while (it) {
Dictionary md = it->get_metadata(0);
int idx = md["track_idx"];
@@ -5837,6 +5660,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
}
int base_track = animation->get_track_count();
+ 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);
@@ -5904,11 +5728,10 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
}
float s = scale->get_value();
- if (s == 0) {
- ERR_PRINT("Can't scale to 0");
- }
+ ERR_FAIL_COND_MSG(s == 0, "Can't scale to 0.");
- undo_redo->create_action(TTR("Anim Scale Keys"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Animation Scale Keys"));
List<_AnimMoveRestore> to_restore;
@@ -5919,7 +5742,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
// 2 - Remove overlapped keys.
for (RBMap<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
float newtime = (E->get().pos - from_t) * s + from_t;
- int idx = animation->track_find_key(E->key().track, newtime, true);
+ int idx = animation->track_find_key(E->key().track, newtime, Animation::FIND_MODE_APPROX);
if (idx == -1) {
continue;
}
@@ -5981,14 +5804,13 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
undo_redo->add_do_method(this, "_redraw_tracks");
undo_redo->add_undo_method(this, "_redraw_tracks");
undo_redo->commit_action();
- _update_key_edit();
-
} break;
case EDIT_EASE_SELECTION: {
ease_dialog->popup_centered(Size2(200, 100) * EDSCALE);
} break;
case EDIT_EASE_CONFIRM: {
+ 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());
@@ -6036,7 +5858,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
bool is_using_angle = animation->track_get_interpolation_type(track) == Animation::INTERPOLATION_LINEAR_ANGLE || animation->track_get_interpolation_type(track) == Animation::INTERPOLATION_CUBIC_ANGLE;
// Make insert queue.
- Vector<Pair<real_t, Variant>> insert_queue;
+ Vector<Pair<real_t, Variant>> insert_queue_new;
for (int i = 0; i < len; i++) {
// Check neighboring keys.
if (keys[i] + 1 == keys[i + 1]) {
@@ -6050,23 +5872,22 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
real_t to_diff = fmod(b - a, Math_TAU);
to_v = a + fmod(2.0 * to_diff, Math_TAU) - to_diff;
}
- Variant delta_v;
- Variant::sub(to_v, from_v, delta_v);
+ Variant delta_v = Animation::subtract_variant(to_v, from_v);
double duration = to_t - from_t;
- double fixed_duration = duration - 0.01; // Prevent to overwrap keys...
+ double fixed_duration = duration - UNIT_EPSILON; // Prevent to overwrap keys...
for (double delta_t = dur_step; delta_t < fixed_duration; delta_t += dur_step) {
Pair<real_t, Variant> keydata;
keydata.first = from_t + delta_t;
keydata.second = Tween::interpolate_variant(from_v, delta_v, delta_t, duration, transition_type, ease_type);
- insert_queue.append(keydata);
+ insert_queue_new.append(keydata);
}
}
}
// Do insertion.
- for (int i = 0; i < insert_queue.size(); i++) {
- undo_redo->add_do_method(animation.ptr(), "track_insert_key", track, insert_queue[i].first, insert_queue[i].second);
- undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", track, insert_queue[i].first);
+ for (int i = 0; i < insert_queue_new.size(); i++) {
+ undo_redo->add_do_method(animation.ptr(), "track_insert_key", track, insert_queue_new[i].first, insert_queue_new[i].second);
+ undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", track, insert_queue_new[i].first);
}
++E;
@@ -6096,7 +5917,8 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
_anim_duplicate_keys(true);
} break;
case EDIT_ADD_RESET_KEY: {
- undo_redo->create_action(TTR("Anim Add RESET Keys"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Animation Add RESET Keys"));
Ref<Animation> reset = _create_and_get_reset_animation();
int reset_tracks = reset->get_track_count();
@@ -6131,7 +5953,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
undo_redo->add_do_method(reset.ptr(), "track_set_path", dst_track, path);
undo_redo->add_undo_method(reset.ptr(), "remove_track", dst_track);
} else {
- existing_idx = reset->track_find_key(dst_track, 0, true);
+ existing_idx = reset->track_find_key(dst_track, 0, Animation::FIND_MODE_APPROX);
}
undo_redo->add_do_method(reset.ptr(), "track_insert_key", dst_track, 0, animation->track_get_key_value(sk.track, sk.key), animation->track_get_key_transition(sk.track, sk.key));
@@ -6156,7 +5978,8 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
}
if (selection.size()) {
- undo_redo->create_action(TTR("Anim Delete Keys"));
+ 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()) {
undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key);
@@ -6186,6 +6009,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
bake_dialog->popup_centered(Size2(200, 100) * EDSCALE);
} break;
case EDIT_BAKE_ANIMATION_CONFIRM: {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Bake Animation as Linear keys."));
int track_len = animation->get_track_count();
@@ -6206,14 +6030,14 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
if (do_bake && !animation->track_is_compressed(i)) {
Animation::InterpolationType it = animation->track_get_interpolation_type(i);
if (it == Animation::INTERPOLATION_NEAREST) {
- continue; // Nearest and Angle interpolation cannot be baked.
+ continue; // Nearest interpolation cannot be baked.
}
// Special case for angle interpolation.
bool is_using_angle = it == Animation::INTERPOLATION_LINEAR_ANGLE || it == Animation::INTERPOLATION_CUBIC_ANGLE;
// Make insert queue.
- Vector<Pair<real_t, Variant>> insert_queue;
+ Vector<Pair<real_t, Variant>> insert_queue_new;
switch (type) {
case Animation::TYPE_POSITION_3D: {
@@ -6223,7 +6047,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
Vector3 v;
animation->position_track_interpolate(i, delta_t, &v);
keydata.second = v;
- insert_queue.append(keydata);
+ insert_queue_new.append(keydata);
}
} break;
case Animation::TYPE_ROTATION_3D: {
@@ -6233,7 +6057,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
Quaternion v;
animation->rotation_track_interpolate(i, delta_t, &v);
keydata.second = v;
- insert_queue.append(keydata);
+ insert_queue_new.append(keydata);
}
} break;
case Animation::TYPE_SCALE_3D: {
@@ -6243,7 +6067,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
Vector3 v;
animation->scale_track_interpolate(i, delta_t, &v);
keydata.second = v;
- insert_queue.append(keydata);
+ insert_queue_new.append(keydata);
}
} break;
case Animation::TYPE_BLEND_SHAPE: {
@@ -6253,7 +6077,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
float v;
animation->blend_shape_track_interpolate(i, delta_t, &v);
keydata.second = v;
- insert_queue.append(keydata);
+ insert_queue_new.append(keydata);
}
} break;
case Animation::TYPE_VALUE: {
@@ -6261,7 +6085,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
Pair<real_t, Variant> keydata;
keydata.first = delta_t;
keydata.second = animation->value_track_interpolate(i, delta_t);
- insert_queue.append(keydata);
+ insert_queue_new.append(keydata);
}
} break;
default: {
@@ -6276,9 +6100,9 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
// Insert keys.
undo_redo->add_do_method(animation.ptr(), "track_set_interpolation_type", i, is_using_angle ? Animation::INTERPOLATION_LINEAR_ANGLE : Animation::INTERPOLATION_LINEAR);
- for (int j = insert_queue.size() - 1; j >= 0; j--) {
- undo_redo->add_do_method(animation.ptr(), "track_insert_key", i, insert_queue[j].first, insert_queue[j].second);
- undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", i, insert_queue[j].first);
+ for (int j = insert_queue_new.size() - 1; j >= 0; j--) {
+ undo_redo->add_do_method(animation.ptr(), "track_insert_key", i, insert_queue_new[j].first, insert_queue_new[j].second);
+ undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", i, insert_queue_new[j].first);
}
// Undo methods.
@@ -6306,6 +6130,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();
+ 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));
@@ -6375,6 +6200,7 @@ void AnimationTrackEditor::_cleanup_animation(Ref<Animation> p_animation) {
}
}
+ 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();
@@ -6458,16 +6284,12 @@ void AnimationTrackEditor::_select_all_tracks_for_copy() {
}
void AnimationTrackEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_animation_update"), &AnimationTrackEditor::_animation_update);
- ClassDB::bind_method(D_METHOD("_track_grab_focus"), &AnimationTrackEditor::_track_grab_focus);
- ClassDB::bind_method(D_METHOD("_update_tracks"), &AnimationTrackEditor::_update_tracks);
- ClassDB::bind_method(D_METHOD("_redraw_tracks"), &AnimationTrackEditor::_redraw_tracks);
- ClassDB::bind_method(D_METHOD("_clear_selection_for_anim"), &AnimationTrackEditor::_clear_selection_for_anim);
- ClassDB::bind_method(D_METHOD("_select_at_anim"), &AnimationTrackEditor::_select_at_anim);
-
- ClassDB::bind_method(D_METHOD("_key_selected"), &AnimationTrackEditor::_key_selected); // Still used by some connect_compat.
- ClassDB::bind_method(D_METHOD("_key_deselected"), &AnimationTrackEditor::_key_deselected); // Still used by some connect_compat.
- ClassDB::bind_method(D_METHOD("_clear_selection"), &AnimationTrackEditor::_clear_selection); // Still used by some connect_compat.
+ ClassDB::bind_method("_animation_update", &AnimationTrackEditor::_animation_update);
+ ClassDB::bind_method("_track_grab_focus", &AnimationTrackEditor::_track_grab_focus);
+ ClassDB::bind_method("_redraw_tracks", &AnimationTrackEditor::_redraw_tracks);
+ ClassDB::bind_method("_clear_selection_for_anim", &AnimationTrackEditor::_clear_selection_for_anim);
+ ClassDB::bind_method("_select_at_anim", &AnimationTrackEditor::_select_at_anim);
+ ClassDB::bind_method("_clear_selection", &AnimationTrackEditor::_clear_selection);
ClassDB::bind_method(D_METHOD("_bezier_track_set_key_handle_mode", "animation", "track_idx", "key_idx", "key_handle_mode", "key_handle_set_mode"), &AnimationTrackEditor::_bezier_track_set_key_handle_mode, DEFVAL(Animation::HANDLE_SET_MODE_NONE));
@@ -6544,8 +6366,6 @@ void AnimationTrackEditor::_pick_track_filter_input(const Ref<InputEvent> &p_ie)
}
AnimationTrackEditor::AnimationTrackEditor() {
- undo_redo = EditorNode::get_undo_redo();
-
main_panel = memnew(PanelContainer);
main_panel->set_focus_mode(FOCUS_ALL); // Allow panel to have focus so that shortcuts work as expected.
add_child(main_panel);
@@ -6570,7 +6390,6 @@ AnimationTrackEditor::AnimationTrackEditor() {
main_panel->add_child(info_message);
timeline = memnew(AnimationTimelineEdit);
- timeline->set_undo_redo(undo_redo);
timeline_vbox->add_child(timeline);
timeline->connect("timeline_changed", callable_mp(this, &AnimationTrackEditor::_timeline_changed));
timeline->connect("name_limit_changed", callable_mp(this, &AnimationTrackEditor::_name_limit_changed));
@@ -6593,7 +6412,6 @@ AnimationTrackEditor::AnimationTrackEditor() {
bezier_edit = memnew(AnimationBezierTrackEdit);
timeline_vbox->add_child(bezier_edit);
- bezier_edit->set_undo_redo(undo_redo);
bezier_edit->set_editor(this);
bezier_edit->set_timeline(timeline);
bezier_edit->hide();
@@ -6664,7 +6482,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
step = memnew(EditorSpinSlider);
step->set_min(0);
step->set_max(1000000);
- step->set_step(0.001);
+ step->set_step(0.0001);
step->set_hide_slider(true);
step->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
step->set_tooltip_text(TTR("Animation step value."));
@@ -6930,19 +6748,19 @@ AnimationTrackEditor::AnimationTrackEditor() {
track_copy_dialog->set_title(TTR("Select Tracks to Copy"));
track_copy_dialog->set_ok_button_text(TTR("Copy"));
- VBoxContainer *track_vbox = memnew(VBoxContainer);
- track_copy_dialog->add_child(track_vbox);
+ VBoxContainer *track_copy_vbox = memnew(VBoxContainer);
+ track_copy_dialog->add_child(track_copy_vbox);
Button *select_all_button = memnew(Button);
select_all_button->set_text(TTR("Select All/None"));
select_all_button->connect("pressed", callable_mp(this, &AnimationTrackEditor::_select_all_tracks_for_copy));
- track_vbox->add_child(select_all_button);
+ track_copy_vbox->add_child(select_all_button);
track_copy_select = memnew(Tree);
track_copy_select->set_h_size_flags(SIZE_EXPAND_FILL);
track_copy_select->set_v_size_flags(SIZE_EXPAND_FILL);
track_copy_select->set_hide_root(true);
- track_vbox->add_child(track_copy_select);
+ track_copy_vbox->add_child(track_copy_select);
track_copy_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_COPY_TRACKS_CONFIRM));
}
@@ -6954,3 +6772,103 @@ AnimationTrackEditor::~AnimationTrackEditor() {
memdelete(multi_key_edit);
}
}
+
+// AnimationTrackKeyEditEditorPlugin
+
+void AnimationTrackKeyEditEditor::_time_edit_entered() {
+ int key = animation->track_find_key(track, key_ofs, Animation::FIND_MODE_APPROX);
+ if (key == -1) {
+ return;
+ }
+ key_data_cache.time = animation->track_get_key_time(track, key);
+ key_data_cache.transition = animation->track_get_key_transition(track, key);
+ key_data_cache.value = animation->track_get_key_value(track, key);
+}
+
+void AnimationTrackKeyEditEditor::_time_edit_exited() {
+ real_t new_time = spinner->get_value();
+
+ if (use_fps) {
+ real_t fps = animation->get_step();
+ if (fps > 0) {
+ fps = 1.0 / fps;
+ }
+ new_time /= fps;
+ }
+
+ if (Math::is_equal_approx(new_time, key_data_cache.time)) {
+ return; // No change.
+ }
+
+ int existing = animation->track_find_key(track, new_time, Animation::FIND_MODE_APPROX);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Animation Change Keyframe Time"), UndoRedo::MERGE_ENDS);
+
+ if (existing != -1) {
+ undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_time", track, animation->track_get_key_time(track, existing));
+ }
+ undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_time", track, key_data_cache.time);
+ undo_redo->add_do_method(animation.ptr(), "track_insert_key", track, new_time, key_data_cache.value, key_data_cache.transition);
+ undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_time", track, new_time);
+ undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, key_data_cache.time, key_data_cache.value, key_data_cache.transition);
+ if (existing != -1) {
+ undo_redo->add_undo_method(animation.ptr(), "track_insert_key", track, animation->track_get_key_time(track, existing), animation->track_get_key_value(track, existing), animation->track_get_key_transition(track, existing));
+ }
+
+ // Reselect key.
+ AnimationPlayerEditor *ape = AnimationPlayerEditor::get_singleton();
+ if (ape) {
+ AnimationTrackEditor *ate = ape->get_track_editor();
+ if (ate) {
+ undo_redo->add_do_method(ate, "_clear_selection_for_anim", animation);
+ undo_redo->add_undo_method(ate, "_clear_selection_for_anim", animation);
+ undo_redo->add_do_method(ate, "_select_at_anim", animation, track, new_time);
+ undo_redo->add_undo_method(ate, "_select_at_anim", animation, track, key_data_cache.time);
+ }
+ }
+
+ undo_redo->commit_action();
+}
+
+AnimationTrackKeyEditEditor::AnimationTrackKeyEditEditor(Ref<Animation> p_animation, int p_track, real_t p_key_ofs, bool p_use_fps) {
+ if (!p_animation.is_valid()) {
+ return;
+ }
+
+ animation = p_animation;
+ track = p_track;
+ key_ofs = p_key_ofs;
+ use_fps = p_use_fps;
+
+ set_label("Time");
+
+ spinner = memnew(EditorSpinSlider);
+ spinner->set_focus_mode(Control::FOCUS_CLICK);
+ spinner->set_min(0);
+ spinner->set_allow_greater(true);
+ spinner->set_allow_lesser(true);
+
+ if (use_fps) {
+ spinner->set_step(1);
+ spinner->set_hide_slider(true);
+ real_t fps = animation->get_step();
+ if (fps > 0) {
+ fps = 1.0 / fps;
+ }
+ spinner->set_value(key_ofs * fps);
+ } else {
+ spinner->set_step(0.0001);
+ spinner->set_value(key_ofs);
+ spinner->set_max(animation->get_length());
+ }
+
+ add_child(spinner);
+
+ spinner->connect("grabbed", callable_mp(this, &AnimationTrackKeyEditEditor::_time_edit_entered), CONNECT_DEFERRED);
+ spinner->connect("ungrabbed", callable_mp(this, &AnimationTrackKeyEditEditor::_time_edit_exited), CONNECT_DEFERRED);
+ spinner->connect("value_focus_entered", callable_mp(this, &AnimationTrackKeyEditEditor::_time_edit_entered), CONNECT_DEFERRED);
+ spinner->connect("value_focus_exited", callable_mp(this, &AnimationTrackKeyEditEditor::_time_edit_exited), CONNECT_DEFERRED);
+}
+
+AnimationTrackKeyEditEditor::~AnimationTrackKeyEditEditor() {
+}
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index ac69b88e99..ef06445011 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_track_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_track_editor.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 ANIMATION_TRACK_EDITOR_H
#define ANIMATION_TRACK_EDITOR_H
@@ -50,9 +50,83 @@
#include "scene/resources/animation.h"
#include "scene_tree_editor.h"
+class AnimationTrackEditor;
class AnimationTrackEdit;
class ViewPanner;
+class AnimationTrackKeyEdit : public Object {
+ GDCLASS(AnimationTrackKeyEdit, Object);
+
+public:
+ bool setting = false;
+ bool animation_read_only = false;
+
+ Ref<Animation> animation;
+ int track = -1;
+ float key_ofs = 0;
+ Node *root_path = nullptr;
+
+ PropertyInfo hint;
+ NodePath base;
+ bool use_fps = false;
+
+ bool _hide_script_from_inspector() { return true; }
+ bool _hide_metadata_from_inspector() { return true; }
+ bool _dont_undo_redo() { return true; }
+
+ bool _is_read_only() { return animation_read_only; }
+
+ void notify_change();
+ Node *get_root_path();
+ void set_use_fps(bool p_enable);
+
+protected:
+ static void _bind_methods();
+ void _fix_node_path(Variant &value);
+ void _update_obj(const Ref<Animation> &p_anim);
+ void _key_ofs_changed(const Ref<Animation> &p_anim, float from, float to);
+ 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;
+};
+
+class AnimationMultiTrackKeyEdit : public Object {
+ GDCLASS(AnimationMultiTrackKeyEdit, Object);
+
+public:
+ bool setting = false;
+ bool animation_read_only = false;
+
+ Ref<Animation> animation;
+
+ RBMap<int, List<float>> key_ofs_map;
+ RBMap<int, NodePath> base_map;
+ PropertyInfo hint;
+
+ Node *root_path = nullptr;
+
+ bool use_fps = false;
+
+ bool _hide_script_from_inspector() { return true; }
+ bool _hide_metadata_from_inspector() { return true; }
+ bool _dont_undo_redo() { return true; }
+
+ bool _is_read_only() { return animation_read_only; }
+
+ void notify_change();
+ Node *get_root_path();
+ void set_use_fps(bool p_enable);
+
+protected:
+ static void _bind_methods();
+ void _fix_node_path(Variant &value, NodePath &base);
+ void _update_obj(const Ref<Animation> &p_anim);
+ void _key_ofs_changed(const Ref<Animation> &p_anim, float from, float to);
+ 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;
+};
+
class AnimationTimelineEdit : public Range {
GDCLASS(AnimationTimelineEdit, Range);
@@ -79,7 +153,6 @@ class AnimationTimelineEdit : public Range {
void _anim_loop_pressed();
void _play_position_draw();
- Ref<EditorUndoRedoManager> undo_redo;
Rect2 hsize_rect;
bool editing = false;
@@ -113,7 +186,6 @@ public:
void set_track_edit(AnimationTrackEdit *p_track_edit);
void set_zoom(Range *p_zoom);
Range *get_zoom() const { return zoom; }
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
void set_play_position(float p_pos);
float get_play_position() const;
@@ -131,15 +203,13 @@ public:
AnimationTimelineEdit();
};
-class AnimationTrackEditor;
-
class AnimationTrackEdit : public Control {
GDCLASS(AnimationTrackEdit, Control);
+ friend class AnimationTimelineEdit;
enum {
MENU_CALL_MODE_CONTINUOUS,
MENU_CALL_MODE_DISCRETE,
- MENU_CALL_MODE_TRIGGER,
MENU_CALL_MODE_CAPTURE,
MENU_INTERPOLATION_NEAREST,
MENU_INTERPOLATION_LINEAR,
@@ -155,7 +225,6 @@ class AnimationTrackEdit : public Control {
};
AnimationTimelineEdit *timeline = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
Popup *path_popup = nullptr;
LineEdit *path = nullptr;
Node *root = nullptr;
@@ -236,12 +305,10 @@ public:
Ref<Animation> get_animation() const;
AnimationTimelineEdit *get_timeline() const { return timeline; }
AnimationTrackEditor *get_editor() const { return editor; }
- Ref<EditorUndoRedoManager> get_undo_redo() const;
NodePath get_path() const;
void set_animation_and_track(const Ref<Animation> &p_animation, int p_track, bool p_read_only);
virtual Size2 get_minimum_size() const override;
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
void set_timeline(AnimationTimelineEdit *p_timeline);
void set_editor(AnimationTrackEditor *p_editor);
void set_root(Node *p_root);
@@ -280,7 +347,6 @@ class AnimationTrackEditGroup : public Control {
void _zoom_changed();
protected:
- static void _bind_methods();
void _notification(int p_what);
public:
@@ -294,6 +360,7 @@ public:
class AnimationTrackEditor : public VBoxContainer {
GDCLASS(AnimationTrackEditor, VBoxContainer);
+ friend class AnimationTimelineEdit;
Ref<Animation> animation;
bool read_only = false;
@@ -327,7 +394,6 @@ class AnimationTrackEditor : public VBoxContainer {
bool animation_changing_awaiting_update = false;
void _animation_update(); // Updated by AnimationTrackEditor(this)
int _get_track_selected();
- void _sync_animation_change();
void _animation_changed();
void _update_tracks();
void _redraw_tracks();
@@ -339,8 +405,6 @@ class AnimationTrackEditor : public VBoxContainer {
void _animation_track_remove_request(int p_track, Ref<Animation> p_from_animation);
void _track_grab_focus(int p_track);
- Ref<EditorUndoRedoManager> undo_redo;
-
void _update_scroll(double);
void _update_step(double p_new_step);
void _update_length(double p_new_len);
@@ -407,7 +471,6 @@ class AnimationTrackEditor : public VBoxContainer {
void _insert_key_from_track(float p_ofs, int p_track);
void _add_method_key(const String &p_method);
- void _clear_selection(bool p_update = false);
void _clear_selection_for_anim(const Ref<Animation> &p_anim);
void _select_at_anim(const Ref<Animation> &p_anim, int p_track, float p_pos);
@@ -425,9 +488,6 @@ class AnimationTrackEditor : public VBoxContainer {
RBMap<SelectedKey, KeyInfo> selection;
- void _key_selected(int p_key, bool p_single, int p_track);
- void _key_deselected(int p_key, int p_track);
-
bool moving_selection = false;
float moving_selection_offset = 0.0f;
void _move_selection_begin();
@@ -438,7 +498,6 @@ class AnimationTrackEditor : public VBoxContainer {
AnimationTrackKeyEdit *key_edit = nullptr;
AnimationMultiTrackKeyEdit *multi_key_edit = nullptr;
void _update_key_edit();
-
void _clear_key_edit();
Control *box_selection = nullptr;
@@ -531,6 +590,11 @@ protected:
void _notification(int p_what);
public:
+ // Public for use with callable_mp.
+ void _clear_selection(bool p_update = false);
+ void _key_selected(int p_key, bool p_single, int p_track);
+ void _key_deselected(int p_key, int p_track);
+
enum {
EDIT_COPY_TRACKS,
EDIT_COPY_TRACKS_CONFIRM,
@@ -600,4 +664,30 @@ public:
~AnimationTrackEditor();
};
+// AnimationTrackKeyEditEditorPlugin
+
+class AnimationTrackKeyEditEditor : public EditorProperty {
+ GDCLASS(AnimationTrackKeyEditEditor, EditorProperty);
+
+ Ref<Animation> animation;
+ int track = -1;
+ real_t key_ofs = 0.0;
+ bool use_fps = false;
+
+ EditorSpinSlider *spinner = nullptr;
+
+ struct KeyDataCache {
+ real_t time = 0.0;
+ float transition = 0.0;
+ Variant value;
+ } key_data_cache;
+
+ void _time_edit_entered();
+ void _time_edit_exited();
+
+public:
+ AnimationTrackKeyEditEditor(Ref<Animation> p_animation, int p_track, real_t p_key_ofs, bool p_use_fps);
+ ~AnimationTrackKeyEditEditor();
+};
+
#endif // ANIMATION_TRACK_EDITOR_H
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 6499cf8df2..ba73a63245 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_track_editor_plugins.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_track_editor_plugins.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 "animation_track_editor_plugins.h"
@@ -412,9 +412,9 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se
sf->get_animation_list(&animations);
int frame = get_animation()->track_get_key_value(get_track(), p_index);
- String animation;
+ String animation_name;
if (animations.size() == 1) {
- animation = animations.front()->get();
+ animation_name = animations.front()->get();
} else {
// Go through other track to find if animation is set
String animation_path = get_animation()->track_get_path(get_track());
@@ -422,10 +422,10 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se
int animation_track = get_animation()->find_track(animation_path, get_animation()->track_get_type(get_track()));
float track_time = get_animation()->track_get_key_time(get_track(), p_index);
int animaiton_index = get_animation()->track_find_key(animation_track, track_time);
- animation = get_animation()->track_get_key_value(animation_track, animaiton_index);
+ animation_name = get_animation()->track_get_key_value(animation_track, animaiton_index);
}
- Ref<Texture2D> texture = sf->get_frame(animation, frame);
+ Ref<Texture2D> texture = sf->get_frame_texture(animation_name, frame);
if (!texture.is_valid()) {
return AnimationTrackEdit::get_key_rect(p_index, p_pixels_sec);
}
@@ -504,9 +504,9 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
sf->get_animation_list(&animations);
int frame = get_animation()->track_get_key_value(get_track(), p_index);
- String animation;
+ String animation_name;
if (animations.size() == 1) {
- animation = animations.front()->get();
+ animation_name = animations.front()->get();
} else {
// Go through other track to find if animation is set
String animation_path = get_animation()->track_get_path(get_track());
@@ -514,10 +514,10 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in
int animation_track = get_animation()->find_track(animation_path, get_animation()->track_get_type(get_track()));
float track_time = get_animation()->track_get_key_time(get_track(), p_index);
int animaiton_index = get_animation()->track_find_key(animation_track, track_time);
- animation = get_animation()->track_get_key_value(animation_track, animaiton_index);
+ animation_name = get_animation()->track_get_key_value(animation_track, animaiton_index);
}
- texture = sf->get_frame(animation, frame);
+ texture = sf->get_frame_texture(animation_name, frame);
if (!texture.is_valid()) {
AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right);
return;
@@ -670,15 +670,15 @@ void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_
Vector<Vector2> lines;
Vector<Color> colorv;
{
- Ref<Animation> animation = ap->get_animation(anim);
+ Ref<Animation> ap_anim = ap->get_animation(anim);
- for (int i = 0; i < animation->get_track_count(); i++) {
- float h = (rect.size.height - 2) / animation->get_track_count();
+ for (int i = 0; i < ap_anim->get_track_count(); i++) {
+ float h = (rect.size.height - 2) / ap_anim->get_track_count();
int y = 2 + h * i + h / 2;
- for (int j = 0; j < animation->track_get_key_count(i); j++) {
- float ofs = animation->track_get_key_time(i, j);
+ for (int j = 0; j < ap_anim->track_get_key_count(i); j++) {
+ float ofs = ap_anim->track_get_key_time(i, j);
int x = p_x + ofs * p_pixels_sec + 2;
if (x < from_x || x >= (to_x - 4)) {
@@ -830,8 +830,8 @@ Rect2 AnimationTrackEditTypeAudio::get_key_rect(int p_index, float p_pixels_sec)
len -= end_ofs;
len -= start_ofs;
- if (len <= 0.001) {
- len = 0.001;
+ if (len <= 0.0001) {
+ len = 0.0001;
}
if (get_animation()->track_get_key_count(get_track()) > p_index + 1) {
@@ -856,18 +856,14 @@ void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int
float start_ofs = get_animation()->audio_track_get_key_start_offset(get_track(), p_index);
float end_ofs = get_animation()->audio_track_get_key_end_offset(get_track(), p_index);
+ int px_offset = 0;
if (len_resizing && p_index == len_resizing_index) {
- float ofs_local = -len_resizing_rel / get_timeline()->get_zoom_scale();
+ float ofs_local = len_resizing_rel / get_timeline()->get_zoom_scale();
if (len_resizing_start) {
start_ofs += ofs_local;
- if (start_ofs < 0) {
- start_ofs = 0;
- }
+ px_offset = ofs_local * p_pixels_sec;
} else {
- end_ofs += ofs_local;
- if (end_ofs < 0) {
- end_ofs = 0;
- }
+ end_ofs -= ofs_local;
}
}
@@ -890,14 +886,14 @@ void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int
len -= end_ofs;
len -= start_ofs;
- if (len <= 0.001) {
- len = 0.001;
+ if (len <= 0.0001) {
+ len = 0.0001;
}
int pixel_len = len * p_pixels_sec;
- int pixel_begin = p_x;
- int pixel_end = p_x + pixel_len;
+ int pixel_begin = px_offset + p_x;
+ int pixel_end = px_offset + p_x + pixel_len;
if (pixel_end < p_clip_left) {
return;
@@ -1017,14 +1013,15 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant
ofs = get_editor()->snap_time(ofs);
- while (get_animation()->track_find_key(get_track(), ofs, true) != -1) { //make sure insertion point is valid
- ofs += 0.001;
+ while (get_animation()->track_find_key(get_track(), ofs, Animation::FIND_MODE_APPROX) != -1) { //make sure insertion point is valid
+ ofs += 0.0001;
}
- get_undo_redo()->create_action(TTR("Add Audio Track Clip"));
- get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_insert_key", get_track(), ofs, stream);
- get_undo_redo()->add_undo_method(get_animation().ptr(), "track_remove_key_at_time", get_track(), ofs);
- get_undo_redo()->commit_action();
+ 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);
+ undo_redo->commit_action();
queue_redraw();
return;
@@ -1059,9 +1056,6 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
len -= end_ofs;
len -= start_ofs;
- if (len <= 0.001) {
- len = 0.001;
- }
if (get_animation()->track_get_key_count(get_track()) > i + 1) {
len = MIN(len, get_animation()->track_get_key_time(get_track(), i + 1) - get_animation()->track_get_key_time(get_track(), i));
@@ -1076,6 +1070,13 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
int end = ofs + len * get_timeline()->get_zoom_scale();
if (end >= get_timeline()->get_name_limit() && end <= get_size().width - get_timeline()->get_buttons_width() && ABS(mm->get_position().x - end) < 5 * EDSCALE) {
+ len_resizing_start = false;
+ use_hsize_cursor = true;
+ len_resizing_index = i;
+ }
+
+ if (ofs >= get_timeline()->get_name_limit() && ofs <= get_size().width - get_timeline()->get_buttons_width() && ABS(mm->get_position().x - ofs) < 5 * EDSCALE) {
+ len_resizing_start = true;
use_hsize_cursor = true;
len_resizing_index = i;
}
@@ -1084,8 +1085,25 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
}
if (len_resizing && mm.is_valid()) {
+ // Rezising index is some.
len_resizing_rel += mm->get_relative().x;
- len_resizing_start = mm->is_shift_pressed();
+ float ofs_local = len_resizing_rel / get_timeline()->get_zoom_scale();
+ float prev_ofs_start = get_animation()->audio_track_get_key_start_offset(get_track(), len_resizing_index);
+ float prev_ofs_end = get_animation()->audio_track_get_key_end_offset(get_track(), len_resizing_index);
+ Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), len_resizing_index);
+ float len = stream->get_length();
+ if (len == 0) {
+ Ref<AudioStreamPreview> preview = AudioStreamPreviewGenerator::get_singleton()->generate_preview(stream);
+ float preview_len = preview->get_length();
+ len = preview_len;
+ }
+
+ if (len_resizing_start) {
+ len_resizing_rel = CLAMP(ofs_local, -prev_ofs_start, len - prev_ofs_end - prev_ofs_start) * get_timeline()->get_zoom_scale();
+ } else {
+ len_resizing_rel = CLAMP(ofs_local, -(len - prev_ofs_end - prev_ofs_start), prev_ofs_end) * get_timeline()->get_zoom_scale();
+ }
+
queue_redraw();
accept_event();
return;
@@ -1094,7 +1112,11 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT && over_drag_position) {
len_resizing = true;
- len_resizing_start = mb->is_shift_pressed();
+ // In case if resizing index is not set yet reset the flag.
+ if (len_resizing_index < 0) {
+ len_resizing = false;
+ return;
+ }
len_resizing_from_px = mb->get_position().x;
len_resizing_rel = 0;
queue_redraw();
@@ -1102,24 +1124,44 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (len_resizing && mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) {
- float ofs_local = -len_resizing_rel / get_timeline()->get_zoom_scale();
+ if (len_resizing_rel == 0 || len_resizing_index < 0) {
+ len_resizing = false;
+ return;
+ }
+
if (len_resizing_start) {
+ float ofs_local = len_resizing_rel / get_timeline()->get_zoom_scale();
float prev_ofs = get_animation()->audio_track_get_key_start_offset(get_track(), len_resizing_index);
- get_undo_redo()->create_action(TTR("Change Audio Track Clip Start Offset"));
- get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_set_key_start_offset", get_track(), len_resizing_index, prev_ofs + ofs_local);
- get_undo_redo()->add_undo_method(get_animation().ptr(), "audio_track_set_key_start_offset", get_track(), len_resizing_index, prev_ofs);
- get_undo_redo()->commit_action();
+ float prev_time = get_animation()->track_get_key_time(get_track(), len_resizing_index);
+ float new_ofs = prev_ofs + ofs_local;
+ float new_time = prev_time + ofs_local;
+ if (prev_time != new_time) {
+ undo_redo->create_action(TTR("Change Audio Track Clip Start Offset"));
+
+ undo_redo->add_do_method(get_animation().ptr(), "track_set_key_time", get_track(), len_resizing_index, new_time);
+ undo_redo->add_undo_method(get_animation().ptr(), "track_set_key_time", get_track(), len_resizing_index, prev_time);
+ undo_redo->add_do_method(get_animation().ptr(), "audio_track_set_key_start_offset", get_track(), len_resizing_index, new_ofs);
+ undo_redo->add_undo_method(get_animation().ptr(), "audio_track_set_key_start_offset", get_track(), len_resizing_index, prev_ofs);
+
+ undo_redo->commit_action();
+ }
} else {
+ float ofs_local = -len_resizing_rel / get_timeline()->get_zoom_scale();
float prev_ofs = get_animation()->audio_track_get_key_end_offset(get_track(), len_resizing_index);
- get_undo_redo()->create_action(TTR("Change Audio Track Clip End Offset"));
- get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_set_key_end_offset", get_track(), len_resizing_index, prev_ofs + ofs_local);
- get_undo_redo()->add_undo_method(get_animation().ptr(), "audio_track_set_key_end_offset", get_track(), len_resizing_index, prev_ofs);
- get_undo_redo()->commit_action();
+ float new_ofs = prev_ofs + ofs_local;
+ if (prev_ofs != new_ofs) {
+ undo_redo->create_action(TTR("Change Audio Track Clip End Offset"));
+ undo_redo->add_do_method(get_animation().ptr(), "audio_track_set_key_end_offset", get_track(), len_resizing_index, new_ofs);
+ undo_redo->add_undo_method(get_animation().ptr(), "audio_track_set_key_end_offset", get_track(), len_resizing_index, prev_ofs);
+ undo_redo->commit_action();
+ }
}
len_resizing_index = -1;
+ len_resizing = false;
queue_redraw();
accept_event();
return;
@@ -1244,15 +1286,15 @@ void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec,
Vector<Vector2> lines;
Vector<Color> colorv;
{
- Ref<Animation> animation = ap->get_animation(anim);
+ Ref<Animation> ap_anim = ap->get_animation(anim);
- for (int i = 0; i < animation->get_track_count(); i++) {
- float h = (rect.size.height - 2) / animation->get_track_count();
+ for (int i = 0; i < ap_anim->get_track_count(); i++) {
+ float h = (rect.size.height - 2) / ap_anim->get_track_count();
int y = 2 + h * i + h / 2;
- for (int j = 0; j < animation->track_get_key_count(i); j++) {
- float ofs = animation->track_get_key_time(i, j);
+ for (int j = 0; j < ap_anim->track_get_key_count(i); j++) {
+ float ofs = ap_anim->track_get_key_time(i, j);
int x = p_x + ofs * p_pixels_sec + 2;
if (x < from_x || x >= (to_x - 4)) {
diff --git a/editor/animation_track_editor_plugins.h b/editor/animation_track_editor_plugins.h
index e3cafaa97d..0e9ad44229 100644
--- a/editor/animation_track_editor_plugins.h
+++ b/editor/animation_track_editor_plugins.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_track_editor_plugins.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_track_editor_plugins.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 ANIMATION_TRACK_EDITOR_PLUGINS_H
#define ANIMATION_TRACK_EDITOR_PLUGINS_H
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp
deleted file mode 100644
index ab0e801c88..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) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "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/array_property_edit.h b/editor/array_property_edit.h
deleted file mode 100644
index a620b230cd..0000000000
--- a/editor/array_property_edit.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************/
-/* array_property_edit.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef ARRAY_PROPERTY_EDIT_H
-#define ARRAY_PROPERTY_EDIT_H
-
-#include "scene/main/node.h"
-
-class ArrayPropertyEdit : public RefCounted {
- GDCLASS(ArrayPropertyEdit, RefCounted);
-
- 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();
-
-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, const String &p_hint_string, Variant::Type p_deftype);
-
- Node *get_node();
-
- ArrayPropertyEdit();
-};
-
-#endif // ARRAY_PROPERTY_EDIT_H
diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp
index b9e52ad7ad..c1935b4844 100644
--- a/editor/audio_stream_preview.cpp
+++ b/editor/audio_stream_preview.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* audio_stream_preview.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* audio_stream_preview.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 "audio_stream_preview.h"
@@ -42,6 +42,10 @@ float AudioStreamPreview::get_max(float p_time, float p_time_next) const {
}
int max = preview.size() / 2;
+ if (max == 0) {
+ return 0;
+ }
+
int time_from = p_time / length * max;
int time_to = p_time_next / length * max;
time_from = CLAMP(time_from, 0, max - 1);
@@ -69,6 +73,10 @@ float AudioStreamPreview::get_min(float p_time, float p_time_next) const {
}
int max = preview.size() / 2;
+ if (max == 0) {
+ return 0;
+ }
+
int time_from = p_time / length * max;
int time_to = p_time_next / length * max;
time_from = CLAMP(time_from, 0, max - 1);
diff --git a/editor/audio_stream_preview.h b/editor/audio_stream_preview.h
index 0e3c8f70d2..2b9416ea82 100644
--- a/editor/audio_stream_preview.h
+++ b/editor/audio_stream_preview.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* audio_stream_preview.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* audio_stream_preview.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 AUDIO_STREAM_PREVIEW_H
#define AUDIO_STREAM_PREVIEW_H
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 11a6912aa5..644735a4d8 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1,38 +1,39 @@
-/*************************************************************************/
-/* code_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* code_editor.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 "code_editor.h"
#include "core/input/input.h"
#include "core/os/keyboard.h"
#include "core/string/string_builder.h"
+#include "core/templates/pair.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/plugins/script_editor_plugin.h"
@@ -55,6 +56,7 @@ void GotoLineDialog::ok_pressed() {
if (get_line() < 1 || get_line() > text_editor->get_line_count()) {
return;
}
+ text_editor->remove_secondary_carets();
text_editor->unfold_line(get_line() - 1);
text_editor->set_caret_line(get_line() - 1);
hide();
@@ -90,10 +92,10 @@ void FindReplaceBar::_notification(int p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
find_prev->set_icon(get_theme_icon(SNAME("MoveUp"), SNAME("EditorIcons")));
find_next->set_icon(get_theme_icon(SNAME("MoveDown"), SNAME("EditorIcons")));
- hide_button->set_normal_texture(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
- hide_button->set_hover_texture(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
- hide_button->set_pressed_texture(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
- hide_button->set_custom_minimum_size(hide_button->get_normal_texture()->get_size());
+ hide_button->set_texture_normal(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
+ hide_button->set_texture_hover(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
+ hide_button->set_texture_pressed(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
+ hide_button->set_custom_minimum_size(hide_button->get_texture_normal()->get_size());
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
@@ -141,6 +143,7 @@ void FindReplaceBar::unhandled_input(const Ref<InputEvent> &p_event) {
}
bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col) {
+ text_editor->remove_secondary_carets();
String text = get_search_text();
Point2i pos = text_editor->search(text, p_flags, p_from_line, p_from_col);
@@ -149,7 +152,7 @@ bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col)
text_editor->unfold_line(pos.y);
text_editor->set_caret_line(pos.y, false);
text_editor->set_caret_column(pos.x + text.length(), false);
- text_editor->center_viewport_to_caret();
+ text_editor->center_viewport_to_caret(0);
text_editor->select(pos.y, pos.x, pos.y, pos.x + text.length());
line_col_changed_for_result = true;
@@ -176,37 +179,38 @@ bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col)
}
void FindReplaceBar::_replace() {
- bool selection_enabled = text_editor->has_selection();
+ text_editor->remove_secondary_carets();
+ bool selection_enabled = text_editor->has_selection(0);
Point2i selection_begin, selection_end;
if (selection_enabled) {
- selection_begin = Point2i(text_editor->get_selection_from_line(), text_editor->get_selection_from_column());
- selection_end = Point2i(text_editor->get_selection_to_line(), text_editor->get_selection_to_column());
+ selection_begin = Point2i(text_editor->get_selection_from_line(0), text_editor->get_selection_from_column(0));
+ selection_end = Point2i(text_editor->get_selection_to_line(0), text_editor->get_selection_to_column(0));
}
- String replace_text = get_replace_text();
+ String repl_text = get_replace_text();
int search_text_len = get_search_text().length();
text_editor->begin_complex_operation();
if (selection_enabled && is_selection_only()) { // To restrict search_current() to selected region
- text_editor->set_caret_line(selection_begin.width);
- text_editor->set_caret_column(selection_begin.height);
+ text_editor->set_caret_line(selection_begin.width, false, true, 0, 0);
+ text_editor->set_caret_column(selection_begin.height, true, 0);
}
if (search_current()) {
text_editor->unfold_line(result_line);
- text_editor->select(result_line, result_col, result_line, result_col + search_text_len);
+ text_editor->select(result_line, result_col, result_line, result_col + search_text_len, 0);
if (selection_enabled && is_selection_only()) {
Point2i match_from(result_line, result_col);
Point2i match_to(result_line, result_col + search_text_len);
if (!(match_from < selection_begin || match_to > selection_end)) {
- text_editor->insert_text_at_caret(replace_text);
+ text_editor->insert_text_at_caret(repl_text, 0);
if (match_to.x == selection_end.x) { // Adjust selection bounds if necessary
- selection_end.y += replace_text.length() - search_text_len;
+ selection_end.y += repl_text.length() - search_text_len;
}
}
} else {
- text_editor->insert_text_at_caret(replace_text);
+ text_editor->insert_text_at_caret(repl_text, 0);
}
}
text_editor->end_complex_operation();
@@ -216,31 +220,37 @@ void FindReplaceBar::_replace() {
if (selection_enabled && is_selection_only()) {
// Reselect in order to keep 'Replace' restricted to selection
- text_editor->select(selection_begin.x, selection_begin.y, selection_end.x, selection_end.y);
+ text_editor->select(selection_begin.x, selection_begin.y, selection_end.x, selection_end.y, 0);
} else {
- text_editor->deselect();
+ text_editor->deselect(0);
}
}
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(), text_editor->get_caret_column());
+ Point2i orig_cursor(text_editor->get_caret_line(0), text_editor->get_caret_column(0));
Point2i prev_match = Point2(-1, -1);
- bool selection_enabled = text_editor->has_selection();
+ bool selection_enabled = text_editor->has_selection(0);
+ if (!is_selection_only()) {
+ text_editor->deselect();
+ selection_enabled = false;
+ } else {
+ result_line = -1;
+ result_col = -1;
+ }
+
Point2i selection_begin, selection_end;
if (selection_enabled) {
- selection_begin = Point2i(text_editor->get_selection_from_line(), text_editor->get_selection_from_column());
- selection_end = Point2i(text_editor->get_selection_to_line(), text_editor->get_selection_to_column());
+ selection_begin = Point2i(text_editor->get_selection_from_line(0), text_editor->get_selection_from_column(0));
+ selection_end = Point2i(text_editor->get_selection_to_line(0), text_editor->get_selection_to_column(0));
}
int vsval = text_editor->get_v_scroll();
- text_editor->set_caret_line(0);
- text_editor->set_caret_column(0);
-
- String replace_text = get_replace_text();
+ String repl_text = get_replace_text();
int search_text_len = get_search_text().length();
int rc = 0;
@@ -250,9 +260,13 @@ void FindReplaceBar::_replace_all() {
text_editor->begin_complex_operation();
if (selection_enabled && is_selection_only()) {
- text_editor->set_caret_line(selection_begin.width);
- text_editor->set_caret_column(selection_begin.height);
+ text_editor->set_caret_line(selection_begin.width, false, true, 0, 0);
+ text_editor->set_caret_column(selection_begin.height, true, 0);
+ } else {
+ text_editor->set_caret_line(0, false, true, 0, 0);
+ text_editor->set_caret_column(0, true, 0);
}
+
if (search_current()) {
do {
// replace area
@@ -263,25 +277,25 @@ void FindReplaceBar::_replace_all() {
break; // Done.
}
- prev_match = Point2i(result_line, result_col + replace_text.length());
+ prev_match = Point2i(result_line, result_col + repl_text.length());
text_editor->unfold_line(result_line);
- text_editor->select(result_line, result_col, result_line, match_to.y);
+ text_editor->select(result_line, result_col, result_line, match_to.y, 0);
- if (selection_enabled && is_selection_only()) {
+ if (selection_enabled) {
if (match_from < selection_begin || match_to > selection_end) {
break; // Done.
}
// Replace but adjust selection bounds.
- text_editor->insert_text_at_caret(replace_text);
+ text_editor->insert_text_at_caret(repl_text, 0);
if (match_to.x == selection_end.x) {
- selection_end.y += replace_text.length() - search_text_len;
+ selection_end.y += repl_text.length() - search_text_len;
}
} else {
// Just replace.
- text_editor->insert_text_at_caret(replace_text);
+ text_editor->insert_text_at_caret(repl_text, 0);
}
rc++;
@@ -293,14 +307,12 @@ void FindReplaceBar::_replace_all() {
replace_all_mode = false;
// Restore editor state (selection, cursor, scroll).
- text_editor->set_caret_line(orig_cursor.x);
- text_editor->set_caret_column(orig_cursor.y);
+ text_editor->set_caret_line(orig_cursor.x, false, true, 0, 0);
+ text_editor->set_caret_column(orig_cursor.y, true, 0);
- if (selection_enabled && is_selection_only()) {
+ if (selection_enabled) {
// Reselect.
- text_editor->select(selection_begin.x, selection_begin.y, selection_end.x, selection_end.y);
- } else {
- text_editor->deselect();
+ text_editor->select(selection_begin.x, selection_begin.y, selection_end.x, selection_end.y, 0);
}
text_editor->set_v_scroll(vsval);
@@ -313,21 +325,28 @@ void FindReplaceBar::_replace_all() {
needs_to_count_results = true;
}
-void FindReplaceBar::_get_search_from(int &r_line, int &r_col) {
- r_line = text_editor->get_caret_line();
- r_col = text_editor->get_caret_column();
+void FindReplaceBar::_get_search_from(int &r_line, int &r_col, bool p_is_searching_next) {
+ if (!text_editor->has_selection(0) || is_selection_only()) {
+ r_line = text_editor->get_caret_line(0);
+ r_col = text_editor->get_caret_column(0);
- if (text_editor->has_selection() && is_selection_only()) {
+ if (!p_is_searching_next && r_line == result_line && r_col >= result_col && r_col <= result_col + get_search_text().length()) {
+ r_col = result_col;
+ }
return;
}
- if (r_line == result_line && r_col >= result_col && r_col <= result_col + get_search_text().length()) {
- r_col = result_col;
+ if (p_is_searching_next) {
+ r_line = text_editor->get_selection_to_line();
+ r_col = text_editor->get_selection_to_column();
+ } else {
+ r_line = text_editor->get_selection_from_line();
+ r_col = text_editor->get_selection_from_column();
}
}
void FindReplaceBar::_update_results_count() {
- if (!needs_to_count_results && (result_line != -1)) {
+ if (!needs_to_count_results && (result_line != -1) && results_count_to_current > 0) {
results_count_to_current += (flags & TextEdit::SEARCH_BACKWARDS) ? -1 : 1;
if (results_count_to_current > results_count) {
@@ -339,9 +358,6 @@ void FindReplaceBar::_update_results_count() {
return;
}
- results_count = 0;
- results_count_to_current = 0;
-
String searched = get_search_text();
if (searched.is_empty()) {
return;
@@ -349,6 +365,8 @@ void FindReplaceBar::_update_results_count() {
needs_to_count_results = false;
+ results_count = 0;
+
for (int i = 0; i < text_editor->get_line_count(); i++) {
String line_text = text_editor->get_line(i);
@@ -363,17 +381,24 @@ void FindReplaceBar::_update_results_count() {
if (is_whole_words()) {
if (col_pos > 0 && !is_symbol(line_text[col_pos - 1])) {
- break;
+ col_pos += searched.length();
+ continue;
}
- if (col_pos + line_text.length() < line_text.length() && !is_symbol(line_text[col_pos + searched.length()])) {
- break;
+ if (col_pos + searched.length() < line_text.length() && !is_symbol(line_text[col_pos + searched.length()])) {
+ col_pos += searched.length();
+ continue;
}
}
results_count++;
- if (i == result_line && col_pos == result_col) {
- results_count_to_current = results_count;
+ if (i == result_line) {
+ if (col_pos == result_col) {
+ results_count_to_current = results_count;
+ } else if (col_pos < result_col && col_pos + searched.length() > result_col) {
+ col_pos = result_col;
+ results_count_to_current = results_count;
+ }
}
col_pos += searched.length();
@@ -391,10 +416,10 @@ void FindReplaceBar::_update_matches_label() {
if (results_count == 0) {
matches_label->set_text("No match");
- } else if (results_count == 1) {
- matches_label->set_text(vformat(TTR("%d match"), results_count));
+ } else if (results_count_to_current == -1) {
+ matches_label->set_text(vformat(TTRN("%d match", "%d matches", results_count), results_count));
} else {
- matches_label->set_text(vformat(TTR("%d of %d matches"), results_count_to_current, results_count));
+ matches_label->set_text(vformat(TTRN("%d of %d match", "%d of %d matches", results_count), results_count_to_current, results_count));
}
}
}
@@ -416,6 +441,10 @@ bool FindReplaceBar::search_current() {
}
bool FindReplaceBar::search_prev() {
+ if (is_selection_only() && !replace_all_mode) {
+ return false;
+ }
+
if (!is_visible()) {
popup_search(true);
}
@@ -434,9 +463,6 @@ bool FindReplaceBar::search_prev() {
int line, col;
_get_search_from(line, col);
- if (text_editor->has_selection()) {
- col--; // Skip currently selected word.
- }
col -= text.length();
if (col < 0) {
@@ -451,17 +477,15 @@ bool FindReplaceBar::search_prev() {
}
bool FindReplaceBar::search_next() {
+ if (is_selection_only() && !replace_all_mode) {
+ return false;
+ }
+
if (!is_visible()) {
popup_search(true);
}
flags = 0;
- String text;
- if (replace_all_mode) {
- text = get_replace_text();
- } else {
- text = get_search_text();
- }
if (is_whole_words()) {
flags |= TextEdit::SEARCH_WHOLE_WORDS;
@@ -471,18 +495,7 @@ bool FindReplaceBar::search_next() {
}
int line, col;
- _get_search_from(line, col);
-
- if (line == result_line && col == result_col) {
- col += text.length();
- if (col > text_editor->get_line(line).length()) {
- line += 1;
- if (line >= text_editor->get_line_count()) {
- line = 0;
- }
- col = 0;
- }
- }
+ _get_search_from(line, col, true);
return _search(flags, line, col);
}
@@ -512,8 +525,10 @@ void FindReplaceBar::_show_search(bool p_focus_replace, bool p_show_only) {
search_text->call_deferred(SNAME("grab_focus"));
}
- if (text_editor->has_selection() && !selection_only->is_pressed()) {
- search_text->set_text(text_editor->get_selected_text());
+ if (text_editor->has_selection(0) && !is_selection_only()) {
+ search_text->set_text(text_editor->get_selected_text(0));
+ result_line = text_editor->get_selection_from_line();
+ result_col = text_editor->get_selection_from_column();
}
if (!get_search_text().is_empty()) {
@@ -537,6 +552,7 @@ void FindReplaceBar::popup_search(bool p_show_only) {
replace_text->hide();
hbc_button_replace->hide();
hbc_option_replace->hide();
+ selection_only->set_pressed(false);
_show_search(false, p_show_only);
}
@@ -548,9 +564,9 @@ void FindReplaceBar::popup_replace() {
hbc_option_replace->show();
}
- selection_only->set_pressed((text_editor->has_selection() && text_editor->get_selection_from_line() < text_editor->get_selection_to_line()));
+ selection_only->set_pressed((text_editor->has_selection(0) && text_editor->get_selection_from_line(0) < text_editor->get_selection_to_line(0)));
- _show_search(is_visible() || text_editor->has_selection());
+ _show_search(is_visible() || text_editor->has_selection(0));
}
void FindReplaceBar::_search_options_changed(bool p_pressed) {
@@ -587,7 +603,7 @@ void FindReplaceBar::_search_text_submitted(const String &p_text) {
}
void FindReplaceBar::_replace_text_submitted(const String &p_text) {
- if (selection_only->is_pressed() && text_editor->has_selection()) {
+ if (selection_only->is_pressed() && text_editor->has_selection(0)) {
_replace_all();
_hide_bar();
} else if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) {
@@ -860,6 +876,10 @@ void CodeTextEditor::_reset_zoom() {
}
void CodeTextEditor::_line_col_changed() {
+ if (!code_complete_timer->is_stopped() && code_complete_timer_line != text_editor->get_caret_line()) {
+ code_complete_timer->stop();
+ }
+
String line = text_editor->get_line(text_editor->get_caret_line());
int positional_column = 0;
@@ -889,6 +909,7 @@ void CodeTextEditor::_line_col_changed() {
void CodeTextEditor::_text_changed() {
if (text_editor->is_insert_text_operation()) {
+ code_complete_timer_line = text_editor->get_caret_line();
code_complete_timer->start();
}
@@ -999,50 +1020,50 @@ void CodeTextEditor::update_editor_settings() {
completion_comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
// Appearance: Caret
- text_editor->set_caret_type((TextEdit::CaretType)EditorSettings::get_singleton()->get("text_editor/appearance/caret/type").operator int());
- text_editor->set_caret_blink_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/caret/caret_blink"));
- text_editor->set_caret_blink_interval(EditorSettings::get_singleton()->get("text_editor/appearance/caret/caret_blink_interval"));
- text_editor->set_highlight_current_line(EditorSettings::get_singleton()->get("text_editor/appearance/caret/highlight_current_line"));
- text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/appearance/caret/highlight_all_occurrences"));
+ text_editor->set_caret_type((TextEdit::CaretType)EDITOR_GET("text_editor/appearance/caret/type").operator int());
+ text_editor->set_caret_blink_enabled(EDITOR_GET("text_editor/appearance/caret/caret_blink"));
+ text_editor->set_caret_blink_interval(EDITOR_GET("text_editor/appearance/caret/caret_blink_interval"));
+ text_editor->set_highlight_current_line(EDITOR_GET("text_editor/appearance/caret/highlight_current_line"));
+ text_editor->set_highlight_all_occurrences(EDITOR_GET("text_editor/appearance/caret/highlight_all_occurrences"));
// Appearance: Gutters
- text_editor->set_draw_line_numbers(EditorSettings::get_singleton()->get("text_editor/appearance/gutters/show_line_numbers"));
- text_editor->set_line_numbers_zero_padded(EditorSettings::get_singleton()->get("text_editor/appearance/gutters/line_numbers_zero_padded"));
- text_editor->set_draw_bookmarks_gutter(EditorSettings::get_singleton()->get("text_editor/appearance/gutters/show_bookmark_gutter"));
+ text_editor->set_draw_line_numbers(EDITOR_GET("text_editor/appearance/gutters/show_line_numbers"));
+ text_editor->set_line_numbers_zero_padded(EDITOR_GET("text_editor/appearance/gutters/line_numbers_zero_padded"));
+ text_editor->set_draw_bookmarks_gutter(EDITOR_GET("text_editor/appearance/gutters/show_bookmark_gutter"));
// Appearance: Minimap
- text_editor->set_draw_minimap(EditorSettings::get_singleton()->get("text_editor/appearance/minimap/show_minimap"));
- text_editor->set_minimap_width((int)EditorSettings::get_singleton()->get("text_editor/appearance/minimap/minimap_width") * EDSCALE);
+ text_editor->set_draw_minimap(EDITOR_GET("text_editor/appearance/minimap/show_minimap"));
+ text_editor->set_minimap_width((int)EDITOR_GET("text_editor/appearance/minimap/minimap_width") * EDSCALE);
// Appearance: Lines
- text_editor->set_line_folding_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/lines/code_folding"));
- text_editor->set_draw_fold_gutter(EditorSettings::get_singleton()->get("text_editor/appearance/lines/code_folding"));
- text_editor->set_line_wrapping_mode((TextEdit::LineWrappingMode)EditorSettings::get_singleton()->get("text_editor/appearance/lines/word_wrap").operator int());
+ text_editor->set_line_folding_enabled(EDITOR_GET("text_editor/appearance/lines/code_folding"));
+ text_editor->set_draw_fold_gutter(EDITOR_GET("text_editor/appearance/lines/code_folding"));
+ text_editor->set_line_wrapping_mode((TextEdit::LineWrappingMode)EDITOR_GET("text_editor/appearance/lines/word_wrap").operator int());
// Appearance: Whitespace
- text_editor->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/appearance/whitespace/draw_tabs"));
- text_editor->set_draw_spaces(EditorSettings::get_singleton()->get("text_editor/appearance/whitespace/draw_spaces"));
+ text_editor->set_draw_tabs(EDITOR_GET("text_editor/appearance/whitespace/draw_tabs"));
+ text_editor->set_draw_spaces(EDITOR_GET("text_editor/appearance/whitespace/draw_spaces"));
// Behavior: Navigation
- text_editor->set_scroll_past_end_of_file_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/scroll_past_end_of_file"));
- text_editor->set_smooth_scroll_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/smooth_scrolling"));
- text_editor->set_v_scroll_speed(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/v_scroll_speed"));
- text_editor->set_drag_and_drop_selection_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/drag_and_drop_selection"));
+ text_editor->set_scroll_past_end_of_file_enabled(EDITOR_GET("text_editor/behavior/navigation/scroll_past_end_of_file"));
+ text_editor->set_smooth_scroll_enabled(EDITOR_GET("text_editor/behavior/navigation/smooth_scrolling"));
+ text_editor->set_v_scroll_speed(EDITOR_GET("text_editor/behavior/navigation/v_scroll_speed"));
+ text_editor->set_drag_and_drop_selection_enabled(EDITOR_GET("text_editor/behavior/navigation/drag_and_drop_selection"));
// Behavior: indent
- text_editor->set_indent_using_spaces(EditorSettings::get_singleton()->get("text_editor/behavior/indent/type"));
- text_editor->set_indent_size(EditorSettings::get_singleton()->get("text_editor/behavior/indent/size"));
- text_editor->set_auto_indent_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/indent/auto_indent"));
+ text_editor->set_indent_using_spaces(EDITOR_GET("text_editor/behavior/indent/type"));
+ text_editor->set_indent_size(EDITOR_GET("text_editor/behavior/indent/size"));
+ text_editor->set_auto_indent_enabled(EDITOR_GET("text_editor/behavior/indent/auto_indent"));
// Completion
- text_editor->set_auto_brace_completion_enabled(EditorSettings::get_singleton()->get("text_editor/completion/auto_brace_complete"));
+ text_editor->set_auto_brace_completion_enabled(EDITOR_GET("text_editor/completion/auto_brace_complete"));
// Appearance: Guidelines
- if (EditorSettings::get_singleton()->get("text_editor/appearance/guidelines/show_line_length_guidelines")) {
+ if (EDITOR_GET("text_editor/appearance/guidelines/show_line_length_guidelines")) {
TypedArray<int> guideline_cols;
- guideline_cols.append(EditorSettings::get_singleton()->get("text_editor/appearance/guidelines/line_length_guideline_hard_column"));
- if (EditorSettings::get_singleton()->get("text_editor/appearance/guidelines/line_length_guideline_soft_column") != guideline_cols[0]) {
- guideline_cols.append(EditorSettings::get_singleton()->get("text_editor/appearance/guidelines/line_length_guideline_soft_column"));
+ guideline_cols.append(EDITOR_GET("text_editor/appearance/guidelines/line_length_guideline_hard_column"));
+ if (EDITOR_GET("text_editor/appearance/guidelines/line_length_guideline_soft_column") != guideline_cols[0]) {
+ guideline_cols.append(EDITOR_GET("text_editor/appearance/guidelines/line_length_guideline_soft_column"));
}
text_editor->set_line_length_guidelines(guideline_cols);
} else {
@@ -1091,6 +1112,7 @@ void CodeTextEditor::trim_trailing_whitespace() {
}
if (trimed_whitespace) {
+ text_editor->merge_overlapping_carets();
text_editor->end_complex_operation();
text_editor->queue_redraw();
}
@@ -1115,15 +1137,18 @@ void CodeTextEditor::insert_final_newline() {
}
void CodeTextEditor::convert_indent_to_spaces() {
- int indent_size = EditorSettings::get_singleton()->get("text_editor/behavior/indent/size");
+ int indent_size = EDITOR_GET("text_editor/behavior/indent/size");
String indent = "";
for (int i = 0; i < indent_size; i++) {
indent += " ";
}
- int cursor_line = text_editor->get_caret_line();
- int cursor_column = text_editor->get_caret_column();
+ Vector<int> cursor_columns;
+ cursor_columns.resize(text_editor->get_caret_count());
+ for (int c = 0; c < text_editor->get_caret_count(); c++) {
+ cursor_columns.write[c] = text_editor->get_caret_column(c);
+ }
bool changed_indentation = false;
for (int i = 0; i < text_editor->get_line_count(); i++) {
@@ -1140,8 +1165,10 @@ void CodeTextEditor::convert_indent_to_spaces() {
text_editor->begin_complex_operation();
changed_indentation = true;
}
- if (cursor_line == i && cursor_column > j) {
- cursor_column += indent_size - 1;
+ for (int c = 0; c < text_editor->get_caret_count(); c++) {
+ if (text_editor->get_caret_line(c) == i && text_editor->get_caret_column(c) > j) {
+ cursor_columns.write[c] += indent_size - 1;
+ }
}
line = line.left(j) + indent + line.substr(j + 1);
}
@@ -1152,18 +1179,24 @@ void CodeTextEditor::convert_indent_to_spaces() {
}
}
if (changed_indentation) {
- text_editor->set_caret_column(cursor_column);
+ for (int c = 0; c < text_editor->get_caret_count(); c++) {
+ text_editor->set_caret_column(cursor_columns[c], c == 0, c);
+ }
+ text_editor->merge_overlapping_carets();
text_editor->end_complex_operation();
text_editor->queue_redraw();
}
}
void CodeTextEditor::convert_indent_to_tabs() {
- int indent_size = EditorSettings::get_singleton()->get("text_editor/behavior/indent/size");
+ int indent_size = EDITOR_GET("text_editor/behavior/indent/size");
indent_size -= 1;
- int cursor_line = text_editor->get_caret_line();
- int cursor_column = text_editor->get_caret_column();
+ Vector<int> cursor_columns;
+ cursor_columns.resize(text_editor->get_caret_count());
+ for (int c = 0; c < text_editor->get_caret_count(); c++) {
+ cursor_columns.write[c] = text_editor->get_caret_column(c);
+ }
bool changed_indentation = false;
for (int i = 0; i < text_editor->get_line_count(); i++) {
@@ -1184,8 +1217,10 @@ void CodeTextEditor::convert_indent_to_tabs() {
text_editor->begin_complex_operation();
changed_indentation = true;
}
- if (cursor_line == i && cursor_column > j) {
- cursor_column -= indent_size;
+ for (int c = 0; c < text_editor->get_caret_count(); c++) {
+ if (text_editor->get_caret_line(c) == i && text_editor->get_caret_column(c) > j) {
+ cursor_columns.write[c] -= indent_size;
+ }
}
line = line.left(j - indent_size) + "\t" + line.substr(j + 1);
j = 0;
@@ -1201,7 +1236,10 @@ void CodeTextEditor::convert_indent_to_tabs() {
}
}
if (changed_indentation) {
- text_editor->set_caret_column(cursor_column);
+ for (int c = 0; c < text_editor->get_caret_count(); c++) {
+ text_editor->set_caret_column(cursor_columns[c], c == 0, c);
+ }
+ text_editor->merge_overlapping_carets();
text_editor->end_complex_operation();
text_editor->queue_redraw();
}
@@ -1211,300 +1249,477 @@ void CodeTextEditor::convert_case(CaseStyle p_case) {
if (!text_editor->has_selection()) {
return;
}
-
text_editor->begin_complex_operation();
- int begin = text_editor->get_selection_from_line();
- int end = text_editor->get_selection_to_line();
- int begin_col = text_editor->get_selection_from_column();
- int end_col = text_editor->get_selection_to_column();
-
- for (int i = begin; i <= end; i++) {
- int len = text_editor->get_line(i).length();
- if (i == end) {
- len = end_col;
- }
- if (i == begin) {
- len -= begin_col;
+ Vector<int> caret_edit_order = text_editor->get_caret_index_edit_order();
+ for (const int &c : caret_edit_order) {
+ if (!text_editor->has_selection(c)) {
+ continue;
}
- String new_line = text_editor->get_line(i).substr(i == begin ? begin_col : 0, len);
- switch (p_case) {
- case UPPER: {
- new_line = new_line.to_upper();
- } break;
- case LOWER: {
- new_line = new_line.to_lower();
- } break;
- case CAPITALIZE: {
- new_line = new_line.capitalize();
- } break;
- }
+ int begin = text_editor->get_selection_from_line(c);
+ int end = text_editor->get_selection_to_line(c);
+ int begin_col = text_editor->get_selection_from_column(c);
+ int end_col = text_editor->get_selection_to_column(c);
- if (i == begin) {
- new_line = text_editor->get_line(i).left(begin_col) + new_line;
- }
- if (i == end) {
- new_line = new_line + text_editor->get_line(i).substr(end_col);
+ for (int i = begin; i <= end; i++) {
+ int len = text_editor->get_line(i).length();
+ if (i == end) {
+ len = end_col;
+ }
+ if (i == begin) {
+ len -= begin_col;
+ }
+ String new_line = text_editor->get_line(i).substr(i == begin ? begin_col : 0, len);
+
+ switch (p_case) {
+ case UPPER: {
+ new_line = new_line.to_upper();
+ } break;
+ case LOWER: {
+ new_line = new_line.to_lower();
+ } break;
+ case CAPITALIZE: {
+ new_line = new_line.capitalize();
+ } break;
+ }
+
+ if (i == begin) {
+ new_line = text_editor->get_line(i).left(begin_col) + new_line;
+ }
+ if (i == end) {
+ new_line = new_line + text_editor->get_line(i).substr(end_col);
+ }
+ text_editor->set_line(i, new_line);
}
- text_editor->set_line(i, new_line);
}
text_editor->end_complex_operation();
}
void CodeTextEditor::move_lines_up() {
text_editor->begin_complex_operation();
- if (text_editor->has_selection()) {
- int from_line = text_editor->get_selection_from_line();
- int from_col = text_editor->get_selection_from_column();
- int to_line = text_editor->get_selection_to_line();
- int to_column = text_editor->get_selection_to_column();
- int cursor_line = text_editor->get_caret_line();
- for (int i = from_line; i <= to_line; i++) {
- int line_id = i;
- int next_id = i - 1;
+ Vector<int> caret_edit_order = text_editor->get_caret_index_edit_order();
- if (line_id == 0 || next_id < 0) {
- return;
+ // Lists of carets representing each group
+ Vector<Vector<int>> caret_groups;
+ Vector<Pair<int, int>> group_borders;
+
+ // Search for groups of carets and their selections residing on the same lines
+ for (int i = 0; i < caret_edit_order.size(); i++) {
+ int c = caret_edit_order[i];
+
+ Vector<int> new_group{ c };
+ Pair<int, int> group_border;
+ if (text_editor->has_selection(c)) {
+ group_border.first = text_editor->get_selection_from_line(c);
+ group_border.second = text_editor->get_selection_to_line(c);
+ } else {
+ group_border.first = text_editor->get_caret_line(c);
+ group_border.second = text_editor->get_caret_line(c);
+ }
+
+ for (int j = i; j < caret_edit_order.size() - 1; j++) {
+ int c_current = caret_edit_order[j];
+ int c_next = caret_edit_order[j + 1];
+
+ int next_start_pos = text_editor->has_selection(c_next) ? text_editor->get_selection_from_line(c_next) : text_editor->get_caret_line(c_next);
+ int next_end_pos = text_editor->has_selection(c_next) ? text_editor->get_selection_to_line(c_next) : text_editor->get_caret_line(c_next);
+
+ int current_start_pos = text_editor->has_selection(c_current) ? text_editor->get_selection_from_line(c_current) : text_editor->get_caret_line(c_current);
+
+ i = j;
+ if (next_end_pos != current_start_pos && next_end_pos + 1 != current_start_pos) {
+ break;
}
+ group_border.first = next_start_pos;
+ new_group.push_back(c_next);
+ // If the last caret is added to the current group there is no need to process it again
+ if (j + 1 == caret_edit_order.size() - 1) {
+ i++;
+ }
+ }
+ group_borders.push_back(group_border);
+ caret_groups.push_back(new_group);
+ }
- text_editor->unfold_line(line_id);
- text_editor->unfold_line(next_id);
+ for (int i = group_borders.size() - 1; i >= 0; i--) {
+ if (group_borders[i].first - 1 < 0) {
+ continue;
+ }
- text_editor->swap_lines(line_id, next_id);
- text_editor->set_caret_line(next_id);
+ // If the group starts overlapping with the upper group don't move it
+ if (i < group_borders.size() - 1 && group_borders[i].first - 1 <= group_borders[i + 1].second) {
+ continue;
}
- int from_line_up = from_line > 0 ? from_line - 1 : from_line;
- int to_line_up = to_line > 0 ? to_line - 1 : to_line;
- int cursor_line_up = cursor_line > 0 ? cursor_line - 1 : cursor_line;
- text_editor->select(from_line_up, from_col, to_line_up, to_column);
- text_editor->set_caret_line(cursor_line_up);
- } else {
- int line_id = text_editor->get_caret_line();
- int next_id = line_id - 1;
- if (line_id == 0 || next_id < 0) {
- return;
+ // We have to remember caret positions and selections prior to line swapping
+ Vector<Vector<int>> caret_group_parameters;
+
+ for (int j = 0; j < caret_groups[i].size(); j++) {
+ int c = caret_groups[i][j];
+ int cursor_line = text_editor->get_caret_line(c);
+ int cursor_column = text_editor->get_caret_column(c);
+
+ if (!text_editor->has_selection(c)) {
+ caret_group_parameters.push_back(Vector<int>{ -1, -1, -1, -1, cursor_line, cursor_column });
+ continue;
+ }
+ int from_line = text_editor->get_selection_from_line(c);
+ int from_col = text_editor->get_selection_from_column(c);
+ int to_line = text_editor->get_selection_to_line(c);
+ int to_column = text_editor->get_selection_to_column(c);
+ caret_group_parameters.push_back(Vector<int>{ from_line, from_col, to_line, to_column, cursor_line, cursor_column });
}
- text_editor->unfold_line(line_id);
- text_editor->unfold_line(next_id);
+ for (int line_id = group_borders[i].first; line_id <= group_borders[i].second; line_id++) {
+ text_editor->unfold_line(line_id);
+ text_editor->unfold_line(line_id - 1);
+
+ text_editor->swap_lines(line_id - 1, line_id);
+ }
- text_editor->swap_lines(line_id, next_id);
- text_editor->set_caret_line(next_id);
+ for (int j = 0; j < caret_groups[i].size(); j++) {
+ int c = caret_groups[i][j];
+ Vector<int> caret_parameters = caret_group_parameters[j];
+ text_editor->set_caret_line(caret_parameters[4] - 1, c == 0, true, 0, c);
+ text_editor->set_caret_column(caret_parameters[5], c == 0, c);
+
+ if (caret_parameters[0] >= 0) {
+ text_editor->select(caret_parameters[0] - 1, caret_parameters[1], caret_parameters[2] - 1, caret_parameters[3], c);
+ }
+ }
}
+
text_editor->end_complex_operation();
+ text_editor->merge_overlapping_carets();
text_editor->queue_redraw();
}
void CodeTextEditor::move_lines_down() {
text_editor->begin_complex_operation();
- if (text_editor->has_selection()) {
- int from_line = text_editor->get_selection_from_line();
- int from_col = text_editor->get_selection_from_column();
- int to_line = text_editor->get_selection_to_line();
- int to_column = text_editor->get_selection_to_column();
- int cursor_line = text_editor->get_caret_line();
-
- for (int i = to_line; i >= from_line; i--) {
- int line_id = i;
- int next_id = i + 1;
-
- if (line_id == text_editor->get_line_count() - 1 || next_id > text_editor->get_line_count()) {
- return;
+
+ Vector<int> caret_edit_order = text_editor->get_caret_index_edit_order();
+
+ // Lists of carets representing each group
+ Vector<Vector<int>> caret_groups;
+ Vector<Pair<int, int>> group_borders;
+
+ // Search for groups of carets and their selections residing on the same lines
+ for (int i = 0; i < caret_edit_order.size(); i++) {
+ int c = caret_edit_order[i];
+
+ Vector<int> new_group{ c };
+ Pair<int, int> group_border;
+ if (text_editor->has_selection(c)) {
+ group_border.first = text_editor->get_selection_from_line(c);
+ group_border.second = text_editor->get_selection_to_line(c);
+ } else {
+ group_border.first = text_editor->get_caret_line(c);
+ group_border.second = text_editor->get_caret_line(c);
+ }
+
+ for (int j = i; j < caret_edit_order.size() - 1; j++) {
+ int c_current = caret_edit_order[j];
+ int c_next = caret_edit_order[j + 1];
+
+ int next_start_pos = text_editor->has_selection(c_next) ? text_editor->get_selection_from_line(c_next) : text_editor->get_caret_line(c_next);
+ int next_end_pos = text_editor->has_selection(c_next) ? text_editor->get_selection_to_line(c_next) : text_editor->get_caret_line(c_next);
+
+ int current_start_pos = text_editor->has_selection(c_current) ? text_editor->get_selection_from_line(c_current) : text_editor->get_caret_line(c_current);
+
+ i = j;
+ if (next_end_pos == current_start_pos || next_end_pos + 1 == current_start_pos) {
+ group_border.first = next_start_pos;
+ new_group.push_back(c_next);
+ // If the last caret is added to the current group there is no need to process it again
+ if (j + 1 == caret_edit_order.size() - 1) {
+ i++;
+ }
+ } else {
+ break;
}
+ }
+ group_borders.push_back(group_border);
+ caret_groups.push_back(new_group);
+ }
- text_editor->unfold_line(line_id);
- text_editor->unfold_line(next_id);
+ for (int i = 0; i < group_borders.size(); i++) {
+ if (group_borders[i].second + 1 > text_editor->get_line_count() - 1) {
+ continue;
+ }
- text_editor->swap_lines(line_id, next_id);
- text_editor->set_caret_line(next_id);
+ // If the group starts overlapping with the upper group don't move it
+ if (i > 0 && group_borders[i].second + 1 >= group_borders[i - 1].first) {
+ continue;
}
- int from_line_down = from_line < text_editor->get_line_count() ? from_line + 1 : from_line;
- int to_line_down = to_line < text_editor->get_line_count() ? to_line + 1 : to_line;
- int cursor_line_down = cursor_line < text_editor->get_line_count() ? cursor_line + 1 : cursor_line;
- text_editor->select(from_line_down, from_col, to_line_down, to_column);
- text_editor->set_caret_line(cursor_line_down);
- } else {
- int line_id = text_editor->get_caret_line();
- int next_id = line_id + 1;
- if (line_id == text_editor->get_line_count() - 1 || next_id > text_editor->get_line_count()) {
- return;
+ // We have to remember caret positions and selections prior to line swapping
+ Vector<Vector<int>> caret_group_parameters;
+
+ for (int j = 0; j < caret_groups[i].size(); j++) {
+ int c = caret_groups[i][j];
+ int cursor_line = text_editor->get_caret_line(c);
+ int cursor_column = text_editor->get_caret_column(c);
+
+ if (text_editor->has_selection(c)) {
+ int from_line = text_editor->get_selection_from_line(c);
+ int from_col = text_editor->get_selection_from_column(c);
+ int to_line = text_editor->get_selection_to_line(c);
+ int to_column = text_editor->get_selection_to_column(c);
+ caret_group_parameters.push_back(Vector<int>{ from_line, from_col, to_line, to_column, cursor_line, cursor_column });
+ } else {
+ caret_group_parameters.push_back(Vector<int>{ -1, -1, -1, -1, cursor_line, cursor_column });
+ }
}
- text_editor->unfold_line(line_id);
- text_editor->unfold_line(next_id);
+ for (int line_id = group_borders[i].second; line_id >= group_borders[i].first; line_id--) {
+ text_editor->unfold_line(line_id);
+ text_editor->unfold_line(line_id + 1);
- text_editor->swap_lines(line_id, next_id);
- text_editor->set_caret_line(next_id);
+ text_editor->swap_lines(line_id + 1, line_id);
+ }
+
+ for (int j = 0; j < caret_groups[i].size(); j++) {
+ int c = caret_groups[i][j];
+ Vector<int> caret_parameters = caret_group_parameters[j];
+ text_editor->set_caret_line(caret_parameters[4] + 1, c == 0, true, 0, c);
+ text_editor->set_caret_column(caret_parameters[5], c == 0, c);
+
+ if (caret_parameters[0] >= 0) {
+ text_editor->select(caret_parameters[0] + 1, caret_parameters[1], caret_parameters[2] + 1, caret_parameters[3], c);
+ }
+ }
}
+
+ text_editor->merge_overlapping_carets();
text_editor->end_complex_operation();
text_editor->queue_redraw();
}
-void CodeTextEditor::_delete_line(int p_line) {
+void CodeTextEditor::_delete_line(int p_line, int p_caret) {
// this is currently intended to be called within delete_lines()
// so `begin_complex_operation` is omitted here
text_editor->set_line(p_line, "");
if (p_line == 0 && text_editor->get_line_count() > 1) {
- text_editor->set_caret_line(1);
- text_editor->set_caret_column(0);
+ text_editor->set_caret_line(1, p_caret == 0, true, 0, p_caret);
+ text_editor->set_caret_column(0, p_caret == 0, p_caret);
}
- text_editor->backspace();
+ text_editor->backspace(p_caret);
if (p_line < text_editor->get_line_count()) {
text_editor->unfold_line(p_line);
}
- text_editor->set_caret_line(p_line);
+ text_editor->set_caret_line(p_line, p_caret == 0, true, 0, p_caret);
}
void CodeTextEditor::delete_lines() {
text_editor->begin_complex_operation();
- if (text_editor->has_selection()) {
- int to_line = text_editor->get_selection_to_line();
- int from_line = text_editor->get_selection_from_line();
- int count = Math::abs(to_line - from_line) + 1;
- text_editor->set_caret_line(from_line, false);
- text_editor->deselect();
- for (int i = 0; i < count; i++) {
- _delete_line(from_line);
+ Vector<int> carets_to_remove;
+
+ Vector<int> caret_edit_order = text_editor->get_caret_index_edit_order();
+ for (int i = 0; i < caret_edit_order.size(); i++) {
+ int c = caret_edit_order[i];
+ int cl = text_editor->get_caret_line(c);
+
+ bool swaped_caret = false;
+ for (int j = i + 1; j < caret_edit_order.size(); j++) {
+ if (text_editor->has_selection(caret_edit_order[j])) {
+ if (text_editor->get_selection_from_line() == cl) {
+ carets_to_remove.push_back(caret_edit_order[j]);
+ continue;
+ }
+
+ if (text_editor->get_selection_to_line() == cl) {
+ if (text_editor->has_selection(c)) {
+ if (text_editor->get_selection_to_line(c) != cl) {
+ text_editor->select(cl + 1, 0, text_editor->get_selection_to_line(c), text_editor->get_selection_to_column(c), c);
+ break;
+ }
+ }
+
+ carets_to_remove.push_back(c);
+ i = j - 1;
+ swaped_caret = true;
+ break;
+ }
+ break;
+ }
+
+ if (text_editor->get_caret_line(caret_edit_order[j]) == cl) {
+ carets_to_remove.push_back(caret_edit_order[j]);
+ i = j;
+ continue;
+ }
+ break;
+ }
+
+ if (swaped_caret) {
+ continue;
+ }
+
+ if (text_editor->has_selection(c)) {
+ int to_line = text_editor->get_selection_to_line(c);
+ int from_line = text_editor->get_selection_from_line(c);
+ int count = Math::abs(to_line - from_line) + 1;
+
+ text_editor->set_caret_line(from_line, false, true, 0, c);
+ text_editor->deselect(c);
+ for (int j = 0; j < count; j++) {
+ _delete_line(from_line, c);
+ }
+ } else {
+ _delete_line(text_editor->get_caret_line(c), c);
}
- } else {
- _delete_line(text_editor->get_caret_line());
}
+
+ // Sort and remove backwards to preserve indexes.
+ carets_to_remove.sort();
+ for (int i = carets_to_remove.size() - 1; i >= 0; i--) {
+ text_editor->remove_caret(carets_to_remove[i]);
+ }
+ text_editor->merge_overlapping_carets();
text_editor->end_complex_operation();
}
void CodeTextEditor::duplicate_selection() {
- const int cursor_column = text_editor->get_caret_column();
- int from_line = text_editor->get_caret_line();
- int to_line = text_editor->get_caret_line();
- int from_column = 0;
- int to_column = 0;
- int cursor_new_line = to_line + 1;
- int cursor_new_column = text_editor->get_caret_column();
- String new_text = "\n" + text_editor->get_line(from_line);
- bool selection_active = false;
-
- text_editor->set_caret_column(text_editor->get_line(from_line).length());
- if (text_editor->has_selection()) {
- from_column = text_editor->get_selection_from_column();
- to_column = text_editor->get_selection_to_column();
-
- from_line = text_editor->get_selection_from_line();
- to_line = text_editor->get_selection_to_line();
- cursor_new_line = to_line + text_editor->get_caret_line() - from_line;
- cursor_new_column = to_column == cursor_column ? 2 * to_column - from_column : to_column;
- new_text = text_editor->get_selected_text();
- selection_active = true;
-
- text_editor->set_caret_line(to_line);
- text_editor->set_caret_column(to_column);
- }
-
text_editor->begin_complex_operation();
- for (int i = from_line; i <= to_line; i++) {
- text_editor->unfold_line(i);
- }
- text_editor->deselect();
- text_editor->insert_text_at_caret(new_text);
- text_editor->set_caret_line(cursor_new_line);
- text_editor->set_caret_column(cursor_new_column);
- if (selection_active) {
- text_editor->select(to_line, to_column, 2 * to_line - from_line, to_line == from_line ? 2 * to_column - from_column : to_column);
- }
+ Vector<int> caret_edit_order = text_editor->get_caret_index_edit_order();
+ for (const int &c : caret_edit_order) {
+ const int cursor_column = text_editor->get_caret_column(c);
+ int from_line = text_editor->get_caret_line(c);
+ int to_line = text_editor->get_caret_line(c);
+ int from_column = 0;
+ int to_column = 0;
+ int cursor_new_line = to_line + 1;
+ int cursor_new_column = text_editor->get_caret_column(c);
+ String new_text = "\n" + text_editor->get_line(from_line);
+ bool selection_active = false;
+
+ text_editor->set_caret_column(text_editor->get_line(from_line).length(), c == 0, c);
+ if (text_editor->has_selection(c)) {
+ from_column = text_editor->get_selection_from_column(c);
+ to_column = text_editor->get_selection_to_column(c);
+
+ from_line = text_editor->get_selection_from_line(c);
+ to_line = text_editor->get_selection_to_line(c);
+ cursor_new_line = to_line + text_editor->get_caret_line(c) - from_line;
+ cursor_new_column = to_column == cursor_column ? 2 * to_column - from_column : to_column;
+ new_text = text_editor->get_selected_text(c);
+ selection_active = true;
+
+ text_editor->set_caret_line(to_line, c == 0, true, 0, c);
+ text_editor->set_caret_column(to_column, c == 0, c);
+ }
+ for (int i = from_line; i <= to_line; i++) {
+ text_editor->unfold_line(i);
+ }
+ text_editor->deselect(c);
+ text_editor->insert_text_at_caret(new_text, c);
+ text_editor->set_caret_line(cursor_new_line, c == 0, true, 0, c);
+ text_editor->set_caret_column(cursor_new_column, c == 0, c);
+ if (selection_active) {
+ text_editor->select(to_line, to_column, 2 * to_line - from_line, to_line == from_line ? 2 * to_column - from_column : to_column, c);
+ }
+ }
+ text_editor->merge_overlapping_carets();
text_editor->end_complex_operation();
text_editor->queue_redraw();
}
void CodeTextEditor::toggle_inline_comment(const String &delimiter) {
text_editor->begin_complex_operation();
- if (text_editor->has_selection()) {
- int begin = text_editor->get_selection_from_line();
- int end = text_editor->get_selection_to_line();
- // End of selection ends on the first column of the last line, ignore it.
- if (text_editor->get_selection_to_column() == 0) {
- end -= 1;
- }
+ Vector<int> caret_edit_order = text_editor->get_caret_index_edit_order();
+ for (const int &c : caret_edit_order) {
+ if (text_editor->has_selection(c)) {
+ int begin = text_editor->get_selection_from_line(c);
+ int end = text_editor->get_selection_to_line(c);
- int col_to = text_editor->get_selection_to_column();
- int cursor_pos = text_editor->get_caret_column();
+ // End of selection ends on the first column of the last line, ignore it.
+ if (text_editor->get_selection_to_column(c) == 0) {
+ end -= 1;
+ }
- // Check if all lines in the selected block are commented.
- bool is_commented = true;
- for (int i = begin; i <= end; i++) {
- if (!text_editor->get_line(i).begins_with(delimiter)) {
- is_commented = false;
- break;
+ int col_to = text_editor->get_selection_to_column(c);
+ int cursor_pos = text_editor->get_caret_column(c);
+
+ // Check if all lines in the selected block are commented.
+ bool is_commented = true;
+ for (int i = begin; i <= end; i++) {
+ if (!text_editor->get_line(i).begins_with(delimiter)) {
+ is_commented = false;
+ break;
+ }
}
- }
- for (int i = begin; i <= end; i++) {
- String line_text = text_editor->get_line(i);
+ for (int i = begin; i <= end; i++) {
+ String line_text = text_editor->get_line(i);
- if (line_text.strip_edges().is_empty()) {
- line_text = delimiter;
- } else {
- if (is_commented) {
- line_text = line_text.substr(delimiter.length(), line_text.length());
+ if (line_text.strip_edges().is_empty()) {
+ line_text = delimiter;
} else {
- line_text = delimiter + line_text;
+ if (is_commented) {
+ line_text = line_text.substr(delimiter.length(), line_text.length());
+ } else {
+ line_text = delimiter + line_text;
+ }
}
+ text_editor->set_line(i, line_text);
}
- text_editor->set_line(i, line_text);
- }
- // Adjust selection & cursor position.
- int offset = (is_commented ? -1 : 1) * delimiter.length();
- int col_from = text_editor->get_selection_from_column() > 0 ? text_editor->get_selection_from_column() + offset : 0;
+ // Adjust selection & cursor position.
+ int offset = (is_commented ? -1 : 1) * delimiter.length();
+ int col_from = text_editor->get_selection_from_column(c) > 0 ? text_editor->get_selection_from_column(c) + offset : 0;
- if (is_commented && text_editor->get_caret_column() == text_editor->get_line(text_editor->get_caret_line()).length() + 1) {
- cursor_pos += 1;
- }
+ if (is_commented && text_editor->get_caret_column(c) == text_editor->get_line(text_editor->get_caret_line(c)).length() + 1) {
+ cursor_pos += 1;
+ }
- if (text_editor->get_selection_to_column() != 0 && col_to != text_editor->get_line(text_editor->get_selection_to_line()).length() + 1) {
- col_to += offset;
- }
+ if (text_editor->get_selection_to_column(c) != 0 && col_to != text_editor->get_line(text_editor->get_selection_to_line(c)).length() + 1) {
+ col_to += offset;
+ }
- if (text_editor->get_caret_column() != 0) {
- cursor_pos += offset;
- }
+ if (text_editor->get_caret_column(c) != 0) {
+ cursor_pos += offset;
+ }
- text_editor->select(begin, col_from, text_editor->get_selection_to_line(), col_to);
- text_editor->set_caret_column(cursor_pos);
+ text_editor->select(begin, col_from, text_editor->get_selection_to_line(c), col_to, c);
+ text_editor->set_caret_column(cursor_pos, c == 0, c);
- } else {
- int begin = text_editor->get_caret_line();
- String line_text = text_editor->get_line(begin);
- int delimiter_length = delimiter.length();
-
- int col = text_editor->get_caret_column();
- if (line_text.begins_with(delimiter)) {
- line_text = line_text.substr(delimiter_length, line_text.length());
- col -= delimiter_length;
} else {
- line_text = delimiter + line_text;
- col += delimiter_length;
- }
+ int begin = text_editor->get_caret_line(c);
+ String line_text = text_editor->get_line(begin);
+ int delimiter_length = delimiter.length();
+
+ int col = text_editor->get_caret_column(c);
+ if (line_text.begins_with(delimiter)) {
+ line_text = line_text.substr(delimiter_length, line_text.length());
+ col -= delimiter_length;
+ } else {
+ line_text = delimiter + line_text;
+ col += delimiter_length;
+ }
- text_editor->set_line(begin, line_text);
- text_editor->set_caret_column(col);
+ text_editor->set_line(begin, line_text);
+ text_editor->set_caret_column(col, c == 0, c);
+ }
}
+ text_editor->merge_overlapping_carets();
text_editor->end_complex_operation();
text_editor->queue_redraw();
}
void CodeTextEditor::goto_line(int p_line) {
+ text_editor->remove_secondary_carets();
text_editor->deselect();
text_editor->unfold_line(p_line);
text_editor->call_deferred(SNAME("set_caret_line"), p_line);
}
void CodeTextEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
+ text_editor->remove_secondary_carets();
text_editor->unfold_line(p_line);
text_editor->call_deferred(SNAME("set_caret_line"), p_line);
text_editor->call_deferred(SNAME("set_caret_column"), p_begin);
@@ -1526,19 +1741,7 @@ void CodeTextEditor::clear_executing_line() {
Variant CodeTextEditor::get_edit_state() {
Dictionary state;
-
- state["scroll_position"] = text_editor->get_v_scroll();
- state["h_scroll_position"] = text_editor->get_h_scroll();
- state["column"] = text_editor->get_caret_column();
- state["row"] = text_editor->get_caret_line();
-
- state["selection"] = get_text_editor()->has_selection();
- if (get_text_editor()->has_selection()) {
- state["selection_from_line"] = text_editor->get_selection_from_line();
- state["selection_from_column"] = text_editor->get_selection_from_column();
- state["selection_to_line"] = text_editor->get_selection_to_line();
- state["selection_to_column"] = text_editor->get_selection_to_column();
- }
+ state.merge(get_navigation_state());
state["folded_lines"] = text_editor->get_folded_lines();
state["breakpoints"] = text_editor->get_breakpointed_lines();
@@ -1559,8 +1762,10 @@ void CodeTextEditor::set_edit_state(const Variant &p_state) {
text_editor->set_v_scroll(state["scroll_position"]);
text_editor->set_h_scroll(state["h_scroll_position"]);
- if (state.has("selection")) {
+ if (state.get("selection", false)) {
text_editor->select(state["selection_from_line"], state["selection_from_column"], state["selection_to_line"], state["selection_to_column"]);
+ } else {
+ text_editor->deselect();
}
if (state.has("folded_lines")) {
@@ -1585,6 +1790,25 @@ void CodeTextEditor::set_edit_state(const Variant &p_state) {
}
}
+Variant CodeTextEditor::get_navigation_state() {
+ Dictionary state;
+
+ state["scroll_position"] = text_editor->get_v_scroll();
+ state["h_scroll_position"] = text_editor->get_h_scroll();
+ state["column"] = text_editor->get_caret_column();
+ state["row"] = text_editor->get_caret_line();
+
+ state["selection"] = get_text_editor()->has_selection();
+ if (get_text_editor()->has_selection()) {
+ state["selection_from_line"] = text_editor->get_selection_from_line();
+ state["selection_from_column"] = text_editor->get_selection_from_column();
+ state["selection_to_line"] = text_editor->get_selection_to_line();
+ state["selection_to_column"] = text_editor->get_selection_to_column();
+ }
+
+ return state;
+}
+
void CodeTextEditor::set_error(const String &p_error) {
error->set_text(p_error);
if (!p_error.is_empty()) {
@@ -1608,6 +1832,7 @@ void CodeTextEditor::goto_error() {
if (text_editor->get_line_count() != error_line) {
text_editor->unfold_line(error_line);
}
+ text_editor->remove_secondary_carets();
text_editor->set_caret_line(error_line);
text_editor->set_caret_column(error_column);
text_editor->center_viewport_to_caret();
@@ -1644,8 +1869,8 @@ void CodeTextEditor::_on_settings_change() {
void CodeTextEditor::_apply_settings_change() {
_update_text_editor_theme();
- font_size = EditorSettings::get_singleton()->get("interface/editor/code_font_size");
- int ot_mode = EditorSettings::get_singleton()->get("interface/editor/code_font_contextual_ligatures");
+ font_size = EDITOR_GET("interface/editor/code_font_size");
+ int ot_mode = EDITOR_GET("interface/editor/code_font_contextual_ligatures");
Ref<FontVariation> fc = text_editor->get_theme_font(SNAME("font"));
if (fc.is_valid()) {
@@ -1656,7 +1881,7 @@ void CodeTextEditor::_apply_settings_change() {
fc->set_opentype_features(ftrs);
} break;
case 2: { // Custom.
- Vector<String> subtag = String(EditorSettings::get_singleton()->get("interface/editor/code_font_custom_opentype_features")).split(",");
+ Vector<String> subtag = String(EDITOR_GET("interface/editor/code_font_custom_opentype_features")).split(",");
Dictionary ftrs;
for (int i = 0; i < subtag.size(); i++) {
Vector<String> subtag_a = subtag[i].split("=");
@@ -1668,7 +1893,7 @@ void CodeTextEditor::_apply_settings_change() {
}
fc->set_opentype_features(ftrs);
} break;
- default: { // Default.
+ default: { // Enabled.
Dictionary ftrs;
ftrs[TS->name_to_tag("calt")] = 1;
fc->set_opentype_features(ftrs);
@@ -1784,8 +2009,10 @@ void CodeTextEditor::set_warning_count(int p_warning_count) {
}
void CodeTextEditor::toggle_bookmark() {
- int line = text_editor->get_caret_line();
- text_editor->set_line_as_bookmarked(line, !text_editor->is_line_bookmarked(line));
+ for (int i = 0; i < text_editor->get_caret_count(); i++) {
+ int line = text_editor->get_caret_line(i);
+ text_editor->set_line_as_bookmarked(line, !text_editor->is_line_bookmarked(line));
+ }
}
void CodeTextEditor::goto_next_bookmark() {
@@ -1794,22 +2021,14 @@ void CodeTextEditor::goto_next_bookmark() {
return;
}
- int line = text_editor->get_caret_line();
- if (line >= (int)bmarks[bmarks.size() - 1]) {
- text_editor->unfold_line(bmarks[0]);
- text_editor->set_caret_line(bmarks[0]);
- text_editor->center_viewport_to_caret();
- } else {
- for (int i = 0; i < bmarks.size(); i++) {
- int bmark_line = bmarks[i];
- if (bmark_line > line) {
- text_editor->unfold_line(bmark_line);
- text_editor->set_caret_line(bmark_line);
- text_editor->center_viewport_to_caret();
- return;
- }
+ int current_line = text_editor->get_caret_line();
+ int bmark_idx = 0;
+ if (current_line < (int)bmarks[bmarks.size() - 1]) {
+ while (bmark_idx < bmarks.size() && bmarks[bmark_idx] <= current_line) {
+ bmark_idx++;
}
}
+ goto_line_centered(bmarks[bmark_idx]);
}
void CodeTextEditor::goto_prev_bookmark() {
@@ -1818,22 +2037,14 @@ void CodeTextEditor::goto_prev_bookmark() {
return;
}
- int line = text_editor->get_caret_line();
- if (line <= (int)bmarks[0]) {
- text_editor->unfold_line(bmarks[bmarks.size() - 1]);
- text_editor->set_caret_line(bmarks[bmarks.size() - 1]);
- text_editor->center_viewport_to_caret();
- } else {
- for (int i = bmarks.size() - 1; i >= 0; i--) {
- int bmark_line = bmarks[i];
- if (bmark_line < line) {
- text_editor->unfold_line(bmark_line);
- text_editor->set_caret_line(bmark_line);
- text_editor->center_viewport_to_caret();
- return;
- }
+ int current_line = text_editor->get_caret_line();
+ int bmark_idx = bmarks.size() - 1;
+ if (current_line > (int)bmarks[0]) {
+ while (bmark_idx >= 0 && bmarks[bmark_idx] >= current_line) {
+ bmark_idx--;
}
}
+ goto_line_centered(bmarks[bmark_idx]);
}
void CodeTextEditor::remove_all_bookmarks() {
@@ -1875,8 +2086,9 @@ 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 = EditorSettings::get_singleton()->get("interface/editor/code_font_contextual_ligatures");
+ int ot_mode = EDITOR_GET("interface/editor/code_font_contextual_ligatures");
Ref<FontVariation> fc = text_editor->get_theme_font(SNAME("font"));
if (fc.is_valid()) {
switch (ot_mode) {
@@ -1886,7 +2098,7 @@ CodeTextEditor::CodeTextEditor() {
fc->set_opentype_features(ftrs);
} break;
case 2: { // Custom.
- Vector<String> subtag = String(EditorSettings::get_singleton()->get("interface/editor/code_font_custom_opentype_features")).split(",");
+ Vector<String> subtag = String(EDITOR_GET("interface/editor/code_font_custom_opentype_features")).split(",");
Dictionary ftrs;
for (int i = 0; i < subtag.size(); i++) {
Vector<String> subtag_a = subtag[i].split("=");
@@ -1898,7 +2110,7 @@ CodeTextEditor::CodeTextEditor() {
}
fc->set_opentype_features(ftrs);
} break;
- default: { // Default.
+ default: { // Enabled.
Dictionary ftrs;
ftrs[TS->name_to_tag("calt")] = 1;
fc->set_opentype_features(ftrs);
@@ -1994,7 +2206,7 @@ CodeTextEditor::CodeTextEditor() {
code_complete_timer->connect("timeout", callable_mp(this, &CodeTextEditor::_code_complete_timer_timeout));
font_resize_val = 0;
- font_size = EditorSettings::get_singleton()->get("interface/editor/code_font_size");
+ font_size = EDITOR_GET("interface/editor/code_font_size");
font_resize_timer = memnew(Timer);
add_child(font_resize_timer);
font_resize_timer->set_one_shot(true);
diff --git a/editor/code_editor.h b/editor/code_editor.h
index 49679cc700..fe2a31a7a7 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* code_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* code_editor.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 CODE_EDITOR_H
#define CODE_EDITOR_H
@@ -92,7 +92,7 @@ class FindReplaceBar : public HBoxContainer {
bool replace_all_mode = false;
bool preserve_cursor = false;
- void _get_search_from(int &r_line, int &r_col);
+ void _get_search_from(int &r_line, int &r_col, bool p_is_searching_next = false);
void _update_results_count();
void _update_matches_label();
@@ -158,6 +158,7 @@ class CodeTextEditor : public VBoxContainer {
Label *info = nullptr;
Timer *idle = nullptr;
Timer *code_complete_timer = nullptr;
+ int code_complete_timer_line = 0;
Timer *font_resize_timer = nullptr;
int font_resize_val;
@@ -197,7 +198,7 @@ class CodeTextEditor : public VBoxContainer {
void _update_status_bar_theme();
- void _delete_line(int p_line);
+ void _delete_line(int p_line, int p_caret);
void _toggle_scripts_pressed();
protected:
@@ -246,6 +247,7 @@ public:
Variant get_edit_state();
void set_edit_state(const Variant &p_state);
+ Variant get_navigation_state();
void set_error_count(int p_error_count);
void set_warning_count(int p_warning_count);
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 861d05f17a..6f4736dca7 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -1,42 +1,44 @@
-/*************************************************************************/
-/* connections_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* connections_dialog.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 "connections_dialog.h"
#include "editor/doc_tools.h"
+#include "editor/editor_help.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/scene_tree_dock.h"
#include "plugins/script_editor_plugin.h"
+#include "scene/resources/packed_scene.h"
static Node *_find_first_script(Node *p_root, Node *p_node) {
if (p_node != p_root && p_node->get_owner() != p_root) {
@@ -160,6 +162,9 @@ void ConnectDialog::_tree_node_selected() {
}
dst_path = source->get_path_to(current);
+ if (!edit_mode) {
+ set_dst_method(generate_method_callback_name(source, signal, current));
+ }
_update_ok_enabled();
}
@@ -184,8 +189,8 @@ void ConnectDialog::_add_bind() {
Variant::Type type = (Variant::Type)type_list->get_item_id(type_list->get_selected());
Variant value;
- Callable::CallError error;
- Variant::construct(type, value, nullptr, 0, error);
+ Callable::CallError err;
+ Variant::construct(type, value, nullptr, 0, err);
cdbinds->params.push_back(value);
cdbinds->notify_changed();
@@ -205,6 +210,45 @@ void ConnectDialog::_remove_bind() {
cdbinds->params.remove_at(idx);
cdbinds->notify_changed();
}
+/*
+ * Automatically generates a name for the callback method.
+ */
+StringName ConnectDialog::generate_method_callback_name(Node *p_source, String p_signal_name, Node *p_target) {
+ String node_name = p_source->get_name();
+ for (int i = 0; i < node_name.length(); i++) { // TODO: Regex filter may be cleaner.
+ char32_t c = node_name[i];
+ if (!is_ascii_identifier_char(c)) {
+ if (c == ' ') {
+ // Replace spaces with underlines.
+ c = '_';
+ } else {
+ // Remove any other characters.
+ node_name.remove_at(i);
+ i--;
+ continue;
+ }
+ }
+ node_name[i] = c;
+ }
+
+ Dictionary subst;
+ subst["NodeName"] = node_name.to_pascal_case();
+ subst["nodeName"] = node_name.to_camel_case();
+ subst["node_name"] = node_name.to_snake_case();
+
+ subst["SignalName"] = p_signal_name.to_pascal_case();
+ subst["signalName"] = p_signal_name.to_camel_case();
+ subst["signal_name"] = p_signal_name.to_snake_case();
+
+ String dst_method;
+ if (p_source == p_target) {
+ dst_method = String(EDITOR_GET("interface/editors/default_signal_callback_to_self_name")).format(subst);
+ } else {
+ dst_method = String(EDITOR_GET("interface/editors/default_signal_callback_name")).format(subst);
+ }
+
+ return dst_method;
+}
/*
* Enables or disables the connect button. The connect button is enabled if a
@@ -238,6 +282,12 @@ void ConnectDialog::_notification(int p_what) {
String type_name = Variant::get_type_name((Variant::Type)type_list->get_item_id(i));
type_list->set_item_icon(i, get_theme_icon(type_name, SNAME("EditorIcons")));
}
+
+ 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);
+ from_signal->add_theme_style_override("normal", style);
+ }
} break;
}
}
@@ -361,6 +411,11 @@ void ConnectDialog::popup_dialog(const String &p_for_signal) {
error_label->set_visible(!_find_first_script(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root()));
}
+ if (first_popup) {
+ first_popup = false;
+ _advanced_pressed();
+ }
+
popup_centered();
}
@@ -383,6 +438,7 @@ void ConnectDialog::_advanced_pressed() {
}
_update_ok_enabled();
+ EditorSettings::get_singleton()->set_project_metadata("editor_metadata", "use_advanced_connections", advanced->is_pressed());
popup_centered();
}
@@ -465,30 +521,32 @@ ConnectDialog::ConnectDialog() {
vbc_right->add_margin_child(TTR("Unbind Signal Arguments:"), unbind_count);
- HBoxContainer *dstm_hb = memnew(HBoxContainer);
- vbc_left->add_margin_child(TTR("Receiver Method:"), dstm_hb);
-
dst_method = memnew(LineEdit);
dst_method->set_h_size_flags(Control::SIZE_EXPAND_FILL);
dst_method->connect("text_submitted", callable_mp(this, &ConnectDialog::_text_submitted));
- dstm_hb->add_child(dst_method);
+ vbc_left->add_margin_child(TTR("Receiver Method:"), dst_method);
advanced = memnew(CheckButton);
- dstm_hb->add_child(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));
+ HBoxContainer *hbox = memnew(HBoxContainer);
+ vbc_right->add_child(hbox);
+
deferred = memnew(CheckBox);
deferred->set_h_size_flags(0);
deferred->set_text(TTR("Deferred"));
deferred->set_tooltip_text(TTR("Defers the signal, storing it in a queue and only firing it at idle time."));
- vbc_right->add_child(deferred);
+ hbox->add_child(deferred);
one_shot = memnew(CheckBox);
one_shot->set_h_size_flags(0);
- one_shot->set_text(TTR("Oneshot"));
+ one_shot->set_text(TTR("One Shot"));
one_shot->set_tooltip_text(TTR("Disconnects the signal after its first emission."));
- vbc_right->add_child(one_shot);
+ hbox->add_child(one_shot);
cdbinds = memnew(ConnectDialogBinds);
@@ -570,19 +628,19 @@ void ConnectionsDock::_make_or_edit_connection() {
// Conditions to add function: must have a script and must not have the method already
// (in the class, the script itself, or inherited).
bool add_script_function = false;
- Ref<Script> script = target->get_script();
- if (!target->get_script().is_null() && !ClassDB::has_method(target->get_class(), cd.method)) {
+ Ref<Script> scr = target->get_script();
+ if (!scr.is_null() && !ClassDB::has_method(target->get_class(), cd.method)) {
// There is a chance that the method is inherited from another script.
bool found_inherited_function = false;
- Ref<Script> inherited_script = script->get_base_script();
- while (!inherited_script.is_null()) {
- int line = inherited_script->get_language()->find_function(cd.method, inherited_script->get_source_code());
+ Ref<Script> inherited_scr = scr->get_base_script();
+ while (!inherited_scr.is_null()) {
+ int line = inherited_scr->get_language()->find_function(cd.method, inherited_scr->get_source_code());
if (line != -1) {
found_inherited_function = true;
break;
}
- inherited_script = inherited_script->get_base_script();
+ inherited_scr = inherited_scr->get_base_script();
}
add_script_function = !found_inherited_function;
@@ -627,6 +685,7 @@ void ConnectionsDock::_connect(ConnectDialog::ConnectionData p_cd) {
}
Callable callable = p_cd.get_callable();
+ 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);
@@ -647,6 +706,7 @@ void ConnectionsDock::_disconnect(TreeItem &p_item) {
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'"), cd.signal, cd.method));
Callable callable = cd.get_callable();
@@ -673,13 +733,16 @@ void ConnectionsDock::_disconnect_all() {
TreeItem *child = item->get_first_child();
String signal_name = item->get_metadata(0).operator Dictionary()["name"];
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Disconnect all from signal: '%s'"), signal_name));
while (child) {
Connection connection = child->get_metadata(0);
- 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);
+ 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);
+ }
child = child->get_next();
}
@@ -724,49 +787,27 @@ bool ConnectionsDock::_is_item_signal(TreeItem &p_item) {
return (p_item.get_parent() == tree->get_root() || p_item.get_parent()->get_parent() == tree->get_root());
}
+bool ConnectionsDock::_is_connection_inherited(Connection &p_connection) {
+ return bool(p_connection.flags & CONNECT_INHERITED);
+}
+
/*
* 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;
- String node_name = selected_node->get_name();
- for (int i = 0; i < node_name.length(); i++) { // TODO: Regex filter may be cleaner.
- char32_t c = node_name[i];
- if (!is_ascii_identifier_char(c)) {
- if (c == ' ') {
- // Replace spaces with underlines.
- c = '_';
- } else {
- // Remove any other characters.
- node_name.remove_at(i);
- i--;
- continue;
- }
- }
- node_name[i] = c;
- }
Node *dst_node = selected_node->get_owner() ? selected_node->get_owner() : selected_node;
if (!dst_node || dst_node->get_script().is_null()) {
dst_node = _find_first_script(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root());
}
- Dictionary subst;
- subst["NodeName"] = node_name.to_pascal_case();
- subst["nodeName"] = node_name.to_camel_case();
- subst["node_name"] = node_name.to_snake_case();
- subst["SignalName"] = signal_name.to_pascal_case();
- subst["signalName"] = signal_name.to_camel_case();
- subst["signal_name"] = signal_name.to_snake_case();
-
- String dst_method = String(EDITOR_GET("interface/editors/default_signal_callback_name")).format(subst);
-
ConnectDialog::ConnectionData cd;
cd.source = selected_node;
cd.signal = StringName(signal_name_ref);
cd.target = dst_node;
- cd.method = StringName(dst_method);
+ 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->set_title(TTR("Connect a Signal to a Method"));
@@ -803,14 +844,14 @@ void ConnectionsDock::_go_to_script(TreeItem &p_item) {
return;
}
- Ref<Script> script = cd.target->get_script();
+ Ref<Script> scr = cd.target->get_script();
- if (script.is_null()) {
+ if (scr.is_null()) {
return;
}
- if (script.is_valid() && ScriptEditor::get_singleton()->script_goto_method(script, cd.method)) {
- EditorNode::get_singleton()->call("_editor_select", EditorNode::EDITOR_SCRIPT);
+ if (scr.is_valid() && ScriptEditor::get_singleton()->script_goto_method(scr, cd.method)) {
+ EditorNode::get_singleton()->editor_select(EditorNode::EDITOR_SCRIPT);
}
}
@@ -836,6 +877,19 @@ void ConnectionsDock::_handle_signal_menu_option(int p_option) {
}
}
+void ConnectionsDock::_signal_menu_about_to_popup() {
+ TreeItem *signal_item = tree->get_selected();
+
+ bool disable_disconnect_all = true;
+ for (int i = 0; i < signal_item->get_child_count(); i++) {
+ if (!signal_item->get_child(i)->has_meta("_inherited_connection")) {
+ disable_disconnect_all = false;
+ }
+ }
+
+ signal_menu->set_item_disabled(slot_menu->get_item_index(DISCONNECT_ALL), disable_disconnect_all);
+}
+
void ConnectionsDock::_handle_slot_menu_option(int p_option) {
TreeItem *item = tree->get_selected();
@@ -858,6 +912,13 @@ void ConnectionsDock::_handle_slot_menu_option(int p_option) {
}
}
+void ConnectionsDock::_slot_menu_about_to_popup() {
+ bool connection_is_inherited = tree->get_selected()->has_meta("_inherited_connection");
+
+ slot_menu->set_item_disabled(slot_menu->get_item_index(EDIT), connection_is_inherited);
+ slot_menu->set_item_disabled(slot_menu->get_item_index(DISCONNECT), connection_is_inherited);
+}
+
void ConnectionsDock::_rmb_pressed(Vector2 p_position, MouseButton p_button) {
if (p_button != MouseButton::RIGHT) {
return;
@@ -918,10 +979,6 @@ void ConnectionsDock::_bind_methods() {
ClassDB::bind_method("update_tree", &ConnectionsDock::update_tree);
}
-void ConnectionsDock::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
void ConnectionsDock::set_node(Node *p_node) {
selected_node = p_node;
update_tree();
@@ -971,7 +1028,7 @@ void ConnectionsDock::update_tree() {
name = base;
}
- if (!icon.is_valid()) {
+ if (icon.is_null()) {
icon = get_theme_icon(SNAME("Object"), SNAME("EditorIcons"));
}
@@ -1064,10 +1121,10 @@ void ConnectionsDock::update_tree() {
}
// List existing connections.
- List<Object::Connection> connections;
- selected_node->get_signal_connection_list(signal_name, &connections);
+ List<Object::Connection> existing_connections;
+ selected_node->get_signal_connection_list(signal_name, &existing_connections);
- for (const Object::Connection &F : connections) {
+ for (const Object::Connection &F : existing_connections) {
Connection connection = F;
if (!(connection.flags & CONNECT_PERSIST)) {
continue;
@@ -1103,6 +1160,12 @@ void ConnectionsDock::update_tree() {
connection_item->set_text(0, path);
connection_item->set_metadata(0, connection);
connection_item->set_icon(0, get_theme_icon(SNAME("Slot"), SNAME("EditorIcons")));
+
+ if (_is_connection_inherited(connection)) {
+ // The scene inherits this connection.
+ connection_item->set_custom_color(0, get_theme_color(SNAME("warning_color"), SNAME("Editor")));
+ connection_item->set_meta("_inherited_connection", true);
+ }
}
}
@@ -1133,6 +1196,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);
@@ -1155,6 +1219,7 @@ ConnectionsDock::ConnectionsDock() {
signal_menu = memnew(PopupMenu);
add_child(signal_menu);
signal_menu->connect("id_pressed", callable_mp(this, &ConnectionsDock::_handle_signal_menu_option));
+ signal_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_signal_menu_about_to_popup));
signal_menu->add_item(TTR("Connect..."), CONNECT);
signal_menu->add_item(TTR("Disconnect All"), DISCONNECT_ALL);
signal_menu->add_item(TTR("Copy Name"), COPY_NAME);
@@ -1162,6 +1227,7 @@ ConnectionsDock::ConnectionsDock() {
slot_menu = memnew(PopupMenu);
add_child(slot_menu);
slot_menu->connect("id_pressed", callable_mp(this, &ConnectionsDock::_handle_slot_menu_option));
+ slot_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_slot_menu_about_to_popup));
slot_menu->add_item(TTR("Edit..."), EDIT);
slot_menu->add_item(TTR("Go to Method"), GO_TO_SCRIPT);
slot_menu->add_item(TTR("Disconnect"), DISCONNECT);
@@ -1174,6 +1240,7 @@ ConnectionsDock::ConnectionsDock() {
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 e37246e7a0..829a98caed 100644
--- a/editor/connections_dialog.h
+++ b/editor/connections_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* connections_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* connections_dialog.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 CONNECTIONS_DIALOG_H
#define CONNECTIONS_DIALOG_H
@@ -47,7 +47,6 @@
#include "scene/gui/tree.h"
class ConnectDialogBinds;
-class EditorUndoRedoManager;
class ConnectDialog : public ConfirmationDialog {
GDCLASS(ConnectDialog, ConfirmationDialog);
@@ -112,6 +111,7 @@ private:
LineEdit *dst_method = nullptr;
ConnectDialogBinds *cdbinds = nullptr;
bool edit_mode = false;
+ bool first_popup = true;
NodePath dst_path;
VBoxContainer *vbc_right = nullptr;
@@ -143,6 +143,7 @@ protected:
static void _bind_methods();
public:
+ static StringName generate_method_callback_name(Node *p_source, String p_signal_name, Node *p_target);
Node *get_source() const;
StringName get_signal_name() const;
NodePath get_dst_path() const;
@@ -195,7 +196,6 @@ class ConnectionsDock : public VBoxContainer {
Button *connect_button = nullptr;
PopupMenu *signal_menu = nullptr;
PopupMenu *slot_menu = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
LineEdit *search_box = nullptr;
HashMap<StringName, HashMap<StringName, String>> descr_cache;
@@ -210,13 +210,16 @@ class ConnectionsDock : public VBoxContainer {
void _tree_item_selected();
void _tree_item_activated();
bool _is_item_signal(TreeItem &p_item);
+ bool _is_connection_inherited(Connection &p_connection);
void _open_connection_dialog(TreeItem &p_item);
void _open_connection_dialog(ConnectDialog::ConnectionData p_cd);
void _go_to_script(TreeItem &p_item);
void _handle_signal_menu_option(int p_option);
+ void _signal_menu_about_to_popup();
void _handle_slot_menu_option(int p_option);
+ void _slot_menu_about_to_popup();
void _rmb_pressed(Vector2 p_position, MouseButton p_button);
void _close();
@@ -226,7 +229,6 @@ protected:
static void _bind_methods();
public:
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
void set_node(Node *p_node);
void update_tree();
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 3e72c6211d..0814d5b5ca 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* create_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* create_dialog.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 "create_dialog.h"
@@ -126,10 +126,6 @@ bool CreateDialog::_should_hide_type(const String &p_type) const {
return true; // Do not show editor nodes.
}
- if (p_type == base_type && !EditorNode::get_editor_data().get_custom_types().has(p_type)) {
- return true; // Root is already added.
- }
-
if (ClassDB::class_exists(p_type)) {
if (!ClassDB::can_instantiate(p_type) || ClassDB::is_virtual(p_type)) {
return true; // Can't create abstract or virtual class.
@@ -152,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))) {
@@ -217,18 +218,18 @@ void CreateDialog::_add_type(const String &p_type, const TypeCategory p_type_cat
inherited_type = TypeCategory::CPP_TYPE;
} else if (p_type_category == TypeCategory::PATH_TYPE) {
ERR_FAIL_COND(!ResourceLoader::exists(p_type, "Script"));
- Ref<Script> script = ResourceLoader::load(p_type, "Script");
- ERR_FAIL_COND(script.is_null());
+ Ref<Script> scr = ResourceLoader::load(p_type, "Script");
+ ERR_FAIL_COND(scr.is_null());
- Ref<Script> base = script->get_base_script();
+ Ref<Script> base = scr->get_base_script();
if (base.is_null()) {
String extends;
- script->get_language()->get_global_class_name(script->get_path(), &extends);
+ scr->get_language()->get_global_class_name(scr->get_path(), &extends);
inherits = extends;
inherited_type = TypeCategory::CPP_TYPE;
} else {
- inherits = script->get_language()->get_global_class_name(base->get_path());
+ inherits = scr->get_language()->get_global_class_name(base->get_path());
if (inherits.is_empty()) {
inherits = base->get_path();
inherited_type = TypeCategory::PATH_TYPE;
@@ -236,18 +237,18 @@ void CreateDialog::_add_type(const String &p_type, const TypeCategory p_type_cat
}
} else {
if (ScriptServer::is_global_class(p_type)) {
- Ref<Script> script = EditorNode::get_editor_data().script_class_load_script(p_type);
- ERR_FAIL_COND(script.is_null());
+ Ref<Script> scr = EditorNode::get_editor_data().script_class_load_script(p_type);
+ ERR_FAIL_COND(scr.is_null());
- Ref<Script> base = script->get_base_script();
+ Ref<Script> base = scr->get_base_script();
if (base.is_null()) {
String extends;
- script->get_language()->get_global_class_name(script->get_path(), &extends);
+ scr->get_language()->get_global_class_name(scr->get_path(), &extends);
inherits = extends;
inherited_type = TypeCategory::CPP_TYPE;
} else {
- inherits = script->get_language()->get_global_class_name(base->get_path());
+ inherits = scr->get_language()->get_global_class_name(base->get_path());
if (inherits.is_empty()) {
inherits = base->get_path();
inherited_type = TypeCategory::PATH_TYPE;
@@ -279,7 +280,8 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String
r_item->set_text(0, "\"" + p_type + "\"");
} else if (script_type) {
r_item->set_metadata(0, p_type);
- r_item->set_text(0, p_type + " (" + ScriptServer::get_global_class_path(p_type).get_file() + ")");
+ r_item->set_text(0, p_type);
+ r_item->set_suffix(0, "(" + ScriptServer::get_global_class_path(p_type).get_file() + ")");
} else {
r_item->set_metadata(0, custom_type_parents[p_type]);
r_item->set_text(0, p_type);
@@ -287,13 +289,14 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String
bool can_instantiate = (p_type_category == TypeCategory::CPP_TYPE && ClassDB::can_instantiate(p_type)) ||
p_type_category == TypeCategory::OTHER_TYPE;
+ bool is_virtual = ClassDB::class_exists(p_type) && ClassDB::is_virtual(p_type);
- if (!can_instantiate) {
- r_item->set_custom_color(0, search_options->get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
+ if (can_instantiate && !is_virtual) {
+ r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, icon_fallback));
+ } else {
r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, "NodeDisabled"));
+ r_item->set_custom_color(0, search_options->get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
r_item->set_selectable(0, false);
- } else {
- r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, icon_fallback));
}
bool is_deprecated = EditorHelp::get_doc_data()->class_list[p_type].is_deprecated;
@@ -311,7 +314,7 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String
// Don't collapse the root node or an abstract node on the first tree level.
bool should_collapse = p_type != base_type && (r_item->get_parent()->get_text(0) != base_type || can_instantiate);
- if (should_collapse && bool(EditorSettings::get_singleton()->get("docks/scene_tree/start_create_dialog_fully_expanded"))) {
+ if (should_collapse && bool(EDITOR_GET("docks/scene_tree/start_create_dialog_fully_expanded"))) {
should_collapse = false; // Collapse all nodes anyway.
}
r_item->set_collapsed(should_collapse);
@@ -343,6 +346,11 @@ String CreateDialog::_top_result(const Vector<String> p_candidates, const String
}
float CreateDialog::_score_type(const String &p_type, const String &p_search) const {
+ if (p_type == p_search) {
+ // Always favor an exact match (case-sensitive), since clicking a favorite will set the search text to the type.
+ return 1.0f;
+ }
+
float inverse_length = 1.f / float(p_type.length());
// Favor types where search term is a substring close to the start of the type.
@@ -351,13 +359,13 @@ float CreateDialog::_score_type(const String &p_type, const String &p_search) co
float score = (pos > -1) ? 1.0f - w * MIN(1, 3 * pos * inverse_length) : MAX(0.f, .9f - w);
// Favor shorter items: they resemble the search term more.
- w = 0.1f;
- score *= (1 - w) + w * (p_search.length() * inverse_length);
+ w = 0.9f;
+ score *= (1 - w) + w * MIN(1.0f, p_search.length() * inverse_length);
- score *= _is_type_preferred(p_type) ? 1.0f : 0.8f;
+ score *= _is_type_preferred(p_type) ? 1.0f : 0.9f;
// Add score for being a favorite type.
- score *= (favorite_list.find(p_type) > -1) ? 1.0f : 0.7f;
+ score *= (favorite_list.find(p_type) > -1) ? 1.0f : 0.8f;
// Look through at most 5 recent items
bool in_recent = false;
@@ -367,7 +375,7 @@ float CreateDialog::_score_type(const String &p_type, const String &p_search) co
break;
}
}
- score *= in_recent ? 1.0f : 0.8f;
+ score *= in_recent ? 1.0f : 0.9f;
return score;
}
@@ -500,7 +508,7 @@ String CreateDialog::get_selected_type() {
return selected->get_text(0);
}
-Variant CreateDialog::instance_selected() {
+Variant CreateDialog::instantiate_selected() {
TreeItem *selected = search_options->get_selected();
if (!selected) {
@@ -518,7 +526,7 @@ Variant CreateDialog::instance_selected() {
n->set_name(custom);
}
} else {
- obj = EditorNode::get_editor_data().instance_custom_type(selected->get_text(0), custom);
+ obj = EditorNode::get_editor_data().instantiate_custom_type(selected->get_text(0), custom);
}
} else {
obj = ClassDB::instantiate(selected->get_text(0));
@@ -716,12 +724,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"));
}
@@ -751,10 +753,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);
-#ifndef _MSC_VER
-#warning cannot forward drag data to a non control, must be fixed
-#endif
- //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 f2e741624f..ad63346a02 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* create_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* create_dialog.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 CREATE_DIALOG_H
#define CREATE_DIALOG_H
@@ -110,7 +110,7 @@ protected:
void _save_and_update_favorite_list();
public:
- Variant instance_selected();
+ Variant instantiate_selected();
String get_selected_type();
void set_base_type(const String &p_base) { base_type = p_base; }
diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.cpp b/editor/debugger/debug_adapter/debug_adapter_parser.cpp
index ac41306cde..fc806ded5e 100644
--- a/editor/debugger/debug_adapter/debug_adapter_parser.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_parser.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* debug_adapter_parser.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* debug_adapter_parser.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 "debug_adapter_parser.h"
@@ -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/debug_adapter/debug_adapter_parser.h b/editor/debugger/debug_adapter/debug_adapter_parser.h
index ee32306146..eb5255dc78 100644
--- a/editor/debugger/debug_adapter/debug_adapter_parser.h
+++ b/editor/debugger/debug_adapter/debug_adapter_parser.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* debug_adapter_parser.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* debug_adapter_parser.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 DEBUG_ADAPTER_PARSER_H
#define DEBUG_ADAPTER_PARSER_H
diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
index 4c445eb766..e5f74762f6 100644
--- a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* debug_adapter_protocol.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* debug_adapter_protocol.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 "debug_adapter_protocol.h"
@@ -656,7 +656,7 @@ int DebugAdapterProtocol::parse_variant(const Variant &p_var) {
bool DebugAdapterProtocol::process_message(const String &p_text) {
JSON json;
- ERR_FAIL_COND_V_MSG(json.parse(p_text) != OK, true, "Mal-formed message!");
+ ERR_FAIL_COND_V_MSG(json.parse(p_text) != OK, true, "Malformed message!");
Dictionary params = json.get_data();
bool completed = true;
@@ -921,11 +921,11 @@ void DebugAdapterProtocol::on_debug_stack_frame_vars(const int &p_size) {
ERR_FAIL_COND(!stackframe_list.has(frame));
List<int> scope_ids = stackframe_list.find(frame)->value;
for (List<int>::Element *E = scope_ids.front(); E; E = E->next()) {
- int variable_id = E->get();
- if (variable_list.has(variable_id)) {
- variable_list.find(variable_id)->value.clear();
+ int var_id = E->get();
+ if (variable_list.has(var_id)) {
+ variable_list.find(var_id)->value.clear();
} else {
- variable_list.insert(variable_id, Array());
+ variable_list.insert(var_id, Array());
}
}
}
@@ -941,7 +941,7 @@ void DebugAdapterProtocol::on_debug_stack_frame_var(const Array &p_data) {
List<int> scope_ids = stackframe_list.find(frame)->value;
ERR_FAIL_COND(scope_ids.size() != 3);
ERR_FAIL_INDEX(stack_var.type, 3);
- int variable_id = scope_ids[stack_var.type];
+ int var_id = scope_ids[stack_var.type];
DAP::Variable variable;
@@ -950,7 +950,7 @@ void DebugAdapterProtocol::on_debug_stack_frame_var(const Array &p_data) {
variable.type = Variant::get_type_name(stack_var.value.get_type());
variable.variablesReference = parse_variant(stack_var.value);
- variable_list.find(variable_id)->value.push_back(variable.to_json());
+ variable_list.find(var_id)->value.push_back(variable.to_json());
_remaining_vars--;
}
diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.h b/editor/debugger/debug_adapter/debug_adapter_protocol.h
index 29f577ef97..ddc55816db 100644
--- a/editor/debugger/debug_adapter/debug_adapter_protocol.h
+++ b/editor/debugger/debug_adapter/debug_adapter_protocol.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* debug_adapter_protocol.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* debug_adapter_protocol.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 DEBUG_ADAPTER_PROTOCOL_H
#define DEBUG_ADAPTER_PROTOCOL_H
diff --git a/editor/debugger/debug_adapter/debug_adapter_server.cpp b/editor/debugger/debug_adapter/debug_adapter_server.cpp
index 41e6b1f308..9cecc4bb08 100644
--- a/editor/debugger/debug_adapter/debug_adapter_server.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_server.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* debug_adapter_server.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* debug_adapter_server.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 "debug_adapter_server.h"
@@ -62,12 +62,12 @@ void DebugAdapterServer::_notification(int p_what) {
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- protocol._request_timeout = EditorSettings::get_singleton()->get("network/debug_adapter/request_timeout");
- protocol._sync_breakpoints = EditorSettings::get_singleton()->get("network/debug_adapter/sync_breakpoints");
- int remote_port = (int)_EDITOR_GET("network/debug_adapter/remote_port");
- if (remote_port != this->remote_port) {
- this->stop();
- this->start();
+ protocol._request_timeout = EDITOR_GET("network/debug_adapter/request_timeout");
+ protocol._sync_breakpoints = EDITOR_GET("network/debug_adapter/sync_breakpoints");
+ int port = (int)_EDITOR_GET("network/debug_adapter/remote_port");
+ if (port != remote_port) {
+ stop();
+ start();
}
} break;
}
diff --git a/editor/debugger/debug_adapter/debug_adapter_server.h b/editor/debugger/debug_adapter/debug_adapter_server.h
index 633739eaae..c834ab2182 100644
--- a/editor/debugger/debug_adapter/debug_adapter_server.h
+++ b/editor/debugger/debug_adapter/debug_adapter_server.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* debug_adapter_server.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* debug_adapter_server.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 DEBUG_ADAPTER_SERVER_H
#define DEBUG_ADAPTER_SERVER_H
diff --git a/editor/debugger/debug_adapter/debug_adapter_types.h b/editor/debugger/debug_adapter/debug_adapter_types.h
index eb10184ab3..c776a92df7 100644
--- a/editor/debugger/debug_adapter/debug_adapter_types.h
+++ b/editor/debugger/debug_adapter/debug_adapter_types.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* debug_adapter_types.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* debug_adapter_types.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 DEBUG_ADAPTER_TYPES_H
#define DEBUG_ADAPTER_TYPES_H
diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp
index 7ea6cedd2b..e083e1746d 100644
--- a/editor/debugger/editor_debugger_inspector.cpp
+++ b/editor/debugger/editor_debugger_inspector.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_debugger_inspector.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_debugger_inspector.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 "editor_debugger_inspector.h"
@@ -166,11 +166,11 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) {
if (pinfo.hint_string == "Script") {
if (debug_obj->get_script() != var) {
debug_obj->set_script(Ref<RefCounted>());
- Ref<Script> script(var);
- if (!script.is_null()) {
- ScriptInstance *script_instance = script->placeholder_instance_create(debug_obj);
- if (script_instance) {
- debug_obj->set_script_and_instance(var, script_instance);
+ Ref<Script> scr(var);
+ if (!scr.is_null()) {
+ ScriptInstance *scr_instance = scr->placeholder_instance_create(debug_obj);
+ if (scr_instance) {
+ debug_obj->set_script_and_instance(var, scr_instance);
}
}
}
@@ -230,7 +230,7 @@ void EditorDebuggerInspector::add_stack_variable(const Array &p_array) {
Variant v = var.value;
PropertyHint h = PROPERTY_HINT_NONE;
- String hs = String();
+ String hs;
if (v.get_type() == Variant::OBJECT) {
v = Object::cast_to<EncodedObjectAsID>(v)->get_object_id();
diff --git a/editor/debugger/editor_debugger_inspector.h b/editor/debugger/editor_debugger_inspector.h
index d835f5fa42..73dd773750 100644
--- a/editor/debugger/editor_debugger_inspector.h
+++ b/editor/debugger/editor_debugger_inspector.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_debugger_inspector.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_debugger_inspector.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 EDITOR_DEBUGGER_INSPECTOR_H
#define EDITOR_DEBUGGER_INSPECTOR_H
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
index 9fd7fa578f..a368cacf56 100644
--- a/editor/debugger/editor_debugger_node.cpp
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_debugger_node.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_debugger_node.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 "editor_debugger_node.h"
@@ -35,6 +35,9 @@
#include "editor/debugger/script_editor_debugger.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
+#include "editor/inspector_dock.h"
#include "editor/plugins/editor_debugger_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/scene_tree_dock.h"
@@ -77,6 +80,7 @@ EditorDebuggerNode::EditorDebuggerNode() {
remote_scene_tree = memnew(EditorDebuggerTree);
remote_scene_tree->connect("object_selected", callable_mp(this, &EditorDebuggerNode::_remote_object_requested));
remote_scene_tree->connect("save_node", callable_mp(this, &EditorDebuggerNode::_save_node_requested));
+ remote_scene_tree->connect("button_clicked", callable_mp(this, &EditorDebuggerNode::_remote_tree_button_pressed));
SceneTreeDock::get_singleton()->add_remote_tree_editor(remote_scene_tree);
SceneTreeDock::get_singleton()->connect("remote_tree_selected", callable_mp(this, &EditorDebuggerNode::request_remote_tree));
@@ -118,8 +122,8 @@ ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() {
}
if (!debugger_plugins.is_empty()) {
- for (const Ref<Script> &i : debugger_plugins) {
- node->add_debugger_plugin(i);
+ for (Ref<EditorDebuggerPlugin> plugin : debugger_plugins) {
+ plugin->create_session(node);
}
}
@@ -166,7 +170,7 @@ void EditorDebuggerNode::_text_editor_stack_goto(const ScriptEditorDebugger *p_d
void EditorDebuggerNode::_bind_methods() {
// LiveDebug.
ClassDB::bind_method("live_debug_create_node", &EditorDebuggerNode::live_debug_create_node);
- ClassDB::bind_method("live_debug_instance_node", &EditorDebuggerNode::live_debug_instance_node);
+ ClassDB::bind_method("live_debug_instantiate_node", &EditorDebuggerNode::live_debug_instantiate_node);
ClassDB::bind_method("live_debug_remove_node", &EditorDebuggerNode::live_debug_remove_node);
ClassDB::bind_method("live_debug_remove_and_keep_node", &EditorDebuggerNode::live_debug_remove_and_keep_node);
ClassDB::bind_method("live_debug_restore_node", &EditorDebuggerNode::live_debug_restore_node);
@@ -206,9 +210,32 @@ String EditorDebuggerNode::get_server_uri() const {
return server->get_uri();
}
+void EditorDebuggerNode::set_keep_open(bool p_keep_open) {
+ keep_open = p_keep_open;
+ if (keep_open) {
+ if (server.is_null() || !server->is_active()) {
+ start();
+ }
+ } else {
+ bool found = false;
+ _for_all(tabs, [&](ScriptEditorDebugger *p_debugger) {
+ if (p_debugger->is_session_active()) {
+ found = true;
+ }
+ });
+ if (!found) {
+ stop();
+ }
+ }
+}
+
Error EditorDebuggerNode::start(const String &p_uri) {
- stop();
ERR_FAIL_COND_V(p_uri.find("://") < 0, ERR_INVALID_PARAMETER);
+ if (keep_open && current_uri == p_uri && server.is_valid()) {
+ return OK;
+ }
+ stop(true);
+ current_uri = p_uri;
if (EDITOR_GET("run/output/always_open_output_on_play")) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log());
} else {
@@ -224,10 +251,20 @@ Error EditorDebuggerNode::start(const String &p_uri) {
return OK;
}
-void EditorDebuggerNode::stop() {
+void EditorDebuggerNode::stop(bool p_force) {
+ if (keep_open && !p_force) {
+ return;
+ }
+ current_uri.clear();
if (server.is_valid()) {
server->stop();
EditorNode::get_log()->add_message("--- Debugging process stopped ---", EditorLog::MSG_TYPE_EDITOR);
+
+ if (EditorNode::get_singleton()->is_movie_maker_enabled()) {
+ // Request attention in case the user was doing something else when movie recording is finished.
+ DisplayServer::get_singleton()->window_request_attention();
+ }
+
server.unref();
}
// Also close all debugging sessions.
@@ -237,12 +274,8 @@ void EditorDebuggerNode::stop() {
}
});
_break_state_changed();
- if (hide_on_stop) {
- if (is_visible_in_tree()) {
- EditorNode::get_singleton()->hide_bottom_panel();
- }
- }
breakpoints.clear();
+ EditorUndoRedoManager::get_singleton()->clear_history(false, EditorUndoRedoManager::REMOTE_HISTORY);
set_process(false);
}
@@ -277,7 +310,7 @@ void EditorDebuggerNode::_notification(int p_what) {
// Remote scene tree update
remote_scene_tree_timeout -= get_process_delta_time();
if (remote_scene_tree_timeout < 0) {
- remote_scene_tree_timeout = EditorSettings::get_singleton()->get("debugger/remote_scene_tree_refresh_interval");
+ remote_scene_tree_timeout = EDITOR_GET("debugger/remote_scene_tree_refresh_interval");
if (remote_scene_tree->is_visible_in_tree()) {
get_current_debugger()->request_remote_tree();
}
@@ -286,7 +319,7 @@ void EditorDebuggerNode::_notification(int p_what) {
// Remote inspector update
inspect_edited_object_timeout -= get_process_delta_time();
if (inspect_edited_object_timeout < 0) {
- inspect_edited_object_timeout = EditorSettings::get_singleton()->get("debugger/remote_inspect_refresh_interval");
+ inspect_edited_object_timeout = EDITOR_GET("debugger/remote_inspect_refresh_interval");
if (EditorDebuggerRemoteObject *obj = get_inspected_remote_object()) {
get_current_debugger()->request_remote_object(obj->remote_object_id);
}
@@ -313,7 +346,7 @@ void EditorDebuggerNode::_notification(int p_what) {
EditorNode::get_singleton()->get_pause_button()->set_disabled(false);
// Switch to remote tree view if so desired.
- auto_switch_remote_scene_tree = (bool)EditorSettings::get_singleton()->get("debugger/auto_switch_to_remote_scene_tree");
+ auto_switch_remote_scene_tree = (bool)EDITOR_GET("debugger/auto_switch_to_remote_scene_tree");
if (auto_switch_remote_scene_tree) {
SceneTreeDock::get_singleton()->show_remote_tree();
}
@@ -421,7 +454,6 @@ void EditorDebuggerNode::set_script_debug_button(MenuButton *p_button) {
p->add_shortcut(ED_GET_SHORTCUT("debugger/break"), DEBUG_BREAK);
p->add_shortcut(ED_GET_SHORTCUT("debugger/continue"), DEBUG_CONTINUE);
p->add_separator();
- p->add_check_shortcut(ED_GET_SHORTCUT("debugger/keep_debugger_open"), DEBUG_KEEP_DEBUGGER_OPEN);
p->add_check_shortcut(ED_GET_SHORTCUT("debugger/debug_with_external_editor"), DEBUG_WITH_EXTERNAL_EDITOR);
p->connect("id_pressed", callable_mp(this, &EditorDebuggerNode::_menu_option));
@@ -461,12 +493,6 @@ void EditorDebuggerNode::_menu_option(int p_id) {
case DEBUG_CONTINUE: {
debug_continue();
} break;
- case DEBUG_KEEP_DEBUGGER_OPEN: {
- bool ischecked = script_menu->get_popup()->is_item_checked(script_menu->get_popup()->get_item_index(DEBUG_KEEP_DEBUGGER_OPEN));
- hide_on_stop = ischecked;
- script_menu->get_popup()->set_item_checked(script_menu->get_popup()->get_item_index(DEBUG_KEEP_DEBUGGER_OPEN), !ischecked);
- EditorSettings::get_singleton()->set_project_metadata("debug_options", "keep_debugger_open", !ischecked);
- } break;
case DEBUG_WITH_EXTERNAL_EDITOR: {
bool ischecked = script_menu->get_popup()->is_item_checked(script_menu->get_popup()->get_item_index(DEBUG_WITH_EXTERNAL_EDITOR));
debug_with_external_editor = !ischecked;
@@ -477,13 +503,7 @@ void EditorDebuggerNode::_menu_option(int p_id) {
}
void EditorDebuggerNode::_update_debug_options() {
- bool keep_debugger_open = EditorSettings::get_singleton()->get_project_metadata("debug_options", "keep_debugger_open", false);
- bool debug_with_external_editor = EditorSettings::get_singleton()->get_project_metadata("debug_options", "debug_with_external_editor", false);
-
- if (keep_debugger_open) {
- _menu_option(DEBUG_KEEP_DEBUGGER_OPEN);
- }
- if (debug_with_external_editor) {
+ if (EditorSettings::get_singleton()->get_project_metadata("debug_options", "debug_with_external_editor", false).operator bool()) {
_menu_option(DEBUG_WITH_EXTERNAL_EDITOR);
}
}
@@ -576,6 +596,24 @@ void EditorDebuggerNode::_remote_tree_updated(int p_debugger) {
remote_scene_tree->update_scene_tree(get_current_debugger()->get_remote_tree(), p_debugger);
}
+void EditorDebuggerNode::_remote_tree_button_pressed(Object *p_item, int p_column, int p_id, MouseButton p_button) {
+ if (p_button != MouseButton::LEFT) {
+ return;
+ }
+
+ TreeItem *item = Object::cast_to<TreeItem>(p_item);
+ ERR_FAIL_COND(!item);
+
+ if (p_id == EditorDebuggerTree::BUTTON_SUBSCENE) {
+ remote_scene_tree->emit_signal(SNAME("open"), item->get_meta("scene_file_path"));
+ } else if (p_id == EditorDebuggerTree::BUTTON_VISIBILITY) {
+ ObjectID obj_id = item->get_metadata(0);
+ ERR_FAIL_COND(obj_id.is_null());
+ get_current_debugger()->update_remote_object(obj_id, "visible", !item->get_meta("visible"));
+ get_current_debugger()->request_remote_tree();
+ }
+}
+
void EditorDebuggerNode::_remote_object_updated(ObjectID p_id, int p_debugger) {
if (p_debugger != tabs->get_current_tab()) {
return;
@@ -654,9 +692,9 @@ void EditorDebuggerNode::live_debug_create_node(const NodePath &p_parent, const
});
}
-void EditorDebuggerNode::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
+void EditorDebuggerNode::live_debug_instantiate_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
- dbg->live_debug_instance_node(p_parent, p_path, p_name);
+ dbg->live_debug_instantiate_node(p_parent, p_path, p_name);
});
}
@@ -701,22 +739,36 @@ EditorDebuggerNode::CameraOverride EditorDebuggerNode::get_camera_override() {
return camera_override;
}
-void EditorDebuggerNode::add_debugger_plugin(const Ref<Script> &p_script) {
- ERR_FAIL_COND_MSG(debugger_plugins.has(p_script), "Debugger plugin already exists.");
- ERR_FAIL_COND_MSG(p_script.is_null(), "Debugger plugin script is null");
- ERR_FAIL_COND_MSG(p_script->get_instance_base_type() == StringName(), "Debugger plugin script has error.");
- ERR_FAIL_COND_MSG(String(p_script->get_instance_base_type()) != "EditorDebuggerPlugin", "Base type of debugger plugin is not 'EditorDebuggerPlugin'.");
- ERR_FAIL_COND_MSG(!p_script->is_tool(), "Debugger plugin script is not in tool mode.");
- debugger_plugins.insert(p_script);
+void EditorDebuggerNode::add_debugger_plugin(const Ref<EditorDebuggerPlugin> &p_plugin) {
+ ERR_FAIL_COND_MSG(p_plugin.is_null(), "Debugger plugin is null.");
+ ERR_FAIL_COND_MSG(debugger_plugins.has(p_plugin), "Debugger plugin already exists.");
+ debugger_plugins.insert(p_plugin);
+
+ Ref<EditorDebuggerPlugin> plugin = p_plugin;
for (int i = 0; get_debugger(i); i++) {
- get_debugger(i)->add_debugger_plugin(p_script);
+ plugin->create_session(get_debugger(i));
}
}
-void EditorDebuggerNode::remove_debugger_plugin(const Ref<Script> &p_script) {
- ERR_FAIL_COND_MSG(!debugger_plugins.has(p_script), "Debugger plugin doesn't exists.");
- debugger_plugins.erase(p_script);
- for (int i = 0; get_debugger(i); i++) {
- get_debugger(i)->remove_debugger_plugin(p_script);
+void EditorDebuggerNode::remove_debugger_plugin(const Ref<EditorDebuggerPlugin> &p_plugin) {
+ ERR_FAIL_COND_MSG(p_plugin.is_null(), "Debugger plugin is null.");
+ ERR_FAIL_COND_MSG(!debugger_plugins.has(p_plugin), "Debugger plugin doesn't exists.");
+ debugger_plugins.erase(p_plugin);
+ Ref<EditorDebuggerPlugin>(p_plugin)->clear();
+}
+
+bool EditorDebuggerNode::plugins_capture(ScriptEditorDebugger *p_debugger, const String &p_message, const Array &p_data) {
+ int session_index = tabs->get_tab_idx_from_control(p_debugger);
+ ERR_FAIL_COND_V(session_index < 0, false);
+ int colon_index = p_message.find_char(':');
+ ERR_FAIL_COND_V_MSG(colon_index < 1, false, "Invalid message received.");
+
+ const String cap = p_message.substr(0, colon_index);
+ bool parsed = false;
+ for (Ref<EditorDebuggerPlugin> plugin : debugger_plugins) {
+ if (plugin->has_capture(cap)) {
+ parsed |= plugin->capture(p_message, p_data, session_index);
+ }
}
+ return parsed;
}
diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h
index e79e60b180..e855fa6ee0 100644
--- a/editor/debugger/editor_debugger_node.h
+++ b/editor/debugger/editor_debugger_node.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_debugger_node.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_debugger_node.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 EDITOR_DEBUGGER_NODE_H
#define EDITOR_DEBUGGER_NODE_H
@@ -36,6 +36,7 @@
class Button;
class DebugAdapterParser;
+class EditorDebuggerPlugin;
class EditorDebuggerTree;
class EditorDebuggerRemoteObject;
class MenuButton;
@@ -62,7 +63,6 @@ private:
DEBUG_STEP,
DEBUG_BREAK,
DEBUG_CONTINUE,
- DEBUG_KEEP_DEBUGGER_OPEN,
DEBUG_WITH_EXTERNAL_EDITOR,
};
@@ -109,11 +109,13 @@ private:
float remote_scene_tree_timeout = 0.0;
bool auto_switch_remote_scene_tree = false;
bool debug_with_external_editor = false;
- bool hide_on_stop = true;
+ bool keep_open = false;
+ String current_uri;
+
CameraOverride camera_override = OVERRIDE_NONE;
HashMap<Breakpoint, bool, Breakpoint> breakpoints;
- HashSet<Ref<Script>> debugger_plugins;
+ HashSet<Ref<EditorDebuggerPlugin>> debugger_plugins;
ScriptEditorDebugger *_add_debugger();
EditorDebuggerRemoteObject *get_inspected_remote_object();
@@ -129,6 +131,7 @@ protected:
void _debugger_wants_stop(int p_id);
void _debugger_changed(int p_tab);
void _remote_tree_updated(int p_debugger);
+ void _remote_tree_button_pressed(Object *p_item, int p_column, int p_id, MouseButton p_button);
void _remote_object_updated(ObjectID p_id, int p_debugger);
void _remote_object_property_updated(ObjectID p_id, const String &p_property, int p_debugger);
void _remote_object_requested(ObjectID p_id, int p_debugger);
@@ -189,7 +192,7 @@ public:
void set_live_debugging(bool p_enabled);
void update_live_edit_root();
void live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name);
- void live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name);
+ void live_debug_instantiate_node(const NodePath &p_parent, const String &p_path, const String &p_name);
void live_debug_remove_node(const NodePath &p_at);
void live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id);
void live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos);
@@ -201,11 +204,13 @@ public:
String get_server_uri() const;
+ void set_keep_open(bool p_keep_open);
Error start(const String &p_uri = "tcp://");
- void stop();
+ void stop(bool p_force = false);
- void add_debugger_plugin(const Ref<Script> &p_script);
- void remove_debugger_plugin(const Ref<Script> &p_script);
+ bool plugins_capture(ScriptEditorDebugger *p_debugger, const String &p_message, const Array &p_data);
+ void add_debugger_plugin(const Ref<EditorDebuggerPlugin> &p_plugin);
+ void remove_debugger_plugin(const Ref<EditorDebuggerPlugin> &p_plugin);
};
#endif // EDITOR_DEBUGGER_NODE_H
diff --git a/editor/debugger/editor_debugger_server.cpp b/editor/debugger/editor_debugger_server.cpp
index 63390825c6..c0efc6a1fc 100644
--- a/editor/debugger/editor_debugger_server.cpp
+++ b/editor/debugger/editor_debugger_server.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_debugger_server.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_debugger_server.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 "editor_debugger_server.h"
@@ -72,8 +72,8 @@ String EditorDebuggerServerTCP::get_uri() const {
Error EditorDebuggerServerTCP::start(const String &p_uri) {
// Default host and port
- String bind_host = (String)EditorSettings::get_singleton()->get("network/debug/remote_host");
- int bind_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
+ String bind_host = (String)EDITOR_GET("network/debug/remote_host");
+ int bind_port = (int)EDITOR_GET("network/debug/remote_port");
// Optionally override
if (!p_uri.is_empty() && p_uri != "tcp://") {
diff --git a/editor/debugger/editor_debugger_server.h b/editor/debugger/editor_debugger_server.h
index f3805f54d8..e171f0fdaf 100644
--- a/editor/debugger/editor_debugger_server.h
+++ b/editor/debugger/editor_debugger_server.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_debugger_server.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_debugger_server.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 EDITOR_DEBUGGER_SERVER_H
#define EDITOR_DEBUGGER_SERVER_H
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp
index 76efcd7190..c67ac69946 100644
--- a/editor/debugger/editor_debugger_tree.cpp
+++ b/editor/debugger/editor_debugger_tree.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_debugger_tree.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_debugger_tree.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 "editor_debugger_tree.h"
@@ -34,6 +34,7 @@
#include "editor/editor_node.h"
#include "editor/scene_tree_dock.h"
#include "scene/debugger/scene_debugger.h"
+#include "scene/gui/texture_rect.h"
#include "scene/resources/packed_scene.h"
#include "servers/display_server.h"
@@ -65,6 +66,7 @@ void EditorDebuggerTree::_notification(int p_what) {
void EditorDebuggerTree::_bind_methods() {
ADD_SIGNAL(MethodInfo("object_selected", PropertyInfo(Variant::INT, "object_id"), PropertyInfo(Variant::INT, "debugger")));
ADD_SIGNAL(MethodInfo("save_node", PropertyInfo(Variant::INT, "object_id"), PropertyInfo(Variant::STRING, "filename"), PropertyInfo(Variant::INT, "debugger")));
+ ADD_SIGNAL(MethodInfo("open"));
}
void EditorDebuggerTree::_scene_tree_selected() {
@@ -116,6 +118,7 @@ void EditorDebuggerTree::_scene_tree_rmb_selected(const Vector2 &p_position, Mou
item_menu->add_icon_item(get_theme_icon(SNAME("CreateNewSceneFrom"), SNAME("EditorIcons")), TTR("Save Branch as Scene"), ITEM_MENU_SAVE_REMOTE_NODE);
item_menu->add_icon_item(get_theme_icon(SNAME("CopyNodePath"), SNAME("EditorIcons")), TTR("Copy Node Path"), ITEM_MENU_COPY_NODE_PATH);
item_menu->set_position(get_screen_position() + get_local_mouse_position());
+ item_menu->reset_size();
item_menu->popup();
}
@@ -155,14 +158,18 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
const SceneDebuggerTree::RemoteNode &node = p_tree->nodes[i];
TreeItem *item = create_item(parent);
item->set_text(0, node.name);
- item->set_tooltip_text(0, TTR("Type:") + " " + node.type_name);
+ if (node.scene_file_path.is_empty()) {
+ item->set_tooltip_text(0, node.name + "\n" + TTR("Type:") + " " + node.type_name);
+ } else {
+ item->set_tooltip_text(0, node.name + "\n" + TTR("Instance:") + " " + node.scene_file_path + "\n" + TTR("Type:") + " " + node.type_name);
+ }
Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(node.type_name, "");
if (icon.is_valid()) {
item->set_icon(0, icon);
}
item->set_metadata(0, node.id);
- // Set current item as collapsed if necessary (root is never collapsed)
+ // Set current item as collapsed if necessary (root is never collapsed).
if (parent) {
if (!unfold_cache.has(node.id)) {
item->set_collapsed(true);
@@ -178,7 +185,7 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
}
} else { // Must use path
if (last_path == _get_path(item)) {
- updating_scene_tree = false; // Force emission of new selection
+ updating_scene_tree = false; // Force emission of new selection.
item->select(0);
if (filter_changed) {
scroll_item = item;
@@ -187,6 +194,33 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
}
}
+ // Add buttons.
+ const Color remote_button_color = Color(1, 1, 1, 0.8);
+ if (!node.scene_file_path.is_empty()) {
+ String node_scene_file_path = node.scene_file_path;
+ Ref<Texture2D> button_icon = get_theme_icon(SNAME("InstanceOptions"), SNAME("EditorIcons"));
+ String tooltip = vformat(TTR("This node has been instantiated from a PackedScene file:\n%s\nClick to open the original file in the Editor."), node_scene_file_path);
+
+ item->set_meta("scene_file_path", node_scene_file_path);
+ item->add_button(0, button_icon, BUTTON_SUBSCENE, false, tooltip);
+ item->set_button_color(0, item->get_button_count(0) - 1, remote_button_color);
+ }
+
+ if (node.view_flags & SceneDebuggerTree::RemoteNode::VIEW_HAS_VISIBLE_METHOD) {
+ bool node_visible = node.view_flags & SceneDebuggerTree::RemoteNode::VIEW_VISIBLE;
+ bool node_visible_in_tree = node.view_flags & SceneDebuggerTree::RemoteNode::VIEW_VISIBLE_IN_TREE;
+ Ref<Texture2D> button_icon = get_theme_icon(node_visible ? SNAME("GuiVisibilityVisible") : SNAME("GuiVisibilityHidden"), SNAME("EditorIcons"));
+ String tooltip = TTR("Toggle Visibility");
+
+ item->set_meta("visible", node_visible);
+ item->add_button(0, button_icon, BUTTON_VISIBILITY, false, tooltip);
+ if (ClassDB::is_parent_class(node.type_name, "CanvasItem") || ClassDB::is_parent_class(node.type_name, "Node3D")) {
+ item->set_button_color(0, item->get_button_count(0) - 1, node_visible_in_tree ? remote_button_color : Color(1, 1, 1, 0.6));
+ } else {
+ item->set_button_color(0, item->get_button_count(0) - 1, remote_button_color);
+ }
+ }
+
// Add in front of the parents stack if children are expected.
if (node.child_count) {
parents.push_front(Pair<TreeItem *, int>(item, node.child_count));
@@ -294,6 +328,8 @@ void EditorDebuggerTree::_item_menu_id_pressed(int p_option) {
file_dialog->add_filter("*." + extensions[i], extensions[i].to_upper());
}
+ String filename = get_selected_path().get_file() + "." + extensions.front()->get().to_lower();
+ file_dialog->set_current_path(filename);
file_dialog->popup_file_dialog();
} break;
case ITEM_MENU_COPY_NODE_PATH: {
diff --git a/editor/debugger/editor_debugger_tree.h b/editor/debugger/editor_debugger_tree.h
index 5b2df8abd5..895f33f1a2 100644
--- a/editor/debugger/editor_debugger_tree.h
+++ b/editor/debugger/editor_debugger_tree.h
@@ -1,38 +1,38 @@
-/*************************************************************************/
-/* editor_debugger_tree.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "scene/gui/tree.h"
+/**************************************************************************/
+/* editor_debugger_tree.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 EDITOR_DEBUGGER_TREE_H
#define EDITOR_DEBUGGER_TREE_H
+#include "scene/gui/tree.h"
+
class SceneDebuggerTree;
class EditorFileDialog;
@@ -65,6 +65,11 @@ protected:
void _notification(int p_what);
public:
+ enum Button {
+ BUTTON_SUBSCENE = 0,
+ BUTTON_VISIBILITY = 1,
+ };
+
virtual Variant get_drag_data(const Point2 &p_point) override;
String get_selected_path();
diff --git a/editor/debugger/editor_network_profiler.cpp b/editor/debugger/editor_network_profiler.cpp
deleted file mode 100644
index 8c18eba71d..0000000000
--- a/editor/debugger/editor_network_profiler.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-/*************************************************************************/
-/* editor_network_profiler.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "editor_network_profiler.h"
-
-#include "core/os/os.h"
-#include "editor/editor_scale.h"
-#include "editor/editor_settings.h"
-
-void EditorNetworkProfiler::_bind_methods() {
- ADD_SIGNAL(MethodInfo("enable_profiling", PropertyInfo(Variant::BOOL, "enable")));
-}
-
-void EditorNetworkProfiler::_notification(int p_what) {
- switch (p_what) {
- case NOTIFICATION_ENTER_TREE:
- case NOTIFICATION_THEME_CHANGED: {
- activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
- clear_button->set_icon(get_theme_icon(SNAME("Clear"), SNAME("EditorIcons")));
- incoming_bandwidth_text->set_right_icon(get_theme_icon(SNAME("ArrowDown"), SNAME("EditorIcons")));
- outgoing_bandwidth_text->set_right_icon(get_theme_icon(SNAME("ArrowUp"), SNAME("EditorIcons")));
-
- // This needs to be done here to set the faded color when the profiler is first opened
- incoming_bandwidth_text->add_theme_color_override("font_uneditable_color", get_theme_color(SNAME("font_color"), SNAME("Editor")) * Color(1, 1, 1, 0.5));
- outgoing_bandwidth_text->add_theme_color_override("font_uneditable_color", get_theme_color(SNAME("font_color"), SNAME("Editor")) * Color(1, 1, 1, 0.5));
- } break;
- }
-}
-
-void EditorNetworkProfiler::_update_frame() {
- counters_display->clear();
-
- TreeItem *root = counters_display->create_item();
-
- for (const KeyValue<ObjectID, SceneDebugger::RPCNodeInfo> &E : nodes_data) {
- TreeItem *node = counters_display->create_item(root);
-
- for (int j = 0; j < counters_display->get_columns(); ++j) {
- node->set_text_alignment(j, j > 0 ? HORIZONTAL_ALIGNMENT_RIGHT : HORIZONTAL_ALIGNMENT_LEFT);
- }
-
- node->set_text(0, E.value.node_path);
- node->set_text(1, E.value.incoming_rpc == 0 ? "-" : itos(E.value.incoming_rpc));
- node->set_text(2, E.value.outgoing_rpc == 0 ? "-" : itos(E.value.outgoing_rpc));
- }
-}
-
-void EditorNetworkProfiler::_activate_pressed() {
- if (activate->is_pressed()) {
- activate->set_icon(get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
- activate->set_text(TTR("Stop"));
- } else {
- activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
- activate->set_text(TTR("Start"));
- }
- emit_signal(SNAME("enable_profiling"), activate->is_pressed());
-}
-
-void EditorNetworkProfiler::_clear_pressed() {
- nodes_data.clear();
- set_bandwidth(0, 0);
- if (frame_delay->is_stopped()) {
- frame_delay->set_wait_time(0.1);
- frame_delay->start();
- }
-}
-
-void EditorNetworkProfiler::add_node_frame_data(const SceneDebugger::RPCNodeInfo p_frame) {
- if (!nodes_data.has(p_frame.node)) {
- nodes_data.insert(p_frame.node, p_frame);
- } else {
- nodes_data[p_frame.node].incoming_rpc += p_frame.incoming_rpc;
- nodes_data[p_frame.node].outgoing_rpc += p_frame.outgoing_rpc;
- }
-
- if (frame_delay->is_stopped()) {
- frame_delay->set_wait_time(0.1);
- frame_delay->start();
- }
-}
-
-void EditorNetworkProfiler::set_bandwidth(int p_incoming, int p_outgoing) {
- incoming_bandwidth_text->set_text(vformat(TTR("%s/s"), String::humanize_size(p_incoming)));
- outgoing_bandwidth_text->set_text(vformat(TTR("%s/s"), String::humanize_size(p_outgoing)));
-
- // Make labels more prominent when the bandwidth is greater than 0 to attract user attention
- incoming_bandwidth_text->add_theme_color_override(
- "font_uneditable_color",
- get_theme_color(SNAME("font_color"), SNAME("Editor")) * Color(1, 1, 1, p_incoming > 0 ? 1 : 0.5));
- outgoing_bandwidth_text->add_theme_color_override(
- "font_uneditable_color",
- get_theme_color(SNAME("font_color"), SNAME("Editor")) * Color(1, 1, 1, p_outgoing > 0 ? 1 : 0.5));
-}
-
-bool EditorNetworkProfiler::is_profiling() {
- return activate->is_pressed();
-}
-
-EditorNetworkProfiler::EditorNetworkProfiler() {
- HBoxContainer *hb = memnew(HBoxContainer);
- hb->add_theme_constant_override("separation", 8 * EDSCALE);
- add_child(hb);
-
- activate = memnew(Button);
- activate->set_toggle_mode(true);
- activate->set_text(TTR("Start"));
- activate->connect("pressed", callable_mp(this, &EditorNetworkProfiler::_activate_pressed));
- hb->add_child(activate);
-
- clear_button = memnew(Button);
- clear_button->set_text(TTR("Clear"));
- clear_button->connect("pressed", callable_mp(this, &EditorNetworkProfiler::_clear_pressed));
- hb->add_child(clear_button);
-
- hb->add_spacer();
-
- Label *lb = memnew(Label);
- lb->set_text(TTR("Down"));
- hb->add_child(lb);
-
- incoming_bandwidth_text = memnew(LineEdit);
- incoming_bandwidth_text->set_editable(false);
- incoming_bandwidth_text->set_custom_minimum_size(Size2(120, 0) * EDSCALE);
- incoming_bandwidth_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
- hb->add_child(incoming_bandwidth_text);
-
- Control *down_up_spacer = memnew(Control);
- down_up_spacer->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
- hb->add_child(down_up_spacer);
-
- lb = memnew(Label);
- lb->set_text(TTR("Up"));
- hb->add_child(lb);
-
- outgoing_bandwidth_text = memnew(LineEdit);
- outgoing_bandwidth_text->set_editable(false);
- outgoing_bandwidth_text->set_custom_minimum_size(Size2(120, 0) * EDSCALE);
- outgoing_bandwidth_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
- hb->add_child(outgoing_bandwidth_text);
-
- // Set initial texts in the incoming/outgoing bandwidth labels
- set_bandwidth(0, 0);
-
- counters_display = memnew(Tree);
- counters_display->set_custom_minimum_size(Size2(300, 0) * EDSCALE);
- counters_display->set_v_size_flags(SIZE_EXPAND_FILL);
- counters_display->set_hide_folding(true);
- counters_display->set_hide_root(true);
- counters_display->set_columns(3);
- counters_display->set_column_titles_visible(true);
- counters_display->set_column_title(0, TTR("Node"));
- counters_display->set_column_expand(0, true);
- counters_display->set_column_clip_content(0, true);
- counters_display->set_column_custom_minimum_width(0, 60 * EDSCALE);
- counters_display->set_column_title(1, TTR("Incoming RPC"));
- counters_display->set_column_expand(1, false);
- counters_display->set_column_clip_content(1, true);
- counters_display->set_column_custom_minimum_width(1, 120 * EDSCALE);
- counters_display->set_column_title(2, TTR("Outgoing RPC"));
- counters_display->set_column_expand(2, false);
- counters_display->set_column_clip_content(2, true);
- counters_display->set_column_custom_minimum_width(2, 120 * EDSCALE);
- add_child(counters_display);
-
- frame_delay = memnew(Timer);
- frame_delay->set_wait_time(0.1);
- frame_delay->set_one_shot(true);
- add_child(frame_delay);
- frame_delay->connect("timeout", callable_mp(this, &EditorNetworkProfiler::_update_frame));
-}
diff --git a/editor/debugger/editor_network_profiler.h b/editor/debugger/editor_network_profiler.h
deleted file mode 100644
index aea7ce3eec..0000000000
--- a/editor/debugger/editor_network_profiler.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*************************************************************************/
-/* editor_network_profiler.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef EDITOR_NETWORK_PROFILER_H
-#define EDITOR_NETWORK_PROFILER_H
-
-#include "scene/debugger/scene_debugger.h"
-#include "scene/gui/box_container.h"
-#include "scene/gui/button.h"
-#include "scene/gui/label.h"
-#include "scene/gui/split_container.h"
-#include "scene/gui/tree.h"
-
-class EditorNetworkProfiler : public VBoxContainer {
- GDCLASS(EditorNetworkProfiler, VBoxContainer)
-
-private:
- Button *activate = nullptr;
- Button *clear_button = nullptr;
- Tree *counters_display = nullptr;
- LineEdit *incoming_bandwidth_text = nullptr;
- LineEdit *outgoing_bandwidth_text = nullptr;
-
- Timer *frame_delay = nullptr;
-
- HashMap<ObjectID, SceneDebugger::RPCNodeInfo> nodes_data;
-
- void _update_frame();
-
- void _activate_pressed();
- void _clear_pressed();
-
-protected:
- void _notification(int p_what);
- static void _bind_methods();
-
-public:
- void add_node_frame_data(const SceneDebugger::RPCNodeInfo p_frame);
- void set_bandwidth(int p_incoming, int p_outgoing);
- bool is_profiling();
-
- EditorNetworkProfiler();
-};
-
-#endif // EDITOR_NETWORK_PROFILER_H
diff --git a/editor/debugger/editor_performance_profiler.cpp b/editor/debugger/editor_performance_profiler.cpp
index 10b50a81e4..e8fd6ef8ef 100644
--- a/editor/debugger/editor_performance_profiler.cpp
+++ b/editor/debugger/editor_performance_profiler.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_performance_profiler.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_performance_profiler.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 "editor_performance_profiler.h"
@@ -234,6 +234,7 @@ TreeItem *EditorPerformanceProfiler::_get_monitor_base(const StringName &p_base_
base->set_editable(0, false);
base->set_selectable(0, false);
base->set_expand_right(0, true);
+ base->set_custom_font(0, get_theme_font(SNAME("bold"), SNAME("EditorFonts")));
base_map.insert(p_base_name, base);
return base;
}
@@ -349,12 +350,12 @@ void EditorPerformanceProfiler::update_monitors(const Vector<StringName> &p_name
void EditorPerformanceProfiler::add_profile_frame(const Vector<float> &p_values) {
for (KeyValue<StringName, Monitor> &E : monitors) {
- float data = 0.0f;
+ float value = 0.0f;
if (E.value.frame_index >= 0 && E.value.frame_index < p_values.size()) {
- data = p_values[E.value.frame_index];
+ value = p_values[E.value.frame_index];
}
- E.value.history.push_front(data);
- E.value.update_value(data);
+ E.value.history.push_front(value);
+ E.value.update_value(value);
}
marker_frame++;
monitor_draw->queue_redraw();
diff --git a/editor/debugger/editor_performance_profiler.h b/editor/debugger/editor_performance_profiler.h
index 607de5a134..74bb92a95e 100644
--- a/editor/debugger/editor_performance_profiler.h
+++ b/editor/debugger/editor_performance_profiler.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_performance_profiler.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_performance_profiler.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 EDITOR_PERFORMANCE_PROFILER_H
#define EDITOR_PERFORMANCE_PROFILER_H
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp
index cf48366bd3..e4730faf38 100644
--- a/editor/debugger/editor_profiler.cpp
+++ b/editor/debugger/editor_profiler.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_profiler.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_profiler.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 "editor_profiler.h"
@@ -85,7 +85,7 @@ void EditorProfiler::add_frame_metric(const Metric &p_metric, bool p_final) {
}
void EditorProfiler::clear() {
- int metric_size = EditorSettings::get_singleton()->get("debugger/profiler_frame_history_size");
+ int metric_size = EDITOR_GET("debugger/profiler_frame_history_size");
metric_size = CLAMP(metric_size, 60, 10000);
frame_metrics.clear();
frame_metrics.resize(metric_size);
@@ -104,6 +104,10 @@ void EditorProfiler::clear() {
updating_frame = false;
hover_metric = -1;
seeking = false;
+
+ // Ensure button text (start, stop) is correct
+ _update_button_text();
+ emit_signal(SNAME("enable_profiling"), activate->is_pressed());
}
static String _get_percent_txt(float p_value, float p_total) {
@@ -304,9 +308,7 @@ void EditorProfiler::_update_plot() {
}
}
- Ref<Image> img;
- img.instantiate();
- img->create(w, h, false, Image::FORMAT_RGBA8, graph_image);
+ Ref<Image> img = Image::create_from_data(w, h, false, Image::FORMAT_RGBA8, graph_image);
if (reset_texture) {
if (graph_texture.is_null()) {
@@ -374,15 +376,23 @@ void EditorProfiler::_update_frame() {
updating_frame = false;
}
-void EditorProfiler::_activate_pressed() {
+void EditorProfiler::_update_button_text() {
if (activate->is_pressed()) {
activate->set_icon(get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
activate->set_text(TTR("Stop"));
- _clear_pressed();
} else {
activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
activate->set_text(TTR("Start"));
}
+}
+
+void EditorProfiler::_activate_pressed() {
+ _update_button_text();
+
+ if (activate->is_pressed()) {
+ _clear_pressed();
+ }
+
emit_signal(SNAME("enable_profiling"), activate->is_pressed());
}
@@ -458,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) {
@@ -499,8 +509,16 @@ void EditorProfiler::_bind_methods() {
ADD_SIGNAL(MethodInfo("break_request"));
}
-void EditorProfiler::set_enabled(bool p_enable) {
+void EditorProfiler::set_enabled(bool p_enable, bool p_clear) {
activate->set_disabled(!p_enable);
+ if (p_clear) {
+ clear();
+ }
+}
+
+void EditorProfiler::set_pressed(bool p_pressed) {
+ activate->set_pressed(p_pressed);
+ _update_button_text();
}
bool EditorProfiler::is_profiling() {
@@ -581,6 +599,7 @@ EditorProfiler::EditorProfiler() {
add_child(hb);
activate = memnew(Button);
activate->set_toggle_mode(true);
+ activate->set_disabled(true);
activate->set_text(TTR("Start"));
activate->connect("pressed", callable_mp(this, &EditorProfiler::_activate_pressed));
hb->add_child(activate);
@@ -651,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_profiler.h b/editor/debugger/editor_profiler.h
index df92125258..eea8ed8365 100644
--- a/editor/debugger/editor_profiler.h
+++ b/editor/debugger/editor_profiler.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_profiler.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_profiler.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 EDITOR_PROFILER_H
#define EDITOR_PROFILER_H
@@ -122,6 +122,7 @@ private:
Timer *frame_delay = nullptr;
Timer *plot_delay = nullptr;
+ void _update_button_text();
void _update_frame();
void _activate_pressed();
@@ -153,7 +154,8 @@ protected:
public:
void add_frame_metric(const Metric &p_metric, bool p_final = false);
- void set_enabled(bool p_enable);
+ void set_enabled(bool p_enable, bool p_clear = true);
+ void set_pressed(bool p_pressed);
bool is_profiling();
bool is_seeking() { return seeking; }
void disable_seeking();
diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp
index 8e7135f1c5..1a06e85f90 100644
--- a/editor/debugger/editor_visual_profiler.cpp
+++ b/editor/debugger/editor_visual_profiler.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_visual_profiler.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_visual_profiler.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 "editor_visual_profiler.h"
@@ -66,6 +66,7 @@ void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) {
}
updating_frame = true;
+ clear_button->set_disabled(false);
cursor_metric_edit->set_max(frame_metrics[last_metric].frame_number);
cursor_metric_edit->set_min(MAX(frame_metrics[last_metric].frame_number - frame_metrics.size(), 0u));
@@ -92,7 +93,7 @@ void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) {
}
void EditorVisualProfiler::clear() {
- int metric_size = EditorSettings::get_singleton()->get("debugger/profiler_frame_history_size");
+ int metric_size = EDITOR_GET("debugger/profiler_frame_history_size");
metric_size = CLAMP(metric_size, 60, 10000);
frame_metrics.clear();
frame_metrics.resize(metric_size);
@@ -298,9 +299,7 @@ void EditorVisualProfiler::_update_plot() {
}
}
- Ref<Image> img;
- img.instantiate();
- img->create(w, h, false, Image::FORMAT_RGBA8, graph_image);
+ Ref<Image> img = Image::create_from_data(w, h, false, Image::FORMAT_RGBA8, graph_image);
if (reset_texture) {
if (graph_texture.is_null()) {
@@ -410,6 +409,7 @@ void EditorVisualProfiler::_activate_pressed() {
activate->set_icon(get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
activate->set_text(TTR("Stop"));
_clear_pressed(); //always clear on start
+ clear_button->set_disabled(false);
} else {
activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
activate->set_text(TTR("Start"));
@@ -418,6 +418,7 @@ void EditorVisualProfiler::_activate_pressed() {
}
void EditorVisualProfiler::_clear_pressed() {
+ clear_button->set_disabled(true);
clear();
_update_plot();
}
@@ -543,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;
@@ -649,10 +650,25 @@ void EditorVisualProfiler::_bind_methods() {
ADD_SIGNAL(MethodInfo("enable_profiling", PropertyInfo(Variant::BOOL, "enable")));
}
+void EditorVisualProfiler::_update_button_text() {
+ if (activate->is_pressed()) {
+ activate->set_icon(get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
+ activate->set_text(TTR("Stop"));
+ } else {
+ activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
+ activate->set_text(TTR("Start"));
+ }
+}
+
void EditorVisualProfiler::set_enabled(bool p_enable) {
activate->set_disabled(!p_enable);
}
+void EditorVisualProfiler::set_pressed(bool p_pressed) {
+ activate->set_pressed(p_pressed);
+ _update_button_text();
+}
+
bool EditorVisualProfiler::is_profiling() {
return activate->is_pressed();
}
@@ -716,12 +732,14 @@ EditorVisualProfiler::EditorVisualProfiler() {
add_child(hb);
activate = memnew(Button);
activate->set_toggle_mode(true);
+ activate->set_disabled(true);
activate->set_text(TTR("Start"));
activate->connect("pressed", callable_mp(this, &EditorVisualProfiler::_activate_pressed));
hb->add_child(activate);
clear_button = memnew(Button);
clear_button->set_text(TTR("Clear"));
+ clear_button->set_disabled(true);
clear_button->connect("pressed", callable_mp(this, &EditorVisualProfiler::_clear_pressed));
hb->add_child(clear_button);
@@ -780,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/editor_visual_profiler.h b/editor/debugger/editor_visual_profiler.h
index 8aa9e7b308..5831e3322d 100644
--- a/editor/debugger/editor_visual_profiler.h
+++ b/editor/debugger/editor_visual_profiler.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_visual_profiler.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_visual_profiler.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 EDITOR_VISUAL_PROFILER_H
#define EDITOR_VISUAL_PROFILER_H
@@ -101,6 +101,8 @@ private:
Timer *frame_delay = nullptr;
Timer *plot_delay = nullptr;
+ void _update_button_text();
+
void _update_frame(bool p_focus_selected = false);
void _activate_pressed();
@@ -133,6 +135,7 @@ protected:
public:
void add_frame_metric(const Metric &p_metric);
void set_enabled(bool p_enable);
+ void set_pressed(bool p_pressed);
bool is_profiling();
bool is_seeking() { return seeking; }
void disable_seeking();
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 5baa9970af..2c6b9990ed 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* script_editor_debugger.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* script_editor_debugger.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 "script_editor_debugger.h"
@@ -37,7 +37,6 @@
#include "core/string/ustring.h"
#include "core/version.h"
#include "editor/debugger/debug_adapter/debug_adapter_protocol.h"
-#include "editor/debugger/editor_network_profiler.h"
#include "editor/debugger/editor_performance_profiler.h"
#include "editor/debugger/editor_profiler.h"
#include "editor/debugger/editor_visual_profiler.h"
@@ -47,6 +46,7 @@
#include "editor/editor_property_name_processor.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/inspector_dock.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/editor_debugger_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
@@ -54,6 +54,7 @@
#include "scene/3d/camera_3d.h"
#include "scene/debugger/scene_debugger.h"
#include "scene/gui/dialogs.h"
+#include "scene/gui/grid_container.h"
#include "scene/gui/label.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/margin_container.h"
@@ -317,7 +318,8 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
if (!error.is_empty()) {
tabs->set_current_tab(0);
}
- profiler->set_enabled(false);
+ profiler->set_enabled(false, false);
+ visual_profiler->set_enabled(false);
inspector->clear_cache(); // Take a chance to force remote objects update.
} else if (p_msg == "debug_exit") {
@@ -327,8 +329,12 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
_update_buttons_state();
_set_reason_text(TTR("Execution resumed."), MESSAGE_SUCCESS);
emit_signal(SNAME("breaked"), false, false, "", false);
- profiler->set_enabled(true);
+
+ profiler->set_enabled(true, false);
profiler->disable_seeking();
+
+ visual_profiler->set_enabled(true);
+
} else if (p_msg == "set_pid") {
ERR_FAIL_COND(p_data.size() < 1);
remote_pid = p_data[0];
@@ -714,17 +720,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
profiler->add_frame_metric(metric, true);
}
- } else if (p_msg == "multiplayer:rpc") {
- SceneDebugger::RPCProfilerFrame frame;
- frame.deserialize(p_data);
- for (int i = 0; i < frame.infos.size(); i++) {
- network_profiler->add_node_frame_data(frame.infos[i]);
- }
-
- } else if (p_msg == "multiplayer:bandwidth") {
- ERR_FAIL_COND(p_data.size() < 2);
- network_profiler->set_bandwidth(p_data[0], p_data[1]);
-
} else if (p_msg == "request_quit") {
emit_signal(SNAME("stop_requested"));
_stop_and_notify();
@@ -742,22 +737,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
int colon_index = p_msg.find_char(':');
ERR_FAIL_COND_MSG(colon_index < 1, "Invalid message received");
- bool parsed = false;
- const String cap = p_msg.substr(0, colon_index);
- HashMap<StringName, Callable>::Iterator element = captures.find(cap);
- if (element) {
- Callable &c = element->value;
- ERR_FAIL_COND_MSG(c.is_null(), "Invalid callable registered: " + cap);
- Variant cmd = p_msg.substr(colon_index + 1), data = p_data;
- const Variant *args[2] = { &cmd, &data };
- Variant retval;
- Callable::CallError err;
- c.callp(args, 2, retval, err);
- ERR_FAIL_COND_MSG(err.error != Callable::CallError::CALL_OK, "Error calling 'capture' to callable: " + Variant::get_callable_error_text(c, args, 2, err));
- ERR_FAIL_COND_MSG(retval.get_type() != Variant::BOOL, "Error calling 'capture' to callable: " + String(c) + ". Return type is not bool.");
- parsed = retval;
- }
-
+ bool parsed = EditorDebuggerNode::get_singleton()->plugins_capture(this, p_msg, p_data);
if (!parsed) {
WARN_PRINT("unknown message " + p_msg);
}
@@ -776,7 +756,16 @@ void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType
reason->add_theme_color_override("font_color", get_theme_color(SNAME("success_color"), SNAME("Editor")));
}
reason->set_text(p_reason);
- reason->set_tooltip_text(p_reason.word_wrap(80));
+
+ const PackedInt32Array boundaries = TS->string_get_word_breaks(p_reason, "", 80);
+ PackedStringArray lines;
+ for (int i = 0; i < boundaries.size(); i += 2) {
+ const int start = boundaries[i];
+ const int end = boundaries[i + 1];
+ lines.append(p_reason.substr(start, end - start + 1));
+ }
+
+ reason->set_tooltip_text(String("\n").join(lines));
}
void ScriptEditorDebugger::_notification(int p_what) {
@@ -896,9 +885,9 @@ void ScriptEditorDebugger::_clear_execution() {
}
void ScriptEditorDebugger::_set_breakpoint(const String &p_file, const int &p_line, const bool &p_enabled) {
- Ref<Script> script = ResourceLoader::load(p_file);
- emit_signal(SNAME("set_breakpoint"), script, p_line - 1, p_enabled);
- script.unref();
+ Ref<Script> scr = ResourceLoader::load(p_file);
+ emit_signal(SNAME("set_breakpoint"), scr, p_line - 1, p_enabled);
+ scr.unref();
}
void ScriptEditorDebugger::_clear_breakpoints() {
@@ -916,6 +905,9 @@ void ScriptEditorDebugger::start(Ref<RemoteDebuggerPeer> p_peer) {
_clear_errors_list();
stop();
+ profiler->set_enabled(true, true);
+ visual_profiler->set_enabled(true);
+
peer = p_peer;
ERR_FAIL_COND(p_peer.is_null());
@@ -971,20 +963,22 @@ void ScriptEditorDebugger::stop() {
res_path_cache.clear();
profiler_signature.clear();
+ profiler->set_enabled(false, false);
+ profiler->set_pressed(false);
+
+ visual_profiler->set_enabled(false);
+ visual_profiler->set_pressed(false);
+
inspector->edit(nullptr);
_update_buttons_state();
}
void ScriptEditorDebugger::_profiler_activate(bool p_enable, int p_type) {
- Array data;
- data.push_back(p_enable);
+ Array msg_data;
+ msg_data.push_back(p_enable);
switch (p_type) {
- case PROFILER_NETWORK:
- _put_msg("profiler:multiplayer", data);
- _put_msg("profiler:rpc", data);
- break;
case PROFILER_VISUAL:
- _put_msg("profiler:visual", data);
+ _put_msg("profiler:visual", msg_data);
break;
case PROFILER_SCRIPTS_SERVERS:
if (p_enable) {
@@ -992,11 +986,11 @@ void ScriptEditorDebugger::_profiler_activate(bool p_enable, int p_type) {
profiler_signature.clear();
// Add max funcs options to request.
Array opts;
- int max_funcs = EditorSettings::get_singleton()->get("debugger/profiler_frame_max_functions");
+ int max_funcs = EDITOR_GET("debugger/profiler_frame_max_functions");
opts.push_back(CLAMP(max_funcs, 16, 512));
- data.push_back(opts);
+ msg_data.push_back(opts);
}
- _put_msg("profiler:servers", data);
+ _put_msg("profiler:servers", msg_data);
break;
default:
ERR_FAIL_MSG("Invalid profiler type");
@@ -1280,13 +1274,13 @@ void ScriptEditorDebugger::live_debug_create_node(const NodePath &p_parent, cons
}
}
-void ScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
+void ScriptEditorDebugger::live_debug_instantiate_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
if (live_debug) {
Array msg;
msg.push_back(p_parent);
msg.push_back(p_path);
msg.push_back(p_name);
- _put_msg("scene:live_instance_node", msg);
+ _put_msg("scene:live_instantiate_node", msg);
}
}
@@ -1560,8 +1554,22 @@ void ScriptEditorDebugger::_item_menu_id_pressed(int p_option) {
ti = ti->get_parent();
}
- // We only need the first child here (C++ source stack trace).
+ // Find the child with the "C++ Source".
+ // It's not at a fixed position as "C++ Error" may come first.
TreeItem *ci = ti->get_first_child();
+ const String cpp_source = "<" + TTR("C++ Source") + ">";
+ while (ci) {
+ if (ci->get_text(0) == cpp_source) {
+ break;
+ }
+ ci = ci->get_next();
+ }
+
+ if (!ci) {
+ WARN_PRINT_ED("No C++ source reference is available for this error.");
+ return;
+ }
+
// Parse back the `file:line @ method()` string.
const Vector<String> file_line_number = ci->get_text(1).split("@")[0].strip_edges().split(":");
ERR_FAIL_COND_MSG(file_line_number.size() < 2, "Incorrect C++ source stack trace file:line format (please report).");
@@ -1609,7 +1617,7 @@ void ScriptEditorDebugger::_tab_changed(int p_tab) {
void ScriptEditorDebugger::_bind_methods() {
ClassDB::bind_method(D_METHOD("live_debug_create_node"), &ScriptEditorDebugger::live_debug_create_node);
- ClassDB::bind_method(D_METHOD("live_debug_instance_node"), &ScriptEditorDebugger::live_debug_instance_node);
+ ClassDB::bind_method(D_METHOD("live_debug_instantiate_node"), &ScriptEditorDebugger::live_debug_instantiate_node);
ClassDB::bind_method(D_METHOD("live_debug_remove_node"), &ScriptEditorDebugger::live_debug_remove_node);
ClassDB::bind_method(D_METHOD("live_debug_remove_and_keep_node"), &ScriptEditorDebugger::live_debug_remove_and_keep_node);
ClassDB::bind_method(D_METHOD("live_debug_restore_node"), &ScriptEditorDebugger::live_debug_restore_node);
@@ -1641,41 +1649,25 @@ void ScriptEditorDebugger::_bind_methods() {
ADD_SIGNAL(MethodInfo("errors_cleared"));
}
-void ScriptEditorDebugger::add_debugger_plugin(const Ref<Script> &p_script) {
- if (!debugger_plugins.has(p_script)) {
- EditorDebuggerPlugin *plugin = memnew(EditorDebuggerPlugin());
- plugin->attach_debugger(this);
- plugin->set_script(p_script);
- tabs->add_child(plugin);
- debugger_plugins.insert(p_script, plugin);
- }
+void ScriptEditorDebugger::add_debugger_tab(Control *p_control) {
+ tabs->add_child(p_control);
}
-void ScriptEditorDebugger::remove_debugger_plugin(const Ref<Script> &p_script) {
- if (debugger_plugins.has(p_script)) {
- tabs->remove_child(debugger_plugins[p_script]);
- debugger_plugins[p_script]->detach_debugger(false);
- memdelete(debugger_plugins[p_script]);
- debugger_plugins.erase(p_script);
- }
+void ScriptEditorDebugger::remove_debugger_tab(Control *p_control) {
+ int idx = tabs->get_tab_idx_from_control(p_control);
+ ERR_FAIL_COND(idx < 0);
+ p_control->queue_free();
}
void ScriptEditorDebugger::send_message(const String &p_message, const Array &p_args) {
_put_msg(p_message, p_args);
}
-void ScriptEditorDebugger::register_message_capture(const StringName &p_name, const Callable &p_callable) {
- ERR_FAIL_COND_MSG(has_capture(p_name), "Capture already registered: " + p_name);
- captures.insert(p_name, p_callable);
-}
-
-void ScriptEditorDebugger::unregister_message_capture(const StringName &p_name) {
- ERR_FAIL_COND_MSG(!has_capture(p_name), "Capture not registered: " + p_name);
- captures.erase(p_name);
-}
-
-bool ScriptEditorDebugger::has_capture(const StringName &p_name) {
- return captures.has(p_name);
+void ScriptEditorDebugger::toggle_profiler(const String &p_profiler, bool p_enable, const Array &p_data) {
+ Array msg_data;
+ msg_data.push_back(p_enable);
+ msg_data.append_array(p_data);
+ _put_msg("profiler:" + p_profiler, msg_data);
}
ScriptEditorDebugger::ScriptEditorDebugger() {
@@ -1685,6 +1677,8 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
add_child(tabs);
+ InspectorDock::get_inspector_singleton()->connect("object_id_selected", callable_mp(this, &ScriptEditorDebugger::_remote_object_selected));
+
{ //debugger
VBoxContainer *vbc = memnew(VBoxContainer);
vbc->set_name(TTR("Debugger"));
@@ -1887,13 +1881,6 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
visual_profiler->connect("enable_profiling", callable_mp(this, &ScriptEditorDebugger::_profiler_activate).bind(PROFILER_VISUAL));
}
- { //network profiler
- network_profiler = memnew(EditorNetworkProfiler);
- network_profiler->set_name(TTR("Network Profiler"));
- tabs->add_child(network_profiler);
- network_profiler->connect("enable_profiling", callable_mp(this, &ScriptEditorDebugger::_profiler_activate).bind(PROFILER_NETWORK));
- }
-
{ //monitors
performance_profiler = memnew(EditorPerformanceProfiler);
tabs->add_child(performance_profiler);
diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h
index aa0a50ff03..e31b3af3d9 100644
--- a/editor/debugger/script_editor_debugger.h
+++ b/editor/debugger/script_editor_debugger.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* script_editor_debugger.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* script_editor_debugger.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 SCRIPT_EDITOR_DEBUGGER_H
#define SCRIPT_EDITOR_DEBUGGER_H
@@ -50,7 +50,6 @@ class ItemList;
class EditorProfiler;
class EditorFileDialog;
class EditorVisualProfiler;
-class EditorNetworkProfiler;
class EditorPerformanceProfiler;
class SceneDebuggerTree;
class EditorDebuggerPlugin;
@@ -72,7 +71,6 @@ private:
};
enum ProfilerType {
- PROFILER_NETWORK,
PROFILER_VISUAL,
PROFILER_SCRIPTS_SERVERS
};
@@ -151,7 +149,6 @@ private:
EditorProfiler *profiler = nullptr;
EditorVisualProfiler *visual_profiler = nullptr;
- EditorNetworkProfiler *network_profiler = nullptr;
EditorPerformanceProfiler *performance_profiler = nullptr;
OS::ProcessID remote_pid = 0;
@@ -163,10 +160,6 @@ private:
EditorDebuggerNode::CameraOverride camera_override;
- HashMap<Ref<Script>, EditorDebuggerPlugin *> debugger_plugins;
-
- HashMap<StringName, Callable> captures;
-
void _stack_dump_frame_selected();
void _file_selected(const String &p_file);
@@ -266,7 +259,7 @@ public:
void set_live_debugging(bool p_enable);
void live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name);
- void live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name);
+ void live_debug_instantiate_node(const NodePath &p_parent, const String &p_path, const String &p_name);
void live_debug_remove_node(const NodePath &p_at);
void live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id);
void live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos);
@@ -286,14 +279,11 @@ public:
virtual Size2 get_minimum_size() const override;
- void add_debugger_plugin(const Ref<Script> &p_script);
- void remove_debugger_plugin(const Ref<Script> &p_script);
+ void add_debugger_tab(Control *p_control);
+ void remove_debugger_tab(Control *p_control);
void send_message(const String &p_message, const Array &p_args);
-
- void register_message_capture(const StringName &p_name, const Callable &p_callable);
- void unregister_message_capture(const StringName &p_name);
- bool has_capture(const StringName &p_name);
+ void toggle_profiler(const String &p_profiler, bool p_enable, const Array &p_data);
ScriptEditorDebugger();
~ScriptEditorDebugger();
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 43961a7ceb..a925e2d1d3 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* dependency_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* dependency_editor.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 "dependency_editor.h"
@@ -286,7 +286,11 @@ void DependencyEditorOwners::_list_rmb_clicked(int p_item, const Vector2 &p_pos,
file_options->clear();
file_options->reset_size();
if (p_item >= 0) {
- file_options->add_item(TTR("Open"), FILE_OPEN);
+ if (owners->get_selected_items().size() == 1) {
+ file_options->add_icon_item(get_theme_icon(SNAME("Load"), SNAME("EditorIcons")), TTR("Open Scene"), FILE_OPEN);
+ } else {
+ file_options->add_icon_item(get_theme_icon(SNAME("Load"), SNAME("EditorIcons")), TTR("Open Scenes"), FILE_OPEN);
+ }
}
file_options->set_position(owners->get_screen_position() + p_pos);
@@ -307,11 +311,14 @@ void DependencyEditorOwners::_select_file(int p_idx) {
void DependencyEditorOwners::_file_option(int p_option) {
switch (p_option) {
case FILE_OPEN: {
- int idx = owners->get_current();
- if (idx < 0 || idx >= owners->get_item_count()) {
- break;
+ PackedInt32Array selected_items = owners->get_selected_items();
+ for (int i = 0; i < selected_items.size(); i++) {
+ int item_idx = selected_items[i];
+ if (item_idx < 0 || item_idx >= owners->get_item_count()) {
+ break;
+ }
+ _select_file(item_idx);
}
- _select_file(idx);
} break;
}
}
@@ -362,7 +369,7 @@ DependencyEditorOwners::DependencyEditorOwners() {
file_options->connect("id_pressed", callable_mp(this, &DependencyEditorOwners::_file_option));
owners = memnew(ItemList);
- owners->set_select_mode(ItemList::SELECT_SINGLE);
+ owners->set_select_mode(ItemList::SELECT_MULTI);
owners->connect("item_clicked", callable_mp(this, &DependencyEditorOwners::_list_rmb_clicked));
owners->connect("item_activated", callable_mp(this, &DependencyEditorOwners::_select_file));
owners->set_allow_rmb_select(true);
@@ -423,7 +430,7 @@ void DependencyRemoveDialog::_find_localization_remaps_of_removed_files(Vector<R
// Look for dependencies in the translation remaps.
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
- Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
+ Dictionary remaps = GLOBAL_GET("internationalization/locale/translation_remaps");
if (remaps.has(path)) {
RemovedDependency dep;
@@ -537,28 +544,28 @@ void DependencyRemoveDialog::ok_pressed() {
// 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(ProjectSettings::get_singleton()->get("application/config/icon"))) {
+ if (files_to_delete[i] == String(GLOBAL_GET("application/config/icon"))) {
ProjectSettings::get_singleton()->set("application/config/icon", "");
}
- if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("application/run/main_scene"))) {
+ if (files_to_delete[i] == String(GLOBAL_GET("application/run/main_scene"))) {
ProjectSettings::get_singleton()->set("application/run/main_scene", "");
}
- if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("application/boot_splash/image"))) {
+ if (files_to_delete[i] == String(GLOBAL_GET("application/boot_splash/image"))) {
ProjectSettings::get_singleton()->set("application/boot_splash/image", "");
}
- if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("rendering/environment/defaults/default_environment"))) {
+ if (files_to_delete[i] == String(GLOBAL_GET("rendering/environment/defaults/default_environment"))) {
ProjectSettings::get_singleton()->set("rendering/environment/defaults/default_environment", "");
}
- if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image"))) {
+ if (files_to_delete[i] == String(GLOBAL_GET("display/mouse_cursor/custom_image"))) {
ProjectSettings::get_singleton()->set("display/mouse_cursor/custom_image", "");
}
- if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("gui/theme/custom"))) {
+ if (files_to_delete[i] == String(GLOBAL_GET("gui/theme/custom"))) {
ProjectSettings::get_singleton()->set("gui/theme/custom", "");
}
- if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("gui/theme/custom_font"))) {
+ if (files_to_delete[i] == String(GLOBAL_GET("gui/theme/custom_font"))) {
ProjectSettings::get_singleton()->set("gui/theme/custom_font", "");
}
- if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout"))) {
+ if (files_to_delete[i] == String(GLOBAL_GET("audio/buses/default_bus_layout"))) {
ProjectSettings::get_singleton()->set("audio/buses/default_bus_layout", "");
}
@@ -785,14 +792,14 @@ void OrphanResourcesDialog::show() {
popup_centered_ratio(0.4);
}
-void OrphanResourcesDialog::_find_to_delete(TreeItem *p_item, List<String> &paths) {
+void OrphanResourcesDialog::_find_to_delete(TreeItem *p_item, List<String> &r_paths) {
while (p_item) {
if (p_item->get_cell_mode(0) == TreeItem::CELL_MODE_CHECK && p_item->is_checked(0)) {
- paths.push_back(p_item->get_metadata(0));
+ r_paths.push_back(p_item->get_metadata(0));
}
if (p_item->get_first_child()) {
- _find_to_delete(p_item->get_first_child(), paths);
+ _find_to_delete(p_item->get_first_child(), r_paths);
}
p_item = p_item->get_next();
diff --git a/editor/dependency_editor.h b/editor/dependency_editor.h
index 6e39015ec3..8b55d44078 100644
--- a/editor/dependency_editor.h
+++ b/editor/dependency_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* dependency_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* dependency_editor.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 DEPENDENCY_EDITOR_H
#define DEPENDENCY_EDITOR_H
@@ -165,7 +165,7 @@ class OrphanResourcesDialog : public ConfirmationDialog {
bool _fill_owners(EditorFileSystemDirectory *efsd, HashMap<String, int> &refs, TreeItem *p_parent);
List<String> paths;
- void _find_to_delete(TreeItem *p_item, List<String> &paths);
+ void _find_to_delete(TreeItem *p_item, List<String> &r_paths);
void _delete_confirm();
void _button_pressed(Object *p_item, int p_column, int p_id, MouseButton p_button);
diff --git a/editor/dictionary_property_edit.cpp b/editor/dictionary_property_edit.cpp
deleted file mode 100644
index f16c5402ad..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) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "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 4639480828..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) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef 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 9f655ab00a..5bdef32c60 100644
--- a/editor/doc_tools.cpp
+++ b/editor/doc_tools.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* doc_tools.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* doc_tools.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 "doc_tools.h"
@@ -335,7 +335,7 @@ static Variant get_documentation_default_value(const StringName &p_class_name, c
Variant default_value = Variant();
r_default_value_valid = false;
- if (ClassDB::can_instantiate(p_class_name)) {
+ if (ClassDB::can_instantiate(p_class_name) && !ClassDB::is_virtual(p_class_name)) { // Keep this condition in sync with ClassDB::class_get_default_property_value.
default_value = ClassDB::class_get_default_property_value(p_class_name, p_property_name, &r_default_value_valid);
} else {
// Cannot get default value of classes that can't be instantiated
@@ -701,7 +701,7 @@ void DocTools::generate(bool p_basic_types) {
if (rt != Variant::NIL) { // Has operator.
// Skip String % operator as it's registered separately for each Variant arg type,
// we'll add it manually below.
- if (i == Variant::STRING && Variant::Operator(j) == Variant::OP_MODULE) {
+ if ((i == Variant::STRING || i == Variant::STRING_NAME) && Variant::Operator(j) == Variant::OP_MODULE) {
continue;
}
MethodInfo mi;
@@ -718,7 +718,7 @@ void DocTools::generate(bool p_basic_types) {
}
}
- if (i == Variant::STRING) {
+ if (i == Variant::STRING || i == Variant::STRING_NAME) {
// We skipped % operator above, and we register it manually once for Variant arg type here.
MethodInfo mi;
mi.name = "operator %";
@@ -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;
@@ -845,6 +846,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;
@@ -1020,15 +1022,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 +1038,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,23 +1154,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")) {
- String result = parser->get_attribute_value("is_deprecated");
- c.is_deprecated = (result == "true" || result == "True" || result == "TRUE" || result == "1");
+ c.is_deprecated = parser->get_named_attribute_value("is_deprecated").to_lower() == "true";
}
if (parser->has_attribute("is_experimental")) {
- String result = parser->get_attribute_value("is_experimental");
- c.is_experimental = (result == "true" || result == "True" || result == "TRUE" || result == "1");
+ c.is_experimental = parser->get_named_attribute_value("is_experimental").to_lower() == "true";
}
while (parser->read() == OK) {
@@ -1194,7 +1194,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) {
@@ -1232,23 +1232,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();
@@ -1275,11 +1275,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) {
@@ -1304,23 +1304,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")) {
- String result = parser->get_attribute_value("is_deprecated");
- constant2.is_deprecated = (result == "true" || result == "True" || result == "TRUE" || result == "1");
+ constant2.is_deprecated = parser->get_named_attribute_value("is_deprecated").to_lower() == "true";
}
if (parser->has_attribute("is_experimental")) {
- String result = parser->get_attribute_value("is_experimental");
- constant2.is_experimental = (result == "true" || result == "True" || result == "TRUE" || result == "1");
+ constant2.is_experimental = parser->get_named_attribute_value("is_experimental").to_lower() == "true";
}
if (!parser->is_empty()) {
parser->read();
@@ -1376,10 +1374,10 @@ static void _write_method_doc(Ref<FileAccess> f, const String &p_name, Vector<Do
String additional_attributes;
if (m.is_deprecated) {
- additional_attributes += " is_deprecated=\"True\"";
+ additional_attributes += " is_deprecated=\"true\"";
}
if (m.is_experimental) {
- additional_attributes += " is_experimental=\"True\"";
+ additional_attributes += " is_experimental=\"true\"";
}
_write_string(f, 2, "<" + p_name + " name=\"" + m.name.xml_escape() + "\"" + qualifiers + additional_attributes + ">");
@@ -1446,10 +1444,10 @@ Error DocTools::save_classes(const String &p_default_path, const HashMap<String,
if (!c.inherits.is_empty()) {
header += " inherits=\"" + c.inherits + "\"";
if (c.is_deprecated) {
- header += " is_deprecated=\"True\"";
+ header += " is_deprecated=\"true\"";
}
if (c.is_experimental) {
- header += " is_experimental=\"True\"";
+ header += " is_experimental=\"true\"";
}
}
header += String(" version=\"") + VERSION_BRANCH + "\"";
@@ -1495,10 +1493,10 @@ Error DocTools::save_classes(const String &p_default_path, const HashMap<String,
additional_attributes += " default=\"" + c.properties[i].default_value.xml_escape(true) + "\"";
}
if (c.properties[i].is_deprecated) {
- additional_attributes += " is_deprecated=\"True\"";
+ additional_attributes += " is_deprecated=\"true\"";
}
if (c.properties[i].is_experimental) {
- additional_attributes += " is_experimental=\"True\"";
+ additional_attributes += " is_experimental=\"true\"";
}
const DocData::PropertyDoc &p = c.properties[i];
@@ -1523,10 +1521,10 @@ Error DocTools::save_classes(const String &p_default_path, const HashMap<String,
String additional_attributes;
if (c.constants[i].is_deprecated) {
- additional_attributes += " is_deprecated=\"True\"";
+ additional_attributes += " is_deprecated=\"true\"";
}
if (c.constants[i].is_experimental) {
- additional_attributes += " is_experimental=\"True\"";
+ additional_attributes += " is_experimental=\"true\"";
}
if (k.is_value_valid) {
diff --git a/editor/doc_tools.h b/editor/doc_tools.h
index b3e45c6472..08efae31ef 100644
--- a/editor/doc_tools.h
+++ b/editor/doc_tools.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* doc_tools.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* doc_tools.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 DOC_TOOLS_H
#define DOC_TOOLS_H
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index 7baaffb1be..25bca2a099 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_about.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_about.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 "editor_about.h"
@@ -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 2007-2022 Juan Linietsky, Ariel Manzur.\n\xc2\xa9 2014-2022 ") +
- TTR("Godot Engine contributors") + "\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_about.h b/editor/editor_about.h
index 971843f6d2..a49887c260 100644
--- a/editor/editor_about.h
+++ b/editor/editor_about.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_about.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_about.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 EDITOR_ABOUT_H
#define EDITOR_ABOUT_H
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index aaa5956c17..a5bc90159a 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_asset_installer.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_asset_installer.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 "editor_asset_installer.h"
@@ -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"));
@@ -183,16 +182,16 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
int pp = path.rfind("/");
- TreeItem *parent;
+ TreeItem *parent_item;
if (pp == -1) {
- parent = root;
+ parent_item = root;
} else {
String ppath = path.substr(0, pp);
ERR_CONTINUE(!dir_map.has(ppath));
- parent = dir_map[ppath];
+ parent_item = dir_map[ppath];
}
- TreeItem *ti = tree->create_item(parent);
+ TreeItem *ti = tree->create_item(parent_item);
ti->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
ti->set_checked(0, true);
ti->set_editable(0, true);
@@ -284,17 +283,17 @@ void EditorAssetInstaller::ok_pressed() {
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
da->make_dir(dirpath);
} else {
- Vector<uint8_t> data;
- data.resize(info.uncompressed_size);
+ Vector<uint8_t> uncomp_data;
+ uncomp_data.resize(info.uncompressed_size);
//read
unzOpenCurrentFile(pkg);
- unzReadCurrentFile(pkg, data.ptrw(), data.size());
+ unzReadCurrentFile(pkg, uncomp_data.ptrw(), uncomp_data.size());
unzCloseCurrentFile(pkg);
Ref<FileAccess> f = FileAccess::open(path, FileAccess::WRITE);
if (f.is_valid()) {
- f->store_buffer(data.ptr(), data.size());
+ f->store_buffer(uncomp_data.ptr(), uncomp_data.size());
} else {
failed_files.push_back(path);
}
diff --git a/editor/editor_asset_installer.h b/editor/editor_asset_installer.h
index 9c88116336..70f0b3b6ec 100644
--- a/editor/editor_asset_installer.h
+++ b/editor/editor_asset_installer.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_asset_installer.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_asset_installer.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 EDITOR_ASSET_INSTALLER_H
#define EDITOR_ASSET_INSTALLER_H
diff --git a/editor/editor_atlas_packer.cpp b/editor/editor_atlas_packer.cpp
index 7f4bd8cc89..04eac0a9fd 100644
--- a/editor/editor_atlas_packer.cpp
+++ b/editor/editor_atlas_packer.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_atlas_packer.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_atlas_packer.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 "editor_atlas_packer.h"
diff --git a/editor/editor_atlas_packer.h b/editor/editor_atlas_packer.h
index 7b7692011f..0611677aae 100644
--- a/editor/editor_atlas_packer.h
+++ b/editor/editor_atlas_packer.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_atlas_packer.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_atlas_packer.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 EDITOR_ATLAS_PACKER_H
#define EDITOR_ATLAS_PACKER_H
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 09dce869c9..f4cefc606b 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_audio_buses.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_audio_buses.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 "editor_audio_buses.h"
@@ -40,6 +40,7 @@
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "filesystem_dock.h"
+#include "scene/gui/separator.h"
#include "scene/resources/font.h"
#include "servers/audio_server.h"
@@ -281,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"));
@@ -322,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()));
@@ -338,7 +339,7 @@ float EditorAudioBus::_normalized_volume_to_scaled_db(float normalized) {
* values to relative decibal values.
* One formula is an exponential graph which intends to counteract
* the logarithmic nature of human hearing. This is an approximation
- * of the behaviour of a 'logarithmic potentiometer' found on most
+ * of the behavior of a 'logarithmic potentiometer' found on most
* musical instruments and also emulated in popular software.
* The other two equations are hand-tuned linear tapers that intend to
* try to ease the exponential equation in areas where it makes sense.*/
@@ -416,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()));
@@ -430,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()));
@@ -444,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()));
@@ -458,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()));
@@ -508,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));
@@ -535,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()));
@@ -689,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);
@@ -731,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);
@@ -764,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"));
@@ -902,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);
@@ -919,10 +916,10 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
effect_options = memnew(PopupMenu);
effect_options->connect("index_pressed", callable_mp(this, &EditorAudioBus::_effect_add));
add_child(effect_options);
- List<StringName> effects;
- ClassDB::get_inheriters_from_class("AudioEffect", &effects);
- effects.sort_custom<StringName::AlphCompare>();
- for (const StringName &E : effects) {
+ List<StringName> effect_list;
+ ClassDB::get_inheriters_from_class("AudioEffect", &effect_list);
+ effect_list.sort_custom<StringName::AlphCompare>();
+ for (const StringName &E : effect_list) {
if (!ClassDB::can_instantiate(E) || ClassDB::is_virtual(E)) {
continue;
}
@@ -1036,7 +1033,7 @@ void EditorAudioBuses::_notification(int p_what) {
case NOTIFICATION_DRAG_END: {
if (drop_end) {
- drop_end->queue_delete();
+ drop_end->queue_free();
drop_end = nullptr;
}
} break;
@@ -1064,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);
@@ -1096,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);
@@ -1118,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");
@@ -1141,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));
@@ -1161,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);
@@ -1208,7 +1205,7 @@ void EditorAudioBuses::_load_layout() {
}
void EditorAudioBuses::_load_default_layout() {
- String layout_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout");
+ String layout_path = GLOBAL_GET("audio/buses/default_bus_layout");
Ref<AudioBusLayout> state = ResourceLoader::load(layout_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE);
if (state.is_null()) {
@@ -1220,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"));
}
@@ -1236,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) {
@@ -1256,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"));
}
}
@@ -1273,7 +1270,7 @@ EditorAudioBuses::EditorAudioBuses() {
add_child(top_hb);
file = memnew(Label);
- String layout_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout");
+ String layout_path = GLOBAL_GET("audio/buses/default_bus_layout");
file->set_text(String(TTR("Layout:")) + " " + layout_path.get_file());
file->set_clip_text(true);
file->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1328,7 +1325,7 @@ EditorAudioBuses::EditorAudioBuses() {
set_v_size_flags(SIZE_EXPAND_FILL);
- edited_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout");
+ edited_path = GLOBAL_GET("audio/buses/default_bus_layout");
file_dialog = memnew(EditorFileDialog);
List<String> ext;
@@ -1355,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_audio_buses.h b/editor/editor_audio_buses.h
index 436b391ccd..8a7f9b6456 100644
--- a/editor/editor_audio_buses.h
+++ b/editor/editor_audio_buses.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_audio_buses.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_audio_buses.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 EDITOR_AUDIO_BUSES_H
#define EDITOR_AUDIO_BUSES_H
@@ -47,6 +47,7 @@
#include "scene/gui/tree.h"
class EditorAudioBuses;
+class EditorFileDialog;
class EditorAudioBus : public PanelContainer {
GDCLASS(EditorAudioBus, PanelContainer);
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 544b6c7141..f843733f2c 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_autoload_settings.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_autoload_settings.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 "editor_autoload_settings.h"
@@ -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);
@@ -222,15 +222,15 @@ void EditorAutoloadSettings::_autoload_edited() {
name = "autoload/" + name;
int order = ProjectSettings::get_singleton()->get_order(selected_autoload);
- String path = ProjectSettings::get_singleton()->get(selected_autoload);
+ String scr_path = GLOBAL_GET(selected_autoload);
undo_redo->create_action(TTR("Rename Autoload"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), name, path);
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), name, scr_path);
undo_redo->add_do_method(ProjectSettings::get_singleton(), "set_order", name, order);
undo_redo->add_do_method(ProjectSettings::get_singleton(), "clear", selected_autoload);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), selected_autoload, path);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), selected_autoload, scr_path);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", selected_autoload, order);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "clear", name);
@@ -250,21 +250,21 @@ void EditorAutoloadSettings::_autoload_edited() {
String base = "autoload/" + ti->get_text(0);
int order = ProjectSettings::get_singleton()->get_order(base);
- String path = ProjectSettings::get_singleton()->get(base);
+ String scr_path = GLOBAL_GET(base);
- if (path.begins_with("*")) {
- path = path.substr(1, path.length());
+ if (scr_path.begins_with("*")) {
+ scr_path = scr_path.substr(1, scr_path.length());
}
// Singleton autoloads are represented with a leading "*" in their path.
if (checked) {
- path = "*" + path;
+ scr_path = "*" + scr_path;
}
undo_redo->create_action(TTR("Toggle Autoload Globals"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), base, path);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), base, ProjectSettings::get_singleton()->get(base));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), base, scr_path);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), base, GLOBAL_GET(base));
undo_redo->add_do_method(ProjectSettings::get_singleton(), "set_order", base, order);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", base, order);
@@ -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: {
@@ -337,7 +337,7 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, Variant());
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, ProjectSettings::get_singleton()->get(name));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, GLOBAL_GET(name));
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_persisting", name, true);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", order);
@@ -400,27 +400,38 @@ void EditorAutoloadSettings::_autoload_text_changed(const String p_name) {
}
Node *EditorAutoloadSettings::_create_autoload(const String &p_path) {
- Ref<Resource> res = ResourceLoader::load(p_path);
- ERR_FAIL_COND_V_MSG(res.is_null(), nullptr, "Can't autoload: " + p_path + ".");
Node *n = nullptr;
- Ref<PackedScene> scn = res;
- Ref<Script> script = res;
- if (scn.is_valid()) {
- n = scn->instantiate();
- } else if (script.is_valid()) {
- StringName ibt = script->get_instance_base_type();
- bool valid_type = ClassDB::is_parent_class(ibt, "Node");
- ERR_FAIL_COND_V_MSG(!valid_type, nullptr, "Script does not inherit from Node: " + p_path + ".");
+ if (ResourceLoader::get_resource_type(p_path) == "PackedScene") {
+ // Cache the scene reference before loading it (for cyclic references)
+ Ref<PackedScene> scn;
+ scn.instantiate();
+ scn->set_path(p_path);
+ scn->reload_from_file();
+ ERR_FAIL_COND_V_MSG(!scn.is_valid(), nullptr, vformat("Can't autoload: %s.", p_path));
- Object *obj = ClassDB::instantiate(ibt);
+ if (scn.is_valid()) {
+ n = scn->instantiate();
+ }
+ } else {
+ Ref<Resource> res = ResourceLoader::load(p_path);
+ ERR_FAIL_COND_V_MSG(res.is_null(), nullptr, vformat("Can't autoload: %s.", p_path));
+
+ Ref<Script> scr = res;
+ if (scr.is_valid()) {
+ StringName ibt = scr->get_instance_base_type();
+ bool valid_type = ClassDB::is_parent_class(ibt, "Node");
+ ERR_FAIL_COND_V_MSG(!valid_type, nullptr, vformat("Script does not inherit from Node: %s.", p_path));
- ERR_FAIL_COND_V_MSG(!obj, nullptr, "Cannot instance script for Autoload, expected 'Node' inheritance, got: " + String(ibt) + ".");
+ Object *obj = ClassDB::instantiate(ibt);
- n = Object::cast_to<Node>(obj);
- n->set_script(script);
+ ERR_FAIL_COND_V_MSG(!obj, nullptr, vformat("Cannot instance script for Autoload, expected 'Node' inheritance, got: %s.", ibt));
+
+ n = Object::cast_to<Node>(obj);
+ n->set_script(scr);
+ }
}
- ERR_FAIL_COND_V_MSG(!n, nullptr, "Path in Autoload not a node or script: " + p_path + ".");
+ ERR_FAIL_COND_V_MSG(!n, nullptr, vformat("Path in Autoload not a node or script: %s.", p_path));
return n;
}
@@ -453,21 +464,21 @@ void EditorAutoloadSettings::update_autoload() {
}
String name = pi.name.get_slice("/", 1);
- String path = ProjectSettings::get_singleton()->get(pi.name);
+ String scr_path = GLOBAL_GET(pi.name);
if (name.is_empty()) {
continue;
}
AutoloadInfo info;
- info.is_singleton = path.begins_with("*");
+ info.is_singleton = scr_path.begins_with("*");
if (info.is_singleton) {
- path = path.substr(1, path.length());
+ scr_path = scr_path.substr(1, scr_path.length());
}
info.name = name;
- info.path = path;
+ info.path = scr_path;
info.order = ProjectSettings::get_singleton()->get_order(pi.name);
bool need_to_add = true;
@@ -499,7 +510,7 @@ void EditorAutoloadSettings::update_autoload() {
item->set_text(0, name);
item->set_editable(0, true);
- item->set_text(1, path);
+ item->set_text(1, scr_path);
item->set_selectable(1, true);
item->set_cell_mode(2, TreeItem::CELL_MODE_CHECK);
@@ -527,11 +538,9 @@ void EditorAutoloadSettings::update_autoload() {
}
if (info.node) {
- info.node->queue_delete();
+ info.node->queue_free();
info.node = nullptr;
}
-
- ProjectSettings::get_singleton()->remove_autoload(info.name);
}
// Load new/changed autoloads
@@ -556,12 +565,6 @@ void EditorAutoloadSettings::update_autoload() {
}
}
- ProjectSettings::AutoloadInfo prop_info;
- prop_info.name = info->name;
- prop_info.path = info->path;
- prop_info.is_singleton = info->is_singleton;
- ProjectSettings::get_singleton()->add_autoload(prop_info);
-
if (!info->in_editor && !info->is_singleton) {
// No reason to keep this node
memdelete(info->node);
@@ -714,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"));
@@ -745,27 +748,26 @@ bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_
return false;
}
- const String &path = p_path;
- if (!FileAccess::exists(path)) {
+ if (!FileAccess::exists(p_path)) {
EditorNode::get_singleton()->show_warning(TTR("Can't add Autoload:") + "\n" + vformat(TTR("%s is an invalid path. File does not exist."), path));
return false;
}
- if (!path.begins_with("res://")) {
+ if (!p_path.begins_with("res://")) {
EditorNode::get_singleton()->show_warning(TTR("Can't add Autoload:") + "\n" + vformat(TTR("%s is an invalid path. Not in resource path (res://)."), path));
return false;
}
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.
- undo_redo->add_do_property(ProjectSettings::get_singleton(), name, "*" + path);
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), name, "*" + p_path);
if (ProjectSettings::get_singleton()->has_setting(name)) {
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, ProjectSettings::get_singleton()->get(name));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, GLOBAL_GET(name));
} else {
undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, Variant());
}
@@ -784,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);
@@ -792,7 +794,7 @@ void EditorAutoloadSettings::autoload_remove(const String &p_name) {
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, Variant());
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, ProjectSettings::get_singleton()->get(name));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, GLOBAL_GET(name));
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_persisting", name, true);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", order);
@@ -806,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);
@@ -829,21 +825,21 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
}
String name = pi.name.get_slice("/", 1);
- String path = ProjectSettings::get_singleton()->get(pi.name);
+ String scr_path = GLOBAL_GET(pi.name);
if (name.is_empty()) {
continue;
}
AutoloadInfo info;
- info.is_singleton = path.begins_with("*");
+ info.is_singleton = scr_path.begins_with("*");
if (info.is_singleton) {
- path = path.substr(1, path.length());
+ scr_path = scr_path.substr(1, scr_path.length());
}
info.name = name;
- info.path = path;
+ info.path = scr_path;
info.order = ProjectSettings::get_singleton()->get_order(pi.name);
if (info.is_singleton) {
@@ -933,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_autoload_settings.h b/editor/editor_autoload_settings.h
index 0eda7016d3..cd025e0fc7 100644
--- a/editor/editor_autoload_settings.h
+++ b/editor/editor_autoload_settings.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_autoload_settings.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_autoload_settings.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 EDITOR_AUTOLOAD_SETTINGS_H
#define EDITOR_AUTOLOAD_SETTINGS_H
diff --git a/editor/editor_build_profile.cpp b/editor/editor_build_profile.cpp
index 0f0ab4a339..386284b230 100644
--- a/editor/editor_build_profile.cpp
+++ b/editor/editor_build_profile.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_build_profile.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_build_profile.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 "editor_build_profile.h"
@@ -255,8 +255,7 @@ Error EditorBuildProfile::save_to_file(const String &p_path) {
Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::WRITE);
ERR_FAIL_COND_V_MSG(f.is_null(), ERR_CANT_CREATE, "Cannot create file '" + p_path + "'.");
- JSON json;
- String text = json.stringify(data, "\t");
+ String text = JSON::stringify(data, "\t");
f->store_string(text);
return OK;
}
@@ -876,7 +875,7 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
import_profile = memnew(EditorFileDialog);
add_child(import_profile);
import_profile->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
- import_profile->add_filter("*.build", TTR("Egine Build Profile"));
+ import_profile->add_filter("*.build", TTR("Engine Build Profile"));
import_profile->connect("files_selected", callable_mp(this, &EditorBuildProfileManager::_import_profile));
import_profile->set_title(TTR("Load Profile"));
import_profile->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
@@ -884,7 +883,7 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
export_profile = memnew(EditorFileDialog);
add_child(export_profile);
export_profile->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
- export_profile->add_filter("*.build", TTR("Egine Build Profile"));
+ export_profile->add_filter("*.build", TTR("Engine Build Profile"));
export_profile->connect("file_selected", callable_mp(this, &EditorBuildProfileManager::_export_profile));
export_profile->set_title(TTR("Export Profile"));
export_profile->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
diff --git a/editor/editor_build_profile.h b/editor/editor_build_profile.h
index 606c415429..649784afc3 100644
--- a/editor/editor_build_profile.h
+++ b/editor/editor_build_profile.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_build_profile.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_build_profile.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 EDITOR_BUILD_PROFILE_H
#define EDITOR_BUILD_PROFILE_H
@@ -117,6 +117,7 @@ public:
VARIANT_ENUM_CAST(EditorBuildProfile::BuildOption)
VARIANT_ENUM_CAST(EditorBuildProfile::BuildOptionCategory)
+class EditorFileDialog;
class EditorFileSystemDirectory;
class EditorBuildProfileManager : public AcceptDialog {
diff --git a/editor/editor_builders.py b/editor/editor_builders.py
index e73fbc6107..696e3b64ec 100644
--- a/editor/editor_builders.py
+++ b/editor/editor_builders.py
@@ -9,6 +9,7 @@ import shutil
import subprocess
import tempfile
import uuid
+import zlib
from platform_methods import subprocess_main
@@ -28,7 +29,6 @@ def make_doc_header(target, source, env):
buf = (docbegin + buf + docend).encode("utf-8")
decomp_size = len(buf)
- import zlib
# Use maximum zlib compression level to further reduce file size
# (at the cost of initial build times).
@@ -88,9 +88,6 @@ def make_translations_header(target, source, env, category):
g.write("#ifndef _{}_TRANSLATIONS_H\n".format(category.upper()))
g.write("#define _{}_TRANSLATIONS_H\n".format(category.upper()))
- import zlib
- import os.path
-
sorted_paths = sorted(source, key=lambda path: os.path.splitext(os.path.basename(path))[0])
msgfmt_available = shutil.which("msgfmt") is not None
diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp
index ba1f2fd6af..1c598277dd 100644
--- a/editor/editor_command_palette.cpp
+++ b/editor/editor_command_palette.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_command_palette.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_command_palette.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 "editor/editor_command_palette.h"
#include "core/os/keyboard.h"
@@ -38,6 +38,9 @@
EditorCommandPalette *EditorCommandPalette::singleton = nullptr;
+static Rect2i prev_rect = Rect2i();
+static bool was_showed = false;
+
float EditorCommandPalette::_score_path(const String &p_search, const String &p_path) {
float score = 0.9f + .1f * (p_search.length() / (float)p_path.length());
@@ -130,7 +133,7 @@ void EditorCommandPalette::_update_command_search(const String &search_text) {
ti->set_metadata(0, entries[i].key_name);
ti->set_text_alignment(1, HORIZONTAL_ALIGNMENT_RIGHT);
ti->set_text(1, shortcut_text);
- Color c = Color(1, 1, 1, 0.5);
+ Color c = get_theme_color(SNAME("font_color"), SNAME("Editor")) * Color(1, 1, 1, 0.5);
ti->set_custom_color(1, c);
}
@@ -145,6 +148,17 @@ void EditorCommandPalette::_bind_methods() {
ClassDB::bind_method(D_METHOD("remove_command", "key_name"), &EditorCommandPalette::remove_command);
}
+void EditorCommandPalette::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ if (!is_visible()) {
+ prev_rect = Rect2i(get_position(), get_size());
+ was_showed = true;
+ }
+ } break;
+ }
+}
+
void EditorCommandPalette::_sbox_input(const Ref<InputEvent> &p_ie) {
Ref<InputEventKey> k = p_ie;
if (k.is_valid()) {
@@ -171,7 +185,11 @@ void EditorCommandPalette::_confirmed() {
}
void EditorCommandPalette::open_popup() {
- popup_centered_clamped(Size2i(600, 440), 0.8f);
+ if (was_showed) {
+ popup(prev_rect);
+ } else {
+ popup_centered_clamped(Size2(600, 440) * EDSCALE, 0.8f);
+ }
command_search_box->clear();
command_search_box->grab_focus();
@@ -226,7 +244,7 @@ void EditorCommandPalette::_add_command(String p_command_name, String p_key_name
void EditorCommandPalette::execute_command(String &p_command_key) {
ERR_FAIL_COND_MSG(!commands.has(p_command_key), p_command_key + " not found.");
commands[p_command_key].last_used = OS::get_singleton()->get_unix_time();
- commands[p_command_key].callable.call_deferredp(nullptr, 0);
+ commands[p_command_key].callable.call_deferred();
_save_history();
}
diff --git a/editor/editor_command_palette.h b/editor/editor_command_palette.h
index b3e84771d0..7eb9ff7404 100644
--- a/editor/editor_command_palette.h
+++ b/editor/editor_command_palette.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_command_palette.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_command_palette.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 EDITOR_COMMAND_PALETTE_H
#define EDITOR_COMMAND_PALETTE_H
@@ -66,7 +66,11 @@ class EditorCommandPalette : public ConfirmationDialog {
struct CommandHistoryComparator {
_FORCE_INLINE_ bool operator()(const CommandEntry &A, const CommandEntry &B) const {
- return A.last_used > B.last_used;
+ if (A.last_used == B.last_used) {
+ return A.display_name < B.display_name;
+ } else {
+ return A.last_used > B.last_used;
+ }
}
};
@@ -87,6 +91,7 @@ class EditorCommandPalette : public ConfirmationDialog {
protected:
static void _bind_methods();
+ void _notification(int p_what);
public:
void open_popup();
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index d1ea0f2814..3059ce445c 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_data.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_data.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 "editor_data.h"
@@ -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);
}
@@ -457,12 +435,10 @@ Callable EditorData::get_move_array_element_function(const StringName &p_class)
}
void EditorData::remove_editor_plugin(EditorPlugin *p_plugin) {
- p_plugin->undo_redo = Ref<EditorUndoRedoManager>();
editor_plugins.erase(p_plugin);
}
void EditorData::add_editor_plugin(EditorPlugin *p_plugin) {
- p_plugin->undo_redo = undo_redo_manager;
editor_plugins.push_back(p_plugin);
}
@@ -488,7 +464,7 @@ void EditorData::add_custom_type(const String &p_type, const String &p_inherits,
custom_types[p_inherits].push_back(ct);
}
-Variant EditorData::instance_custom_type(const String &p_type, const String &p_inherits) {
+Variant EditorData::instantiate_custom_type(const String &p_type, const String &p_inherits) {
if (get_custom_types().has(p_inherits)) {
for (int i = 0; i < get_custom_types()[p_inherits].size(); i++) {
if (get_custom_types()[p_inherits][i].name == p_type) {
@@ -947,11 +923,12 @@ StringName EditorData::script_class_get_base(const String &p_class) const {
Variant EditorData::script_class_instance(const String &p_class) {
if (ScriptServer::is_global_class(p_class)) {
- Variant obj = ClassDB::instantiate(ScriptServer::get_global_class_native_base(p_class));
- if (obj) {
- Ref<Script> script = script_class_load_script(p_class);
- if (script.is_valid()) {
- ((Object *)obj)->set_script(script);
+ Ref<Script> script = script_class_load_script(p_class);
+ if (script.is_valid()) {
+ // Store in a variant to initialize the refcount if needed.
+ Variant obj = ClassDB::instantiate(script->get_instance_base_type());
+ if (obj) {
+ obj.operator Object *()->set_script(script);
}
return obj;
}
@@ -999,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)) {
@@ -1006,29 +985,22 @@ void EditorData::script_class_save_icon_paths() {
}
}
- Dictionary old;
- if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
- old = ProjectSettings::get_singleton()->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 = ProjectSettings::get_singleton()->get("_global_script_class_icons");
+ Dictionary d = GLOBAL_GET("_global_script_class_icons");
List<Variant> keys;
d.get_key_list(&keys);
@@ -1039,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 4f1740d4f0..6a89b3572c 100644
--- a/editor/editor_data.h
+++ b/editor/editor_data.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_data.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_data.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 EDITOR_DATA_H
#define 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,10 +176,9 @@ 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 instance_custom_type(const String &p_type, const String &p_inherits);
+ Variant instantiate_custom_type(const String &p_type, const String &p_inherits);
void remove_custom_type(const String &p_type);
const HashMap<String, Vector<CustomType>> &get_custom_types() const { return custom_types; }
const CustomType *get_custom_type_by_name(const String &p_name) const;
@@ -245,6 +242,7 @@ public:
void script_class_load_icon_paths();
EditorData();
+ ~EditorData();
};
/**
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp
index f464ca3b3c..e8e25bcf96 100644
--- a/editor/editor_dir_dialog.cpp
+++ b/editor/editor_dir_dialog.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_dir_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_dir_dialog.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 "editor_dir_dialog.h"
@@ -57,7 +57,7 @@ void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p
}
//this should be handled by EditorFileSystem already
- //bool show_hidden = EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files");
+ //bool show_hidden = EDITOR_GET("filesystem/file_dialog/show_hidden_files");
updating = false;
for (int i = 0; i < p_dir->get_subdir_count(); i++) {
TreeItem *ti = tree->create_item(p_item);
diff --git a/editor/editor_dir_dialog.h b/editor/editor_dir_dialog.h
index 95ca0d32b9..e8c5f6274f 100644
--- a/editor/editor_dir_dialog.h
+++ b/editor/editor_dir_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_dir_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_dir_dialog.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 EDITOR_DIR_DIALOG_H
#define EDITOR_DIR_DIALOG_H
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index 708173ea26..a83a53ad15 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_feature_profile.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_feature_profile.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 "editor_feature_profile.h"
@@ -47,6 +47,7 @@ const char *EditorFeatureProfile::feature_names[FEATURE_MAX] = {
TTRC("Node Dock"),
TTRC("FileSystem Dock"),
TTRC("Import Dock"),
+ TTRC("History Dock"),
};
const char *EditorFeatureProfile::feature_descriptions[FEATURE_MAX] = {
@@ -57,6 +58,7 @@ const char *EditorFeatureProfile::feature_descriptions[FEATURE_MAX] = {
TTRC("Allows to work with signals and groups of the node selected in the Scene dock."),
TTRC("Allows to browse the local file system via a dedicated dock."),
TTRC("Allows to configure import settings for individual assets. Requires the FileSystem dock to function."),
+ TTRC("Provides an overview of the editor's and each scene's undo history."),
};
const char *EditorFeatureProfile::feature_identifiers[FEATURE_MAX] = {
@@ -67,6 +69,7 @@ const char *EditorFeatureProfile::feature_identifiers[FEATURE_MAX] = {
"node_dock",
"filesystem_dock",
"import_dock",
+ "history_dock",
};
void EditorFeatureProfile::set_disable_class(const StringName &p_class, bool p_disabled) {
@@ -302,10 +305,15 @@ void EditorFeatureProfile::_bind_methods() {
BIND_ENUM_CONSTANT(FEATURE_NODE_DOCK);
BIND_ENUM_CONSTANT(FEATURE_FILESYSTEM_DOCK);
BIND_ENUM_CONSTANT(FEATURE_IMPORT_DOCK);
+ BIND_ENUM_CONSTANT(FEATURE_HISTORY_DOCK);
BIND_ENUM_CONSTANT(FEATURE_MAX);
}
-EditorFeatureProfile::EditorFeatureProfile() {}
+EditorFeatureProfile::EditorFeatureProfile() {
+ for (int i = 0; i < FEATURE_MAX; i++) {
+ features_disabled[i] = false;
+ }
+}
//////////////////////////
@@ -742,6 +750,8 @@ void EditorFeatureProfileManager::_update_selected_profile() {
class_list->clear();
String profile = _get_selected_profile();
+ profile_actions[PROFILE_SET]->set_disabled(profile == current_profile);
+
if (profile.is_empty()) { //nothing selected, nothing edited
property_list->clear();
edited.unref();
@@ -763,7 +773,7 @@ void EditorFeatureProfileManager::_update_selected_profile() {
TreeItem *root = class_list->create_item();
TreeItem *features = class_list->create_item(root);
- TreeItem *last_feature;
+ TreeItem *last_feature = nullptr;
features->set_text(0, TTR("Main Features:"));
for (int i = 0; i < EditorFeatureProfile::FEATURE_MAX; i++) {
TreeItem *feature;
diff --git a/editor/editor_feature_profile.h b/editor/editor_feature_profile.h
index dab6c951e4..3f70e03ca8 100644
--- a/editor/editor_feature_profile.h
+++ b/editor/editor_feature_profile.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_feature_profile.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_feature_profile.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 EDITOR_FEATURE_PROFILE_H
#define EDITOR_FEATURE_PROFILE_H
@@ -40,6 +40,8 @@
#include "scene/gui/split_container.h"
#include "scene/gui/tree.h"
+class EditorFileDialog;
+
class EditorFeatureProfile : public RefCounted {
GDCLASS(EditorFeatureProfile, RefCounted);
@@ -52,6 +54,7 @@ public:
FEATURE_NODE_DOCK,
FEATURE_FILESYSTEM_DOCK,
FEATURE_IMPORT_DOCK,
+ FEATURE_HISTORY_DOCK,
FEATURE_MAX
};
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 9fa08a0adb..bbd0a6bd70 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_file_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_file_dialog.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 "editor_file_dialog.h"
@@ -34,7 +34,6 @@
#include "core/io/file_access.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
-#include "core/string/print_string.h"
#include "dependency_editor.h"
#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
@@ -44,6 +43,10 @@
#include "scene/gui/center_container.h"
#include "scene/gui/label.h"
#include "scene/gui/margin_container.h"
+#include "scene/gui/option_button.h"
+#include "scene/gui/separator.h"
+#include "scene/gui/split_container.h"
+#include "scene/gui/texture_rect.h"
#include "servers/display_server.h"
EditorFileDialog::GetIconFunc EditorFileDialog::get_icon_func = nullptr;
@@ -131,11 +134,11 @@ void EditorFileDialog::_notification(int p_what) {
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- bool is_showing_hidden = EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files");
+ bool is_showing_hidden = EDITOR_GET("filesystem/file_dialog/show_hidden_files");
if (show_hidden_files != is_showing_hidden) {
set_show_hidden_files(is_showing_hidden);
}
- set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int());
+ set_display_mode((DisplayMode)EDITOR_GET("filesystem/file_dialog/display_mode").operator int());
// DO NOT CALL UPDATE FILE LIST HERE, ALL HUNDREDS OF HIDDEN DIALOGS WILL RESPOND, CALL INVALIDATE INSTEAD
invalidate();
@@ -740,7 +743,7 @@ void EditorFileDialog::update_file_name() {
// DO NOT USE THIS FUNCTION UNLESS NEEDED, CALL INVALIDATE() INSTEAD.
void EditorFileDialog::update_file_list() {
- int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
+ int thumbnail_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
thumbnail_size *= EDSCALE;
Ref<Texture2D> folder_thumbnail;
Ref<Texture2D> file_thumbnail;
@@ -1023,10 +1026,10 @@ void EditorFileDialog::set_current_path(const String &p_path) {
if (pos == -1) {
set_current_file(p_path);
} else {
- String dir = p_path.substr(0, pos);
- String file = p_path.substr(pos + 1, p_path.length());
- set_current_dir(dir);
- set_current_file(file);
+ String path_dir = p_path.substr(0, pos);
+ String path_file = p_path.substr(pos + 1, p_path.length());
+ set_current_dir(path_dir);
+ set_current_file(path_file);
}
}
@@ -1497,7 +1500,7 @@ void EditorFileDialog::_go_back() {
}
void EditorFileDialog::_go_forward() {
- if (local_history_pos == local_history.size() - 1) {
+ if (local_history_pos >= local_history.size() - 1) {
return;
}
@@ -1614,26 +1617,26 @@ void EditorFileDialog::set_default_display_mode(DisplayMode p_mode) {
}
void EditorFileDialog::_save_to_recent() {
- String dir = get_current_dir();
- Vector<String> recent = EditorSettings::get_singleton()->get_recent_dirs();
+ String cur_dir = get_current_dir();
+ Vector<String> recent_new = EditorSettings::get_singleton()->get_recent_dirs();
const int max = 20;
int count = 0;
- bool res = dir.begins_with("res://");
+ bool res = cur_dir.begins_with("res://");
- for (int i = 0; i < recent.size(); i++) {
- bool cres = recent[i].begins_with("res://");
- if (recent[i] == dir || (res == cres && count > max)) {
- recent.remove_at(i);
+ for (int i = 0; i < recent_new.size(); i++) {
+ bool cres = recent_new[i].begins_with("res://");
+ if (recent_new[i] == cur_dir || (res == cres && count > max)) {
+ recent_new.remove_at(i);
i--;
} else {
count++;
}
}
- recent.insert(0, dir);
+ recent_new.insert(0, cur_dir);
- EditorSettings::get_singleton()->set_recent_dirs(recent);
+ EditorSettings::get_singleton()->set_recent_dirs(recent_new);
}
void EditorFileDialog::set_disable_overwrite_warning(bool p_disable) {
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index 6d11cb10ed..021f2e6d4c 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -1,48 +1,45 @@
-/*************************************************************************/
-/* editor_file_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_file_dialog.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 EDITOR_FILE_DIALOG_H
#define EDITOR_FILE_DIALOG_H
#include "core/io/dir_access.h"
-#include "editor/plugins/editor_preview_plugins.h"
-#include "scene/gui/box_container.h"
#include "scene/gui/dialogs.h"
-#include "scene/gui/item_list.h"
-#include "scene/gui/line_edit.h"
-#include "scene/gui/option_button.h"
-#include "scene/gui/separator.h"
-#include "scene/gui/split_container.h"
-#include "scene/gui/texture_rect.h"
class DependencyRemoveDialog;
+class HSplitContainer;
+class ItemList;
+class OptionButton;
+class PopupMenu;
+class TextureRect;
class EditorFileDialog : public ConfirmationDialog {
GDCLASS(EditorFileDialog, ConfirmationDialog);
@@ -202,7 +199,6 @@ private:
void _select_drive(int p_idx);
void _dir_submitted(String p_dir);
- void _file_submitted(const String &p_file);
void _action_pressed();
void _save_confirm_pressed();
void _cancel_pressed();
@@ -240,6 +236,9 @@ protected:
static void _bind_methods();
public:
+ // Public for use with callable_mp.
+ void _file_submitted(const String &p_file);
+
void popup_file_dialog();
void clear_filters();
void add_filter(const String &p_filter, const String &p_description = "");
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 177bc6d2b2..16ecac4dac 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -1,37 +1,37 @@
-/*************************************************************************/
-/* editor_file_system.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_file_system.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 "editor_file_system.h"
#include "core/config/project_settings.h"
-#include "core/extension/native_extension_manager.h"
+#include "core/extension/gdextension_manager.h"
#include "core/io/file_access.h"
#include "core/io/resource_importer.h"
#include "core/io/resource_loader.h"
@@ -39,6 +39,7 @@
#include "core/object/worker_thread_pool.h"
#include "core/os/os.h"
#include "core/variant/variant_parser.h"
+#include "editor/editor_help.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "editor/editor_resource_preview.h"
@@ -46,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>();
@@ -168,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;
}
@@ -265,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();
@@ -432,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);
@@ -601,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);
@@ -619,7 +638,12 @@ bool EditorFileSystem::_update_scan_actions() {
if (_test_for_reimport(full_path, false)) {
//must reimport
reimports.push_back(full_path);
- reimports.append_array(_get_dependencies(full_path));
+ Vector<String> dependencies = _get_dependencies(full_path);
+ for (const String &dependency_path : dependencies) {
+ if (import_extensions.has(dependency_path.get_extension())) {
+ reimports.push_back(dependency_path);
+ }
+ }
} else {
//must not reimport, all was good
//update modified times, to avoid reimport
@@ -634,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;
@@ -690,7 +718,6 @@ void EditorFileSystem::scan() {
_update_extensions();
- abort_scan = false;
if (!use_threads) {
scanning = true;
scan_total = 0;
@@ -703,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());
@@ -836,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;
@@ -857,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);
}
@@ -886,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;
@@ -897,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";
}
@@ -906,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);
+ }
}
}
@@ -917,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> script = ResourceLoader::load(path);
- if (script == nullptr) {
- continue;
- }
- Vector<DocData::ClassDoc> docs = script->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);
}
@@ -1021,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";
}
@@ -1162,8 +1184,6 @@ void EditorFileSystem::scan_changes() {
scanning_changes = true;
scanning_changes_done = false;
- abort_scan = false;
-
if (!use_threads) {
if (filesystem) {
EditorProgressBG pr("sources", TTR("ScanSources"), 1000);
@@ -1173,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"));
}
}
@@ -1195,8 +1217,6 @@ void EditorFileSystem::_notification(int p_what) {
case NOTIFICATION_EXIT_TREE: {
Thread &active_thread = thread.is_started() ? thread : thread_sources;
if (use_threads && active_thread.is_started()) {
- //abort thread if in progress
- abort_scan = true;
while (scanning) {
OS::get_singleton()->delay_usec(1000);
}
@@ -1224,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()) {
@@ -1241,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;
}
@@ -1278,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) {
@@ -1490,42 +1516,63 @@ 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());
+ 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.
@@ -1536,13 +1583,16 @@ 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();
}
+}
- 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) {
@@ -1564,12 +1614,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;
}
@@ -1577,6 +1631,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) {
@@ -1610,6 +1666,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);
@@ -1629,8 +1686,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 {
@@ -1641,6 +1702,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
String importer_name;
HashMap<String, HashMap<StringName, Variant>> source_file_options;
+ HashMap<String, ResourceUID::ID> uids;
HashMap<String, String> base_paths;
for (int i = 0; i < p_files.size(); i++) {
Ref<ConfigFile> config;
@@ -1656,6 +1718,15 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
ERR_FAIL_V(ERR_FILE_CORRUPT);
}
+ ResourceUID::ID uid = ResourceUID::INVALID_ID;
+
+ if (config->has_section_key("remap", "uid")) {
+ String uidt = config->get_value("remap", "uid");
+ uid = ResourceUID::get_singleton()->text_to_id(uidt);
+ }
+
+ uids[p_files[i]] = uid;
+
source_file_options[p_files[i]] = HashMap<StringName, Variant>();
importer_name = file_importer_name;
@@ -1700,6 +1771,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
const String &file = E.key;
String base_path = ResourceFormatImporter::get_singleton()->get_import_base_path(file);
Vector<String> dest_paths;
+ ResourceUID::ID uid = uids[file];
{
Ref<FileAccess> f = FileAccess::open(file + ".import", FileAccess::WRITE);
ERR_FAIL_COND_V_MSG(f.is_null(), ERR_FILE_CANT_OPEN, "Cannot open import file '" + file + ".import'.");
@@ -1716,6 +1788,12 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
f->store_line("type=\"" + importer->get_resource_type() + "\"");
}
+ if (uid == ResourceUID::INVALID_ID) {
+ uid = ResourceUID::get_singleton()->create_id();
+ }
+
+ f->store_line("uid=\"" + ResourceUID::get_singleton()->id_to_text(uid) + "\""); // Store in readable format.
+
if (err == OK) {
String path = base_path + "." + importer->get_save_extension();
f->store_line("path=\"" + path + "\"");
@@ -1781,12 +1859,19 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
fs->files[cpos]->modified_time = FileAccess::get_modified_time(file);
fs->files[cpos]->import_modified_time = FileAccess::get_modified_time(file + ".import");
fs->files[cpos]->deps = _get_dependencies(file);
+ fs->files[cpos]->uid = uid;
fs->files[cpos]->type = importer->get_resource_type();
if (fs->files[cpos]->type == "" && textfile_extensions.has(file.get_extension())) {
fs->files[cpos]->type = "TextFile";
}
fs->files[cpos]->import_valid = err == OK;
+ if (ResourceUID::get_singleton()->has_id(uid)) {
+ ResourceUID::get_singleton()->set_id(uid, file);
+ } else {
+ ResourceUID::get_singleton()->add_id(uid, file);
+ }
+
//if file is currently up, maybe the source it was loaded from changed, so import math must be updated for it
//to reload properly
Ref<Resource> r = ResourceCache::get_ref(file);
@@ -1893,7 +1978,7 @@ void EditorFileSystem::_reimport_file(const String &p_file, const HashMap<String
if (load_default && ProjectSettings::get_singleton()->has_setting("importer_defaults/" + importer->get_importer_name())) {
//use defaults if exist
- Dictionary d = ProjectSettings::get_singleton()->get("importer_defaults/" + importer->get_importer_name());
+ Dictionary d = GLOBAL_GET("importer_defaults/" + importer->get_importer_name());
List<Variant> v;
d.get_key_list(&v);
@@ -1907,8 +1992,8 @@ void EditorFileSystem::_reimport_file(const String &p_file, const HashMap<String
List<String> import_variants;
List<String> gen_files;
- Variant metadata;
- Error err = importer->import(p_file, base_path, params, &import_variants, &gen_files, &metadata);
+ Variant meta;
+ Error err = importer->import(p_file, base_path, params, &import_variants, &gen_files, &meta);
if (err != OK) {
ERR_PRINT("Error importing '" + p_file + "'.");
@@ -1960,8 +2045,8 @@ void EditorFileSystem::_reimport_file(const String &p_file, const HashMap<String
f->store_line("valid=false");
}
- if (metadata != Variant()) {
- f->store_line("metadata=" + metadata.get_construct_string());
+ if (meta != Variant()) {
+ f->store_line("metadata=" + meta.get_construct_string());
}
f->store_line("");
@@ -2073,6 +2158,8 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
importing = true;
EditorProgress pr("reimport", TTR("(Re)Importing Assets"), p_files.size());
+ Vector<String> reloads;
+
Vector<ImportFile> reimport_files;
HashSet<String> groups_to_reimport;
@@ -2088,22 +2175,26 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
String group_file = ResourceFormatImporter::get_singleton()->get_import_group_file(file);
if (group_file_cache.has(file)) {
- //maybe the file itself is a group!
+ // Maybe the file itself is a group!
groups_to_reimport.insert(file);
- //groups do not belong to grups
+ // Groups do not belong to groups.
+ group_file = String();
+ } else if (groups_to_reimport.has(file)) {
+ // Groups do not belong to groups.
group_file = String();
} else if (!group_file.is_empty()) {
- //it's a group file, add group to import and skip this file
+ // It's a group file, add group to import and skip this file.
groups_to_reimport.insert(group_file);
} else {
- //it's a regular file
+ // It's a regular file.
ImportFile ifile;
ifile.path = file;
ResourceFormatImporter::get_singleton()->get_import_order_threads_and_importer(file, ifile.order, ifile.threaded, ifile.importer);
+ reloads.push_back(file);
reimport_files.push_back(ifile);
}
- //group may have changed, so also update group reference
+ // Group may have changed, so also update group reference.
EditorFileSystemDirectory *fs = nullptr;
int cpos = -1;
if (_find_file(file, &fs, cpos)) {
@@ -2113,14 +2204,18 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
reimport_files.sort();
- bool use_threads = GLOBAL_GET("editor/import/use_multiple_threads");
+ bool use_multiple_threads = GLOBAL_GET("editor/import/use_multiple_threads");
int from = 0;
for (int i = 0; i < reimport_files.size(); i++) {
- if (use_threads && reimport_files[i].threaded) {
+ if (groups_to_reimport.has(reimport_files[i].path)) {
+ continue;
+ }
+
+ if (use_multiple_threads && reimport_files[i].threaded) {
if (i + 1 == reimport_files.size() || reimport_files[i + 1].importer != reimport_files[from].importer) {
if (from - i == 0) {
- //single file, do not use threads
+ // Single file, do not use threads.
pr.step(reimport_files[i].path.get_file(), i);
_reimport_file(reimport_files[i].path);
} else {
@@ -2129,16 +2224,16 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
importer->import_threaded_begin();
- ImportThreadData data;
- data.max_index = from;
- data.reimport_from = from;
- data.reimport_files = reimport_files.ptr();
+ ImportThreadData tdata;
+ tdata.max_index = from;
+ tdata.reimport_from = from;
+ tdata.reimport_files = reimport_files.ptr();
- WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &EditorFileSystem::_reimport_thread, &data, i - from + 1, -1, false, vformat(TTR("Import resources of type: %s"), reimport_files[from].importer));
+ WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &EditorFileSystem::_reimport_thread, &tdata, i - from + 1, -1, false, vformat(TTR("Import resources of type: %s"), reimport_files[from].importer));
int current_index = from - 1;
do {
- if (current_index < data.max_index) {
- current_index = data.max_index;
+ if (current_index < tdata.max_index) {
+ current_index = tdata.max_index;
pr.step(reimport_files[current_index].path.get_file(), current_index);
}
OS::get_singleton()->delay_usec(1);
@@ -2158,20 +2253,25 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
}
}
- //reimport groups
+ // Reimport groups.
+
+ from = reimport_files.size();
if (groups_to_reimport.size()) {
HashMap<String, Vector<String>> group_files;
_find_group_files(filesystem, group_files, groups_to_reimport);
for (const KeyValue<String, Vector<String>> &E : group_files) {
+ pr.step(E.key.get_file(), from++);
Error err = _reimport_group(E.key, E.value);
+ reloads.push_back(E.key);
+ reloads.append_array(E.value);
if (err == OK) {
_reimport_file(E.key);
}
}
}
- ResourceUID::get_singleton()->update_cache(); //after reimporting, update the cache
+ ResourceUID::get_singleton()->update_cache(); // After reimporting, update the cache.
_save_filesystem_cache();
importing = false;
@@ -2179,7 +2279,7 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
emit_signal(SNAME("filesystem_changed"));
}
- emit_signal(SNAME("resources_reimported"), p_files);
+ emit_signal(SNAME("resources_reimported"), reloads);
}
Error EditorFileSystem::_resource_import(const String &p_path) {
@@ -2264,7 +2364,7 @@ void EditorFileSystem::move_group_file(const String &p_path, const String &p_new
ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const String &p_path, bool p_generate) {
if (!p_path.is_resource_file() || p_path.begins_with(ProjectSettings::get_singleton()->get_project_data_path())) {
- //saved externally (configuration file) or internal file, do not assign an ID.
+ // Saved externally (configuration file) or internal file, do not assign an ID.
return ResourceUID::INVALID_ID;
}
@@ -2272,15 +2372,21 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const
int cpos = -1;
if (!singleton->_find_file(p_path, &fs, cpos)) {
+ // Fallback to ResourceLoader if filesystem cache fails (can happen during scanning etc.).
+ ResourceUID::ID fallback = ResourceLoader::get_resource_uid(p_path);
+ if (fallback != ResourceUID::INVALID_ID) {
+ return fallback;
+ }
+
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;
}
@@ -2289,7 +2395,7 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const
static void _scan_extensions_dir(EditorFileSystemDirectory *d, HashSet<String> &extensions) {
int fc = d->get_file_count();
for (int i = 0; i < fc; i++) {
- if (d->get_file_type(i) == SNAME("NativeExtension")) {
+ if (d->get_file_type(i) == SNAME("GDExtension")) {
extensions.insert(d->get_file_path(i));
}
}
@@ -2310,19 +2416,19 @@ bool EditorFileSystem::_scan_extensions() {
Vector<String> extensions_removed;
for (const String &E : extensions) {
- if (!NativeExtensionManager::get_singleton()->is_extension_loaded(E)) {
+ if (!GDExtensionManager::get_singleton()->is_extension_loaded(E)) {
extensions_added.push_back(E);
}
}
- Vector<String> loaded_extensions = NativeExtensionManager::get_singleton()->get_loaded_extensions();
+ Vector<String> loaded_extensions = GDExtensionManager::get_singleton()->get_loaded_extensions();
for (int i = 0; i < loaded_extensions.size(); i++) {
if (!extensions.has(loaded_extensions[i])) {
extensions_removed.push_back(loaded_extensions[i]);
}
}
- String extension_list_config_file = NativeExtension::get_extension_list_config_file();
+ String extension_list_config_file = GDExtension::get_extension_list_config_file();
if (extensions.size()) {
if (extensions_added.size() || extensions_removed.size()) { //extensions were added or removed
Ref<FileAccess> f = FileAccess::open(extension_list_config_file, FileAccess::WRITE);
@@ -2339,18 +2445,18 @@ bool EditorFileSystem::_scan_extensions() {
bool needs_restart = false;
for (int i = 0; i < extensions_added.size(); i++) {
- NativeExtensionManager::LoadStatus st = NativeExtensionManager::get_singleton()->load_extension(extensions_added[i]);
- if (st == NativeExtensionManager::LOAD_STATUS_FAILED) {
+ GDExtensionManager::LoadStatus st = GDExtensionManager::get_singleton()->load_extension(extensions_added[i]);
+ if (st == GDExtensionManager::LOAD_STATUS_FAILED) {
EditorNode::get_singleton()->add_io_error("Error loading extension: " + extensions_added[i]);
- } else if (st == NativeExtensionManager::LOAD_STATUS_NEEDS_RESTART) {
+ } else if (st == GDExtensionManager::LOAD_STATUS_NEEDS_RESTART) {
needs_restart = true;
}
}
for (int i = 0; i < extensions_removed.size(); i++) {
- NativeExtensionManager::LoadStatus st = NativeExtensionManager::get_singleton()->unload_extension(extensions_removed[i]);
- if (st == NativeExtensionManager::LOAD_STATUS_FAILED) {
+ GDExtensionManager::LoadStatus st = GDExtensionManager::get_singleton()->unload_extension(extensions_removed[i]);
+ if (st == GDExtensionManager::LOAD_STATUS_FAILED) {
EditorNode::get_singleton()->add_io_error("Error removing extension: " + extensions_added[i]);
- } else if (st == NativeExtensionManager::LOAD_STATUS_NEEDS_RESTART) {
+ } else if (st == GDExtensionManager::LOAD_STATUS_NEEDS_RESTART) {
needs_restart = true;
}
}
@@ -2367,10 +2473,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")));
@@ -2387,7 +2493,7 @@ void EditorFileSystem::_update_extensions() {
valid_extensions.insert(E);
}
- const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false);
+ const Vector<String> textfile_ext = ((String)(EDITOR_GET("docks/filesystem/textfile_extensions"))).split(",", false);
for (const String &E : textfile_ext) {
if (valid_extensions.has(E)) {
continue;
@@ -2426,8 +2532,7 @@ EditorFileSystem::EditorFileSystem() {
using_fat32_or_exfat = (da->get_filesystem_type() == "FAT32" || da->get_filesystem_type() == "exFAT");
scan_total = 0;
- update_script_classes_queued.clear();
- ResourceUID::get_singleton()->clear(); //will be updated on scan
+ 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 f4e69b95e7..2490bd31b3 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_file_system.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_file_system.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 EDITOR_FILE_SYSTEM_H
#define 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;
@@ -168,7 +171,6 @@ class EditorFileSystem : public Node {
EditorFileSystemDirectory *new_filesystem = nullptr;
- bool abort_scan = false;
bool scanning = false;
bool importing = false;
bool first_scan = true;
@@ -190,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;
@@ -258,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;
@@ -313,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_folding.cpp b/editor/editor_folding.cpp
index d455e0248e..ae065aebf8 100644
--- a/editor/editor_folding.cpp
+++ b/editor/editor_folding.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_folding.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_folding.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 "editor_folding.h"
diff --git a/editor/editor_folding.h b/editor/editor_folding.h
index 9a2aa37b80..f3c2743bff 100644
--- a/editor/editor_folding.h
+++ b/editor/editor_folding.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_folding.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_folding.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 EDITOR_FOLDING_H
#define EDITOR_FOLDING_H
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index fffe77f1c4..dfcb083ef9 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_fonts.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_fonts.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 "editor_fonts.h"
@@ -41,7 +41,7 @@ Ref<FontFile> load_external_font(const String &p_path, TextServer::Hinting p_hin
Ref<FontFile> font;
font.instantiate();
- Vector<uint8_t> data = FileAccess::get_file_as_array(p_path);
+ Vector<uint8_t> data = FileAccess::get_file_as_bytes(p_path);
font->set_data(data);
font->set_multichannel_signed_distance_field(p_msdf);
@@ -57,6 +57,24 @@ Ref<FontFile> load_external_font(const String &p_path, TextServer::Hinting p_hin
return font;
}
+Ref<SystemFont> load_system_font(const PackedStringArray &p_names, TextServer::Hinting p_hinting, TextServer::FontAntialiasing p_aa, bool p_autohint, TextServer::SubpixelPositioning p_font_subpixel_positioning, bool p_msdf = false, TypedArray<Font> *r_fallbacks = nullptr) {
+ Ref<SystemFont> font;
+ font.instantiate();
+
+ font->set_font_names(p_names);
+ font->set_multichannel_signed_distance_field(p_msdf);
+ font->set_antialiasing(p_aa);
+ font->set_hinting(p_hinting);
+ font->set_force_autohinter(p_autohint);
+ font->set_subpixel_positioning(p_font_subpixel_positioning);
+
+ if (r_fallbacks != nullptr) {
+ r_fallbacks->push_back(font);
+ }
+
+ return font;
+}
+
Ref<FontFile> load_internal_font(const uint8_t *p_data, size_t p_size, TextServer::Hinting p_hinting, TextServer::FontAntialiasing p_aa, bool p_autohint, TextServer::SubpixelPositioning p_font_subpixel_positioning, bool p_msdf = false, TypedArray<Font> *r_fallbacks = nullptr) {
Ref<FontFile> font;
font.instantiate();
@@ -91,11 +109,12 @@ Ref<FontVariation> make_bold_font(const Ref<Font> &p_font, double p_embolden, Ty
void editor_register_fonts(Ref<Theme> p_theme) {
Ref<DirAccess> dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- TextServer::FontAntialiasing font_antialiasing = (TextServer::FontAntialiasing)(int)EditorSettings::get_singleton()->get("interface/editor/font_antialiasing");
- int font_hinting_setting = (int)EditorSettings::get_singleton()->get("interface/editor/font_hinting");
- TextServer::SubpixelPositioning font_subpixel_positioning = (TextServer::SubpixelPositioning)(int)EditorSettings::get_singleton()->get("interface/editor/font_subpixel_positioning");
+ TextServer::FontAntialiasing font_antialiasing = (TextServer::FontAntialiasing)(int)EDITOR_GET("interface/editor/font_antialiasing");
+ int font_hinting_setting = (int)EDITOR_GET("interface/editor/font_hinting");
+ TextServer::SubpixelPositioning font_subpixel_positioning = (TextServer::SubpixelPositioning)(int)EDITOR_GET("interface/editor/font_subpixel_positioning");
TextServer::Hinting font_hinting;
+ TextServer::Hinting font_mono_hinting;
switch (font_hinting_setting) {
case 0:
// The "Auto" setting uses the setting that best matches the OS' font rendering:
@@ -104,18 +123,23 @@ void editor_register_fonts(Ref<Theme> p_theme) {
// - Linux has configurable font hinting, but most distributions including Ubuntu default to "Light".
#ifdef MACOS_ENABLED
font_hinting = TextServer::HINTING_NONE;
+ font_mono_hinting = TextServer::HINTING_NONE;
#else
font_hinting = TextServer::HINTING_LIGHT;
+ font_mono_hinting = TextServer::HINTING_LIGHT;
#endif
break;
case 1:
font_hinting = TextServer::HINTING_NONE;
+ font_mono_hinting = TextServer::HINTING_NONE;
break;
case 2:
font_hinting = TextServer::HINTING_LIGHT;
+ font_mono_hinting = TextServer::HINTING_LIGHT;
break;
default:
font_hinting = TextServer::HINTING_NORMAL;
+ font_mono_hinting = TextServer::HINTING_LIGHT;
break;
}
@@ -160,16 +184,30 @@ void editor_register_fonts(Ref<Theme> p_theme) {
Ref<FontFile> thai_font_bold = load_internal_font(_font_NotoSansThaiUI_Bold, _font_NotoSansThaiUI_Bold_size, font_hinting, font_antialiasing, true, font_subpixel_positioning, false, &fallbacks_bold);
Ref<FontVariation> fallback_font_bold = make_bold_font(fallback_font, embolden_strength, &fallbacks_bold);
Ref<FontVariation> japanese_font_bold = make_bold_font(japanese_font, embolden_strength, &fallbacks_bold);
+
+ if (OS::get_singleton()->has_feature("system_fonts")) {
+ PackedStringArray emoji_font_names;
+ emoji_font_names.push_back("Apple Color Emoji");
+ emoji_font_names.push_back("Segoe UI Emoji");
+ emoji_font_names.push_back("Noto Color Emoji");
+ emoji_font_names.push_back("Twitter Color Emoji");
+ emoji_font_names.push_back("OpenMoji");
+ emoji_font_names.push_back("EmojiOne Color");
+ Ref<SystemFont> emoji_font = load_system_font(emoji_font_names, font_hinting, font_antialiasing, true, font_subpixel_positioning, false);
+ fallbacks.push_back(emoji_font);
+ fallbacks_bold.push_back(emoji_font);
+ }
+
default_font_bold->set_fallbacks(fallbacks_bold);
default_font_bold_msdf->set_fallbacks(fallbacks_bold);
- Ref<FontFile> default_font_mono = load_internal_font(_font_JetBrainsMono_Regular, _font_JetBrainsMono_Regular_size, font_hinting, font_antialiasing, true, font_subpixel_positioning);
+ Ref<FontFile> default_font_mono = load_internal_font(_font_JetBrainsMono_Regular, _font_JetBrainsMono_Regular_size, font_mono_hinting, font_antialiasing, true, font_subpixel_positioning);
default_font_mono->set_fallbacks(fallbacks);
// Init base font configs and load custom fonts.
- String custom_font_path = EditorSettings::get_singleton()->get("interface/editor/main_font");
- String custom_font_path_bold = EditorSettings::get_singleton()->get("interface/editor/main_font_bold");
- String custom_font_path_source = EditorSettings::get_singleton()->get("interface/editor/code_font");
+ String custom_font_path = EDITOR_GET("interface/editor/main_font");
+ String custom_font_path_bold = EDITOR_GET("interface/editor/main_font_bold");
+ String custom_font_path_source = EDITOR_GET("interface/editor/code_font");
Ref<FontVariation> default_fc;
default_fc.instantiate();
@@ -260,7 +298,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
Ref<FontVariation> mono_fc;
mono_fc.instantiate();
if (custom_font_path_source.length() > 0 && dir->file_exists(custom_font_path_source)) {
- Ref<FontFile> custom_font = load_external_font(custom_font_path_source, font_hinting, font_antialiasing, true, font_subpixel_positioning);
+ Ref<FontFile> custom_font = load_external_font(custom_font_path_source, font_mono_hinting, font_antialiasing, true, font_subpixel_positioning);
{
TypedArray<Font> fallback_custom;
fallback_custom.push_back(default_font_mono);
@@ -277,7 +315,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
Ref<FontVariation> mono_other_fc = mono_fc->duplicate();
// Enable contextual alternates (coding ligatures) and custom features for the source editor font.
- int ot_mode = EditorSettings::get_singleton()->get("interface/editor/code_font_contextual_ligatures");
+ int ot_mode = EDITOR_GET("interface/editor/code_font_contextual_ligatures");
switch (ot_mode) {
case 1: { // Disable ligatures.
Dictionary ftrs;
@@ -285,7 +323,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
mono_fc->set_opentype_features(ftrs);
} break;
case 2: { // Custom.
- Vector<String> subtag = String(EditorSettings::get_singleton()->get("interface/editor/code_font_custom_opentype_features")).split(",");
+ Vector<String> subtag = String(EDITOR_GET("interface/editor/code_font_custom_opentype_features")).split(",");
Dictionary ftrs;
for (int i = 0; i < subtag.size(); i++) {
Vector<String> subtag_a = subtag[i].split("=");
@@ -297,7 +335,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
}
mono_fc->set_opentype_features(ftrs);
} break;
- default: { // Default.
+ default: { // Enabled.
Dictionary ftrs;
ftrs[TS->name_to_tag("calt")] = 1;
mono_fc->set_opentype_features(ftrs);
@@ -311,6 +349,24 @@ void editor_register_fonts(Ref<Theme> p_theme) {
mono_other_fc->set_opentype_features(ftrs);
}
+ // Use fake bold/italics to style the editor log's `print_rich()` output.
+ // Use stronger embolden strength to make bold easier to distinguish from regular text.
+ Ref<FontVariation> mono_other_fc_bold = mono_other_fc->duplicate();
+ mono_other_fc_bold->set_variation_embolden(0.8);
+
+ Ref<FontVariation> mono_other_fc_italic = mono_other_fc->duplicate();
+ mono_other_fc_italic->set_variation_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0));
+
+ Ref<FontVariation> mono_other_fc_bold_italic = mono_other_fc->duplicate();
+ mono_other_fc_bold_italic->set_variation_embolden(0.8);
+ mono_other_fc_bold_italic->set_variation_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0));
+
+ Ref<FontVariation> mono_other_fc_mono = mono_other_fc->duplicate();
+ // Use a different font style to distinguish `[code]` in rich prints.
+ // This emulates the "faint" styling used in ANSI escape codes by using a slightly thinner font.
+ mono_other_fc_mono->set_variation_embolden(-0.25);
+ mono_other_fc_mono->set_variation_transform(Transform2D(1.0, 0.1, 0.0, 1.0, 0.0, 0.0));
+
Ref<FontVariation> italic_fc = default_fc->duplicate();
italic_fc->set_variation_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0));
@@ -380,6 +436,10 @@ void editor_register_fonts(Ref<Theme> p_theme) {
p_theme->set_font_size("output_source_size", "EditorFonts", int(EDITOR_GET("run/output/font_size")) * EDSCALE);
p_theme->set_font("output_source", "EditorFonts", mono_other_fc);
+ p_theme->set_font("output_source_bold", "EditorFonts", mono_other_fc_bold);
+ p_theme->set_font("output_source_italic", "EditorFonts", mono_other_fc_italic);
+ p_theme->set_font("output_source_bold_italic", "EditorFonts", mono_other_fc_bold_italic);
+ p_theme->set_font("output_source_mono", "EditorFonts", mono_other_fc_mono);
p_theme->set_font_size("status_source_size", "EditorFonts", default_font_size);
p_theme->set_font("status_source", "EditorFonts", mono_other_fc);
diff --git a/editor/editor_fonts.h b/editor/editor_fonts.h
index c8b60b0198..1705879f59 100644
--- a/editor/editor_fonts.h
+++ b/editor/editor_fonts.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_fonts.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_fonts.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 EDITOR_FONTS_H
#define EDITOR_FONTS_H
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 745dcdd04c..9b1a5e028b 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_help.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_help.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 "editor_help.h"
@@ -39,8 +39,9 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#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;
@@ -58,6 +59,8 @@ void EditorHelp::_update_theme() {
class_desc->add_theme_constant_override("line_separation", get_theme_constant(SNAME("line_separation"), SNAME("EditorHelp")));
class_desc->add_theme_constant_override("table_h_separation", get_theme_constant(SNAME("table_h_separation"), SNAME("EditorHelp")));
class_desc->add_theme_constant_override("table_v_separation", get_theme_constant(SNAME("table_v_separation"), SNAME("EditorHelp")));
+ class_desc->add_theme_constant_override("text_highlight_h_padding", get_theme_constant(SNAME("text_highlight_h_padding"), SNAME("EditorHelp")));
+ class_desc->add_theme_constant_override("text_highlight_v_padding", get_theme_constant(SNAME("text_highlight_v_padding"), SNAME("EditorHelp")));
doc_font = get_theme_font(SNAME("doc"), SNAME("EditorFonts"));
doc_bold_font = get_theme_font(SNAME("doc_bold"), SNAME("EditorFonts"));
@@ -184,28 +187,36 @@ void EditorHelp::_class_desc_input(const Ref<InputEvent> &p_input) {
void EditorHelp::_class_desc_resized(bool p_force_update_theme) {
// Add extra horizontal margins for better readability.
// The margins increase as the width of the editor help container increases.
- Ref<Font> doc_code_font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts"));
+ Ref<Font> font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts"));
int font_size = get_theme_font_size(SNAME("doc_source_size"), SNAME("EditorFonts"));
- real_t char_width = doc_code_font->get_char_size('x', font_size).width;
+ real_t char_width = font->get_char_size('x', font_size).width;
const int new_display_margin = MAX(30 * EDSCALE, get_parent_anchorable_rect().size.width - char_width * 120 * EDSCALE) * 0.5;
if (display_margin != new_display_margin || p_force_update_theme) {
display_margin = new_display_margin;
- Ref<StyleBox> class_desc_stylebox = EditorNode::get_singleton()->get_theme_base()->get_theme_stylebox(SNAME("normal"), SNAME("RichTextLabel"))->duplicate();
+ 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->add_theme_style_override("normal", class_desc_stylebox);
+ class_desc->add_theme_style_override("focused", class_desc_stylebox);
}
}
void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
- String t = p_type;
- if (t.is_empty()) {
- t = "void";
+ if (p_type.is_empty() || p_type == "void") {
+ class_desc->push_color(Color(type_color, 0.5));
+ class_desc->push_hint(TTR("No return value."));
+ class_desc->add_text("void");
+ class_desc->pop();
+ class_desc->pop();
+ return;
}
- bool can_ref = (t != "void" && !t.contains("*")) || !p_enum.is_empty();
- if (!p_enum.is_empty()) {
+ bool is_enum_type = !p_enum.is_empty();
+ bool can_ref = !p_type.contains("*") || is_enum_type;
+
+ String t = p_type;
+ if (is_enum_type) {
if (p_enum.get_slice_count(".") > 1) {
t = p_enum.get_slice(".", 1);
} else {
@@ -219,21 +230,24 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
if (t.ends_with("[]")) {
add_array = true;
t = t.replace("[]", "");
+
+ class_desc->push_meta("#Array"); //class
+ class_desc->add_text("Array");
+ class_desc->pop();
+ class_desc->add_text("[");
}
- if (p_enum.is_empty()) {
- class_desc->push_meta("#" + t); //class
- } else {
+
+ if (is_enum_type) {
class_desc->push_meta("$" + p_enum); //class
+ } else {
+ class_desc->push_meta("#" + t); //class
}
}
class_desc->add_text(t);
if (can_ref) {
- class_desc->pop();
+ class_desc->pop(); // Pushed meta above.
if (add_array) {
- class_desc->add_text(" ");
- class_desc->push_meta("#Array"); //class
- class_desc->add_text("[]");
- class_desc->pop();
+ class_desc->add_text("]");
}
}
class_desc->pop();
@@ -368,8 +382,29 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview
class_desc->pop();
if (!p_method.qualifiers.is_empty()) {
class_desc->push_color(qualifier_color);
- class_desc->add_text(" ");
- _add_text(p_method.qualifiers);
+
+ PackedStringArray qualifiers = p_method.qualifiers.split_spaces();
+ for (const String &qualifier : qualifiers) {
+ String hint;
+ if (qualifier == "vararg") {
+ hint = TTR("This method supports a variable number of arguments.");
+ } else if (qualifier == "virtual") {
+ hint = TTR("This method is called by the engine.\nIt can be overridden to customize built-in behavior.");
+ } else if (qualifier == "const") {
+ hint = TTR("This method has no side effects.\nIt does not modify the object in any way.");
+ } else if (qualifier == "static") {
+ hint = TTR("This method does not need an instance to be called.\nIt can be called directly using the class name.");
+ }
+
+ class_desc->add_text(" ");
+ if (!hint.is_empty()) {
+ class_desc->push_hint(hint);
+ class_desc->add_text(qualifier);
+ class_desc->pop();
+ } else {
+ class_desc->add_text(qualifier);
+ }
+ }
class_desc->pop();
}
@@ -411,14 +446,14 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
return OK;
}
-void EditorHelp::_update_method_list(const Vector<DocData::MethodDoc> p_methods, bool &r_method_descrpitons) {
- Ref<Font> doc_code_font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts"));
+void EditorHelp::_update_method_list(const Vector<DocData::MethodDoc> p_methods) {
+ Ref<Font> font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts"));
class_desc->pop(); // title font size
class_desc->pop(); // title font
class_desc->pop(); // title color
class_desc->add_newline();
- class_desc->push_font(doc_code_font);
+ class_desc->push_font(font);
class_desc->push_indent(1);
class_desc->push_table(2);
class_desc->set_table_column_expand(1, true);
@@ -461,10 +496,6 @@ void EditorHelp::_update_method_list(const Vector<DocData::MethodDoc> p_methods,
class_desc->pop(); //cell
}
- if (!m[i].description.strip_edges().is_empty() || m[i].errors_returned.size() > 0) {
- r_method_descrpitons = true;
- }
-
_add_method(m[i], true);
}
@@ -479,9 +510,8 @@ void EditorHelp::_update_method_list(const Vector<DocData::MethodDoc> p_methods,
}
void EditorHelp::_update_method_descriptions(const DocData::ClassDoc p_classdoc, const Vector<DocData::MethodDoc> p_methods, const String &p_method_type) {
- Ref<Font> doc_font = get_theme_font(SNAME("doc"), SNAME("EditorFonts"));
- Ref<Font> doc_bold_font = get_theme_font(SNAME("doc_bold"), SNAME("EditorFonts"));
- Ref<Font> doc_code_font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts"));
+ Ref<Font> font = get_theme_font(SNAME("doc"), SNAME("EditorFonts"));
+ Ref<Font> code_font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts"));
String link_color_text = title_color.to_html(false);
class_desc->pop(); // title font size
class_desc->pop(); // title font
@@ -501,7 +531,7 @@ void EditorHelp::_update_method_descriptions(const DocData::ClassDoc p_classdoc,
}
for (int i = 0; i < methods_filtered.size(); i++) {
- class_desc->push_font(doc_code_font);
+ class_desc->push_font(code_font);
_add_method(methods_filtered[i], false);
class_desc->pop();
@@ -509,7 +539,7 @@ void EditorHelp::_update_method_descriptions(const DocData::ClassDoc p_classdoc,
class_desc->add_newline();
class_desc->push_color(text_color);
- class_desc->push_font(doc_font);
+ class_desc->push_font(font);
class_desc->push_indent(1);
if (methods_filtered[i].errors_returned.size()) {
class_desc->append_text(TTR("Error codes returned:"));
@@ -683,11 +713,15 @@ void EditorHelp::_update_doc() {
class_desc->add_newline();
}
+ bool has_description = false;
+
class_desc->add_newline();
class_desc->add_newline();
// Brief description
if (!cd.brief_description.strip_edges().is_empty()) {
+ has_description = true;
+
class_desc->push_color(text_color);
class_desc->push_font(doc_bold_font);
class_desc->push_indent(1);
@@ -702,6 +736,8 @@ void EditorHelp::_update_doc() {
// Class description
if (!cd.description.strip_edges().is_empty()) {
+ has_description = true;
+
section_line.push_back(Pair<String, int>(TTR("Description"), class_desc->get_paragraph_count() - 2));
description_line = class_desc->get_paragraph_count() - 2;
class_desc->push_color(title_color);
@@ -726,6 +762,22 @@ void EditorHelp::_update_doc() {
class_desc->add_newline();
}
+ if (!has_description) {
+ class_desc->add_image(get_theme_icon(SNAME("Error"), SNAME("EditorIcons")));
+ class_desc->add_text(" ");
+ class_desc->push_color(comment_color);
+
+ if (cd.is_script_doc) {
+ class_desc->append_text(TTR("There is currently no description for this class."));
+ } else {
+ class_desc->append_text(TTR("There is currently no description for this class. Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text));
+ }
+
+ class_desc->pop();
+ class_desc->add_newline();
+ class_desc->add_newline();
+ }
+
// Online tutorials
if (cd.tutorials.size()) {
class_desc->push_color(title_color);
@@ -762,7 +814,6 @@ void EditorHelp::_update_doc() {
// Properties overview
HashSet<String> skip_methods;
- bool property_descr = false;
bool has_properties = cd.properties.size() != 0;
if (cd.is_script_doc) {
@@ -840,7 +891,6 @@ void EditorHelp::_update_doc() {
if (describe) {
class_desc->pop();
- property_descr = true;
}
class_desc->pop();
@@ -925,10 +975,7 @@ void EditorHelp::_update_doc() {
}
// Methods overview
- bool constructor_descriptions = false;
- bool method_descriptions = false;
- bool operator_descriptions = false;
- bool sort_methods = EditorSettings::get_singleton()->get("text_editor/help/sort_functions_alphabetically");
+ bool sort_methods = EDITOR_GET("text_editor/help/sort_functions_alphabetically");
Vector<DocData::MethodDoc> methods;
@@ -955,19 +1002,20 @@ void EditorHelp::_update_doc() {
class_desc->push_font(doc_title_font);
class_desc->push_font_size(doc_title_font_size);
class_desc->add_text(TTR("Constructors"));
- _update_method_list(cd.constructors, constructor_descriptions);
+ _update_method_list(cd.constructors);
}
if (!methods.is_empty()) {
if (sort_methods) {
methods.sort();
}
+
section_line.push_back(Pair<String, int>(TTR("Methods"), class_desc->get_paragraph_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
class_desc->push_font_size(doc_title_font_size);
class_desc->add_text(TTR("Methods"));
- _update_method_list(methods, method_descriptions);
+ _update_method_list(methods);
}
if (!cd.operators.is_empty()) {
@@ -980,7 +1028,7 @@ void EditorHelp::_update_doc() {
class_desc->push_font(doc_title_font);
class_desc->push_font_size(doc_title_font_size);
class_desc->add_text(TTR("Operators"));
- _update_method_list(cd.operators, operator_descriptions);
+ _update_method_list(cd.operators);
}
// Theme properties
@@ -1315,7 +1363,7 @@ void EditorHelp::_update_doc() {
if (constants[i].value.begins_with("Color(") && constants[i].value.ends_with(")")) {
String stripped = constants[i].value.replace(" ", "").replace("Color(", "").replace(")", "");
- Vector<float> color = stripped.split_floats(",");
+ PackedFloat64Array color = stripped.split_floats(",");
if (color.size() >= 3) {
class_desc->push_color(Color(color[0], color[1], color[2]));
_add_bulletpoint();
@@ -1473,7 +1521,7 @@ void EditorHelp::_update_doc() {
}
// Property descriptions
- if (property_descr) {
+ if (has_properties) {
section_line.push_back(Pair<String, int>(TTR("Property Descriptions"), class_desc->get_paragraph_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
@@ -1648,7 +1696,7 @@ void EditorHelp::_update_doc() {
}
// Constructor descriptions
- if (constructor_descriptions) {
+ if (!cd.constructors.is_empty()) {
section_line.push_back(Pair<String, int>(TTR("Constructor Descriptions"), class_desc->get_paragraph_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
@@ -1658,7 +1706,7 @@ void EditorHelp::_update_doc() {
}
// Method descriptions
- if (method_descriptions) {
+ if (!methods.is_empty()) {
section_line.push_back(Pair<String, int>(TTR("Method Descriptions"), class_desc->get_paragraph_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
@@ -1668,7 +1716,7 @@ void EditorHelp::_update_doc() {
}
// Operator descriptions
- if (operator_descriptions) {
+ if (!cd.operators.is_empty()) {
section_line.push_back(Pair<String, int>(TTR("Operator Descriptions"), class_desc->get_paragraph_count() - 2));
class_desc->push_color(title_color);
class_desc->push_font(doc_title_font);
@@ -1676,6 +1724,8 @@ void EditorHelp::_update_doc() {
class_desc->add_text(TTR("Operator Descriptions"));
_update_method_descriptions(cd, cd.operators, "operator");
}
+
+ // Free the scroll.
scroll_locked = false;
}
@@ -1766,9 +1816,19 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
Ref<Font> doc_code_font = p_owner_node->get_theme_font(SNAME("doc_source"), SNAME("EditorFonts"));
Ref<Font> doc_kbd_font = p_owner_node->get_theme_font(SNAME("doc_keyboard"), SNAME("EditorFonts"));
- Color link_color = p_owner_node->get_theme_color(SNAME("link_color"), SNAME("EditorHelp"));
- Color code_color = p_owner_node->get_theme_color(SNAME("code_color"), SNAME("EditorHelp"));
- Color kbd_color = p_owner_node->get_theme_color(SNAME("kbd_color"), SNAME("EditorHelp"));
+ const Color type_color = p_owner_node->get_theme_color(SNAME("type_color"), SNAME("EditorHelp"));
+ const Color code_color = p_owner_node->get_theme_color(SNAME("code_color"), SNAME("EditorHelp"));
+ const Color kbd_color = p_owner_node->get_theme_color(SNAME("kbd_color"), SNAME("EditorHelp"));
+ const Color code_dark_color = Color(code_color, 0.8);
+
+ const Color link_color = p_owner_node->get_theme_color(SNAME("link_color"), SNAME("EditorHelp"));
+ const Color link_method_color = p_owner_node->get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color link_property_color = link_color.lerp(p_owner_node->get_theme_color(SNAME("accent_color"), SNAME("Editor")), 0.25);
+ const Color link_annotation_color = link_color.lerp(p_owner_node->get_theme_color(SNAME("accent_color"), SNAME("Editor")), 0.5);
+
+ const Color code_bg_color = p_owner_node->get_theme_color(SNAME("code_bg_color"), SNAME("EditorHelp"));
+ const Color kbd_bg_color = p_owner_node->get_theme_color(SNAME("kbd_bg_color"), SNAME("EditorHelp"));
+ const Color param_bg_color = p_owner_node->get_theme_color(SNAME("param_bg_color"), SNAME("EditorHelp"));
String bbcode = p_bbcode.dedent().replace("\t", "").replace("\r", "").strip_edges();
@@ -1901,14 +1961,21 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
const String link_tag = tag.substr(0, tag_end);
const String link_target = tag.substr(tag_end + 1, tag.length()).lstrip(" ");
- // Use monospace font with translucent colored background color to make clickable references
+ // Use monospace font to make clickable references
// easier to distinguish from inline code and other text.
p_rt->push_font(doc_code_font);
- p_rt->push_color(link_color);
- p_rt->push_bgcolor(code_color * Color(1, 1, 1, 0.15));
+
+ Color target_color = link_color;
+ if (link_tag == "method") {
+ target_color = link_method_color;
+ } else if (link_tag == "member" || link_tag == "signal" || link_tag == "theme property") {
+ target_color = link_property_color;
+ } else if (link_tag == "annotation") {
+ target_color = link_annotation_color;
+ }
+ p_rt->push_color(target_color);
p_rt->push_meta("@" + link_tag + " " + link_target);
- p_rt->add_text(link_target + (tag.begins_with("method ") ? "()" : ""));
- p_rt->pop();
+ p_rt->add_text(link_target + (link_tag == "method" ? "()" : ""));
p_rt->pop();
p_rt->pop();
p_rt->pop();
@@ -1920,7 +1987,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
// Use monospace font with translucent background color to make code easier to distinguish from other text.
p_rt->push_font(doc_code_font);
- p_rt->push_bgcolor(Color(0.5, 0.5, 0.5, 0.15));
+ p_rt->push_bgcolor(param_bg_color);
p_rt->push_color(code_color);
p_rt->add_text(param_name);
p_rt->pop();
@@ -1931,17 +1998,15 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
} else if (doc->class_list.has(tag)) {
// Class reference tag such as [Node2D] or [SceneTree].
- // Use monospace font with translucent colored background color to make clickable references
+ // Use monospace font to make clickable references
// easier to distinguish from inline code and other text.
p_rt->push_font(doc_code_font);
- p_rt->push_color(link_color);
- p_rt->push_bgcolor(code_color * Color(1, 1, 1, 0.15));
+ p_rt->push_color(type_color);
p_rt->push_meta("#" + tag);
p_rt->add_text(tag);
p_rt->pop();
p_rt->pop();
p_rt->pop();
- p_rt->pop();
pos = brk_end + 1;
} else if (tag == "b") {
@@ -1955,30 +2020,30 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "code") {
- // Use monospace font with translucent background color to make code easier to distinguish from other text.
+ // Use monospace font with darkened background color to make code easier to distinguish from other text.
p_rt->push_font(doc_code_font);
- p_rt->push_bgcolor(Color(0.5, 0.5, 0.5, 0.15));
- p_rt->push_color(code_color);
+ p_rt->push_bgcolor(code_bg_color);
+ p_rt->push_color(code_color.lerp(p_owner_node->get_theme_color(SNAME("error_color"), SNAME("Editor")), 0.6));
code_tag = true;
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "codeblock") {
- // Use monospace font with translucent background color to make code easier to distinguish from other text.
+ // Use monospace font with darkened background color to make code easier to distinguish from other text.
// Use a single-column table with cell row background color instead of `[bgcolor]`.
// This makes the background color highlight cover the entire block, rather than individual lines.
p_rt->push_font(doc_code_font);
p_rt->push_table(1);
p_rt->push_cell();
- p_rt->set_cell_row_background_color(Color(0.5, 0.5, 0.5, 0.15), Color(0.5, 0.5, 0.5, 0.15));
+ p_rt->set_cell_row_background_color(code_bg_color, Color(code_bg_color, 0.99));
p_rt->set_cell_padding(Rect2(10 * EDSCALE, 10 * EDSCALE, 10 * EDSCALE, 10 * EDSCALE));
- p_rt->push_color(code_color);
+ p_rt->push_color(code_dark_color);
codeblock_tag = true;
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "kbd") {
// Use keyboard font with custom color and background color.
p_rt->push_font(doc_kbd_font);
- p_rt->push_bgcolor(Color(0.5, 0.5, 0.5, 0.15));
+ p_rt->push_bgcolor(kbd_bg_color);
p_rt->push_color(kbd_color);
code_tag = true; // Though not strictly a code tag, logic is similar.
pos = brk_end + 1;
@@ -2305,7 +2370,6 @@ EditorHelpBit::EditorHelpBit() {
rich_text = memnew(RichTextLabel);
add_child(rich_text);
rich_text->connect("meta_clicked", callable_mp(this, &EditorHelpBit::_meta_clicked));
- rich_text->set_override_selected_font_color(false);
rich_text->set_fit_content_height(true);
set_custom_minimum_size(Size2(0, 50 * EDSCALE));
}
@@ -2371,10 +2435,10 @@ void FindBar::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
find_prev->set_icon(get_theme_icon(SNAME("MoveUp"), SNAME("EditorIcons")));
find_next->set_icon(get_theme_icon(SNAME("MoveDown"), SNAME("EditorIcons")));
- hide_button->set_normal_texture(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
- hide_button->set_hover_texture(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
- hide_button->set_pressed_texture(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
- hide_button->set_custom_minimum_size(hide_button->get_normal_texture()->get_size());
+ hide_button->set_texture_normal(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
+ hide_button->set_texture_hover(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
+ hide_button->set_texture_pressed(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
+ hide_button->set_custom_minimum_size(hide_button->get_texture_normal()->get_size());
matches_label->add_theme_color_override("font_color", results_count > 0 ? get_theme_color(SNAME("font_color"), SNAME("Label")) : get_theme_color(SNAME("error_color"), SNAME("Editor")));
} break;
diff --git a/editor/editor_help.h b/editor/editor_help.h
index c9c1afb51b..9be17143c7 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_help.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_help.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 EDITOR_HELP_H
#define EDITOR_HELP_H
@@ -167,7 +167,7 @@ class EditorHelp : public VBoxContainer {
Error _goto_desc(const String &p_class, int p_vscr = -1);
//void _update_history_buttons();
- void _update_method_list(const Vector<DocData::MethodDoc> p_methods, bool &r_method_descrpitons);
+ void _update_method_list(const Vector<DocData::MethodDoc> p_methods);
void _update_method_descriptions(const DocData::ClassDoc p_classdoc, const Vector<DocData::MethodDoc> p_methods, const String &p_method_type);
void _update_doc();
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 129ad4d33b..b6f4e90cc5 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_help_search.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_help_search.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 "editor_help_search.h"
@@ -320,14 +320,25 @@ bool EditorHelpSearch::Runner::_phase_match_classes_init() {
matched_item = nullptr;
match_highest_score = 0;
+ terms = term.split_spaces();
+ if (terms.is_empty()) {
+ terms.append(term);
+ }
+
return true;
}
bool EditorHelpSearch::Runner::_phase_match_classes() {
+ if (!iterator_doc) {
+ return true;
+ }
+
DocData::ClassDoc &class_doc = iterator_doc->value;
if (class_doc.name.is_empty()) {
+ ++iterator_doc;
return false;
}
+
if (!_is_class_disabled_by_feature_profile(class_doc.name)) {
ClassMatch match;
match.doc = &class_doc;
@@ -344,62 +355,38 @@ bool EditorHelpSearch::Runner::_phase_match_classes() {
// Make an exception for annotations, since there are not that many of them.
if (term.length() > 1 || term == "@") {
if (search_flags & SEARCH_CONSTRUCTORS) {
- for (int i = 0; i < class_doc.constructors.size(); i++) {
- String method_name = (search_flags & SEARCH_CASE_SENSITIVE) ? class_doc.constructors[i].name : class_doc.constructors[i].name.to_lower();
- if (method_name.find(term) > -1 ||
- (term.begins_with(".") && method_name.begins_with(term.substr(1))) ||
- (term.ends_with("(") && method_name.ends_with(term.left(term.length() - 1).strip_edges())) ||
- (term.begins_with(".") && term.ends_with("(") && method_name == term.substr(1, term.length() - 2).strip_edges())) {
- match.constructors.push_back(const_cast<DocData::MethodDoc *>(&class_doc.constructors[i]));
- }
- }
+ _match_method_name_and_push_back(class_doc.constructors, &match.constructors);
}
if (search_flags & SEARCH_METHODS) {
- for (int i = 0; i < class_doc.methods.size(); i++) {
- String method_name = (search_flags & SEARCH_CASE_SENSITIVE) ? class_doc.methods[i].name : class_doc.methods[i].name.to_lower();
- if (method_name.find(term) > -1 ||
- (term.begins_with(".") && method_name.begins_with(term.substr(1))) ||
- (term.ends_with("(") && method_name.ends_with(term.left(term.length() - 1).strip_edges())) ||
- (term.begins_with(".") && term.ends_with("(") && method_name == term.substr(1, term.length() - 2).strip_edges())) {
- match.methods.push_back(const_cast<DocData::MethodDoc *>(&class_doc.methods[i]));
- }
- }
+ _match_method_name_and_push_back(class_doc.methods, &match.methods);
}
if (search_flags & SEARCH_OPERATORS) {
- for (int i = 0; i < class_doc.operators.size(); i++) {
- String method_name = (search_flags & SEARCH_CASE_SENSITIVE) ? class_doc.operators[i].name : class_doc.operators[i].name.to_lower();
- if (method_name.find(term) > -1 ||
- (term.begins_with(".") && method_name.begins_with(term.substr(1))) ||
- (term.ends_with("(") && method_name.ends_with(term.left(term.length() - 1).strip_edges())) ||
- (term.begins_with(".") && term.ends_with("(") && method_name == term.substr(1, term.length() - 2).strip_edges())) {
- match.operators.push_back(const_cast<DocData::MethodDoc *>(&class_doc.operators[i]));
- }
- }
+ _match_method_name_and_push_back(class_doc.operators, &match.operators);
}
if (search_flags & SEARCH_SIGNALS) {
for (int i = 0; i < class_doc.signals.size(); i++) {
- if (_match_string(term, class_doc.signals[i].name)) {
+ if (_all_terms_in_name(class_doc.signals[i].name)) {
match.signals.push_back(const_cast<DocData::MethodDoc *>(&class_doc.signals[i]));
}
}
}
if (search_flags & SEARCH_CONSTANTS) {
for (int i = 0; i < class_doc.constants.size(); i++) {
- if (_match_string(term, class_doc.constants[i].name)) {
+ if (_all_terms_in_name(class_doc.constants[i].name)) {
match.constants.push_back(const_cast<DocData::ConstantDoc *>(&class_doc.constants[i]));
}
}
}
if (search_flags & SEARCH_PROPERTIES) {
for (int i = 0; i < class_doc.properties.size(); i++) {
- if (_match_string(term, class_doc.properties[i].name) || _match_string(term, class_doc.properties[i].getter) || _match_string(term, class_doc.properties[i].setter)) {
+ if (_all_terms_in_name(class_doc.properties[i].name)) {
match.properties.push_back(const_cast<DocData::PropertyDoc *>(&class_doc.properties[i]));
}
}
}
if (search_flags & SEARCH_THEME_ITEMS) {
for (int i = 0; i < class_doc.theme_properties.size(); i++) {
- if (_match_string(term, class_doc.theme_properties[i].name)) {
+ if (_all_terms_in_name(class_doc.theme_properties[i].name)) {
match.theme_properties.push_back(const_cast<DocData::ThemeItemDoc *>(&class_doc.theme_properties[i]));
}
}
@@ -411,7 +398,6 @@ bool EditorHelpSearch::Runner::_phase_match_classes() {
}
}
}
- matches[class_doc.name] = match;
}
matches[class_doc.name] = match;
}
@@ -432,7 +418,7 @@ bool EditorHelpSearch::Runner::_phase_class_items_init() {
bool EditorHelpSearch::Runner::_phase_class_items() {
if (!iterator_match) {
- return false;
+ return true;
}
ClassMatch &match = iterator_match->value;
@@ -457,16 +443,18 @@ bool EditorHelpSearch::Runner::_phase_member_items_init() {
}
bool EditorHelpSearch::Runner::_phase_member_items() {
+ if (!iterator_match) {
+ return true;
+ }
+
ClassMatch &match = iterator_match->value;
- if (!match.doc) {
- return false;
- }
- if (match.doc->name.is_empty()) {
+ if (!match.doc || match.doc->name.is_empty()) {
+ ++iterator_match;
return false;
}
- TreeItem *parent = (search_flags & SEARCH_SHOW_HIERARCHY) ? class_items[match.doc->name] : root_item;
+ TreeItem *parent_item = (search_flags & SEARCH_SHOW_HIERARCHY) ? class_items[match.doc->name] : root_item;
bool constructor_created = false;
for (int i = 0; i < match.methods.size(); i++) {
String text = match.methods[i]->name;
@@ -480,23 +468,23 @@ bool EditorHelpSearch::Runner::_phase_member_items() {
continue;
}
}
- _create_method_item(parent, match.doc, text, match.methods[i]);
+ _create_method_item(parent_item, match.doc, text, match.methods[i]);
}
for (int i = 0; i < match.signals.size(); i++) {
- _create_signal_item(parent, match.doc, match.signals[i]);
+ _create_signal_item(parent_item, match.doc, match.signals[i]);
}
for (int i = 0; i < match.constants.size(); i++) {
- _create_constant_item(parent, match.doc, match.constants[i]);
+ _create_constant_item(parent_item, match.doc, match.constants[i]);
}
for (int i = 0; i < match.properties.size(); i++) {
- _create_property_item(parent, match.doc, match.properties[i]);
+ _create_property_item(parent_item, match.doc, match.properties[i]);
}
for (int i = 0; i < match.theme_properties.size(); i++) {
- _create_theme_property_item(parent, match.doc, match.theme_properties[i]);
+ _create_theme_property_item(parent_item, match.doc, match.theme_properties[i]);
}
for (int i = 0; i < match.annotations.size(); i++) {
// Hide the redundant leading @ symbol.
- _create_annotation_item(parent, match.doc, match.annotations[i]->name.substr(1), match.annotations[i]);
+ _create_annotation_item(parent_item, match.doc, match.annotations[i]->name.substr(1), match.annotations[i]);
}
++iterator_match;
@@ -510,6 +498,28 @@ bool EditorHelpSearch::Runner::_phase_select_match() {
return true;
}
+void EditorHelpSearch::Runner::_match_method_name_and_push_back(Vector<DocData::MethodDoc> &p_methods, Vector<DocData::MethodDoc *> *r_match_methods) {
+ // Constructors, Methods, Operators...
+ for (int i = 0; i < p_methods.size(); i++) {
+ String method_name = (search_flags & SEARCH_CASE_SENSITIVE) ? p_methods[i].name : p_methods[i].name.to_lower();
+ if (_all_terms_in_name(method_name) ||
+ (term.begins_with(".") && method_name.begins_with(term.substr(1))) ||
+ (term.ends_with("(") && method_name.ends_with(term.left(term.length() - 1).strip_edges())) ||
+ (term.begins_with(".") && term.ends_with("(") && method_name == term.substr(1, term.length() - 2).strip_edges())) {
+ r_match_methods->push_back(const_cast<DocData::MethodDoc *>(&p_methods[i]));
+ }
+ }
+}
+
+bool EditorHelpSearch::Runner::_all_terms_in_name(String name) {
+ for (int i = 0; i < terms.size(); i++) {
+ if (!_match_string(terms[i], name)) {
+ return false;
+ }
+ }
+ return true;
+}
+
bool EditorHelpSearch::Runner::_match_string(const String &p_term, const String &p_string) const {
if (search_flags & SEARCH_CASE_SENSITIVE) {
return p_string.find(p_term) > -1;
@@ -561,19 +571,19 @@ TreeItem *EditorHelpSearch::Runner::_create_class_hierarchy(const ClassMatch &p_
}
// Ensure parent nodes are created first.
- TreeItem *parent = root_item;
+ TreeItem *parent_item = root_item;
if (!p_match.doc->inherits.is_empty()) {
if (class_items.has(p_match.doc->inherits)) {
- parent = class_items[p_match.doc->inherits];
+ parent_item = class_items[p_match.doc->inherits];
} else {
ClassMatch &base_match = matches[p_match.doc->inherits];
if (base_match.doc) {
- parent = _create_class_hierarchy(base_match);
+ parent_item = _create_class_hierarchy(base_match);
}
}
}
- TreeItem *class_item = _create_class_item(parent, p_match.doc, !p_match.name);
+ TreeItem *class_item = _create_class_item(parent_item, p_match.doc, !p_match.name);
class_items[p_match.doc->name] = class_item;
return class_item;
}
diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h
index efd8645cd7..6e71d788e7 100644
--- a/editor/editor_help_search.h
+++ b/editor/editor_help_search.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_help_search.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_help_search.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 EDITOR_HELP_SEARCH_H
#define EDITOR_HELP_SEARCH_H
@@ -119,6 +119,7 @@ class EditorHelpSearch::Runner : public RefCounted {
Control *ui_service = nullptr;
Tree *results_tree = nullptr;
String term;
+ Vector<String> terms;
int search_flags;
Ref<Texture2D> empty_icon;
@@ -145,6 +146,8 @@ class EditorHelpSearch::Runner : public RefCounted {
String _build_method_tooltip(const DocData::ClassDoc *p_class_doc, const DocData::MethodDoc *p_doc) const;
+ void _match_method_name_and_push_back(Vector<DocData::MethodDoc> &p_methods, Vector<DocData::MethodDoc *> *r_match_methods);
+ bool _all_terms_in_name(String name);
bool _match_string(const String &p_term, const String &p_string) const;
void _match_item(TreeItem *p_item, const String &p_text);
TreeItem *_create_class_hierarchy(const ClassMatch &p_match);
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index f001887ef9..035bd96f4d 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1,47 +1,48 @@
-/*************************************************************************/
-/* editor_inspector.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_inspector.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 "editor_inspector.h"
-#include "array_property_edit.h"
#include "core/os/keyboard.h"
-#include "dictionary_property_edit.h"
#include "editor/doc_tools.h"
#include "editor/editor_feature_profile.h"
#include "editor/editor_node.h"
#include "editor/editor_property_name_processor.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
+#include "editor/inspector_dock.h"
#include "editor/plugins/script_editor_plugin.h"
#include "multi_node_edit.h"
-#include "scene/gui/center_container.h"
+#include "scene/gui/spin_box.h"
+#include "scene/gui/texture_rect.h"
#include "scene/property_utils.h"
#include "scene/resources/packed_scene.h"
@@ -426,6 +427,9 @@ void EditorProperty::_set_read_only(bool p_read_only) {
void EditorProperty::set_read_only(bool p_read_only) {
read_only = p_read_only;
+ if (GDVIRTUAL_CALL(_set_read_only, p_read_only)) {
+ return;
+ }
_set_read_only(p_read_only);
}
@@ -458,7 +462,7 @@ StringName EditorProperty::_get_revert_property() const {
return property;
}
-void EditorProperty::update_revert_and_pin_status() {
+void EditorProperty::update_editor_property_status() {
if (property == StringName()) {
return; //no property, so nothing to do
}
@@ -469,15 +473,26 @@ void EditorProperty::update_revert_and_pin_status() {
CRASH_COND(!node);
new_pinned = node->is_property_pinned(property);
}
+
Variant current = object->get(_get_revert_property());
bool new_can_revert = EditorPropertyRevert::can_property_revert(object, property, &current) && !is_read_only();
- if (new_can_revert != can_revert || new_pinned != pinned) {
+ bool new_checked = checked;
+ if (checkable) { // for properties like theme overrides.
+ bool valid = false;
+ Variant value = object->get(property, &valid);
+ if (valid) {
+ new_checked = value.get_type() != Variant::NIL;
+ }
+ }
+
+ if (new_can_revert != can_revert || new_pinned != pinned || new_checked != checked) {
if (new_can_revert != can_revert) {
emit_signal(SNAME("property_can_revert_changed"), property, new_can_revert);
}
can_revert = new_can_revert;
pinned = new_pinned;
+ checked = new_checked;
queue_redraw();
}
}
@@ -603,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) {
@@ -645,6 +660,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
}
if (keying_rect.has_point(mpos)) {
+ accept_event();
emit_signal(SNAME("property_keyed"), property, use_keying_next());
if (use_keying_next()) {
@@ -668,10 +684,12 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
}
}
if (delete_rect.has_point(mpos)) {
+ accept_event();
emit_signal(SNAME("property_deleted"), property);
}
if (revert_rect.has_point(mpos)) {
+ accept_event();
bool is_valid_revert = false;
Variant revert_value = EditorPropertyRevert::get_property_revert_value(object, property, &is_valid_revert);
ERR_FAIL_COND(!is_valid_revert);
@@ -680,11 +698,13 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
}
if (check_rect.has_point(mpos)) {
+ accept_event();
checked = !checked;
queue_redraw();
emit_signal(SNAME("property_checked"), property, checked);
}
} else if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) {
+ accept_event();
_update_popup();
menu->set_position(get_screen_position() + get_local_mouse_position());
menu->reset_size();
@@ -702,11 +722,11 @@ void EditorProperty::shortcut_input(const Ref<InputEvent> &p_event) {
const Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed()) {
- if (ED_IS_SHORTCUT("property_editor/copy_property", p_event)) {
- menu_option(MENU_COPY_PROPERTY);
+ if (ED_IS_SHORTCUT("property_editor/copy_value", p_event)) {
+ menu_option(MENU_COPY_VALUE);
accept_event();
- } else if (ED_IS_SHORTCUT("property_editor/paste_property", p_event) && !is_read_only()) {
- menu_option(MENU_PASTE_PROPERTY);
+ } else if (ED_IS_SHORTCUT("property_editor/paste_value", p_event) && !is_read_only()) {
+ menu_option(MENU_PASTE_VALUE);
accept_event();
} else if (ED_IS_SHORTCUT("property_editor/copy_property_path", p_event)) {
menu_option(MENU_COPY_PROPERTY_PATH);
@@ -769,9 +789,9 @@ Variant EditorProperty::get_drag_data(const Point2 &p_point) {
dp["property"] = property;
dp["value"] = object->get(property);
- Label *label = memnew(Label);
- label->set_text(property);
- set_drag_preview(label);
+ Label *drag_label = memnew(Label);
+ drag_label->set_text(property);
+ set_drag_preview(drag_label);
return dp;
}
@@ -901,10 +921,10 @@ Control *EditorProperty::make_custom_tooltip(const String &p_text) const {
void EditorProperty::menu_option(int p_option) {
switch (p_option) {
- case MENU_COPY_PROPERTY: {
+ case MENU_COPY_VALUE: {
InspectorDock::get_inspector_singleton()->set_property_clipboard(object->get(property));
} break;
- case MENU_PASTE_PROPERTY: {
+ case MENU_PASTE_VALUE: {
emit_changed(property, InspectorDock::get_inspector_singleton()->get_property_clipboard());
} break;
case MENU_COPY_PROPERTY_PATH: {
@@ -974,7 +994,9 @@ void EditorProperty::_bind_methods() {
ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "focusable_idx")));
GDVIRTUAL_BIND(_update_property)
- ClassDB::bind_method(D_METHOD("_update_revert_and_pin_status"), &EditorProperty::update_revert_and_pin_status);
+ GDVIRTUAL_BIND(_set_read_only, "read_only")
+
+ ClassDB::bind_method(D_METHOD("_update_editor_property_status"), &EditorProperty::update_editor_property_status);
}
EditorProperty::EditorProperty() {
@@ -997,10 +1019,10 @@ void EditorProperty::_update_popup() {
add_child(menu);
menu->connect("id_pressed", callable_mp(this, &EditorProperty::menu_option));
}
- menu->add_icon_shortcut(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")), ED_GET_SHORTCUT("property_editor/copy_property"), MENU_COPY_PROPERTY);
- menu->add_icon_shortcut(get_theme_icon(SNAME("ActionPaste"), SNAME("EditorIcons")), ED_GET_SHORTCUT("property_editor/paste_property"), MENU_PASTE_PROPERTY);
+ menu->add_icon_shortcut(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")), ED_GET_SHORTCUT("property_editor/copy_value"), MENU_COPY_VALUE);
+ menu->add_icon_shortcut(get_theme_icon(SNAME("ActionPaste"), SNAME("EditorIcons")), ED_GET_SHORTCUT("property_editor/paste_value"), MENU_PASTE_VALUE);
menu->add_icon_shortcut(get_theme_icon(SNAME("CopyNodePath"), SNAME("EditorIcons")), ED_GET_SHORTCUT("property_editor/copy_property_path"), MENU_COPY_PROPERTY_PATH);
- menu->set_item_disabled(MENU_PASTE_PROPERTY, is_read_only());
+ menu->set_item_disabled(MENU_PASTE_VALUE, is_read_only());
if (!pin_hidden) {
menu->add_separator();
if (can_pin) {
@@ -1045,11 +1067,9 @@ void EditorInspectorPlugin::add_property_editor_for_multiple_properties(const St
}
bool EditorInspectorPlugin::can_handle(Object *p_object) {
- bool success;
- if (GDVIRTUAL_CALL(_can_handle, p_object, success)) {
- return success;
- }
- return false;
+ bool success = false;
+ GDVIRTUAL_CALL(_can_handle, p_object, success);
+ return success;
}
void EditorInspectorPlugin::parse_begin(Object *p_object) {
@@ -1065,11 +1085,9 @@ void EditorInspectorPlugin::parse_group(Object *p_object, const String &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 ret;
- if (GDVIRTUAL_CALL(_parse_property, p_object, p_type, p_path, p_hint, p_hint_text, p_usage, p_wide, ret)) {
- return ret;
- }
- return false;
+ 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;
}
void EditorInspectorPlugin::parse_end(Object *p_object) {
@@ -1127,11 +1145,10 @@ Control *EditorInspectorCategory::make_custom_tooltip(const String &p_text) cons
}
Size2 EditorInspectorCategory::get_minimum_size() const {
- Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Tree"));
- int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Tree"));
+ Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
+ int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
Size2 ms;
- ms.width = 1;
ms.height = font->get_height(font_size);
if (icon.is_valid()) {
ms.height = MAX(icon->get_height(), ms.height);
@@ -1155,6 +1172,36 @@ void EditorInspectorSection::_test_unfold() {
}
}
+Ref<Texture2D> EditorInspectorSection::_get_arrow() {
+ Ref<Texture2D> arrow;
+ if (foldable) {
+ if (object->editor_is_section_unfolded(section)) {
+ arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree"));
+ } else {
+ if (is_layout_rtl()) {
+ arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree"));
+ } else {
+ arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree"));
+ }
+ }
+ }
+ return arrow;
+}
+
+int EditorInspectorSection::_get_header_height() {
+ Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
+ int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
+
+ int header_height = font->get_height(font_size);
+ Ref<Texture2D> arrow = _get_arrow();
+ if (arrow.is_valid()) {
+ header_height = MAX(header_height, arrow->get_height());
+ }
+ header_height += get_theme_constant(SNAME("v_separation"), SNAME("Tree"));
+
+ return header_height;
+}
+
void EditorInspectorSection::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
@@ -1165,30 +1212,6 @@ void EditorInspectorSection::_notification(int p_what) {
if (!vbox_added) {
return;
}
- // Get the section header font.
- Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
- int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
-
- // Get the right direction arrow texture, if the section is foldable.
- Ref<Texture2D> arrow;
- if (foldable) {
- if (object->editor_is_section_unfolded(section)) {
- arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree"));
- } else {
- if (is_layout_rtl()) {
- arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree"));
- } else {
- arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree"));
- }
- }
- }
-
- // Compute the height of the section header.
- int header_height = font->get_height(font_size);
- if (arrow.is_valid()) {
- header_height = MAX(header_height, arrow->get_height());
- }
- header_height += get_theme_constant(SNAME("v_separation"), SNAME("Tree"));
int inspector_margin = get_theme_constant(SNAME("inspector_margin"), SNAME("Editor"));
int section_indent_size = get_theme_constant(SNAME("indent_size"), SNAME("EditorInspectorSection"));
@@ -1201,6 +1224,7 @@ void EditorInspectorSection::_notification(int p_what) {
}
Size2 size = get_size() - Vector2(inspector_margin, 0);
+ int header_height = _get_header_height();
Vector2 offset = Vector2(is_layout_rtl() ? 0 : inspector_margin, header_height);
for (int i = 0; i < get_child_count(); i++) {
Control *c = Object::cast_to<Control>(get_child(i));
@@ -1216,36 +1240,6 @@ void EditorInspectorSection::_notification(int p_what) {
} break;
case NOTIFICATION_DRAW: {
- // Get the section header font.
- Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
- int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
- Color font_color = get_theme_color(SNAME("font_color"), SNAME("Editor"));
-
- // Get the right direction arrow texture, if the section is foldable.
- Ref<Texture2D> arrow;
- bool folded = foldable;
- if (foldable) {
- if (object->editor_is_section_unfolded(section)) {
- arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree"));
- folded = false;
- } else {
- if (is_layout_rtl()) {
- arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree"));
- } else {
- arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree"));
- }
- }
- }
-
- bool rtl = is_layout_rtl();
-
- // Compute the height and width of the section header.
- int header_height = font->get_height(font_size);
- if (arrow.is_valid()) {
- header_height = MAX(header_height, arrow->get_height());
- }
- header_height += get_theme_constant(SNAME("v_separation"), SNAME("Tree"));
-
int section_indent = 0;
int section_indent_size = get_theme_constant(SNAME("indent_size"), SNAME("EditorInspectorSection"));
if (indent_depth > 0 && section_indent_size > 0) {
@@ -1258,11 +1252,13 @@ void EditorInspectorSection::_notification(int p_what) {
int header_width = get_size().width - section_indent;
int header_offset_x = 0.0;
+ bool rtl = is_layout_rtl();
if (!rtl) {
header_offset_x += section_indent;
}
// Draw header area.
+ int header_height = _get_header_height();
Rect2 header_rect = Rect2(Vector2(header_offset_x, 0.0), Vector2(header_width, header_height));
Color c = bg_color;
c.a *= 0.4;
@@ -1271,7 +1267,7 @@ void EditorInspectorSection::_notification(int p_what) {
}
draw_rect(header_rect, c);
- // Draw header title, folding arrow and coutn of revertable properties.
+ // Draw header title, folding arrow and count of revertable properties.
{
int separation = Math::round(2 * EDSCALE);
@@ -1279,6 +1275,7 @@ void EditorInspectorSection::_notification(int p_what) {
int margin_end = separation;
// - Arrow.
+ Ref<Texture2D> arrow = _get_arrow();
if (arrow.is_valid()) {
Point2 arrow_position;
if (rtl) {
@@ -1296,6 +1293,13 @@ void EditorInspectorSection::_notification(int p_what) {
// - Count of revertable properties.
String num_revertable_str;
int num_revertable_width = 0;
+
+ bool folded = foldable && !object->editor_is_section_unfolded(section);
+
+ Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
+ int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
+ Color font_color = get_theme_color(SNAME("font_color"), SNAME("Editor"));
+
if (folded && revertable_properties.size()) {
int label_width = font->get_string_size(label, HORIZONTAL_ALIGNMENT_LEFT, available, font_size, TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_CONSTRAIN_ELLIPSIS).x;
@@ -1357,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();
@@ -1464,12 +1452,16 @@ void EditorInspectorSection::gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) {
- Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Tree"));
- int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Tree"));
- if (mb->get_position().y > font->get_height(font_size)) { //clicked outside
- return;
+ if (object->editor_is_section_unfolded(section)) {
+ int header_height = _get_header_height();
+
+ if (mb->get_position().y >= header_height) {
+ return;
+ }
}
+ accept_event();
+
bool should_unfold = !object->editor_is_section_unfolded(section);
if (should_unfold) {
unfold();
@@ -1560,9 +1552,9 @@ int EditorInspectorArray::_get_array_count() {
return _extract_properties_as_array(object_property_list).size();
} else if (mode == MODE_USE_COUNT_PROPERTY) {
bool valid;
- int count = object->get(count_property, &valid);
+ int count_val = object->get(count_property, &valid);
ERR_FAIL_COND_V_MSG(!valid, 0, vformat("%s is not a valid property to be used as array count.", count_property));
- return count;
+ return count_val;
}
return 0;
}
@@ -1651,6 +1643,10 @@ void EditorInspectorArray::_panel_draw(int p_index) {
void EditorInspectorArray::_panel_gui_input(Ref<InputEvent> p_event, int p_index) {
ERR_FAIL_INDEX(p_index, (int)array_elements.size());
+ if (read_only) {
+ return;
+ }
+
Ref<InputEventKey> key_ref = p_event;
if (key_ref.is_valid()) {
const InputEventKey &key = **key_ref;
@@ -1664,6 +1660,7 @@ void EditorInspectorArray::_panel_gui_input(Ref<InputEvent> p_event, int p_index
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
if (movable && mb->get_button_index() == MouseButton::RIGHT) {
+ array_elements[p_index].panel->accept_event();
popup_array_index_pressed = begin_array_index + p_index;
rmb_popup->set_item_disabled(OPTION_MOVE_UP, popup_array_index_pressed == 0);
rmb_popup->set_item_disabled(OPTION_MOVE_DOWN, popup_array_index_pressed == count - 1);
@@ -1683,12 +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);
}
+ 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;
@@ -1826,13 +1824,14 @@ void EditorInspectorArray::_move_element(int p_element_index, int p_to_pos) {
}
void EditorInspectorArray::_clear_array() {
+ 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;
@@ -1878,6 +1877,7 @@ void EditorInspectorArray::_resize_array(int p_size) {
return;
}
+ 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) {
@@ -1885,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;
@@ -1904,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;
@@ -2049,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));
@@ -2151,7 +2151,7 @@ void EditorInspectorArray::drop_data_fw(const Point2 &p_point, const Variant &p_
}
bool EditorInspectorArray::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
- if (!movable) {
+ if (!movable || read_only) {
return false;
}
// First, update drawing.
@@ -2220,17 +2220,9 @@ 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"));
}
-void EditorInspectorArray::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
void EditorInspectorArray::setup_with_move_element_function(Object *p_object, String p_label, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable, bool p_movable, bool p_numbered, int p_page_length, const String &p_add_item_text) {
count_property = "";
mode = MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION;
@@ -2271,7 +2263,9 @@ VBoxContainer *EditorInspectorArray::get_vbox(int p_index) {
}
}
-EditorInspectorArray::EditorInspectorArray() {
+EditorInspectorArray::EditorInspectorArray(bool p_read_only) {
+ read_only = p_read_only;
+
set_mouse_filter(Control::MOUSE_FILTER_STOP);
odd_style.instantiate();
@@ -2297,6 +2291,7 @@ EditorInspectorArray::EditorInspectorArray() {
add_button = EditorInspector::create_inspector_action_button(TTR("Add Element"));
add_button->connect("pressed", callable_mp(this, &EditorInspectorArray::_add_button_pressed));
+ add_button->set_disabled(read_only);
vbox->add_child(add_button);
control_dropping = memnew(Control);
@@ -2317,6 +2312,7 @@ EditorInspectorArray::EditorInspectorArray() {
new_size_spin_box->set_max(16384);
new_size_spin_box->connect("value_changed", callable_mp(this, &EditorInspectorArray::_new_size_spin_box_value_changed));
new_size_spin_box->get_line_edit()->connect("text_submitted", callable_mp(this, &EditorInspectorArray::_new_size_spin_box_text_submitted));
+ new_size_spin_box->set_editable(!read_only);
resize_dialog_vbox->add_margin_child(TTRC("New Size:"), new_size_spin_box);
vbox->connect("visibility_changed", callable_mp(this, &EditorInspectorArray::_vbox_visibility_changed));
@@ -2489,10 +2485,6 @@ Button *EditorInspector::create_inspector_action_button(const String &p_text) {
return button;
}
-void EditorInspector::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
String EditorInspector::get_selected_path() const {
return property_selected;
}
@@ -2504,7 +2496,7 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, EditorIn
if (ep) {
ep->object = object;
- ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed));
+ ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed).bind(false));
ep->connect("property_keyed", callable_mp(this, &EditorInspector::_property_keyed));
ep->connect("property_deleted", callable_mp(this, &EditorInspector::_property_deleted), CONNECT_DEFERRED);
ep->connect("property_keyed_with_value", callable_mp(this, &EditorInspector::_property_keyed_with_value));
@@ -2544,7 +2536,7 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, EditorIn
ep->set_read_only(read_only);
ep->update_property();
ep->_update_pin_flags();
- ep->update_revert_and_pin_status();
+ ep->update_editor_property_status();
ep->set_deletable(deletable_properties);
ep->update_cache();
}
@@ -2745,13 +2737,13 @@ void EditorInspector::update_tree() {
// Set the category icon.
if (!EditorNode::get_editor_data().is_type_recognized(type) && p.hint_string.length() && FileAccess::exists(p.hint_string)) {
// If we have a category inside a script, search for the first script with a valid icon.
- Ref<Script> script = ResourceLoader::load(p.hint_string, "Script");
+ Ref<Script> scr = ResourceLoader::load(p.hint_string, "Script");
StringName base_type;
StringName name;
- if (script.is_valid()) {
- base_type = script->get_instance_base_type();
- name = EditorNode::get_editor_data().script_class_get_name(script->get_path());
- Vector<DocData::ClassDoc> docs = script->get_documentation();
+ if (scr.is_valid()) {
+ base_type = scr->get_instance_base_type();
+ name = EditorNode::get_editor_data().script_class_get_name(scr->get_path());
+ Vector<DocData::ClassDoc> docs = scr->get_documentation();
if (!docs.is_empty()) {
doc_name = docs[0].name;
}
@@ -2759,20 +2751,20 @@ void EditorInspector::update_tree() {
label = name;
}
}
- while (script.is_valid()) {
- name = EditorNode::get_editor_data().script_class_get_name(script->get_path());
+ while (scr.is_valid()) {
+ name = EditorNode::get_editor_data().script_class_get_name(scr->get_path());
String icon_path = EditorNode::get_editor_data().script_class_get_icon_path(name);
if (name != StringName() && !icon_path.is_empty()) {
category->icon = ResourceLoader::load(icon_path, "Texture");
break;
}
- const EditorData::CustomType *ctype = EditorNode::get_editor_data().get_custom_type_by_path(script->get_path());
+ const EditorData::CustomType *ctype = EditorNode::get_editor_data().get_custom_type_by_path(scr->get_path());
if (ctype) {
category->icon = ctype->icon;
break;
}
- script = script->get_base_script();
+ scr = scr->get_base_script();
}
if (category->icon.is_null() && has_theme_icon(base_type, SNAME("EditorIcons"))) {
category->icon = get_theme_icon(base_type, SNAME("EditorIcons"));
@@ -3030,7 +3022,7 @@ void EditorInspector::update_tree() {
bool movable = true;
bool numbered = false;
bool foldable = use_folding;
- String add_button_text;
+ String add_button_text = TTR("Add Element");
String swap_method;
for (int i = (p.type == Variant::NIL ? 1 : 2); i < class_name_components.size(); i++) {
if (class_name_components[i].begins_with("page_size") && class_name_components[i].get_slice_count("=") == 2) {
@@ -3051,25 +3043,22 @@ void EditorInspector::update_tree() {
if (p.type == Variant::NIL) {
// Setup the array to use a method to create/move/delete elements.
array_element_prefix = class_name_components[0];
- editor_inspector_array = memnew(EditorInspectorArray);
+ editor_inspector_array = memnew(EditorInspectorArray(all_read_only));
String array_label = path.contains("/") ? path.substr(path.rfind("/") + 1) : path;
array_label = EditorPropertyNameProcessor::get_singleton()->process_name(property_label_string, property_name_style);
int page = per_array_page.has(array_element_prefix) ? per_array_page[array_element_prefix] : 0;
editor_inspector_array->setup_with_move_element_function(object, array_label, array_element_prefix, page, c, use_folding);
editor_inspector_array->connect("page_change_request", callable_mp(this, &EditorInspector::_page_change_request).bind(array_element_prefix));
- editor_inspector_array->set_undo_redo(undo_redo);
} else if (p.type == Variant::INT) {
// Setup the array to use the count property and built-in functions to create/move/delete elements.
if (class_name_components.size() >= 2) {
array_element_prefix = class_name_components[1];
- editor_inspector_array = memnew(EditorInspectorArray);
+ editor_inspector_array = memnew(EditorInspectorArray(all_read_only));
int page = per_array_page.has(array_element_prefix) ? per_array_page[array_element_prefix] : 0;
editor_inspector_array->setup_with_count_property(object, class_name_components[0], p.name, array_element_prefix, page, c, foldable, movable, numbered, page_size, add_button_text, swap_method);
editor_inspector_array->connect("page_change_request", callable_mp(this, &EditorInspector::_page_change_request).bind(array_element_prefix));
-
- editor_inspector_array->set_undo_redo(undo_redo);
}
}
@@ -3102,11 +3091,24 @@ void EditorInspector::update_tree() {
// Build the doc hint, to use as tooltip.
// Get the class name.
- StringName classname = doc_name == "" ? object->get_class_name() : doc_name;
+ StringName classname = doc_name;
if (!object_class.is_empty()) {
classname = object_class;
} else if (Object::cast_to<MultiNodeEdit>(object)) {
classname = Object::cast_to<MultiNodeEdit>(object)->get_edited_class_name();
+ } else if (classname == "") {
+ classname = object->get_class_name();
+ Resource *res = Object::cast_to<Resource>(object);
+ if (res && !res->get_script().is_null()) {
+ // Grab the script of this resource to get the evaluated script class.
+ Ref<Script> scr = res->get_script();
+ if (scr.is_valid()) {
+ Vector<DocData::ClassDoc> docs = scr->get_documentation();
+ if (!docs.is_empty()) {
+ classname = docs[0].name;
+ }
+ }
+ }
}
StringName propname = property_prefix + p.name;
@@ -3203,6 +3205,7 @@ void EditorInspector::update_tree() {
// Use the existing one.
ep->set_label(property_label_string);
}
+
for (int j = 0; j < properties.size(); j++) {
String prop = properties[j];
@@ -3250,7 +3253,7 @@ void EditorInspector::update_tree() {
ep->set_doc_path(doc_info.path);
ep->update_property();
ep->_update_pin_flags();
- ep->update_revert_and_pin_status();
+ ep->update_editor_property_status();
ep->update_cache();
if (current_selected && ep->property == current_selected) {
@@ -3289,7 +3292,7 @@ void EditorInspector::update_property(const String &p_prop) {
for (EditorProperty *E : editor_property_map[p_prop]) {
E->update_property();
- E->update_revert_and_pin_status();
+ E->update_editor_property_status();
E->update_cache();
}
}
@@ -3439,7 +3442,7 @@ void EditorInspector::expand_revertable() {
}
}
- // Climb up the hierachy doing double buffering with the sets.
+ // Climb up the hierarchy doing double buffering with the sets.
int a = 0;
int b = 1;
while (sections_to_unfold[a].size()) {
@@ -3545,7 +3548,8 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
}
}
- 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, "");
@@ -3632,7 +3636,7 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
if (editor_property_map.has(p_name)) {
for (EditorProperty *E : editor_property_map[p_name]) {
- E->update_revert_and_pin_status();
+ E->update_editor_property_status();
}
}
}
@@ -3665,6 +3669,7 @@ void EditorInspector::_multiple_properties_changed(Vector<String> p_paths, Array
}
names += p_paths[i];
}
+ 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, "");
@@ -3699,6 +3704,7 @@ void EditorInspector::_property_deleted(const String &p_path) {
if (p_path.begins_with("metadata/")) {
String name = p_path.replace_first("metadata/", "");
+ 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));
@@ -3746,7 +3752,7 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) {
for (EditorProperty *E : editor_property_map[p_path]) {
E->set_checked(p_checked);
E->update_property();
- E->update_revert_and_pin_status();
+ E->update_editor_property_status();
E->update_cache();
}
}
@@ -3764,25 +3770,17 @@ void EditorInspector::_property_pinned(const String &p_path, bool p_pinned) {
Node *node = Object::cast_to<Node>(object);
ERR_FAIL_COND(!node);
- 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_revert_and_pin_status");
- undo_redo->add_undo_method(E->get(), "_update_revert_and_pin_status");
- }
- }
- undo_redo->commit_action();
- } else {
- node->set_property_pinned(p_path, p_pinned);
- if (editor_property_map.has(p_path)) {
- for (List<EditorProperty *>::Element *E = editor_property_map[p_path].front(); E; E = E->next()) {
- E->get()->update_revert_and_pin_status();
- }
+ 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) {
@@ -3852,7 +3850,7 @@ void EditorInspector::_notification(int p_what) {
update_scroll_request = -1;
}
if (update_tree_pending) {
- refresh_countdown = float(EditorSettings::get_singleton()->get("docks/property_editor/auto_refresh_interval"));
+ refresh_countdown = float(EDITOR_GET("docks/property_editor/auto_refresh_interval"));
} else if (refresh_countdown > 0) {
refresh_countdown -= get_process_delta_time();
if (refresh_countdown <= 0) {
@@ -3860,12 +3858,12 @@ void EditorInspector::_notification(int p_what) {
for (EditorProperty *E : F.value) {
if (E && !E->is_cache_valid()) {
E->update_property();
- E->update_revert_and_pin_status();
+ E->update_editor_property_status();
E->update_cache();
}
}
}
- refresh_countdown = float(EditorSettings::get_singleton()->get("docks/property_editor/auto_refresh_interval"));
+ refresh_countdown = float(EDITOR_GET("docks/property_editor/auto_refresh_interval"));
}
}
@@ -3882,7 +3880,7 @@ void EditorInspector::_notification(int p_what) {
if (editor_property_map.has(prop)) {
for (EditorProperty *E : editor_property_map[prop]) {
E->update_property();
- E->update_revert_and_pin_status();
+ E->update_editor_property_status();
E->update_cache();
}
}
@@ -3961,6 +3959,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);
+ 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);
@@ -3975,13 +3974,7 @@ void EditorInspector::_check_meta_name(const String &p_name) {
} else if (!p_name.is_valid_identifier()) {
error = TTR("Metadata name must be a valid identifier.");
} else if (object->has_meta(p_name)) {
- Node *node = Object::cast_to<Node>(object);
- if (node) {
- error = vformat(TTR("Metadata with name \"%s\" already exists on \"%s\"."), p_name, node->get_name());
- } else {
- // This should normally never be reached, but the error is set just in case.
- error = vformat(TTR("Metadata with name \"%s\" already exists."), p_name, node->get_name());
- }
+ error = vformat(TTR("Metadata with name \"%s\" already exists."), p_name);
} else if (p_name[0] == '_') {
error = TTR("Names starting with _ are reserved for editor-only metadata.");
}
@@ -4001,14 +3994,6 @@ void EditorInspector::_show_add_meta_dialog() {
if (!add_meta_dialog) {
add_meta_dialog = memnew(ConfirmationDialog);
- Node *node = Object::cast_to<Node>(object);
- if (node) {
- add_meta_dialog->set_title(vformat(TTR("Add Metadata Property for \"%s\""), node->get_name()));
- } else {
- // This should normally never be reached, but the title is set just in case.
- add_meta_dialog->set_title(vformat(TTR("Add Metadata Property"), node->get_name()));
- }
-
VBoxContainer *vbc = memnew(VBoxContainer);
add_meta_dialog->add_child(vbc);
HBoxContainer *hbc = memnew(HBoxContainer);
@@ -4038,6 +4023,14 @@ void EditorInspector::_show_add_meta_dialog() {
add_meta_name->connect("text_changed", callable_mp(this, &EditorInspector::_check_meta_name));
}
+ Node *node = Object::cast_to<Node>(object);
+ if (node) {
+ add_meta_dialog->set_title(vformat(TTR("Add Metadata Property for \"%s\""), node->get_name()));
+ } else {
+ // This should normally be reached when the object is derived from Resource.
+ add_meta_dialog->set_title(vformat(TTR("Add Metadata Property for \"%s\""), object->get_class()));
+ }
+
add_meta_dialog->popup_centered();
add_meta_name->set_text("");
_check_meta_name("");
@@ -4046,6 +4039,7 @@ void EditorInspector::_show_add_meta_dialog() {
void EditorInspector::_bind_methods() {
ClassDB::bind_method("_edit_request_change", &EditorInspector::_edit_request_change);
+ ClassDB::bind_method("get_selected_path", &EditorInspector::get_selected_path);
ADD_SIGNAL(MethodInfo("property_selected", PropertyInfo(Variant::STRING, "property")));
ADD_SIGNAL(MethodInfo("property_keyed", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), PropertyInfo(Variant::BOOL, "advance")));
@@ -4076,13 +4070,13 @@ EditorInspector::EditorInspector() {
get_v_scroll_bar()->connect("value_changed", callable_mp(this, &EditorInspector::_vscroll_changed));
update_scroll_request = -1;
if (EditorSettings::get_singleton()) {
- refresh_countdown = float(EditorSettings::get_singleton()->get("docks/property_editor/auto_refresh_interval"));
+ refresh_countdown = float(EDITOR_GET("docks/property_editor/auto_refresh_interval"));
} else {
//used when class is created by the docgen to dump default values of everything bindable, editorsettings may not be created
refresh_countdown = 0.33;
}
- ED_SHORTCUT("property_editor/copy_property", TTR("Copy Property"), KeyModifierMask::CMD_OR_CTRL | Key::C);
- ED_SHORTCUT("property_editor/paste_property", TTR("Paste Property"), KeyModifierMask::CMD_OR_CTRL | Key::V);
+ ED_SHORTCUT("property_editor/copy_value", TTR("Copy Value"), KeyModifierMask::CMD_OR_CTRL | Key::C);
+ ED_SHORTCUT("property_editor/paste_value", TTR("Paste Value"), KeyModifierMask::CMD_OR_CTRL | Key::V);
ED_SHORTCUT("property_editor/copy_property_path", TTR("Copy Property Path"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::C);
}
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index d634eae23f..699a88e657 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -1,47 +1,49 @@
-/*************************************************************************/
-/* editor_inspector.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_inspector.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 EDITOR_INSPECTOR_H
#define EDITOR_INSPECTOR_H
-#include "editor/editor_undo_redo_manager.h"
#include "editor_property_name_processor.h"
#include "scene/gui/box_container.h"
-#include "scene/gui/button.h"
-#include "scene/gui/dialogs.h"
-#include "scene/gui/line_edit.h"
-#include "scene/gui/option_button.h"
-#include "scene/gui/panel_container.h"
#include "scene/gui/scroll_container.h"
-#include "scene/gui/spin_box.h"
-#include "scene/gui/texture_rect.h"
+
+class AcceptDialog;
+class Button;
+class ConfirmationDialog;
+class LineEdit;
+class OptionButton;
+class PanelContainer;
+class PopupMenu;
+class SpinBox;
+class TextureRect;
class EditorPropertyRevert {
public:
@@ -58,8 +60,8 @@ class EditorProperty : public Container {
public:
enum MenuItems {
- MENU_COPY_PROPERTY,
- MENU_PASTE_PROPERTY,
+ MENU_COPY_VALUE,
+ MENU_PASTE_VALUE,
MENU_COPY_PROPERTY_PATH,
MENU_PIN_VALUE,
MENU_OPEN_DOCUMENTATION,
@@ -120,6 +122,8 @@ private:
HashMap<StringName, Variant> cache;
GDVIRTUAL0(_update_property)
+ GDVIRTUAL1(_set_read_only, bool)
+
void _update_pin_flags();
protected:
@@ -151,7 +155,7 @@ public:
void set_doc_path(const String &p_doc_path);
virtual void update_property();
- void update_revert_and_pin_status();
+ void update_editor_property_status();
virtual bool use_keying_next() const;
@@ -272,10 +276,13 @@ class EditorInspectorSection : public Container {
Timer *dropping_unfold_timer = nullptr;
bool dropping = false;
+ bool dropping_for_unfold = false;
HashSet<StringName> revertable_properties;
void _test_unfold();
+ int _get_header_height();
+ Ref<Texture2D> _get_arrow();
protected:
Object *object = nullptr;
@@ -303,8 +310,6 @@ public:
class EditorInspectorArray : public EditorInspectorSection {
GDCLASS(EditorInspectorArray, EditorInspectorSection);
- Ref<EditorUndoRedoManager> undo_redo;
-
enum Mode {
MODE_NONE,
MODE_USE_COUNT_PROPERTY,
@@ -333,6 +338,7 @@ class EditorInspectorArray : public EditorInspectorSection {
int begin_array_index = 0;
int end_array_index = 0;
+ bool read_only = false;
bool movable = true;
bool numbered = false;
@@ -398,13 +404,11 @@ protected:
static void _bind_methods();
public:
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
-
void setup_with_move_element_function(Object *p_object, String p_label, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable, bool p_movable = true, bool p_numbered = false, int p_page_length = 5, const String &p_add_item_text = "");
void setup_with_count_property(Object *p_object, String p_label, const StringName &p_count_property, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable, bool p_movable = true, bool p_numbered = false, int p_page_length = 5, const String &p_add_item_text = "", const String &p_swap_method = "");
VBoxContainer *get_vbox(int p_index);
- EditorInspectorArray();
+ EditorInspectorArray(bool p_read_only);
};
class EditorPaginator : public HBoxContainer {
@@ -438,7 +442,6 @@ public:
class EditorInspector : public ScrollContainer {
GDCLASS(EditorInspector, ScrollContainer);
- Ref<EditorUndoRedoManager> undo_redo;
enum {
MAX_PLUGINS = 1024
};
@@ -552,8 +555,6 @@ public:
static EditorProperty *instantiate_property_editor(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false);
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
-
String get_selected_path() const;
void update_tree();
diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp
index 886e29a504..3f788627f4 100644
--- a/editor/editor_layouts_dialog.cpp
+++ b/editor/editor_layouts_dialog.cpp
@@ -1,38 +1,39 @@
-/*************************************************************************/
-/* editor_layouts_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_layouts_dialog.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 "editor_layouts_dialog.h"
#include "core/io/config_file.h"
#include "core/object/class_db.h"
#include "core/os/keyboard.h"
+#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "scene/gui/item_list.h"
#include "scene/gui/line_edit.h"
@@ -97,6 +98,11 @@ void EditorLayoutsDialog::_post_popup() {
for (const String &E : layouts) {
layout_names->add_item(E);
}
+ if (name->is_visible()) {
+ name->grab_focus();
+ } else {
+ layout_names->grab_focus();
+ }
}
EditorLayoutsDialog::EditorLayoutsDialog() {
@@ -106,7 +112,9 @@ EditorLayoutsDialog::EditorLayoutsDialog() {
makevb->set_anchor_and_offset(SIDE_RIGHT, Control::ANCHOR_END, -5);
layout_names = memnew(ItemList);
- makevb->add_child(layout_names);
+ layout_names->set_auto_height(true);
+ makevb->add_margin_child(TTR("Select existing layout:"), layout_names);
+ layout_names->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
layout_names->set_visible(true);
layout_names->set_offset(SIDE_TOP, 5);
layout_names->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5);
@@ -116,8 +124,10 @@ EditorLayoutsDialog::EditorLayoutsDialog() {
layout_names->set_allow_rmb_select(true);
name = memnew(LineEdit);
+ name->set_placeholder("Or enter new layout name");
makevb->add_child(name);
name->set_offset(SIDE_TOP, 5);
+ name->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
name->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5);
name->set_anchor_and_offset(SIDE_RIGHT, Control::ANCHOR_END, -5);
name->connect("gui_input", callable_mp(this, &EditorLayoutsDialog::_line_gui_input));
diff --git a/editor/editor_layouts_dialog.h b/editor/editor_layouts_dialog.h
index a597ac38cc..80a7ed0b53 100644
--- a/editor/editor_layouts_dialog.h
+++ b/editor/editor_layouts_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_layouts_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_layouts_dialog.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 EDITOR_LAYOUTS_DIALOG_H
#define EDITOR_LAYOUTS_DIALOG_H
diff --git a/editor/editor_locale_dialog.cpp b/editor/editor_locale_dialog.cpp
index 87da67fb05..5a372412fa 100644
--- a/editor/editor_locale_dialog.cpp
+++ b/editor/editor_locale_dialog.cpp
@@ -1,37 +1,36 @@
-/*************************************************************************/
-/* editor_locale_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_locale_dialog.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 "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"
@@ -123,7 +122,7 @@ void EditorLocaleDialog::_filter_lang_option_changed() {
Array f_lang_all;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/language_filter")) {
- f_lang_all = ProjectSettings::get_singleton()->get("internationalization/locale/language_filter");
+ f_lang_all = GLOBAL_GET("internationalization/locale/language_filter");
prev = f_lang_all;
}
@@ -141,6 +140,7 @@ void EditorLocaleDialog::_filter_lang_option_changed() {
f_lang_all.sort();
+ 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);
@@ -149,22 +149,22 @@ void EditorLocaleDialog::_filter_lang_option_changed() {
void EditorLocaleDialog::_filter_script_option_changed() {
TreeItem *t = script_list->get_edited();
- String script = t->get_metadata(0);
+ String scr_code = t->get_metadata(0);
bool checked = t->is_checked(0);
Variant prev;
Array f_script_all;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/script_filter")) {
- f_script_all = ProjectSettings::get_singleton()->get("internationalization/locale/script_filter");
+ f_script_all = GLOBAL_GET("internationalization/locale/script_filter");
prev = f_script_all;
}
- int l_idx = f_script_all.find(script);
+ int l_idx = f_script_all.find(scr_code);
if (checked) {
if (l_idx == -1) {
- f_script_all.append(script);
+ f_script_all.append(scr_code);
}
} else {
if (l_idx != -1) {
@@ -174,6 +174,7 @@ void EditorLocaleDialog::_filter_script_option_changed() {
f_script_all.sort();
+ 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);
@@ -189,7 +190,7 @@ void EditorLocaleDialog::_filter_cnt_option_changed() {
Array f_cnt_all;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/country_filter")) {
- f_cnt_all = ProjectSettings::get_singleton()->get("internationalization/locale/country_filter");
+ f_cnt_all = GLOBAL_GET("internationalization/locale/country_filter");
prev = f_cnt_all;
}
@@ -207,6 +208,7 @@ void EditorLocaleDialog::_filter_cnt_option_changed() {
f_cnt_all.sort();
+ 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);
@@ -218,9 +220,10 @@ void EditorLocaleDialog::_filter_mode_changed(int p_mode) {
Variant prev;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter_mode")) {
- prev = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter_mode");
+ prev = GLOBAL_GET("internationalization/locale/locale_filter_mode");
}
+ 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);
@@ -238,19 +241,19 @@ void EditorLocaleDialog::_update_tree() {
int filter = SHOW_ALL_LOCALES;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter_mode")) {
- filter = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter_mode");
+ filter = GLOBAL_GET("internationalization/locale/locale_filter_mode");
}
Array f_lang_all;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/language_filter")) {
- f_lang_all = ProjectSettings::get_singleton()->get("internationalization/locale/language_filter");
+ f_lang_all = GLOBAL_GET("internationalization/locale/language_filter");
}
Array f_cnt_all;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/country_filter")) {
- f_cnt_all = ProjectSettings::get_singleton()->get("internationalization/locale/country_filter");
+ f_cnt_all = GLOBAL_GET("internationalization/locale/country_filter");
}
Array f_script_all;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/script_filter")) {
- f_script_all = ProjectSettings::get_singleton()->get("internationalization/locale/script_filter");
+ f_script_all = GLOBAL_GET("internationalization/locale/script_filter");
}
bool is_edit_mode = edit_filters->is_pressed();
@@ -298,7 +301,7 @@ void EditorLocaleDialog::_update_tree() {
Vector<String> scripts = TranslationServer::get_singleton()->get_all_scripts();
for (const String &E : scripts) {
if (is_edit_mode || (filter == SHOW_ALL_LOCALES) || f_script_all.has(E) || f_script_all.is_empty()) {
- const String &script = TranslationServer::get_singleton()->get_script_name(E);
+ const String &scr_code = TranslationServer::get_singleton()->get_script_name(E);
TreeItem *t = script_list->create_item(s_root);
if (is_edit_mode) {
t->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
@@ -307,7 +310,7 @@ void EditorLocaleDialog::_update_tree() {
} else if (script_code->get_text() == E) {
t->select(0);
}
- t->set_text(0, vformat("%s [%s]", script, E));
+ t->set_text(0, vformat("%s [%s]", scr_code, E));
t->set_metadata(0, E);
}
}
@@ -385,8 +388,6 @@ void EditorLocaleDialog::popup_locale_dialog() {
}
EditorLocaleDialog::EditorLocaleDialog() {
- undo_redo = EditorNode::get_undo_redo();
-
set_title(TTR("Select a Locale"));
VBoxContainer *vb = memnew(VBoxContainer);
diff --git a/editor/editor_locale_dialog.h b/editor/editor_locale_dialog.h
index 8ac642a038..467861c36b 100644
--- a/editor/editor_locale_dialog.h
+++ b/editor/editor_locale_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_locale_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_locale_dialog.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 EDITOR_LOCALE_DIALOG_H
#define EDITOR_LOCALE_DIALOG_H
@@ -40,7 +40,6 @@ class VBoxContainer;
class LineEdit;
class Tree;
class OptionButton;
-class EditorUndoRedoManager;
class EditorLocaleDialog : public ConfirmationDialog {
GDCLASS(EditorLocaleDialog, ConfirmationDialog);
@@ -63,8 +62,6 @@ class EditorLocaleDialog : public ConfirmationDialog {
Tree *script_list = nullptr;
Tree *cnt_list = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
-
bool locale_set = false;
bool updating_lists = false;
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 6e6a898757..550c57121e 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -1,35 +1,36 @@
-/*************************************************************************/
-/* editor_log.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_log.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 "editor_log.h"
+#include "core/object/undo_redo.h"
#include "core/os/keyboard.h"
#include "core/version.h"
#include "editor/editor_node.h"
@@ -65,19 +66,34 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_f
}
void EditorLog::_update_theme() {
- Ref<Font> normal_font = get_theme_font(SNAME("output_source"), SNAME("EditorFonts"));
+ const Ref<Font> normal_font = get_theme_font(SNAME("output_source"), SNAME("EditorFonts"));
if (normal_font.is_valid()) {
log->add_theme_font_override("normal_font", normal_font);
}
- log->add_theme_font_size_override("normal_font_size", get_theme_font_size(SNAME("output_source_size"), SNAME("EditorFonts")));
- log->add_theme_color_override("selection_color", get_theme_color(SNAME("accent_color"), SNAME("Editor")) * Color(1, 1, 1, 0.4));
-
- Ref<Font> bold_font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
+ const Ref<Font> bold_font = get_theme_font(SNAME("output_source_bold"), SNAME("EditorFonts"));
if (bold_font.is_valid()) {
log->add_theme_font_override("bold_font", bold_font);
}
+ const Ref<Font> italics_font = get_theme_font(SNAME("output_source_italic"), SNAME("EditorFonts"));
+ if (italics_font.is_valid()) {
+ log->add_theme_font_override("italics_font", italics_font);
+ }
+
+ const Ref<Font> bold_italics_font = get_theme_font(SNAME("output_source_bold_italic"), SNAME("EditorFonts"));
+ if (bold_italics_font.is_valid()) {
+ log->add_theme_font_override("bold_italics_font", bold_italics_font);
+ }
+
+ const Ref<Font> mono_font = get_theme_font(SNAME("output_source_mono"), SNAME("EditorFonts"));
+ if (mono_font.is_valid()) {
+ log->add_theme_font_override("mono_font", mono_font);
+ }
+
+ log->add_theme_font_size_override("normal_font_size", get_theme_font_size(SNAME("output_source_size"), SNAME("EditorFonts")));
+ log->add_theme_color_override("selection_color", get_theme_color(SNAME("accent_color"), SNAME("Editor")) * Color(1, 1, 1, 0.4));
+
type_filter_map[MSG_TYPE_STD]->toggle_button->set_icon(get_theme_icon(SNAME("Popup"), SNAME("EditorIcons")));
type_filter_map[MSG_TYPE_ERROR]->toggle_button->set_icon(get_theme_icon(SNAME("StatusError"), SNAME("EditorIcons")));
type_filter_map[MSG_TYPE_WARNING]->toggle_button->set_icon(get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons")));
@@ -211,7 +227,7 @@ void EditorLog::add_message(const String &p_msg, MessageType p_type) {
// Make text split by new lines their own message.
// See #41321 for reasoning. At time of writing, multiple print()'s in running projects
// get grouped together and sent to the editor log as one message. This can mess with the
- // search functionality (see the comments on the PR above for more details). This behaviour
+ // search functionality (see the comments on the PR above for more details). This behavior
// also matches that of other IDE's.
Vector<String> lines = p_msg.split("\n", true);
@@ -270,7 +286,7 @@ void EditorLog::_add_log_line(LogMessage &p_message, bool p_replace_previous) {
// Remove last line if replacing, as it will be replace by the next added line.
// Why "- 2"? RichTextLabel is weird. When you add a line with add_newline(), it also adds an element to the list of lines which is null/blank,
// but it still counts as a line. So if you remove the last line (count - 1) you are actually removing nothing...
- log->remove_line(log->get_paragraph_count() - 2);
+ log->remove_paragraph(log->get_paragraph_count() - 2);
}
switch (p_message.type) {
@@ -460,7 +476,7 @@ EditorLog::EditorLog() {
vb_right->add_child(editor_filter->toggle_button);
type_filter_map.insert(MSG_TYPE_EDITOR, editor_filter);
- add_message(VERSION_FULL_NAME " (c) 2007-2022 Juan Linietsky, Ariel Manzur & Godot Contributors.");
+ add_message(VERSION_FULL_NAME " (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.");
eh.errfunc = _error_handler;
eh.userdata = this;
diff --git a/editor/editor_log.h b/editor/editor_log.h
index 43d7037414..7a3c1c01b7 100644
--- a/editor/editor_log.h
+++ b/editor/editor_log.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_log.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_log.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 EDITOR_LOG_H
#define EDITOR_LOG_H
diff --git a/editor/editor_native_shader_source_visualizer.cpp b/editor/editor_native_shader_source_visualizer.cpp
index e048f4b9f9..4a0fc235a5 100644
--- a/editor/editor_native_shader_source_visualizer.cpp
+++ b/editor/editor_native_shader_source_visualizer.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_native_shader_source_visualizer.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_native_shader_source_visualizer.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 "editor_native_shader_source_visualizer.h"
diff --git a/editor/editor_native_shader_source_visualizer.h b/editor/editor_native_shader_source_visualizer.h
index 78034dc3ba..00f314da7d 100644
--- a/editor/editor_native_shader_source_visualizer.h
+++ b/editor/editor_native_shader_source_visualizer.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_native_shader_source_visualizer.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_native_shader_source_visualizer.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 EDITOR_NATIVE_SHADER_SOURCE_VISUALIZER_H
#define EDITOR_NATIVE_SHADER_SOURCE_VISUALIZER_H
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 9dc4c2c953..b0278030f9 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_node.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_node.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 "editor_node.h"
@@ -37,7 +37,6 @@
#include "core/io/image_loader.h"
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
-#include "core/io/stream_peer_tls.h"
#include "core/object/class_db.h"
#include "core/object/message_queue.h"
#include "core/os/keyboard.h"
@@ -47,10 +46,7 @@
#include "core/string/translation.h"
#include "core/version.h"
#include "main/main.h"
-#include "scene/3d/importer_mesh_instance_3d.h"
-#include "scene/gui/center_container.h"
#include "scene/gui/color_picker.h"
-#include "scene/gui/control.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/file_dialog.h"
#include "scene/gui/link_button.h"
@@ -61,18 +57,13 @@
#include "scene/gui/split_container.h"
#include "scene/gui/tab_bar.h"
#include "scene/gui/tab_container.h"
-#include "scene/gui/texture_progress_bar.h"
#include "scene/main/window.h"
#include "scene/resources/packed_scene.h"
#include "servers/display_server.h"
-#include "servers/navigation_server_2d.h"
#include "servers/navigation_server_3d.h"
#include "servers/physics_server_2d.h"
-#include "servers/rendering/rendering_device.h"
-#include "editor/animation_track_editor.h"
#include "editor/audio_stream_preview.h"
-#include "editor/debugger/debug_adapter/debug_adapter_server.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/dependency_editor.h"
#include "editor/editor_about.h"
@@ -82,7 +73,6 @@
#include "editor/editor_data.h"
#include "editor/editor_feature_profile.h"
#include "editor/editor_file_dialog.h"
-#include "editor/editor_file_system.h"
#include "editor/editor_folding.h"
#include "editor/editor_help.h"
#include "editor/editor_inspector.h"
@@ -93,15 +83,12 @@
#include "editor/editor_properties.h"
#include "editor/editor_property_name_processor.h"
#include "editor/editor_quick_open.h"
-#include "editor/editor_resource_picker.h"
#include "editor/editor_resource_preview.h"
#include "editor/editor_run.h"
#include "editor/editor_run_native.h"
-#include "editor/editor_run_script.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/editor_settings_dialog.h"
-#include "editor/editor_spin_slider.h"
#include "editor/editor_themes.h"
#include "editor/editor_toaster.h"
#include "editor/editor_translation_parser.h"
@@ -109,7 +96,9 @@
#include "editor/export/editor_export.h"
#include "editor/export/export_template_manager.h"
#include "editor/export/project_export.h"
+#include "editor/fbx_importer_manager.h"
#include "editor/filesystem_dock.h"
+#include "editor/history_dock.h"
#include "editor/import/audio_stream_import_settings.h"
#include "editor/import/dynamic_font_import_settings.h"
#include "editor/import/editor_import_collada.h"
@@ -121,88 +110,32 @@
#include "editor/import/resource_importer_imagefont.h"
#include "editor/import/resource_importer_layered_texture.h"
#include "editor/import/resource_importer_obj.h"
-#include "editor/import/resource_importer_scene.h"
#include "editor/import/resource_importer_shader_file.h"
#include "editor/import/resource_importer_texture.h"
#include "editor/import/resource_importer_texture_atlas.h"
#include "editor/import/resource_importer_wav.h"
#include "editor/import/scene_import_settings.h"
#include "editor/import_dock.h"
+#include "editor/inspector_dock.h"
#include "editor/multi_node_edit.h"
#include "editor/node_dock.h"
#include "editor/plugin_config_dialog.h"
-#include "editor/plugins/animation_blend_space_1d_editor.h"
-#include "editor/plugins/animation_blend_space_2d_editor.h"
-#include "editor/plugins/animation_blend_tree_editor_plugin.h"
#include "editor/plugins/animation_player_editor_plugin.h"
-#include "editor/plugins/animation_state_machine_editor.h"
-#include "editor/plugins/animation_tree_editor_plugin.h"
#include "editor/plugins/asset_library_editor_plugin.h"
-#include "editor/plugins/audio_stream_randomizer_editor_plugin.h"
-#include "editor/plugins/bit_map_editor_plugin.h"
-#include "editor/plugins/bone_map_editor_plugin.h"
-#include "editor/plugins/camera_3d_editor_plugin.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
-#include "editor/plugins/cast_2d_editor_plugin.h"
-#include "editor/plugins/collision_polygon_2d_editor_plugin.h"
-#include "editor/plugins/collision_shape_2d_editor_plugin.h"
-#include "editor/plugins/control_editor_plugin.h"
-#include "editor/plugins/cpu_particles_2d_editor_plugin.h"
-#include "editor/plugins/cpu_particles_3d_editor_plugin.h"
-#include "editor/plugins/curve_editor_plugin.h"
#include "editor/plugins/debugger_editor_plugin.h"
-#include "editor/plugins/editor_debugger_plugin.h"
#include "editor/plugins/editor_preview_plugins.h"
#include "editor/plugins/editor_resource_conversion_plugin.h"
-#include "editor/plugins/font_config_plugin.h"
#include "editor/plugins/gdextension_export_plugin.h"
-#include "editor/plugins/gpu_particles_2d_editor_plugin.h"
-#include "editor/plugins/gpu_particles_3d_editor_plugin.h"
-#include "editor/plugins/gpu_particles_collision_sdf_editor_plugin.h"
-#include "editor/plugins/gradient_editor_plugin.h"
-#include "editor/plugins/gradient_texture_2d_editor_plugin.h"
-#include "editor/plugins/input_event_editor_plugin.h"
-#include "editor/plugins/light_occluder_2d_editor_plugin.h"
-#include "editor/plugins/lightmap_gi_editor_plugin.h"
-#include "editor/plugins/line_2d_editor_plugin.h"
#include "editor/plugins/material_editor_plugin.h"
-#include "editor/plugins/mesh_editor_plugin.h"
-#include "editor/plugins/mesh_instance_3d_editor_plugin.h"
#include "editor/plugins/mesh_library_editor_plugin.h"
-#include "editor/plugins/multimesh_editor_plugin.h"
-#include "editor/plugins/navigation_link_2d_editor_plugin.h"
-#include "editor/plugins/navigation_polygon_editor_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "editor/plugins/occluder_instance_3d_editor_plugin.h"
#include "editor/plugins/packed_scene_translation_parser_plugin.h"
-#include "editor/plugins/path_2d_editor_plugin.h"
-#include "editor/plugins/path_3d_editor_plugin.h"
-#include "editor/plugins/physical_bone_3d_editor_plugin.h"
-#include "editor/plugins/polygon_2d_editor_plugin.h"
-#include "editor/plugins/polygon_3d_editor_plugin.h"
-#include "editor/plugins/resource_preloader_editor_plugin.h"
#include "editor/plugins/root_motion_editor_plugin.h"
-#include "editor/plugins/script_editor_plugin.h"
#include "editor/plugins/script_text_editor.h"
-#include "editor/plugins/shader_editor_plugin.h"
-#include "editor/plugins/shader_file_editor_plugin.h"
-#include "editor/plugins/skeleton_2d_editor_plugin.h"
-#include "editor/plugins/skeleton_3d_editor_plugin.h"
-#include "editor/plugins/skeleton_ik_3d_editor_plugin.h"
-#include "editor/plugins/sprite_2d_editor_plugin.h"
-#include "editor/plugins/sprite_frames_editor_plugin.h"
-#include "editor/plugins/style_box_editor_plugin.h"
-#include "editor/plugins/sub_viewport_preview_editor_plugin.h"
#include "editor/plugins/text_editor.h"
-#include "editor/plugins/texture_3d_editor_plugin.h"
-#include "editor/plugins/texture_editor_plugin.h"
-#include "editor/plugins/texture_layered_editor_plugin.h"
-#include "editor/plugins/texture_region_editor_plugin.h"
-#include "editor/plugins/theme_editor_plugin.h"
-#include "editor/plugins/tiles/tiles_editor_plugin.h"
#include "editor/plugins/version_control_editor_plugin.h"
#include "editor/plugins/visual_shader_editor_plugin.h"
-#include "editor/plugins/voxel_gi_editor_plugin.h"
#include "editor/progress_dialog.h"
#include "editor/project_settings_editor.h"
#include "editor/register_exporters.h"
@@ -243,15 +176,11 @@ void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vecto
String full_path = p_full_paths[set_idx];
// Get rid of file extensions and res:// prefixes.
- if (scene_name.rfind(".") >= 0) {
- scene_name = scene_name.substr(0, scene_name.rfind("."));
- }
+ scene_name = scene_name.get_basename();
if (full_path.begins_with("res://")) {
full_path = full_path.substr(6);
}
- if (full_path.rfind(".") >= 0) {
- full_path = full_path.substr(0, full_path.rfind("."));
- }
+ full_path = full_path.get_basename();
// Normalize trailing slashes when normalizing directory names.
scene_name = scene_name.trim_suffix("/");
@@ -269,7 +198,7 @@ void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vecto
String parent = full_path.substr(0, difference);
int slash_idx = parent.rfind("/");
slash_idx = parent.rfind("/", slash_idx - 1);
- parent = slash_idx >= 0 ? parent.substr(slash_idx + 1) : parent;
+ parent = (slash_idx >= 0 && parent.length() > 1) ? parent.substr(slash_idx + 1) : parent;
r_filenames.write[set_idx] = parent + r_filenames[set_idx];
}
}
@@ -301,15 +230,11 @@ void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vecto
String path = p_full_paths[E->get()];
// Get rid of file extensions and res:// prefixes.
- if (scene_name.rfind(".") >= 0) {
- scene_name = scene_name.substr(0, scene_name.rfind("."));
- }
+ scene_name = scene_name.get_basename();
if (path.begins_with("res://")) {
path = path.substr(6);
}
- if (path.rfind(".") >= 0) {
- path = path.substr(0, path.rfind("."));
- }
+ path = path.get_basename();
// Normalize trailing slashes when normalizing directory names.
scene_name = scene_name.trim_suffix("/");
@@ -335,7 +260,7 @@ void EditorNode::disambiguate_filenames(const Vector<String> p_full_paths, Vecto
// TODO: This REALLY should be done in a better way than replacing all tabs after almost EVERY action.
void EditorNode::_update_scene_tabs() {
- bool show_rb = EditorSettings::get_singleton()->get("interface/scene_tabs/show_script_button");
+ bool show_rb = EDITOR_GET("interface/scene_tabs/show_script_button");
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_GLOBAL_MENU)) {
DisplayServer::get_singleton()->global_menu_clear("_dock");
@@ -363,7 +288,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)) {
@@ -428,8 +353,8 @@ void EditorNode::_version_control_menu_option(int p_idx) {
}
void EditorNode::_update_title() {
- const String appname = ProjectSettings::get_singleton()->get("application/config/name");
- String title = (appname.is_empty() ? TTR("Unnamed Project") : appname) + String(" - ") + VERSION_NAME;
+ const String appname = GLOBAL_GET("application/config/name");
+ String title = (appname.is_empty() ? TTR("Unnamed Project") : appname);
const String edited = editor_data.get_edited_scene_root() ? editor_data.get_edited_scene_root()->get_scene_file_path() : String();
if (!edited.is_empty()) {
// Display the edited scene name before the program name so that it can be seen in the OS task bar.
@@ -439,8 +364,10 @@ void EditorNode::_update_title() {
// Display the "modified" mark before anything else so that it can always be seen in the OS task bar.
title = vformat("(*) %s", title);
}
-
- DisplayServer::get_singleton()->window_set_title(title);
+ DisplayServer::get_singleton()->window_set_title(title + String(" - ") + VERSION_NAME);
+ if (project_title) {
+ project_title->set_text(title);
+ }
}
void EditorNode::shortcut_input(const Ref<InputEvent> &p_event) {
@@ -465,15 +392,15 @@ void EditorNode::shortcut_input(const Ref<InputEvent> &p_event) {
}
if (ED_IS_SHORTCUT("editor/editor_2d", p_event)) {
- _editor_select(EDITOR_2D);
+ editor_select(EDITOR_2D);
} else if (ED_IS_SHORTCUT("editor/editor_3d", p_event)) {
- _editor_select(EDITOR_3D);
+ editor_select(EDITOR_3D);
} else if (ED_IS_SHORTCUT("editor/editor_script", p_event)) {
- _editor_select(EDITOR_SCRIPT);
+ editor_select(EDITOR_SCRIPT);
} else if (ED_IS_SHORTCUT("editor/editor_help", p_event)) {
emit_signal(SNAME("request_help_search"), "");
} else if (ED_IS_SHORTCUT("editor/editor_assetlib", p_event) && AssetLibraryEditorPlugin::is_available()) {
- _editor_select(EDITOR_ASSETLIB);
+ editor_select(EDITOR_ASSETLIB);
} else if (ED_IS_SHORTCUT("editor/editor_next", p_event)) {
_editor_select_next();
} else if (ED_IS_SHORTCUT("editor/editor_prev", p_event)) {
@@ -511,8 +438,6 @@ void EditorNode::_update_from_settings() {
bool glow_bicubic = int(GLOBAL_GET("rendering/environment/glow/upscale_mode")) > 0;
RS::get_singleton()->environment_set_ssil_quality(RS::EnvironmentSSILQuality(int(GLOBAL_GET("rendering/environment/ssil/quality"))), GLOBAL_GET("rendering/environment/ssil/half_size"), GLOBAL_GET("rendering/environment/ssil/adaptive_target"), GLOBAL_GET("rendering/environment/ssil/blur_passes"), GLOBAL_GET("rendering/environment/ssil/fadeout_from"), GLOBAL_GET("rendering/environment/ssil/fadeout_to"));
RS::get_singleton()->environment_glow_set_use_bicubic_upscale(glow_bicubic);
- bool glow_high_quality = GLOBAL_GET("rendering/environment/glow/use_high_quality");
- RS::get_singleton()->environment_glow_set_use_high_quality(glow_high_quality);
RS::EnvironmentSSRRoughnessQuality ssr_roughness_quality = RS::EnvironmentSSRRoughnessQuality(int(GLOBAL_GET("rendering/environment/screen_space_reflection/roughness_quality")));
RS::get_singleton()->environment_set_ssr_roughness_quality(ssr_roughness_quality);
RS::SubSurfaceScatteringQuality sss_quality = RS::SubSurfaceScatteringQuality(int(GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_quality")));
@@ -541,7 +466,7 @@ void EditorNode::_update_from_settings() {
RS::get_singleton()->environment_set_volumetric_fog_filter_active(bool(GLOBAL_GET("rendering/environment/volumetric_fog/use_filter")));
RS::get_singleton()->canvas_set_shadow_texture_size(GLOBAL_GET("rendering/2d/shadow_atlas/size"));
- bool use_half_res_gi = GLOBAL_DEF("rendering/global_illumination/gi/use_half_resolution", false);
+ bool use_half_res_gi = GLOBAL_GET("rendering/global_illumination/gi/use_half_resolution");
RS::get_singleton()->gi_set_use_half_resolution(use_half_res_gi);
bool snap_2d_transforms = GLOBAL_GET("rendering/2d/snap/snap_2d_transforms_to_pixel");
@@ -568,23 +493,23 @@ 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
}
void EditorNode::_select_default_main_screen_plugin() {
if (EDITOR_3D < main_editor_buttons.size() && main_editor_buttons[EDITOR_3D]->is_visible()) {
// If the 3D editor is enabled, use this as the default.
- _editor_select(EDITOR_3D);
+ editor_select(EDITOR_3D);
return;
}
@@ -593,12 +518,12 @@ void EditorNode::_select_default_main_screen_plugin() {
for (int i = 0; i < main_editor_buttons.size(); i++) {
Button *editor_button = main_editor_buttons[i];
if (editor_button->is_visible()) {
- _editor_select(i);
+ editor_select(i);
return;
}
}
- _editor_select(-1);
+ editor_select(-1);
}
void EditorNode::_notification(int p_what) {
@@ -608,8 +533,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();
@@ -633,7 +558,7 @@ void EditorNode::_notification(int p_what) {
update_spinner_step_frame = frame + 1;
// Update the icon itself only when the spinner is visible.
- if (EditorSettings::get_singleton()->get("interface/editor/show_update_spinner")) {
+ if (EDITOR_GET("interface/editor/show_update_spinner")) {
update_spinner->set_icon(gui_base->get_theme_icon("Progress" + itos(update_spinner_step + 1), SNAME("EditorIcons")));
}
}
@@ -659,6 +584,13 @@ void EditorNode::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
Engine::get_singleton()->set_editor_hint(true);
+ 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")));
get_tree()->get_root()->set_as_audio_listener_3d(false);
get_tree()->get_root()->set_as_audio_listener_2d(false);
@@ -677,6 +609,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.
@@ -692,13 +627,17 @@ void EditorNode::_notification(int p_what) {
_initializing_plugins = true;
Vector<String> addons;
if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) {
- addons = ProjectSettings::get_singleton()->get("editor_plugins/enabled");
+ addons = GLOBAL_GET("editor_plugins/enabled");
}
for (int i = 0; i < addons.size(); i++) {
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);
@@ -713,6 +652,8 @@ void EditorNode::_notification(int p_what) {
ProjectSettings::get_singleton()->save();
}
+ _titlebar_resized();
+
/* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */
} break;
@@ -750,13 +691,16 @@ void EditorNode::_notification(int p_what) {
EditorSettings::get_singleton()->check_changed_settings_in_group("text_editor/theme") ||
EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/font") ||
EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/main_font") ||
- EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/code_font");
+ EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/code_font") ||
+ EditorSettings::get_singleton()->check_changed_settings_in_group("filesystem/file_dialog/thumbnail_size");
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")));
@@ -836,7 +780,7 @@ void EditorNode::_notification(int p_what) {
HashSet<String> updated_textfile_extensions;
bool extensions_match = true;
- const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false);
+ const Vector<String> textfile_ext = ((String)(EDITOR_GET("docks/filesystem/textfile_extensions"))).split(",", false);
for (const String &E : textfile_ext) {
updated_textfile_extensions.insert(E);
if (extensions_match && !textfile_extensions.has(E)) {
@@ -855,9 +799,9 @@ void EditorNode::_notification(int p_what) {
}
void EditorNode::_update_update_spinner() {
- update_spinner->set_visible(EditorSettings::get_singleton()->get("interface/editor/show_update_spinner"));
+ update_spinner->set_visible(EDITOR_GET("interface/editor/show_update_spinner"));
- const bool update_continuously = EditorSettings::get_singleton()->get("interface/editor/update_continuously");
+ const bool update_continuously = EDITOR_GET("interface/editor/update_continuously");
PopupMenu *update_popup = update_spinner->get_popup();
update_popup->set_item_checked(update_popup->get_item_index(SETTINGS_UPDATE_CONTINUOUSLY), update_continuously);
update_popup->set_item_checked(update_popup->get_item_index(SETTINGS_UPDATE_WHEN_CHANGED), !update_continuously);
@@ -881,8 +825,8 @@ void EditorNode::_update_update_spinner() {
}
void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_name) {
- Ref<Script> script = Object::cast_to<Script>(p_script);
- if (script.is_null()) {
+ Ref<Script> scr = Object::cast_to<Script>(p_script);
+ if (scr.is_null()) {
return;
}
if (p_activate_name.length()) {
@@ -890,7 +834,7 @@ void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_nam
}
project_settings_editor->update_plugins();
project_settings_editor->hide();
- push_item(script.operator->());
+ push_item(scr.operator->());
}
void EditorNode::_remove_plugin_from_enabled(const String &p_name) {
@@ -1169,10 +1113,32 @@ void EditorNode::_reload_project_settings() {
void EditorNode::_vp_resized() {
}
+void EditorNode::_titlebar_resized() {
+ DisplayServer::get_singleton()->window_set_window_buttons_offset(Vector2i(menu_hb->get_global_position().y + menu_hb->get_size().y / 2, menu_hb->get_global_position().y + menu_hb->get_size().y / 2), DisplayServer::MAIN_WINDOW_ID);
+ const Vector3i &margin = DisplayServer::get_singleton()->window_get_safe_title_margins(DisplayServer::MAIN_WINDOW_ID);
+ if (left_menu_spacer) {
+ int w = (gui_base->is_layout_rtl()) ? margin.y : margin.x;
+ left_menu_spacer->set_custom_minimum_size(Size2(w, 0));
+ }
+ if (right_menu_spacer) {
+ int w = (gui_base->is_layout_rtl()) ? margin.x : margin.y;
+ right_menu_spacer->set_custom_minimum_size(Size2(w, 0));
+ }
+ if (menu_hb) {
+ menu_hb->set_custom_minimum_size(Size2(0, margin.z - menu_hb->get_global_position().y));
+ }
+}
+
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();
@@ -1190,7 +1156,7 @@ void EditorNode::_editor_select_next() {
}
} while (!main_editor_buttons[editor]->is_visible());
- _editor_select(editor);
+ editor_select(editor);
}
void EditorNode::_open_command_palette() {
@@ -1208,7 +1174,7 @@ void EditorNode::_editor_select_prev() {
}
} while (!main_editor_buttons[editor]->is_visible());
- _editor_select(editor);
+ editor_select(editor);
}
Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_deps) {
@@ -1243,10 +1209,14 @@ void EditorNode::edit_node(Node *p_node) {
push_item(p_node);
}
+void EditorNode::edit_resource(const Ref<Resource> &p_resource) {
+ InspectorDock::get_singleton()->edit_resource(p_resource);
+}
+
void EditorNode::save_resource_in_path(const Ref<Resource> &p_resource, const String &p_path) {
editor_data.apply_changes_in_editors();
int flg = 0;
- if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
+ if (EDITOR_GET("filesystem/on_save/compress_binary_resources")) {
flg |= ResourceSaver::FLAG_COMPRESS;
}
@@ -1591,7 +1561,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
// which would result in an invalid texture.
if (c3d == 0 && c2d == 0) {
img.instantiate();
- img->create(1, 1, false, Image::FORMAT_RGB8);
+ img->initialize_data(1, 1, false, Image::FORMAT_RGB8);
} else if (c3d < c2d) {
Ref<ViewportTexture> viewport_texture = scene_root->get_texture();
if (viewport_texture->get_width() > 0 && viewport_texture->get_height() > 0) {
@@ -1613,7 +1583,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
save.step(TTR("Creating Thumbnail"), 2);
save.step(TTR("Creating Thumbnail"), 3);
- int preview_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
+ int preview_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
preview_size *= EDSCALE;
// Consider a square region.
@@ -1642,10 +1612,8 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
cache_base = temp_path.path_join("resthumb-" + cache_base);
// Does not have it, try to load a cached thumbnail.
- String file = cache_base + ".png";
-
post_process_preview(img);
- img->save_png(file);
+ img->save_png(cache_base + ".png");
}
}
@@ -1676,7 +1644,7 @@ int EditorNode::_save_external_resources() {
// Save external resources and its subresources if any was modified.
int flg = 0;
- if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
+ if (EDITOR_GET("filesystem/on_save/compress_binary_resources")) {
flg |= ResourceSaver::FLAG_COMPRESS;
}
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
@@ -1718,7 +1686,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;
}
@@ -1745,7 +1713,7 @@ void EditorNode::_save_scene(String p_file, int idx) {
}
if (!scene->get_scene_file_path().is_empty() && _validate_scene_recursive(scene->get_scene_file_path(), scene)) {
- show_accept(TTR("This scene can't be saved because there is a cyclic instancing inclusion.\nPlease resolve it and then attempt to save again."), TTR("OK"));
+ show_accept(TTR("This scene can't be saved because there is a cyclic instance inclusion.\nPlease resolve it and then attempt to save again."), TTR("OK"));
return;
}
@@ -1782,7 +1750,7 @@ void EditorNode::_save_scene(String p_file, int idx) {
}
int flg = 0;
- if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
+ if (EDITOR_GET("filesystem/on_save/compress_binary_resources")) {
flg |= ResourceSaver::FLAG_COMPRESS;
}
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
@@ -1895,7 +1863,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));
}
}
@@ -2015,8 +1983,8 @@ void EditorNode::_dialog_action(String p_file) {
ERR_FAIL_COND(saving_resource.is_null());
save_resource_in_path(saving_resource, p_file);
saving_resource = Ref<Resource>();
- ObjectID current = editor_history.get_current();
- Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : nullptr;
+ ObjectID current_id = editor_history.get_current();
+ Object *current_obj = current_id.is_valid() ? ObjectDB::get_instance(current_id) : nullptr;
ERR_FAIL_COND(!current_obj);
current_obj->notify_property_list_changed();
} break;
@@ -2089,18 +2057,6 @@ void EditorNode::_dialog_action(String p_file) {
}
}
-bool EditorNode::item_has_editor(Object *p_object) {
- if (_is_class_editor_disabled_by_feature_profile(p_object->get_class())) {
- return false;
- }
-
- return editor_data.get_subeditors(p_object).size() > 0;
-}
-
-void EditorNode::edit_item_resource(Ref<Resource> p_resource) {
- edit_item(p_resource.ptr());
-}
-
bool EditorNode::_is_class_editor_disabled_by_feature_profile(const StringName &p_class) {
Ref<EditorFeatureProfile> profile = EditorFeatureProfileManager::get_singleton()->get_current_profile();
if (profile.is_null()) {
@@ -2123,37 +2079,43 @@ bool EditorNode::_is_class_editor_disabled_by_feature_profile(const StringName &
}
void EditorNode::edit_item(Object *p_object) {
- Vector<EditorPlugin *> sub_plugins;
+ 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) {
- if (_is_class_editor_disabled_by_feature_profile(p_object->get_class())) {
- return;
- }
- sub_plugins = editor_data.get_subeditors(p_object);
+ item_plugins = editor_data.get_subeditors(p_object);
}
- if (!sub_plugins.is_empty()) {
+ if (!item_plugins.is_empty()) {
bool same = true;
- if (sub_plugins.size() == editor_plugins_over->get_plugins_list().size()) {
- for (int i = 0; i < sub_plugins.size(); i++) {
- if (sub_plugins[i] != editor_plugins_over->get_plugins_list()[i]) {
+ 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;
}
}
} else {
same = false;
}
+
if (!same) {
_display_top_editors(false);
- _set_top_editors(sub_plugins);
+ _set_top_editors(item_plugins);
}
_set_editing_top_editors(p_object);
_display_top_editors(true);
- } else {
+ } else if (!top_plugins.is_empty()) {
hide_top_editors();
}
}
+void EditorNode::edit_item_resource(Ref<Resource> p_resource) {
+ edit_item(p_resource.ptr());
+}
+
void EditorNode::push_item(Object *p_object, const String &p_property, bool p_inspector_only) {
if (!p_object) {
InspectorDock::get_inspector_singleton()->edit(nullptr);
@@ -2217,8 +2179,8 @@ static bool overrides_external_editor(Object *p_object) {
}
void EditorNode::_edit_current(bool p_skip_foreign) {
- ObjectID current = editor_history.get_current();
- Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : nullptr;
+ ObjectID current_id = editor_history.get_current();
+ Object *current_obj = current_id.is_valid() ? ObjectDB::get_instance(current_id) : nullptr;
Ref<Resource> res = Object::cast_to<Resource>(current_obj);
if (p_skip_foreign && res.is_valid()) {
@@ -2313,7 +2275,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
if (get_edited_scene() && !get_edited_scene()->get_scene_file_path().is_empty()) {
String source_scene = get_edited_scene()->get_scene_file_path();
if (FileAccess::exists(source_scene + ".import")) {
- editable_info = TTR("This scene was imported, so changes to it won't be kept.\nInstancing it or inheriting will allow making changes to it.\nPlease read the documentation relevant to importing scenes to better understand this workflow.");
+ editable_info = TTR("This scene was imported, so changes to it won't be kept.\nInstantiating or inheriting it will allow you to make changes to it.\nPlease read the documentation relevant to importing scenes to better understand this workflow.");
info_is_warning = true;
}
}
@@ -2321,7 +2283,9 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
} else {
Node *selected_node = nullptr;
- if (current_obj->is_class("MultiNodeEdit")) {
+ if (current_obj->is_class("EditorDebuggerRemoteObject")) {
+ disable_folding = true;
+ } else if (current_obj->is_class("MultiNodeEdit")) {
Node *scene = get_edited_scene();
if (scene) {
MultiNodeEdit *multi_node_edit = Object::cast_to<MultiNodeEdit>(current_obj);
@@ -2382,7 +2346,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
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(EditorSettings::get_singleton()->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);
}
@@ -2390,28 +2354,14 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
else if (main_plugin != editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible_in_tree() || ScriptEditor::get_singleton()->can_take_away_focus())) {
// Update screen main_plugin.
- _editor_select(plugin_index);
+ editor_select(plugin_index);
main_plugin->edit(current_obj);
} else {
editor_plugin_screen->edit(current_obj);
}
}
- Vector<EditorPlugin *> sub_plugins;
-
- if (!_is_class_editor_disabled_by_feature_profile(current_obj->get_class())) {
- sub_plugins = editor_data.get_subeditors(current_obj);
- }
-
- if (!sub_plugins.is_empty()) {
- _display_top_editors(false);
-
- _set_top_editors(sub_plugins);
- _set_editing_top_editors(current_obj);
- _display_top_editors(true);
- } else if (!editor_plugins_over->get_plugins_list().is_empty()) {
- hide_top_editors();
- }
+ edit_item(current_obj);
}
InspectorDock::get_singleton()->update(current_obj);
@@ -2450,7 +2400,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
write_movie_file = GLOBAL_GET("editor/movie_writer/movie_file");
}
if (write_movie_file == String()) {
- show_accept(TTR("Movie Maker mode is enabled, but no movie file path has been specified.\nA default movie file path can be specified in the project settings under the 'Editor/Movie Writer' category.\nAlternatively, for running single scenes, a 'movie_path' metadata can be added to the root node,\nspecifying the path to a movie file that will be used when recording that scene."), TTR("OK"));
+ show_accept(TTR("Movie Maker mode is enabled, but no movie file path has been specified.\nA default movie file path can be specified in the project settings under the Editor > Movie Writer category.\nAlternatively, for running single scenes, a `movie_file` string metadata can be added to the root node,\nspecifying the path to a movie file that will be used when recording that scene."), TTR("OK"));
return;
}
}
@@ -2668,9 +2618,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
save_confirmation->set_text(TTR("Save modified resources before closing?"));
}
} else {
- Node *scene_root = editor_data.get_edited_scene_root(tab_closing_idx);
- if (scene_root) {
- String scene_filename = scene_root->get_scene_file_path();
+ Node *ed_scene_root = editor_data.get_edited_scene_root(tab_closing_idx);
+ if (ed_scene_root) {
+ String scene_filename = ed_scene_root->get_scene_file_path();
if (p_option == FILE_CLOSE_ALL_AND_RELOAD_CURRENT_PROJECT) {
save_confirmation->set_ok_button_text(TTR("Save & Reload"));
save_confirmation->set_text(vformat(TTR("Save changes to '%s' before reloading?"), !scene_filename.is_empty() ? scene_filename : "unsaved scene"));
@@ -2763,18 +2713,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
}
} else if (extensions.size()) {
String root_name = scene->get_name();
- // Very similar to node naming logic.
- switch (ProjectSettings::get_singleton()->get("editor/scene/scene_naming").operator int()) {
- case SCENE_NAME_CASING_AUTO:
- // Use casing of the root node.
- break;
- case SCENE_NAME_CASING_PASCAL_CASE: {
- root_name = root_name.to_pascal_case();
- } break;
- case SCENE_NAME_CASING_SNAKE_CASE:
- root_name = root_name.replace("-", "_").to_snake_case();
- break;
- }
+ root_name = EditorNode::adjust_scene_name_casing(root_name);
file->set_current_path(root_name + "." + extensions.front()->get().to_lower());
}
file->popup_file_dialog();
@@ -2811,24 +2750,48 @@ 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();
-
- 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()) {
- log->add_message(vformat(TTR("Undo: %s"), action), EditorLog::MSG_TYPE_EDITOR);
+ switch (id) {
+ case EditorUndoRedoManager::GLOBAL_HISTORY:
+ log->add_message(vformat(TTR("Global Undo: %s"), action), EditorLog::MSG_TYPE_EDITOR);
+ break;
+ case EditorUndoRedoManager::REMOTE_HISTORY:
+ log->add_message(vformat(TTR("Remote Undo: %s"), action), EditorLog::MSG_TYPE_EDITOR);
+ break;
+ default:
+ log->add_message(vformat(TTR("Scene Undo: %s"), action), EditorLog::MSG_TYPE_EDITOR);
+ }
}
}
} 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();
- log->add_message(vformat(TTR("Redo: %s"), action), EditorLog::MSG_TYPE_EDITOR);
+ String action = undo_redo->get_current_action_name();
+ if (action.is_empty()) {
+ break;
+ }
+
+ 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;
+ case EditorUndoRedoManager::REMOTE_HISTORY:
+ log->add_message(vformat(TTR("Remote Redo: %s"), action), EditorLog::MSG_TYPE_EDITOR);
+ break;
+ default:
+ log->add_message(vformat(TTR("Scene Redo: %s"), action), EditorLog::MSG_TYPE_EDITOR);
+ }
}
}
} break;
@@ -2862,7 +2825,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;
@@ -2954,7 +2917,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 {
@@ -3017,7 +2980,11 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case SETTINGS_MANAGE_EXPORT_TEMPLATES: {
export_template_manager->popup_manager();
-
+ } break;
+ case SETTINGS_MANAGE_FBX_IMPORTER: {
+#if !defined(ANDROID_ENABLED) && !defined(WEB_ENABLED)
+ fbx_importer_manager->show_dialog();
+#endif
} break;
case SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE: {
custom_build_manage_templates->hide();
@@ -3080,8 +3047,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
case HELP_SUPPORT_GODOT_DEVELOPMENT: {
OS::get_singleton()->shell_open("https://godotengine.org/donate");
} break;
- case SET_RENDERING_DRIVER_SAVE_AND_RESTART: {
- ProjectSettings::get_singleton()->set("rendering/driver/driver_name", rendering_driver_request);
+ case SET_RENDERER_NAME_SAVE_AND_RESTART: {
+ ProjectSettings::get_singleton()->set("rendering/renderer/rendering_method", renderer_request);
ProjectSettings::get_singleton()->save();
save_all_scenes();
@@ -3090,6 +3057,19 @@ 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()) {
+ case SCENE_NAME_CASING_AUTO:
+ // Use casing of the root node.
+ break;
+ case SCENE_NAME_CASING_PASCAL_CASE:
+ return root_name.to_pascal_case();
+ case SCENE_NAME_CASING_SNAKE_CASE:
+ return root_name.replace("-", "_").to_snake_case();
+ }
+ return root_name;
+}
+
void EditorNode::_request_screenshot() {
_screenshot();
}
@@ -3098,7 +3078,7 @@ void EditorNode::_screenshot(bool p_use_utc) {
String name = "editor_screenshot_" + Time::get_singleton()->get_datetime_string_from_system(p_use_utc).replace(":", "") + ".png";
NodePath path = String("user://") + name;
_save_screenshot(path);
- if (EditorSettings::get_singleton()->get("interface/editor/automatically_open_screenshots")) {
+ if (EDITOR_GET("interface/editor/automatically_open_screenshots")) {
OS::get_singleton()->shell_open(String("file://") + ProjectSettings::get_singleton()->globalize_path(path));
}
}
@@ -3176,7 +3156,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) {
@@ -3283,16 +3263,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() {
@@ -3303,7 +3275,7 @@ VBoxContainer *EditorNode::get_main_screen_control() {
return main_screen_vbox;
}
-void EditorNode::_editor_select(int p_which) {
+void EditorNode::editor_select(int p_which) {
static bool selecting = false;
if (selecting || changing_scene) {
return;
@@ -3343,7 +3315,7 @@ void EditorNode::_editor_select(int p_which) {
editor_data.get_editor_plugin(i)->notify_main_screen_changed(editor_plugin_screen->get_name());
}
- if (EditorSettings::get_singleton()->get("interface/editor/separate_distraction_mode")) {
+ if (EDITOR_GET("interface/editor/separate_distraction_mode")) {
if (p_which == EDITOR_SCRIPT) {
set_distraction_free_mode(script_distraction_free);
} else {
@@ -3357,7 +3329,7 @@ void EditorNode::select_editor_by_name(const String &p_name) {
for (int i = 0; i < main_editor_buttons.size(); i++) {
if (main_editor_buttons[i]->get_text() == p_name) {
- _editor_select(i);
+ editor_select(i);
return;
}
}
@@ -3370,7 +3342,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
Button *tb = memnew(Button);
tb->set_flat(true);
tb->set_toggle_mode(true);
- tb->connect("pressed", callable_mp(singleton, &EditorNode::_editor_select).bind(singleton->main_editor_buttons.size()));
+ tb->connect("pressed", callable_mp(singleton, &EditorNode::editor_select).bind(singleton->main_editor_buttons.size()));
tb->set_name(p_editor->get_name());
tb->set_text(p_editor->get_name());
@@ -3387,7 +3359,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
tb->add_theme_font_size_override("font_size", singleton->gui_base->get_theme_font_size(SNAME("main_button_font_size"), SNAME("EditorFonts")));
singleton->main_editor_buttons.push_back(tb);
- singleton->main_editor_button_vb->add_child(tb);
+ singleton->main_editor_button_hb->add_child(tb);
singleton->editor_table.push_back(p_editor);
singleton->distraction_free->move_to_front();
@@ -3401,16 +3373,21 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_changed) {
if (p_editor->has_main_screen()) {
- for (int i = 0; i < singleton->main_editor_buttons.size(); i++) {
+ // Remove the main editor button and update the bindings of
+ // all buttons behind it to point to the correct main window.
+ for (int i = singleton->main_editor_buttons.size() - 1; i >= 0; i--) {
if (p_editor->get_name() == singleton->main_editor_buttons[i]->get_text()) {
if (singleton->main_editor_buttons[i]->is_pressed()) {
- singleton->_editor_select(EDITOR_SCRIPT);
+ singleton->editor_select(EDITOR_SCRIPT);
}
memdelete(singleton->main_editor_buttons[i]);
singleton->main_editor_buttons.remove_at(i);
break;
+ } else {
+ singleton->main_editor_buttons[i]->disconnect("pressed", callable_mp(singleton, &EditorNode::editor_select));
+ singleton->main_editor_buttons[i]->connect("pressed", callable_mp(singleton, &EditorNode::editor_select).bind(i - 1));
}
}
@@ -3486,39 +3463,45 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
}
String script_path = cf->get_value("plugin", "script");
- Ref<Script> script; // We need to save it for creating "ep" below.
+ Ref<Script> scr; // We need to save it for creating "ep" below.
// Only try to load the script if it has a name. Else, the plugin has no init script.
if (script_path.length() > 0) {
script_path = addon_path.get_base_dir().path_join(script_path);
- script = ResourceLoader::load(script_path);
+ scr = ResourceLoader::load(script_path);
- if (script.is_null()) {
+ if (scr.is_null()) {
show_warning(vformat(TTR("Unable to load addon script from path: '%s'."), script_path));
return;
}
// Errors in the script cause the base_type to be an empty StringName.
- if (script->get_instance_base_type() == 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;
}
// Plugin init scripts must inherit from EditorPlugin and be tools.
- if (String(script->get_instance_base_type()) != "EditorPlugin") {
+ if (String(scr->get_instance_base_type()) != "EditorPlugin") {
show_warning(vformat(TTR("Unable to load addon script from path: '%s' Base type is not EditorPlugin."), script_path));
return;
}
- if (!script->is_tool()) {
+ if (!scr->is_tool()) {
show_warning(vformat(TTR("Unable to load addon script from path: '%s' Script is not in tool mode."), script_path));
return;
}
}
EditorPlugin *ep = memnew(EditorPlugin);
- ep->set_script(script);
+ ep->set_script(scr);
addon_name_to_plugin[addon_path] = ep;
add_editor_plugin(ep, p_config_changed);
@@ -3533,6 +3516,14 @@ bool EditorNode::is_addon_plugin_enabled(const String &p_addon) const {
return addon_name_to_plugin.has("res://addons/" + p_addon + "/plugin.cfg");
}
+void EditorNode::set_movie_maker_enabled(bool p_enabled) {
+ write_movie_button->set_pressed(p_enabled);
+}
+
+bool EditorNode::is_movie_maker_enabled() const {
+ return write_movie_button->is_pressed();
+}
+
void EditorNode::_remove_edited_scene(bool p_change_tab) {
int new_index = editor_data.get_edited_scene();
int old_index = new_index;
@@ -3616,32 +3607,32 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
changing_scene = false;
- int current = -1;
+ int current_tab = -1;
for (int i = 0; i < editor_table.size(); i++) {
if (editor_plugin_screen == editor_table[i]) {
- current = i;
+ current_tab = i;
break;
}
}
if (p_state.has("editor_index")) {
int index = p_state["editor_index"];
- if (current < 2) { // If currently in spatial/2d, only switch to spatial/2d. If currently in script, stay there.
+ if (current_tab < 2) { // If currently in spatial/2d, only switch to spatial/2d. If currently in script, stay there.
if (index < 2 || !get_edited_scene()) {
- _editor_select(index);
+ editor_select(index);
}
}
}
if (get_edited_scene()) {
- if (current < 2) {
+ if (current_tab < 2) {
// Use heuristic instead.
int n2d = 0, n3d = 0;
_find_node_types(get_edited_scene(), n2d, n3d);
if (n2d > n3d) {
- _editor_select(EDITOR_2D);
+ editor_select(EDITOR_2D);
} else if (n3d > n2d) {
- _editor_select(EDITOR_3D);
+ editor_select(EDITOR_3D);
}
}
}
@@ -3662,16 +3653,13 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
EditorDebuggerNode::get_singleton()->update_live_edit_root();
ScriptEditor::get_singleton()->set_scene_root_script(editor_data.get_scene_root_script(editor_data.get_edited_scene()));
editor_data.notify_edited_scene_changed();
+ emit_signal(SNAME("scene_changed"));
}
bool EditorNode::is_changing_scene() const {
return changing_scene;
}
-void EditorNode::_clear_undo_history() {
- get_undo_redo()->clear_history(false);
-}
-
void EditorNode::set_current_scene(int p_idx) {
// Save the folding in case the scene gets reloaded.
if (editor_data.get_scene_path(p_idx) != "" && editor_data.get_edited_scene_root(p_idx)) {
@@ -3683,7 +3671,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;
@@ -3750,8 +3738,8 @@ 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));
- if (!unsaved && editor_data.get_scene_path(i).is_empty()) {
+ 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--;
}
@@ -3918,9 +3906,9 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
void EditorNode::open_request(const String &p_path) {
if (!opening_prev) {
- List<String>::Element *prev_scene = previous_scenes.find(p_path);
- if (prev_scene != nullptr) {
- prev_scene->erase();
+ List<String>::Element *prev_scene_item = previous_scenes.find(p_path);
+ if (prev_scene_item != nullptr) {
+ prev_scene_item->erase();
}
}
@@ -3932,7 +3920,7 @@ void EditorNode::edit_foreign_resource(Ref<Resource> p_resource) {
InspectorDock::get_singleton()->call_deferred("edit_resource", p_resource);
}
-bool EditorNode::is_resource_read_only(Ref<Resource> p_resource) {
+bool EditorNode::is_resource_read_only(Ref<Resource> p_resource, bool p_foreign_resources_are_writable) {
ERR_FAIL_COND_V(p_resource.is_null(), false);
String path = p_resource->get_path();
@@ -3944,7 +3932,11 @@ bool EditorNode::is_resource_read_only(Ref<Resource> p_resource) {
// If the base resource is a packed scene, we treat it as read-only if it is not the currently edited scene.
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) {
- return true;
+ // If we have not flagged foreign resources as writable or the base scene the resource is
+ // part was imported, it can be considered read-only.
+ if (!p_foreign_resources_are_writable || FileAccess::exists(base + ".import")) {
+ return true;
+ }
}
} else {
// If a corresponding .import file exists for the base file, we assume it to be imported and should therefore treated as read-only.
@@ -3963,7 +3955,7 @@ bool EditorNode::is_resource_read_only(Ref<Resource> p_resource) {
return false;
}
-void EditorNode::request_instance_scene(const String &p_path) {
+void EditorNode::request_instantiate_scene(const String &p_path) {
SceneTreeDock::get_singleton()->instantiate(p_path);
}
@@ -3971,10 +3963,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);
@@ -4048,7 +4036,7 @@ void EditorNode::_quick_opened() {
List<String> scene_extensions;
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &scene_extensions);
- if (open_scene_dialog || scene_extensions.find(files[i].get_extension())) {
+ if (open_scene_dialog || scene_extensions.find(files[i].get_extension().to_lower())) {
open_request(res_path);
} else {
load_resource(res_path);
@@ -4099,62 +4087,6 @@ bool EditorNode::is_scene_in_use(const String &p_path) {
return false;
}
-void EditorNode::register_editor_types() {
- ResourceLoader::set_timestamp_on_load(true);
- ResourceSaver::set_timestamp_on_save(true);
-
- GDREGISTER_CLASS(EditorPaths);
- GDREGISTER_CLASS(EditorPlugin);
- GDREGISTER_CLASS(EditorTranslationParserPlugin);
- GDREGISTER_CLASS(EditorImportPlugin);
- GDREGISTER_CLASS(EditorScript);
- GDREGISTER_CLASS(EditorSelection);
- GDREGISTER_CLASS(EditorFileDialog);
- GDREGISTER_ABSTRACT_CLASS(EditorSettings);
- GDREGISTER_CLASS(EditorNode3DGizmo);
- GDREGISTER_CLASS(EditorNode3DGizmoPlugin);
- GDREGISTER_ABSTRACT_CLASS(EditorResourcePreview);
- GDREGISTER_CLASS(EditorResourcePreviewGenerator);
- GDREGISTER_ABSTRACT_CLASS(EditorFileSystem);
- GDREGISTER_CLASS(EditorFileSystemDirectory);
- GDREGISTER_CLASS(EditorVCSInterface);
- GDREGISTER_ABSTRACT_CLASS(ScriptEditor);
- GDREGISTER_ABSTRACT_CLASS(ScriptEditorBase);
- GDREGISTER_CLASS(EditorSyntaxHighlighter);
- GDREGISTER_ABSTRACT_CLASS(EditorInterface);
- GDREGISTER_CLASS(EditorExportPlugin);
- GDREGISTER_ABSTRACT_CLASS(EditorExportPlatform);
- GDREGISTER_CLASS(EditorResourceConversionPlugin);
- GDREGISTER_CLASS(EditorSceneFormatImporter);
- GDREGISTER_CLASS(EditorScenePostImportPlugin);
- GDREGISTER_CLASS(EditorInspector);
- GDREGISTER_CLASS(EditorInspectorPlugin);
- GDREGISTER_CLASS(EditorProperty);
- GDREGISTER_CLASS(AnimationTrackEditPlugin);
- GDREGISTER_CLASS(ScriptCreateDialog);
- GDREGISTER_CLASS(EditorFeatureProfile);
- GDREGISTER_CLASS(EditorSpinSlider);
- GDREGISTER_CLASS(EditorResourcePicker);
- GDREGISTER_CLASS(EditorScriptPicker);
- GDREGISTER_ABSTRACT_CLASS(EditorUndoRedoManager);
-
- GDREGISTER_ABSTRACT_CLASS(FileSystemDock);
- GDREGISTER_VIRTUAL_CLASS(EditorFileSystemImportFormatSupportQuery);
-
- GDREGISTER_CLASS(EditorScenePostImport);
- GDREGISTER_CLASS(EditorCommandPalette);
- GDREGISTER_CLASS(EditorDebuggerPlugin);
-}
-
-void EditorNode::unregister_editor_types() {
- _init_callbacks.clear();
- if (EditorPaths::get_singleton()) {
- EditorPaths::free();
- }
-
- EditorResourcePicker::clear_caches();
-}
-
void EditorNode::stop_child_process(OS::ProcessID p_pid) {
if (has_child_process(p_pid)) {
editor_run.stop_child_process(p_pid);
@@ -4167,9 +4099,9 @@ void EditorNode::stop_child_process(OS::ProcessID p_pid) {
Ref<Script> EditorNode::get_object_custom_type_base(const Object *p_object) const {
ERR_FAIL_COND_V(!p_object, nullptr);
- Ref<Script> script = p_object->get_script();
+ Ref<Script> scr = p_object->get_script();
- if (script.is_valid()) {
+ if (scr.is_valid()) {
// Uncommenting would break things! Consider adding a parameter if you need it.
// StringName name = EditorNode::get_editor_data().script_class_get_name(base_script->get_path());
// if (name != StringName()) {
@@ -4177,18 +4109,18 @@ Ref<Script> EditorNode::get_object_custom_type_base(const Object *p_object) cons
// }
// TODO: Should probably be deprecated in 4.x
- StringName base = script->get_instance_base_type();
+ StringName base = scr->get_instance_base_type();
if (base != StringName() && EditorNode::get_editor_data().get_custom_types().has(base)) {
const Vector<EditorData::CustomType> &types = EditorNode::get_editor_data().get_custom_types()[base];
- Ref<Script> base_script = script;
- while (base_script.is_valid()) {
+ Ref<Script> base_scr = scr;
+ while (base_scr.is_valid()) {
for (int i = 0; i < types.size(); ++i) {
- if (types[i].script == base_script) {
+ if (types[i].script == base_scr) {
return types[i].script;
}
}
- base_script = base_script->get_base_script();
+ base_scr = base_scr->get_base_script();
}
}
}
@@ -4199,30 +4131,30 @@ Ref<Script> EditorNode::get_object_custom_type_base(const Object *p_object) cons
StringName EditorNode::get_object_custom_type_name(const Object *p_object) const {
ERR_FAIL_COND_V(!p_object, StringName());
- Ref<Script> script = p_object->get_script();
- if (script.is_null() && Object::cast_to<Script>(p_object)) {
- script = p_object;
+ Ref<Script> scr = p_object->get_script();
+ if (scr.is_null() && Object::cast_to<Script>(p_object)) {
+ scr = p_object;
}
- if (script.is_valid()) {
- Ref<Script> base_script = script;
- while (base_script.is_valid()) {
- StringName name = EditorNode::get_editor_data().script_class_get_name(base_script->get_path());
+ if (scr.is_valid()) {
+ Ref<Script> base_scr = scr;
+ while (base_scr.is_valid()) {
+ StringName name = EditorNode::get_editor_data().script_class_get_name(base_scr->get_path());
if (name != StringName()) {
return name;
}
// TODO: Should probably be deprecated in 4.x.
- StringName base = base_script->get_instance_base_type();
+ StringName base = base_scr->get_instance_base_type();
if (base != StringName() && EditorNode::get_editor_data().get_custom_types().has(base)) {
const Vector<EditorData::CustomType> &types = EditorNode::get_editor_data().get_custom_types()[base];
for (int i = 0; i < types.size(); ++i) {
- if (types[i].script == base_script) {
+ if (types[i].script == base_scr) {
return types[i].name;
}
}
}
- base_script = base_script->get_base_script();
+ base_scr = base_scr->get_base_script();
}
}
@@ -4266,40 +4198,40 @@ void EditorNode::_pick_main_scene_custom_action(const String &p_custom_action_na
Ref<Texture2D> EditorNode::get_object_icon(const Object *p_object, const String &p_fallback) {
ERR_FAIL_COND_V(!p_object || !gui_base, nullptr);
- Ref<Script> script = p_object->get_script();
- if (script.is_null() && p_object->is_class("Script")) {
- script = p_object;
+ Ref<Script> scr = p_object->get_script();
+ if (scr.is_null() && p_object->is_class("Script")) {
+ scr = p_object;
}
- if (script.is_valid() && !script_icon_cache.has(script)) {
- Ref<Script> base_script = script;
- while (base_script.is_valid()) {
- StringName name = EditorNode::get_editor_data().script_class_get_name(base_script->get_path());
+ if (scr.is_valid() && !script_icon_cache.has(scr)) {
+ Ref<Script> base_scr = scr;
+ while (base_scr.is_valid()) {
+ StringName name = EditorNode::get_editor_data().script_class_get_name(base_scr->get_path());
String icon_path = EditorNode::get_editor_data().script_class_get_icon_path(name);
Ref<ImageTexture> icon = _load_custom_class_icon(icon_path);
if (icon.is_valid()) {
- script_icon_cache[script] = icon;
+ script_icon_cache[scr] = icon;
return icon;
}
// TODO: should probably be deprecated in 4.x
- StringName base = base_script->get_instance_base_type();
+ StringName base = base_scr->get_instance_base_type();
if (base != StringName() && EditorNode::get_editor_data().get_custom_types().has(base)) {
const Vector<EditorData::CustomType> &types = EditorNode::get_editor_data().get_custom_types()[base];
for (int i = 0; i < types.size(); ++i) {
- if (types[i].script == base_script && types[i].icon.is_valid()) {
- script_icon_cache[script] = types[i].icon;
+ if (types[i].script == base_scr && types[i].icon.is_valid()) {
+ script_icon_cache[scr] = types[i].icon;
return types[i].icon;
}
}
}
- base_script = base_script->get_base_script();
+ base_scr = base_scr->get_base_script();
}
// If no icon found, cache it as null.
- script_icon_cache[script] = Ref<Texture>();
- } else if (script.is_valid() && script_icon_cache.has(script) && script_icon_cache[script].is_valid()) {
- return script_icon_cache[script];
+ script_icon_cache[scr] = Ref<Texture>();
+ } else if (scr.is_valid() && script_icon_cache.has(scr) && script_icon_cache[scr].is_valid()) {
+ return script_icon_cache[scr];
}
// TODO: Should probably be deprecated in 4.x.
@@ -4323,7 +4255,7 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p
if (ScriptServer::is_global_class(p_class)) {
String class_name = p_class;
- Ref<Script> script = EditorNode::get_editor_data().script_class_load_script(class_name);
+ Ref<Script> scr = EditorNode::get_editor_data().script_class_load_script(class_name);
while (true) {
String icon_path = EditorNode::get_editor_data().script_class_get_icon_path(class_name);
@@ -4334,18 +4266,18 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p
// Find next global class along the inheritance chain.
do {
- Ref<Script> base_script = script->get_base_script();
- if (base_script.is_null()) {
+ Ref<Script> base_scr = scr->get_base_script();
+ if (base_scr.is_null()) {
// We've reached a native class, use its icon.
String base_type;
- script->get_language()->get_global_class_name(script->get_path(), &base_type);
+ scr->get_language()->get_global_class_name(scr->get_path(), &base_type);
if (gui_base->has_theme_icon(base_type, "EditorIcons")) {
return gui_base->get_theme_icon(base_type, "EditorIcons");
}
return gui_base->get_theme_icon(p_fallback, "EditorIcons");
}
- script = base_script;
- class_name = EditorNode::get_editor_data().script_class_get_name(script->get_path());
+ scr = base_scr;
+ class_name = EditorNode::get_editor_data().script_class_get_name(scr->get_path());
} while (class_name.is_empty());
}
}
@@ -4365,10 +4297,31 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p
return nullptr;
}
+bool EditorNode::is_object_of_custom_type(const Object *p_object, const StringName &p_class) {
+ ERR_FAIL_COND_V(!p_object, false);
+
+ Ref<Script> scr = p_object->get_script();
+ if (scr.is_null() && Object::cast_to<Script>(p_object)) {
+ scr = p_object;
+ }
+
+ if (scr.is_valid()) {
+ Ref<Script> base_script = scr;
+ while (base_script.is_valid()) {
+ StringName name = EditorNode::get_editor_data().script_class_get_name(base_script->get_path());
+ if (name == p_class) {
+ return true;
+ }
+ base_script = base_script->get_base_script();
+ }
+ }
+ return false;
+}
+
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);
}
}
@@ -4377,15 +4330,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);
}
}
@@ -4433,6 +4388,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);
}
@@ -4506,8 +4468,9 @@ void EditorNode::_dock_floating_close_request(Control *p_control) {
dock_slot[window_slot]->add_child(p_control);
dock_slot[window_slot]->move_child(p_control, MIN((int)window->get_meta("dock_index"), dock_slot[window_slot]->get_tab_count()));
dock_slot[window_slot]->set_current_tab(window->get_meta("dock_index"));
+ dock_slot[window_slot]->set_tab_title(dock_slot[window_slot]->get_tab_idx_from_control(p_control), TTRGET(p_control->get_name()));
- window->queue_delete();
+ window->queue_free();
_update_dock_containers();
@@ -4529,7 +4492,7 @@ void EditorNode::_dock_make_float() {
dock_slot[dock_popup_selected_idx]->remove_child(dock);
Window *window = memnew(Window);
- window->set_title(dock->get_name());
+ window->set_title(TTRGET(dock->get_name()));
Panel *p = memnew(Panel);
p->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("PanelForeground"), SNAME("EditorStyles")));
p->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
@@ -4650,26 +4613,24 @@ void EditorNode::_dock_move_left() {
if (dock_popup_selected_idx < 0 || dock_popup_selected_idx >= DOCK_SLOT_MAX) {
return;
}
- Control *current = dock_slot[dock_popup_selected_idx]->get_tab_control(dock_slot[dock_popup_selected_idx]->get_current_tab());
- Control *prev = dock_slot[dock_popup_selected_idx]->get_tab_control(dock_slot[dock_popup_selected_idx]->get_current_tab() - 1);
- if (!current || !prev) {
+ Control *current_ctl = dock_slot[dock_popup_selected_idx]->get_tab_control(dock_slot[dock_popup_selected_idx]->get_current_tab());
+ Control *prev_ctl = dock_slot[dock_popup_selected_idx]->get_tab_control(dock_slot[dock_popup_selected_idx]->get_current_tab() - 1);
+ if (!current_ctl || !prev_ctl) {
return;
}
- dock_slot[dock_popup_selected_idx]->move_child(current, prev->get_index());
- dock_slot[dock_popup_selected_idx]->set_current_tab(dock_slot[dock_popup_selected_idx]->get_current_tab() - 1);
+ dock_slot[dock_popup_selected_idx]->move_child(current_ctl, prev_ctl->get_index(false));
dock_select->queue_redraw();
_edit_current();
_save_docks();
}
void EditorNode::_dock_move_right() {
- Control *current = dock_slot[dock_popup_selected_idx]->get_tab_control(dock_slot[dock_popup_selected_idx]->get_current_tab());
- Control *next = dock_slot[dock_popup_selected_idx]->get_tab_control(dock_slot[dock_popup_selected_idx]->get_current_tab() + 1);
- if (!current || !next) {
+ Control *current_ctl = dock_slot[dock_popup_selected_idx]->get_tab_control(dock_slot[dock_popup_selected_idx]->get_current_tab());
+ Control *next_ctl = dock_slot[dock_popup_selected_idx]->get_tab_control(dock_slot[dock_popup_selected_idx]->get_current_tab() + 1);
+ if (!current_ctl || !next_ctl) {
return;
}
- dock_slot[dock_popup_selected_idx]->move_child(next, current->get_index());
- dock_slot[dock_popup_selected_idx]->set_current_tab(dock_slot[dock_popup_selected_idx]->get_current_tab() + 1);
+ dock_slot[dock_popup_selected_idx]->move_child(next_ctl, current_ctl->get_index(false));
dock_select->queue_redraw();
_edit_current();
_save_docks();
@@ -4853,7 +4814,7 @@ void EditorNode::_load_docks() {
editor_data.set_plugin_window_layout(config);
}
-void EditorNode::_update_dock_slots_visibility() {
+void EditorNode::_update_dock_slots_visibility(bool p_keep_selected_tabs) {
if (!docks_visible) {
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
dock_slot[i]->hide();
@@ -4888,9 +4849,11 @@ void EditorNode::_update_dock_slots_visibility() {
}
}
- for (int i = 0; i < DOCK_SLOT_MAX; i++) {
- if (dock_slot[i]->is_visible() && dock_slot[i]->get_tab_count()) {
- dock_slot[i]->set_current_tab(0);
+ if (!p_keep_selected_tabs) {
+ for (int i = 0; i < DOCK_SLOT_MAX; i++) {
+ if (dock_slot[i]->is_visible() && dock_slot[i]->get_tab_count()) {
+ dock_slot[i]->set_current_tab(0);
+ }
}
}
@@ -4951,7 +4914,7 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String
Vector<String> names = String(p_layout->get_value(p_section, "dock_" + itos(i + 1))).split(",");
- for (int j = 0; j < names.size(); j++) {
+ for (int j = names.size() - 1; j >= 0; j--) {
String name = names[j];
// FIXME: Find it, in a horribly inefficient way.
int atidx = -1;
@@ -4972,7 +4935,7 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String
}
if (atidx == i) {
- node->move_to_front();
+ dock_slot[i]->move_child(node, 0);
continue;
}
@@ -4982,6 +4945,7 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String
dock_slot[atidx]->hide();
}
dock_slot[i]->add_child(node);
+ dock_slot[i]->move_child(node, 0);
dock_slot[i]->show();
}
}
@@ -5084,7 +5048,7 @@ bool EditorNode::has_scenes_in_session() {
bool EditorNode::ensure_main_scene(bool p_from_native) {
pick_main_scene->set_meta("from_native", p_from_native); // Whether from play button or native run.
- String main_scene = GLOBAL_DEF_BASIC("application/run/main_scene", "");
+ String main_scene = GLOBAL_GET("application/run/main_scene");
if (main_scene.is_empty()) {
current_menu_option = -1;
@@ -5118,8 +5082,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() {
@@ -5151,7 +5115,7 @@ bool EditorNode::is_run_playing() const {
String EditorNode::get_run_playing_scene() const {
String run_filename = editor_run.get_running_scene();
if (run_filename.is_empty() && is_run_playing()) {
- run_filename = GLOBAL_DEF_BASIC("application/run/main_scene", ""); // Must be the main scene then.
+ run_filename = GLOBAL_GET("application/run/main_scene"); // Must be the main scene then.
}
return run_filename;
@@ -5183,6 +5147,10 @@ bool EditorNode::immediate_confirmation_dialog(const String &p_text, const Strin
return singleton->immediate_dialog_confirmed;
}
+void EditorNode::cleanup() {
+ _init_callbacks.clear();
+}
+
int EditorNode::get_current_tab() {
return scene_tabs->get_current_tab();
}
@@ -5227,15 +5195,15 @@ void EditorNode::_layout_menu_option(int p_id) {
current_menu_option = p_id;
layout_dialog->set_title(TTR("Save Layout"));
layout_dialog->set_ok_button_text(TTR("Save"));
- layout_dialog->popup_centered();
layout_dialog->set_name_line_enabled(true);
+ layout_dialog->popup_centered();
} break;
case SETTINGS_LAYOUT_DELETE: {
current_menu_option = p_id;
layout_dialog->set_title(TTR("Delete Layout"));
layout_dialog->set_ok_button_text(TTR("Delete"));
- layout_dialog->popup_centered();
layout_dialog->set_name_line_enabled(false);
+ layout_dialog->popup_centered();
} break;
case SETTINGS_LAYOUT_DEFAULT: {
_load_docks_from_config(default_layout, "docks");
@@ -5256,9 +5224,9 @@ void EditorNode::_layout_menu_option(int p_id) {
}
void EditorNode::_scene_tab_script_edited(int p_tab) {
- Ref<Script> script = editor_data.get_scene_root_script(p_tab);
- if (script.is_valid()) {
- InspectorDock::get_singleton()->edit_resource(script);
+ Ref<Script> scr = editor_data.get_scene_root_script(p_tab);
+ if (scr.is_valid()) {
+ InspectorDock::get_singleton()->edit_resource(scr);
}
}
@@ -5271,7 +5239,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"));
@@ -5334,12 +5302,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);
}
@@ -5503,7 +5469,7 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
void EditorNode::set_docks_visible(bool p_show) {
docks_visible = p_show;
- _update_dock_slots_visibility();
+ _update_dock_slots_visibility(true);
}
bool EditorNode::get_docks_visible() const {
@@ -5511,7 +5477,7 @@ bool EditorNode::get_docks_visible() const {
}
void EditorNode::_toggle_distraction_free_mode() {
- if (EditorSettings::get_singleton()->get("interface/editor/separate_distraction_mode")) {
+ if (EDITOR_GET("interface/editor/separate_distraction_mode")) {
int screen = -1;
for (int i = 0; i < editor_table.size(); i++) {
if (editor_plugin_screen == editor_table[i]) {
@@ -5711,7 +5677,7 @@ void EditorNode::_global_menu_new_window(const Variant &p_tag) {
}
void EditorNode::_dropped_files(const Vector<String> &p_files) {
- String to_path = ProjectSettings::get_singleton()->globalize_path(FileSystemDock::get_singleton()->get_selected_path());
+ String to_path = ProjectSettings::get_singleton()->globalize_path(FileSystemDock::get_singleton()->get_current_directory());
_add_dropped_files_recursive(p_files, to_path);
@@ -5772,7 +5738,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;
}
@@ -5788,7 +5754,7 @@ 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);
@@ -5878,27 +5844,31 @@ void EditorNode::_bottom_panel_raise_toggled(bool p_pressed) {
top_split->set_visible(!p_pressed);
}
-void EditorNode::_update_rendering_driver_color() {
- if (rendering_driver->get_text() == "opengl3") {
- rendering_driver->add_theme_color_override("font_color", Color::hex(0x5586a4ff));
- } else if (rendering_driver->get_text() == "vulkan") {
- rendering_driver->add_theme_color_override("font_color", theme_base->get_theme_color(SNAME("vulkan_color"), SNAME("Editor")));
+void EditorNode::_update_renderer_color() {
+ if (renderer->get_text() == "Forward+") {
+ renderer->add_theme_color_override("font_color", Color::hex(0x5d8c3fff));
+ }
+ if (renderer->get_text() == "Mobile") {
+ renderer->add_theme_color_override("font_color", Color::hex(0xa5557dff));
+ }
+ if (renderer->get_text() == "Compatibility") {
+ renderer->add_theme_color_override("font_color", Color::hex(0x5586a4ff));
}
}
-void EditorNode::_rendering_driver_selected(int p_which) {
- String driver = rendering_driver->get_item_metadata(p_which);
+void EditorNode::_renderer_selected(int p_which) {
+ String rendering_method = renderer->get_item_metadata(p_which);
- String current_driver = OS::get_singleton()->get_current_rendering_driver_name();
+ String current_renderer = GLOBAL_GET("rendering/renderer/rendering_method");
- if (driver == current_driver) {
+ if (rendering_method == current_renderer) {
return;
}
- rendering_driver_request = driver;
+ renderer_request = rendering_method;
video_restart_dialog->popup_centered();
- rendering_driver->select(rendering_driver_current);
- _update_rendering_driver_color();
+ renderer->select(renderer_current);
+ _update_renderer_color();
}
void EditorNode::_resource_saved(Ref<Resource> p_resource, const String &p_path) {
@@ -5918,12 +5888,14 @@ void EditorNode::_feature_profile_changed() {
TabContainer *import_tabs = cast_to<TabContainer>(ImportDock::get_singleton()->get_parent());
TabContainer *node_tabs = cast_to<TabContainer>(NodeDock::get_singleton()->get_parent());
TabContainer *fs_tabs = cast_to<TabContainer>(FileSystemDock::get_singleton()->get_parent());
+ TabContainer *history_tabs = cast_to<TabContainer>(history_dock->get_parent());
if (profile.is_valid()) {
node_tabs->set_tab_hidden(node_tabs->get_tab_idx_from_control(NodeDock::get_singleton()), profile->is_feature_disabled(EditorFeatureProfile::FEATURE_NODE_DOCK));
// The Import dock is useless without the FileSystem dock. Ensure the configuration is valid.
bool fs_dock_disabled = profile->is_feature_disabled(EditorFeatureProfile::FEATURE_FILESYSTEM_DOCK);
fs_tabs->set_tab_hidden(fs_tabs->get_tab_idx_from_control(FileSystemDock::get_singleton()), fs_dock_disabled);
import_tabs->set_tab_hidden(import_tabs->get_tab_idx_from_control(ImportDock::get_singleton()), fs_dock_disabled || profile->is_feature_disabled(EditorFeatureProfile::FEATURE_IMPORT_DOCK));
+ history_tabs->set_tab_hidden(history_tabs->get_tab_idx_from_control(history_dock), profile->is_feature_disabled(EditorFeatureProfile::FEATURE_HISTORY_DOCK));
main_editor_buttons[EDITOR_3D]->set_visible(!profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D));
main_editor_buttons[EDITOR_SCRIPT]->set_visible(!profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCRIPT));
@@ -5933,15 +5905,13 @@ void EditorNode::_feature_profile_changed() {
if ((profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D) && singleton->main_editor_buttons[EDITOR_3D]->is_pressed()) ||
(profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCRIPT) && singleton->main_editor_buttons[EDITOR_SCRIPT]->is_pressed()) ||
(AssetLibraryEditorPlugin::is_available() && profile->is_feature_disabled(EditorFeatureProfile::FEATURE_ASSET_LIB) && singleton->main_editor_buttons[EDITOR_ASSETLIB]->is_pressed())) {
- _editor_select(EDITOR_2D);
+ editor_select(EDITOR_2D);
}
} else {
import_tabs->set_tab_hidden(import_tabs->get_tab_idx_from_control(ImportDock::get_singleton()), false);
node_tabs->set_tab_hidden(node_tabs->get_tab_idx_from_control(NodeDock::get_singleton()), false);
fs_tabs->set_tab_hidden(fs_tabs->get_tab_idx_from_control(FileSystemDock::get_singleton()), false);
- ImportDock::get_singleton()->set_visible(true);
- NodeDock::get_singleton()->set_visible(true);
- FileSystemDock::get_singleton()->set_visible(true);
+ history_tabs->set_tab_hidden(history_tabs->get_tab_idx_from_control(history_dock), false);
main_editor_buttons[EDITOR_3D]->set_visible(true);
main_editor_buttons[EDITOR_SCRIPT]->set_visible(true);
if (AssetLibraryEditorPlugin::is_available()) {
@@ -5953,22 +5923,16 @@ void EditorNode::_feature_profile_changed() {
}
void EditorNode::_bind_methods() {
- GLOBAL_DEF("editor/scene/scene_naming", SCENE_NAME_CASING_SNAKE_CASE);
- ProjectSettings::get_singleton()->set_custom_property_info("editor/scene/scene_naming", PropertyInfo(Variant::INT, "editor/scene/scene_naming", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"));
+ GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/scene/scene_naming", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"), SCENE_NAME_CASING_SNAKE_CASE);
ClassDB::bind_method("edit_current", &EditorNode::edit_current);
- ClassDB::bind_method("_editor_select", &EditorNode::_editor_select);
- ClassDB::bind_method("_node_renamed", &EditorNode::_node_renamed);
ClassDB::bind_method("edit_node", &EditorNode::edit_node);
ClassDB::bind_method(D_METHOD("push_item", "object", "property", "inspector_only"), &EditorNode::push_item, DEFVAL(""), DEFVAL(false));
- ClassDB::bind_method("_get_scene_metadata", &EditorNode::_get_scene_metadata);
ClassDB::bind_method("set_edited_scene", &EditorNode::set_edited_scene);
ClassDB::bind_method("open_request", &EditorNode::open_request);
ClassDB::bind_method("edit_foreign_resource", &EditorNode::edit_foreign_resource);
ClassDB::bind_method("is_resource_read_only", &EditorNode::is_resource_read_only);
- ClassDB::bind_method("_close_messages", &EditorNode::_close_messages);
- ClassDB::bind_method("_show_messages", &EditorNode::_show_messages);
ClassDB::bind_method("stop_child_process", &EditorNode::stop_child_process);
@@ -5977,19 +5941,8 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method("_set_main_scene_state", &EditorNode::_set_main_scene_state);
ClassDB::bind_method("_update_recent_scenes", &EditorNode::_update_recent_scenes);
- ClassDB::bind_method("_clear_undo_history", &EditorNode::_clear_undo_history);
-
- ClassDB::bind_method("edit_item_resource", &EditorNode::edit_item_resource);
-
ClassDB::bind_method(D_METHOD("get_gui_base"), &EditorNode::get_gui_base);
- ClassDB::bind_method(D_METHOD("_on_plugin_ready"), &EditorNode::_on_plugin_ready); // Still used by some connect_compat.
-
- ClassDB::bind_method("_screenshot", &EditorNode::_screenshot);
- ClassDB::bind_method("_save_screenshot", &EditorNode::_save_screenshot);
-
- ClassDB::bind_method("_version_button_pressed", &EditorNode::_version_button_pressed);
-
ADD_SIGNAL(MethodInfo("play_pressed"));
ADD_SIGNAL(MethodInfo("pause_pressed"));
ADD_SIGNAL(MethodInfo("stop_pressed"));
@@ -5998,6 +5951,7 @@ void EditorNode::_bind_methods() {
ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "obj")));
ADD_SIGNAL(MethodInfo("scene_saved", PropertyInfo(Variant::STRING, "path")));
ADD_SIGNAL(MethodInfo("project_settings_changed"));
+ ADD_SIGNAL(MethodInfo("scene_changed"));
}
static Node *_resource_get_edited_scene() {
@@ -6109,14 +6063,7 @@ EditorNode::EditorNode() {
Input *id = Input::get_singleton();
if (id) {
- bool found_touchscreen = false;
- for (int i = 0; i < DisplayServer::get_singleton()->get_screen_count(); i++) {
- if (DisplayServer::get_singleton()->screen_is_touchscreen(i)) {
- found_touchscreen = true;
- }
- }
-
- if (!found_touchscreen && Input::get_singleton()) {
+ if (!DisplayServer::get_singleton()->is_touchscreen_available() && Input::get_singleton()) {
// Only if no touchscreen ui hint, disable emulation just in case.
id->set_emulate_touch_from_mouse(false);
}
@@ -6125,6 +6072,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()) {
@@ -6134,7 +6084,7 @@ EditorNode::EditorNode() {
FileAccess::set_backup_save(EDITOR_GET("filesystem/on_save/safe_save_on_backup_then_rename"));
{
- int display_scale = EditorSettings::get_singleton()->get("interface/editor/display_scale");
+ int display_scale = EDITOR_GET("interface/editor/display_scale");
switch (display_scale) {
case 0:
@@ -6160,18 +6110,28 @@ EditorNode::EditorNode() {
editor_set_scale(2.0);
break;
default:
- editor_set_scale(EditorSettings::get_singleton()->get("interface/editor/custom_display_scale"));
+ editor_set_scale(EDITOR_GET("interface/editor/custom_display_scale"));
break;
}
}
// 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"));
+ EditorFileDialog::set_default_display_mode((EditorFileDialog::DisplayMode)EDITOR_GET("filesystem/file_dialog/display_mode").operator int());
+
+ int swap_cancel_ok = EDITOR_GET("interface/editor/accept_dialog_cancel_ok_buttons");
+ if (swap_cancel_ok != 0) { // 0 is auto, set in register_scene based on DisplayServer.
+ // Swap on means OK first.
+ AcceptDialog::set_swap_cancel_ok(swap_cancel_ok == 2);
+ }
ResourceLoader::set_abort_on_missing_resources(false);
- FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"));
- EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"));
- EditorFileDialog::set_default_display_mode((EditorFileDialog::DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int());
ResourceLoader::set_error_notify_func(this, _load_error_notify);
ResourceLoader::set_dependency_error_notify_func(this, _dependency_error_report);
@@ -6298,6 +6258,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();
@@ -6332,7 +6293,7 @@ EditorNode::EditorNode() {
ED_SHORTCUT("canvas_item_editor/pan_view", TTR("Pan View"), Key::SPACE);
- const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false);
+ const Vector<String> textfile_ext = ((String)(EDITOR_GET("docks/filesystem/textfile_extensions"))).split(",", false);
for (const String &E : textfile_ext) {
textfile_extensions.insert(E);
}
@@ -6352,7 +6313,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);
@@ -6601,14 +6561,14 @@ EditorNode::EditorNode() {
if (can_expand) {
// Add spacer to avoid other controls under window minimize/maximize/close buttons (left side).
- Control *menu_spacer = memnew(Control);
- menu_spacer->set_mouse_filter(Control::MOUSE_FILTER_PASS);
- menu_spacer->set_custom_minimum_size(Size2(DisplayServer::get_singleton()->window_get_safe_title_margins(DisplayServer::MAIN_WINDOW_ID).x, 0));
- menu_hb->add_child(menu_spacer);
+ left_menu_spacer = memnew(Control);
+ left_menu_spacer->set_mouse_filter(Control::MOUSE_FILTER_PASS);
+ menu_hb->add_child(left_menu_spacer);
}
main_menu = memnew(MenuBar);
menu_hb->add_child(main_menu);
+
main_menu->add_theme_style_override("hover", gui_base->get_theme_stylebox(SNAME("MenuHover"), SNAME("EditorStyles")));
main_menu->set_flat(true);
main_menu->set_start_index(0); // Main menu, add to the start of global menu.
@@ -6675,6 +6635,11 @@ EditorNode::EditorNode() {
gui_base->add_child(about);
feature_profile_manager->connect("current_feature_profile_changed", callable_mp(this, &EditorNode::_feature_profile_changed));
+#if !defined(ANDROID_ENABLED) && !defined(WEB_ENABLED)
+ fbx_importer_manager = memnew(FBXImporterManager);
+ gui_base->add_child(fbx_importer_manager);
+#endif
+
warning = memnew(AcceptDialog);
warning->add_button(TTR("Copy Text"), true, "copy");
gui_base->add_child(warning);
@@ -6750,8 +6715,10 @@ EditorNode::EditorNode() {
project_menu->add_separator();
project_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/export", TTR("Export..."), Key::NONE, TTR("Export")), FILE_EXPORT_PROJECT);
+#ifndef ANDROID_ENABLED
project_menu->add_item(TTR("Install Android Build Template..."), FILE_INSTALL_ANDROID_SOURCE);
project_menu->add_item(TTR("Open User Data Folder"), RUN_USER_DATA_FOLDER);
+#endif
project_menu->add_separator();
project_menu->add_item(TTR("Customize Engine Build Configuration..."), TOOLS_BUILD_PROFILE_MANAGER);
@@ -6775,22 +6742,30 @@ EditorNode::EditorNode() {
project_menu->add_shortcut(ED_GET_SHORTCUT("editor/quit_to_project_list"), RUN_PROJECT_MANAGER, true);
// Spacer to center 2D / 3D / Script buttons.
- Control *left_spacer = memnew(Control);
+ HBoxContainer *left_spacer = memnew(HBoxContainer);
left_spacer->set_mouse_filter(Control::MOUSE_FILTER_PASS);
+ left_spacer->set_h_size_flags(Control::SIZE_EXPAND_FILL);
menu_hb->add_child(left_spacer);
- menu_hb->add_spacer();
+ if (can_expand && global_menu) {
+ project_title = memnew(Label);
+ project_title->add_theme_font_override("font", gui_base->get_theme_font(SNAME("bold"), SNAME("EditorFonts")));
+ project_title->add_theme_font_size_override("font_size", gui_base->get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts")));
+ project_title->set_focus_mode(Control::FOCUS_NONE);
+ 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);
+ left_spacer->add_child(project_title);
+ }
- main_editor_button_vb = memnew(HBoxContainer);
- menu_hb->add_child(main_editor_button_vb);
+ main_editor_button_hb = memnew(HBoxContainer);
+ menu_hb->add_child(main_editor_button_hb);
// Options are added and handled by DebuggerEditorPlugin.
debug_menu = memnew(PopupMenu);
debug_menu->set_name(TTR("Debug"));
main_menu->add_child(debug_menu);
- menu_hb->add_spacer();
-
settings_menu = memnew(PopupMenu);
settings_menu->set_name(TTR("Editor"));
main_menu->add_child(settings_menu);
@@ -6814,12 +6789,14 @@ EditorNode::EditorNode() {
settings_menu->set_item_tooltip(-1, TTR("Screenshots are stored in the Editor Data/Settings Folder."));
+#ifndef ANDROID_ENABLED
ED_SHORTCUT_AND_COMMAND("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KeyModifierMask::SHIFT | Key::F11);
ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::F);
settings_menu->add_shortcut(ED_GET_SHORTCUT("editor/fullscreen_mode"), SETTINGS_TOGGLE_FULLSCREEN);
-
+#endif
settings_menu->add_separator();
+#ifndef ANDROID_ENABLED
if (OS::get_singleton()->get_data_path() == OS::get_singleton()->get_config_path()) {
// Configuration and data folders are located in the same place (Windows/MacOS).
settings_menu->add_item(TTR("Open Editor Data/Settings Folder"), SETTINGS_EDITOR_DATA_FOLDER);
@@ -6829,9 +6806,15 @@ EditorNode::EditorNode() {
settings_menu->add_item(TTR("Open Editor Settings Folder"), SETTINGS_EDITOR_CONFIG_FOLDER);
}
settings_menu->add_separator();
+#endif
settings_menu->add_item(TTR("Manage Editor Features..."), SETTINGS_MANAGE_FEATURE_PROFILES);
+#ifndef ANDROID_ENABLED
settings_menu->add_item(TTR("Manage Export Templates..."), SETTINGS_MANAGE_EXPORT_TEMPLATES);
+#endif
+#if !defined(ANDROID_ENABLED) && !defined(WEB_ENABLED)
+ settings_menu->add_item(TTR("Configure FBX Importer..."), SETTINGS_MANAGE_FBX_IMPORTER);
+#endif
help_menu = memnew(PopupMenu);
help_menu->set_name(TTR("Help"));
@@ -6859,6 +6842,7 @@ EditorNode::EditorNode() {
// Spacer to center 2D / 3D / Script buttons.
Control *right_spacer = memnew(Control);
right_spacer->set_mouse_filter(Control::MOUSE_FILTER_PASS);
+ right_spacer->set_h_size_flags(Control::SIZE_EXPAND_FILL);
menu_hb->add_child(right_spacer);
launch_pad = memnew(PanelContainer);
@@ -6874,23 +6858,24 @@ EditorNode::EditorNode() {
play_button->set_toggle_mode(true);
play_button->set_focus_mode(Control::FOCUS_NONE);
play_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_PLAY));
+ play_button->set_tooltip_text(TTR("Run the project's default scene."));
- ED_SHORTCUT_AND_COMMAND("editor/play", TTR("Play"), Key::F5);
- ED_SHORTCUT_OVERRIDE("editor/play", "macos", KeyModifierMask::META | Key::B);
- play_button->set_shortcut(ED_GET_SHORTCUT("editor/play"));
+ ED_SHORTCUT_AND_COMMAND("editor/run_project", TTR("Run Project"), Key::F5);
+ ED_SHORTCUT_OVERRIDE("editor/run_project", "macos", KeyModifierMask::META | Key::B);
+ play_button->set_shortcut(ED_GET_SHORTCUT("editor/run_project"));
pause_button = memnew(Button);
pause_button->set_flat(true);
pause_button->set_toggle_mode(true);
pause_button->set_icon(gui_base->get_theme_icon(SNAME("Pause"), SNAME("EditorIcons")));
pause_button->set_focus_mode(Control::FOCUS_NONE);
- pause_button->set_tooltip_text(TTR("Pause the scene execution for debugging."));
+ pause_button->set_tooltip_text(TTR("Pause the running project's execution for debugging."));
pause_button->set_disabled(true);
launch_pad_hb->add_child(pause_button);
- ED_SHORTCUT("editor/pause_scene", TTR("Pause Scene"), Key::F7);
- ED_SHORTCUT_OVERRIDE("editor/pause_scene", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::Y);
- pause_button->set_shortcut(ED_GET_SHORTCUT("editor/pause_scene"));
+ ED_SHORTCUT("editor/pause_running_project", TTR("Pause Running Project"), Key::F7);
+ ED_SHORTCUT_OVERRIDE("editor/pause_running_project", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::Y);
+ pause_button->set_shortcut(ED_GET_SHORTCUT("editor/pause_running_project"));
stop_button = memnew(Button);
stop_button->set_flat(true);
@@ -6898,12 +6883,12 @@ EditorNode::EditorNode() {
stop_button->set_focus_mode(Control::FOCUS_NONE);
stop_button->set_icon(gui_base->get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
stop_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_STOP));
- stop_button->set_tooltip_text(TTR("Stop the scene."));
+ stop_button->set_tooltip_text(TTR("Stop the currently running project."));
stop_button->set_disabled(true);
- ED_SHORTCUT("editor/stop", TTR("Stop"), Key::F8);
- ED_SHORTCUT_OVERRIDE("editor/stop", "macos", KeyModifierMask::META | Key::PERIOD);
- stop_button->set_shortcut(ED_GET_SHORTCUT("editor/stop"));
+ ED_SHORTCUT("editor/stop_running_project", TTR("Stop Running Project"), Key::F8);
+ ED_SHORTCUT_OVERRIDE("editor/stop_running_project", "macos", KeyModifierMask::META | Key::PERIOD);
+ stop_button->set_shortcut(ED_GET_SHORTCUT("editor/stop_running_project"));
run_native = memnew(EditorRunNative);
launch_pad_hb->add_child(run_native);
@@ -6915,10 +6900,11 @@ EditorNode::EditorNode() {
play_scene_button->set_toggle_mode(true);
play_scene_button->set_focus_mode(Control::FOCUS_NONE);
play_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_PLAY_SCENE));
+ play_scene_button->set_tooltip_text(TTR("Run the currently edited scene."));
- ED_SHORTCUT_AND_COMMAND("editor/play_scene", TTR("Play Scene"), Key::F6);
- ED_SHORTCUT_OVERRIDE("editor/play_scene", "macos", KeyModifierMask::META | Key::R);
- play_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/play_scene"));
+ ED_SHORTCUT_AND_COMMAND("editor/run_current_scene", TTR("Run Current Scene"), Key::F6);
+ ED_SHORTCUT_OVERRIDE("editor/run_current_scene", "macos", KeyModifierMask::META | Key::R);
+ play_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/run_current_scene"));
play_custom_scene_button = memnew(Button);
play_custom_scene_button->set_flat(true);
@@ -6926,12 +6912,13 @@ EditorNode::EditorNode() {
play_custom_scene_button->set_toggle_mode(true);
play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE);
play_custom_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_PLAY_CUSTOM_SCENE));
+ play_custom_scene_button->set_tooltip_text(TTR("Run a specific scene."));
_reset_play_buttons();
- ED_SHORTCUT_AND_COMMAND("editor/play_custom_scene", TTR("Play Custom Scene"), KeyModifierMask::CTRL | KeyModifierMask::SHIFT | Key::F5);
- ED_SHORTCUT_OVERRIDE("editor/play_custom_scene", "macos", KeyModifierMask::META | KeyModifierMask::SHIFT | Key::R);
- play_custom_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/play_custom_scene"));
+ ED_SHORTCUT_AND_COMMAND("editor/run_specific_scene", TTR("Run Specific Scene"), KeyModifierMask::META | 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"));
write_movie_panel = memnew(PanelContainer);
write_movie_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("MovieWriterButtonNormal"), SNAME("EditorStyles")));
@@ -6955,58 +6942,62 @@ EditorNode::EditorNode() {
HBoxContainer *right_menu_hb = memnew(HBoxContainer);
menu_hb->add_child(right_menu_hb);
- rendering_driver = memnew(OptionButton);
+ renderer = memnew(OptionButton);
+ renderer->set_visible(true);
+ renderer->set_flat(true);
+ renderer->set_fit_to_longest_item(false);
+ renderer->set_focus_mode(Control::FOCUS_NONE);
+ renderer->connect("item_selected", callable_mp(this, &EditorNode::_renderer_selected));
+ renderer->add_theme_font_override("font", gui_base->get_theme_font(SNAME("bold"), SNAME("EditorFonts")));
+ renderer->add_theme_font_size_override("font_size", gui_base->get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts")));
+ renderer->set_tooltip_text(TTR("Choose a renderer."));
- // Hide the renderer selection dropdown until OpenGL support is more mature.
- // The renderer can still be changed in the project settings or using `--rendering-driver opengl3`.
- rendering_driver->set_visible(false);
-
- rendering_driver->set_flat(true);
- rendering_driver->set_focus_mode(Control::FOCUS_NONE);
- rendering_driver->connect("item_selected", callable_mp(this, &EditorNode::_rendering_driver_selected));
- rendering_driver->add_theme_font_override("font", gui_base->get_theme_font(SNAME("bold"), SNAME("EditorFonts")));
- rendering_driver->add_theme_font_size_override("font_size", gui_base->get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts")));
-
- right_menu_hb->add_child(rendering_driver);
+ right_menu_hb->add_child(renderer);
if (can_expand) {
// Add spacer to avoid other controls under the window minimize/maximize/close buttons (right side).
- Control *menu_spacer = memnew(Control);
- menu_spacer->set_mouse_filter(Control::MOUSE_FILTER_PASS);
- menu_spacer->set_custom_minimum_size(Size2(DisplayServer::get_singleton()->window_get_safe_title_margins(DisplayServer::MAIN_WINDOW_ID).y, 0));
- menu_hb->add_child(menu_spacer);
+ right_menu_spacer = memnew(Control);
+ right_menu_spacer->set_mouse_filter(Control::MOUSE_FILTER_PASS);
+ menu_hb->add_child(right_menu_spacer);
}
- // Only display the render drivers that are available for this display driver.
- int display_driver_idx = OS::get_singleton()->get_display_driver_id();
- Vector<String> render_drivers = DisplayServer::get_create_function_rendering_drivers(display_driver_idx);
- String current_rendering_driver = OS::get_singleton()->get_current_rendering_driver_name();
+ String current_renderer = GLOBAL_GET("rendering/renderer/rendering_method");
+
+ PackedStringArray renderers = ProjectSettings::get_singleton()->get_custom_property_info().get(StringName("rendering/renderer/rendering_method")).hint_string.split(",", false);
// As we are doing string comparisons, keep in standard case to prevent problems with capitals
// "vulkan" in particular uses lowercase "v" in the code, and uppercase in the UI.
- current_rendering_driver = current_rendering_driver.to_lower();
+ current_renderer = current_renderer.to_lower();
- for (int i = 0; i < render_drivers.size(); i++) {
- String driver = render_drivers[i];
+ for (int i = 0; i < renderers.size(); i++) {
+ String rendering_method = renderers[i];
- // Add the driver to the UI.
- rendering_driver->add_item(driver);
- rendering_driver->set_item_metadata(i, driver);
+ // Add the renderers name to the UI.
+ if (rendering_method == "forward_plus") {
+ renderer->add_item(TTR("Forward+"));
+ }
+ if (rendering_method == "mobile") {
+ renderer->add_item(TTR("Mobile"));
+ }
+ if (rendering_method == "gl_compatibility") {
+ renderer->add_item(TTR("Compatibility"));
+ }
+ renderer->set_item_metadata(i, rendering_method);
// Lowercase for standard comparison.
- driver = driver.to_lower();
+ rendering_method = rendering_method.to_lower();
- if (current_rendering_driver == driver) {
- rendering_driver->select(i);
- rendering_driver_current = i;
+ if (current_renderer == rendering_method) {
+ renderer->select(i);
+ renderer_current = i;
}
}
- _update_rendering_driver_color();
+ _update_renderer_color();
video_restart_dialog = memnew(ConfirmationDialog);
- video_restart_dialog->set_text(TTR("Changing the video driver requires restarting the editor."));
+ video_restart_dialog->set_text(TTR("Changing the renderer requires restarting the editor."));
video_restart_dialog->set_ok_button_text(TTR("Save & Restart"));
- video_restart_dialog->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SET_RENDERING_DRIVER_SAVE_AND_RESTART));
+ video_restart_dialog->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SET_RENDERER_NAME_SAVE_AND_RESTART));
gui_base->add_child(video_restart_dialog);
progress_hb = memnew(BackgroundProgress);
@@ -7037,10 +7028,12 @@ EditorNode::EditorNode() {
FileSystemDock *filesystem_dock = memnew(FileSystemDock);
filesystem_dock->connect("inherit", callable_mp(this, &EditorNode::_inherit_request));
- filesystem_dock->connect("instance", callable_mp(this, &EditorNode::_instantiate_request));
+ filesystem_dock->connect("instantiate", callable_mp(this, &EditorNode::_instantiate_request));
filesystem_dock->connect("display_mode_changed", callable_mp(this, &EditorNode::_save_docks));
get_project_settings()->connect_filesystem_dock_signals(filesystem_dock);
+ history_dock = memnew(HistoryDock);
+
// Scene: Top left.
dock_slot[DOCK_SLOT_LEFT_UR]->add_child(SceneTreeDock::get_singleton());
dock_slot[DOCK_SLOT_LEFT_UR]->set_tab_title(dock_slot[DOCK_SLOT_LEFT_UR]->get_tab_idx_from_control(SceneTreeDock::get_singleton()), TTR("Scene"));
@@ -7061,6 +7054,10 @@ EditorNode::EditorNode() {
dock_slot[DOCK_SLOT_RIGHT_UL]->add_child(NodeDock::get_singleton());
dock_slot[DOCK_SLOT_RIGHT_UL]->set_tab_title(dock_slot[DOCK_SLOT_RIGHT_UL]->get_tab_idx_from_control(NodeDock::get_singleton()), TTR("Node"));
+ // History: Full height right, behind Node.
+ dock_slot[DOCK_SLOT_RIGHT_UL]->add_child(history_dock);
+ dock_slot[DOCK_SLOT_RIGHT_UL]->set_tab_title(dock_slot[DOCK_SLOT_RIGHT_UL]->get_tab_idx_from_control(history_dock), TTR("History"));
+
// Hide unused dock slots and vsplits.
dock_slot[DOCK_SLOT_LEFT_UL]->hide();
dock_slot[DOCK_SLOT_LEFT_BL]->hide();
@@ -7071,8 +7068,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.
@@ -7081,14 +7078,14 @@ EditorNode::EditorNode() {
// Dock numbers are based on DockSlot enum value + 1.
default_layout->set_value(docks_section, "dock_3", "Scene,Import");
default_layout->set_value(docks_section, "dock_4", "FileSystem");
- default_layout->set_value(docks_section, "dock_5", "Inspector,Node");
+ default_layout->set_value(docks_section, "dock_5", "Inspector,Node,History");
for (int i = 0; i < vsplits.size(); i++) {
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();
@@ -7254,7 +7251,6 @@ EditorNode::EditorNode() {
add_child(audio_preview_gen);
add_editor_plugin(memnew(DebuggerEditorPlugin(debug_menu)));
- add_editor_plugin(memnew(DebugAdapterServer()));
disk_changed = memnew(ConfirmationDialog);
{
@@ -7280,6 +7276,7 @@ EditorNode::EditorNode() {
gui_base->add_child(disk_changed);
add_editor_plugin(memnew(AnimationPlayerEditorPlugin));
+ add_editor_plugin(memnew(AnimationTrackKeyEditEditorPlugin));
add_editor_plugin(memnew(CanvasItemEditorPlugin));
add_editor_plugin(memnew(Node3DEditorPlugin));
add_editor_plugin(memnew(ScriptEditorPlugin));
@@ -7304,63 +7301,7 @@ EditorNode::EditorNode() {
raise_bottom_panel_item(AnimationPlayerEditor::get_singleton());
add_editor_plugin(VersionControlEditorPlugin::get_singleton());
-
- // This list is alphabetized, and plugins that depend on Node2D are in their own section below.
- add_editor_plugin(memnew(AnimationTreeEditorPlugin));
add_editor_plugin(memnew(AudioBusesEditorPlugin(audio_bus_editor)));
- add_editor_plugin(memnew(AudioStreamRandomizerEditorPlugin));
- add_editor_plugin(memnew(BitMapEditorPlugin));
- add_editor_plugin(memnew(BoneMapEditorPlugin));
- add_editor_plugin(memnew(Camera3DEditorPlugin));
- add_editor_plugin(memnew(ControlEditorPlugin));
- add_editor_plugin(memnew(CPUParticles3DEditorPlugin));
- add_editor_plugin(memnew(CurveEditorPlugin));
- add_editor_plugin(memnew(FontEditorPlugin));
- add_editor_plugin(memnew(GPUParticles3DEditorPlugin));
- add_editor_plugin(memnew(GPUParticlesCollisionSDF3DEditorPlugin));
- add_editor_plugin(memnew(GradientEditorPlugin));
- add_editor_plugin(memnew(GradientTexture2DEditorPlugin));
- add_editor_plugin(memnew(InputEventEditorPlugin));
- add_editor_plugin(memnew(LightmapGIEditorPlugin));
- add_editor_plugin(memnew(MaterialEditorPlugin));
- add_editor_plugin(memnew(MeshEditorPlugin));
- add_editor_plugin(memnew(MeshInstance3DEditorPlugin));
- add_editor_plugin(memnew(MeshLibraryEditorPlugin));
- add_editor_plugin(memnew(MultiMeshEditorPlugin));
- add_editor_plugin(memnew(OccluderInstance3DEditorPlugin));
- add_editor_plugin(memnew(Path3DEditorPlugin));
- add_editor_plugin(memnew(PhysicalBone3DEditorPlugin));
- add_editor_plugin(memnew(Polygon3DEditorPlugin));
- add_editor_plugin(memnew(ResourcePreloaderEditorPlugin));
- add_editor_plugin(memnew(ShaderEditorPlugin));
- add_editor_plugin(memnew(ShaderFileEditorPlugin));
- add_editor_plugin(memnew(Skeleton3DEditorPlugin));
- add_editor_plugin(memnew(SkeletonIK3DEditorPlugin));
- add_editor_plugin(memnew(SpriteFramesEditorPlugin));
- add_editor_plugin(memnew(StyleBoxEditorPlugin));
- add_editor_plugin(memnew(SubViewportPreviewEditorPlugin));
- add_editor_plugin(memnew(Texture3DEditorPlugin));
- add_editor_plugin(memnew(TextureEditorPlugin));
- add_editor_plugin(memnew(TextureLayeredEditorPlugin));
- add_editor_plugin(memnew(TextureRegionEditorPlugin));
- add_editor_plugin(memnew(ThemeEditorPlugin));
- add_editor_plugin(memnew(VoxelGIEditorPlugin));
-
- // 2D
- add_editor_plugin(memnew(CollisionPolygon2DEditorPlugin));
- add_editor_plugin(memnew(CollisionShape2DEditorPlugin));
- add_editor_plugin(memnew(CPUParticles2DEditorPlugin));
- add_editor_plugin(memnew(GPUParticles2DEditorPlugin));
- add_editor_plugin(memnew(LightOccluder2DEditorPlugin));
- add_editor_plugin(memnew(Line2DEditorPlugin));
- add_editor_plugin(memnew(NavigationLink2DEditorPlugin));
- add_editor_plugin(memnew(NavigationPolygonEditorPlugin));
- add_editor_plugin(memnew(Path2DEditorPlugin));
- add_editor_plugin(memnew(Polygon2DEditorPlugin));
- add_editor_plugin(memnew(Cast2DEditorPlugin));
- add_editor_plugin(memnew(Skeleton2DEditorPlugin));
- add_editor_plugin(memnew(Sprite2DEditorPlugin));
- add_editor_plugin(memnew(TilesEditorPlugin));
for (int i = 0; i < EditorPlugins::get_plugin_count(); i++) {
add_editor_plugin(EditorPlugins::create(i));
@@ -7459,7 +7400,6 @@ EditorNode::EditorNode() {
_update_recent_scenes();
- editor_data.restore_editor_global_states();
set_process_shortcut_input(true);
load_errors = memnew(RichTextLabel);
@@ -7530,9 +7470,9 @@ EditorNode::EditorNode() {
screenshot_timer->set_owner(get_owner());
// Adjust spacers to center 2D / 3D / Script buttons.
- int max_w = MAX(launch_pad_hb->get_minimum_size().x + right_menu_hb->get_minimum_size().x, main_menu->get_minimum_size().x);
+ int max_w = MAX(launch_pad->get_minimum_size().x + right_menu_hb->get_minimum_size().x, main_menu->get_minimum_size().x);
left_spacer->set_custom_minimum_size(Size2(MAX(0, max_w - main_menu->get_minimum_size().x), 0));
- right_spacer->set_custom_minimum_size(Size2(MAX(0, max_w - launch_pad_hb->get_minimum_size().x - right_menu_hb->get_minimum_size().x), 0));
+ right_spacer->set_custom_minimum_size(Size2(MAX(0, max_w - launch_pad->get_minimum_size().x - right_menu_hb->get_minimum_size().x), 0));
// Extend menu bar to window title.
if (can_expand) {
@@ -7589,7 +7529,7 @@ bool EditorPluginList::forward_gui_input(const Ref<InputEvent> &p_event) {
return discard;
}
-EditorPlugin::AfterGUIInput EditorPluginList::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event, bool serve_when_force_input_enabled) {
+EditorPlugin::AfterGUIInput EditorPluginList::forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event, bool serve_when_force_input_enabled) {
EditorPlugin::AfterGUIInput after = EditorPlugin::AFTER_GUI_INPUT_PASS;
for (int i = 0; i < plugins_list.size(); i++) {
@@ -7597,7 +7537,7 @@ EditorPlugin::AfterGUIInput EditorPluginList::forward_spatial_gui_input(Camera3D
continue;
}
- EditorPlugin::AfterGUIInput current_after = plugins_list[i]->forward_spatial_gui_input(p_camera, p_event);
+ EditorPlugin::AfterGUIInput current_after = plugins_list[i]->forward_3d_gui_input(p_camera, p_event);
if (current_after == EditorPlugin::AFTER_GUI_INPUT_STOP) {
after = EditorPlugin::AFTER_GUI_INPUT_STOP;
}
@@ -7621,15 +7561,15 @@ void EditorPluginList::forward_canvas_force_draw_over_viewport(Control *p_overla
}
}
-void EditorPluginList::forward_spatial_draw_over_viewport(Control *p_overlay) {
+void EditorPluginList::forward_3d_draw_over_viewport(Control *p_overlay) {
for (int i = 0; i < plugins_list.size(); i++) {
- plugins_list[i]->forward_spatial_draw_over_viewport(p_overlay);
+ plugins_list[i]->forward_3d_draw_over_viewport(p_overlay);
}
}
-void EditorPluginList::forward_spatial_force_draw_over_viewport(Control *p_overlay) {
+void EditorPluginList::forward_3d_force_draw_over_viewport(Control *p_overlay) {
for (int i = 0; i < plugins_list.size(); i++) {
- plugins_list[i]->forward_spatial_force_draw_over_viewport(p_overlay);
+ plugins_list[i]->forward_3d_force_draw_over_viewport(p_overlay);
}
}
diff --git a/editor/editor_node.h b/editor/editor_node.h
index df3d2ae0f8..fb2544c141 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -1,43 +1,44 @@
-/*************************************************************************/
-/* editor_node.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_node.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 EDITOR_NODE_H
#define EDITOR_NODE_H
#include "core/templates/safe_refcount.h"
+#include "editor/editor_data.h"
#include "editor/editor_folding.h"
#include "editor/editor_native_shader_source_visualizer.h"
+#include "editor/editor_plugin.h"
#include "editor/editor_run.h"
#include "editor/editor_title_bar.h"
#include "editor/export/editor_export.h"
-#include "editor/inspector_dock.h"
typedef void (*EditorNodeInitCallback)();
typedef void (*EditorPluginInitializeCallback)();
@@ -46,8 +47,8 @@ typedef bool (*EditorBuildCallback)();
class AcceptDialog;
class AudioStreamPreviewGenerator;
class BackgroundProgress;
-class Button;
class CenterContainer;
+class CheckBox;
class ColorPicker;
class ConfirmationDialog;
class Control;
@@ -59,30 +60,34 @@ class EditorCommandPalette;
class EditorExport;
class EditorExtensionManager;
class EditorFeatureProfileManager;
+class EditorFileDialog;
class EditorFileServer;
class EditorFolding;
class EditorInspector;
class EditorLayoutsDialog;
class EditorLog;
-class EditorPlugin;
class EditorPluginList;
class EditorQuickOpen;
class EditorResourcePreview;
class EditorResourceConversionPlugin;
class EditorRun;
class EditorRunNative;
+class EditorSelectionHistory;
class EditorSettingsDialog;
class EditorToaster;
class EditorUndoRedoManager;
class ExportTemplateManager;
+class FBXImporterManager;
class FileDialog;
class FileSystemDock;
+class HistoryDock;
class HSplitContainer;
class ImportDock;
class LinkButton;
class MenuBar;
class MenuButton;
class NodeDock;
+class OptionButton;
class OrphanResourcesDialog;
class Panel;
class PanelContainer;
@@ -97,7 +102,9 @@ class ScriptCreateDialog;
class SubViewport;
class TabBar;
class TabContainer;
+class TextureRect;
class TextureProgressBar;
+class Tree;
class VSplitContainer;
class Window;
class EditorBuildProfileManager;
@@ -125,6 +132,12 @@ public:
EDITOR_ASSETLIB
};
+ enum SceneNameCasing {
+ SCENE_NAME_CASING_AUTO,
+ SCENE_NAME_CASING_PASCAL_CASE,
+ SCENE_NAME_CASING_SNAKE_CASE
+ };
+
struct ExecuteThreadArgs {
String path;
List<String> args;
@@ -197,6 +210,7 @@ private:
SETTINGS_EDITOR_DATA_FOLDER,
SETTINGS_EDITOR_CONFIG_FOLDER,
SETTINGS_MANAGE_EXPORT_TEMPLATES,
+ SETTINGS_MANAGE_FBX_IMPORTER,
SETTINGS_MANAGE_FEATURE_PROFILES,
SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE,
SETTINGS_PICK_MAIN_SCENE,
@@ -218,7 +232,7 @@ private:
HELP_ABOUT,
HELP_SUPPORT_GODOT_DEVELOPMENT,
- SET_RENDERING_DRIVER_SAVE_AND_RESTART,
+ SET_RENDERER_NAME_SAVE_AND_RESTART,
GLOBAL_NEW_WINDOW,
GLOBAL_SCENE,
@@ -233,12 +247,6 @@ private:
MAX_BUILD_CALLBACKS = 128
};
- enum ScriptNameCasing {
- SCENE_NAME_CASING_AUTO,
- SCENE_NAME_CASING_PASCAL_CASE,
- SCENE_NAME_CASING_SNAKE_CASE
- };
-
struct BottomPanelItem {
String name;
Control *control = nullptr;
@@ -274,24 +282,28 @@ private:
EditorRunNative *run_native = nullptr;
EditorSelection *editor_selection = nullptr;
EditorSettingsDialog *editor_settings_dialog = nullptr;
+ HistoryDock *history_dock = nullptr;
ProjectExportDialog *project_export = nullptr;
ProjectSettingsEditor *project_settings_editor = nullptr;
+ FBXImporterManager *fbx_importer_manager = nullptr;
+
Vector<EditorPlugin *> editor_plugins;
bool _initializing_plugins = false;
HashMap<String, EditorPlugin *> addon_name_to_plugin;
+ LocalVector<String> pending_addons;
PanelContainer *scene_root_parent = nullptr;
Control *theme_base = nullptr;
Control *gui_base = nullptr;
VBoxContainer *main_vbox = nullptr;
- OptionButton *rendering_driver = nullptr;
+ OptionButton *renderer = nullptr;
ConfirmationDialog *video_restart_dialog = nullptr;
- int rendering_driver_current = 0;
- String rendering_driver_request;
+ int renderer_current = 0;
+ String renderer_request;
// Split containers.
HSplitContainer *left_l_hsplit = nullptr;
@@ -322,6 +334,9 @@ private:
HBoxContainer *bottom_hb = nullptr;
Control *vp_base = nullptr;
+ Label *project_title = nullptr;
+ Control *left_menu_spacer = nullptr;
+ Control *right_menu_spacer = nullptr;
EditorTitleBar *menu_hb = nullptr;
VBoxContainer *main_screen_vbox = nullptr;
MenuBar *main_menu = nullptr;
@@ -397,7 +412,7 @@ private:
String current_path;
MenuButton *update_spinner = nullptr;
- HBoxContainer *main_editor_button_vb = nullptr;
+ HBoxContainer *main_editor_button_hb = nullptr;
Vector<Button *> main_editor_buttons;
Vector<EditorPlugin *> editor_table;
@@ -521,6 +536,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);
@@ -543,7 +559,6 @@ private:
void _update_file_menu_opened();
void _update_file_menu_closed();
- void _on_plugin_ready(Object *p_script, const String &p_activate_name);
void _remove_plugin_from_enabled(const String &p_name);
void _fs_changed();
@@ -553,7 +568,6 @@ private:
void _node_renamed();
void _editor_select_next();
void _editor_select_prev();
- void _editor_select(int p_which);
void _set_scene_metadata(const String &p_file, int p_idx = -1);
void _get_scene_metadata(const String &p_file);
void _update_title();
@@ -562,8 +576,11 @@ private:
void _close_messages();
void _show_messages();
void _vp_resized();
+ 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);
@@ -599,8 +616,8 @@ private:
void _update_from_settings();
- void _rendering_driver_selected(int);
- void _update_rendering_driver_color();
+ void _renderer_selected(int);
+ void _update_renderer_color();
void _exit_editor(int p_exit_code);
@@ -649,7 +666,7 @@ private:
void _load_docks();
void _save_docks_to_config(Ref<ConfigFile> p_layout, const String &p_section);
void _load_docks_from_config(Ref<ConfigFile> p_layout, const String &p_section);
- void _update_dock_slots_visibility();
+ void _update_dock_slots_visibility(bool p_keep_selected_tabs = false);
void _dock_tab_changed(int p_tab);
void _save_open_scenes_to_config(Ref<ConfigFile> p_layout, const String &p_section);
@@ -658,8 +675,6 @@ private:
void _update_layouts_menu();
void _layout_menu_option(int p_id);
- void _clear_undo_history();
-
void _update_addon_config();
void _toggle_distraction_free_mode();
@@ -703,23 +718,25 @@ protected:
void set_current_tab(int p_tab);
public:
- void set_visible_editor(EditorTable p_table) { _editor_select(p_table); }
+ // Public for use with callable_mp.
+ void _on_plugin_ready(Object *p_script, const String &p_activate_name);
- bool call_build();
+ void editor_select(int p_which);
+ void set_visible_editor(EditorTable p_table) { editor_select(p_table); }
- static void register_editor_types();
- static void unregister_editor_types();
+ bool call_build();
static EditorNode *get_singleton() { return singleton; }
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; }
+ static String adjust_scene_name_casing(const String &root_name);
+
static bool has_unsaved_changes() { return singleton->unsaved_cache; }
static void disambiguate_filenames(const Vector<String> p_full_paths, Vector<String> &r_filenames);
static void add_io_error(const String &p_error);
@@ -741,6 +758,8 @@ public:
static bool immediate_confirmation_dialog(const String &p_text, const String &p_ok_text = TTR("Ok"), const String &p_cancel_text = TTR("Cancel"));
+ static void cleanup();
+
EditorPlugin *get_editor_plugin_screen() { return editor_plugin_screen; }
EditorPluginList *get_editor_plugins_force_input_forwarding() { return editor_plugins_force_input_forwarding; }
EditorPluginList *get_editor_plugins_force_over() { return editor_plugins_force_over; }
@@ -764,8 +783,11 @@ public:
void set_addon_plugin_enabled(const String &p_addon, bool p_enabled, bool p_config_changed = false);
bool is_addon_plugin_enabled(const String &p_addon) const;
+ void set_movie_maker_enabled(bool p_enabled);
+ bool is_movie_maker_enabled() const;
+
void edit_node(Node *p_node);
- void edit_resource(const Ref<Resource> &p_resource) { InspectorDock::get_singleton()->edit_resource(p_resource); };
+ void edit_resource(const Ref<Resource> &p_resource);
void save_resource_in_path(const Ref<Resource> &p_resource, const String &p_path);
void save_resource(const Ref<Resource> &p_resource);
@@ -776,7 +798,6 @@ public:
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);
- bool item_has_editor(Object *p_object);
void hide_top_editors();
void select_editor_by_name(const String &p_name);
@@ -784,7 +805,7 @@ public:
void open_request(const String &p_path);
void edit_foreign_resource(Ref<Resource> p_resource);
- bool is_resource_read_only(Ref<Resource> p_resource);
+ bool is_resource_read_only(Ref<Resource> p_resource, bool p_foreign_resources_are_writable = false);
bool is_changing_scene() const;
@@ -805,7 +826,7 @@ public:
void setup_color_picker(ColorPicker *picker);
- void request_instance_scene(const String &p_path);
+ void request_instantiate_scene(const String &p_path);
void request_instantiate_scenes(const Vector<String> &p_files);
void set_convert_old_scene(bool p_old) { convert_old = p_old; }
@@ -821,6 +842,8 @@ public:
Ref<Texture2D> get_object_icon(const Object *p_object, const String &p_fallback = "Object");
Ref<Texture2D> get_class_icon(const String &p_class, const String &p_fallback = "Object") const;
+ bool is_object_of_custom_type(const Object *p_object, const StringName &p_class);
+
void show_accept(const String &p_text, const String &p_title);
void show_save_accept(const String &p_text, const String &p_title);
void show_warning(const String &p_text, const String &p_title = TTR("Warning!"));
@@ -892,7 +915,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);
@@ -929,9 +952,9 @@ public:
bool forward_gui_input(const Ref<InputEvent> &p_event);
void forward_canvas_draw_over_viewport(Control *p_overlay);
void forward_canvas_force_draw_over_viewport(Control *p_overlay);
- EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event, bool serve_when_force_input_enabled);
- void forward_spatial_draw_over_viewport(Control *p_overlay);
- void forward_spatial_force_draw_over_viewport(Control *p_overlay);
+ EditorPlugin::AfterGUIInput forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event, bool serve_when_force_input_enabled);
+ void forward_3d_draw_over_viewport(Control *p_overlay);
+ void forward_3d_force_draw_over_viewport(Control *p_overlay);
void add_plugin(EditorPlugin *p_plugin);
void remove_plugin(EditorPlugin *p_plugin);
void clear();
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index d1f41dad84..6ae25cc224 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_path.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_path.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 "editor_path.h"
@@ -59,7 +59,7 @@ void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) {
continue;
}
- Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(obj);
+ Ref<Texture2D> obj_icon = EditorNode::get_singleton()->get_object_icon(obj);
String proper_name = "";
Vector<String> name_parts = E.name.split("/");
@@ -72,7 +72,7 @@ void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) {
}
int index = sub_objects_menu->get_item_count();
- sub_objects_menu->add_icon_item(icon, proper_name, objects.size());
+ sub_objects_menu->add_icon_item(obj_icon, proper_name, objects.size());
sub_objects_menu->set_item_indent(index, p_depth);
objects.push_back(obj->get_instance_id());
@@ -122,15 +122,15 @@ void EditorPath::update_path() {
continue;
}
- Ref<Texture2D> icon;
+ Ref<Texture2D> obj_icon;
if (Object::cast_to<MultiNodeEdit>(obj)) {
- icon = EditorNode::get_singleton()->get_class_icon(Object::cast_to<MultiNodeEdit>(obj)->get_edited_class_name());
+ obj_icon = EditorNode::get_singleton()->get_class_icon(Object::cast_to<MultiNodeEdit>(obj)->get_edited_class_name());
} else {
- icon = EditorNode::get_singleton()->get_object_icon(obj);
+ obj_icon = EditorNode::get_singleton()->get_object_icon(obj);
}
- if (icon.is_valid()) {
- current_object_icon->set_texture(icon);
+ if (obj_icon.is_valid()) {
+ current_object_icon->set_texture(obj_icon);
}
if (i == history->get_path_size() - 1) {
diff --git a/editor/editor_path.h b/editor/editor_path.h
index afc7a20bad..747ff5a656 100644
--- a/editor/editor_path.h
+++ b/editor/editor_path.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_path.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_path.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 EDITOR_PATH_H
#define EDITOR_PATH_H
diff --git a/editor/editor_paths.cpp b/editor/editor_paths.cpp
index 54d4660cb6..36ebeb8c33 100644
--- a/editor/editor_paths.cpp
+++ b/editor/editor_paths.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_paths.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_paths.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 "editor_paths.h"
@@ -83,7 +83,7 @@ String EditorPaths::get_script_templates_dir() const {
}
String EditorPaths::get_project_script_templates_dir() const {
- return ProjectSettings::get_singleton()->get("editor/script/templates_search_path");
+ return GLOBAL_GET("editor/script/templates_search_path");
}
String EditorPaths::get_feature_profiles_dir() const {
diff --git a/editor/editor_paths.h b/editor/editor_paths.h
index 9cff1063c5..547b93ad7e 100644
--- a/editor/editor_paths.h
+++ b/editor/editor_paths.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_paths.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_paths.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 EDITOR_PATHS_H
#define EDITOR_PATHS_H
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 981dad2d2a..7f02148dfc 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -1,44 +1,51 @@
-/*************************************************************************/
-/* editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_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 "editor_plugin.h"
+#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_command_palette.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "editor/editor_resource_preview.h"
#include "editor/editor_settings.h"
+#include "editor/editor_translation_parser.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/export/editor_export.h"
#include "editor/filesystem_dock.h"
+#include "editor/import/editor_import_plugin.h"
+#include "editor/import/resource_importer_scene.h"
+#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"
@@ -238,14 +245,18 @@ void EditorInterface::select_file(const String &p_file) {
FileSystemDock::get_singleton()->select_file(p_file);
}
-String EditorInterface::get_selected_path() const {
- return FileSystemDock::get_singleton()->get_selected_path();
+Vector<String> EditorInterface::get_selected_paths() const {
+ return FileSystemDock::get_singleton()->get_selected_paths();
}
String EditorInterface::get_current_path() const {
return FileSystemDock::get_singleton()->get_current_path();
}
+String EditorInterface::get_current_directory() const {
+ return FileSystemDock::get_singleton()->get_current_directory();
+}
+
void EditorInterface::inspect_object(Object *p_obj, const String &p_for_property, bool p_inspector_only) {
EditorNode::get_singleton()->push_item(p_obj, p_for_property, p_inspector_only);
}
@@ -289,6 +300,14 @@ bool EditorInterface::is_plugin_enabled(const String &p_plugin) const {
return EditorNode::get_singleton()->is_addon_plugin_enabled(p_plugin);
}
+void EditorInterface::set_movie_maker_enabled(bool p_enabled) {
+ EditorNode::get_singleton()->set_movie_maker_enabled(p_enabled);
+}
+
+bool EditorInterface::is_movie_maker_enabled() const {
+ return EditorNode::get_singleton()->is_movie_maker_enabled();
+}
+
EditorInspector *EditorInterface::get_inspector() const {
return InspectorDock::get_inspector_singleton();
}
@@ -355,8 +374,9 @@ void EditorInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_editor_main_screen"), &EditorInterface::get_editor_main_screen);
ClassDB::bind_method(D_METHOD("make_mesh_previews", "meshes", "preview_size"), &EditorInterface::_make_mesh_previews);
ClassDB::bind_method(D_METHOD("select_file", "file"), &EditorInterface::select_file);
- ClassDB::bind_method(D_METHOD("get_selected_path"), &EditorInterface::get_selected_path);
+ ClassDB::bind_method(D_METHOD("get_selected_paths"), &EditorInterface::get_selected_paths);
ClassDB::bind_method(D_METHOD("get_current_path"), &EditorInterface::get_current_path);
+ ClassDB::bind_method(D_METHOD("get_current_directory"), &EditorInterface::get_current_directory);
ClassDB::bind_method(D_METHOD("get_file_system_dock"), &EditorInterface::get_file_system_dock);
ClassDB::bind_method(D_METHOD("get_editor_paths"), &EditorInterface::get_editor_paths);
ClassDB::bind_method(D_METHOD("get_command_palette"), &EditorInterface::get_command_palette);
@@ -364,6 +384,9 @@ void EditorInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_plugin_enabled", "plugin", "enabled"), &EditorInterface::set_plugin_enabled);
ClassDB::bind_method(D_METHOD("is_plugin_enabled", "plugin"), &EditorInterface::is_plugin_enabled);
+ ClassDB::bind_method(D_METHOD("set_movie_maker_enabled", "enabled"), &EditorInterface::set_movie_maker_enabled);
+ ClassDB::bind_method(D_METHOD("is_movie_maker_enabled"), &EditorInterface::is_movie_maker_enabled);
+
ClassDB::bind_method(D_METHOD("get_inspector"), &EditorInterface::get_inspector);
ClassDB::bind_method(D_METHOD("save_scene"), &EditorInterface::save_scene);
@@ -570,11 +593,9 @@ void EditorPlugin::notify_resource_saved(const Ref<Resource> &p_resource) {
}
bool EditorPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
- bool success;
- if (GDVIRTUAL_CALL(_forward_canvas_gui_input, p_event, success)) {
- return success;
- }
- return false;
+ bool success = false;
+ GDVIRTUAL_CALL(_forward_canvas_gui_input, p_event, success);
+ return success;
}
void EditorPlugin::forward_canvas_draw_over_viewport(Control *p_overlay) {
@@ -604,49 +625,36 @@ int EditorPlugin::update_overlays() const {
}
}
-EditorPlugin::AfterGUIInput EditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
- int success;
-
- if (GDVIRTUAL_CALL(_forward_3d_gui_input, p_camera, p_event, success)) {
- return static_cast<EditorPlugin::AfterGUIInput>(success);
- }
-
- return EditorPlugin::AFTER_GUI_INPUT_PASS;
+EditorPlugin::AfterGUIInput EditorPlugin::forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
+ int success = EditorPlugin::AFTER_GUI_INPUT_PASS;
+ GDVIRTUAL_CALL(_forward_3d_gui_input, p_camera, p_event, success);
+ return static_cast<EditorPlugin::AfterGUIInput>(success);
}
-void EditorPlugin::forward_spatial_draw_over_viewport(Control *p_overlay) {
+void EditorPlugin::forward_3d_draw_over_viewport(Control *p_overlay) {
GDVIRTUAL_CALL(_forward_3d_draw_over_viewport, p_overlay);
}
-void EditorPlugin::forward_spatial_force_draw_over_viewport(Control *p_overlay) {
+void EditorPlugin::forward_3d_force_draw_over_viewport(Control *p_overlay) {
GDVIRTUAL_CALL(_forward_3d_force_draw_over_viewport, p_overlay);
}
String EditorPlugin::get_name() const {
String name;
- if (GDVIRTUAL_CALL(_get_plugin_name, name)) {
- return name;
- }
-
- return String();
+ GDVIRTUAL_CALL(_get_plugin_name, name);
+ return name;
}
const Ref<Texture2D> EditorPlugin::get_icon() const {
Ref<Texture2D> icon;
- if (GDVIRTUAL_CALL(_get_plugin_icon, icon)) {
- return icon;
- }
-
- return Ref<Texture2D>();
+ GDVIRTUAL_CALL(_get_plugin_icon, icon);
+ return icon;
}
bool EditorPlugin::has_main_screen() const {
- bool success;
- if (GDVIRTUAL_CALL(_has_main_screen, success)) {
- return success;
- }
-
- return false;
+ bool success = false;
+ GDVIRTUAL_CALL(_has_main_screen, success);
+ return success;
}
void EditorPlugin::make_visible(bool p_visible) {
@@ -662,21 +670,15 @@ void EditorPlugin::edit(Object *p_object) {
}
bool EditorPlugin::handles(Object *p_object) const {
- bool success;
- if (GDVIRTUAL_CALL(_handles, p_object, success)) {
- return success;
- }
-
- return false;
+ bool success = false;
+ GDVIRTUAL_CALL(_handles, p_object, success);
+ return success;
}
Dictionary EditorPlugin::get_state() const {
Dictionary state;
- if (GDVIRTUAL_CALL(_get_state, state)) {
- return state;
- }
-
- return Dictionary();
+ GDVIRTUAL_CALL(_get_state, state);
+ return state;
}
void EditorPlugin::set_state(const Dictionary &p_state) {
@@ -710,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);
}
@@ -753,12 +752,12 @@ void EditorPlugin::remove_export_plugin(const Ref<EditorExportPlugin> &p_exporte
EditorExport::get_singleton()->remove_export_plugin(p_exporter);
}
-void EditorPlugin::add_spatial_gizmo_plugin(const Ref<EditorNode3DGizmoPlugin> &p_gizmo_plugin) {
+void EditorPlugin::add_node_3d_gizmo_plugin(const Ref<EditorNode3DGizmoPlugin> &p_gizmo_plugin) {
ERR_FAIL_COND(!p_gizmo_plugin.is_valid());
Node3DEditor::get_singleton()->add_gizmo_plugin(p_gizmo_plugin);
}
-void EditorPlugin::remove_spatial_gizmo_plugin(const Ref<EditorNode3DGizmoPlugin> &p_gizmo_plugin) {
+void EditorPlugin::remove_node_3d_gizmo_plugin(const Ref<EditorNode3DGizmoPlugin> &p_gizmo_plugin) {
ERR_FAIL_COND(!p_gizmo_plugin.is_valid());
Node3DEditor::get_singleton()->remove_gizmo_plugin(p_gizmo_plugin);
}
@@ -822,11 +821,9 @@ void EditorPlugin::get_window_layout(Ref<ConfigFile> p_layout) {
}
bool EditorPlugin::build() {
- bool success;
- if (GDVIRTUAL_CALL(_build, success)) {
- return success;
- }
- return true;
+ bool success = true;
+ GDVIRTUAL_CALL(_build, success);
+ return success;
}
void EditorPlugin::queue_save_layout() {
@@ -849,12 +846,20 @@ ScriptCreateDialog *EditorPlugin::get_script_create_dialog() {
return SceneTreeDock::get_singleton()->get_script_create_dialog();
}
-void EditorPlugin::add_debugger_plugin(const Ref<Script> &p_script) {
- EditorDebuggerNode::get_singleton()->add_debugger_plugin(p_script);
+void EditorPlugin::add_debugger_plugin(const Ref<EditorDebuggerPlugin> &p_plugin) {
+ EditorDebuggerNode::get_singleton()->add_debugger_plugin(p_plugin);
+}
+
+void EditorPlugin::remove_debugger_plugin(const Ref<EditorDebuggerPlugin> &p_plugin) {
+ 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_debugger_plugin(const Ref<Script> &p_script) {
- EditorDebuggerNode::get_singleton()->remove_debugger_plugin(p_script);
+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() {
@@ -908,10 +913,12 @@ void EditorPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("remove_scene_post_import_plugin", "scene_import_plugin"), &EditorPlugin::remove_scene_post_import_plugin);
ClassDB::bind_method(D_METHOD("add_export_plugin", "plugin"), &EditorPlugin::add_export_plugin);
ClassDB::bind_method(D_METHOD("remove_export_plugin", "plugin"), &EditorPlugin::remove_export_plugin);
- ClassDB::bind_method(D_METHOD("add_spatial_gizmo_plugin", "plugin"), &EditorPlugin::add_spatial_gizmo_plugin);
- ClassDB::bind_method(D_METHOD("remove_spatial_gizmo_plugin", "plugin"), &EditorPlugin::remove_spatial_gizmo_plugin);
+ ClassDB::bind_method(D_METHOD("add_node_3d_gizmo_plugin", "plugin"), &EditorPlugin::add_node_3d_gizmo_plugin);
+ 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);
@@ -978,8 +985,8 @@ void EditorPlugin::_bind_methods() {
BIND_ENUM_CONSTANT(AFTER_GUI_INPUT_CUSTOM);
}
-Ref<EditorUndoRedoManager> EditorPlugin::get_undo_redo() {
- return 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 a048b174e4..a5a17acdf1 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -1,64 +1,66 @@
-/*************************************************************************/
-/* editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_plugin.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 EDITOR_PLUGIN_H
#define EDITOR_PLUGIN_H
#include "core/io/config_file.h"
-#include "core/object/undo_redo.h"
-#include "editor/debugger/editor_debugger_node.h"
-#include "editor/editor_inspector.h"
-#include "editor/editor_translation_parser.h"
-#include "editor/import/editor_import_plugin.h"
-#include "editor/import/resource_importer_scene.h"
-#include "editor/script_create_dialog.h"
#include "scene/3d/camera_3d.h"
-#include "scene/main/node.h"
-#include "scene/resources/texture.h"
+#include "scene/gui/control.h"
class Node3D;
-class Camera3D;
+class Button;
+class PopupMenu;
class EditorCommandPalette;
-class EditorSelection;
+class EditorDebuggerPlugin;
class EditorExport;
-class EditorSettings;
-class EditorImportPlugin;
class EditorExportPlugin;
+class EditorFileSystem;
+class EditorImportPlugin;
+class EditorInspector;
+class EditorInspectorPlugin;
class EditorNode3DGizmoPlugin;
+class EditorPaths;
+class EditorResourceConversionPlugin;
class EditorResourcePreview;
-class EditorUndoRedoManager;
-class EditorFileSystem;
+class EditorSceneFormatImporter;
+class EditorScenePostImportPlugin;
+class EditorSelection;
+class EditorSettings;
class EditorToolAddons;
-class EditorPaths;
+class EditorTranslationParserPlugin;
+class EditorUndoRedoManager;
class FileSystemDock;
+class ScriptCreateDialog;
class ScriptEditor;
+class VBoxContainer;
class EditorInterface : public Node {
GDCLASS(EditorInterface, Node);
@@ -93,8 +95,9 @@ public:
EditorCommandPalette *get_command_palette() const;
void select_file(const String &p_file);
- String get_selected_path() const;
+ Vector<String> get_selected_paths() const;
String get_current_path() const;
+ String get_current_directory() const;
void inspect_object(Object *p_obj, const String &p_for_property = String(), bool p_inspector_only = false);
@@ -113,6 +116,9 @@ public:
void set_plugin_enabled(const String &p_plugin, bool p_enabled);
bool is_plugin_enabled(const String &p_plugin) const;
+ void set_movie_maker_enabled(bool p_enabled);
+ bool is_movie_maker_enabled() const;
+
EditorInspector *get_inspector() const;
Error save_scene();
@@ -131,7 +137,6 @@ public:
class EditorPlugin : public Node {
GDCLASS(EditorPlugin, Node);
friend class EditorData;
- Ref<EditorUndoRedoManager> undo_redo;
bool input_event_forwarding_always_enabled = false;
bool force_draw_over_forwarding_enabled = false;
@@ -144,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);
@@ -237,9 +242,9 @@ public:
virtual void forward_canvas_draw_over_viewport(Control *p_overlay);
virtual void forward_canvas_force_draw_over_viewport(Control *p_overlay);
- virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event);
- virtual void forward_spatial_draw_over_viewport(Control *p_overlay);
- virtual void forward_spatial_force_draw_over_viewport(Control *p_overlay);
+ virtual EditorPlugin::AfterGUIInput forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event);
+ virtual void forward_3d_draw_over_viewport(Control *p_overlay);
+ virtual void forward_3d_force_draw_over_viewport(Control *p_overlay);
virtual String get_name() const;
virtual const Ref<Texture2D> get_icon() const;
@@ -273,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);
@@ -285,8 +287,8 @@ public:
void add_export_plugin(const Ref<EditorExportPlugin> &p_exporter);
void remove_export_plugin(const Ref<EditorExportPlugin> &p_exporter);
- void add_spatial_gizmo_plugin(const Ref<EditorNode3DGizmoPlugin> &p_gizmo_plugin);
- void remove_spatial_gizmo_plugin(const Ref<EditorNode3DGizmoPlugin> &p_gizmo_plugin);
+ void add_node_3d_gizmo_plugin(const Ref<EditorNode3DGizmoPlugin> &p_gizmo_plugin);
+ void remove_node_3d_gizmo_plugin(const Ref<EditorNode3DGizmoPlugin> &p_gizmo_plugin);
void add_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin);
void remove_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin);
@@ -300,8 +302,11 @@ public:
void add_autoload_singleton(const String &p_name, const String &p_path);
void remove_autoload_singleton(const String &p_name);
- void add_debugger_plugin(const Ref<Script> &p_script);
- void remove_debugger_plugin(const Ref<Script> &p_script);
+ 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();
@@ -318,7 +323,7 @@ typedef EditorPlugin *(*EditorPluginCreateFunc)();
class EditorPlugins {
enum {
- MAX_CREATE_FUNCS = 64
+ MAX_CREATE_FUNCS = 128
};
static EditorPluginCreateFunc creation_funcs[MAX_CREATE_FUNCS];
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index a8df486381..9bcb25e9c0 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_plugin_settings.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_plugin_settings.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 "editor_plugin_settings.h"
@@ -46,7 +46,7 @@ void EditorPluginSettings::_notification(int p_what) {
} break;
case Node::NOTIFICATION_READY: {
- plugin_config_dialog->connect("plugin_ready", Callable(EditorNode::get_singleton(), "_on_plugin_ready"));
+ plugin_config_dialog->connect("plugin_ready", callable_mp(EditorNode::get_singleton(), &EditorNode::_on_plugin_ready));
plugin_list->connect("button_clicked", callable_mp(this, &EditorPluginSettings::_cell_button_pressed));
} break;
}
@@ -98,14 +98,14 @@ void EditorPluginSettings::update_plugins() {
String author = cf->get_value("plugin", "author");
String version = cf->get_value("plugin", "version");
String description = cf->get_value("plugin", "description");
- String script = cf->get_value("plugin", "script");
+ String scr = cf->get_value("plugin", "script");
TreeItem *item = plugin_list->create_item(root);
item->set_text(0, name);
- item->set_tooltip_text(0, TTR("Name:") + " " + name + "\n" + TTR("Path:") + " " + path + "\n" + TTR("Main Script:") + " " + script + "\n" + TTR("Description:") + " " + description);
+ item->set_tooltip_text(0, TTR("Name:") + " " + name + "\n" + TTR("Path:") + " " + path + "\n" + TTR("Main Script:") + " " + scr + "\n" + TTR("Description:") + " " + description);
item->set_metadata(0, path);
item->set_text(1, version);
- item->set_metadata(1, script);
+ item->set_metadata(1, scr);
item->set_text(2, author);
item->set_metadata(2, description);
item->set_cell_mode(3, TreeItem::CELL_MODE_CHECK);
diff --git a/editor/editor_plugin_settings.h b/editor/editor_plugin_settings.h
index 9c619066f2..96ddad2a43 100644
--- a/editor/editor_plugin_settings.h
+++ b/editor/editor_plugin_settings.h
@@ -1,37 +1,36 @@
-/*************************************************************************/
-/* editor_plugin_settings.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_plugin_settings.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 EDITOR_PLUGIN_SETTINGS_H
#define EDITOR_PLUGIN_SETTINGS_H
-#include "core/object/undo_redo.h"
#include "editor/editor_data.h"
#include "editor/plugin_config_dialog.h"
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 7364258a07..46f52ec4af 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -1,45 +1,53 @@
-/*************************************************************************/
-/* editor_properties.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_properties.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 "editor_properties.h"
#include "core/config/project_settings.h"
+#include "core/core_string_names.h"
+#include "editor/create_dialog.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_properties_array_dict.h"
-#include "editor/editor_resource_preview.h"
+#include "editor/editor_resource_picker.h"
#include "editor/editor_scale.h"
-#include "editor/filesystem_dock.h"
+#include "editor/editor_settings.h"
+#include "editor/inspector_dock.h"
+#include "editor/plugins/script_editor_plugin.h"
+#include "editor/project_settings_editor.h"
+#include "editor/property_selector.h"
+#include "editor/scene_tree_editor.h"
#include "scene/2d/gpu_particles_2d.h"
#include "scene/3d/fog_volume.h"
#include "scene/3d/gpu_particles_3d.h"
+#include "scene/gui/color_picker.h"
#include "scene/main/window.h"
#include "scene/resources/font.h"
#include "scene/resources/mesh.h"
@@ -51,16 +59,16 @@ void EditorPropertyNil::update_property() {
}
EditorPropertyNil::EditorPropertyNil() {
- Label *label = memnew(Label);
- label->set_text("<null>");
- add_child(label);
+ Label *prop_label = memnew(Label);
+ prop_label->set_text("<null>");
+ add_child(prop_label);
}
///////////////////// TEXT /////////////////////////
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) {
@@ -89,7 +97,9 @@ void EditorPropertyText::update_property() {
String s = get_edited_object()->get(get_edited_property());
updating = true;
if (text->get_text() != s) {
+ int caret = text->get_caret_column();
text->set_text(s);
+ text->set_caret_column(caret);
}
text->set_editable(!is_read_only());
updating = false;
@@ -123,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());
@@ -226,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) {
@@ -332,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);
@@ -440,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);
@@ -551,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));
@@ -578,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;
@@ -619,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());
@@ -751,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);
@@ -759,8 +671,13 @@ void EditorPropertyEnum::_option_selected(int p_which) {
}
void EditorPropertyEnum::update_property() {
- int64_t which = get_edited_object()->get(get_edited_property());
+ Variant current = get_edited_object()->get(get_edited_property());
+ if (current.get_type() == Variant::NIL) {
+ options->select(-1);
+ return;
+ }
+ int64_t which = current;
for (int i = 0; i < options->get_item_count(); i++) {
if (which == (int64_t)options->get_item_metadata(i)) {
options->select(i);
@@ -805,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());
@@ -1037,7 +954,6 @@ void EditorPropertyLayersGrid::_notification(int p_what) {
const int vofs = (grid_size.height - h) / 2;
int layer_index = 0;
- int block_index = 0;
Point2 arrow_pos;
@@ -1104,8 +1020,6 @@ void EditorPropertyLayersGrid::_notification(int p_what) {
break;
}
}
-
- ++block_index;
}
if ((expansion_rows != prev_expansion_rows) && expanded) {
@@ -1164,9 +1078,9 @@ void EditorPropertyLayers::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- button->set_normal_texture(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
- button->set_pressed_texture(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
- button->set_disabled_texture(get_theme_icon(SNAME("GuiTabMenu"), SNAME("EditorIcons")));
+ button->set_texture_normal(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
+ button->set_texture_pressed(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
+ button->set_texture_disabled(get_theme_icon(SNAME("GuiTabMenu"), SNAME("EditorIcons")));
} break;
}
}
@@ -1174,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);
@@ -1234,7 +1148,7 @@ void EditorPropertyLayers::setup(LayerType p_layer_type) {
String name;
if (ProjectSettings::get_singleton()->has_setting(basename + vformat("/layer_%d", i + 1))) {
- name = ProjectSettings::get_singleton()->get(basename + vformat("/layer_%d", i + 1));
+ name = GLOBAL_GET(basename + vformat("/layer_%d", i + 1));
}
if (name.is_empty()) {
@@ -1252,26 +1166,41 @@ void EditorPropertyLayers::setup(LayerType p_layer_type) {
}
void EditorPropertyLayers::set_layer_name(int p_index, const String &p_name) {
- if (ProjectSettings::get_singleton()->has_setting(basename + vformat("/layer_%d", p_index + 1))) {
- ProjectSettings::get_singleton()->set(basename + vformat("/layer_%d", p_index + 1), p_name);
+ const String property_name = basename + vformat("/layer_%d", p_index + 1);
+ if (ProjectSettings::get_singleton()->has_setting(property_name)) {
+ ProjectSettings::get_singleton()->set(property_name, p_name);
ProjectSettings::get_singleton()->save();
}
}
+String EditorPropertyLayers::get_layer_name(int p_index) const {
+ const String property_name = basename + vformat("/layer_%d", p_index + 1);
+ if (ProjectSettings::get_singleton()->has_setting(property_name)) {
+ return GLOBAL_GET(property_name);
+ }
+ return String();
+}
+
void EditorPropertyLayers::_button_pressed() {
int layer_count = grid->layer_count;
- int layer_group_size = grid->layer_group_size;
-
layers->clear();
for (int i = 0; i < layer_count; i++) {
- if ((i != 0) && ((i % layer_group_size) == 0)) {
- layers->add_separator();
+ const String name = get_layer_name(i);
+ if (name.is_empty()) {
+ continue;
}
- layers->add_check_item(grid->names[i], i);
+ layers->add_check_item(name, i);
int idx = layers->get_item_index(i);
layers->set_item_checked(idx, grid->value & (1 << i));
}
+ if (layers->get_item_count() == 0) {
+ layers->add_item(TTR("No Named Layers"));
+ layers->set_item_disabled(0, true);
+ }
+ layers->add_separator();
+ layers->add_icon_item(get_theme_icon("Edit", "EditorIcons"), TTR("Edit Layer Names"), grid->layer_count);
+
Rect2 gp = button->get_screen_rect();
layers->reset_size();
Vector2 popup_pos = gp.position - Vector2(layers->get_contents_minimum_size().x, 0);
@@ -1280,14 +1209,19 @@ void EditorPropertyLayers::_button_pressed() {
}
void EditorPropertyLayers::_menu_pressed(int p_menu) {
- if (grid->value & (1 << p_menu)) {
- grid->value &= ~(1 << p_menu);
+ if (p_menu == grid->layer_count) {
+ ProjectSettingsEditor::get_singleton()->popup_project_settings();
+ ProjectSettingsEditor::get_singleton()->set_general_page(basename);
} else {
- grid->value |= (1 << p_menu);
+ if (grid->value & (1 << p_menu)) {
+ grid->value &= ~(1 << p_menu);
+ } else {
+ grid->value |= (1 << p_menu);
+ }
+ grid->queue_redraw();
+ layers->set_item_checked(layers->get_item_index(p_menu), grid->value & (1 << p_menu));
+ _grid_changed(grid->value);
}
- grid->queue_redraw();
- layers->set_item_checked(layers->get_item_index(p_menu), grid->value & (1 << p_menu));
- _grid_changed(grid->value);
}
void EditorPropertyLayers::_refresh_names() {
@@ -1327,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) {
@@ -1352,10 +1286,11 @@ void EditorPropertyInteger::update_property() {
void EditorPropertyInteger::_bind_methods() {
}
-void EditorPropertyInteger::setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix) {
+void EditorPropertyInteger::setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_hide_slider, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix) {
spin->set_min(p_min);
spin->set_max(p_max);
spin->set_step(p_step);
+ spin->set_hide_slider(p_hide_slider);
spin->set_allow_greater(p_allow_greater);
spin->set_allow_lesser(p_allow_lesser);
spin->set_suffix(p_suffix);
@@ -1373,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()));
@@ -1463,7 +1398,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) {
@@ -1489,12 +1424,12 @@ void EditorPropertyFloat::update_property() {
void EditorPropertyFloat::_bind_methods() {
}
-void EditorPropertyFloat::setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix, bool p_angle_in_radians) {
+void EditorPropertyFloat::setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix, bool p_angle_in_radians) {
angle_in_radians = p_angle_in_radians;
spin->set_min(p_min);
spin->set_max(p_max);
spin->set_step(p_step);
- spin->set_hide_slider(p_no_slider);
+ spin->set_hide_slider(p_hide_slider);
spin->set_exp_ratio(p_exp_range);
spin->set_allow_greater(p_greater);
spin->set_allow_lesser(p_lesser);
@@ -1513,7 +1448,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()) {
@@ -1544,7 +1479,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;
@@ -1736,7 +1671,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) {
@@ -1758,7 +1693,7 @@ void EditorPropertyVector2::_value_changed(double val, const String &p_name) {
Vector2 v2;
v2.x = spin[0]->get_value();
v2.y = spin[1]->get_value();
- emit_changed(get_edited_property(), v2, p_name);
+ emit_changed(get_edited_property(), v2, linked->is_pressed() ? "" : p_name);
}
void EditorPropertyVector2::update_property() {
@@ -1786,8 +1721,8 @@ void EditorPropertyVector2::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- linked->set_normal_texture(get_theme_icon(SNAME("Unlinked"), SNAME("EditorIcons")));
- linked->set_pressed_texture(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
+ linked->set_texture_normal(get_theme_icon(SNAME("Unlinked"), SNAME("EditorIcons")));
+ linked->set_texture_pressed(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
const Color *colors = _get_property_colors();
for (int i = 0; i < 2; i++) {
@@ -1797,12 +1732,12 @@ void EditorPropertyVector2::_notification(int p_what) {
}
}
-void EditorPropertyVector2::setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_link, const String &p_suffix) {
+void EditorPropertyVector2::setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link, const String &p_suffix) {
for (int i = 0; i < 2; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -1867,7 +1802,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) {
@@ -1907,12 +1842,12 @@ void EditorPropertyRect2::_notification(int p_what) {
void EditorPropertyRect2::_bind_methods() {
}
-void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -1970,7 +1905,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) {
@@ -2005,7 +1940,7 @@ void EditorPropertyVector3::_value_changed(double val, const String &p_name) {
v3.y = Math::deg_to_rad(v3.y);
v3.z = Math::deg_to_rad(v3.z);
}
- emit_changed(get_edited_property(), v3, p_name);
+ emit_changed(get_edited_property(), v3, linked->is_pressed() ? "" : p_name);
}
void EditorPropertyVector3::update_property() {
@@ -2064,8 +1999,8 @@ void EditorPropertyVector3::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- linked->set_normal_texture(get_theme_icon(SNAME("Unlinked"), SNAME("EditorIcons")));
- linked->set_pressed_texture(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
+ linked->set_texture_normal(get_theme_icon(SNAME("Unlinked"), SNAME("EditorIcons")));
+ linked->set_texture_pressed(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
const Color *colors = _get_property_colors();
for (int i = 0; i < 3; i++) {
@@ -2078,13 +2013,13 @@ void EditorPropertyVector3::_notification(int p_what) {
void EditorPropertyVector3::_bind_methods() {
}
-void EditorPropertyVector3::setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_link, const String &p_suffix, bool p_angle_in_radians) {
+void EditorPropertyVector3::setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link, const String &p_suffix, bool p_angle_in_radians) {
angle_in_radians = p_angle_in_radians;
for (int i = 0; i < 3; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -2149,7 +2084,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) {
@@ -2171,7 +2106,7 @@ void EditorPropertyVector2i::_value_changed(double val, const String &p_name) {
Vector2i v2;
v2.x = spin[0]->get_value();
v2.y = spin[1]->get_value();
- emit_changed(get_edited_property(), v2, p_name);
+ emit_changed(get_edited_property(), v2, linked->is_pressed() ? "" : p_name);
}
void EditorPropertyVector2i::update_property() {
@@ -2199,8 +2134,8 @@ void EditorPropertyVector2i::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- linked->set_normal_texture(get_theme_icon(SNAME("Unlinked"), SNAME("EditorIcons")));
- linked->set_pressed_texture(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
+ linked->set_texture_normal(get_theme_icon(SNAME("Unlinked"), SNAME("EditorIcons")));
+ linked->set_texture_pressed(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
const Color *colors = _get_property_colors();
for (int i = 0; i < 2; i++) {
@@ -2210,12 +2145,11 @@ void EditorPropertyVector2i::_notification(int p_what) {
}
}
-void EditorPropertyVector2i::setup(int p_min, int p_max, bool p_no_slider, bool p_link, const String &p_suffix) {
+void EditorPropertyVector2i::setup(int p_min, int p_max, bool p_link, const String &p_suffix) {
for (int i = 0; i < 2; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(1);
- spin[i]->set_hide_slider(p_no_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -2280,7 +2214,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) {
@@ -2320,12 +2254,11 @@ void EditorPropertyRect2i::_notification(int p_what) {
void EditorPropertyRect2i::_bind_methods() {
}
-void EditorPropertyRect2i::setup(int p_min, int p_max, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyRect2i::setup(int p_min, int p_max, const String &p_suffix) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(1);
- spin[i]->set_hide_slider(p_no_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -2383,7 +2316,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) {
@@ -2413,7 +2346,7 @@ void EditorPropertyVector3i::_value_changed(double val, const String &p_name) {
v3.x = spin[0]->get_value();
v3.y = spin[1]->get_value();
v3.z = spin[2]->get_value();
- emit_changed(get_edited_property(), v3, p_name);
+ emit_changed(get_edited_property(), v3, linked->is_pressed() ? "" : p_name);
}
void EditorPropertyVector3i::update_property() {
@@ -2450,8 +2383,8 @@ void EditorPropertyVector3i::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- linked->set_normal_texture(get_theme_icon(SNAME("Unlinked"), SNAME("EditorIcons")));
- linked->set_pressed_texture(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
+ linked->set_texture_normal(get_theme_icon(SNAME("Unlinked"), SNAME("EditorIcons")));
+ linked->set_texture_pressed(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
const Color *colors = _get_property_colors();
for (int i = 0; i < 3; i++) {
@@ -2464,12 +2397,12 @@ void EditorPropertyVector3i::_notification(int p_what) {
void EditorPropertyVector3i::_bind_methods() {
}
-void EditorPropertyVector3i::setup(int p_min, int p_max, bool p_no_slider, bool p_link, const String &p_suffix) {
+void EditorPropertyVector3i::setup(int p_min, int p_max, bool p_link, const String &p_suffix) {
for (int i = 0; i < 3; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(1);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(false);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -2533,7 +2466,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) {
@@ -2573,12 +2506,12 @@ void EditorPropertyPlane::_notification(int p_what) {
void EditorPropertyPlane::_bind_methods() {
}
-void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
}
@@ -2629,7 +2562,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()) {
@@ -2660,7 +2593,7 @@ void EditorPropertyQuaternion::_custom_value_changed(double val) {
v.y = Math::deg_to_rad(edit_euler.y);
v.z = Math::deg_to_rad(edit_euler.z);
- Quaternion temp_q = Quaternion(v);
+ Quaternion temp_q = Quaternion::from_euler(v);
spin[0]->set_value(temp_q.x);
spin[1]->set_value(temp_q.y);
spin[2]->set_value(temp_q.z);
@@ -2697,7 +2630,7 @@ void EditorPropertyQuaternion::update_property() {
spin[2]->set_value(val.z);
spin[3]->set_value(val.w);
if (!is_grabbing_euler()) {
- Vector3 v = val.normalized().get_euler_yxz();
+ Vector3 v = val.normalized().get_euler();
edit_euler.x = Math::rad_to_deg(v.x);
edit_euler.y = Math::rad_to_deg(v.y);
edit_euler.z = Math::rad_to_deg(v.z);
@@ -2734,12 +2667,12 @@ void EditorPropertyQuaternion::_notification(int p_what) {
void EditorPropertyQuaternion::_bind_methods() {
}
-void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix, bool p_hide_editor) {
+void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix, bool p_hide_editor) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
// Quaternion is inherently unitless, however someone may want to use it as
@@ -2842,7 +2775,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) {
@@ -2882,16 +2815,14 @@ void EditorPropertyVector4::_notification(int p_what) {
void EditorPropertyVector4::_bind_methods() {
}
-void EditorPropertyVector4::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyVector4::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
- // Vector4 is inherently unitless, however someone may want to use it as
- // a generic way to store 4 values, so we'll still respect the suffix.
spin[i]->set_suffix(p_suffix);
}
}
@@ -2934,7 +2865,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) {
@@ -2974,11 +2905,11 @@ void EditorPropertyVector4i::_notification(int p_what) {
void EditorPropertyVector4i::_bind_methods() {
}
-void EditorPropertyVector4i::setup(double p_min, double p_max, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyVector4i::setup(double p_min, double p_max, const String &p_suffix) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_step(1);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -3023,7 +2954,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) {
@@ -3069,12 +3000,12 @@ void EditorPropertyAABB::_notification(int p_what) {
void EditorPropertyAABB::_bind_methods() {
}
-void EditorPropertyAABB::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyAABB::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 6; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -3106,7 +3037,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) {
@@ -3157,12 +3088,12 @@ void EditorPropertyTransform2D::_notification(int p_what) {
void EditorPropertyTransform2D::_bind_methods() {
}
-void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 6; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
if (i % 3 == 2) {
@@ -3197,7 +3128,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) {
@@ -3249,12 +3180,12 @@ void EditorPropertyBasis::_notification(int p_what) {
void EditorPropertyBasis::_bind_methods() {
}
-void EditorPropertyBasis::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyBasis::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 9; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
// Basis is inherently unitless, however someone may want to use it as
@@ -3287,7 +3218,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) {
@@ -3347,12 +3278,12 @@ void EditorPropertyTransform3D::_notification(int p_what) {
void EditorPropertyTransform3D::_bind_methods() {
}
-void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 12; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
if (i % 4 == 3) {
@@ -3385,7 +3316,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) {
@@ -3393,22 +3324,22 @@ void EditorPropertyProjection::_value_changed(double val, const String &p_name)
}
Projection p;
- p.matrix[0][0] = spin[0]->get_value();
- p.matrix[0][1] = spin[1]->get_value();
- p.matrix[0][2] = spin[2]->get_value();
- p.matrix[0][3] = spin[3]->get_value();
- p.matrix[1][0] = spin[4]->get_value();
- p.matrix[1][1] = spin[5]->get_value();
- p.matrix[1][2] = spin[6]->get_value();
- p.matrix[1][3] = spin[7]->get_value();
- p.matrix[2][0] = spin[8]->get_value();
- p.matrix[2][1] = spin[9]->get_value();
- p.matrix[2][2] = spin[10]->get_value();
- p.matrix[2][3] = spin[11]->get_value();
- p.matrix[3][0] = spin[12]->get_value();
- p.matrix[3][1] = spin[13]->get_value();
- p.matrix[3][2] = spin[14]->get_value();
- p.matrix[3][3] = spin[15]->get_value();
+ p.columns[0][0] = spin[0]->get_value();
+ p.columns[0][1] = spin[1]->get_value();
+ p.columns[0][2] = spin[2]->get_value();
+ p.columns[0][3] = spin[3]->get_value();
+ p.columns[1][0] = spin[4]->get_value();
+ p.columns[1][1] = spin[5]->get_value();
+ p.columns[1][2] = spin[6]->get_value();
+ p.columns[1][3] = spin[7]->get_value();
+ p.columns[2][0] = spin[8]->get_value();
+ p.columns[2][1] = spin[9]->get_value();
+ p.columns[2][2] = spin[10]->get_value();
+ p.columns[2][3] = spin[11]->get_value();
+ p.columns[3][0] = spin[12]->get_value();
+ p.columns[3][1] = spin[13]->get_value();
+ p.columns[3][2] = spin[14]->get_value();
+ p.columns[3][3] = spin[15]->get_value();
emit_changed(get_edited_property(), p, p_name);
}
@@ -3419,22 +3350,22 @@ void EditorPropertyProjection::update_property() {
void EditorPropertyProjection::update_using_transform(Projection p_transform) {
setting = true;
- spin[0]->set_value(p_transform.matrix[0][0]);
- spin[1]->set_value(p_transform.matrix[0][1]);
- spin[2]->set_value(p_transform.matrix[0][2]);
- spin[3]->set_value(p_transform.matrix[0][3]);
- spin[4]->set_value(p_transform.matrix[1][0]);
- spin[5]->set_value(p_transform.matrix[1][1]);
- spin[6]->set_value(p_transform.matrix[1][2]);
- spin[7]->set_value(p_transform.matrix[1][3]);
- spin[8]->set_value(p_transform.matrix[2][0]);
- spin[9]->set_value(p_transform.matrix[2][1]);
- spin[10]->set_value(p_transform.matrix[2][2]);
- spin[11]->set_value(p_transform.matrix[2][3]);
- spin[12]->set_value(p_transform.matrix[3][0]);
- spin[13]->set_value(p_transform.matrix[3][1]);
- spin[14]->set_value(p_transform.matrix[3][2]);
- spin[15]->set_value(p_transform.matrix[3][3]);
+ spin[0]->set_value(p_transform.columns[0][0]);
+ spin[1]->set_value(p_transform.columns[0][1]);
+ spin[2]->set_value(p_transform.columns[0][2]);
+ spin[3]->set_value(p_transform.columns[0][3]);
+ spin[4]->set_value(p_transform.columns[1][0]);
+ spin[5]->set_value(p_transform.columns[1][1]);
+ spin[6]->set_value(p_transform.columns[1][2]);
+ spin[7]->set_value(p_transform.columns[1][3]);
+ spin[8]->set_value(p_transform.columns[2][0]);
+ spin[9]->set_value(p_transform.columns[2][1]);
+ spin[10]->set_value(p_transform.columns[2][2]);
+ spin[11]->set_value(p_transform.columns[2][3]);
+ spin[12]->set_value(p_transform.columns[3][0]);
+ spin[13]->set_value(p_transform.columns[3][1]);
+ spin[14]->set_value(p_transform.columns[3][2]);
+ spin[15]->set_value(p_transform.columns[3][3]);
setting = false;
}
@@ -3453,12 +3384,12 @@ void EditorPropertyProjection::_notification(int p_what) {
void EditorPropertyProjection::_bind_methods() {
}
-void EditorPropertyProjection::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyProjection::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 16; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
if (i % 4 == 3) {
@@ -3488,7 +3419,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.
@@ -3646,8 +3577,8 @@ bool EditorPropertyNodePath::can_drop_data_fw(const Point2 &p_point, const Varia
void EditorPropertyNodePath::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
ERR_FAIL_COND(!is_drop_valid(p_data));
- Dictionary data = p_data;
- Array nodes = data["nodes"];
+ Dictionary data_dict = p_data;
+ Array nodes = data_dict["nodes"];
Node *node = get_tree()->get_edited_scene_root()->get_node(nodes[0]);
if (node) {
@@ -3673,7 +3604,8 @@ bool EditorPropertyNodePath::is_drop_valid(const Dictionary &p_drag_data) const
}
for (const StringName &E : valid_types) {
- if (dropped_node->is_class(E)) {
+ if (dropped_node->is_class(E) ||
+ EditorNode::get_singleton()->is_object_of_custom_type(dropped_node, E)) {
return true;
}
}
@@ -3744,8 +3676,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() {
@@ -3757,7 +3687,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);
@@ -3789,7 +3719,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()) {
@@ -3817,11 +3747,94 @@ 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;
- if (get_edited_object() && s.is_valid()) {
+ 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());
s->call("set_instance_base_type", get_edited_object()->get_class());
@@ -3830,7 +3843,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>());
@@ -3892,7 +3905,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.
- EditorNode::get_singleton()->call_deferred(SNAME("edit_item_resource"), res);
+ callable_mp(EditorNode::get_singleton(), &EditorNode::edit_item_resource).bind(res).call_deferred();
}
}
@@ -3975,19 +3988,19 @@ void EditorPropertyResource::_update_preferred_shader() {
if (parent_property) {
EditorShaderPicker *shader_picker = Object::cast_to<EditorShaderPicker>(resource_picker);
- Object *object = parent_property->get_edited_object();
- const StringName &property = parent_property->get_edited_property();
+ Object *ed_object = parent_property->get_edited_object();
+ const StringName &ed_property = parent_property->get_edited_property();
// Set preferred shader based on edited parent type.
- if ((Object::cast_to<GPUParticles2D>(object) || Object::cast_to<GPUParticles3D>(object)) && property == SNAME("process_material")) {
+ if ((Object::cast_to<GPUParticles2D>(ed_object) || Object::cast_to<GPUParticles3D>(ed_object)) && ed_property == SNAME("process_material")) {
shader_picker->set_preferred_mode(Shader::MODE_PARTICLES);
- } else if (Object::cast_to<FogVolume>(object)) {
+ } else if (Object::cast_to<FogVolume>(ed_object)) {
shader_picker->set_preferred_mode(Shader::MODE_FOG);
- } else if (Object::cast_to<CanvasItem>(object)) {
+ } else if (Object::cast_to<CanvasItem>(ed_object)) {
shader_picker->set_preferred_mode(Shader::MODE_CANVAS_ITEM);
- } else if (Object::cast_to<Node3D>(object) || Object::cast_to<Mesh>(object)) {
+ } else if (Object::cast_to<Node3D>(ed_object) || Object::cast_to<Mesh>(ed_object)) {
shader_picker->set_preferred_mode(Shader::MODE_SPATIAL);
- } else if (Object::cast_to<Sky>(object)) {
+ } else if (Object::cast_to<Sky>(ed_object)) {
shader_picker->set_preferred_mode(Shader::MODE_SKY);
}
}
@@ -4070,7 +4083,6 @@ void EditorPropertyResource::update_property() {
sub_inspector->set_keying(is_keying());
sub_inspector->set_read_only(is_read_only());
sub_inspector->set_use_folding(is_using_folding());
- sub_inspector->set_undo_redo(EditorNode::get_undo_redo());
sub_inspector_vbox = memnew(VBoxContainer);
add_child(sub_inspector_vbox);
@@ -4157,7 +4169,6 @@ void EditorPropertyResource::_notification(int p_what) {
}
void EditorPropertyResource::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_open_editor_pressed"), &EditorPropertyResource::_open_editor_pressed);
ClassDB::bind_method(D_METHOD("_fold_other_editors"), &EditorPropertyResource::_fold_other_editors);
}
@@ -4218,7 +4229,7 @@ static EditorPropertyRangeHint _parse_range_hint(PropertyHint p_hint, const Stri
hint.or_greater = true;
} else if (slice == "or_less") {
hint.or_less = true;
- } else if (slice == "no_slider") {
+ } else if (slice == "hide_slider") {
hint.hide_slider = true;
} else if (slice == "exp") {
hint.exp_range = true;
@@ -4314,7 +4325,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1);
- editor->setup(hint.min, hint.max, hint.step, hint.or_greater, hint.or_less, hint.suffix);
+ editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.or_greater, hint.or_less, hint.suffix);
return editor;
}
@@ -4378,45 +4389,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) {
@@ -4442,7 +4414,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
case Variant::VECTOR2I: {
EditorPropertyVector2i *editor = memnew(EditorPropertyVector2i(p_wide));
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1);
- editor->setup(hint.min, hint.max, hint.hide_slider, p_hint == PROPERTY_HINT_LINK, hint.suffix);
+ editor->setup(hint.min, hint.max, p_hint == PROPERTY_HINT_LINK, hint.suffix);
return editor;
} break;
@@ -4455,7 +4427,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
case Variant::RECT2I: {
EditorPropertyRect2i *editor = memnew(EditorPropertyRect2i(p_wide));
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1);
- editor->setup(hint.min, hint.max, hint.hide_slider, hint.suffix);
+ editor->setup(hint.min, hint.max, hint.suffix);
return editor;
} break;
@@ -4469,7 +4441,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
case Variant::VECTOR3I: {
EditorPropertyVector3i *editor = memnew(EditorPropertyVector3i(p_wide));
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1);
- editor->setup(hint.min, hint.max, hint.hide_slider, p_hint == PROPERTY_HINT_LINK, hint.suffix);
+ editor->setup(hint.min, hint.max, p_hint == PROPERTY_HINT_LINK, hint.suffix);
return editor;
} break;
@@ -4483,7 +4455,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
case Variant::VECTOR4I: {
EditorPropertyVector4i *editor = memnew(EditorPropertyVector4i);
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1);
- editor->setup(hint.min, hint.max, hint.hide_slider, hint.suffix);
+ editor->setup(hint.min, hint.max, hint.suffix);
return editor;
} break;
@@ -4615,6 +4587,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 d6c9510634..a255af30ee 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -1,45 +1,49 @@
-/*************************************************************************/
-/* editor_properties.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_properties.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 EDITOR_PROPERTIES_H
#define EDITOR_PROPERTIES_H
-#include "editor/create_dialog.h"
#include "editor/editor_inspector.h"
-#include "editor/editor_locale_dialog.h"
-#include "editor/editor_resource_picker.h"
-#include "editor/editor_spin_slider.h"
-#include "editor/property_selector.h"
-#include "editor/scene_tree_editor.h"
-#include "scene/gui/color_picker.h"
-#include "scene/gui/line_edit.h"
+
+class CheckBox;
+class ColorPickerButton;
+class CreateDialog;
+class EditorFileDialog;
+class EditorLocaleDialog;
+class EditorResourcePicker;
+class EditorSpinSlider;
+class PropertySelector;
+class SceneTreeDialog;
+class TextEdit;
+class TextureButton;
class EditorPropertyNil : public EditorProperty {
GDCLASS(EditorPropertyNil, EditorProperty);
@@ -199,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;
@@ -357,6 +327,7 @@ protected:
public:
void setup(LayerType p_layer_type);
void set_layer_name(int p_index, const String &p_name);
+ String get_layer_name(int p_index) const;
virtual void update_property() override;
EditorPropertyLayers();
};
@@ -373,7 +344,7 @@ protected:
public:
virtual void update_property() override;
- void setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix = String());
+ void setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_hide_slider, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix = String());
EditorPropertyInteger();
};
@@ -433,7 +404,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix = String(), bool p_angle_in_radians = false);
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix = String(), bool p_angle_in_radians = false);
EditorPropertyFloat();
};
@@ -496,7 +467,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_link = false, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link = false, const String &p_suffix = String());
EditorPropertyVector2(bool p_force_wide = false);
};
@@ -513,7 +484,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyRect2(bool p_force_wide = false);
};
@@ -541,7 +512,7 @@ public:
virtual void update_property() override;
virtual void update_using_vector(Vector3 p_vector);
virtual Vector3 get_vector();
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_link = false, const String &p_suffix = String(), bool p_angle_in_radians = false);
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link = false, const String &p_suffix = String(), bool p_angle_in_radians = false);
EditorPropertyVector3(bool p_force_wide = false);
};
@@ -561,7 +532,7 @@ protected:
public:
virtual void update_property() override;
- void setup(int p_min, int p_max, bool p_no_slider, bool p_link = false, const String &p_suffix = String());
+ void setup(int p_min, int p_max, bool p_link = false, const String &p_suffix = String());
EditorPropertyVector2i(bool p_force_wide = false);
};
@@ -578,7 +549,7 @@ protected:
public:
virtual void update_property() override;
- void setup(int p_min, int p_max, bool p_no_slider, const String &p_suffix = String());
+ void setup(int p_min, int p_max, const String &p_suffix = String());
EditorPropertyRect2i(bool p_force_wide = false);
};
@@ -603,7 +574,7 @@ protected:
public:
virtual void update_property() override;
- void setup(int p_min, int p_max, bool p_no_slider, bool p_link = false, const String &p_suffix = String());
+ void setup(int p_min, int p_max, bool p_link = false, const String &p_suffix = String());
EditorPropertyVector3i(bool p_force_wide = false);
};
@@ -620,7 +591,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyPlane(bool p_force_wide = false);
};
@@ -638,7 +609,7 @@ class EditorPropertyQuaternion : public EditorProperty {
EditorSpinSlider *euler[3];
Button *edit_button = nullptr;
- Vector3 edit_euler = Vector3();
+ Vector3 edit_euler;
void _value_changed(double p_val, const String &p_name);
void _edit_custom_value();
@@ -654,7 +625,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String(), bool p_hide_editor = false);
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String(), bool p_hide_editor = false);
EditorPropertyQuaternion();
};
@@ -671,7 +642,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyVector4();
};
@@ -688,7 +659,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, const String &p_suffix = String());
EditorPropertyVector4i();
};
@@ -705,7 +676,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyAABB();
};
@@ -722,7 +693,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyTransform2D(bool p_include_origin = true);
};
@@ -739,7 +710,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyBasis();
};
@@ -757,7 +728,7 @@ protected:
public:
virtual void update_property() override;
virtual void update_using_transform(Transform3D p_transform);
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyTransform3D();
};
@@ -775,7 +746,7 @@ protected:
public:
virtual void update_property() override;
virtual void update_using_transform(Projection p_transform);
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyProjection();
};
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index ad84b30689..28c0b047d8 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_properties_array_dict.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_properties_array_dict.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 "editor_properties_array_dict.h"
@@ -34,6 +34,7 @@
#include "core/io/marshalls.h"
#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/inspector_dock.h"
bool EditorPropertyArrayObject::_set(const StringName &p_name, const Variant &p_value) {
@@ -260,14 +261,15 @@ void EditorPropertyArray::update_property() {
HBoxContainer *hbox = memnew(HBoxContainer);
vbox->add_child(hbox);
- Label *label = memnew(Label(TTR("Size:")));
- label->set_h_size_flags(SIZE_EXPAND_FILL);
- hbox->add_child(label);
+ Label *size_label = memnew(Label(TTR("Size:")));
+ size_label->set_h_size_flags(SIZE_EXPAND_FILL);
+ hbox->add_child(size_label);
size_slider = memnew(EditorSpinSlider);
size_slider->set_step(1);
size_slider->set_max(1000000);
size_slider->set_h_size_flags(SIZE_EXPAND_FILL);
+ size_slider->set_read_only(is_read_only());
size_slider->connect("value_changed", callable_mp(this, &EditorPropertyArray::_length_changed));
hbox->add_child(size_slider);
@@ -278,6 +280,7 @@ void EditorPropertyArray::update_property() {
button_add_item = EditorInspector::create_inspector_action_button(TTR("Add Element"));
button_add_item->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
button_add_item->connect(SNAME("pressed"), callable_mp(this, &EditorPropertyArray::_add_element));
+ button_add_item->set_disabled(is_read_only());
vbox->add_child(button_add_item);
paginator = memnew(EditorPaginator);
@@ -291,7 +294,7 @@ void EditorPropertyArray::update_property() {
continue; // Don't remove the property that the user is moving.
}
- child->queue_delete(); // Button still needed after pressed is called.
+ child->queue_free(); // Button still needed after pressed is called.
property_vbox->remove_child(child);
}
}
@@ -328,6 +331,7 @@ void EditorPropertyArray::update_property() {
Button *reorder_button = memnew(Button);
reorder_button->set_icon(get_theme_icon(SNAME("TripleBar"), SNAME("EditorIcons")));
reorder_button->set_default_cursor_shape(Control::CURSOR_MOVE);
+ reorder_button->set_disabled(is_read_only());
reorder_button->connect("gui_input", callable_mp(this, &EditorPropertyArray::_reorder_button_gui_input));
reorder_button->connect("button_down", callable_mp(this, &EditorPropertyArray::_reorder_button_down).bind(i + offset));
reorder_button->connect("button_up", callable_mp(this, &EditorPropertyArray::_reorder_button_up));
@@ -358,20 +362,23 @@ void EditorPropertyArray::update_property() {
prop->connect("property_changed", callable_mp(this, &EditorPropertyArray::_property_changed));
prop->connect("object_id_selected", callable_mp(this, &EditorPropertyArray::_object_id_selected));
prop->set_h_size_flags(SIZE_EXPAND_FILL);
+ prop->set_read_only(is_read_only());
hbox->add_child(prop);
bool is_untyped_array = array.get_type() == Variant::ARRAY && subtype == Variant::NIL;
if (is_untyped_array) {
- Button *edit = memnew(Button);
- edit->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
- hbox->add_child(edit);
- edit->connect("pressed", callable_mp(this, &EditorPropertyArray::_change_type).bind(edit, i + offset));
+ Button *edit_btn = memnew(Button);
+ edit_btn->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
+ hbox->add_child(edit_btn);
+ edit_btn->set_disabled(is_read_only());
+ edit_btn->connect("pressed", callable_mp(this, &EditorPropertyArray::_change_type).bind(edit_btn, i + offset));
} else {
- Button *remove = memnew(Button);
- remove->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
- remove->connect("pressed", callable_mp(this, &EditorPropertyArray::_remove_pressed).bind(i + offset));
- hbox->add_child(remove);
+ Button *remove_btn = memnew(Button);
+ remove_btn->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
+ remove_btn->set_disabled(is_read_only());
+ remove_btn->connect("pressed", callable_mp(this, &EditorPropertyArray::_remove_pressed).bind(i + offset));
+ hbox->add_child(remove_btn);
}
prop->update_property();
@@ -409,6 +416,10 @@ void EditorPropertyArray::_button_draw() {
}
bool EditorPropertyArray::_is_drop_valid(const Dictionary &p_drag_data) const {
+ if (is_read_only()) {
+ return false;
+ }
+
String allowed_type = Variant::get_type_name(subtype);
// When the subtype is of type Object, an additional subtype may be specified in the hint string
@@ -456,7 +467,7 @@ void EditorPropertyArray::drop_data_fw(const Point2 &p_point, const Variant &p_d
Variant array = object->get_array();
- // Handle the case where array is not initialised yet.
+ // Handle the case where array is not initialized yet.
if (!array.is_array()) {
Callable::CallError ce;
Variant::construct(array_type, array, nullptr, 0, ce);
@@ -500,7 +511,7 @@ void EditorPropertyArray::_notification(int p_what) {
change_type->add_separator();
change_type->add_icon_item(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), TTR("Remove Item"), Variant::VARIANT_MAX);
- if (Object::cast_to<Button>(button_add_item)) {
+ if (button_add_item) {
button_add_item->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
}
} break;
@@ -609,7 +620,7 @@ void EditorPropertyArray::setup(Variant::Type p_array_type, const String &p_hint
}
void EditorPropertyArray::_reorder_button_gui_input(const Ref<InputEvent> &p_event) {
- if (reorder_from_index < 0) {
+ if (reorder_from_index < 0 || is_read_only()) {
return;
}
@@ -646,6 +657,10 @@ void EditorPropertyArray::_reorder_button_gui_input(const Ref<InputEvent> &p_eve
}
void EditorPropertyArray::_reorder_button_down(int p_index) {
+ if (is_read_only()) {
+ return;
+ }
+
reorder_from_index = p_index;
reorder_to_index = p_index;
reorder_selected_element_hbox = Object::cast_to<HBoxContainer>(property_vbox->get_child(p_index % page_length));
@@ -656,6 +671,10 @@ void EditorPropertyArray::_reorder_button_down(int p_index) {
}
void EditorPropertyArray::_reorder_button_up() {
+ if (is_read_only()) {
+ return;
+ }
+
if (reorder_from_index != reorder_to_index) {
// Move the element.
Variant array = object->get_array();
@@ -674,6 +693,8 @@ void EditorPropertyArray::_reorder_button_up() {
reorder_mouse_y_delta = 0.0f;
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
+
+ ERR_FAIL_NULL(reorder_selected_button);
reorder_selected_button->warp_mouse(reorder_selected_button->get_size() / 2.0f);
reorder_selected_element_hbox = nullptr;
@@ -681,8 +702,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() {
@@ -694,7 +713,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);
@@ -797,6 +816,10 @@ void EditorPropertyDictionary::_change_type_menu(int p_index) {
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());
@@ -843,7 +866,7 @@ void EditorPropertyDictionary::update_property() {
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = property_vbox->get_child_count() - 1; i >= 0; i--) {
- property_vbox->get_child(i)->queue_delete();
+ property_vbox->get_child(i)->queue_free();
}
}
@@ -898,7 +921,7 @@ void EditorPropertyDictionary::update_property() {
} break;
case Variant::INT: {
EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
- editor->setup(-100000, 100000, 1, true, true);
+ editor->setup(-100000, 100000, 1, false, true, true);
prop = editor;
} break;
@@ -908,7 +931,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;
@@ -921,7 +950,7 @@ void EditorPropertyDictionary::update_property() {
} break;
case Variant::VECTOR2I: {
EditorPropertyVector2i *editor = memnew(EditorPropertyVector2i);
- editor->setup(-100000, 100000, true);
+ editor->setup(-100000, 100000);
prop = editor;
} break;
@@ -933,7 +962,7 @@ void EditorPropertyDictionary::update_property() {
} break;
case Variant::RECT2I: {
EditorPropertyRect2i *editor = memnew(EditorPropertyRect2i);
- editor->setup(-100000, 100000, true);
+ editor->setup(-100000, 100000);
prop = editor;
} break;
@@ -945,7 +974,7 @@ void EditorPropertyDictionary::update_property() {
} break;
case Variant::VECTOR3I: {
EditorPropertyVector3i *editor = memnew(EditorPropertyVector3i);
- editor->setup(-100000, 100000, true);
+ editor->setup(-100000, 100000);
prop = editor;
} break;
@@ -957,7 +986,7 @@ void EditorPropertyDictionary::update_property() {
} break;
case Variant::VECTOR4I: {
EditorPropertyVector4i *editor = memnew(EditorPropertyVector4i);
- editor->setup(-100000, 100000, true);
+ editor->setup(-100000, 100000);
prop = editor;
} break;
@@ -1097,6 +1126,10 @@ void EditorPropertyDictionary::update_property() {
}
}
+ ERR_FAIL_COND(!prop);
+
+ prop->set_read_only(is_read_only());
+
if (i == amount) {
PanelContainer *pc = memnew(PanelContainer);
property_vbox->add_child(pc);
@@ -1133,16 +1166,18 @@ void EditorPropertyDictionary::update_property() {
}
hbox->add_child(prop);
prop->set_h_size_flags(SIZE_EXPAND_FILL);
- Button *edit = memnew(Button);
- edit->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
- hbox->add_child(edit);
- edit->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_change_type).bind(edit, change_index));
+ Button *edit_btn = memnew(Button);
+ edit_btn->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
+ edit_btn->set_disabled(is_read_only());
+ hbox->add_child(edit_btn);
+ edit_btn->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_change_type).bind(edit_btn, change_index));
prop->update_property();
if (i == amount + 1) {
button_add_item = EditorInspector::create_inspector_action_button(TTR("Add Key/Value Pair"));
button_add_item->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
+ button_add_item->set_disabled(is_read_only());
button_add_item->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_add_key_value));
add_vbox->add_child(button_add_item);
}
@@ -1181,7 +1216,7 @@ void EditorPropertyDictionary::_notification(int p_what) {
change_type->add_separator();
change_type->add_icon_item(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), TTR("Remove Item"), Variant::VARIANT_MAX);
- if (Object::cast_to<Button>(button_add_item)) {
+ if (button_add_item) {
button_add_item->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
}
} break;
@@ -1325,7 +1360,7 @@ void EditorPropertyLocalizableString::update_property() {
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = property_vbox->get_child_count() - 1; i >= 0; i--) {
- property_vbox->get_child(i)->queue_delete();
+ property_vbox->get_child(i)->queue_free();
}
}
@@ -1372,10 +1407,10 @@ void EditorPropertyLocalizableString::update_property() {
property_vbox->add_child(hbox);
hbox->add_child(prop);
prop->set_h_size_flags(SIZE_EXPAND_FILL);
- Button *edit = memnew(Button);
- edit->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
- hbox->add_child(edit);
- edit->connect("pressed", callable_mp(this, &EditorPropertyLocalizableString::_remove_item).bind(edit, remove_index));
+ Button *edit_btn = memnew(Button);
+ edit_btn->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
+ hbox->add_child(edit_btn);
+ edit_btn->connect("pressed", callable_mp(this, &EditorPropertyLocalizableString::_remove_item).bind(edit_btn, remove_index));
prop->update_property();
}
@@ -1407,7 +1442,7 @@ void EditorPropertyLocalizableString::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_ENTER_TREE: {
- if (Object::cast_to<Button>(button_add_item)) {
+ if (button_add_item) {
button_add_item->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
}
} break;
diff --git a/editor/editor_properties_array_dict.h b/editor/editor_properties_array_dict.h
index ae61418528..73a16e3687 100644
--- a/editor/editor_properties_array_dict.h
+++ b/editor/editor_properties_array_dict.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_properties_array_dict.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_properties_array_dict.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 EDITOR_PROPERTIES_ARRAY_DICT_H
#define EDITOR_PROPERTIES_ARRAY_DICT_H
@@ -154,6 +154,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 +170,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 a2dfa4f80e..18ba19f5f6 100644
--- a/editor/editor_property_name_processor.cpp
+++ b/editor/editor_property_name_processor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_property_name_processor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_property_name_processor.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 "editor_property_name_processor.h"
@@ -64,6 +64,10 @@ String EditorPropertyNameProcessor::_capitalize_name(const String &p_name) const
Vector<String> parts = p_name.split("_", false);
for (int i = 0; i < parts.size(); i++) {
+ // Articles/conjunctions/prepositions which should only be capitalized when not at beginning and end.
+ if (i > 0 && i + 1 < parts.size() && stop_words.find(parts[i]) != -1) {
+ continue;
+ }
HashMap<String, String>::ConstIterator remap = capitalize_string_remaps.find(parts[i]);
if (remap) {
parts.write[i] = remap->value;
@@ -143,6 +147,7 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
capitalize_string_remaps["gdscript"] = "GDScript";
capitalize_string_remaps["ggx"] = "GGX";
capitalize_string_remaps["gi"] = "GI";
+ capitalize_string_remaps["gl"] = "GL";
capitalize_string_remaps["glb"] = "GLB";
capitalize_string_remaps["gles2"] = "GLES2";
capitalize_string_remaps["gles3"] = "GLES3";
@@ -157,6 +162,7 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
capitalize_string_remaps["html"] = "HTML";
capitalize_string_remaps["http"] = "HTTP";
capitalize_string_remaps["id"] = "ID";
+ capitalize_string_remaps["ids"] = "IDs";
capitalize_string_remaps["igd"] = "IGD";
capitalize_string_remaps["ik"] = "IK";
capitalize_string_remaps["image@2x"] = "Image @2x";
@@ -205,6 +211,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";
@@ -223,7 +230,9 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
capitalize_string_remaps["svg"] = "SVG";
capitalize_string_remaps["taa"] = "TAA";
capitalize_string_remaps["tcp"] = "TCP";
+ capitalize_string_remaps["tls"] = "TLS";
capitalize_string_remaps["ui"] = "UI";
+ capitalize_string_remaps["uri"] = "URI";
capitalize_string_remaps["url"] = "URL";
capitalize_string_remaps["urls"] = "URLs";
capitalize_string_remaps["us"] = String::utf8("(µs)"); // Unit.
@@ -237,6 +246,7 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
capitalize_string_remaps["vector2"] = "Vector2";
capitalize_string_remaps["vpn"] = "VPN";
capitalize_string_remaps["vram"] = "VRAM";
+ capitalize_string_remaps["vrs"] = "VRS";
capitalize_string_remaps["vsync"] = "V-Sync";
capitalize_string_remaps["wap"] = "WAP";
capitalize_string_remaps["webp"] = "WebP";
@@ -246,9 +256,33 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
capitalize_string_remaps["wifi"] = "Wi-Fi";
capitalize_string_remaps["x86"] = "x86";
capitalize_string_remaps["xr"] = "XR";
+ capitalize_string_remaps["xray"] = "X-Ray";
capitalize_string_remaps["xy"] = "XY";
capitalize_string_remaps["xz"] = "XZ";
capitalize_string_remaps["yz"] = "YZ";
+
+ // Articles, conjunctions, prepositions.
+ // The following initialization is parsed in `editor/translations/extract.py` with a regex.
+ // The word definition format should be kept synced with the regex.
+ stop_words = LocalVector<String>({
+ "a",
+ "an",
+ "and",
+ "as",
+ "at",
+ "by",
+ "for",
+ "in",
+ "not",
+ "of",
+ "on",
+ "or",
+ "over",
+ "per",
+ "the",
+ "then",
+ "to",
+ });
}
EditorPropertyNameProcessor::~EditorPropertyNameProcessor() {
diff --git a/editor/editor_property_name_processor.h b/editor/editor_property_name_processor.h
index 37d905c806..f32cb9f43a 100644
--- a/editor/editor_property_name_processor.h
+++ b/editor/editor_property_name_processor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_property_name_processor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_property_name_processor.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 EDITOR_PROPERTY_NAME_PROCESSOR_H
#define EDITOR_PROPERTY_NAME_PROCESSOR_H
@@ -40,6 +40,7 @@ class EditorPropertyNameProcessor : public Node {
mutable HashMap<String, String> capitalize_string_cache;
HashMap<String, String> capitalize_string_remaps;
+ LocalVector<String> stop_words; // Exceptions that shouldn't be capitalized.
// Capitalizes property path segments.
String _capitalize_name(const String &p_name) const;
diff --git a/editor/editor_quick_open.cpp b/editor/editor_quick_open.cpp
index 539cb7cd8a..b90edb8f90 100644
--- a/editor/editor_quick_open.cpp
+++ b/editor/editor_quick_open.cpp
@@ -1,47 +1,57 @@
-/*************************************************************************/
-/* editor_quick_open.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_quick_open.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 "editor_quick_open.h"
#include "core/os/keyboard.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
-void EditorQuickOpen::popup_dialog(const StringName &p_base, bool p_enable_multi, bool p_dontclear) {
+static Rect2i prev_rect = Rect2i();
+static bool was_showed = false;
+
+void EditorQuickOpen::popup_dialog(const String &p_base, bool p_enable_multi, bool p_dont_clear) {
base_type = p_base;
allow_multi_select = p_enable_multi;
search_options->set_select_mode(allow_multi_select ? Tree::SELECT_MULTI : Tree::SELECT_SINGLE);
- popup_centered_clamped(Size2i(600, 440), 0.8f);
+
+ if (was_showed) {
+ popup(prev_rect);
+ } else {
+ popup_centered_clamped(Size2(600, 440) * EDSCALE, 0.8f);
+ }
EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem();
_build_search_cache(efsd);
- if (p_dontclear) {
+ if (p_dont_clear) {
search_box->select_all();
_update_search();
} else {
@@ -55,19 +65,23 @@ void EditorQuickOpen::_build_search_cache(EditorFileSystemDirectory *p_efsd) {
_build_search_cache(p_efsd->get_subdir(i));
}
- Vector<String> base_types = String(base_type).split(String(","));
+ Vector<String> base_types = base_type.split(",");
for (int i = 0; i < p_efsd->get_file_count(); i++) {
- String file_type = p_efsd->get_file_type(i);
+ String file = p_efsd->get_file_path(i);
+ String engine_type = p_efsd->get_file_type(i);
+
+ 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) {
- if (ClassDB::is_parent_class(file_type, parent_type)) {
- String file = p_efsd->get_file_path(i);
+ if (ClassDB::is_parent_class(engine_type, parent_type) || EditorNode::get_editor_data().script_class_is_parent(script_type, parent_type)) {
files.push_back(file.substr(6, file.length()));
// Store refs to used icons.
String ext = file.get_extension();
if (!icons.has(ext)) {
- icons.insert(ext, get_theme_icon((has_theme_icon(file_type, SNAME("EditorIcons")) ? file_type : String("Object")), SNAME("EditorIcons")));
+ icons.insert(ext, get_theme_icon((has_theme_icon(actual_type, SNAME("EditorIcons")) ? actual_type : "Object"), SNAME("EditorIcons")));
}
// Stop testing base types as soon as we got a match.
@@ -218,7 +232,7 @@ Vector<String> EditorQuickOpen::get_selected_files() const {
return selected_files;
}
-StringName EditorQuickOpen::get_base_type() const {
+String EditorQuickOpen::get_base_type() const {
return base_type;
}
@@ -230,6 +244,13 @@ void EditorQuickOpen::_notification(int p_what) {
search_box->set_clear_button_enabled(true);
} break;
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ if (!is_visible()) {
+ prev_rect = Rect2i(get_position(), get_size());
+ was_showed = true;
+ }
+ } break;
+
case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &EditorQuickOpen::_confirmed));
} break;
diff --git a/editor/editor_quick_open.h b/editor/editor_quick_open.h
index e41a8c7e75..4b63a226c2 100644
--- a/editor/editor_quick_open.h
+++ b/editor/editor_quick_open.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_quick_open.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_quick_open.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 EDITOR_QUICK_OPEN_H
#define EDITOR_QUICK_OPEN_H
@@ -41,7 +41,7 @@ class EditorQuickOpen : public ConfirmationDialog {
LineEdit *search_box = nullptr;
Tree *search_options = nullptr;
- StringName base_type;
+ String base_type;
bool allow_multi_select = false;
Vector<String> files;
@@ -76,12 +76,12 @@ protected:
static void _bind_methods();
public:
- StringName get_base_type() const;
+ String get_base_type() const;
String get_selected() const;
Vector<String> get_selected_files() const;
- void popup_dialog(const StringName &p_base, bool p_enable_multi = false, bool p_dontclear = false);
+ void popup_dialog(const String &p_base, bool p_enable_multi = false, bool p_dontclear = false);
EditorQuickOpen();
};
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index 5346052f4d..cb71a2457b 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_resource_picker.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_resource_picker.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 "editor_resource_picker.h"
@@ -42,17 +42,12 @@
#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()) {
resource_path = edited_resource->get_path() + "\n";
}
+ String class_name = _get_resource_type(edited_resource);
if (preview_rect) {
preview_rect->set_texture(Ref<Texture2D>());
@@ -64,16 +59,20 @@ void EditorResourcePicker::_update_resource() {
assign_button->set_text(TTR("<empty>"));
assign_button->set_tooltip_text("");
} else {
- assign_button->set_icon(EditorNode::get_singleton()->get_object_icon(edited_resource.operator->(), "Object"));
+ assign_button->set_icon(EditorNode::get_singleton()->get_object_icon(edited_resource.operator->(), SNAME("Object")));
if (!edited_resource->get_name().is_empty()) {
assign_button->set_text(edited_resource->get_name());
} else if (edited_resource->get_path().is_resource_file()) {
assign_button->set_text(edited_resource->get_path().get_file());
} else {
- assign_button->set_text(edited_resource->get_class());
+ assign_button->set_text(class_name);
}
- assign_button->set_tooltip_text(resource_path + TTR("Type:") + " " + edited_resource->get_class());
+
+ if (edited_resource->get_path().is_resource_file()) {
+ resource_path = edited_resource->get_path() + "\n";
+ }
+ assign_button->set_tooltip_text(resource_path + TTR("Type:") + " " + class_name);
// Preview will override the above, so called at the end.
EditorResourcePreview::get_singleton()->queue_edited_resource_preview(edited_resource, this, "_update_resource_preview", edited_resource->get_instance_id());
@@ -91,9 +90,9 @@ void EditorResourcePicker::_update_resource_preview(const String &p_path, const
}
if (preview_rect) {
- Ref<Script> script = edited_resource;
- if (script.is_valid()) {
- assign_button->set_text(script->get_path().get_file());
+ Ref<Script> scr = edited_resource;
+ if (scr.is_valid()) {
+ assign_button->set_text(scr->get_path().get_file());
return;
}
@@ -106,7 +105,7 @@ void EditorResourcePicker::_update_resource_preview(const String &p_path, const
assign_button->set_custom_minimum_size(assign_button_min_size);
} else {
preview_rect->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
- int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
+ int thumbnail_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
thumbnail_size *= EDSCALE;
assign_button->set_custom_minimum_size(Size2(MAX(1, assign_button_min_size.x), MAX(thumbnail_size, assign_button_min_size.y)));
}
@@ -134,16 +133,29 @@ void EditorResourcePicker::_file_selected(const String &p_path) {
if (!base_type.is_empty()) {
bool any_type_matches = false;
+ String res_type = loaded_resource->get_class();
+ Ref<Script> res_script = loaded_resource->get_script();
+ bool is_global_class = false;
+ if (res_script.is_valid()) {
+ String script_type = EditorNode::get_editor_data().script_class_get_name(res_script->get_path());
+ if (!script_type.is_empty()) {
+ is_global_class = true;
+ res_type = script_type;
+ }
+ }
+
for (int i = 0; i < base_type.get_slice_count(","); i++) {
String base = base_type.get_slice(",", i);
- if (loaded_resource->is_class(base)) {
- any_type_matches = true;
+
+ any_type_matches = is_global_class ? EditorNode::get_editor_data().script_class_is_parent(res_type, base) : loaded_resource->is_class(base);
+
+ if (any_type_matches) {
break;
}
}
if (!any_type_matches) {
- EditorNode::get_singleton()->show_warning(vformat(TTR("The selected resource (%s) does not match any type expected for this property (%s)."), loaded_resource->get_class(), base_type));
+ EditorNode::get_singleton()->show_warning(vformat(TTR("The selected resource (%s) does not match any type expected for this property (%s)."), res_type, base_type));
return;
}
}
@@ -186,7 +198,7 @@ void EditorResourcePicker::_update_menu_items() {
// Add options for changing existing value of the resource.
if (edited_resource.is_valid()) {
// Determine if the edited resource is part of another scene (foreign) which was imported
- bool is_edited_resource_foreign_import = EditorNode::get_singleton()->is_resource_read_only(edited_resource);
+ bool is_edited_resource_foreign_import = EditorNode::get_singleton()->is_resource_read_only(edited_resource, true);
// If the resource is determined to be foreign and imported, change the menu entry's description to 'inspect' rather than 'edit'
// since will only be able to view its properties in read-only mode.
@@ -227,16 +239,19 @@ void EditorResourcePicker::_update_menu_items() {
// Add options to copy/paste resource.
Ref<Resource> cb = EditorSettings::get_singleton()->get_resource_clipboard();
bool paste_valid = false;
- if (is_editable()) {
- if (cb.is_valid()) {
- if (base_type.is_empty()) {
- paste_valid = true;
- } else {
- for (int i = 0; i < base_type.get_slice_count(","); i++) {
- if (ClassDB::is_parent_class(cb->get_class(), base_type.get_slice(",", i))) {
- paste_valid = true;
- break;
- }
+ if (is_editable() && cb.is_valid()) {
+ if (base_type.is_empty()) {
+ paste_valid = true;
+ } else {
+ String res_type = _get_resource_type(cb);
+
+ for (int i = 0; i < base_type.get_slice_count(","); i++) {
+ String base = base_type.get_slice(",", i);
+
+ paste_valid = ClassDB::is_parent_class(res_type, base) || EditorNode::get_editor_data().script_class_is_parent(res_type, base);
+
+ if (paste_valid) {
+ break;
}
}
}
@@ -281,6 +296,9 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
for (int i = 0; i < base_type.get_slice_count(","); i++) {
String base = base_type.get_slice(",", i);
ResourceLoader::get_recognized_extensions_for_type(base, &extensions);
+ if (ScriptServer::is_global_class(base)) {
+ ResourceLoader::get_recognized_extensions_for_type(ScriptServer::get_global_class_native_base(base), &extensions);
+ }
}
HashSet<String> valid_extensions;
@@ -408,19 +426,13 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
Variant obj;
if (ScriptServer::is_global_class(intype)) {
- obj = ClassDB::instantiate(ScriptServer::get_global_class_native_base(intype));
- if (obj) {
- Ref<Script> script = ResourceLoader::load(ScriptServer::get_global_class_path(intype));
- if (script.is_valid()) {
- ((Object *)obj)->set_script(script);
- }
- }
+ obj = EditorNode::get_editor_data().script_class_instance(intype);
} else {
obj = ClassDB::instantiate(intype);
}
if (!obj) {
- obj = EditorNode::get_editor_data().instance_custom_type(intype, "Resource");
+ obj = EditorNode::get_editor_data().instantiate_custom_type(intype, "Resource");
}
Resource *resp = Object::cast_to<Resource>(obj);
@@ -446,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;
@@ -454,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;
@@ -494,12 +506,9 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) {
}
bool EditorResourcePicker::handle_menu_selected(int p_which) {
- bool success;
- if (GDVIRTUAL_CALL(_handle_menu_selected, p_which, success)) {
- return success;
- }
-
- return false;
+ bool success = false;
+ GDVIRTUAL_CALL(_handle_menu_selected, p_which, success);
+ return success;
}
void EditorResourcePicker::_button_draw() {
@@ -512,60 +521,78 @@ void EditorResourcePicker::_button_draw() {
void EditorResourcePicker::_button_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
- if (mb.is_valid()) {
- if (mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) {
- // Only attempt to update and show the menu if we have
- // a valid resource or the Picker is editable, as
- // there will otherwise be nothing to display.
- if (edited_resource.is_valid() || is_editable()) {
- _update_menu_items();
-
- Vector2 pos = get_screen_position() + mb->get_position();
- edit_menu->reset_size();
- edit_menu->set_position(pos);
- edit_menu->popup();
- }
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) {
+ // Only attempt to update and show the menu if we have
+ // a valid resource or the Picker is editable, as
+ // there will otherwise be nothing to display.
+ if (edited_resource.is_valid() || is_editable()) {
+ _update_menu_items();
+
+ Vector2 pos = get_screen_position() + mb->get_position();
+ edit_menu->reset_size();
+ edit_menu->set_position(pos);
+ edit_menu->popup();
}
}
}
-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();
+String EditorResourcePicker::_get_resource_type(const Ref<Resource> &p_resource) const {
+ if (p_resource.is_null()) {
+ return String();
+ }
+ String res_type = p_resource->get_class();
- List<StringName> global_classes;
- ScriptServer::get_global_class_list(&global_classes);
+ Ref<Script> res_script = p_resource->get_script();
+ if (res_script.is_null()) {
+ return res_type;
+ }
- for (int i = 0; i < size; i++) {
- String base = allowed_types[i].strip_edges();
- p_vector->insert(base);
+ // TODO: Replace with EditorFileSystem when PR #60606 is merged to use cached resource type.
+ String script_type = EditorNode::get_editor_data().script_class_get_name(res_script->get_path());
+ if (!script_type.is_empty()) {
+ res_type = script_type;
+ }
+ return res_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) {
- p_vector->insert(subtype_name);
- }
- } else {
- List<StringName> allowed_subtypes;
+static void _add_allowed_type(const StringName &p_type, HashSet<StringName> *p_vector) {
+ if (p_vector->has(p_type)) {
+ // Already added
+ return;
+ }
- List<StringName> inheriters;
- ClassDB::get_inheriters_from_class(base, &inheriters);
- for (const StringName &subtype_name : inheriters) {
- p_vector->insert(subtype_name);
- allowed_subtypes.push_back(subtype_name);
- }
+ if (ClassDB::class_exists(p_type)) {
+ // Engine class,
- for (const StringName &subtype_name : global_classes) {
- if (EditorNode::get_editor_data().script_class_is_parent(subtype_name, base)) {
- p_vector->insert(subtype_name);
- allowed_subtypes.push_back(subtype_name);
- }
- }
+ if (!ClassDB::is_virtual(p_type)) {
+ p_vector->insert(p_type);
+ }
- // Store the subtypes of the base type in the cache for future use.
- allowed_types_cache[base] = 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;
+ ScriptServer::get_inheriters_list(p_type, &inheriters);
+ for (const StringName &S : inheriters) {
+ _add_allowed_type(S, p_vector);
+ }
+}
+
+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();
+
+ 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") {
@@ -577,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 {
@@ -602,41 +621,38 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const {
}
} else if (drag_data.has("type") && String(drag_data["type"]) == "resource") {
res = drag_data["resource"];
+ } else if (drag_data.has("type") && String(drag_data["type"]) == "files") {
+ Vector<String> files = drag_data["files"];
+
+ // TODO: Extract the typename of the dropped filepath's resource in a more performant way, without fully loading it.
+ if (files.size() == 1) {
+ String file = files[0];
+ res = ResourceLoader::load(file);
+ }
}
- HashSet<String> allowed_types;
+ HashSet<StringName> allowed_types;
_get_allowed_types(true, &allowed_types);
- if (res.is_valid() && _is_type_valid(res->get_class(), allowed_types)) {
- return true;
- }
+ if (res.is_valid()) {
+ String res_type = _get_resource_type(res);
- if (res.is_valid() && res->get_script()) {
- StringName custom_class = EditorNode::get_singleton()->get_object_custom_type_name(res->get_script());
- if (_is_type_valid(custom_class, allowed_types)) {
+ if (_is_type_valid(res_type, allowed_types)) {
return true;
}
- }
-
- if (drag_data.has("type") && String(drag_data["type"]) == "files") {
- Vector<String> files = drag_data["files"];
- if (files.size() == 1) {
- String file = files[0];
-
- String file_type = EditorFileSystem::get_singleton()->get_file_type(file);
- if (!file_type.is_empty() && _is_type_valid(file_type, allowed_types)) {
- return true;
- }
+ StringName custom_class = EditorNode::get_singleton()->get_object_custom_type_name(res.ptr());
+ if (_is_type_valid(custom_class, allowed_types)) {
+ return true;
}
}
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;
}
@@ -682,13 +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(dropped_resource->get_class(), allowed_types)) {
- for (const String &E : allowed_types) {
- String at = E.strip_edges();
+ if (!_is_type_valid(res_type, allowed_types)) {
+ 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.
@@ -731,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);
@@ -794,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;
@@ -808,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);
}
}
@@ -820,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;
@@ -828,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++;
}
@@ -844,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;
@@ -909,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));
@@ -917,11 +928,12 @@ 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);
preview_rect->set_offset(SIDE_RIGHT, -1);
+ preview_rect->set_texture_filter(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS);
assign_button->add_child(preview_rect);
}
@@ -945,8 +957,8 @@ void EditorScriptPicker::set_create_options(Object *p_menu_node) {
menu_node->add_icon_item(get_theme_icon(SNAME("ScriptCreate"), SNAME("EditorIcons")), TTR("New Script"), OBJ_MENU_NEW_SCRIPT);
if (script_owner) {
- Ref<Script> script = script_owner->get_script();
- if (script.is_valid()) {
+ Ref<Script> scr = script_owner->get_script();
+ if (scr.is_valid()) {
menu_node->add_icon_item(get_theme_icon(SNAME("ScriptExtend"), SNAME("EditorIcons")), TTR("Extend Script"), OBJ_MENU_EXTEND_SCRIPT);
}
}
@@ -1004,12 +1016,12 @@ void EditorShaderPicker::set_create_options(Object *p_menu_node) {
}
bool EditorShaderPicker::handle_menu_selected(int p_which) {
- Ref<ShaderMaterial> material = Ref<ShaderMaterial>(get_edited_material());
+ Ref<ShaderMaterial> ed_material = Ref<ShaderMaterial>(get_edited_material());
switch (p_which) {
case OBJ_MENU_NEW_SHADER: {
- if (material.is_valid()) {
- SceneTreeDock::get_singleton()->open_shader_dialog(material, preferred_mode);
+ if (ed_material.is_valid()) {
+ SceneTreeDock::get_singleton()->open_shader_dialog(ed_material, preferred_mode);
return true;
}
} break;
diff --git a/editor/editor_resource_picker.h b/editor/editor_resource_picker.h
index 3d6127e656..a302e24957 100644
--- a/editor/editor_resource_picker.h
+++ b/editor/editor_resource_picker.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_resource_picker.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_resource_picker.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 EDITOR_RESOURCE_PICKER_H
#define 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;
@@ -91,9 +89,10 @@ class EditorResourcePicker : public HBoxContainer {
void _button_draw();
void _button_input(const Ref<InputEvent> &p_event);
- void _get_allowed_types(bool p_with_convert, HashSet<String> *p_vector) const;
+ String _get_resource_type(const Ref<Resource> &p_resource) 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;
@@ -117,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_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 706b77c142..db4d12c761 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_resource_preview.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_resource_preview.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 "editor_resource_preview.h"
@@ -41,7 +41,7 @@
#include "editor/editor_settings.h"
bool EditorResourcePreviewGenerator::handles(const String &p_type) const {
- bool success;
+ bool success = false;
if (GDVIRTUAL_CALL(_handles, p_type, success)) {
return success;
}
@@ -70,21 +70,15 @@ Ref<Texture2D> EditorResourcePreviewGenerator::generate_from_path(const String &
}
bool EditorResourcePreviewGenerator::generate_small_preview_automatically() const {
- bool success;
- if (GDVIRTUAL_CALL(_generate_small_preview_automatically, success)) {
- return success;
- }
-
- return false;
+ bool success = false;
+ GDVIRTUAL_CALL(_generate_small_preview_automatically, success);
+ return success;
}
bool EditorResourcePreviewGenerator::can_generate_small_preview() const {
- bool success;
- if (GDVIRTUAL_CALL(_can_generate_small_preview, success)) {
- return success;
- }
-
- return false;
+ bool success = false;
+ GDVIRTUAL_CALL(_can_generate_small_preview, success);
+ return success;
}
void EditorResourcePreviewGenerator::_bind_methods() {
@@ -148,7 +142,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
return; //could not guess type
}
- int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
+ int thumbnail_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
thumbnail_size *= EDSCALE;
r_texture = Ref<ImageTexture>();
@@ -232,7 +226,7 @@ void EditorResourcePreview::_iterate() {
Ref<ImageTexture> texture;
Ref<ImageTexture> small_texture;
- int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
+ int thumbnail_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
thumbnail_size *= EDSCALE;
if (item.resource.is_valid()) {
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h
index 0413477d88..aae7c5b164 100644
--- a/editor/editor_resource_preview.h
+++ b/editor/editor_resource_preview.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_resource_preview.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_resource_preview.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 EDITOR_RESOURCE_PREVIEW_H
#define EDITOR_RESOURCE_PREVIEW_H
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index b909129b18..4bcd91376a 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* editor_run.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_run.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 "editor_run.h"
#include "core/config/project_settings.h"
+#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "main/main.h"
@@ -57,13 +58,16 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) {
args.push_back(resource_path.replace(" ", "%20"));
}
- args.push_back("--remote-debug");
- args.push_back(EditorDebuggerNode::get_singleton()->get_server_uri());
+ const String debug_uri = EditorDebuggerNode::get_singleton()->get_server_uri();
+ if (debug_uri.size()) {
+ args.push_back("--remote-debug");
+ args.push_back(debug_uri);
+ }
args.push_back("--editor-pid");
args.push_back(itos(OS::get_singleton()->get_process_id()));
- bool debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisons", false);
+ bool debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisions", false);
bool debug_paths = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_paths", false);
bool debug_navigation = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_navigation", false);
if (debug_collisions) {
@@ -88,47 +92,41 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) {
}
}
- int screen = EditorSettings::get_singleton()->get("run/window_placement/screen");
- if (screen == 0) {
+ int screen = EDITOR_GET("run/window_placement/screen");
+ if (screen == -5) {
// Same as editor
screen = DisplayServer::get_singleton()->window_get_current_screen();
- } else if (screen == 1) {
+ } else if (screen == -4) {
// Previous monitor (wrap to the other end if needed)
screen = Math::wrapi(
DisplayServer::get_singleton()->window_get_current_screen() - 1,
0,
DisplayServer::get_singleton()->get_screen_count());
- } else if (screen == 2) {
+ } else if (screen == -3) {
// Next monitor (wrap to the other end if needed)
screen = Math::wrapi(
DisplayServer::get_singleton()->window_get_current_screen() + 1,
0,
DisplayServer::get_singleton()->get_screen_count());
- } else {
- // Fixed monitor ID
- // There are 3 special options, so decrement the option ID by 3 to get the monitor ID
- screen -= 3;
}
- Rect2 screen_rect;
- screen_rect.position = DisplayServer::get_singleton()->screen_get_position(screen);
- screen_rect.size = DisplayServer::get_singleton()->screen_get_size(screen);
+ Rect2 screen_rect = DisplayServer::get_singleton()->screen_get_usable_rect(screen);
- int window_placement = EditorSettings::get_singleton()->get("run/window_placement/rect");
+ int window_placement = EDITOR_GET("run/window_placement/rect");
if (screen_rect != Rect2()) {
Size2 window_size;
- window_size.x = ProjectSettings::get_singleton()->get("display/window/size/viewport_width");
- window_size.y = ProjectSettings::get_singleton()->get("display/window/size/viewport_height");
+ window_size.x = GLOBAL_GET("display/window/size/viewport_width");
+ window_size.y = GLOBAL_GET("display/window/size/viewport_height");
Size2 desired_size;
- desired_size.x = ProjectSettings::get_singleton()->get("display/window/size/window_width_override");
- desired_size.y = ProjectSettings::get_singleton()->get("display/window/size/window_height_override");
+ desired_size.x = GLOBAL_GET("display/window/size/window_width_override");
+ desired_size.y = GLOBAL_GET("display/window/size/window_height_override");
if (desired_size.x > 0 && desired_size.y > 0) {
window_size = desired_size;
}
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_HIDPI)) {
- bool hidpi_proj = ProjectSettings::get_singleton()->get("display/window/dpi/allow_hidpi");
+ bool hidpi_proj = GLOBAL_GET("display/window/dpi/allow_hidpi");
int display_scale = 1;
if (OS::get_singleton()->is_hidpi_allowed()) {
@@ -159,19 +157,19 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) {
args.push_back(itos(pos.x) + "," + itos(pos.y));
} break;
case 2: { // custom pos
- Vector2 pos = EditorSettings::get_singleton()->get("run/window_placement/rect_custom_position");
+ Vector2 pos = EDITOR_GET("run/window_placement/rect_custom_position");
pos += screen_rect.position;
args.push_back("--position");
args.push_back(itos(pos.x) + "," + itos(pos.y));
} break;
case 3: { // force maximized
- Vector2 pos = screen_rect.position;
+ Vector2 pos = screen_rect.position + screen_rect.size / 2;
args.push_back("--position");
args.push_back(itos(pos.x) + "," + itos(pos.y));
args.push_back("--maximized");
} break;
case 4: { // force fullscreen
- Vector2 pos = screen_rect.position;
+ Vector2 pos = screen_rect.position + screen_rect.size / 2;
args.push_back("--position");
args.push_back(itos(pos.x) + "," + itos(pos.y));
args.push_back("--fullscreen");
@@ -215,7 +213,7 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) {
String exec = OS::get_singleton()->get_executable_path();
- const String raw_custom_args = ProjectSettings::get_singleton()->get("editor/run/main_run_args");
+ const String raw_custom_args = GLOBAL_GET("editor/run/main_run_args");
if (!raw_custom_args.is_empty()) {
// Allow the user to specify a command to run, similar to Steam's launch options.
// In this case, Godot will no longer be run directly; it's up to the underlying command
@@ -260,7 +258,7 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) {
// Pass the debugger stop shortcut to the running instance(s).
String shortcut;
- VariantWriter::write_to_string(ED_GET_SHORTCUT("editor/stop"), shortcut);
+ VariantWriter::write_to_string(ED_GET_SHORTCUT("editor/stop_running_project"), shortcut);
OS::get_singleton()->set_environment("__GODOT_EDITOR_STOP_SHORTCUT__", shortcut);
printf("Running: %s", exec.utf8().get_data());
diff --git a/editor/editor_run.h b/editor/editor_run.h
index 4cbc6838e4..68c8742f79 100644
--- a/editor/editor_run.h
+++ b/editor/editor_run.h
@@ -1,38 +1,38 @@
-/*************************************************************************/
-/* editor_run.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_run.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 EDITOR_RUN_H
#define EDITOR_RUN_H
#include "core/os/os.h"
-#include "scene/main/node.h"
+
class EditorRun {
public:
enum Status {
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index 3e8f17085d..0628dc7116 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_run_native.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_run_native.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 "editor_run_native.h"
@@ -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++) {
@@ -134,7 +113,7 @@ Error EditorRunNative::run_native(int p_idx, int p_platform) {
bool deploy_debug_remote = is_deploy_debug_remote_enabled();
bool deploy_dumb = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_file_server", false);
- bool debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisons", false);
+ bool debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisions", false);
bool debug_navigation = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_navigation", false);
if (deploy_debug_remote) {
@@ -144,23 +123,25 @@ Error EditorRunNative::run_native(int p_idx, int p_platform) {
flags |= EditorExportPlatform::DEBUG_FLAG_DUMB_CLIENT;
}
if (debug_collisions) {
- flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_COLLISONS;
+ flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_COLLISIONS;
}
if (debug_navigation) {
flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_NAVIGATION;
}
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 66d9b0402a..2a5431e54b 100644
--- a/editor/editor_run_native.h
+++ b/editor/editor_run_native.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_run_native.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_run_native.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 EDITOR_RUN_NATIVE_H
#define 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_run_script.cpp b/editor/editor_run_script.cpp
index 2197bc8eb7..c87947d96b 100644
--- a/editor/editor_run_script.cpp
+++ b/editor/editor_run_script.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_run_script.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_run_script.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 "editor_run_script.h"
diff --git a/editor/editor_run_script.h b/editor/editor_run_script.h
index a2399bd780..ea2fb1fd77 100644
--- a/editor/editor_run_script.h
+++ b/editor/editor_run_script.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_run_script.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_run_script.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 EDITOR_RUN_SCRIPT_H
#define EDITOR_RUN_SCRIPT_H
diff --git a/editor/editor_scale.cpp b/editor/editor_scale.cpp
index 29c1f6278b..45ea9a4d5b 100644
--- a/editor/editor_scale.cpp
+++ b/editor/editor_scale.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_scale.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_scale.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 "editor_scale.h"
diff --git a/editor/editor_scale.h b/editor/editor_scale.h
index 02e9b997f6..0183625610 100644
--- a/editor/editor_scale.h
+++ b/editor/editor_scale.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_scale.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_scale.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 EDITOR_SCALE_H
#define EDITOR_SCALE_H
diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp
index e078bea037..3988d356b3 100644
--- a/editor/editor_sectioned_inspector.cpp
+++ b/editor/editor_sectioned_inspector.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_sectioned_inspector.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_sectioned_inspector.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 "editor_sectioned_inspector.h"
@@ -151,7 +151,9 @@ void SectionedInspector::_section_selected() {
void SectionedInspector::set_current_section(const String &p_section) {
if (section_map.has(p_section)) {
- section_map[p_section]->select(0);
+ TreeItem *item = section_map[p_section];
+ item->select(0);
+ sections->scroll_to_item(item);
}
}
@@ -226,9 +228,9 @@ void SectionedInspector::update_category_list() {
TreeItem *root = sections->create_item();
section_map[""] = root;
- String filter;
+ String filter_text;
if (search_box) {
- filter = search_box->get_text();
+ filter_text = search_box->get_text();
}
const EditorPropertyNameProcessor::Style name_style = EditorPropertyNameProcessor::get_settings_style();
@@ -245,7 +247,7 @@ void SectionedInspector::update_category_list() {
continue;
}
- if (!filter.is_empty() && !_property_path_matches(pi.name, filter, name_style)) {
+ if (!filter_text.is_empty() && !_property_path_matches(pi.name, filter_text, name_style)) {
continue;
}
@@ -310,7 +312,9 @@ void SectionedInspector::_search_changed(const String &p_what) {
void SectionedInspector::_notification(int p_what) {
switch (p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- inspector->set_property_name_style(EditorPropertyNameProcessor::get_settings_style());
+ if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/localize_settings")) {
+ inspector->set_property_name_style(EditorPropertyNameProcessor::get_settings_style());
+ }
} break;
}
}
diff --git a/editor/editor_sectioned_inspector.h b/editor/editor_sectioned_inspector.h
index 758efae31e..0594ef486f 100644
--- a/editor/editor_sectioned_inspector.h
+++ b/editor/editor_sectioned_inspector.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_sectioned_inspector.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_sectioned_inspector.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 EDITOR_SECTIONED_INSPECTOR_H
#define EDITOR_SECTIONED_INSPECTOR_H
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 74445e6caa..8ca98e6f76 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_settings.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_settings.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 "editor_settings.h"
@@ -76,14 +76,14 @@ bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value)
Array arr = p_value;
for (int i = 0; i < arr.size(); i++) {
Dictionary dict = arr[i];
- String name = dict["name"];
+ String shortcut_name = dict["name"];
Array shortcut_events = dict["shortcuts"];
Ref<Shortcut> sc;
sc.instantiate();
sc->set_events(shortcut_events);
- add_shortcut(name, sc);
+ add_shortcut(shortcut_name, sc);
}
return false;
@@ -92,16 +92,16 @@ bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value)
for (int i = 0; i < actions_arr.size(); i++) {
Dictionary action_dict = actions_arr[i];
- String name = action_dict["name"];
+ String action_name = action_dict["name"];
Array events = action_dict["events"];
InputMap *im = InputMap::get_singleton();
- im->action_erase_events(name);
+ im->action_erase_events(action_name);
- builtin_action_overrides[name].clear();
+ builtin_action_overrides[action_name].clear();
for (int ev_idx = 0; ev_idx < events.size(); ev_idx++) {
- im->action_add_event(name, events[ev_idx]);
- builtin_action_overrides[name].push_back(events[ev_idx]);
+ im->action_add_event(action_name, events[ev_idx]);
+ builtin_action_overrides[action_name].push_back(events[ev_idx]);
}
}
return false;
@@ -159,7 +159,7 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
if (!sc->has_meta("original")) {
// Getting the meta when it doesn't exist will return an empty array. If the 'shortcut_events' have been cleared,
- // we still want save the shortcut in this case so that shortcuts that the user has customised are not reset,
+ // we still want save the shortcut in this case so that shortcuts that the user has customized are not reset,
// even if the 'original' has not been populated yet. This can happen when calling save() from the Project Manager.
save_array.push_back(dict);
continue;
@@ -412,16 +412,16 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/editor/custom_display_scale", 1.0, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/editor/main_font_size", 14, "8,48,1")
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/editor/code_font_size", 14, "8,48,1")
- EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/code_font_contextual_ligatures", 0, "Default,Disable Contextual Alternates (Coding Ligatures),Use Custom OpenType Feature Set")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/code_font_contextual_ligatures", 1, "Enabled,Disable Contextual Alternates (Coding Ligatures),Use Custom OpenType Feature Set")
_initial_set("interface/editor/code_font_custom_opentype_features", "");
_initial_set("interface/editor/code_font_custom_variations", "");
- EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_antialiasing", 1, "None,Grayscale,LCD sub-pixel")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_antialiasing", 1, "None,Grayscale,LCD Subpixel")
#ifdef MACOS_ENABLED
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (None),None,Light,Normal")
#else
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (Light),None,Light,Normal")
#endif
- EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_subpixel_positioning", 1, "Disabled,Auto,One half of a pixel,One quarter of a pixel")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_subpixel_positioning", 1, "Disabled,Auto,One Half of a Pixel,One Quarter of a Pixel")
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/editor/main_font", "", "*.ttf,*.otf,*.woff,*.woff2,*.pfb,*.pfm")
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/editor/main_font_bold", "", "*.ttf,*.otf,*.woff,*.woff2,*.pfb,*.pfm")
@@ -438,6 +438,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
EDITOR_SETTING_USAGE(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/single_window_mode", false, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
_initial_set("interface/editor/mouse_extra_buttons_navigate_history", true);
_initial_set("interface/editor/save_each_scene_on_quit", true); // Regression
+ EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/accept_dialog_cancel_ok_buttons", 0,
+ vformat("Auto (%s),Cancel First,OK First", DisplayServer::get_singleton()->get_swap_cancel_ok() ? "OK First" : "Cancel First"),
+ PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
#ifdef DEV_ENABLED
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/show_internal_errors_in_toast_notifications", 0, "Auto (Enabled),Enabled,Disabled")
#else
@@ -449,11 +452,12 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/inspector/show_low_level_opentype_features", false, "")
// Theme
- EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "interface/theme/preset", "Default", "Default,Breeze Dark,Godot 2,Gray,Light,Solarized (Dark),Solarized (Light),Custom")
+ 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::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), "")
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/contrast", 0.3, "-1,1,0.01")
+ EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/theme/draw_extra_borders", false, "")
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/icon_saturation", 1.0, "0,2,0.01")
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/relationship_line_opacity", 0.1, "0.00,1,0.01")
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/theme/border_size", 0, "0,2,1")
@@ -693,12 +697,13 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Window placement
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/window_placement/rect", 1, "Top Left,Centered,Custom Position,Force Maximized,Force Fullscreen")
- String screen_hints = "Same as Editor,Previous Monitor,Next Monitor";
+ // Keep the enum values in sync with the `DisplayServer::SCREEN_` enum.
+ String screen_hints = "Same as Editor:-5,Previous Monitor:-4,Next Monitor:-3,Primary Monitor:-2"; // Note: Main Window Screen:-1 is not used for the main window.
for (int i = 0; i < DisplayServer::get_singleton()->get_screen_count(); i++) {
- screen_hints += ",Monitor " + itos(i + 1);
+ screen_hints += ",Monitor " + itos(i + 1) + ":" + itos(i);
}
_initial_set("run/window_placement/rect_custom_position", Vector2());
- EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/window_placement/screen", 0, screen_hints)
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/window_placement/screen", -5, screen_hints)
// Auto save
_initial_set("run/auto_save/save_before_running", true);
@@ -730,13 +735,14 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects.
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Last Edited,Name,Path")
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_NONE, "project_manager/default_renderer", "forward_plus", "forward_plus,mobile,gl_compatibility")
if (p_extra_config.is_valid()) {
if (p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) {
Vector<String> list = p_extra_config->get_value("init_projects", "list");
for (int i = 0; i < list.size(); i++) {
- String name = list[i].replace("/", "::");
- set("projects/" + name, list[i]);
+ String proj_name = list[i].replace("/", "::");
+ set("projects/" + proj_name, list[i]);
}
}
@@ -774,7 +780,7 @@ void EditorSettings::_load_godot2_text_editor_theme() {
_initial_set("text_editor/theme/highlighting/safe_line_number_color", Color(0.67, 0.78, 0.67, 0.6));
_initial_set("text_editor/theme/highlighting/caret_color", Color(0.67, 0.67, 0.67));
_initial_set("text_editor/theme/highlighting/caret_background_color", Color(0, 0, 0));
- _initial_set("text_editor/theme/highlighting/text_selected_color", Color(0, 0, 0));
+ _initial_set("text_editor/theme/highlighting/text_selected_color", Color(0, 0, 0, 0));
_initial_set("text_editor/theme/highlighting/selection_color", Color(0.41, 0.61, 0.91, 0.35));
_initial_set("text_editor/theme/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2));
_initial_set("text_editor/theme/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15));
@@ -1057,7 +1063,7 @@ Variant _EDITOR_DEF(const String &p_setting, const Variant &p_default, bool p_re
Variant ret = p_default;
if (EditorSettings::get_singleton()->has_setting(p_setting)) {
- ret = EditorSettings::get_singleton()->get(p_setting);
+ ret = EDITOR_GET(p_setting);
} else {
EditorSettings::get_singleton()->set_manually(p_setting, p_default);
EditorSettings::get_singleton()->set_restart_if_changed(p_setting, p_restart_if_changed);
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 4dcf3a9cad..e8775636a3 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_settings.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_settings.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 EDITOR_SETTINGS_H
#define EDITOR_SETTINGS_H
diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp
index ec67cde112..ad614b1769 100644
--- a/editor/editor_settings_dialog.cpp
+++ b/editor/editor_settings_dialog.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_settings_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_settings_dialog.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 "editor_settings_dialog.h"
@@ -41,6 +41,8 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
+#include "editor/event_listener_line_edit.h"
+#include "editor/input_event_configuration_dialog.h"
#include "scene/gui/margin_container.h"
void EditorSettingsDialog::ok_pressed() {
@@ -59,7 +61,7 @@ void EditorSettingsDialog::_settings_changed() {
void EditorSettingsDialog::_settings_property_edited(const String &p_name) {
String full_name = inspector->get_full_item_path(p_name);
- if (full_name == "interface/theme/accent_color" || full_name == "interface/theme/base_color" || full_name == "interface/theme/contrast") {
+ if (full_name == "interface/theme/accent_color" || full_name == "interface/theme/base_color" || full_name == "interface/theme/contrast" || full_name == "interface/theme/draw_extra_borders") {
EditorSettings::get_singleton()->set_manually("interface/theme/preset", "Custom"); // set preset to Custom
} else if (full_name.begins_with("text_editor/theme/highlighting")) {
EditorSettings::get_singleton()->set_manually("text_editor/theme/color_theme", "Custom");
@@ -106,11 +108,16 @@ void EditorSettingsDialog::popup_edit_settings() {
_focus_current_search_box();
}
-void EditorSettingsDialog::_filter_shortcuts(const String &p_filter) {
- shortcut_filter = p_filter;
+void EditorSettingsDialog::_filter_shortcuts(const String &) {
_update_shortcuts();
}
+void EditorSettingsDialog::_filter_shortcuts_by_event(const Ref<InputEvent> &p_event) {
+ if (p_event.is_null() || (p_event->is_pressed() && !p_event->is_echo())) {
+ _update_shortcuts();
+ }
+}
+
void EditorSettingsDialog::_undo_redo_callback(void *p_self, const String &p_name) {
EditorNode::get_log()->add_message(p_name, EditorLog::MSG_TYPE_EDITOR);
}
@@ -125,6 +132,7 @@ void EditorSettingsDialog::_notification(int p_what) {
} break;
case NOTIFICATION_READY: {
+ 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);
@@ -144,16 +152,18 @@ void EditorSettingsDialog::_notification(int p_what) {
_update_shortcuts();
}
- inspector->update_category_list();
+ if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/localize_settings")) {
+ inspector->update_category_list();
+ }
} break;
}
}
void EditorSettingsDialog::shortcut_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
const Ref<InputEventKey> k = p_event;
-
if (k.is_valid() && k->is_pressed()) {
bool handled = false;
@@ -222,6 +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);
+ 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");
@@ -237,6 +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);
+ 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());
@@ -326,6 +338,22 @@ void EditorSettingsDialog::_create_shortcut_treeitem(TreeItem *p_parent, const S
}
}
+bool EditorSettingsDialog::_should_display_shortcut(const String &p_name, const Array &p_events) const {
+ const Ref<InputEvent> search_ev = shortcut_search_by_event->get_event();
+ bool event_match = true;
+ if (search_ev.is_valid()) {
+ event_match = false;
+ for (int i = 0; i < p_events.size(); ++i) {
+ const Ref<InputEvent> ev = p_events[i];
+ if (ev.is_valid() && ev->is_match(search_ev, true)) {
+ event_match = true;
+ }
+ }
+ }
+
+ return event_match && shortcut_search_box->get_text().is_subsequence_ofn(p_name);
+}
+
void EditorSettingsDialog::_update_shortcuts() {
// Before clearing the tree, take note of which categories are collapsed so that this state can be maintained when the tree is repopulated.
HashMap<String, bool> collapsed;
@@ -379,32 +407,17 @@ void EditorSettingsDialog::_update_shortcuts() {
const String &action_name = E.key;
const InputMap::Action &action = E.value;
- Array events; // Need to get the list of events into an array so it can be set as metadata on the item.
- Vector<String> event_strings;
-
// Skip non-builtin actions.
if (!InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().has(action_name)) {
continue;
}
const List<Ref<InputEvent>> &all_default_events = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(action_name)->value;
- List<Ref<InputEventKey>> key_default_events;
- // Remove all non-key events from the defaults. Only check keys, since we are in the editor.
- for (const List<Ref<InputEvent>>::Element *I = all_default_events.front(); I; I = I->next()) {
- Ref<InputEventKey> k = I->get();
- if (k.is_valid()) {
- key_default_events.push_back(k);
- }
- }
-
- // Join the text of the events with a delimiter so they can all be displayed in one cell.
- String events_display_string = event_strings.is_empty() ? "None" : String("; ").join(event_strings);
-
- if (!shortcut_filter.is_subsequence_ofn(action_name) && (events_display_string == "None" || !shortcut_filter.is_subsequence_ofn(events_display_string))) {
+ Array action_events = _event_list_to_array_helper(action.inputs);
+ if (!_should_display_shortcut(action_name, action_events)) {
continue;
}
- Array action_events = _event_list_to_array_helper(action.inputs);
Array default_events = _event_list_to_array_helper(all_default_events);
bool same_as_defaults = Shortcut::is_event_array_equal(default_events, action_events);
bool collapse = !collapsed.has(action_name) || (collapsed.has(action_name) && collapsed[action_name]);
@@ -416,46 +429,50 @@ void EditorSettingsDialog::_update_shortcuts() {
List<String> slist;
EditorSettings::get_singleton()->get_shortcut_list(&slist);
+ slist.sort(); // Sort alphabetically.
const EditorPropertyNameProcessor::Style name_style = EditorPropertyNameProcessor::get_settings_style();
const EditorPropertyNameProcessor::Style tooltip_style = EditorPropertyNameProcessor::get_tooltip_style(name_style);
+ // Create all sections first.
for (const String &E : slist) {
Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(E);
- if (!sc->has_meta("original")) {
+ String section_name = E.get_slice("/", 0);
+
+ if (sections.has(section_name)) {
continue;
}
- // Shortcut Section
+ TreeItem *section = shortcuts->create_item(root);
- TreeItem *section;
- String section_name = E.get_slice("/", 0);
+ const String item_name = EditorPropertyNameProcessor::get_singleton()->process_name(section_name, name_style);
+ const String tooltip = EditorPropertyNameProcessor::get_singleton()->process_name(section_name, tooltip_style);
- if (sections.has(section_name)) {
- section = sections[section_name];
- } else {
- section = shortcuts->create_item(root);
-
- const String item_name = EditorPropertyNameProcessor::get_singleton()->process_name(section_name, name_style);
- const String tooltip = EditorPropertyNameProcessor::get_singleton()->process_name(section_name, tooltip_style);
-
- section->set_text(0, item_name);
- section->set_tooltip_text(0, tooltip);
- section->set_selectable(0, false);
- section->set_selectable(1, false);
- section->set_custom_bg_color(0, shortcuts->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
- section->set_custom_bg_color(1, shortcuts->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
-
- if (collapsed.has(item_name)) {
- section->set_collapsed(collapsed[item_name]);
- }
+ section->set_text(0, item_name);
+ section->set_tooltip_text(0, tooltip);
+ section->set_selectable(0, false);
+ section->set_selectable(1, false);
+ section->set_custom_bg_color(0, shortcuts->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
+ section->set_custom_bg_color(1, shortcuts->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
- sections[section_name] = section;
+ if (collapsed.has(item_name)) {
+ section->set_collapsed(collapsed[item_name]);
}
- // Shortcut Item
+ sections[section_name] = section;
+ }
- if (!shortcut_filter.is_subsequence_ofn(sc->get_name())) {
+ // Add shortcuts to sections.
+ for (const String &E : slist) {
+ Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(E);
+ if (!sc->has_meta("original")) {
+ continue;
+ }
+
+ String section_name = E.get_slice("/", 0);
+ TreeItem *section = sections[section_name];
+
+ if (!_should_display_shortcut(sc->get_name(), sc->get_events())) {
continue;
}
@@ -472,6 +489,7 @@ void EditorSettingsDialog::_update_shortcuts() {
TreeItem *section = E.value;
if (section->get_first_child() == nullptr) {
root->remove_child(section);
+ memdelete(section);
}
}
}
@@ -552,6 +570,10 @@ void EditorSettingsDialog::_shortcut_cell_double_clicked() {
const ShortcutButton edit_btn_id = EditorSettingsDialog::SHORTCUT_EDIT;
const int edit_btn_col = 1;
TreeItem *ti = shortcuts->get_selected();
+ if (ti == nullptr) {
+ return;
+ }
+
String type = ti->get_meta("type");
int col = shortcuts->get_selected_column();
if (type == "shortcut" && col == 0) {
@@ -672,17 +694,11 @@ 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() {
set_title(TTR("Editor Settings"));
- undo_redo = EditorNode::get_undo_redo();
-
tabs = memnew(TabContainer);
tabs->set_theme_type_variation("TabContainerOdd");
tabs->connect("tab_changed", callable_mp(this, &EditorSettingsDialog::_tabs_tab_changed));
@@ -707,7 +723,6 @@ EditorSettingsDialog::EditorSettingsDialog() {
inspector->get_inspector()->set_use_filter(true);
inspector->register_search_box(search_box);
inspector->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- inspector->get_inspector()->set_undo_redo(undo_redo);
tab_general->add_child(inspector);
inspector->get_inspector()->connect("property_edited", callable_mp(this, &EditorSettingsDialog::_settings_property_edited));
inspector->get_inspector()->connect("restart_requested", callable_mp(this, &EditorSettingsDialog::_editor_restart_request));
@@ -740,12 +755,29 @@ EditorSettingsDialog::EditorSettingsDialog() {
tabs->add_child(tab_shortcuts);
tab_shortcuts->set_name(TTR("Shortcuts"));
+ HBoxContainer *top_hbox = memnew(HBoxContainer);
+ top_hbox->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ tab_shortcuts->add_child(top_hbox);
+
shortcut_search_box = memnew(LineEdit);
- shortcut_search_box->set_placeholder(TTR("Filter Shortcuts"));
+ shortcut_search_box->set_placeholder(TTR("Filter by name..."));
shortcut_search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- tab_shortcuts->add_child(shortcut_search_box);
+ top_hbox->add_child(shortcut_search_box);
shortcut_search_box->connect("text_changed", callable_mp(this, &EditorSettingsDialog::_filter_shortcuts));
+ shortcut_search_by_event = memnew(EventListenerLineEdit);
+ shortcut_search_by_event->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ shortcut_search_by_event->set_stretch_ratio(0.75);
+ shortcut_search_by_event->set_allowed_input_types(INPUT_KEY);
+ shortcut_search_by_event->connect("event_changed", callable_mp(this, &EditorSettingsDialog::_filter_shortcuts_by_event));
+ top_hbox->add_child(shortcut_search_by_event);
+
+ Button *clear_all_search = memnew(Button);
+ clear_all_search->set_text(TTR("Clear All"));
+ clear_all_search->connect("pressed", callable_mp(shortcut_search_box, &LineEdit::clear));
+ clear_all_search->connect("pressed", callable_mp(shortcut_search_by_event, &EventListenerLineEdit::clear_event));
+ top_hbox->add_child(clear_all_search);
+
shortcuts = memnew(Tree);
shortcuts->set_v_size_flags(Control::SIZE_EXPAND_FILL);
shortcuts->set_columns(2);
@@ -757,12 +789,12 @@ 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);
shortcut_editor->connect("confirmed", callable_mp(this, &EditorSettingsDialog::_event_config_confirmed));
- shortcut_editor->set_allowed_input_types(InputEventConfigurationDialog::InputType::INPUT_KEY);
+ shortcut_editor->set_allowed_input_types(INPUT_KEY);
add_child(shortcut_editor);
set_hide_on_ok(true);
diff --git a/editor/editor_settings_dialog.h b/editor/editor_settings_dialog.h
index 87ed6a77eb..fdfc0a43ec 100644
--- a/editor/editor_settings_dialog.h
+++ b/editor/editor_settings_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_settings_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_settings_dialog.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 EDITOR_SETTINGS_DIALOG_H
#define EDITOR_SETTINGS_DIALOG_H
@@ -40,8 +40,6 @@
#include "scene/gui/tab_container.h"
#include "scene/gui/texture_rect.h"
-class EditorUndoRedoManager;
-
class EditorSettingsDialog : public AcceptDialog {
GDCLASS(EditorSettingsDialog, AcceptDialog);
@@ -53,6 +51,7 @@ class EditorSettingsDialog : public AcceptDialog {
LineEdit *search_box = nullptr;
LineEdit *shortcut_search_box = nullptr;
+ EventListenerLineEdit *shortcut_search_by_event = nullptr;
SectionedInspector *inspector = nullptr;
// Shortcuts
@@ -64,7 +63,6 @@ class EditorSettingsDialog : public AcceptDialog {
};
Tree *shortcuts = nullptr;
- String shortcut_filter;
InputEventConfigurationDialog *shortcut_editor = nullptr;
@@ -75,8 +73,6 @@ class EditorSettingsDialog : public AcceptDialog {
Timer *timer = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
-
virtual void cancel_pressed() override;
virtual void ok_pressed() override;
@@ -103,13 +99,13 @@ class EditorSettingsDialog : public AcceptDialog {
void _focus_current_search_box();
void _filter_shortcuts(const String &p_filter);
+ void _filter_shortcuts_by_event(const Ref<InputEvent> &p_event);
+ bool _should_display_shortcut(const String &p_name, const Array &p_events) const;
void _update_shortcuts();
void _shortcut_button_pressed(Object *p_item, int p_column, int p_idx, MouseButton p_button = MouseButton::LEFT);
void _shortcut_cell_double_clicked();
- void _builtin_action_popup_index_pressed(int p_index);
-
static void _undo_redo_callback(void *p_self, const String &p_name);
Label *restart_label = nullptr;
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 4cd046e811..177266e366 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_spin_slider.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_spin_slider.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 "editor_spin_slider.h"
@@ -76,6 +76,7 @@ void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
pre_grab_value = get_value();
grabbing_spinner = false;
grabbing_spinner_mouse_pos = get_global_mouse_position();
+ emit_signal("grabbed");
}
} else {
if (grabbing_spinner_attempt) {
@@ -83,6 +84,7 @@ void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
Input::get_singleton()->warp_mouse(grabbing_spinner_mouse_pos);
queue_redraw();
+ emit_signal("ungrabbed");
} else {
_focus_entered();
}
@@ -143,7 +145,7 @@ void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
}
Ref<InputEventKey> k = p_event;
- if (k.is_valid() && k->is_pressed() && k->is_action("ui_accept")) {
+ if (k.is_valid() && k->is_pressed() && k->is_action("ui_accept", true)) {
_focus_entered();
}
}
@@ -178,9 +180,11 @@ void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) {
grabbing_ratio = get_as_ratio();
grabbing_from = grabber->get_transform().xform(mb->get_position()).x;
}
+ emit_signal("grabbed");
} else {
grabbing_grabber = false;
mousewheel_over_grabber = false;
+ emit_signal("ungrabbed");
}
}
@@ -249,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;
}
@@ -299,10 +309,6 @@ void EditorSpinSlider::_draw_spin_slider() {
Ref<Texture2D> updown = get_theme_icon(is_read_only() ? SNAME("updown_disabled") : SNAME("updown"), SNAME("SpinBox"));
- if (get_step() == 1) {
- number_width -= updown->get_width();
- }
-
String numstr = get_text_value();
int vofs = (size.height - font->get_height(font_size)) / 2 + font->get_ascent(font_size);
@@ -359,76 +365,79 @@ void EditorSpinSlider::_draw_spin_slider() {
}
TS->free_rid(num_rid);
- if (get_step() == 1) {
- Ref<Texture2D> updown2 = get_theme_icon(is_read_only() ? SNAME("updown_disabled") : SNAME("updown"), SNAME("SpinBox"));
- int updown_vofs = (size.height - updown2->get_height()) / 2;
- if (rtl) {
- updown_offset = sb->get_margin(SIDE_LEFT);
- } else {
- updown_offset = size.width - sb->get_margin(SIDE_RIGHT) - updown2->get_width();
- }
- Color c(1, 1, 1);
- if (hover_updown) {
- c *= Color(1.2, 1.2, 1.2);
- }
- draw_texture(updown2, Vector2(updown_offset, updown_vofs), c);
- if (grabber->is_visible()) {
- grabber->hide();
- }
- } else if (!hide_slider) {
- const int grabber_w = 4 * EDSCALE;
- const int width = size.width - sb->get_minimum_size().width - grabber_w;
- const int ofs = sb->get_offset().x;
- const int svofs = (size.height + vofs) / 2 - 1;
- Color c = fc;
-
- // Draw the horizontal slider's background.
- c.a = 0.2;
- draw_rect(Rect2(ofs, svofs + 1, width, 2 * EDSCALE), c);
-
- // Draw the horizontal slider's filled part on the left.
- const int gofs = get_as_ratio() * width;
- c.a = 0.45;
- draw_rect(Rect2(ofs, svofs + 1, gofs, 2 * EDSCALE), c);
-
- // Draw the horizontal slider's grabber.
- c.a = 0.9;
- const Rect2 grabber_rect = Rect2(ofs + gofs, svofs, grabber_w, 4 * EDSCALE);
- draw_rect(grabber_rect, c);
-
- grabbing_spinner_mouse_pos = get_global_position() + grabber_rect.get_center();
-
- bool display_grabber = (mouse_over_spin || mouse_over_grabber) && !grabbing_spinner && !(value_input_popup && value_input_popup->is_visible());
- if (grabber->is_visible() != display_grabber) {
- if (display_grabber) {
- grabber->show();
+ if (!hide_slider) {
+ if (get_step() == 1) {
+ number_width -= updown->get_width();
+ Ref<Texture2D> updown2 = get_theme_icon(is_read_only() ? SNAME("updown_disabled") : SNAME("updown"), SNAME("SpinBox"));
+ int updown_vofs = (size.height - updown2->get_height()) / 2;
+ if (rtl) {
+ updown_offset = sb->get_margin(SIDE_LEFT);
} else {
+ updown_offset = size.width - sb->get_margin(SIDE_RIGHT) - updown2->get_width();
+ }
+ Color c(1, 1, 1);
+ if (hover_updown) {
+ c *= Color(1.2, 1.2, 1.2);
+ }
+ draw_texture(updown2, Vector2(updown_offset, updown_vofs), c);
+ if (grabber->is_visible()) {
grabber->hide();
}
- }
-
- if (display_grabber) {
- Ref<Texture2D> grabber_tex;
- if (mouse_over_grabber) {
- grabber_tex = get_theme_icon(SNAME("grabber_highlight"), SNAME("HSlider"));
- } else {
- grabber_tex = get_theme_icon(SNAME("grabber"), SNAME("HSlider"));
+ } else {
+ const int grabber_w = 4 * EDSCALE;
+ const int width = size.width - sb->get_minimum_size().width - grabber_w;
+ const int ofs = sb->get_offset().x;
+ const int svofs = (size.height + vofs) / 2 - 1;
+ Color c = fc;
+
+ // Draw the horizontal slider's background.
+ c.a = 0.2;
+ draw_rect(Rect2(ofs, svofs + 1, width, 2 * EDSCALE), c);
+
+ // Draw the horizontal slider's filled part on the left.
+ const int gofs = get_as_ratio() * width;
+ c.a = 0.45;
+ draw_rect(Rect2(ofs, svofs + 1, gofs, 2 * EDSCALE), c);
+
+ // Draw the horizontal slider's grabber.
+ c.a = 0.9;
+ const Rect2 grabber_rect = Rect2(ofs + gofs, svofs, grabber_w, 4 * EDSCALE);
+ draw_rect(grabber_rect, c);
+
+ grabbing_spinner_mouse_pos = get_global_position() + grabber_rect.get_center();
+
+ bool display_grabber = (grabbing_grabber || mouse_over_spin || mouse_over_grabber) && !grabbing_spinner && !(value_input_popup && value_input_popup->is_visible());
+ if (grabber->is_visible() != display_grabber) {
+ if (display_grabber) {
+ grabber->show();
+ } else {
+ grabber->hide();
+ }
}
- if (grabber->get_texture() != grabber_tex) {
- grabber->set_texture(grabber_tex);
- }
+ if (display_grabber) {
+ Ref<Texture2D> grabber_tex;
+ if (mouse_over_grabber) {
+ grabber_tex = get_theme_icon(SNAME("grabber_highlight"), SNAME("HSlider"));
+ } else {
+ grabber_tex = get_theme_icon(SNAME("grabber"), SNAME("HSlider"));
+ }
- Vector2 scale = get_global_transform_with_canvas().get_scale();
- grabber->set_scale(scale);
- grabber->reset_size();
- grabber->set_position(get_global_position() + (grabber_rect.get_center() - grabber->get_size() * 0.5) * scale);
+ if (grabber->get_texture() != grabber_tex) {
+ grabber->set_texture(grabber_tex);
+ }
- if (mousewheel_over_grabber) {
- Input::get_singleton()->warp_mouse(grabber->get_position() + grabber_rect.size);
- }
+ Vector2 scale = get_global_transform_with_canvas().get_scale();
+ grabber->set_scale(scale);
+ grabber->reset_size();
+ grabber->set_position(get_global_position() + (grabber_rect.get_center() - grabber->get_size() * 0.5) * scale);
+
+ if (mousewheel_over_grabber) {
+ Input::get_singleton()->warp_mouse(grabber->get_position() + grabber_rect.size);
+ }
- grabber_range = width;
+ grabber_range = width;
+ }
}
}
}
@@ -476,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;
}
}
@@ -550,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();
}
@@ -559,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
@@ -575,14 +584,17 @@ 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();
}
//tab was pressed
} else {
//enter, click, esc
+ grab_focus();
}
+
+ emit_signal("value_focus_exited");
}
void EditorSpinSlider::_grabber_mouse_entered() {
@@ -619,15 +631,14 @@ bool EditorSpinSlider::is_grabbing() const {
void EditorSpinSlider::_focus_entered() {
_ensure_input_popup();
- Rect2 gr = get_screen_rect();
value_input->set_text(get_text_value());
- value_input_popup->set_position(gr.position);
- value_input_popup->set_size(gr.size);
- value_input_popup->call_deferred(SNAME("popup"));
+ value_input_popup->set_size(get_size());
+ value_input_popup->call_deferred(SNAME("show"));
value_input->call_deferred(SNAME("grab_focus"));
value_input->call_deferred(SNAME("select_all"));
value_input->set_focus_next(find_next_valid_focus()->get_path());
value_input->set_focus_previous(find_prev_valid_focus()->get_path());
+ emit_signal("value_focus_entered");
}
void EditorSpinSlider::_bind_methods() {
@@ -651,6 +662,11 @@ void EditorSpinSlider::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "read_only"), "set_read_only", "is_read_only");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flat"), "set_flat", "is_flat");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_slider"), "set_hide_slider", "is_hiding_slider");
+
+ ADD_SIGNAL(MethodInfo("grabbed"));
+ ADD_SIGNAL(MethodInfo("ungrabbed"));
+ ADD_SIGNAL(MethodInfo("value_focus_entered"));
+ ADD_SIGNAL(MethodInfo("value_focus_exited"));
}
void EditorSpinSlider::_ensure_input_popup() {
@@ -658,14 +674,14 @@ void EditorSpinSlider::_ensure_input_popup() {
return;
}
- value_input_popup = memnew(Popup);
+ value_input_popup = memnew(Control);
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_popup->set_wrap_controls(true);
value_input->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
- value_input_popup->connect("popup_hide", callable_mp(this, &EditorSpinSlider::_value_input_closed));
+ value_input_popup->connect("hidden", callable_mp(this, &EditorSpinSlider::_value_input_closed));
value_input->connect("text_submitted", callable_mp(this, &EditorSpinSlider::_value_input_submitted));
value_input->connect("focus_exited", callable_mp(this, &EditorSpinSlider::_value_focus_exited));
value_input->connect("gui_input", callable_mp(this, &EditorSpinSlider::_value_input_gui_input));
diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h
index afcaa3e4b6..a4d810b18b 100644
--- a/editor/editor_spin_slider.h
+++ b/editor/editor_spin_slider.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_spin_slider.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_spin_slider.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 EDITOR_SPIN_SLIDER_H
#define EDITOR_SPIN_SLIDER_H
@@ -63,9 +63,9 @@ class EditorSpinSlider : public Range {
Vector2 grabbing_spinner_mouse_pos;
double pre_grab_value = 0.0;
- Popup *value_input_popup = nullptr;
+ 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 64ddecc588..7a880d2ab3 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_themes.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_themes.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 "editor_themes.h"
@@ -42,10 +42,15 @@
#include "modules/svg/image_loader_svg.h"
#endif
-HashMap<Color, Color> EditorColorMap::editor_color_map;
+HashMap<Color, Color> EditorColorMap::color_conversion_map;
+HashSet<StringName> EditorColorMap::color_conversion_exceptions;
-void EditorColorMap::add_color_pair(const String p_from_color, const String p_to_color) {
- editor_color_map[Color::html(p_from_color)] = Color::html(p_to_color);
+void EditorColorMap::add_conversion_color_pair(const String p_from_color, const String p_to_color) {
+ color_conversion_map[Color::html(p_from_color)] = Color::html(p_to_color);
+}
+
+void EditorColorMap::add_conversion_exception(const StringName p_icon_name) {
+ color_conversion_exceptions.insert(p_icon_name);
}
void EditorColorMap::create() {
@@ -53,105 +58,140 @@ void EditorColorMap::create() {
// This can be a basis for proper palette validation later.
// Convert: FROM TO
- add_color_pair("#478cbf", "#478cbf"); // Godot Blue
- add_color_pair("#414042", "#414042"); // Godot Gray
+ add_conversion_color_pair("#478cbf", "#478cbf"); // Godot Blue
+ add_conversion_color_pair("#414042", "#414042"); // Godot Gray
- add_color_pair("#ffffff", "#414141"); // Pure white
- add_color_pair("#000000", "#bfbfbf"); // Pure black
+ add_conversion_color_pair("#ffffff", "#414141"); // Pure white
+ add_conversion_color_pair("#000000", "#bfbfbf"); // Pure black
// Keep pure RGB colors as is, but list them for explicitly.
- add_color_pair("#ff0000", "#ff0000"); // Pure red
- add_color_pair("#00ff00", "#00ff00"); // Pure green
- add_color_pair("#0000ff", "#0000ff"); // Pure blue
+ add_conversion_color_pair("#ff0000", "#ff0000"); // Pure red
+ add_conversion_color_pair("#00ff00", "#00ff00"); // Pure green
+ add_conversion_color_pair("#0000ff", "#0000ff"); // Pure blue
// GUI Colors
- add_color_pair("#e0e0e0", "#5a5a5a"); // Common icon color
- add_color_pair("#fefefe", "#fefefe"); // Forced light color
- add_color_pair("#808080", "#808080"); // GUI disabled color
- add_color_pair("#b3b3b3", "#363636"); // GUI disabled light color
- add_color_pair("#699ce8", "#699ce8"); // GUI highlight color
- add_color_pair("#f9f9f9", "#606060"); // Scrollbar grabber highlight color
-
- add_color_pair("#c38ef1", "#a85de9"); // Animation
- add_color_pair("#fc7f7f", "#cd3838"); // Spatial
- add_color_pair("#8da5f3", "#3d64dd"); // 2D
- add_color_pair("#4b70ea", "#1a3eac"); // 2D Dark
- add_color_pair("#8eef97", "#2fa139"); // Control
-
- add_color_pair("#5fb2ff", "#0079f0"); // Selection (blue)
- add_color_pair("#003e7a", "#2b74bb"); // Selection (darker blue)
- add_color_pair("#f7f5cf", "#615f3a"); // Gizmo (yellow)
+ add_conversion_color_pair("#e0e0e0", "#5a5a5a"); // Common icon color
+ add_conversion_color_pair("#fefefe", "#fefefe"); // Forced light color
+ add_conversion_color_pair("#808080", "#808080"); // GUI disabled color
+ add_conversion_color_pair("#b3b3b3", "#363636"); // GUI disabled light color
+ add_conversion_color_pair("#699ce8", "#699ce8"); // GUI highlight color
+ add_conversion_color_pair("#f9f9f9", "#606060"); // Scrollbar grabber highlight color
+
+ add_conversion_color_pair("#c38ef1", "#a85de9"); // Animation
+ add_conversion_color_pair("#fc7f7f", "#cd3838"); // Spatial
+ add_conversion_color_pair("#8da5f3", "#3d64dd"); // 2D
+ add_conversion_color_pair("#4b70ea", "#1a3eac"); // 2D Dark
+ add_conversion_color_pair("#8eef97", "#2fa139"); // Control
+
+ add_conversion_color_pair("#5fb2ff", "#0079f0"); // Selection (blue)
+ add_conversion_color_pair("#003e7a", "#2b74bb"); // Selection (darker blue)
+ add_conversion_color_pair("#f7f5cf", "#615f3a"); // Gizmo (yellow)
// Rainbow
- add_color_pair("#ff4545", "#ff2929"); // Red
- add_color_pair("#ffe345", "#ffe337"); // Yellow
- add_color_pair("#80ff45", "#74ff34"); // Green
- add_color_pair("#45ffa2", "#2cff98"); // Aqua
- add_color_pair("#45d7ff", "#22ccff"); // Blue
- add_color_pair("#8045ff", "#702aff"); // Purple
- add_color_pair("#ff4596", "#ff2781"); // Pink
+ add_conversion_color_pair("#ff4545", "#ff2929"); // Red
+ add_conversion_color_pair("#ffe345", "#ffe337"); // Yellow
+ add_conversion_color_pair("#80ff45", "#74ff34"); // Green
+ add_conversion_color_pair("#45ffa2", "#2cff98"); // Aqua
+ add_conversion_color_pair("#45d7ff", "#22ccff"); // Blue
+ add_conversion_color_pair("#8045ff", "#702aff"); // Purple
+ add_conversion_color_pair("#ff4596", "#ff2781"); // Pink
// Audio gradients
- add_color_pair("#e1da5b", "#d6cf4b"); // Yellow
+ add_conversion_color_pair("#e1da5b", "#d6cf4b"); // Yellow
- add_color_pair("#62aeff", "#1678e0"); // Frozen gradient top
- add_color_pair("#75d1e6", "#41acc5"); // Frozen gradient middle
- add_color_pair("#84ffee", "#49ccba"); // Frozen gradient bottom
+ add_conversion_color_pair("#62aeff", "#1678e0"); // Frozen gradient top
+ add_conversion_color_pair("#75d1e6", "#41acc5"); // Frozen gradient middle
+ add_conversion_color_pair("#84ffee", "#49ccba"); // Frozen gradient bottom
- add_color_pair("#f70000", "#c91616"); // Color track red
- add_color_pair("#eec315", "#d58c0b"); // Color track orange
- add_color_pair("#dbee15", "#b7d10a"); // Color track yellow
- add_color_pair("#288027", "#218309"); // Color track green
+ add_conversion_color_pair("#f70000", "#c91616"); // Color track red
+ add_conversion_color_pair("#eec315", "#d58c0b"); // Color track orange
+ add_conversion_color_pair("#dbee15", "#b7d10a"); // Color track yellow
+ add_conversion_color_pair("#288027", "#218309"); // Color track green
// Resource groups
- add_color_pair("#ffca5f", "#fea900"); // Mesh resource (orange)
- add_color_pair("#2998ff", "#68b6ff"); // Shape resource (blue)
- add_color_pair("#a2d2ff", "#4998e3"); // Shape resource (light blue)
+ add_conversion_color_pair("#ffca5f", "#fea900"); // Mesh resource (orange)
+ add_conversion_color_pair("#2998ff", "#68b6ff"); // Shape resource (blue)
+ add_conversion_color_pair("#a2d2ff", "#4998e3"); // Shape resource (light blue)
// Animation editor tracks
// The property track icon color is set by the common icon color.
- add_color_pair("#ea7940", "#bd5e2c"); // 3D Position track
- add_color_pair("#ff2b88", "#bd165f"); // 3D Rotation track
- add_color_pair("#eac840", "#bd9d1f"); // 3D Scale track
- add_color_pair("#3cf34e", "#16a827"); // Call Method track
- add_color_pair("#2877f6", "#236be6"); // Bezier Curve track
- add_color_pair("#eae440", "#9f9722"); // Audio Playback track
- add_color_pair("#a448f0", "#9853ce"); // Animation Playback track
- add_color_pair("#5ad5c4", "#0a9c88"); // Blend Shape track
+ add_conversion_color_pair("#ea7940", "#bd5e2c"); // 3D Position track
+ add_conversion_color_pair("#ff2b88", "#bd165f"); // 3D Rotation track
+ add_conversion_color_pair("#eac840", "#bd9d1f"); // 3D Scale track
+ add_conversion_color_pair("#3cf34e", "#16a827"); // Call Method track
+ add_conversion_color_pair("#2877f6", "#236be6"); // Bezier Curve track
+ add_conversion_color_pair("#eae440", "#9f9722"); // Audio Playback track
+ add_conversion_color_pair("#a448f0", "#9853ce"); // Animation Playback track
+ add_conversion_color_pair("#5ad5c4", "#0a9c88"); // Blend Shape track
// Control layouts
- add_color_pair("#d6d6d6", "#474747"); // Highlighted part
- add_color_pair("#474747", "#d6d6d6"); // Background part
- add_color_pair("#919191", "#6e6e6e"); // Border part
+ add_conversion_color_pair("#d6d6d6", "#474747"); // Highlighted part
+ add_conversion_color_pair("#474747", "#d6d6d6"); // Background part
+ add_conversion_color_pair("#919191", "#6e6e6e"); // Border part
// TileSet editor icons
- add_color_pair("#fce00e", "#aa8d24"); // New Single Tile
- add_color_pair("#0e71fc", "#0350bd"); // New Autotile
- add_color_pair("#c6ced4", "#828f9b"); // New Atlas
-
- // Visual script
- add_color_pair("#41ecad", "#25e3a0"); // VisualScript variant
- add_color_pair("#6f91f0", "#6d8eeb"); // VisualScript bool
- add_color_pair("#5abbef", "#4fb2e9"); // VisualScript int
- add_color_pair("#35d4f4", "#27ccf0"); // VisualScript float
- add_color_pair("#4593ec", "#4690e7"); // VisualScript String
- add_color_pair("#ac73f1", "#ad76ee"); // VisualScript Vector2
- add_color_pair("#f1738f", "#ee758e"); // VisualScript Rect2
- add_color_pair("#de66f0", "#dc6aed"); // VisualScript Vector3
- add_color_pair("#b9ec41", "#96ce1a"); // VisualScript Transform2D
- add_color_pair("#f74949", "#f77070"); // VisualScript Plane
- add_color_pair("#ec418e", "#ec69a3"); // VisualScript Quat
- add_color_pair("#ee5677", "#ee7991"); // VisualScript AABB
- add_color_pair("#e1ec41", "#b2bb19"); // VisualScript Basis
- add_color_pair("#f68f45", "#f49047"); // VisualScript Transform
- add_color_pair("#417aec", "#6993ec"); // VisualScript NodePath
- add_color_pair("#41ec80", "#2ce573"); // VisualScript RID
- add_color_pair("#55f3e3", "#12d5c3"); // VisualScript Object
- add_color_pair("#54ed9e", "#57e99f"); // VisualScript Dictionary
+ add_conversion_color_pair("#fce00e", "#aa8d24"); // New Single Tile
+ add_conversion_color_pair("#0e71fc", "#0350bd"); // New Autotile
+ add_conversion_color_pair("#c6ced4", "#828f9b"); // New Atlas
+
+ // 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_color_pair("#77ce57", "#67c046"); // Vector funcs
- add_color_pair("#ea686c", "#d95256"); // Vector transforms
- add_color_pair("#eac968", "#d9b64f"); // Textures and cubemaps
- add_color_pair("#cf68ea", "#c050dd"); // Functions and expressions
+ add_conversion_color_pair("#77ce57", "#67c046"); // Vector funcs
+ add_conversion_color_pair("#ea686c", "#d95256"); // Vector transforms
+ add_conversion_color_pair("#eac968", "#d9b64f"); // Textures and cubemaps
+ add_conversion_color_pair("#cf68ea", "#c050dd"); // Functions and expressions
+
+ // These icons should not be converted.
+ add_conversion_exception("EditorPivot");
+ add_conversion_exception("EditorHandle");
+ add_conversion_exception("Editor3DHandle");
+ add_conversion_exception("EditorBoneHandle");
+ add_conversion_exception("Godot");
+ add_conversion_exception("Sky");
+ add_conversion_exception("EditorControlAnchor");
+ add_conversion_exception("DefaultProjectIcon");
+ add_conversion_exception("GuiChecked");
+ add_conversion_exception("GuiRadioChecked");
+ add_conversion_exception("GuiIndeterminate");
+ add_conversion_exception("GuiCloseCustomizable");
+ add_conversion_exception("GuiGraphNodePort");
+ add_conversion_exception("GuiResizer");
+ add_conversion_exception("ZoomMore");
+ add_conversion_exception("ZoomLess");
+ add_conversion_exception("ZoomReset");
+ add_conversion_exception("LockViewport");
+ add_conversion_exception("GroupViewport");
+ add_conversion_exception("StatusError");
+ add_conversion_exception("StatusSuccess");
+ add_conversion_exception("StatusWarning");
+ add_conversion_exception("OverbrightIndicator");
+ add_conversion_exception("GuiMiniCheckerboard");
+
+ /// Code Editor.
+ add_conversion_exception("GuiTab");
+ add_conversion_exception("GuiSpace");
+ add_conversion_exception("CodeFoldedRightArrow");
+ add_conversion_exception("CodeFoldDownArrow");
+ add_conversion_exception("TextEditorPlay");
+ add_conversion_exception("Breakpoint");
}
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) {
@@ -191,25 +231,6 @@ static Ref<StyleBoxLine> make_line_stylebox(Color p_color, int p_thickness = 1,
return style;
}
-static Ref<Texture2D> flip_icon(Ref<Texture2D> p_texture, bool p_flip_y = false, bool p_flip_x = false) {
- if (!p_flip_y && !p_flip_x) {
- return p_texture;
- }
-
- Ref<Image> img = p_texture->get_image();
- ERR_FAIL_NULL_V(img, Ref<Texture2D>());
- img = img->duplicate();
-
- if (p_flip_y) {
- img->flip_y();
- }
- if (p_flip_x) {
- img->flip_x();
- }
-
- return ImageTexture::create_from_image(img);
-}
-
#ifdef MODULE_SVG_ENABLED
// See also `generate_icon()` in `scene/resources/default_theme.cpp`.
static Ref<ImageTexture> editor_generate_icon(int p_index, float p_scale, float p_saturation, const HashMap<Color, Color> &p_convert_colors = HashMap<Color, Color>()) {
@@ -220,72 +241,55 @@ static Ref<ImageTexture> editor_generate_icon(int p_index, float p_scale, float
// with integer editor scales.
const bool upsample = !Math::is_equal_approx(Math::round(p_scale), p_scale);
ImageLoaderSVG img_loader;
- img_loader.create_image_from_string(img, editor_icons_sources[p_index], p_scale, upsample, p_convert_colors);
+ Error err = img_loader.create_image_from_string(img, editor_icons_sources[p_index], p_scale, upsample, p_convert_colors);
+ ERR_FAIL_COND_V_MSG(err != OK, Ref<ImageTexture>(), "Failed generating icon, unsupported or invalid SVG data in editor theme.");
if (p_saturation != 1.0) {
img->adjust_bcs(1.0, 1.0, p_saturation);
}
- // In this case filter really helps.
return ImageTexture::create_from_image(img);
}
#endif
-void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = true, int p_thumb_size = 32, bool p_only_thumbs = false, float p_icon_saturation = 1.0) {
+void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme, float p_icon_saturation, int p_thumb_size, bool p_only_thumbs = false) {
#ifdef MODULE_SVG_ENABLED
- HashMap<Color, Color> icon_color_map;
-
- // The names of the icons to never convert, even if one of their colors
- // are contained in the dictionary above.
- HashSet<StringName> exceptions;
-
+ // Before we register the icons, we adjust their colors and saturation.
+ // Most icons follow the standard rules for color conversion to follow the editor
+ // theme's polarity (dark/light). We also adjust the saturation for most icons,
+ // following the editor setting.
+ // Some icons are excluded from this conversion, and instead use the configured
+ // accent color to replace their innate accent color to match the editor theme.
+ // And then some icons are completely excluded from the conversion.
+
+ // Standard color conversion map.
+ HashMap<Color, Color> color_conversion_map;
+ // Icons by default are set up for the dark theme, so if the theme is light,
+ // we apply the dark-to-light color conversion map.
if (!p_dark_theme) {
- for (KeyValue<Color, Color> &E : EditorColorMap::get()) {
- icon_color_map[E.key] = E.value;
+ for (KeyValue<Color, Color> &E : EditorColorMap::get_color_conversion_map()) {
+ color_conversion_map[E.key] = E.value;
}
-
- exceptions.insert("EditorPivot");
- exceptions.insert("EditorHandle");
- exceptions.insert("Editor3DHandle");
- exceptions.insert("EditorBoneHandle");
- exceptions.insert("Godot");
- exceptions.insert("Sky");
- exceptions.insert("EditorControlAnchor");
- exceptions.insert("DefaultProjectIcon");
- exceptions.insert("GuiChecked");
- exceptions.insert("GuiRadioChecked");
- exceptions.insert("GuiIndeterminate");
- exceptions.insert("GuiCloseCustomizable");
- exceptions.insert("GuiGraphNodePort");
- exceptions.insert("GuiResizer");
- exceptions.insert("ZoomMore");
- exceptions.insert("ZoomLess");
- exceptions.insert("ZoomReset");
- exceptions.insert("LockViewport");
- exceptions.insert("GroupViewport");
- exceptions.insert("StatusError");
- exceptions.insert("StatusSuccess");
- exceptions.insert("StatusWarning");
- exceptions.insert("OverbrightIndicator");
- exceptions.insert("GuiMiniCheckerboard");
-
- // Prevents Code Editor icons from changing
- exceptions.insert("GuiTab");
- exceptions.insert("GuiSpace");
- exceptions.insert("CodeFoldedRightArrow");
- exceptions.insert("CodeFoldDownArrow");
- exceptions.insert("TextEditorPlay");
- exceptions.insert("Breakpoint");
}
-
- // These ones should be converted even if we are using a dark theme.
+ // These colors should be converted even if we are using a dark theme.
const Color error_color = p_theme->get_color(SNAME("error_color"), SNAME("Editor"));
const Color success_color = p_theme->get_color(SNAME("success_color"), SNAME("Editor"));
const Color warning_color = p_theme->get_color(SNAME("warning_color"), SNAME("Editor"));
- icon_color_map[Color::html("#ff5f5f")] = error_color;
- icon_color_map[Color::html("#5fff97")] = success_color;
- icon_color_map[Color::html("#ffdd65")] = warning_color;
-
- // Use the accent color for some icons (checkbox, radio, toggle, etc.).
+ color_conversion_map[Color::html("#ff5f5f")] = error_color;
+ color_conversion_map[Color::html("#5fff97")] = success_color;
+ color_conversion_map[Color::html("#ffdd65")] = warning_color;
+
+ // The names of the icons to exclude from the standard color conversion.
+ HashSet<StringName> conversion_exceptions = EditorColorMap::get_color_conversion_exceptions();
+
+ // The names of the icons to exclude when adjusting for saturation.
+ HashSet<StringName> saturation_exceptions;
+ saturation_exceptions.insert("DefaultProjectIcon");
+ saturation_exceptions.insert("Godot");
+ saturation_exceptions.insert("Logo");
+
+ // Accent color conversion map.
+ // It is used on some icons (checkbox, radio, toggle, etc.), regardless of the dark
+ // or light mode.
HashMap<Color, Color> accent_color_map;
HashSet<StringName> accent_color_icons;
@@ -311,16 +315,14 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
icon = editor_generate_icon(i, EDSCALE, 1.0, accent_color_map);
} else {
float saturation = p_icon_saturation;
-
- if (strcmp(editor_icons_names[i], "DefaultProjectIcon") == 0 || strcmp(editor_icons_names[i], "Godot") == 0 || strcmp(editor_icons_names[i], "Logo") == 0) {
+ if (saturation_exceptions.has(editor_icons_names[i])) {
saturation = 1.0;
}
- const int is_exception = exceptions.has(editor_icons_names[i]);
- if (is_exception) {
+ if (conversion_exceptions.has(editor_icons_names[i])) {
icon = editor_generate_icon(i, EDSCALE, saturation);
} else {
- icon = editor_generate_icon(i, EDSCALE, saturation, icon_color_map);
+ icon = editor_generate_icon(i, EDSCALE, saturation, color_conversion_map);
}
}
@@ -329,19 +331,26 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
}
// Generate thumbnail icons with the given thumbnail size.
- // We don't need filtering when generating at one of the default resolutions.
- const bool force_filter = p_thumb_size != 64 && p_thumb_size != 32;
+ // See editor\icons\editor_icons_builders.py for the code that determines which icons are thumbnails.
if (p_thumb_size >= 64) {
const float scale = (float)p_thumb_size / 64.0 * EDSCALE;
for (int i = 0; i < editor_bg_thumbs_count; i++) {
const int index = editor_bg_thumbs_indices[i];
- const int is_exception = exceptions.has(editor_icons_names[index]);
-
Ref<ImageTexture> icon;
- if (!p_dark_theme && !is_exception) {
- icon = editor_generate_icon(index, scale, force_filter, icon_color_map);
+
+ if (accent_color_icons.has(editor_icons_names[index])) {
+ icon = editor_generate_icon(index, scale, 1.0, accent_color_map);
} else {
- icon = editor_generate_icon(index, scale, force_filter);
+ float saturation = p_icon_saturation;
+ if (saturation_exceptions.has(editor_icons_names[index])) {
+ saturation = 1.0;
+ }
+
+ if (conversion_exceptions.has(editor_icons_names[index])) {
+ icon = editor_generate_icon(index, scale, saturation);
+ } else {
+ icon = editor_generate_icon(index, scale, saturation, color_conversion_map);
+ }
}
p_theme->set_icon(editor_icons_names[index], SNAME("EditorIcons"), icon);
@@ -350,13 +359,21 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
const float scale = (float)p_thumb_size / 32.0 * EDSCALE;
for (int i = 0; i < editor_md_thumbs_count; i++) {
const int index = editor_md_thumbs_indices[i];
- const bool is_exception = exceptions.has(editor_icons_names[index]);
-
Ref<ImageTexture> icon;
- if (!p_dark_theme && !is_exception) {
- icon = editor_generate_icon(index, scale, force_filter, icon_color_map);
+
+ if (accent_color_icons.has(editor_icons_names[index])) {
+ icon = editor_generate_icon(index, scale, 1.0, accent_color_map);
} else {
- icon = editor_generate_icon(index, scale, force_filter);
+ float saturation = p_icon_saturation;
+ if (saturation_exceptions.has(editor_icons_names[index])) {
+ saturation = 1.0;
+ }
+
+ if (conversion_exceptions.has(editor_icons_names[index])) {
+ icon = editor_generate_icon(index, scale, saturation);
+ } else {
+ icon = editor_generate_icon(index, scale, saturation, color_conversion_map);
+ }
}
p_theme->set_icon(editor_icons_names[index], SNAME("EditorIcons"), icon);
@@ -377,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 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");
@@ -388,6 +406,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Color preset_accent_color;
Color preset_base_color;
float preset_contrast = 0;
+ bool preset_draw_extra_borders = false;
const float default_contrast = 0.3;
@@ -424,6 +443,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
preset_base_color = Color(0.89, 0.86, 0.79);
// A negative contrast rate looks better for light themes, since it better follows the natural order of UI "elevation".
preset_contrast = -0.08;
+ } else if (preset == "Black (OLED)") {
+ preset_accent_color = Color(0.45, 0.75, 1.0);
+ preset_base_color = Color(0, 0, 0);
+ // The contrast rate value is irrelevant on a fully black theme.
+ preset_contrast = 0.0;
+ preset_draw_extra_borders = true;
} else { // Default
preset_accent_color = Color(0.44, 0.73, 0.98);
preset_base_color = Color(0.21, 0.24, 0.29);
@@ -434,15 +459,18 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
accent_color = preset_accent_color;
base_color = preset_base_color;
contrast = preset_contrast;
+ draw_extra_borders = preset_draw_extra_borders;
EditorSettings::get_singleton()->set_initial_value("interface/theme/accent_color", accent_color);
EditorSettings::get_singleton()->set_initial_value("interface/theme/base_color", base_color);
EditorSettings::get_singleton()->set_initial_value("interface/theme/contrast", contrast);
+ EditorSettings::get_singleton()->set_initial_value("interface/theme/draw_extra_borders", draw_extra_borders);
}
EditorSettings::get_singleton()->set_manually("interface/theme/preset", preset);
EditorSettings::get_singleton()->set_manually("interface/theme/accent_color", accent_color);
EditorSettings::get_singleton()->set_manually("interface/theme/base_color", base_color);
EditorSettings::get_singleton()->set_manually("interface/theme/contrast", contrast);
+ EditorSettings::get_singleton()->set_manually("interface/theme/draw_extra_borders", draw_extra_borders);
// Colors
bool dark_theme = EditorSettings::get_singleton()->is_dark_theme();
@@ -451,7 +479,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
if (dark_theme) {
ImageLoaderSVG::set_forced_color_map(HashMap<Color, Color>());
} else {
- ImageLoaderSVG::set_forced_color_map(EditorColorMap::get());
+ ImageLoaderSVG::set_forced_color_map(EditorColorMap::get_color_conversion_map());
}
#endif
@@ -461,6 +489,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color dark_color_2 = base_color.lerp(Color(0, 0, 0, 1), contrast * 1.5).clamp();
const Color dark_color_3 = base_color.lerp(Color(0, 0, 0, 1), contrast * 2).clamp();
+ // Only used when the Draw Extra Borders editor setting is enabled.
+ const Color extra_border_color_1 = Color(0.5, 0.5, 0.5);
+ const Color extra_border_color_2 = dark_theme ? Color(0.3, 0.3, 0.3) : Color(0.7, 0.7, 0.7);
+
const Color background_color = dark_color_2;
// White (dark theme) or black (light theme), will be used to generate the rest of the colors
@@ -473,7 +505,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color font_hover_color = mono_color.lerp(base_color, 0.125);
const Color font_focus_color = mono_color.lerp(base_color, 0.125);
const Color font_hover_pressed_color = font_hover_color.lerp(accent_color, 0.74);
- const Color font_disabled_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.3);
+ const Color font_disabled_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.35);
const Color font_readonly_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.65);
const Color font_placeholder_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.6);
const Color selection_color = accent_color * Color(1, 1, 1, 0.4);
@@ -494,9 +526,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color highlight_color = Color(accent_color.r, accent_color.g, accent_color.b, 0.275);
const Color disabled_highlight_color = highlight_color.lerp(dark_theme ? Color(0, 0, 0) : Color(1, 1, 1), 0.5);
- float prev_icon_saturation = theme->has_color(SNAME("icon_saturation"), SNAME("Editor")) ? theme->get_color(SNAME("icon_saturation"), SNAME("Editor")).r : 1.0;
-
- theme->set_color("icon_saturation", "Editor", Color(icon_saturation, icon_saturation, icon_saturation)); // can't save single float in theme, so using color
+ // Can't save single float in theme, so using Color.
+ theme->set_color("icon_saturation", "Editor", Color(icon_saturation, icon_saturation, icon_saturation));
theme->set_color("accent_color", "Editor", accent_color);
theme->set_color("highlight_color", "Editor", highlight_color);
theme->set_color("disabled_highlight_color", "Editor", disabled_highlight_color);
@@ -537,7 +568,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Color readonly_warning_color = error_color.lerp(dark_theme ? Color(0, 0, 0) : Color(1, 1, 1), 0.25);
if (!dark_theme) {
- // Darken some colors to be readable on a light background
+ // Darken some colors to be readable on a light background.
success_color = success_color.lerp(mono_color, 0.35);
warning_color = warning_color.lerp(mono_color, 0.35);
error_color = error_color.lerp(mono_color, 0.25);
@@ -550,9 +581,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("readonly_color", "Editor", readonly_color);
if (!dark_theme) {
- theme->set_color("vulkan_color", "Editor", Color::hex(0xad1128ff));
+ theme->set_color("highend_color", "Editor", Color::hex(0xad1128ff));
} else {
- theme->set_color("vulkan_color", "Editor", Color(1.0, 0.0, 0.0));
+ theme->set_color("highend_color", "Editor", Color(1.0, 0.0, 0.0));
}
const int thumb_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
theme->set_constant("scale", "Editor", EDSCALE);
@@ -560,22 +591,43 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_constant("dark_theme", "Editor", dark_theme);
theme->set_constant("color_picker_button_height", "Editor", 28 * EDSCALE);
- // Register icons + font
+ // Register editor icons.
+ // If the settings are comparable to the old theme, then just copy them over.
+ // Otherwise, regenerate them. Also check if we need to regenerate "thumb" icons.
+ bool keep_old_icons = false;
+ bool regenerate_thumb_icons = true;
+ if (p_theme != nullptr) {
+ // We check editor scale, theme dark/light mode, icon saturation, and accent color.
+
+ // That doesn't really work as expected, since theme constants are integers, and scales are floats.
+ // So this check will never work when changing between 100-199% values.
+ const float prev_scale = (float)p_theme->get_constant(SNAME("scale"), SNAME("Editor"));
+ const bool prev_dark_theme = (bool)p_theme->get_constant(SNAME("dark_theme"), SNAME("Editor"));
+ const Color prev_accent_color = p_theme->get_color(SNAME("accent_color"), SNAME("Editor"));
+ const float prev_icon_saturation = p_theme->get_color(SNAME("icon_saturation"), SNAME("Editor")).r;
+
+ keep_old_icons = (Math::is_equal_approx(prev_scale, EDSCALE) &&
+ prev_dark_theme == dark_theme &&
+ prev_accent_color == accent_color &&
+ prev_icon_saturation == icon_saturation);
+
+ const double prev_thumb_size = (double)p_theme->get_constant(SNAME("thumb_size"), SNAME("Editor"));
+
+ regenerate_thumb_icons = !Math::is_equal_approx(prev_thumb_size, thumb_size);
+ }
- // The editor scale, icon color (dark_theme bool), icon saturation, and accent color has not changed, so we do not regenerate the icons.
- if (p_theme != nullptr && fabs(p_theme->get_constant(SNAME("scale"), SNAME("Editor")) - EDSCALE) < 0.00001 && (bool)p_theme->get_constant(SNAME("dark_theme"), SNAME("Editor")) == dark_theme && prev_icon_saturation == icon_saturation && p_theme->get_color(SNAME("accent_color"), SNAME("Editor")) == accent_color) {
- // Register already generated icons.
+ if (keep_old_icons) {
for (int i = 0; i < editor_icons_count; i++) {
theme->set_icon(editor_icons_names[i], SNAME("EditorIcons"), p_theme->get_icon(editor_icons_names[i], SNAME("EditorIcons")));
}
} else {
- editor_register_and_generate_icons(theme, dark_theme, thumb_size, false, icon_saturation);
+ editor_register_and_generate_icons(theme, dark_theme, icon_saturation, thumb_size, false);
}
- // Thumbnail size has changed, so we regenerate the medium sizes
- if (p_theme != nullptr && fabs((double)p_theme->get_constant(SNAME("thumb_size"), SNAME("Editor")) - thumb_size) > 0.00001) {
- editor_register_and_generate_icons(p_theme, dark_theme, thumb_size, true);
+ if (regenerate_thumb_icons) {
+ editor_register_and_generate_icons(theme, dark_theme, icon_saturation, thumb_size, true);
}
+ // Register editor fonts.
editor_register_fonts(theme);
// Ensure borders are visible when using an editor scale below 100%.
@@ -598,10 +650,19 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
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_bg_color(dark_color_1);
- style_widget->set_border_color(dark_color_2);
+ if (draw_extra_borders) {
+ style_widget->set_border_width_all(Math::round(EDSCALE));
+ style_widget->set_border_color(extra_border_color_1);
+ } else {
+ style_widget->set_border_color(dark_color_2);
+ }
Ref<StyleBoxFlat> style_widget_disabled = style_widget->duplicate();
- style_widget_disabled->set_border_color(disabled_color);
+ if (draw_extra_borders) {
+ style_widget_disabled->set_border_color(extra_border_color_2);
+ } else {
+ style_widget_disabled->set_border_color(disabled_color);
+ }
style_widget_disabled->set_bg_color(disabled_bg_color);
Ref<StyleBoxFlat> style_widget_focus = style_widget->duplicate();
@@ -614,7 +675,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<StyleBoxFlat> style_widget_hover = style_widget->duplicate();
style_widget_hover->set_bg_color(mono_color * Color(1, 1, 1, 0.11));
- style_widget_hover->set_border_color(mono_color * Color(1, 1, 1, 0.05));
+ if (draw_extra_borders) {
+ style_widget_hover->set_border_color(extra_border_color_1);
+ } else {
+ style_widget_hover->set_border_color(mono_color * Color(1, 1, 1, 0.05));
+ }
// Style for windows, popups, etc..
Ref<StyleBoxFlat> style_popup = style_default->duplicate();
@@ -688,6 +753,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// 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
@@ -955,7 +1021,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_popup_menu->set_default_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);
- style_popup_menu->set_border_color(dark_color_2);
+ if (draw_extra_borders) {
+ style_popup_menu->set_border_color(extra_border_color_2);
+ } else {
+ style_popup_menu->set_border_color(dark_color_2);
+ }
theme->set_stylebox("panel", "PopupMenu", style_popup_menu);
Ref<StyleBoxFlat> style_menu_hover = style_widget_hover->duplicate();
@@ -1075,7 +1145,13 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<StyleBoxFlat> style_tree_bg = style_default->duplicate();
// Make Trees easier to distinguish from other controls by using a darker background color.
style_tree_bg->set_bg_color(dark_color_1.lerp(dark_color_2, 0.5));
- style_tree_bg->set_border_color(dark_color_3);
+ if (draw_extra_borders) {
+ style_tree_bg->set_border_width_all(Math::round(EDSCALE));
+ style_tree_bg->set_border_color(extra_border_color_2);
+ } else {
+ style_tree_bg->set_border_color(dark_color_3);
+ }
+
theme->set_stylebox("panel", "Tree", style_tree_bg);
// Tree
@@ -1171,8 +1247,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// ItemList
Ref<StyleBoxFlat> style_itemlist_bg = style_default->duplicate();
style_itemlist_bg->set_bg_color(dark_color_1);
- style_itemlist_bg->set_border_width_all(border_width);
- style_itemlist_bg->set_border_color(dark_color_3);
+
+ if (draw_extra_borders) {
+ style_itemlist_bg->set_border_width_all(Math::round(EDSCALE));
+ style_itemlist_bg->set_border_color(extra_border_color_2);
+ } else {
+ style_itemlist_bg->set_border_width_all(border_width);
+ style_itemlist_bg->set_border_color(dark_color_3);
+ }
Ref<StyleBoxFlat> style_itemlist_cursor = style_default->duplicate();
style_itemlist_cursor->set_draw_center(false);
@@ -1290,14 +1372,21 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// 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);
- // Add a bottom line to make LineEdits more visible, especially in sectioned inspectors
- // such as the Project Settings.
- style_line_edit->set_border_width(SIDE_BOTTOM, Math::round(2 * EDSCALE));
- style_line_edit->set_border_color(dark_color_2);
+
// Don't round the bottom corner to make the line look sharper.
style_tab_selected->set_corner_radius(CORNER_BOTTOM_LEFT, 0);
style_tab_selected->set_corner_radius(CORNER_BOTTOM_RIGHT, 0);
+ if (draw_extra_borders) {
+ style_line_edit->set_border_width_all(Math::round(EDSCALE));
+ style_line_edit->set_border_color(extra_border_color_1);
+ } else {
+ // Add a bottom line to make LineEdits more visible, especially in sectioned inspectors
+ // such as the Project Settings.
+ style_line_edit->set_border_width(SIDE_BOTTOM, Math::round(2 * EDSCALE));
+ style_line_edit->set_border_color(dark_color_2);
+ }
+
Ref<StyleBoxFlat> style_line_edit_disabled = style_line_edit->duplicate();
style_line_edit_disabled->set_border_color(disabled_color);
style_line_edit_disabled->set_bg_color(disabled_bg_color);
@@ -1436,6 +1525,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("slider", "HSlider", make_flat_stylebox(dark_color_3, 0, default_margin_size / 2, 0, default_margin_size / 2, corner_width));
theme->set_stylebox("grabber_area", "HSlider", make_flat_stylebox(contrast_color_1, 0, default_margin_size / 2, 0, default_margin_size / 2, corner_width));
theme->set_stylebox("grabber_area_highlight", "HSlider", make_flat_stylebox(contrast_color_1, 0, default_margin_size / 2, 0, default_margin_size / 2));
+ theme->set_constant("grabber_offset", "HSlider", 0);
// VSlider
theme->set_icon("grabber", "VSlider", theme->get_icon(SNAME("GuiSliderGrabber"), SNAME("EditorIcons")));
@@ -1443,6 +1533,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("slider", "VSlider", make_flat_stylebox(dark_color_3, default_margin_size / 2, 0, default_margin_size / 2, 0, corner_width));
theme->set_stylebox("grabber_area", "VSlider", make_flat_stylebox(contrast_color_1, default_margin_size / 2, 0, default_margin_size / 2, 0, corner_width));
theme->set_stylebox("grabber_area_highlight", "VSlider", make_flat_stylebox(contrast_color_1, default_margin_size / 2, 0, default_margin_size / 2, 0));
+ theme->set_constant("grabber_offset", "VSlider", 0);
// RichTextLabel
theme->set_color("default_color", "RichTextLabel", font_color);
@@ -1454,6 +1545,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("normal", "RichTextLabel", style_tree_bg);
// Editor help.
+ Ref<StyleBoxFlat> style_editor_help = style_default->duplicate();
+ style_editor_help->set_bg_color(dark_color_2);
+ style_editor_help->set_border_color(dark_color_3);
+ theme->set_stylebox("background", "EditorHelp", style_editor_help);
+
theme->set_color("title_color", "EditorHelp", accent_color);
theme->set_color("headline_color", "EditorHelp", mono_color);
theme->set_color("text_color", "EditorHelp", font_color);
@@ -1466,9 +1562,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("link_color", "EditorHelp", accent_color.lerp(mono_color, 0.8));
theme->set_color("code_color", "EditorHelp", accent_color.lerp(mono_color, 0.6));
theme->set_color("kbd_color", "EditorHelp", accent_color.lerp(property_color, 0.6));
+ theme->set_color("code_bg_color", "EditorHelp", dark_color_3);
+ theme->set_color("kbd_bg_color", "EditorHelp", dark_color_1);
+ theme->set_color("param_bg_color", "EditorHelp", dark_color_1);
theme->set_constant("line_separation", "EditorHelp", Math::round(6 * EDSCALE));
theme->set_constant("table_h_separation", "EditorHelp", 16 * EDSCALE);
theme->set_constant("table_v_separation", "EditorHelp", 6 * EDSCALE);
+ theme->set_constant("text_highlight_h_padding", "EditorHelp", 1 * EDSCALE);
+ theme->set_constant("text_highlight_v_padding", "EditorHelp", 2 * EDSCALE);
// Panel
theme->set_stylebox("panel", "Panel", make_flat_stylebox(dark_color_1, 6, 4, 6, 4, corner_width));
@@ -1567,14 +1668,13 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("camera", "GraphEditMinimap", style_minimap_camera);
theme->set_stylebox("node", "GraphEditMinimap", style_minimap_node);
- Ref<Texture2D> minimap_resizer_icon = theme->get_icon(SNAME("GuiResizer"), SNAME("EditorIcons"));
Color minimap_resizer_color;
if (dark_theme) {
minimap_resizer_color = Color(1, 1, 1, 0.65);
} else {
minimap_resizer_color = Color(0, 0, 0, 0.65);
}
- theme->set_icon("resizer", "GraphEditMinimap", flip_icon(minimap_resizer_icon, true, true));
+ theme->set_icon("resizer", "GraphEditMinimap", theme->get_icon(SNAME("GuiResizerTopLeft"), SNAME("EditorIcons")));
theme->set_color("resizer_color", "GraphEditMinimap", minimap_resizer_color);
// GraphNode
@@ -1680,6 +1780,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_constant("h_width", "ColorPicker", 30 * EDSCALE);
theme->set_constant("label_width", "ColorPicker", 10 * EDSCALE);
theme->set_icon("screen_picker", "ColorPicker", theme->get_icon(SNAME("ColorPick"), SNAME("EditorIcons")));
+ theme->set_icon("shape_circle", "ColorPicker", theme->get_icon(SNAME("PickerShapeCircle"), SNAME("EditorIcons")));
+ theme->set_icon("shape_rect", "ColorPicker", theme->get_icon(SNAME("PickerShapeRectangle"), SNAME("EditorIcons")));
+ theme->set_icon("shape_rect_wheel", "ColorPicker", theme->get_icon(SNAME("PickerShapeRectangleWheel"), SNAME("EditorIcons")));
theme->set_icon("add_preset", "ColorPicker", theme->get_icon(SNAME("Add"), SNAME("EditorIcons")));
theme->set_icon("sample_bg", "ColorPicker", theme->get_icon(SNAME("GuiMiniCheckerboard"), SNAME("EditorIcons")));
theme->set_icon("overbright_indicator", "ColorPicker", theme->get_icon(SNAME("OverbrightIndicator"), SNAME("EditorIcons")));
@@ -1762,7 +1865,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color safe_line_number_color = dark_theme ? (dim_color * Color(1, 1.2, 1, 1.5)) : Color(0, 0.4, 0, 0.75);
const Color caret_color = mono_color;
const Color caret_background_color = mono_color.inverted();
- const Color text_selected_color = dark_color_3;
+ const Color text_selected_color = Color(0, 0, 0, 0);
const Color brace_mismatch_color = dark_theme ? error_color : Color(1, 0.08, 0, 1);
const Color current_line_color = alpha1;
const Color line_length_guideline_color = dark_theme ? base_color : background_color;
@@ -1868,7 +1971,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<Theme> create_custom_theme(const Ref<Theme> p_theme) {
Ref<Theme> theme = create_editor_theme(p_theme);
- const String custom_theme_path = EditorSettings::get_singleton()->get("interface/theme/custom_theme");
+ const String custom_theme_path = EDITOR_GET("interface/theme/custom_theme");
if (!custom_theme_path.is_empty()) {
Ref<Theme> custom_theme = ResourceLoader::load(custom_theme_path);
if (custom_theme.is_valid()) {
diff --git a/editor/editor_themes.h b/editor/editor_themes.h
index 37db8160fa..5949c17201 100644
--- a/editor/editor_themes.h
+++ b/editor/editor_themes.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_themes.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_themes.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 EDITOR_THEMES_H
#define EDITOR_THEMES_H
@@ -39,13 +39,18 @@
class EditorColorMap {
// Godot Color values are used to avoid the ambiguity of strings
// (where "#ffffff", "fff", and "white" are all equivalent).
- static HashMap<Color, Color> editor_color_map;
+ static HashMap<Color, Color> color_conversion_map;
+ // The names of the icons to never convert, even if one of their colors
+ // are contained in the color map from above.
+ static HashSet<StringName> color_conversion_exceptions;
public:
static void create();
- static void add_color_pair(const String p_from_color, const String p_to_color);
+ static void add_conversion_color_pair(const String p_from_color, const String p_to_color);
+ static void add_conversion_exception(const StringName p_icon_name);
- static HashMap<Color, Color> &get() { return editor_color_map; };
+ static HashMap<Color, Color> &get_color_conversion_map() { return color_conversion_map; };
+ static HashSet<StringName> &get_color_conversion_exceptions() { return color_conversion_exceptions; };
};
Ref<Theme> create_editor_theme(Ref<Theme> p_theme = nullptr);
diff --git a/editor/editor_title_bar.cpp b/editor/editor_title_bar.cpp
index 06dcea1f8a..0271bbd64a 100644
--- a/editor/editor_title_bar.cpp
+++ b/editor/editor_title_bar.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_title_bar.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_title_bar.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 "editor/editor_title_bar.h"
@@ -37,7 +37,7 @@ void EditorTitleBar::input(const Ref<InputEvent> &p_event) {
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 ad6ec37ac9..6cac163830 100644
--- a/editor/editor_title_bar.h
+++ b/editor/editor_title_bar.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_title_bar.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_title_bar.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 EDITOR_TITLE_BAR_H
#define EDITOR_TITLE_BAR_H
diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp
index 6a5242f0c6..558423df78 100644
--- a/editor/editor_toaster.cpp
+++ b/editor/editor_toaster.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_toaster.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_toaster.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 "editor_toaster.h"
@@ -78,23 +78,24 @@ void EditorToaster::_notification(int p_what) {
// Change alpha over time.
bool needs_update = false;
for (const KeyValue<Control *, Toast> &element : toasts) {
- Color modulate = element.key->get_modulate();
+ Color modulate_fade = element.key->get_modulate();
// Change alpha over time.
- if (element.value.popped && modulate.a < 1.0) {
- modulate.a += delta * 3;
- element.key->set_modulate(modulate);
- } else if (!element.value.popped && modulate.a > 0.0) {
- modulate.a -= delta * 2;
- element.key->set_modulate(modulate);
+ if (element.value.popped && modulate_fade.a < 1.0) {
+ modulate_fade.a += delta * 3;
+ element.key->set_modulate(modulate_fade);
+ } else if (!element.value.popped && modulate_fade.a > 0.0) {
+ modulate_fade.a -= delta * 2;
+ element.key->set_modulate(modulate_fade);
}
// Hide element if it is not visible anymore.
- if (modulate.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;
}
}
@@ -231,7 +232,7 @@ 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_delete();
+ to_delete[i]->queue_free();
toasts.erase(to_delete[i]);
}
@@ -317,7 +318,7 @@ void EditorToaster::_set_notifications_enabled(bool p_enabled) {
void EditorToaster::_repop_old() {
// Repop olds, up to max_temporary_count
bool needs_update = false;
- int visible = 0;
+ int visible_count = 0;
for (int i = vbox_container->get_child_count() - 1; i >= 0; i--) {
Control *control = Object::cast_to<Control>(vbox_container->get_child(i));
if (!control->is_visible()) {
@@ -326,8 +327,8 @@ void EditorToaster::_repop_old() {
toasts[control].popped = true;
needs_update = true;
}
- visible++;
- if (visible >= max_temporary_count) {
+ visible_count++;
+ if (visible_count >= max_temporary_count) {
break;
}
}
@@ -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;
}
diff --git a/editor/editor_toaster.h b/editor/editor_toaster.h
index 39db518258..6b834f8288 100644
--- a/editor/editor_toaster.h
+++ b/editor/editor_toaster.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_toaster.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_toaster.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 EDITOR_TOASTER_H
#define 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_translation.cpp b/editor/editor_translation.cpp
index b08e5807e7..426daad823 100644
--- a/editor/editor_translation.cpp
+++ b/editor/editor_translation.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_translation.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_translation.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 "editor/editor_translation.h"
diff --git a/editor/editor_translation.h b/editor/editor_translation.h
index baba03859d..3717d0cbf5 100644
--- a/editor/editor_translation.h
+++ b/editor/editor_translation.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_translation.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_translation.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 EDITOR_TRANSLATION_H
#define EDITOR_TRANSLATION_H
diff --git a/editor/editor_translation_parser.cpp b/editor/editor_translation_parser.cpp
index eb38e203a5..813d7c486f 100644
--- a/editor/editor_translation_parser.cpp
+++ b/editor/editor_translation_parser.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_translation_parser.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_translation_parser.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 "editor_translation_parser.h"
diff --git a/editor/editor_translation_parser.h b/editor/editor_translation_parser.h
index 0fe166a0b0..2291bd8a70 100644
--- a/editor/editor_translation_parser.h
+++ b/editor/editor_translation_parser.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_translation_parser.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_translation_parser.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 EDITOR_TRANSLATION_PARSER_H
#define EDITOR_TRANSLATION_PARSER_H
diff --git a/editor/editor_undo_redo_manager.cpp b/editor/editor_undo_redo_manager.cpp
index eca2b3143b..f65f905b25 100644
--- a/editor/editor_undo_redo_manager.cpp
+++ b/editor/editor_undo_redo_manager.cpp
@@ -1,42 +1,46 @@
-/*************************************************************************/
-/* editor_undo_redo_manager.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_undo_redo_manager.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 "editor_undo_redo_manager.h"
#include "core/io/resource.h"
#include "core/os/os.h"
#include "core/templates/local_vector.h"
+#include "editor/debugger/editor_debugger_inspector.h"
+#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_log.h"
#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;
@@ -58,6 +62,10 @@ UndoRedo *EditorUndoRedoManager::get_history_undo_redo(int p_idx) const {
int EditorUndoRedoManager::get_history_id_for_object(Object *p_object) const {
int history_id = INVALID_HISTORY;
+ if (Object::cast_to<EditorDebuggerRemoteObject>(p_object)) {
+ return REMOTE_HISTORY;
+ }
+
if (Node *node = Object::cast_to<Node>(p_object)) {
Node *edited_scene = EditorNode::get_singleton()->get_edited_scene();
@@ -109,9 +117,14 @@ EditorUndoRedoManager::History &EditorUndoRedoManager::get_history_for_object(Ob
}
void EditorUndoRedoManager::create_action_for_history(const String &p_name, int p_history_id, UndoRedo::MergeMode p_mode) {
- pending_action.action_name = p_name;
- pending_action.timestamp = OS::get_singleton()->get_unix_time();
- pending_action.merge_mode = p_mode;
+ if (pending_action.history_id != INVALID_HISTORY) {
+ // Nested action.
+ p_history_id = pending_action.history_id;
+ } else {
+ pending_action.action_name = p_name;
+ pending_action.timestamp = OS::get_singleton()->get_unix_time();
+ pending_action.merge_mode = p_mode;
+ }
if (p_history_id != INVALID_HISTORY) {
pending_action.history_id = p_history_id;
@@ -124,19 +137,19 @@ void EditorUndoRedoManager::create_action(const String &p_name, UndoRedo::MergeM
create_action_for_history(p_name, INVALID_HISTORY, p_mode);
if (p_custom_context) {
- // This assigns context to pending action.
+ // This assigns history to pending action.
get_history_for_object(p_custom_context);
}
}
void EditorUndoRedoManager::add_do_methodp(Object *p_object, const StringName &p_method, const Variant **p_args, int p_argcount) {
UndoRedo *undo_redo = get_history_for_object(p_object).undo_redo;
- undo_redo->add_do_methodp(p_object, p_method, p_args, p_argcount);
+ undo_redo->add_do_method(Callable(p_object, p_method).bindp(p_args, p_argcount));
}
void EditorUndoRedoManager::add_undo_methodp(Object *p_object, const StringName &p_method, const Variant **p_args, int p_argcount) {
UndoRedo *undo_redo = get_history_for_object(p_object).undo_redo;
- undo_redo->add_undo_methodp(p_object, p_method, p_args, p_argcount);
+ undo_redo->add_undo_method(Callable(p_object, p_method).bindp(p_args, p_argcount));
}
void EditorUndoRedoManager::_add_do_method(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
@@ -218,13 +231,22 @@ void EditorUndoRedoManager::add_undo_reference(Object *p_object) {
}
void EditorUndoRedoManager::commit_action(bool p_execute) {
- ERR_FAIL_COND(pending_action.history_id == INVALID_HISTORY);
+ if (pending_action.history_id == INVALID_HISTORY) {
+ return; // Empty action, do nothing.
+ }
+
is_committing = true;
History &history = get_or_create_history(pending_action.history_id);
history.undo_redo->commit_action(p_execute);
history.redo_stack.clear();
+ if (history.undo_redo->get_action_level() > 0) {
+ // Nested action.
+ is_committing = false;
+ return;
+ }
+
if (!history.undo_stack.is_empty()) {
const Action &prev_action = history.undo_stack.back()->get();
if (pending_action.merge_mode != UndoRedo::MERGE_DISABLE && pending_action.merge_mode == prev_action.merge_mode && pending_action.action_name == prev_action.action_name) {
@@ -238,6 +260,7 @@ void EditorUndoRedoManager::commit_action(bool p_execute) {
history.undo_stack.push_back(pending_action);
pending_action = Action();
is_committing = false;
+ emit_signal(SNAME("history_changed"));
}
bool EditorUndoRedoManager::is_committing_action() const {
@@ -249,32 +272,26 @@ bool EditorUndoRedoManager::undo() {
return false;
}
- History *selected_history = nullptr;
- double global_timestamp = 0;
-
- // Pick the history with greatest last action timestamp (either global or current scene).
- {
- History &history = get_or_create_history(GLOBAL_HISTORY);
- if (!history.undo_stack.is_empty()) {
- selected_history = &history;
- global_timestamp = history.undo_stack.back()->get().timestamp;
- }
+ History *selected_history = _get_newest_undo();
+ if (selected_history) {
+ return undo_history(selected_history->id);
}
+ return false;
+}
- {
- History &history = get_or_create_history(EditorNode::get_editor_data().get_current_edited_scene_history_id());
- if (!history.undo_stack.is_empty() && history.undo_stack.back()->get().timestamp > global_timestamp) {
- selected_history = &history;
- }
- }
+bool EditorUndoRedoManager::undo_history(int p_id) {
+ ERR_FAIL_COND_V(p_id == INVALID_HISTORY, false);
+ History &history = get_or_create_history(p_id);
- if (selected_history) {
- Action action = selected_history->undo_stack.back()->get();
- selected_history->undo_stack.pop_back();
- selected_history->redo_stack.push_back(action);
- return selected_history->undo_redo->undo();
+ Action action = history.undo_stack.back()->get();
+ history.undo_stack.pop_back();
+ history.redo_stack.push_back(action);
+
+ bool success = history.undo_redo->undo();
+ if (success) {
+ emit_signal(SNAME("version_changed"));
}
- return false;
+ return success;
}
bool EditorUndoRedoManager::redo() {
@@ -282,14 +299,22 @@ bool EditorUndoRedoManager::redo() {
return false;
}
- History *selected_history = nullptr;
+ int selected_history = INVALID_HISTORY;
double global_timestamp = INFINITY;
// Pick the history with lowest last action timestamp (either global or current scene).
{
History &history = get_or_create_history(GLOBAL_HISTORY);
if (!history.redo_stack.is_empty()) {
- selected_history = &history;
+ selected_history = history.id;
+ global_timestamp = history.redo_stack.back()->get().timestamp;
+ }
+ }
+
+ {
+ History &history = get_or_create_history(REMOTE_HISTORY);
+ if (!history.redo_stack.is_empty() && history.redo_stack.back()->get().timestamp < global_timestamp) {
+ selected_history = history.id;
global_timestamp = history.redo_stack.back()->get().timestamp;
}
}
@@ -297,19 +322,31 @@ bool EditorUndoRedoManager::redo() {
{
History &history = get_or_create_history(EditorNode::get_editor_data().get_current_edited_scene_history_id());
if (!history.redo_stack.is_empty() && history.redo_stack.back()->get().timestamp < global_timestamp) {
- selected_history = &history;
+ selected_history = history.id;
}
}
- if (selected_history) {
- Action action = selected_history->redo_stack.back()->get();
- selected_history->redo_stack.pop_back();
- selected_history->undo_stack.push_back(action);
- return selected_history->undo_redo->redo();
+ if (selected_history != INVALID_HISTORY) {
+ return redo_history(selected_history);
}
return false;
}
+bool EditorUndoRedoManager::redo_history(int p_id) {
+ ERR_FAIL_COND_V(p_id == INVALID_HISTORY, false);
+ History &history = get_or_create_history(p_id);
+
+ Action action = history.redo_stack.back()->get();
+ history.redo_stack.pop_back();
+ history.undo_stack.push_back(action);
+
+ bool success = history.undo_redo->redo();
+ if (success) {
+ emit_signal(SNAME("version_changed"));
+ }
+ return success;
+}
+
void EditorUndoRedoManager::set_history_as_saved(int p_id) {
History &history = get_or_create_history(p_id);
history.saved_version = history.undo_redo->get_version();
@@ -327,7 +364,7 @@ bool EditorUndoRedoManager::is_history_unsaved(int p_id) {
bool EditorUndoRedoManager::has_undo() {
for (const KeyValue<int, History> &E : history_map) {
- if ((E.key == GLOBAL_HISTORY || E.key == EditorNode::get_editor_data().get_current_edited_scene_history_id()) && !E.value.undo_stack.is_empty()) {
+ if ((E.key == GLOBAL_HISTORY || E.key == REMOTE_HISTORY || E.key == EditorNode::get_editor_data().get_current_edited_scene_history_id()) && !E.value.undo_stack.is_empty()) {
return true;
}
}
@@ -336,7 +373,7 @@ bool EditorUndoRedoManager::has_undo() {
bool EditorUndoRedoManager::has_redo() {
for (const KeyValue<int, History> &E : history_map) {
- if ((E.key == GLOBAL_HISTORY || E.key == EditorNode::get_editor_data().get_current_edited_scene_history_id()) && !E.value.redo_stack.is_empty()) {
+ if ((E.key == GLOBAL_HISTORY || E.key == REMOTE_HISTORY || E.key == EditorNode::get_editor_data().get_current_edited_scene_history_id()) && !E.value.redo_stack.is_empty()) {
return true;
}
}
@@ -345,10 +382,15 @@ bool EditorUndoRedoManager::has_redo() {
void EditorUndoRedoManager::clear_history(bool p_increase_version, int p_idx) {
if (p_idx != INVALID_HISTORY) {
- get_or_create_history(p_idx).undo_redo->clear_history(p_increase_version);
+ History &history = get_or_create_history(p_idx);
+ history.undo_redo->clear_history(p_increase_version);
+ history.undo_stack.clear();
+ history.redo_stack.clear();
+
if (!p_increase_version) {
set_history_as_saved(p_idx);
}
+ emit_signal(SNAME("history_changed"));
return;
}
@@ -356,29 +398,12 @@ void EditorUndoRedoManager::clear_history(bool p_increase_version, int p_idx) {
E.value.undo_redo->clear_history(p_increase_version);
set_history_as_saved(E.key);
}
+ emit_signal(SNAME("history_changed"));
}
String EditorUndoRedoManager::get_current_action_name() {
if (has_undo()) {
- History *selected_history = nullptr;
- double global_timestamp = 0;
-
- // Pick the history with greatest last action timestamp (either global or current scene).
- {
- History &history = get_or_create_history(GLOBAL_HISTORY);
- if (!history.undo_stack.is_empty()) {
- selected_history = &history;
- global_timestamp = history.undo_stack.back()->get().timestamp;
- }
- }
-
- {
- History &history = get_or_create_history(EditorNode::get_editor_data().get_current_edited_scene_history_id());
- if (!history.undo_stack.is_empty() && history.undo_stack.back()->get().timestamp > global_timestamp) {
- selected_history = &history;
- }
- }
-
+ History *selected_history = _get_newest_undo();
if (selected_history) {
return selected_history->undo_redo->get_current_action_name();
}
@@ -386,6 +411,16 @@ String EditorUndoRedoManager::get_current_action_name() {
return "";
}
+int EditorUndoRedoManager::get_current_action_history_id() {
+ if (has_undo()) {
+ History *selected_history = _get_newest_undo();
+ if (selected_history) {
+ return selected_history->id;
+ }
+ }
+ return INVALID_HISTORY;
+}
+
void EditorUndoRedoManager::discard_history(int p_idx, bool p_erase_from_map) {
ERR_FAIL_COND(!history_map.has(p_idx));
History &history = history_map[p_idx];
@@ -400,6 +435,37 @@ void EditorUndoRedoManager::discard_history(int p_idx, bool p_erase_from_map) {
}
}
+EditorUndoRedoManager::History *EditorUndoRedoManager::_get_newest_undo() {
+ History *selected_history = nullptr;
+ double global_timestamp = 0;
+
+ // Pick the history with greatest last action timestamp (either global or current scene).
+ {
+ History &history = get_or_create_history(GLOBAL_HISTORY);
+ if (!history.undo_stack.is_empty()) {
+ selected_history = &history;
+ global_timestamp = history.undo_stack.back()->get().timestamp;
+ }
+ }
+
+ {
+ History &history = get_or_create_history(REMOTE_HISTORY);
+ if (!history.undo_stack.is_empty() && history.undo_stack.back()->get().timestamp > global_timestamp) {
+ selected_history = &history;
+ global_timestamp = history.undo_stack.back()->get().timestamp;
+ }
+ }
+
+ {
+ History &history = get_or_create_history(EditorNode::get_editor_data().get_current_edited_scene_history_id());
+ if (!history.undo_stack.is_empty() && history.undo_stack.back()->get().timestamp > global_timestamp) {
+ selected_history = &history;
+ }
+ }
+
+ return selected_history;
+}
+
void EditorUndoRedoManager::_bind_methods() {
ClassDB::bind_method(D_METHOD("create_action", "name", "merge_mode", "custom_context"), &EditorUndoRedoManager::create_action, DEFVAL(UndoRedo::MERGE_DISABLE), DEFVAL((Object *)nullptr));
ClassDB::bind_method(D_METHOD("commit_action", "execute"), &EditorUndoRedoManager::commit_action, DEFVAL(true));
@@ -431,10 +497,24 @@ void EditorUndoRedoManager::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_object_history_id", "object"), &EditorUndoRedoManager::get_history_id_for_object);
ClassDB::bind_method(D_METHOD("get_history_undo_redo", "id"), &EditorUndoRedoManager::get_history_undo_redo);
+ ADD_SIGNAL(MethodInfo("history_changed"));
+ ADD_SIGNAL(MethodInfo("version_changed"));
+
BIND_ENUM_CONSTANT(GLOBAL_HISTORY);
+ BIND_ENUM_CONSTANT(REMOTE_HISTORY);
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 c4d85daa22..10daeae807 100644
--- a/editor/editor_undo_redo_manager.h
+++ b/editor/editor_undo_redo_manager.h
@@ -1,50 +1,52 @@
-/*************************************************************************/
-/* editor_undo_redo_manager.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_undo_redo_manager.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 EDITOR_UNDO_REDO_MANAGER_H
#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 {
GLOBAL_HISTORY = 0,
+ REMOTE_HISTORY = -9,
INVALID_HISTORY = -99,
};
-private:
struct Action {
int history_id = INVALID_HISTORY;
double timestamp = 0;
@@ -60,11 +62,14 @@ private:
List<Action> redo_stack;
};
+private:
HashMap<int, History> history_map;
Action pending_action;
bool is_committing = false;
+ History *_get_newest_undo();
+
protected:
static void _bind_methods();
@@ -114,7 +119,9 @@ public:
bool is_committing_action() const;
bool undo();
+ bool undo_history(int p_id);
bool redo();
+ bool redo_history(int p_id);
void clear_history(bool p_increase_version = true, int p_idx = INVALID_HISTORY);
void set_history_as_saved(int p_idx);
@@ -124,8 +131,12 @@ public:
bool has_redo();
String get_current_action_name();
+ 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_vcs_interface.cpp b/editor/editor_vcs_interface.cpp
index d22c7bd149..96a43c00e5 100644
--- a/editor/editor_vcs_interface.cpp
+++ b/editor/editor_vcs_interface.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_vcs_interface.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_vcs_interface.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 "editor_vcs_interface.h"
@@ -57,7 +57,7 @@ void EditorVCSInterface::set_credentials(String p_username, String p_password, S
}
List<String> EditorVCSInterface::get_remotes() {
- TypedArray<Dictionary> result;
+ TypedArray<String> result;
if (!GDVIRTUAL_CALL(_get_remotes, result)) {
UNIMPLEMENTED();
return {};
@@ -137,7 +137,7 @@ List<EditorVCSInterface::Commit> EditorVCSInterface::get_previous_commits(int p_
}
List<String> EditorVCSInterface::get_branch_list() {
- TypedArray<Dictionary> result;
+ TypedArray<String> result;
if (!GDVIRTUAL_CALL(_get_branch_list, result)) {
UNIMPLEMENTED();
return {};
diff --git a/editor/editor_vcs_interface.h b/editor/editor_vcs_interface.h
index 5d4901cefa..814baeb37c 100644
--- a/editor/editor_vcs_interface.h
+++ b/editor/editor_vcs_interface.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_vcs_interface.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_vcs_interface.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 EDITOR_VCS_INTERFACE_H
#define EDITOR_VCS_INTERFACE_H
@@ -117,8 +117,8 @@ protected:
GDVIRTUAL0R(bool, _shut_down);
GDVIRTUAL0R(String, _get_vcs_name);
GDVIRTUAL1R(TypedArray<Dictionary>, _get_previous_commits, int);
- GDVIRTUAL0R(TypedArray<Dictionary>, _get_branch_list);
- GDVIRTUAL0R(TypedArray<Dictionary>, _get_remotes);
+ GDVIRTUAL0R(TypedArray<String>, _get_branch_list);
+ GDVIRTUAL0R(TypedArray<String>, _get_remotes);
GDVIRTUAL1(_create_branch, String);
GDVIRTUAL1(_remove_branch, String);
GDVIRTUAL2(_create_remote, String, String);
diff --git a/editor/editor_zoom_widget.cpp b/editor/editor_zoom_widget.cpp
index 88e99d9b30..5a334bdaa6 100644
--- a/editor/editor_zoom_widget.cpp
+++ b/editor/editor_zoom_widget.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_zoom_widget.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_zoom_widget.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 "editor_zoom_widget.h"
@@ -161,13 +161,19 @@ void EditorZoomWidget::_bind_methods() {
ADD_SIGNAL(MethodInfo("zoom_changed", PropertyInfo(Variant::FLOAT, "zoom")));
}
+void EditorZoomWidget::set_shortcut_context(Node *p_node) const {
+ zoom_minus->set_shortcut_context(p_node);
+ zoom_plus->set_shortcut_context(p_node);
+ zoom_reset->set_shortcut_context(p_node);
+}
+
EditorZoomWidget::EditorZoomWidget() {
// Zoom buttons
zoom_minus = memnew(Button);
zoom_minus->set_flat(true);
add_child(zoom_minus);
zoom_minus->connect("pressed", callable_mp(this, &EditorZoomWidget::_button_zoom_minus));
- zoom_minus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_minus", TTR("Zoom Out"), KeyModifierMask::CMD_OR_CTRL | Key::MINUS));
+ zoom_minus->set_shortcut(ED_SHORTCUT_ARRAY("canvas_item_editor/zoom_minus", TTR("Zoom Out"), { int32_t(KeyModifierMask::CMD_OR_CTRL | Key::MINUS), int32_t(KeyModifierMask::CMD_OR_CTRL | Key::KP_SUBTRACT) }));
zoom_minus->set_shortcut_context(this);
zoom_minus->set_focus_mode(FOCUS_NONE);
@@ -189,7 +195,7 @@ EditorZoomWidget::EditorZoomWidget() {
zoom_plus->set_flat(true);
add_child(zoom_plus);
zoom_plus->connect("pressed", callable_mp(this, &EditorZoomWidget::_button_zoom_plus));
- zoom_plus->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_plus", TTR("Zoom In"), KeyModifierMask::CMD_OR_CTRL | Key::EQUAL)); // Usually direct access key for PLUS
+ zoom_plus->set_shortcut(ED_SHORTCUT_ARRAY("canvas_item_editor/zoom_plus", TTR("Zoom In"), { int32_t(KeyModifierMask::CMD_OR_CTRL | Key::EQUAL), int32_t(KeyModifierMask::CMD_OR_CTRL | Key::KP_ADD) }));
zoom_plus->set_shortcut_context(this);
zoom_plus->set_focus_mode(FOCUS_NONE);
diff --git a/editor/editor_zoom_widget.h b/editor/editor_zoom_widget.h
index 4690a57a2b..be54043d93 100644
--- a/editor/editor_zoom_widget.h
+++ b/editor/editor_zoom_widget.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_zoom_widget.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_zoom_widget.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 EDITOR_ZOOM_WIDGET_H
#define EDITOR_ZOOM_WIDGET_H
@@ -57,6 +57,8 @@ public:
float get_zoom();
void set_zoom(float p_zoom);
void set_zoom_by_increments(int p_increment_count, bool p_integer_only = false);
+ // Sets the shortcut context for the zoom buttons. By default their context is this EditorZoomWidget control.
+ void set_shortcut_context(Node *p_node) const;
};
#endif // EDITOR_ZOOM_WIDGET_H
diff --git a/editor/event_listener_line_edit.cpp b/editor/event_listener_line_edit.cpp
new file mode 100644
index 0000000000..274fe34c52
--- /dev/null
+++ b/editor/event_listener_line_edit.cpp
@@ -0,0 +1,204 @@
+/**************************************************************************/
+/* event_listener_line_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 "editor/event_listener_line_edit.h"
+
+#include "core/input/input_map.h"
+
+// Maps to 2*axis if value is neg, or 2*axis+1 if value is pos.
+static const char *_joy_axis_descriptions[(size_t)JoyAxis::MAX * 2] = {
+ TTRC("Left Stick Left, Joystick 0 Left"),
+ TTRC("Left Stick Right, Joystick 0 Right"),
+ TTRC("Left Stick Up, Joystick 0 Up"),
+ TTRC("Left Stick Down, Joystick 0 Down"),
+ TTRC("Right Stick Left, Joystick 1 Left"),
+ TTRC("Right Stick Right, Joystick 1 Right"),
+ TTRC("Right Stick Up, Joystick 1 Up"),
+ TTRC("Right Stick Down, Joystick 1 Down"),
+ TTRC("Joystick 2 Left"),
+ TTRC("Left Trigger, Sony L2, Xbox LT, Joystick 2 Right"),
+ TTRC("Joystick 2 Up"),
+ TTRC("Right Trigger, Sony R2, Xbox RT, Joystick 2 Down"),
+ TTRC("Joystick 3 Left"),
+ TTRC("Joystick 3 Right"),
+ TTRC("Joystick 3 Up"),
+ TTRC("Joystick 3 Down"),
+ TTRC("Joystick 4 Left"),
+ TTRC("Joystick 4 Right"),
+ TTRC("Joystick 4 Up"),
+ TTRC("Joystick 4 Down"),
+};
+
+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();
+
+ Ref<InputEventKey> key = p_event;
+ if (key.is_valid() && key->is_command_or_control_autoremap()) {
+#ifdef MACOS_ENABLED
+ text = text.replace("Command", "Command/Ctrl");
+#else
+ text = text.replace("Ctrl", "Command/Ctrl");
+#endif
+ }
+ Ref<InputEventMouse> mouse = p_event;
+ Ref<InputEventJoypadMotion> jp_motion = p_event;
+ Ref<InputEventJoypadButton> jp_button = p_event;
+ if (jp_motion.is_valid()) {
+ // Joypad motion events will display slightly differently than what the event->as_text() provides. See #43660.
+ String desc = TTR("Unknown Joypad Axis");
+ if (jp_motion->get_axis() < JoyAxis::MAX) {
+ desc = RTR(_joy_axis_descriptions[2 * (size_t)jp_motion->get_axis() + (jp_motion->get_axis_value() < 0 ? 0 : 1)]);
+ }
+
+ text = vformat("Joypad Axis %s %s (%s)", itos((int64_t)jp_motion->get_axis()), jp_motion->get_axis_value() < 0 ? "-" : "+", desc);
+ }
+ if (p_include_device && (mouse.is_valid() || jp_button.is_valid() || jp_motion.is_valid())) {
+ String device_string = get_device_string(p_event->get_device());
+ text += vformat(" - %s", device_string);
+ }
+
+ return text;
+}
+
+String EventListenerLineEdit::get_device_string(int p_device) {
+ if (p_device == InputMap::ALL_DEVICES) {
+ return TTR("All Devices");
+ }
+ return TTR("Device") + " " + itos(p_device);
+}
+
+bool EventListenerLineEdit::_is_event_allowed(const Ref<InputEvent> &p_event) const {
+ const Ref<InputEventMouseButton> mb = p_event;
+ const Ref<InputEventKey> k = p_event;
+ const Ref<InputEventJoypadButton> jb = p_event;
+ const Ref<InputEventJoypadMotion> jm = p_event;
+
+ return (mb.is_valid() && (allowed_input_types & INPUT_MOUSE_BUTTON)) ||
+ (k.is_valid() && (allowed_input_types & INPUT_KEY)) ||
+ (jb.is_valid() && (allowed_input_types & INPUT_JOY_BUTTON)) ||
+ (jm.is_valid() && (allowed_input_types & INPUT_JOY_MOTION));
+}
+
+void EventListenerLineEdit::gui_input(const Ref<InputEvent> &p_event) {
+ const Ref<InputEventMouseMotion> mm = p_event;
+ if (mm.is_valid()) {
+ LineEdit::gui_input(p_event);
+ return;
+ }
+
+ // Allow mouse button click on the clear button without being treated as an event.
+ const Ref<InputEventMouseButton> b = p_event;
+ if (b.is_valid() && _is_over_clear_button(b->get_position())) {
+ LineEdit::gui_input(p_event);
+ return;
+ }
+
+ // First event will be an event which is used to focus this control - i.e. a mouse click, or a tab press.
+ // Ignore the first one so that clicking into the LineEdit does not override the current event.
+ // Ignore is reset to true when the control is unfocused.
+ // This class also specially handles grab_focus() calls.
+ if (ignore_next_event) {
+ ignore_next_event = false;
+ return;
+ }
+
+ accept_event();
+ if (!p_event->is_pressed() || p_event->is_echo() || p_event->is_match(event) || !_is_event_allowed(p_event)) {
+ return;
+ }
+
+ event = p_event;
+ set_text(get_event_text(event, false));
+ emit_signal("event_changed", event);
+}
+
+void EventListenerLineEdit::_on_text_changed(const String &p_text) {
+ if (p_text.is_empty()) {
+ clear_event();
+ }
+}
+
+void EventListenerLineEdit::_on_focus() {
+ set_placeholder(TTR("Listening for input..."));
+}
+
+void EventListenerLineEdit::_on_unfocus() {
+ ignore_next_event = true;
+ set_placeholder(TTR("Filter by event..."));
+}
+
+Ref<InputEvent> EventListenerLineEdit::get_event() const {
+ return event;
+}
+
+void EventListenerLineEdit::clear_event() {
+ if (event.is_valid()) {
+ event = Ref<InputEvent>();
+ set_text("");
+ emit_signal("event_changed", event);
+ }
+}
+
+void EventListenerLineEdit::set_allowed_input_types(int p_type_masks) {
+ allowed_input_types = p_type_masks;
+}
+
+int EventListenerLineEdit::get_allowed_input_types() const {
+ return allowed_input_types;
+}
+
+void EventListenerLineEdit::grab_focus() {
+ // If we grab focus through code, we don't need to ignore the first event!
+ ignore_next_event = false;
+ Control::grab_focus();
+}
+
+void EventListenerLineEdit::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ connect("text_changed", callable_mp(this, &EventListenerLineEdit::_on_text_changed));
+ connect("focus_entered", callable_mp(this, &EventListenerLineEdit::_on_focus));
+ connect("focus_exited", callable_mp(this, &EventListenerLineEdit::_on_unfocus));
+ set_right_icon(get_theme_icon(SNAME("Keyboard"), SNAME("EditorIcons")));
+ set_clear_button_enabled(true);
+ } break;
+ }
+}
+
+void EventListenerLineEdit::_bind_methods() {
+ ADD_SIGNAL(MethodInfo("event_changed", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
+}
+
+EventListenerLineEdit::EventListenerLineEdit() {
+ set_caret_blink_enabled(false);
+ set_placeholder(TTR("Filter by event..."));
+}
diff --git a/editor/event_listener_line_edit.h b/editor/event_listener_line_edit.h
new file mode 100644
index 0000000000..aa0cc91d47
--- /dev/null
+++ b/editor/event_listener_line_edit.h
@@ -0,0 +1,79 @@
+/**************************************************************************/
+/* event_listener_line_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 EVENT_LISTENER_LINE_EDIT_H
+#define EVENT_LISTENER_LINE_EDIT_H
+
+#include "scene/gui/line_edit.h"
+
+enum InputType {
+ INPUT_KEY = 1,
+ INPUT_MOUSE_BUTTON = 2,
+ INPUT_JOY_BUTTON = 4,
+ INPUT_JOY_MOTION = 8
+};
+
+class EventListenerLineEdit : public LineEdit {
+ GDCLASS(EventListenerLineEdit, LineEdit)
+
+ int allowed_input_types = INPUT_KEY | INPUT_MOUSE_BUTTON | INPUT_JOY_BUTTON | INPUT_JOY_MOTION;
+ bool ignore_next_event = true;
+ bool share_keycodes = false;
+ Ref<InputEvent> event;
+
+ bool _is_event_allowed(const Ref<InputEvent> &p_event) const;
+
+ void gui_input(const Ref<InputEvent> &p_event) override;
+ void _on_text_changed(const String &p_text);
+
+ void _on_focus();
+ void _on_unfocus();
+
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
+
+public:
+ static String get_event_text(const Ref<InputEvent> &p_event, bool p_include_device);
+ static String get_device_string(int p_device);
+
+ Ref<InputEvent> get_event() const;
+ void clear_event();
+
+ void set_allowed_input_types(int p_type_masks);
+ int get_allowed_input_types() const;
+
+ void grab_focus();
+
+public:
+ EventListenerLineEdit();
+};
+
+#endif // EVENT_LISTENER_LINE_EDIT_H
diff --git a/editor/export/editor_export.cpp b/editor/export/editor_export.cpp
index 29b6a5e546..1d147cc5b9 100644
--- a/editor/export/editor_export.cpp
+++ b/editor/export/editor_export.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_export.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_export.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 "editor_export.h"
@@ -77,7 +77,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,7 +123,7 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in
}
String EditorExportPlatform::test_etc2() const {
- const bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
+ const bool etc2_supported = GLOBAL_GET("rendering/textures/vram_compression/import_etc2");
if (!etc2_supported) {
return TTR("Target platform requires 'ETC2' texture compression. Enable 'Import Etc 2' in Project Settings.");
@@ -170,6 +169,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;
}
}
@@ -258,9 +263,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.h b/editor/export/editor_export.h
index 13c3c34cea..343686a4cf 100644
--- a/editor/export/editor_export.h
+++ b/editor/export/editor_export.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_export.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_export.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 EDITOR_EXPORT_H
#define EDITOR_EXPORT_H
diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp
index 2a444bb04f..cacd181ad8 100644
--- a/editor/export/editor_export_platform.cpp
+++ b/editor/export/editor_export_platform.cpp
@@ -1,38 +1,38 @@
-/*************************************************************************/
-/* editor_export_platform.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_export_platform.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 "editor_export_platform.h"
#include "core/config/project_settings.h"
#include "core/crypto/crypto_core.h"
-#include "core/extension/native_extension.h"
+#include "core/extension/gdextension.h"
#include "core/io/file_access_encrypted.h"
#include "core/io/file_access_pack.h" // PACK_HEADER_MAGIC, PACK_FORMAT_VERSION
#include "core/io/zip_io.h"
@@ -77,7 +77,7 @@ bool EditorExportPlatform::fill_log_messages(RichTextLabel *p_log, Error p_err)
} else {
p_log->add_image(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("StatusSuccess"), SNAME("EditorIcons")), 16 * EDSCALE, 16 * EDSCALE, Color(1.0, 1.0, 1.0), INLINE_ALIGNMENT_CENTER);
p_log->add_text(" ");
- p_log->add_text(TTR("Completed sucessfully."));
+ p_log->add_text(TTR("Completed successfully."));
if (msg_count > 0) {
has_messages = true;
}
@@ -136,16 +136,16 @@ bool EditorExportPlatform::fill_log_messages(RichTextLabel *p_log, Error p_err)
}
void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags) {
- String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
- int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
+ String host = EDITOR_GET("network/debug/remote_host");
+ int remote_port = (int)EDITOR_GET("network/debug/remote_port");
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST) {
host = "localhost";
}
if (p_flags & DEBUG_FLAG_DUMB_CLIENT) {
- int port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
- String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
+ int port = EDITOR_GET("filesystem/file_server/port");
+ String passwd = EDITOR_GET("filesystem/file_server/password");
r_flags.push_back("--remote-fs");
r_flags.push_back(host + ":" + itos(port));
if (!passwd.is_empty()) {
@@ -176,7 +176,7 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
}
}
- if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) {
+ if (p_flags & DEBUG_FLAG_VIEW_COLLISIONS) {
r_flags.push_back("--debug-collisions");
}
@@ -442,10 +442,13 @@ HashSet<String> EditorExportPlatform::get_features(const Ref<EditorExportPreset>
result.insert(E);
}
+ result.insert("template");
if (p_debug) {
result.insert("debug");
+ result.insert("template_debug");
} else {
result.insert("release");
+ result.insert("template_release");
}
if (!p_preset->get_custom_features().is_empty()) {
@@ -710,7 +713,7 @@ String EditorExportPlatform::_export_customize(const String &p_path, LocalVector
if (type == "PackedScene") { // Its a scene.
Ref<PackedScene> ps = ResourceLoader::load(p_path, "PackedScene", ResourceFormatLoader::CACHE_MODE_IGNORE);
ERR_FAIL_COND_V(ps.is_null(), p_path);
- Node *node = ps->instantiate();
+ 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++) {
@@ -783,6 +786,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
HashSet<String> paths;
Vector<String> path_remaps;
+ paths.insert(ProjectSettings::get_singleton()->get_project_data_path().path_join("global_script_class_cache.cfg"));
if (p_preset->get_export_filter() == EditorExportPreset::EXPORT_ALL_RESOURCES) {
//find stuff
_export_find_resources(EditorFileSystem::get_singleton()->get_filesystem(), paths);
@@ -813,7 +817,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
continue;
}
- String autoload_path = ProjectSettings::get_singleton()->get(pi.name);
+ String autoload_path = GLOBAL_GET(pi.name);
if (autoload_path.begins_with("*")) {
autoload_path = autoload_path.substr(1);
@@ -1034,7 +1038,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
return err;
}
// Now actual remapped file:
- sarr = FileAccess::get_file_as_array(export_path);
+ sarr = FileAccess::get_file_as_bytes(export_path);
err = p_func(p_udata, export_path, sarr, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1053,7 +1057,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
if (importer_type == "keep") {
//just keep file as-is
- Vector<uint8_t> array = FileAccess::get_file_as_array(path);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(path);
err = p_func(p_udata, path, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
@@ -1086,14 +1090,14 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
String remap = F;
if (remap == "path") {
String remapped_path = config->get_value("remap", remap);
- Vector<uint8_t> array = FileAccess::get_file_as_array(remapped_path);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(remapped_path);
err = p_func(p_udata, remapped_path, array, idx, total, enc_in_filters, enc_ex_filters, key);
} else if (remap.begins_with("path.")) {
String feature = remap.get_slice(".", 1);
if (remap_features.has(feature)) {
String remapped_path = config->get_value("remap", remap);
- Vector<uint8_t> array = FileAccess::get_file_as_array(remapped_path);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(remapped_path);
err = p_func(p_udata, remapped_path, array, idx, total, enc_in_filters, enc_ex_filters, key);
}
}
@@ -1104,7 +1108,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
//also save the .import file
- Vector<uint8_t> array = FileAccess::get_file_as_array(path + ".import");
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(path + ".import");
err = p_func(p_udata, path + ".import", array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
@@ -1164,7 +1168,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
path_remaps.push_back(export_path);
}
- Vector<uint8_t> array = FileAccess::get_file_as_array(export_path);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(export_path);
err = p_func(p_udata, export_path, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1241,17 +1245,17 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
// Store icon and splash images directly, they need to bypass the import system and be loaded as images
- String icon = ProjectSettings::get_singleton()->get("application/config/icon");
- String splash = ProjectSettings::get_singleton()->get("application/boot_splash/image");
+ String icon = GLOBAL_GET("application/config/icon");
+ String splash = GLOBAL_GET("application/boot_splash/image");
if (!icon.is_empty() && FileAccess::exists(icon)) {
- Vector<uint8_t> array = FileAccess::get_file_as_array(icon);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(icon);
err = p_func(p_udata, icon, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
}
}
if (!splash.is_empty() && FileAccess::exists(splash) && icon != splash) {
- Vector<uint8_t> array = FileAccess::get_file_as_array(splash);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(splash);
err = p_func(p_udata, splash, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1259,16 +1263,16 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
String resource_cache_file = ResourceUID::get_cache_file();
if (FileAccess::exists(resource_cache_file)) {
- Vector<uint8_t> array = FileAccess::get_file_as_array(resource_cache_file);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(resource_cache_file);
err = p_func(p_udata, resource_cache_file, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
}
}
- String extension_list_config_file = NativeExtension::get_extension_list_config_file();
+ String extension_list_config_file = GDExtension::get_extension_list_config_file();
if (FileAccess::exists(extension_list_config_file)) {
- Vector<uint8_t> array = FileAccess::get_file_as_array(extension_list_config_file);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(extension_list_config_file);
err = p_func(p_udata, extension_list_config_file, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1277,12 +1281,12 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
// Store text server data if it is supported.
if (TS->has_feature(TextServer::FEATURE_USE_SUPPORT_DATA)) {
- bool use_data = ProjectSettings::get_singleton()->get("internationalization/locale/include_text_server_data");
+ bool use_data = GLOBAL_GET("internationalization/locale/include_text_server_data");
if (use_data) {
// Try using user provided data file.
String ts_data = "res://" + TS->get_support_data_filename();
if (FileAccess::exists(ts_data)) {
- Vector<uint8_t> array = FileAccess::get_file_as_array(ts_data);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(ts_data);
err = p_func(p_udata, ts_data, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1291,7 +1295,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
// 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);
- Vector<uint8_t> array = FileAccess::get_file_as_array(icu_data_file);
+ 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);
if (err != OK) {
@@ -1304,7 +1308,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
String config_file = "project.binary";
String engine_cfb = EditorPaths::get_singleton()->get_cache_dir().path_join("tmp" + config_file);
ProjectSettings::get_singleton()->save_custom(engine_cfb, custom_map, custom_list);
- Vector<uint8_t> data = FileAccess::get_file_as_array(engine_cfb);
+ Vector<uint8_t> data = FileAccess::get_file_as_bytes(engine_cfb);
DirAccess::remove_file_or_error(engine_cfb);
return p_func(p_udata, "res://" + config_file, data, idx, total, enc_in_filters, enc_ex_filters, key);
@@ -1319,6 +1323,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);
@@ -1569,16 +1688,16 @@ Error EditorExportPlatform::export_zip(const Ref<EditorExportPreset> &p_preset,
}
void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) {
- String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
- int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
+ String host = EDITOR_GET("network/debug/remote_host");
+ int remote_port = (int)EDITOR_GET("network/debug/remote_port");
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST) {
host = "localhost";
}
if (p_flags & DEBUG_FLAG_DUMB_CLIENT) {
- int port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
- String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
+ int port = EDITOR_GET("filesystem/file_server/port");
+ String passwd = EDITOR_GET("filesystem/file_server/password");
r_flags.push_back("--remote-fs");
r_flags.push_back(host + ":" + itos(port));
if (!passwd.is_empty()) {
@@ -1609,7 +1728,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
}
}
- if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) {
+ if (p_flags & DEBUG_FLAG_VIEW_COLLISIONS) {
r_flags.push_back("--debug-collisions");
}
@@ -1619,21 +1738,142 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
}
bool EditorExportPlatform::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
+ bool valid = true;
+#ifndef ANDROID_ENABLED
String templates_error;
- bool valid_export_configuration = has_valid_export_configuration(p_preset, templates_error, r_missing_templates);
-
- String project_configuration_error;
- bool valid_project_configuration = has_valid_project_configuration(p_preset, project_configuration_error);
+ valid = valid && has_valid_export_configuration(p_preset, templates_error, r_missing_templates);
if (!templates_error.is_empty()) {
r_error += templates_error;
}
+#endif
+
+ String project_configuration_error;
+ valid = valid && has_valid_project_configuration(p_preset, project_configuration_error);
if (!project_configuration_error.is_empty()) {
r_error += project_configuration_error;
}
- return valid_export_configuration && valid_project_configuration;
+ 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);
+ 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);
+ 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);
+ 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 93bc54284f..1fb35759ac 100644
--- a/editor/export/editor_export_platform.h
+++ b/editor/export/editor_export_platform.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_export_platform.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_export_platform.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 EDITOR_EXPORT_PLATFORM_H
#define 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"
@@ -92,7 +93,6 @@ private:
void _export_find_resources(EditorFileSystemDirectory *p_dir, 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);
@@ -126,6 +126,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;
@@ -144,6 +151,7 @@ public:
};
virtual Ref<EditorExportPreset> create_preset();
+ virtual bool is_executable(const String &p_path) const { return false; }
virtual void clear_messages() { messages.clear(); }
virtual void add_message(ExportMessageType p_type, const String &p_category, const String &p_message) {
@@ -210,10 +218,11 @@ public:
DEBUG_FLAG_DUMB_CLIENT = 1,
DEBUG_FLAG_REMOTE_DEBUG = 2,
DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST = 4,
- DEBUG_FLAG_VIEW_COLLISONS = 8,
+ DEBUG_FLAG_VIEW_COLLISIONS = 8,
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(); }
diff --git a/editor/export/editor_export_platform_pc.cpp b/editor/export/editor_export_platform_pc.cpp
index 8538414523..bbfd73be5e 100644
--- a/editor/export/editor_export_platform_pc.cpp
+++ b/editor/export/editor_export_platform_pc.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_export_platform_pc.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_export_platform_pc.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 "editor_export_platform_pc.h"
@@ -146,9 +146,16 @@ Error EditorExportPlatformPC::prepare_template(const Ref<EditorExportPreset> &p_
return ERR_FILE_NOT_FOUND;
}
+ String wrapper_template_path = template_path.get_basename() + "_console.exe";
+ int con_wrapper_mode = p_preset->get("debug/export_console_script");
+ bool copy_wrapper = (con_wrapper_mode == 1 && p_debug) || (con_wrapper_mode == 2);
+
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
da->make_dir_recursive(p_path.get_base_dir());
Error err = da->copy(template_path, p_path, get_chmod_flags());
+ if (err == OK && copy_wrapper && FileAccess::exists(wrapper_template_path)) {
+ err = da->copy(wrapper_template_path, p_path.get_basename() + ".console.exe", get_chmod_flags());
+ }
if (err != OK) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Template"), TTR("Failed to copy export template."));
}
@@ -185,10 +192,12 @@ Error EditorExportPlatformPC::export_project_data(const Ref<EditorExportPreset>
String src_path = ProjectSettings::get_singleton()->globalize_path(so_files[i].path);
String target_path;
if (so_files[i].target.is_empty()) {
- target_path = p_path.get_base_dir().path_join(src_path.get_file());
+ target_path = p_path.get_base_dir();
} else {
- target_path = p_path.get_base_dir().path_join(so_files[i].target).path_join(src_path.get_file());
+ target_path = p_path.get_base_dir().path_join(so_files[i].target);
+ da->make_dir_recursive(target_path);
}
+ target_path = target_path.path_join(src_path.get_file());
if (da->dir_exists(src_path)) {
err = da->make_dir_recursive(target_path);
diff --git a/editor/export/editor_export_platform_pc.h b/editor/export/editor_export_platform_pc.h
index cf96db6c2d..8c24f2fc68 100644
--- a/editor/export/editor_export_platform_pc.h
+++ b/editor/export/editor_export_platform_pc.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_export_platform_pc.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_export_platform_pc.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 EDITOR_EXPORT_PLATFORM_PC_H
#define 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 971ea579cc..784dbc116a 100644
--- a/editor/export/editor_export_plugin.cpp
+++ b/editor/export/editor_export_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_export_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_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 "editor_export_plugin.h"
@@ -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"
@@ -142,42 +143,32 @@ void EditorExportPlugin::_export_end_script() {
bool EditorExportPlugin::_begin_customize_resources(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) const {
bool ret = false;
- if (GDVIRTUAL_CALL(_begin_customize_resources, p_platform, p_features, ret)) {
- return ret;
- }
- return false;
+ GDVIRTUAL_CALL(_begin_customize_resources, p_platform, p_features, ret);
+ return ret;
}
Ref<Resource> EditorExportPlugin::_customize_resource(const Ref<Resource> &p_resource, const String &p_path) {
Ref<Resource> ret;
- if (GDVIRTUAL_REQUIRED_CALL(_customize_resource, p_resource, p_path, ret)) {
- return ret;
- }
- return Ref<Resource>();
+ GDVIRTUAL_REQUIRED_CALL(_customize_resource, p_resource, p_path, ret);
+ return ret;
}
bool EditorExportPlugin::_begin_customize_scenes(const Ref<EditorExportPlatform> &p_platform, const Vector<String> &p_features) const {
bool ret = false;
- if (GDVIRTUAL_CALL(_begin_customize_scenes, p_platform, p_features, ret)) {
- return ret;
- }
- return false;
+ GDVIRTUAL_CALL(_begin_customize_scenes, p_platform, p_features, ret);
+ return ret;
}
Node *EditorExportPlugin::_customize_scene(Node *p_root, const String &p_path) {
Node *ret = nullptr;
- if (GDVIRTUAL_REQUIRED_CALL(_customize_scene, p_root, p_path, ret)) {
- return ret;
- }
- return nullptr;
+ GDVIRTUAL_REQUIRED_CALL(_customize_scene, p_root, p_path, ret);
+ return ret;
}
uint64_t EditorExportPlugin::_get_customization_configuration_hash() const {
uint64_t ret = 0;
- if (GDVIRTUAL_REQUIRED_CALL(_get_customization_configuration_hash, ret)) {
- return ret;
- }
- return 0;
+ GDVIRTUAL_REQUIRED_CALL(_get_customization_configuration_hash, ret);
+ return ret;
}
void EditorExportPlugin::_end_customize_scenes() {
@@ -190,10 +181,8 @@ void EditorExportPlugin::_end_customize_resources() {
String EditorExportPlugin::_get_name() const {
String ret;
- if (GDVIRTUAL_REQUIRED_CALL(_get_name, ret)) {
- return ret;
- }
- return "";
+ GDVIRTUAL_REQUIRED_CALL(_get_name, ret);
+ return ret;
}
void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) {
@@ -238,4 +227,8 @@ void EditorExportPlugin::_bind_methods() {
}
EditorExportPlugin::EditorExportPlugin() {
+ GLOBAL_DEF("editor/export/convert_text_resources_to_binary", false);
+
+ 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 3f37ed40be..5ac0a70c3e 100644
--- a/editor/export/editor_export_plugin.h
+++ b/editor/export/editor_export_plugin.h
@@ -1,37 +1,37 @@
-/*************************************************************************/
-/* editor_export_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_export_plugin.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 EDITOR_EXPORT_PLUGIN_H
#define EDITOR_EXPORT_PLUGIN_H
-#include "core/extension/native_extension.h"
+#include "core/extension/gdextension.h"
#include "editor_export_preset.h"
#include "editor_export_shared_object.h"
#include "scene/main/node.h"
diff --git a/editor/export/editor_export_preset.cpp b/editor/export/editor_export_preset.cpp
index 4411ad11bc..c6365806b3 100644
--- a/editor/export/editor_export_preset.cpp
+++ b/editor/export/editor_export_preset.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_export_preset.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_export_preset.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 "editor_export.h"
@@ -203,15 +203,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 0c780c45cd..de208f410e 100644
--- a/editor/export/editor_export_preset.h
+++ b/editor/export/editor_export_preset.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_export_preset.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_export_preset.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 EDITOR_EXPORT_PRESET_H
#define EDITOR_EXPORT_PRESET_H
@@ -46,11 +46,6 @@ public:
EXCLUDE_SELECTED_RESOURCES,
};
- enum ScriptExportMode {
- MODE_SCRIPT_TEXT,
- MODE_SCRIPT_COMPILED,
- };
-
private:
Ref<EditorExportPlatform> platform;
ExportFilter export_filter = EXPORT_ALL_RESOURCES;
@@ -78,7 +73,6 @@ private:
bool enc_pck = false;
bool enc_directory = false;
- int script_mode = MODE_SCRIPT_COMPILED;
String script_key;
protected:
@@ -132,9 +126,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/editor_export_shared_object.h b/editor/export/editor_export_shared_object.h
index 558f403ca1..54e1314a42 100644
--- a/editor/export/editor_export_shared_object.h
+++ b/editor/export/editor_export_shared_object.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_export_shared_object.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_export_shared_object.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 EDITOR_EXPORT_SHARED_OBJECT_H
#define EDITOR_EXPORT_SHARED_OBJECT_H
diff --git a/editor/export/export_template_manager.cpp b/editor/export/export_template_manager.cpp
index ceb5b63293..658f797211 100644
--- a/editor/export/export_template_manager.cpp
+++ b/editor/export/export_template_manager.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* export_template_manager.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* export_template_manager.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 "export_template_manager.h"
@@ -40,6 +40,7 @@
#include "editor/editor_settings.h"
#include "editor/progress_dialog.h"
#include "scene/gui/file_dialog.h"
+#include "scene/gui/menu_button.h"
#include "scene/gui/separator.h"
#include "scene/gui/tree.h"
#include "scene/main/http_request.h"
@@ -265,9 +266,9 @@ void ExportTemplateManager::_refresh_mirrors_completed(int p_status, int p_code,
mirrors_available = false;
- Dictionary data = json.get_data();
- if (data.has("mirrors")) {
- Array mirrors = data["mirrors"];
+ Dictionary mirror_data = json.get_data();
+ if (mirror_data.has("mirrors")) {
+ Array mirrors = mirror_data["mirrors"];
for (int i = 0; i < mirrors.size(); i++) {
Dictionary m = mirrors[i];
@@ -401,17 +402,17 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
String file = String::utf8(fname);
if (file.ends_with("version.txt")) {
- Vector<uint8_t> data;
- data.resize(info.uncompressed_size);
+ Vector<uint8_t> uncomp_data;
+ uncomp_data.resize(info.uncompressed_size);
// Read.
unzOpenCurrentFile(pkg);
- ret = unzReadCurrentFile(pkg, data.ptrw(), data.size());
+ ret = unzReadCurrentFile(pkg, uncomp_data.ptrw(), uncomp_data.size());
ERR_BREAK_MSG(ret < 0, vformat("An error occurred while attempting to read from file: %s. This file will not be used.", file));
unzCloseCurrentFile(pkg);
String data_str;
- data_str.parse_utf8((const char *)data.ptr(), data.size());
+ data_str.parse_utf8((const char *)uncomp_data.ptr(), uncomp_data.size());
data_str = data_str.strip_edges();
// Version number should be of the form major.minor[.patch].status[.module_config]
@@ -473,12 +474,12 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
continue;
}
- Vector<uint8_t> data;
- data.resize(info.uncompressed_size);
+ Vector<uint8_t> uncomp_data;
+ uncomp_data.resize(info.uncompressed_size);
// Read
unzOpenCurrentFile(pkg);
- ret = unzReadCurrentFile(pkg, data.ptrw(), data.size());
+ ret = unzReadCurrentFile(pkg, uncomp_data.ptrw(), uncomp_data.size());
ERR_BREAK_MSG(ret < 0, vformat("An error occurred while attempting to read from file: %s. This file will not be used.", file));
unzCloseCurrentFile(pkg);
@@ -512,7 +513,7 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
ERR_CONTINUE_MSG(true, "Can't open file from path '" + String(to_write) + "'.");
}
- f->store_buffer(data.ptr(), data.size());
+ f->store_buffer(uncomp_data.ptr(), uncomp_data.size());
f.unref(); // close file.
#ifndef WINDOWS_ENABLED
FileAccess::set_unix_permissions(to_write, (info.external_fa >> 16) & 0x01FF);
@@ -714,12 +715,12 @@ Error ExportTemplateManager::install_android_template_from_file(const String &p_
String base_dir = path.get_base_dir();
if (!path.ends_with("/")) {
- Vector<uint8_t> data;
- data.resize(info.uncompressed_size);
+ Vector<uint8_t> uncomp_data;
+ uncomp_data.resize(info.uncompressed_size);
// Read.
unzOpenCurrentFile(pkg);
- unzReadCurrentFile(pkg, data.ptrw(), data.size());
+ unzReadCurrentFile(pkg, uncomp_data.ptrw(), uncomp_data.size());
unzCloseCurrentFile(pkg);
if (!dirs_tested.has(base_dir)) {
@@ -730,7 +731,7 @@ Error ExportTemplateManager::install_android_template_from_file(const String &p_
String to_write = String("res://android/build").path_join(path);
Ref<FileAccess> f = FileAccess::open(to_write, FileAccess::WRITE);
if (f.is_valid()) {
- f->store_buffer(data.ptr(), data.size());
+ f->store_buffer(uncomp_data.ptr(), uncomp_data.size());
f.unref(); // close file.
#ifndef WINDOWS_ENABLED
FileAccess::set_unix_permissions(to_write, (info.external_fa >> 16) & 0x01FF);
diff --git a/editor/export/export_template_manager.h b/editor/export/export_template_manager.h
index f01da15832..8c26554d13 100644
--- a/editor/export/export_template_manager.h
+++ b/editor/export/export_template_manager.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* export_template_manager.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* export_template_manager.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 EXPORT_TEMPLATE_MANAGER_H
#define EXPORT_TEMPLATE_MANAGER_H
diff --git a/editor/export/project_export.cpp b/editor/export/project_export.cpp
index 00a0e08d3a..2caebc6f04 100644
--- a/editor/export/project_export.cpp
+++ b/editor/export/project_export.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* project_export.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* project_export.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 "project_export.h"
@@ -37,9 +37,16 @@
#include "editor/editor_node.h"
#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/export/editor_export.h"
+#include "scene/gui/check_box.h"
#include "scene/gui/check_button.h"
+#include "scene/gui/item_list.h"
#include "scene/gui/link_button.h"
+#include "scene/gui/menu_button.h"
+#include "scene/gui/option_button.h"
+#include "scene/gui/split_container.h"
+#include "scene/gui/texture_rect.h"
#include "scene/gui/tree.h"
void ProjectExportDialog::_theme_changed() {
@@ -94,7 +101,7 @@ void ProjectExportDialog::_add_preset(int p_platform) {
Ref<EditorExportPreset> preset = EditorExport::get_singleton()->get_export_platform(p_platform)->create_preset();
ERR_FAIL_COND(!preset.is_valid());
- String name = EditorExport::get_singleton()->get_export_platform(p_platform)->get_name();
+ String preset_name = EditorExport::get_singleton()->get_export_platform(p_platform)->get_name();
bool make_runnable = true;
int attempt = 1;
while (true) {
@@ -105,7 +112,7 @@ void ProjectExportDialog::_add_preset(int p_platform) {
if (p->get_platform() == preset->get_platform() && p->is_runnable()) {
make_runnable = false;
}
- if (p->get_name() == name) {
+ if (p->get_name() == preset_name) {
valid = false;
break;
}
@@ -116,10 +123,10 @@ void ProjectExportDialog::_add_preset(int p_platform) {
}
attempt++;
- name = EditorExport::get_singleton()->get_export_platform(p_platform)->get_name() + " " + itos(attempt);
+ preset_name = EditorExport::get_singleton()->get_export_platform(p_platform)->get_name() + " " + itos(attempt);
}
- preset->set_name(name);
+ preset->set_name(preset_name);
if (make_runnable) {
preset->set_runnable(make_runnable);
}
@@ -154,12 +161,12 @@ void ProjectExportDialog::_update_presets() {
current_idx = i;
}
- String name = preset->get_name();
+ String preset_name = preset->get_name();
if (preset->is_runnable()) {
- name += " (" + TTR("Runnable") + ")";
+ preset_name += " (" + TTR("Runnable") + ")";
}
preset->update_files_to_export();
- presets->add_item(name, preset->get_platform()->get_logo());
+ presets->add_item(preset_name, preset->get_platform()->get_logo());
}
if (current_idx != -1) {
@@ -310,9 +317,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);
@@ -473,7 +477,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) {
@@ -506,19 +510,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;
@@ -552,7 +543,7 @@ void ProjectExportDialog::_duplicate_preset() {
Ref<EditorExportPreset> preset = current->get_platform()->create_preset();
ERR_FAIL_COND(!preset.is_valid());
- String name = current->get_name() + " (copy)";
+ String preset_name = current->get_name() + " (copy)";
bool make_runnable = true;
while (true) {
bool valid = true;
@@ -562,7 +553,7 @@ void ProjectExportDialog::_duplicate_preset() {
if (p->get_platform() == preset->get_platform() && p->is_runnable()) {
make_runnable = false;
}
- if (p->get_name() == name) {
+ if (p->get_name() == preset_name) {
valid = false;
break;
}
@@ -572,10 +563,10 @@ void ProjectExportDialog::_duplicate_preset() {
break;
}
- name += " (copy)";
+ preset_name += " (copy)";
}
- preset->set_name(name);
+ preset->set_name(preset_name);
if (make_runnable) {
preset->set_runnable(make_runnable);
}
@@ -865,10 +856,10 @@ void ProjectExportDialog::_validate_export_path(const String &p_path) {
if (invalid_path) {
export_project->get_ok_button()->set_disabled(true);
- export_project->get_line_edit()->disconnect("text_submitted", Callable(export_project, "_file_submitted"));
+ export_project->get_line_edit()->disconnect("text_submitted", callable_mp(export_project, &EditorFileDialog::_file_submitted));
} else {
export_project->get_ok_button()->set_disabled(false);
- export_project->get_line_edit()->connect("text_submitted", Callable(export_project, "_file_submitted"));
+ export_project->get_line_edit()->connect("text_submitted", callable_mp(export_project, &EditorFileDialog::_file_submitted));
}
}
@@ -901,9 +892,9 @@ void ProjectExportDialog::_export_project() {
// with _validate_export_path.
// FIXME: This is a hack, we should instead change EditorFileDialog to allow
// disabling validation by the "text_submitted" signal.
- if (!export_project->get_line_edit()->is_connected("text_submitted", Callable(export_project, "_file_submitted"))) {
+ if (!export_project->get_line_edit()->is_connected("text_submitted", callable_mp(export_project, &EditorFileDialog::_file_submitted))) {
export_project->get_ok_button()->set_disabled(false);
- export_project->get_line_edit()->connect("text_submitted", Callable(export_project, "_file_submitted"));
+ export_project->get_line_edit()->connect("text_submitted", callable_mp(export_project, &EditorFileDialog::_file_submitted));
}
export_project->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
@@ -932,8 +923,10 @@ void ProjectExportDialog::_export_project_to_path(const String &p_path) {
}
void ProjectExportDialog::_export_all_dialog() {
+#ifndef ANDROID_ENABLED
export_all_dialog->show();
export_all_dialog->popup_centered(Size2(300, 80));
+#endif
}
void ProjectExportDialog::_export_all_dialog_action(const String &p_str) {
@@ -943,8 +936,8 @@ void ProjectExportDialog::_export_all_dialog_action(const String &p_str) {
}
void ProjectExportDialog::_export_all(bool p_debug) {
- String mode = p_debug ? TTR("Debug") : TTR("Release");
- EditorProgress ep("exportall", TTR("Exporting All") + " " + mode, EditorExport::get_singleton()->get_export_preset_count(), true);
+ String export_target = p_debug ? TTR("Debug") : TTR("Release");
+ EditorProgress ep("exportall", TTR("Exporting All") + " " + export_target, EditorExport::get_singleton()->get_export_preset_count(), true);
bool show_dialog = false;
result_dialog_log->clear();
@@ -970,9 +963,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);
@@ -1013,10 +1003,7 @@ ProjectExportDialog::ProjectExportDialog() {
preset_vb->add_child(mc);
mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
presets = memnew(ItemList);
-#ifndef _MSC_VER
-#warning must reimplement drag forward
-#endif
- //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);
@@ -1108,12 +1095,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);
@@ -1194,11 +1175,16 @@ ProjectExportDialog::ProjectExportDialog() {
set_cancel_button_text(TTR("Close"));
set_ok_button_text(TTR("Export PCK/ZIP..."));
+ get_ok_button()->set_disabled(true);
+#ifdef ANDROID_ENABLED
+ export_button = memnew(Button);
+ export_button->hide();
+#else
export_button = add_button(TTR("Export Project..."), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "export");
+#endif
export_button->connect("pressed", callable_mp(this, &ProjectExportDialog::_export_project));
// Disable initially before we select a valid preset
export_button->set_disabled(true);
- get_ok_button()->set_disabled(true);
export_all_dialog = memnew(ConfirmationDialog);
add_child(export_all_dialog);
@@ -1208,8 +1194,14 @@ ProjectExportDialog::ProjectExportDialog() {
export_all_dialog->add_button(TTR("Debug"), true, "debug");
export_all_dialog->add_button(TTR("Release"), true, "release");
export_all_dialog->connect("custom_action", callable_mp(this, &ProjectExportDialog::_export_all_dialog_action));
+#ifdef ANDROID_ENABLED
+ export_all_dialog->hide();
+ export_all_button = memnew(Button);
+ export_all_button->hide();
+#else
export_all_button = add_button(TTR("Export All..."), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "export");
+#endif
export_all_button->connect("pressed", callable_mp(this, &ProjectExportDialog::_export_all_dialog));
export_all_button->set_disabled(true);
@@ -1279,7 +1271,7 @@ ProjectExportDialog::ProjectExportDialog() {
// If no default set, use project name
if (default_filename.is_empty()) {
// If no project name defined, use a sane default
- default_filename = ProjectSettings::get_singleton()->get("application/config/name");
+ default_filename = GLOBAL_GET("application/config/name");
if (default_filename.is_empty()) {
default_filename = "UnnamedProject";
}
diff --git a/editor/export/project_export.h b/editor/export/project_export.h
index 96dd765a2c..d392dba2a4 100644
--- a/editor/export/project_export.h
+++ b/editor/export/project_export.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* project_export.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* project_export.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 PROJECT_EXPORT_H
#define PROJECT_EXPORT_H
@@ -86,7 +86,6 @@ private:
LineEdit *custom_features = nullptr;
RichTextLabel *custom_feature_display = nullptr;
- OptionButton *script_mode = nullptr;
LineEdit *script_key = nullptr;
Label *script_key_error = nullptr;
@@ -152,7 +151,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
new file mode 100644
index 0000000000..2a005034a5
--- /dev/null
+++ b/editor/fbx_importer_manager.cpp
@@ -0,0 +1,154 @@
+/**************************************************************************/
+/* fbx_importer_manager.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 "fbx_importer_manager.h"
+
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "scene/gui/link_button.h"
+
+void FBXImporterManager::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_READY: {
+ connect("confirmed", callable_mp(this, &FBXImporterManager::_path_confirmed));
+ } break;
+ }
+}
+
+void FBXImporterManager::show_dialog(bool p_exclusive) {
+ String fbx2gltf_path = EDITOR_GET("filesystem/import/fbx/fbx2gltf_path");
+ fbx_path->set_text(fbx2gltf_path);
+ _validate_path(fbx2gltf_path);
+
+ set_flag(Window::FLAG_BORDERLESS, p_exclusive); // Avoid closing accidentally .
+ set_close_on_escape(!p_exclusive);
+
+ popup_centered();
+}
+
+void FBXImporterManager::_validate_path(const String &p_path) {
+ String error;
+ bool success = false;
+
+ if (p_path == "") {
+ error = TTR("Path to FBX2glTF executable is empty.");
+ } else if (!FileAccess::exists(p_path)) {
+ error = TTR("Path to FBX2glTF executable is invalid.");
+ } else {
+ List<String> args;
+ args.push_back("--version");
+ int exitcode;
+ Error err = OS::get_singleton()->execute(p_path, args, nullptr, &exitcode);
+
+ if (err == OK && exitcode == 0) {
+ success = true;
+ } else {
+ error = TTR("Error executing this file (wrong version or architecture).");
+ }
+ }
+
+ if (success) {
+ path_status->set_text(TTR("FBX2glTF executable is valid."));
+ path_status->add_theme_color_override("font_color", path_status->get_theme_color(SNAME("success_color"), SNAME("Editor")));
+ get_ok_button()->set_disabled(false);
+ } else {
+ path_status->set_text(error);
+ path_status->add_theme_color_override("font_color", path_status->get_theme_color(SNAME("error_color"), SNAME("Editor")));
+ get_ok_button()->set_disabled(true);
+ }
+}
+
+void FBXImporterManager::_select_file(const String &p_path) {
+ fbx_path->set_text(p_path);
+ _validate_path(p_path);
+}
+
+void FBXImporterManager::_path_confirmed() {
+ String path = fbx_path->get_text();
+ EditorSettings::get_singleton()->set("filesystem/import/fbx/fbx2gltf_path", path);
+ EditorSettings::get_singleton()->save();
+}
+
+void FBXImporterManager::_browse_install() {
+ if (fbx_path->get_text() != String()) {
+ browse_dialog->set_current_file(fbx_path->get_text());
+ }
+
+ browse_dialog->popup_centered_ratio();
+}
+
+FBXImporterManager *FBXImporterManager::singleton = nullptr;
+
+FBXImporterManager::FBXImporterManager() {
+ singleton = this;
+
+ set_title(TTR("Configure FBX Importer"));
+
+ VBoxContainer *vb = memnew(VBoxContainer);
+ vb->add_child(memnew(Label(TTR("FBX2glTF is required for importing FBX files.\nPlease download it and provide a valid path to the binary:"))));
+ LinkButton *lb = memnew(LinkButton);
+ lb->set_text(TTR("Click this link to download FBX2glTF"));
+ lb->set_uri("https://godotengine.org/fbx-import");
+ vb->add_child(lb);
+
+ HBoxContainer *hb = memnew(HBoxContainer);
+
+ fbx_path = memnew(LineEdit);
+ fbx_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ hb->add_child(fbx_path);
+ fbx_path_browse = memnew(Button);
+ hb->add_child(fbx_path_browse);
+ fbx_path_browse->set_text(TTR("Browse"));
+ fbx_path_browse->connect("pressed", callable_mp(this, &FBXImporterManager::_browse_install));
+ hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ hb->set_custom_minimum_size(Size2(400 * EDSCALE, 0));
+
+ vb->add_child(hb);
+
+ path_status = memnew(Label);
+ vb->add_child(path_status);
+
+ add_child(vb);
+
+ fbx_path->connect("text_changed", callable_mp(this, &FBXImporterManager::_validate_path));
+
+ get_ok_button()->set_text(TTR("Confirm Path"));
+
+ browse_dialog = memnew(EditorFileDialog);
+ browse_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
+ browse_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
+#ifdef WINDOWS_ENABLED
+ browse_dialog->add_filter("*.exe");
+#endif
+
+ browse_dialog->connect("file_selected", callable_mp(this, &FBXImporterManager::_select_file));
+
+ add_child(browse_dialog);
+}
diff --git a/editor/fbx_importer_manager.h b/editor/fbx_importer_manager.h
new file mode 100644
index 0000000000..ed0a96337e
--- /dev/null
+++ b/editor/fbx_importer_manager.h
@@ -0,0 +1,66 @@
+/**************************************************************************/
+/* fbx_importer_manager.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 FBX_IMPORTER_MANAGER_H
+#define FBX_IMPORTER_MANAGER_H
+
+#include "editor/editor_file_dialog.h"
+#include "scene/gui/dialogs.h"
+#include "scene/gui/line_edit.h"
+
+class FBXImporterManager : public ConfirmationDialog {
+ GDCLASS(FBXImporterManager, ConfirmationDialog)
+
+ Label *message = nullptr;
+ LineEdit *fbx_path = nullptr;
+ Button *fbx_path_browse = nullptr;
+ EditorFileDialog *browse_dialog = nullptr;
+ Label *path_status = nullptr;
+
+ void _validate_path(const String &p_path);
+ void _select_file(const String &p_path);
+ void _path_confirmed();
+ void _browse_install();
+ void _link_clicked();
+
+ static FBXImporterManager *singleton;
+
+protected:
+ void _notification(int p_what);
+
+public:
+ static FBXImporterManager *get_singleton() { return singleton; }
+
+ void show_dialog(bool p_exclusive = false);
+
+ FBXImporterManager();
+};
+
+#endif // FBX_IMPORTER_MANAGER_H
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp
index 718bcb24cc..ba5dd9e6e2 100644
--- a/editor/fileserver/editor_file_server.cpp
+++ b/editor/fileserver/editor_file_server.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_file_server.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_file_server.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 "editor_file_server.h"
diff --git a/editor/fileserver/editor_file_server.h b/editor/fileserver/editor_file_server.h
index 03b6ededab..ff2742e73f 100644
--- a/editor/fileserver/editor_file_server.h
+++ b/editor/fileserver/editor_file_server.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_file_server.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_file_server.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 EDITOR_FILE_SERVER_H
#define EDITOR_FILE_SERVER_H
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 19b4932d3d..f1ea8e8e65 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* filesystem_dock.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* filesystem_dock.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 "filesystem_dock.h"
@@ -42,6 +42,7 @@
#include "editor/editor_resource_preview.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/import/resource_importer_scene.h"
#include "editor/import_dock.h"
#include "editor/scene_create_dialog.h"
#include "editor/scene_tree_dock.h"
@@ -106,7 +107,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
// Create all items for the files in the subdirectory.
if (display_mode == DISPLAY_MODE_TREE_ONLY) {
- String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene");
+ String main_scene = GLOBAL_GET("application/run/main_scene");
// Build the list of the files to display.
List<FileInfo> file_list;
@@ -218,11 +219,11 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo
TreeItem *root = tree->create_item();
// Handles the favorites.
- TreeItem *favorites = tree->create_item(root);
- favorites->set_icon(0, get_theme_icon(SNAME("Favorites"), SNAME("EditorIcons")));
- favorites->set_text(0, TTR("Favorites:"));
- favorites->set_metadata(0, "Favorites");
- favorites->set_collapsed(p_uncollapsed_paths.find("Favorites") < 0);
+ TreeItem *favorites_item = tree->create_item(root);
+ favorites_item->set_icon(0, get_theme_icon(SNAME("Favorites"), SNAME("EditorIcons")));
+ favorites_item->set_text(0, TTR("Favorites:"));
+ favorites_item->set_metadata(0, "Favorites");
+ favorites_item->set_collapsed(p_uncollapsed_paths.find("Favorites") < 0);
Vector<String> favorite_paths = EditorSettings::get_singleton()->get_favorites();
@@ -272,7 +273,7 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo
}
if (searched_string.length() == 0 || text.to_lower().find(searched_string) >= 0) {
- TreeItem *ti = tree->create_item(favorites);
+ TreeItem *ti = tree->create_item(favorites_item);
ti->set_text(0, text);
ti->set_icon(0, icon);
ti->set_icon_modulate(0, color);
@@ -383,7 +384,7 @@ void FileSystemDock::_notification(int p_what) {
current_path->connect("text_submitted", callable_mp(this, &FileSystemDock::_navigate_to_path).bind(false));
- always_show_folders = bool(EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders"));
+ always_show_folders = bool(EDITOR_GET("docks/filesystem/always_show_folders"));
set_file_list_display_mode(FileSystemDock::FILE_LIST_DISPLAY_LIST);
@@ -464,7 +465,7 @@ void FileSystemDock::_notification(int p_what) {
file_list_button_sort->set_icon(get_theme_icon(SNAME("Sort"), SNAME("EditorIcons")));
// Update always show folders.
- bool new_always_show_folders = bool(EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders"));
+ bool new_always_show_folders = bool(EDITOR_GET("docks/filesystem/always_show_folders"));
if (new_always_show_folders != always_show_folders) {
always_show_folders = new_always_show_folders;
_update_file_list(true);
@@ -511,7 +512,15 @@ void FileSystemDock::_tree_multi_selected(Object *p_item, int p_column, bool p_s
}
}
-String FileSystemDock::get_selected_path() const {
+Vector<String> FileSystemDock::get_selected_paths() const {
+ return _tree_get_selected(false);
+}
+
+String FileSystemDock::get_current_path() const {
+ return path;
+}
+
+String FileSystemDock::get_current_directory() const {
if (path.ends_with("/")) {
return path;
} else {
@@ -519,10 +528,6 @@ String FileSystemDock::get_selected_path() const {
}
}
-String FileSystemDock::get_current_path() const {
- return path;
-}
-
void FileSystemDock::_set_current_path_text(const String &p_path) {
if (p_path == "Favorites") {
current_path->set_text(TTR("Favorites"));
@@ -743,7 +748,7 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
String directory = path;
String file = "";
- int thumbnail_size = EditorSettings::get_singleton()->get("docks/filesystem/thumbnail_size");
+ int thumbnail_size = EDITOR_GET("docks/filesystem/thumbnail_size");
thumbnail_size *= EDSCALE;
Ref<Texture2D> folder_thumbnail;
Ref<Texture2D> file_thumbnail;
@@ -784,9 +789,8 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
List<FileInfo> file_list;
if (path == "Favorites") {
// Display the favorites.
- Vector<String> favorites = EditorSettings::get_singleton()->get_favorites();
- for (int i = 0; i < favorites.size(); i++) {
- String favorite = favorites[i];
+ Vector<String> favorites_list = EditorSettings::get_singleton()->get_favorites();
+ for (const String &favorite : favorites_list) {
String text;
Ref<Texture2D> icon;
if (favorite == "res://") {
@@ -894,7 +898,7 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) {
_sort_file_info_list(file_list);
// Fills the ItemList control node from the FileInfos.
- String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene");
+ String main_scene = GLOBAL_GET("application/run/main_scene");
for (FileInfo &E : file_list) {
FileInfo *finfo = &(E);
String fname = finfo->name;
@@ -1056,15 +1060,15 @@ void FileSystemDock::_select_file(const String &p_path, bool p_select_in_favorit
void FileSystemDock::_tree_activate_file() {
TreeItem *selected = tree->get_selected();
if (selected) {
- String path = selected->get_metadata(0);
+ String file_path = selected->get_metadata(0);
TreeItem *parent = selected->get_parent();
bool is_favorite = parent != nullptr && parent->get_metadata(0) == "Favorites";
- if ((!is_favorite && path.ends_with("/")) || path == "Favorites") {
+ if ((!is_favorite && file_path.ends_with("/")) || file_path == "Favorites") {
bool collapsed = selected->is_collapsed();
selected->set_collapsed(!collapsed);
} else {
- _select_file(path, is_favorite && !path.ends_with("/"));
+ _select_file(file_path, is_favorite && !file_path.ends_with("/"));
}
}
}
@@ -1169,29 +1173,29 @@ void FileSystemDock::_push_to_history() {
button_hist_next->set_disabled(history_pos == history.size() - 1);
}
-void FileSystemDock::_get_all_items_in_dir(EditorFileSystemDirectory *efsd, Vector<String> &files, Vector<String> &folders) const {
- if (efsd == nullptr) {
+void FileSystemDock::_get_all_items_in_dir(EditorFileSystemDirectory *p_efsd, Vector<String> &r_files, Vector<String> &r_folders) const {
+ if (p_efsd == nullptr) {
return;
}
- for (int i = 0; i < efsd->get_subdir_count(); i++) {
- folders.push_back(efsd->get_subdir(i)->get_path());
- _get_all_items_in_dir(efsd->get_subdir(i), files, folders);
+ for (int i = 0; i < p_efsd->get_subdir_count(); i++) {
+ r_folders.push_back(p_efsd->get_subdir(i)->get_path());
+ _get_all_items_in_dir(p_efsd->get_subdir(i), r_files, r_folders);
}
- for (int i = 0; i < efsd->get_file_count(); i++) {
- files.push_back(efsd->get_file_path(i));
+ for (int i = 0; i < p_efsd->get_file_count(); i++) {
+ r_files.push_back(p_efsd->get_file_path(i));
}
}
-void FileSystemDock::_find_remaps(EditorFileSystemDirectory *efsd, const HashMap<String, String> &renames, Vector<String> &to_remaps) const {
- for (int i = 0; i < efsd->get_subdir_count(); i++) {
- _find_remaps(efsd->get_subdir(i), renames, to_remaps);
+void FileSystemDock::_find_remaps(EditorFileSystemDirectory *p_efsd, const HashMap<String, String> &r_renames, Vector<String> &r_to_remaps) const {
+ for (int i = 0; i < p_efsd->get_subdir_count(); i++) {
+ _find_remaps(p_efsd->get_subdir(i), r_renames, r_to_remaps);
}
- for (int i = 0; i < efsd->get_file_count(); i++) {
- Vector<String> deps = efsd->get_file_deps(i);
+ for (int i = 0; i < p_efsd->get_file_count(); i++) {
+ Vector<String> deps = p_efsd->get_file_deps(i);
for (int j = 0; j < deps.size(); j++) {
- if (renames.has(deps[j])) {
- to_remaps.push_back(efsd->get_file_path(i));
+ if (r_renames.has(deps[j])) {
+ r_to_remaps.push_back(p_efsd->get_file_path(i));
break;
}
}
@@ -1284,42 +1288,71 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin
}
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
- print_verbose("Duplicating " + old_path + " -> " + new_path);
- Error err = p_item.is_file ? da->copy(old_path, new_path) : da->copy_dir(old_path, new_path);
- if (err == OK) {
- // Move/Rename any corresponding import settings too.
- if (p_item.is_file && FileAccess::exists(old_path + ".import")) {
- err = da->copy(old_path + ".import", new_path + ".import");
+
+ if (p_item.is_file) {
+ print_verbose("Duplicating " + old_path + " -> " + new_path);
+
+ // Create the directory structure.
+ da->make_dir_recursive(new_path.get_base_dir());
+
+ if (FileAccess::exists(old_path + ".import")) {
+ Error err = da->copy(old_path, new_path);
if (err != OK) {
- EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + "\n" + old_path + ".import\n");
+ EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + "\n" + old_path + ": " + error_names[err] + "\n");
+ return;
}
// Remove uid from .import file to avoid conflict.
Ref<ConfigFile> cfg;
cfg.instantiate();
- cfg->load(new_path + ".import");
+ cfg->load(old_path + ".import");
cfg->erase_section_key("remap", "uid");
- cfg->save(new_path + ".import");
- } else if (p_item.is_file && (old_path.get_extension() == "tscn" || old_path.get_extension() == "tres")) {
- // FIXME: Quick hack to fix text resources. This should be fixed properly.
- Ref<FileAccess> file = FileAccess::open(old_path, FileAccess::READ, &err);
- if (err == OK) {
- PackedStringArray lines = file->get_as_utf8_string().split("\n");
- String line = lines[0];
-
- if (line.contains("uid")) {
- line = line.substr(0, line.find(" uid")) + "]";
- lines.write[0] = line;
+ err = cfg->save(new_path + ".import");
+ if (err != OK) {
+ EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + "\n" + old_path + ".import: " + error_names[err] + "\n");
+ return;
+ }
+ } else {
+ // Files which do not use an uid can just be copied.
+ if (ResourceLoader::get_resource_uid(old_path) == ResourceUID::INVALID_ID) {
+ Error err = da->copy(old_path, new_path);
+ if (err != OK) {
+ EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + "\n" + old_path + ": " + error_names[err] + "\n");
+ }
+ return;
+ }
- Ref<FileAccess> file2 = FileAccess::open(new_path, FileAccess::WRITE, &err);
- if (err == OK) {
- file2->store_string(String("\n").join(lines));
- }
+ // Load the resource and save it again in the new location (this generates a new UID).
+ Error err;
+ Ref<Resource> res = ResourceLoader::load(old_path, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err);
+ if (err == OK && res.is_valid()) {
+ err = ResourceSaver::save(res, new_path, ResourceSaver::FLAG_COMPRESS);
+ if (err != OK) {
+ EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + " " + vformat(TTR("Failed to save resource at %s: %s"), new_path, error_names[err]));
}
+ } else if (err != OK) {
+ // When loading files like text files the error is OK but the resource is still null.
+ // We can ignore such files.
+ EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + " " + vformat(TTR("Failed to load resource at %s: %s"), new_path, error_names[err]));
}
}
} else {
- EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + "\n" + old_path + "\n");
+ // Recursively duplicate all files inside the folder.
+ Ref<DirAccess> old_dir = DirAccess::open(old_path);
+ Ref<FileAccess> file_access = FileAccess::create(FileAccess::ACCESS_RESOURCES);
+ old_dir->set_include_navigational(false);
+ old_dir->list_dir_begin();
+ for (String f = old_dir->_get_next(); !f.is_empty(); f = old_dir->_get_next()) {
+ if (f.get_extension() == "import") {
+ continue;
+ }
+ if (file_access->file_exists(old_path + f)) {
+ _try_duplicate_item(FileOrFolder(old_path + f, true), new_path + f);
+ } else if (da->dir_exists(old_path + f)) {
+ _try_duplicate_item(FileOrFolder(old_path + f, false), new_path + f);
+ }
+ }
+ old_dir->list_dir_end();
}
}
@@ -1345,25 +1378,25 @@ void FileSystemDock::_update_resource_paths_after_move(const HashMap<String, Str
}
for (int i = 0; i < EditorNode::get_editor_data().get_edited_scene_count(); i++) {
- String path;
+ String file_path;
if (i == EditorNode::get_editor_data().get_edited_scene()) {
if (!get_tree()->get_edited_scene_root()) {
continue;
}
- path = get_tree()->get_edited_scene_root()->get_scene_file_path();
+ file_path = get_tree()->get_edited_scene_root()->get_scene_file_path();
} else {
- path = EditorNode::get_editor_data().get_scene_path(i);
+ file_path = EditorNode::get_editor_data().get_scene_path(i);
}
- if (p_renames.has(path)) {
- path = p_renames[path];
+ if (p_renames.has(file_path)) {
+ file_path = p_renames[file_path];
}
if (i == EditorNode::get_editor_data().get_edited_scene()) {
- get_tree()->get_edited_scene_root()->set_scene_file_path(path);
+ get_tree()->get_edited_scene_root()->set_scene_file_path(file_path);
} else {
- EditorNode::get_editor_data().set_scene_path(i, path);
+ EditorNode::get_editor_data().set_scene_path(i, file_path);
}
}
}
@@ -1381,7 +1414,7 @@ void FileSystemDock::_update_dependencies_after_move(const HashMap<String, Strin
Error err = ResourceLoader::rename_dependencies(file, p_renames);
if (err == OK) {
if (ResourceLoader::get_resource_type(file) == "PackedScene") {
- EditorNode::get_singleton()->reload_scene(file);
+ callable_mp(EditorNode::get_singleton(), &EditorNode::reload_scene).bind(file).call_deferred();
}
} else {
EditorNode::get_singleton()->add_io_error(TTR("Unable to update dependencies:") + "\n" + remaps[i] + "\n");
@@ -1421,11 +1454,10 @@ void FileSystemDock::_update_project_settings_after_move(const HashMap<String, S
}
void FileSystemDock::_update_favorites_list_after_move(const HashMap<String, String> &p_files_renames, const HashMap<String, String> &p_folders_renames) const {
- Vector<String> favorites = EditorSettings::get_singleton()->get_favorites();
+ Vector<String> favorites_list = EditorSettings::get_singleton()->get_favorites();
Vector<String> new_favorites;
- for (int i = 0; i < favorites.size(); i++) {
- String old_path = favorites[i];
+ for (const String &old_path : favorites_list) {
if (p_folders_renames.has(old_path)) {
new_favorites.push_back(p_folders_renames[old_path]);
} else if (p_files_renames.has(old_path)) {
@@ -1699,7 +1731,7 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool p_ove
}
}
-Vector<String> FileSystemDock::_tree_get_selected(bool remove_self_inclusion) {
+Vector<String> FileSystemDock::_tree_get_selected(bool remove_self_inclusion) const {
// Build a list of selected items with the active one at the first position.
Vector<String> selected_strings;
@@ -1751,22 +1783,7 @@ void FileSystemDock::_tree_rmb_option(int p_option) {
case FOLDER_COLLAPSE_ALL: {
// Expand or collapse the folder
if (selected_strings.size() == 1) {
- bool is_collapsed = (p_option == FOLDER_COLLAPSE_ALL);
-
- Vector<TreeItem *> needs_check;
- needs_check.push_back(tree->get_selected());
-
- while (needs_check.size()) {
- needs_check[0]->set_collapsed(is_collapsed);
-
- TreeItem *child = needs_check[0]->get_first_child();
- while (child) {
- needs_check.push_back(child);
- child = child->get_next();
- }
-
- needs_check.remove_at(0);
- }
+ tree->get_selected()->set_collapsed_recursive(p_option == FOLDER_COLLAPSE_ALL);
}
} break;
default: {
@@ -1835,8 +1852,8 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
}
} break;
- case FILE_INSTANCE: {
- // Instance all selected scenes.
+ case FILE_INSTANTIATE: {
+ // Instantiate all selected scenes.
Vector<String> paths;
for (int i = 0; i < p_selected.size(); i++) {
String fpath = p_selected[i];
@@ -1845,29 +1862,29 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
}
}
if (!paths.is_empty()) {
- emit_signal(SNAME("instance"), paths);
+ emit_signal(SNAME("instantiate"), paths);
}
} break;
case FILE_ADD_FAVORITE: {
// Add the files from favorites.
- Vector<String> favorites = EditorSettings::get_singleton()->get_favorites();
+ Vector<String> favorites_list = EditorSettings::get_singleton()->get_favorites();
for (int i = 0; i < p_selected.size(); i++) {
- if (!favorites.has(p_selected[i])) {
- favorites.push_back(p_selected[i]);
+ if (!favorites_list.has(p_selected[i])) {
+ favorites_list.push_back(p_selected[i]);
}
}
- EditorSettings::get_singleton()->set_favorites(favorites);
+ EditorSettings::get_singleton()->set_favorites(favorites_list);
_update_tree(_compute_uncollapsed_paths());
} break;
case FILE_REMOVE_FAVORITE: {
// Remove the files from favorites.
- Vector<String> favorites = EditorSettings::get_singleton()->get_favorites();
+ Vector<String> favorites_list = EditorSettings::get_singleton()->get_favorites();
for (int i = 0; i < p_selected.size(); i++) {
- favorites.erase(p_selected[i]);
+ favorites_list.erase(p_selected[i]);
}
- EditorSettings::get_singleton()->set_favorites(favorites);
+ EditorSettings::get_singleton()->set_favorites(favorites_list);
_update_tree(_compute_uncollapsed_paths());
if (path == "Favorites") {
_update_file_list(true);
@@ -2034,7 +2051,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;
}
}
@@ -2060,7 +2078,7 @@ void FileSystemDock::_resource_created() {
return;
}
- Variant c = new_resource_dialog->instance_selected();
+ Variant c = new_resource_dialog->instantiate_selected();
ERR_FAIL_COND(!c);
Resource *r = Object::cast_to<Resource>(c);
@@ -2289,7 +2307,7 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data,
int drop_section = tree->get_drop_section_at_position(p_point);
int drop_position;
- Vector<String> files = drag_data["files"];
+ Vector<String> drag_files = drag_data["files"];
TreeItem *favorites_item = tree->get_root()->get_first_child();
TreeItem *resources_item = favorites_item->get_next();
@@ -2310,8 +2328,8 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data,
// Remove dragged favorites.
Vector<int> to_remove;
int offset = 0;
- for (int i = 0; i < files.size(); i++) {
- int to_remove_pos = dirs.find(files[i]);
+ for (int i = 0; i < drag_files.size(); i++) {
+ int to_remove_pos = dirs.find(drag_files[i]);
to_remove.push_back(to_remove_pos);
if (to_remove_pos < drop_position) {
offset++;
@@ -2324,8 +2342,8 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data,
}
// Re-add them at the right position.
- for (int i = 0; i < files.size(); i++) {
- dirs.insert(drop_position, files[i]);
+ for (int i = 0; i < drag_files.size(); i++) {
+ dirs.insert(drop_position, drag_files[i]);
drop_position++;
}
@@ -2394,13 +2412,13 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data,
} else if (favorite) {
// Add the files from favorites.
Vector<String> fnames = drag_data["files"];
- Vector<String> favorites = EditorSettings::get_singleton()->get_favorites();
+ Vector<String> favorites_list = EditorSettings::get_singleton()->get_favorites();
for (int i = 0; i < fnames.size(); i++) {
- if (!favorites.has(fnames[i])) {
- favorites.push_back(fnames[i]);
+ if (!favorites_list.has(fnames[i])) {
+ favorites_list.push_back(fnames[i]);
}
}
- EditorSettings::get_singleton()->set_favorites(favorites);
+ EditorSettings::get_singleton()->set_favorites(favorites_list);
_update_tree(_compute_uncollapsed_paths());
}
}
@@ -2478,7 +2496,7 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str
Vector<String> filenames;
Vector<String> foldernames;
- Vector<String> favorites = EditorSettings::get_singleton()->get_favorites();
+ Vector<String> favorites_list = EditorSettings::get_singleton()->get_favorites();
bool all_files = true;
bool all_files_scenes = true;
@@ -2499,8 +2517,8 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str
// Check if in favorites.
bool found = false;
- for (int j = 0; j < favorites.size(); j++) {
- if (favorites[j] == fpath) {
+ for (int j = 0; j < favorites_list.size(); j++) {
+ if (favorites_list[j] == fpath) {
found = true;
break;
}
@@ -2517,13 +2535,13 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str
if (filenames.size() == 1) {
p_popup->add_icon_item(get_theme_icon(SNAME("Load"), SNAME("EditorIcons")), TTR("Open Scene"), FILE_OPEN);
p_popup->add_icon_item(get_theme_icon(SNAME("CreateNewSceneFrom"), SNAME("EditorIcons")), TTR("New Inherited Scene"), FILE_INHERIT);
- if (ProjectSettings::get_singleton()->get("application/run/main_scene") != filenames[0]) {
+ if (GLOBAL_GET("application/run/main_scene") != filenames[0]) {
p_popup->add_icon_item(get_theme_icon(SNAME("PlayScene"), SNAME("EditorIcons")), TTR("Set As Main Scene"), FILE_MAIN_SCENE);
}
} else {
p_popup->add_icon_item(get_theme_icon(SNAME("Load"), SNAME("EditorIcons")), TTR("Open Scenes"), FILE_OPEN);
}
- p_popup->add_icon_item(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), TTR("Instance"), FILE_INSTANCE);
+ p_popup->add_icon_item(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), TTR("Instantiate"), FILE_INSTANTIATE);
p_popup->add_separator();
} else if (filenames.size() == 1) {
p_popup->add_icon_item(get_theme_icon(SNAME("Load"), SNAME("EditorIcons")), TTR("Open"), FILE_OPEN);
@@ -2572,17 +2590,25 @@ 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);
+ 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);
path = fpath;
}
}
@@ -2627,7 +2653,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();
@@ -2687,7 +2713,7 @@ 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();
@@ -2799,6 +2825,8 @@ 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("editor/open_search", p_event)) {
focus_on_filter();
} else {
@@ -2857,6 +2885,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 {
@@ -2867,10 +2897,10 @@ void FileSystemDock::_file_list_gui_input(Ref<InputEvent> p_event) {
}
}
-void FileSystemDock::_get_imported_files(const String &p_path, Vector<String> &files) const {
+void FileSystemDock::_get_imported_files(const String &p_path, Vector<String> &r_files) const {
if (!p_path.ends_with("/")) {
if (FileAccess::exists(p_path + ".import")) {
- files.push_back(p_path);
+ r_files.push_back(p_path);
}
return;
}
@@ -2881,7 +2911,7 @@ void FileSystemDock::_get_imported_files(const String &p_path, Vector<String> &f
while (!n.is_empty()) {
if (n != "." && n != ".." && !n.ends_with(".import")) {
String npath = p_path + n + (da->current_is_dir() ? "/" : "");
- _get_imported_files(npath, files);
+ _get_imported_files(npath, r_files);
}
n = da->get_next();
}
@@ -2977,7 +3007,7 @@ void FileSystemDock::_file_sort_popup(int p_id) {
MenuButton *FileSystemDock::_create_file_menu_button() {
MenuButton *button = memnew(MenuButton);
button->set_flat(true);
- button->set_tooltip_text(TTR("Sort files"));
+ button->set_tooltip_text(TTR("Sort Files"));
PopupMenu *p = button->get_popup();
p->connect("id_pressed", callable_mp(this, &FileSystemDock::_file_sort_popup));
@@ -2998,20 +3028,17 @@ 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);
ADD_SIGNAL(MethodInfo("inherit", PropertyInfo(Variant::STRING, "file")));
- ADD_SIGNAL(MethodInfo("instance", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files")));
+ ADD_SIGNAL(MethodInfo("instantiate", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files")));
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")));
- ADD_SIGNAL(MethodInfo("folder_moved", PropertyInfo(Variant::STRING, "old_folder"), PropertyInfo(Variant::STRING, "new_file")));
+ ADD_SIGNAL(MethodInfo("folder_moved", PropertyInfo(Variant::STRING, "old_folder"), PropertyInfo(Variant::STRING, "new_folder")));
ADD_SIGNAL(MethodInfo("display_mode_changed"));
}
@@ -3028,6 +3055,7 @@ 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"));
VBoxContainer *top_vbc = memnew(VBoxContainer);
add_child(top_vbc);
@@ -3040,14 +3068,14 @@ FileSystemDock::FileSystemDock() {
button_hist_prev->set_flat(true);
button_hist_prev->set_disabled(true);
button_hist_prev->set_focus_mode(FOCUS_NONE);
- button_hist_prev->set_tooltip_text(TTR("Previous Folder/File"));
+ button_hist_prev->set_tooltip_text(TTR("Go to previous selected folder/file."));
toolbar_hbc->add_child(button_hist_prev);
button_hist_next = memnew(Button);
button_hist_next->set_flat(true);
button_hist_next->set_disabled(true);
button_hist_next->set_focus_mode(FOCUS_NONE);
- button_hist_next->set_tooltip_text(TTR("Next Folder/File"));
+ button_hist_next->set_tooltip_text(TTR("Go to next selected folder/file."));
toolbar_hbc->add_child(button_hist_next);
current_path = memnew(LineEdit);
@@ -3099,10 +3127,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));
@@ -3136,7 +3165,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));
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index c38b3f8a47..2304d8f8ad 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* filesystem_dock.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* filesystem_dock.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 FILESYSTEM_DOCK_H
#define FILESYSTEM_DOCK_H
@@ -79,7 +79,7 @@ private:
FILE_OPEN,
FILE_INHERIT,
FILE_MAIN_SCENE,
- FILE_INSTANCE,
+ FILE_INSTANTIATE,
FILE_ADD_FAVORITE,
FILE_REMOVE_FAVORITE,
FILE_DEPENDENCIES,
@@ -213,11 +213,11 @@ 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> &files) const;
+ void _get_imported_files(const String &p_path, Vector<String> &r_files) const;
void _update_import_dock();
- void _get_all_items_in_dir(EditorFileSystemDirectory *efsd, Vector<String> &files, Vector<String> &folders) const;
- void _find_remaps(EditorFileSystemDirectory *efsd, const HashMap<String, String> &renames, Vector<String> &to_remaps) const;
+ void _get_all_items_in_dir(EditorFileSystemDirectory *p_efsd, Vector<String> &r_files, Vector<String> &r_folders) const;
+ void _find_remaps(EditorFileSystemDirectory *p_efsd, const HashMap<String, String> &r_renames, Vector<String> &r_to_remaps) const;
void _try_move_item(const FileOrFolder &p_item, const String &p_new_path, HashMap<String, String> &p_file_renames, HashMap<String, String> &p_folder_renames);
void _try_duplicate_item(const FileOrFolder &p_item, const String &p_new_path) const;
void _update_dependencies_after_move(const HashMap<String, String> &p_renames) const;
@@ -297,12 +297,12 @@ private:
void _update_display_mode(bool p_force = false);
- Vector<String> _tree_get_selected(bool remove_self_inclusion = true);
+ Vector<String> _tree_get_selected(bool remove_self_inclusion = true) const;
bool _is_file_type_disabled_by_feature_profile(const StringName &p_class);
void _feature_profile_changed();
- Vector<String> _remove_self_included_paths(Vector<String> selected_strings);
+ static Vector<String> _remove_self_included_paths(Vector<String> selected_strings);
private:
static FileSystemDock *singleton;
@@ -315,9 +315,11 @@ protected:
static void _bind_methods();
public:
- String get_selected_path() const;
+ Vector<String> get_selected_paths() const;
String get_current_path() const;
+ String get_current_directory() const;
+
void navigate_to_path(const String &p_path);
void focus_on_filter();
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index 16c5003fdc..4c341a6d52 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* find_in_files.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* find_in_files.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 "find_in_files.h"
@@ -422,8 +422,7 @@ void FindInFilesDialog::set_find_in_files_mode(FindInFilesMode p_mode) {
}
String FindInFilesDialog::get_search_text() const {
- String text = _search_text_line_edit->get_text();
- return text.strip_edges();
+ return _search_text_line_edit->get_text();
}
String FindInFilesDialog::get_replace_text() const {
@@ -464,9 +463,9 @@ void FindInFilesDialog::_notification(int p_what) {
_search_text_line_edit->select_all();
// Extensions might have changed in the meantime, we clean them and instance them again.
for (int i = 0; i < _filters_container->get_child_count(); i++) {
- _filters_container->get_child(i)->queue_delete();
+ _filters_container->get_child(i)->queue_free();
}
- Array exts = ProjectSettings::get_singleton()->get("editor/script/search_in_file_extensions");
+ Array exts = GLOBAL_GET("editor/script/search_in_file_extensions");
for (int i = 0; i < exts.size(); ++i) {
CheckBox *cb = memnew(CheckBox);
cb->set_text(exts[i]);
@@ -570,8 +569,6 @@ FindInFilesPanel::FindInFilesPanel() {
hbc->add_child(find_label);
_search_text_label = memnew(Label);
- _search_text_label->add_theme_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("source"), SNAME("EditorFonts")));
- _search_text_label->add_theme_font_size_override("font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("source_size"), SNAME("EditorFonts")));
hbc->add_child(_search_text_label);
_progress_bar = memnew(ProgressBar);
@@ -599,14 +596,13 @@ FindInFilesPanel::FindInFilesPanel() {
}
_results_display = memnew(Tree);
- _results_display->add_theme_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("source"), SNAME("EditorFonts")));
- _results_display->add_theme_font_size_override("font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("source_size"), SNAME("EditorFonts")));
_results_display->set_v_size_flags(SIZE_EXPAND_FILL);
_results_display->connect("item_selected", callable_mp(this, &FindInFilesPanel::_on_result_selected));
_results_display->connect("item_edited", callable_mp(this, &FindInFilesPanel::_on_item_edited));
_results_display->set_hide_root(true);
_results_display->set_select_mode(Tree::SELECT_ROW);
_results_display->set_allow_rmb_select(true);
+ _results_display->set_allow_reselect(true);
_results_display->create_item(); // Root
vbc->add_child(_results_display);
@@ -688,13 +684,20 @@ void FindInFilesPanel::stop_search() {
void FindInFilesPanel::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_PROCESS: {
- _progress_bar->set_as_ratio(_finder->get_progress());
- } break;
-
case NOTIFICATION_THEME_CHANGED: {
_search_text_label->add_theme_font_override("font", get_theme_font(SNAME("source"), SNAME("EditorFonts")));
+ _search_text_label->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("source_size"), SNAME("EditorFonts")));
_results_display->add_theme_font_override("font", get_theme_font(SNAME("source"), SNAME("EditorFonts")));
+ _results_display->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("source_size"), SNAME("EditorFonts")));
+
+ // Rebuild search tree.
+ if (!_finder->get_search_text().is_empty()) {
+ start_search();
+ }
+ } break;
+
+ case NOTIFICATION_PROCESS: {
+ _progress_bar->set_as_ratio(_finder->get_progress());
} break;
}
}
@@ -718,6 +721,10 @@ void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin
file_item = E->value;
}
+ Color file_item_color = _results_display->get_theme_color(SNAME("font_color")) * Color(1, 1, 1, 0.67);
+ file_item->set_custom_color(0, file_item_color);
+ file_item->set_selectable(0, false);
+
int text_index = _with_replace ? 1 : 0;
TreeItem *item = _results_display->create_item(file_item);
@@ -764,13 +771,13 @@ void FindInFilesPanel::draw_result_text(Object *item_obj, Rect2 rect) {
int font_size = _results_display->get_theme_font_size(SNAME("font_size"));
Rect2 match_rect = rect;
- match_rect.position.x += font->get_string_size(item_text.left(r.begin_trimmed), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).x;
- match_rect.size.x = font->get_string_size(_search_text_label->get_text(), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).x;
+ match_rect.position.x += font->get_string_size(item_text.left(r.begin_trimmed), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).x - 1;
+ match_rect.size.x = font->get_string_size(_search_text_label->get_text(), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).x + 1;
match_rect.position.y += 1 * EDSCALE;
match_rect.size.y -= 2 * EDSCALE;
- // Use the inverted accent color to help match rectangles stand out even on the currently selected line.
- _results_display->draw_rect(match_rect, get_theme_color(SNAME("accent_color"), SNAME("Editor")).inverted() * Color(1, 1, 1, 0.5));
+ _results_display->draw_rect(match_rect, get_theme_color(SNAME("accent_color"), SNAME("Editor")) * Color(1, 1, 1, 0.33), false, 2.0);
+ _results_display->draw_rect(match_rect, get_theme_color(SNAME("accent_color"), SNAME("Editor")) * Color(1, 1, 1, 0.17), true);
// Text is drawn by Tree already.
}
@@ -778,14 +785,12 @@ void FindInFilesPanel::draw_result_text(Object *item_obj, Rect2 rect) {
void FindInFilesPanel::_on_item_edited() {
TreeItem *item = _results_display->get_selected();
- if (item->is_checked(0)) {
- item->set_custom_color(1, _results_display->get_theme_color(SNAME("font_color")));
- } else {
- // Grey out.
- Color color = _results_display->get_theme_color(SNAME("font_color"));
- color.a /= 2.0;
- item->set_custom_color(1, color);
+ // Change opacity to half if checkbox is checked, otherwise full.
+ Color use_color = _results_display->get_theme_color(SNAME("font_color"));
+ if (!item->is_checked(0)) {
+ use_color.a *= 0.5;
}
+ item->set_custom_color(1, use_color);
}
void FindInFilesPanel::_on_finished() {
@@ -794,11 +799,11 @@ void FindInFilesPanel::_on_finished() {
int file_count = _file_items.size();
if (result_count == 1 && file_count == 1) {
- results_text = vformat(TTR("%d match in %d file."), result_count, file_count);
+ results_text = vformat(TTR("%d match in %d file"), result_count, file_count);
} else if (result_count != 1 && file_count == 1) {
- results_text = vformat(TTR("%d matches in %d file."), result_count, file_count);
+ results_text = vformat(TTR("%d matches in %d file"), result_count, file_count);
} else {
- results_text = vformat(TTR("%d matches in %d files."), result_count, file_count);
+ results_text = vformat(TTR("%d matches in %d files"), result_count, file_count);
}
_status_label->set_text(results_text);
@@ -968,8 +973,8 @@ void FindInFilesPanel::update_replace_buttons() {
_replace_all_button->set_disabled(disabled);
}
-void FindInFilesPanel::set_progress_visible(bool visible) {
- _progress_bar->set_self_modulate(Color(1, 1, 1, visible ? 1 : 0));
+void FindInFilesPanel::set_progress_visible(bool p_visible) {
+ _progress_bar->set_self_modulate(Color(1, 1, 1, p_visible ? 1 : 0));
}
void FindInFilesPanel::_bind_methods() {
diff --git a/editor/find_in_files.h b/editor/find_in_files.h
index c57a084779..25ce2b0415 100644
--- a/editor/find_in_files.h
+++ b/editor/find_in_files.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* find_in_files.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* find_in_files.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 FIND_IN_FILES_H
#define FIND_IN_FILES_H
@@ -198,7 +198,7 @@ private:
void draw_result_text(Object *item_obj, Rect2 rect);
- void set_progress_visible(bool visible);
+ void set_progress_visible(bool p_visible);
void clear();
FindInFiles *_finder = nullptr;
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index dac86acae4..7f0417ea29 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* groups_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* groups_editor.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 "groups_editor.h"
@@ -39,6 +39,24 @@
#include "scene/gui/label.h"
#include "scene/resources/packed_scene.h"
+static bool can_edit(Node *p_node, String p_group) {
+ Node *n = p_node;
+ bool can_edit = true;
+ while (n) {
+ Ref<SceneState> ss = (n == EditorNode::get_singleton()->get_edited_scene()) ? n->get_scene_inherited_state() : n->get_scene_instance_state();
+ if (ss.is_valid()) {
+ int path = ss->find_node_by_path(n->get_path_to(p_node));
+ if (path != -1) {
+ if (ss->is_node_in_group(path, p_group)) {
+ can_edit = false;
+ }
+ }
+ }
+ n = n->get_owner();
+ }
+ return can_edit;
+}
+
void GroupDialog::_group_selected() {
nodes_to_add->clear();
add_node_root = nodes_to_add->create_item();
@@ -94,7 +112,7 @@ void GroupDialog::_load_nodes(Node *p_current) {
Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(p_current, "Node");
node->set_icon(0, icon);
- if (!_can_edit(p_current, selected_group)) {
+ if (!can_edit(p_current, selected_group)) {
node->set_selectable(0, false);
node->set_custom_color(0, groups->get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
}
@@ -105,24 +123,6 @@ void GroupDialog::_load_nodes(Node *p_current) {
}
}
-bool GroupDialog::_can_edit(Node *p_node, String p_group) {
- Node *n = p_node;
- bool can_edit = true;
- while (n) {
- Ref<SceneState> ss = (n == EditorNode::get_singleton()->get_edited_scene()) ? n->get_scene_inherited_state() : n->get_scene_instance_state();
- if (ss.is_valid()) {
- int path = ss->find_node_by_path(n->get_path_to(p_node));
- if (path != -1) {
- if (ss->is_node_in_group(path, p_group)) {
- can_edit = false;
- }
- }
- }
- n = n->get_owner();
- }
- return can_edit;
-}
-
void GroupDialog::_add_pressed() {
TreeItem *selected = nodes_to_add->get_next_selected(nullptr);
@@ -130,6 +130,7 @@ void GroupDialog::_add_pressed() {
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add to Group"));
while (selected) {
@@ -159,6 +160,7 @@ void GroupDialog::_removed_pressed() {
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove from Group"));
while (selected) {
@@ -218,19 +220,14 @@ void GroupDialog::_add_group_text_changed(const String &p_new_text) {
}
void GroupDialog::_group_renamed() {
- TreeItem *renamed_group = groups->get_edited();
+ TreeItem *renamed_group = groups->get_selected();
if (!renamed_group) {
return;
}
const String name = renamed_group->get_text(0).strip_edges();
- for (TreeItem *E = groups_root->get_first_child(); E; E = E->get_next()) {
- if (E != renamed_group && E->get_text(0) == name) {
- renamed_group->set_text(0, selected_group);
- error->set_text(TTR("Group name already exists."));
- error->popup_centered();
- return;
- }
+ if (name == selected_group) {
+ return;
}
if (name.is_empty()) {
@@ -240,15 +237,25 @@ void GroupDialog::_group_renamed() {
return;
}
+ for (TreeItem *E = groups_root->get_first_child(); E; E = E->get_next()) {
+ if (E != renamed_group && E->get_text(0) == name) {
+ renamed_group->set_text(0, selected_group);
+ error->set_text(TTR("Group name already exists."));
+ error->popup_centered();
+ return;
+ }
+ }
+
renamed_group->set_text(0, name); // Spaces trimmed.
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Rename Group"));
List<Node *> nodes;
scene_tree->get_nodes_in_group(selected_group, &nodes);
bool removed_all = true;
for (Node *node : nodes) {
- if (_can_edit(node, selected_group)) {
+ if (can_edit(node, selected_group)) {
undo_redo->add_do_method(node, "remove_from_group", selected_group);
undo_redo->add_undo_method(node, "remove_from_group", name);
undo_redo->add_do_method(node, "add_to_group", name, true);
@@ -318,13 +325,14 @@ void GroupDialog::_modify_group_pressed(Object *p_item, int p_column, int p_id,
case DELETE_GROUP: {
String name = ti->get_text(0);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete Group"));
List<Node *> nodes;
scene_tree->get_nodes_in_group(name, &nodes);
bool removed_all = true;
for (Node *E : nodes) {
- if (_can_edit(E, name)) {
+ if (can_edit(E, name)) {
undo_redo->add_do_method(E, "remove_from_group", name);
undo_redo->add_undo_method(E, "add_to_group", name, true);
} else {
@@ -398,10 +406,6 @@ void GroupDialog::_notification(int p_what) {
}
}
-void GroupDialog::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
void GroupDialog::edit() {
popup_centered();
@@ -571,7 +575,7 @@ GroupDialog::GroupDialog() {
set_title(TTR("Group Editor"));
- error = memnew(ConfirmationDialog);
+ error = memnew(AcceptDialog);
add_child(error);
error->set_ok_button_text(TTR("Close"));
@@ -584,17 +588,16 @@ void GroupsEditor::_add_group(const String &p_group) {
if (!node) {
return;
}
-
const String name = group_name->get_text().strip_edges();
- if (name.is_empty()) {
- return;
- }
group_name->clear();
if (node->is_in_group(name)) {
+ error->set_text(TTR("Group name already exists."));
+ error->popup_centered();
return;
}
+ 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);
@@ -609,6 +612,66 @@ void GroupsEditor::_add_group(const String &p_group) {
undo_redo->commit_action();
}
+void GroupsEditor::_group_selected() {
+ if (!tree->is_anything_selected()) {
+ return;
+ }
+ selected_group = tree->get_selected()->get_text(0);
+}
+
+void GroupsEditor::_group_renamed() {
+ if (!node || !can_edit(node, selected_group)) {
+ return;
+ }
+
+ TreeItem *ti = tree->get_selected();
+ if (!ti) {
+ return;
+ }
+
+ const String name = ti->get_text(0).strip_edges();
+ if (name == selected_group) {
+ return;
+ }
+
+ if (name.is_empty()) {
+ ti->set_text(0, selected_group);
+ error->set_text(TTR("Invalid group name."));
+ error->popup_centered();
+ return;
+ }
+
+ for (TreeItem *E = groups_root->get_first_child(); E; E = E->get_next()) {
+ if (E != ti && E->get_text(0) == name) {
+ ti->set_text(0, selected_group);
+ error->set_text(TTR("Group name already exists."));
+ error->popup_centered();
+ return;
+ }
+ }
+
+ ti->set_text(0, name); // Spaces trimmed.
+
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Rename Group"));
+
+ undo_redo->add_do_method(node, "remove_from_group", selected_group);
+ undo_redo->add_undo_method(node, "remove_from_group", name);
+ undo_redo->add_do_method(node, "add_to_group", name, true);
+ undo_redo->add_undo_method(node, "add_to_group", selected_group, true);
+
+ undo_redo->add_do_method(this, "_group_selected");
+ undo_redo->add_undo_method(this, "_group_selected");
+ undo_redo->add_do_method(this, "update_tree");
+ undo_redo->add_undo_method(this, "update_tree");
+
+ // To force redraw of scene tree.
+ undo_redo->add_do_method(SceneTreeDock::get_singleton()->get_tree_editor(), "update_tree");
+ undo_redo->add_undo_method(SceneTreeDock::get_singleton()->get_tree_editor(), "update_tree");
+
+ undo_redo->commit_action();
+}
+
void GroupsEditor::_modify_group(Object *p_item, int p_column, int p_id, MouseButton p_button) {
if (p_button != MouseButton::LEFT) {
return;
@@ -624,7 +687,8 @@ void GroupsEditor::_modify_group(Object *p_item, int p_column, int p_id, MouseBu
}
switch (p_id) {
case DELETE_GROUP: {
- String name = ti->get_text(0);
+ const String name = ti->get_text(0);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove from Group"));
undo_redo->add_do_method(node, "remove_from_group", name);
@@ -666,6 +730,7 @@ void GroupsEditor::update_tree() {
groups.sort_custom<_GroupInfoComparator>();
TreeItem *root = tree->create_item();
+ groups_root = root;
for (const GroupInfo &gi : groups) {
if (!gi.persistent) {
@@ -692,6 +757,7 @@ void GroupsEditor::update_tree() {
TreeItem *item = tree->create_item(root);
item->set_text(0, gi.name);
+ item->set_editable(0, true);
if (can_be_deleted) {
item->add_button(0, get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), DELETE_GROUP);
item->add_button(0, get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")), COPY_GROUP);
@@ -701,10 +767,6 @@ void GroupsEditor::update_tree() {
}
}
-void GroupsEditor::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
void GroupsEditor::set_current(Node *p_node) {
node = p_node;
update_tree();
@@ -712,11 +774,11 @@ void GroupsEditor::set_current(Node *p_node) {
void GroupsEditor::_show_group_dialog() {
group_dialog->edit();
- group_dialog->set_undo_redo(undo_redo);
}
void GroupsEditor::_bind_methods() {
ClassDB::bind_method("update_tree", &GroupsEditor::update_tree);
+ ClassDB::bind_method("_group_selected", &GroupsEditor::_group_selected);
}
GroupsEditor::GroupsEditor() {
@@ -749,13 +811,21 @@ GroupsEditor::GroupsEditor() {
add->connect("pressed", callable_mp(this, &GroupsEditor::_add_group).bind(String()));
tree = memnew(Tree);
+ vbc->add_child(tree);
tree->set_hide_root(true);
+ tree->set_allow_reselect(true);
+ tree->set_allow_rmb_select(true);
tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- vbc->add_child(tree);
+ tree->connect("item_selected", callable_mp(this, &GroupsEditor::_group_selected));
tree->connect("button_clicked", callable_mp(this, &GroupsEditor::_modify_group));
+ tree->connect("item_edited", callable_mp(this, &GroupsEditor::_group_renamed));
tree->add_theme_constant_override("draw_guides", 1);
add_theme_constant_override("separation", 3 * EDSCALE);
+ error = memnew(AcceptDialog);
+ add_child(error);
+ error->get_ok_button()->set_text(TTR("Close"));
+
_group_name_changed("");
}
diff --git a/editor/groups_editor.h b/editor/groups_editor.h
index 8bbea4e652..cd9d458f4b 100644
--- a/editor/groups_editor.h
+++ b/editor/groups_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* groups_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* groups_editor.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 GROUPS_EDITOR_H
#define GROUPS_EDITOR_H
@@ -39,12 +39,10 @@
#include "scene/gui/popup.h"
#include "scene/gui/tree.h"
-class EditorUndoRedoManager;
-
class GroupDialog : public AcceptDialog {
GDCLASS(GroupDialog, AcceptDialog);
- ConfirmationDialog *error = nullptr;
+ AcceptDialog *error = nullptr;
SceneTree *scene_tree = nullptr;
TreeItem *groups_root = nullptr;
@@ -69,8 +67,6 @@ class GroupDialog : public AcceptDialog {
String selected_group;
- Ref<EditorUndoRedoManager> undo_redo;
-
void _group_selected();
void _remove_filter_changed(const String &p_filter);
@@ -88,8 +84,6 @@ class GroupDialog : public AcceptDialog {
void _modify_group_pressed(Object *p_item, int p_column, int p_id, MouseButton p_button);
void _delete_group_item(const String &p_name);
- bool _can_edit(Node *p_node, String p_group);
-
void _load_groups(Node *p_current);
void _load_nodes(Node *p_current);
@@ -104,7 +98,6 @@ public:
};
void edit();
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
GroupDialog();
};
@@ -113,20 +106,25 @@ class GroupsEditor : public VBoxContainer {
GDCLASS(GroupsEditor, VBoxContainer);
Node *node = nullptr;
+ TreeItem *groups_root = nullptr;
GroupDialog *group_dialog = nullptr;
+ AcceptDialog *error = nullptr;
LineEdit *group_name = nullptr;
Button *add = nullptr;
Tree *tree = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
+ String selected_group;
void update_tree();
void _add_group(const String &p_group = "");
void _modify_group(Object *p_item, int p_column, int p_id, MouseButton p_button);
void _group_name_changed(const String &p_new_text);
+ void _group_selected();
+ void _group_renamed();
+
void _show_group_dialog();
protected:
@@ -138,7 +136,6 @@ public:
COPY_GROUP,
};
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
void set_current(Node *p_node);
GroupsEditor();
diff --git a/editor/history_dock.cpp b/editor/history_dock.cpp
new file mode 100644
index 0000000000..41ca519400
--- /dev/null
+++ b/editor/history_dock.cpp
@@ -0,0 +1,253 @@
+/**************************************************************************/
+/* history_dock.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 "history_dock.h"
+
+#include "editor/editor_node.h"
+#include "editor/editor_undo_redo_manager.h"
+#include "scene/gui/check_box.h"
+#include "scene/gui/item_list.h"
+
+struct SortActionsByTimestamp {
+ bool operator()(const EditorUndoRedoManager::Action &l, const EditorUndoRedoManager::Action &r) const {
+ return l.timestamp > r.timestamp;
+ }
+};
+
+void HistoryDock::on_history_changed() {
+ if (is_visible_in_tree()) {
+ refresh_history();
+ } else {
+ need_refresh = true;
+ }
+}
+
+void HistoryDock::refresh_history() {
+ action_list->clear();
+ bool include_scene = current_scene_checkbox->is_pressed();
+ bool include_global = global_history_checkbox->is_pressed();
+
+ if (!include_scene && !include_global) {
+ action_list->add_item(TTR("The Beginning"));
+ return;
+ }
+
+ const EditorUndoRedoManager::History &current_scene_history = ur_manager->get_or_create_history(EditorNode::get_editor_data().get_current_edited_scene_history_id());
+ const EditorUndoRedoManager::History &global_history = ur_manager->get_or_create_history(EditorUndoRedoManager::GLOBAL_HISTORY);
+
+ Vector<EditorUndoRedoManager::Action> full_history;
+ {
+ int full_size = 0;
+ if (include_scene) {
+ full_size += current_scene_history.redo_stack.size() + current_scene_history.undo_stack.size();
+ }
+ if (include_global) {
+ full_size += global_history.redo_stack.size() + global_history.undo_stack.size();
+ }
+ full_history.resize(full_size);
+ }
+
+ int i = 0;
+ if (include_scene) {
+ for (const EditorUndoRedoManager::Action &E : current_scene_history.redo_stack) {
+ full_history.write[i] = E;
+ i++;
+ }
+ for (const EditorUndoRedoManager::Action &E : current_scene_history.undo_stack) {
+ full_history.write[i] = E;
+ i++;
+ }
+ }
+ if (include_global) {
+ for (const EditorUndoRedoManager::Action &E : global_history.redo_stack) {
+ full_history.write[i] = E;
+ i++;
+ }
+ for (const EditorUndoRedoManager::Action &E : global_history.undo_stack) {
+ full_history.write[i] = E;
+ i++;
+ }
+ }
+
+ full_history.sort_custom<SortActionsByTimestamp>();
+ for (const EditorUndoRedoManager::Action &E : full_history) {
+ action_list->add_item(E.action_name);
+ if (E.history_id == EditorUndoRedoManager::GLOBAL_HISTORY) {
+ action_list->set_item_custom_fg_color(-1, get_theme_color(SNAME("accent_color"), SNAME("Editor")));
+ }
+ }
+
+ action_list->add_item(TTR("The Beginning"));
+ refresh_version();
+}
+
+void HistoryDock::on_version_changed() {
+ if (is_visible_in_tree()) {
+ refresh_version();
+ } else {
+ need_refresh = true;
+ }
+}
+
+void HistoryDock::refresh_version() {
+ int idx = 0;
+ bool include_scene = current_scene_checkbox->is_pressed();
+ bool include_global = global_history_checkbox->is_pressed();
+
+ if (!include_scene && !include_global) {
+ current_version = idx;
+ action_list->set_current(idx);
+ return;
+ }
+
+ const EditorUndoRedoManager::History &current_scene_history = ur_manager->get_or_create_history(EditorNode::get_editor_data().get_current_edited_scene_history_id());
+ const EditorUndoRedoManager::History &global_history = ur_manager->get_or_create_history(EditorUndoRedoManager::GLOBAL_HISTORY);
+ double newest_undo_timestamp = 0;
+
+ if (include_scene && !current_scene_history.undo_stack.is_empty()) {
+ newest_undo_timestamp = current_scene_history.undo_stack.front()->get().timestamp;
+ }
+
+ if (include_global && !global_history.undo_stack.is_empty()) {
+ double global_undo_timestamp = global_history.undo_stack.front()->get().timestamp;
+ if (global_undo_timestamp > newest_undo_timestamp) {
+ newest_undo_timestamp = global_undo_timestamp;
+ }
+ }
+
+ if (include_scene) {
+ int skip = 0;
+ for (const EditorUndoRedoManager::Action &E : current_scene_history.redo_stack) {
+ if (E.timestamp < newest_undo_timestamp) {
+ skip++;
+ } else {
+ break;
+ }
+ }
+ idx += current_scene_history.redo_stack.size() - skip;
+ }
+
+ if (include_global) {
+ int skip = 0;
+ for (const EditorUndoRedoManager::Action &E : global_history.redo_stack) {
+ if (E.timestamp < newest_undo_timestamp) {
+ skip++;
+ } else {
+ break;
+ }
+ }
+ idx += global_history.redo_stack.size() - skip;
+ }
+
+ current_version = idx;
+ action_list->set_current(idx);
+}
+
+void HistoryDock::seek_history(int p_index) {
+ bool include_scene = current_scene_checkbox->is_pressed();
+ bool include_global = global_history_checkbox->is_pressed();
+
+ if (!include_scene && !include_global) {
+ return;
+ }
+ int current_scene_id = EditorNode::get_editor_data().get_current_edited_scene_history_id();
+
+ while (current_version < p_index) {
+ if (include_scene) {
+ if (include_global) {
+ ur_manager->undo();
+ } else {
+ ur_manager->undo_history(current_scene_id);
+ }
+ } else {
+ ur_manager->undo_history(EditorUndoRedoManager::GLOBAL_HISTORY);
+ }
+ }
+
+ while (current_version > p_index) {
+ if (include_scene) {
+ if (include_global) {
+ ur_manager->redo();
+ } else {
+ ur_manager->redo_history(current_scene_id);
+ }
+ } else {
+ ur_manager->redo_history(EditorUndoRedoManager::GLOBAL_HISTORY);
+ }
+ }
+}
+
+void HistoryDock::_notification(int p_notification) {
+ switch (p_notification) {
+ case NOTIFICATION_READY: {
+ EditorNode::get_singleton()->connect("scene_changed", callable_mp(this, &HistoryDock::on_history_changed));
+ } break;
+
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ if (is_visible_in_tree() && need_refresh) {
+ refresh_history();
+ }
+ } break;
+ }
+}
+
+HistoryDock::HistoryDock() {
+ set_name("History");
+
+ 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));
+
+ HBoxContainer *mode_hb = memnew(HBoxContainer);
+ add_child(mode_hb);
+
+ current_scene_checkbox = memnew(CheckBox);
+ mode_hb->add_child(current_scene_checkbox);
+ current_scene_checkbox->set_flat(true);
+ current_scene_checkbox->set_pressed(true);
+ current_scene_checkbox->set_text(TTR("Scene"));
+ current_scene_checkbox->set_h_size_flags(SIZE_EXPAND_FILL);
+ current_scene_checkbox->set_clip_text(true);
+ current_scene_checkbox->connect("toggled", callable_mp(this, &HistoryDock::refresh_history).unbind(1));
+
+ global_history_checkbox = memnew(CheckBox);
+ mode_hb->add_child(global_history_checkbox);
+ global_history_checkbox->set_flat(true);
+ global_history_checkbox->set_pressed(true);
+ global_history_checkbox->set_text(TTR("Global"));
+ global_history_checkbox->set_h_size_flags(SIZE_EXPAND_FILL);
+ global_history_checkbox->set_clip_text(true);
+ global_history_checkbox->connect("toggled", callable_mp(this, &HistoryDock::refresh_history).unbind(1));
+
+ action_list = memnew(ItemList);
+ add_child(action_list);
+ action_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ action_list->connect("item_selected", callable_mp(this, &HistoryDock::seek_history));
+}
diff --git a/editor/history_dock.h b/editor/history_dock.h
new file mode 100644
index 0000000000..d507f19b07
--- /dev/null
+++ b/editor/history_dock.h
@@ -0,0 +1,66 @@
+/**************************************************************************/
+/* history_dock.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 HISTORY_DOCK_H
+#define HISTORY_DOCK_H
+
+#include "scene/gui/box_container.h"
+
+class CheckBox;
+class ItemList;
+class EditorUndoRedoManager;
+
+class HistoryDock : public VBoxContainer {
+ GDCLASS(HistoryDock, VBoxContainer);
+
+ EditorUndoRedoManager *ur_manager;
+ ItemList *action_list = nullptr;
+
+ CheckBox *current_scene_checkbox = nullptr;
+ CheckBox *global_history_checkbox = nullptr;
+
+ bool need_refresh = true;
+ int current_version = 0;
+
+ void on_history_changed();
+ void refresh_history();
+ void on_version_changed();
+ void refresh_version();
+
+protected:
+ void _notification(int p_notification);
+
+public:
+ void seek_history(int p_index);
+
+ HistoryDock();
+};
+
+#endif // HISTORY_DOCK_H
diff --git a/editor/icons/ArrowDown.svg b/editor/icons/ArrowDown.svg
index d24357d2c5..f17c1bede7 100644
--- a/editor/icons/ArrowDown.svg
+++ b/editor/icons/ArrowDown.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 3.002a1 1 0 0 0 -.69336.29102 1 1 0 0 0 0 1.4141l2.293 2.293h-4.5859c-.55228 0-1 .4477-1 1s.44772 1 1 1h4.5859l-2.293 2.293a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l4-4a1.0001 1.0001 0 0 0 0-1.4141l-4-4a1 1 0 0 0 -.7207-.29102z" fill="#e0e0e0" fill-opacity=".99608" transform="matrix(0 1 -1 0 16.0021 -.00004)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 3.002a1 1 0 0 0 -.69336.29102 1 1 0 0 0 0 1.4141l2.293 2.293h-4.5859c-.55228 0-1 .4477-1 1s.44772 1 1 1h4.5859l-2.293 2.293a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l4-4a1.0001 1.0001 0 0 0 0-1.4141l-4-4a1 1 0 0 0 -.7207-.29102z" fill="#e0e0e0" transform="matrix(0 1 -1 0 16.0021 -.00004)"/></svg>
diff --git a/editor/icons/ArrowLeft.svg b/editor/icons/ArrowLeft.svg
index ddd2f4e353..1a923cb6db 100644
--- a/editor/icons/ArrowLeft.svg
+++ b/editor/icons/ArrowLeft.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.9863 3.002a1 1 0 0 0 -.69336.29102l-4 4a1.0001 1.0001 0 0 0 0 1.4141l4 4a1 1 0 0 0 1.4141 0 1 1 0 0 0 0-1.4141l-2.293-2.293h4.5859a1 1 0 0 0 1-1 1 1 0 0 0 -1-1h-4.5859l2.293-2.293a1 1 0 0 0 0-1.4141 1 1 0 0 0 -.7207-.29102z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.9863 3.002a1 1 0 0 0 -.69336.29102l-4 4a1.0001 1.0001 0 0 0 0 1.4141l4 4a1 1 0 0 0 1.4141 0 1 1 0 0 0 0-1.4141l-2.293-2.293h4.5859a1 1 0 0 0 1-1 1 1 0 0 0 -1-1h-4.5859l2.293-2.293a1 1 0 0 0 0-1.4141 1 1 0 0 0 -.7207-.29102z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/ArrowRight.svg b/editor/icons/ArrowRight.svg
index a0c78dc1eb..da706c17ba 100644
--- a/editor/icons/ArrowRight.svg
+++ b/editor/icons/ArrowRight.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 3.002a1 1 0 0 0 -.69336.29102 1 1 0 0 0 0 1.4141l2.293 2.293h-4.5859c-.55228 0-1 .4477-1 1s.44772 1 1 1h4.5859l-2.293 2.293a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l4-4a1.0001 1.0001 0 0 0 0-1.4141l-4-4a1 1 0 0 0 -.7207-.29102z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 3.002a1 1 0 0 0 -.69336.29102 1 1 0 0 0 0 1.4141l2.293 2.293h-4.5859c-.55228 0-1 .4477-1 1s.44772 1 1 1h4.5859l-2.293 2.293a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l4-4a1.0001 1.0001 0 0 0 0-1.4141l-4-4a1 1 0 0 0 -.7207-.29102z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/ArrowUp.svg b/editor/icons/ArrowUp.svg
index f71f95c7b1..1381fea1b4 100644
--- a/editor/icons/ArrowUp.svg
+++ b/editor/icons/ArrowUp.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8.00008 1049.4022a1 1 0 0 0 .69336-.291 1 1 0 0 0 0-1.4141l-2.293-2.293h4.5859c.55228 0 1-.4477 1-1s-.44772-1-1-1h-4.5859l2.293-2.293a1 1 0 0 0 0-1.4141 1 1 0 0 0 -1.4141 0l-4 4a1.0001 1.0001 0 0 0 0 1.4141l4 4a1 1 0 0 0 .7207.291z" fill="#e0e0e0" fill-opacity=".99608" transform="matrix(0 1 -1 0 1052.4021 -.00004)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8.00008 1049.4022a1 1 0 0 0 .69336-.291 1 1 0 0 0 0-1.4141l-2.293-2.293h4.5859c.55228 0 1-.4477 1-1s-.44772-1-1-1h-4.5859l2.293-2.293a1 1 0 0 0 0-1.4141 1 1 0 0 0 -1.4141 0l-4 4a1.0001 1.0001 0 0 0 0 1.4141l4 4a1 1 0 0 0 .7207.291z" fill="#e0e0e0" transform="matrix(0 1 -1 0 1052.4021 -.00004)"/></svg>
diff --git a/editor/icons/AutoKey.svg b/editor/icons/AutoKey.svg
index acc6665baf..877b00722f 100644
--- a/editor/icons/AutoKey.svg
+++ b/editor/icons/AutoKey.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><circle cx="8" cy="5" r="4"/><path d="m11 13c0 1.6569 1.3431 3 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1 .00001-.55228.44772-.99999 1-1h1v-2h-1c-1.6569 0-3 1.3431-3 3z" fill-opacity=".99608"/><path d="m4 10c-1.6569 0-3 1.3431-3 3v3h2v-3c.0000096-.5523.44772-1 1-1h1v-2z" fill-opacity=".99608"/><path d="m8 10c-3 0-3 3-3 3s0 3 3 3h1v-2h-1s-1 0-1-1h3 1s0-3-3-3zm-1 1h2v1h-2z"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><circle cx="8" cy="5" r="4"/><path d="m11 13c0 1.6569 1.3431 3 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1 .00001-.55228.44772-.99999 1-1h1v-2h-1c-1.6569 0-3 1.3431-3 3z"/><path d="m4 10c-1.6569 0-3 1.3431-3 3v3h2v-3c.0000096-.5523.44772-1 1-1h1v-2z"/><path d="m8 10c-3 0-3 3-3 3s0 3 3 3h1v-2h-1s-1 0-1-1h3 1s0-3-3-3zm-1 1h2v1h-2z"/></g></svg>
diff --git a/editor/icons/Blend.svg b/editor/icons/Blend.svg
index 4de2fa5a43..e692fc1c30 100644
--- a/editor/icons/Blend.svg
+++ b/editor/icons/Blend.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m9 1v2h2.5859l-3.5859 3.5859-4.293-4.293-1.4141 1.4141 4.293 4.293-4.293 4.293 1.4141 1.4141 4.293-4.293 3.5859 3.5859h-2.5859v2h5a1.0001 1.0001 0 0 0 1-1v-5h-2v2.5859l-3.5859-3.5859 3.5859-3.5859v2.5859h2v-5a1.0001 1.0001 0 0 0 -1-1h-5z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m9 1v2h2.5859l-3.5859 3.5859-4.293-4.293-1.4141 1.4141 4.293 4.293-4.293 4.293 1.4141 1.4141 4.293-4.293 3.5859 3.5859h-2.5859v2h5a1.0001 1.0001 0 0 0 1-1v-5h-2v2.5859l-3.5859-3.5859 3.5859-3.5859v2.5859h2v-5a1.0001 1.0001 0 0 0 -1-1h-5z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Bone.svg b/editor/icons/Bone.svg
index cbfa4794ed..f86b981619 100644
--- a/editor/icons/Bone.svg
+++ b/editor/icons/Bone.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10.478 1037.4a2.4664 2.4663 0 0 0 -1.7804.7205 2.4664 2.4663 0 0 0 -.31408 3.1041l-3.559 3.5608a2.4664 2.4663 0 0 0 -3.1023.3121 2.4664 2.4663 0 0 0 0 3.4876 2.4664 2.4663 0 0 0 1.397.6955 2.4664 2.4663 0 0 0 .69561 1.397 2.4664 2.4663 0 0 0 3.4877 0 2.4664 2.4663 0 0 0 .31408-3.1041l3.5609-3.5608a2.4664 2.4663 0 0 0 3.1004-.3102 2.4664 2.4663 0 0 0 0-3.4875 2.4664 2.4663 0 0 0 -1.397-.6974 2.4664 2.4663 0 0 0 -.69561-1.3971 2.4664 2.4663 0 0 0 -1.7072-.7205z" fill="#e0e0e0" fill-opacity=".99608" 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="m10.478 1037.4a2.4664 2.4663 0 0 0 -1.7804.7205 2.4664 2.4663 0 0 0 -.31408 3.1041l-3.559 3.5608a2.4664 2.4663 0 0 0 -3.1023.3121 2.4664 2.4663 0 0 0 0 3.4876 2.4664 2.4663 0 0 0 1.397.6955 2.4664 2.4663 0 0 0 .69561 1.397 2.4664 2.4663 0 0 0 3.4877 0 2.4664 2.4663 0 0 0 .31408-3.1041l3.5609-3.5608a2.4664 2.4663 0 0 0 3.1004-.3102 2.4664 2.4663 0 0 0 0-3.4875 2.4664 2.4663 0 0 0 -1.397-.6974 2.4664 2.4663 0 0 0 -.69561-1.3971 2.4664 2.4663 0 0 0 -1.7072-.7205z" fill="#e0e0e0" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/BoneMapHumanBody.svg b/editor/icons/BoneMapHumanBody.svg
index 2c2c5db1f6..8674157aaa 100644
--- a/editor/icons/BoneMapHumanBody.svg
+++ b/editor/icons/BoneMapHumanBody.svg
@@ -1 +1,26 @@
-<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="m926.5 217.162c-11.5-2-26.03 4.547-37.5 6.5-15.723 2.678-25.238 3.24-33.333 5.167-1.227.292-3.103.763-5.792.958 0 0-.019.16-.052.437-36.819.994-106.823-6.062-138.156-2.062-23.816 3.041-86.334-5.667-105.667-6-13.911-.239-59.292-4.583-71.75-2.5-.667-4.083-1.5-10.75.95-17.468 14.881-7.246 27.229-21.569 35.341-38.467.922 4.424 6.252 4.929 12.459-14.231 5.662-17.478 2.324-22.254-2.313-22.525.172-2.056.279-4.105.313-6.142.788-48.041-15-78.667-69-78.667s-69.787 30.626-69 78.667c.033 2.036.141 4.086.313 6.142-4.637.271-7.975 5.048-2.313 22.525 6.207 19.16 11.537 18.655 12.459 14.231 8.113 16.897 20.461 31.221 35.342 38.467 2.449 6.718 1.617 13.385.949 17.468-12.457-2.083-57.838 2.261-71.75 2.5-19.332.333-81.85 9.041-105.666 6-31.333-4-101.337 3.056-138.156 2.062-.033-.276-.053-.437-.053-.437-2.689-.195-4.564-.666-5.791-.958-8.096-1.927-17.611-2.489-33.334-5.167-11.469-1.953-26-8.5-37.5-6.5-3.367.586 6 9.834 15.5 12.334 13.635 3.588 25.25 10.666 36 13.166-2.25 3.75-15.59 7.063-23 12-5.336 3.557 6.5 6.5 12 5 20.842-5.684 22.973.389 37.514-9.019 30.078 4.078 102.537 20.514 122.154 14.186 12.457-4.018 100.332 7.083 142.332 5.833 6.039-.18 1.656 65.563 2 73.5 3 69-16.842 133.135-18.666 169.667-1.92 38.42-3.42 57.919 7.666 131.333 6.967 46.126-2.521 82.079-2 94 6 137 29 172 4 221-14 27.44 67.449 26.958 65 9-3.012-22.092-12.666-22.333-10.666-46.333 1.896-22.768 16.049-151.298 8.666-206.667-2-15 0-26 2-66 2.355-47.101 7-88 14-123 7 35 11.645 75.899 14 123 2 40 4 51 2 66-7.383 55.369 6.77 183.899 8.667 206.667 2 24-7.654 24.241-10.667 46.333-2.449 17.958 79 18.44 65-9-25-49-2-84 4-221 .522-11.921-8.966-47.874-2-94 11.086-73.414 9.586-92.913 7.667-131.333-1.824-36.532-21.667-100.667-18.667-169.667.345-7.938-4.039-73.68 2-73.5 42 1.25 129.876-9.852 142.333-5.833 19.616 6.328 92.076-10.107 122.153-14.186 14.541 9.407 16.673 3.335 37.514 9.019 5.5 1.5 17.336-1.443 12-5-7.409-4.937-20.75-8.25-23-12 10.75-2.5 22.366-9.578 36.001-13.166 9.5-2.5 18.866-11.748 15.499-12.334z" fill="#b2b2b2"/></svg>
+<?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>
diff --git a/editor/icons/CPUParticles3D.svg b/editor/icons/CPUParticles3D.svg
index d7ced5fc6b..5001375f80 100644
--- a/editor/icons/CPUParticles3D.svg
+++ b/editor/icons/CPUParticles3D.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="#fc7f7f" fill-opacity=".996078"/></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="#fc7f7f"/></svg>
diff --git a/editor/icons/CameraTexture.svg b/editor/icons/CameraTexture.svg
index adb4762082..91e3fe9b41 100644
--- a/editor/icons/CameraTexture.svg
+++ b/editor/icons/CameraTexture.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.55228 0-1 .44772-1 1v12c0 .55228.44772 1 1 1h12c.55228 0 1-.44772 1-1v-12c0-.55228-.44772-1-1-1zm1 2h10v8h-10zm5.8184 1.0039c-.85534.0009758-1.5654.66069-1.6289 1.5137-.30036-.27229-.69029-.4234-1.0957-.42383-.90315 0-1.6367.73162-1.6367 1.6348.0009732.69217.43922 1.3103 1.0918 1.541v1.1855c0 .30198.24293.54492.54492.54492h3.2695c.30199 0 .54492-.24294.54492-.54492v-.54492l1.6367 1.0898v-3.2715l-1.6367 1.0918v-.96484c.34606-.30952.54406-.75251.54492-1.2168 0-.90315-.73162-1.6348-1.6348-1.6348z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.55228 0-1 .44772-1 1v12c0 .55228.44772 1 1 1h12c.55228 0 1-.44772 1-1v-12c0-.55228-.44772-1-1-1zm1 2h10v8h-10zm5.8184 1.0039c-.85534.0009758-1.5654.66069-1.6289 1.5137-.30036-.27229-.69029-.4234-1.0957-.42383-.90315 0-1.6367.73162-1.6367 1.6348.0009732.69217.43922 1.3103 1.0918 1.541v1.1855c0 .30198.24293.54492.54492.54492h3.2695c.30199 0 .54492-.24294.54492-.54492v-.54492l1.6367 1.0898v-3.2715l-1.6367 1.0918v-.96484c.34606-.30952.54406-.75251.54492-1.2168 0-.90315-.73162-1.6348-1.6348-1.6348z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/CanvasItem.svg b/editor/icons/CanvasItem.svg
index f396290436..0d9b47613a 100644
--- a/editor/icons/CanvasItem.svg
+++ b/editor/icons/CanvasItem.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2.9208 1046.4c-.26373.3-.4204.7296-.4204 1.2383 0 1.6277-3.1381-.1781-.33757 2.6703.88382.899 2.6544.6701 3.5382-.2288.88384-.899.88382-2.3565 0-3.2554-1.1002-1.1191-2.2001-1.0845-2.7803-.4244zm2.3802-1.6103 2.4005 2.4416 6.8014-6.9177c.66286-.6742.66286-1.7673 0-2.4415-.66288-.6741-1.7376-.6741-2.4005 0z" fill="#e0e0e0" fill-opacity=".99608" 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="m2.9208 1046.4c-.26373.3-.4204.7296-.4204 1.2383 0 1.6277-3.1381-.1781-.33757 2.6703.88382.899 2.6544.6701 3.5382-.2288.88384-.899.88382-2.3565 0-3.2554-1.1002-1.1191-2.2001-1.0845-2.7803-.4244zm2.3802-1.6103 2.4005 2.4416 6.8014-6.9177c.66286-.6742.66286-1.7673 0-2.4415-.66288-.6741-1.7376-.6741-2.4005 0z" fill="#e0e0e0" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/CanvasLayer.svg b/editor/icons/CanvasLayer.svg
index 6e98fd1ba9..87295e6099 100644
--- a/editor/icons/CanvasLayer.svg
+++ b/editor/icons/CanvasLayer.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1a2 2 0 0 0 -2 2v6h1v-6a1 1 0 0 1 1-1h6v-1zm10.303 0c-.4344 0-.86973.16881-1.2012.50586l-6.8008 6.918 2.4004 2.4414 6.8008-6.918c.66286-.6742.66286-1.7672 0-2.4414-.33144-.33705-.76482-.50586-1.1992-.50586zm.69727 6v6a1 1 0 0 1 -1 1h-6v1h6a2 2 0 0 0 2-2v-6zm-9.8848 2.5781c-.48501-.048725-.90521.12503-1.1953.45508-.26373.3-.41992.72958-.41992 1.2383 0 1.6277-3.1385-.17848-.33789 2.6699.88382.899 2.6552.67038 3.5391-.22852.88384-.899.88382-2.357 0-3.2559-.55011-.55955-1.1009-.83018-1.5859-.87891z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1a2 2 0 0 0 -2 2v6h1v-6a1 1 0 0 1 1-1h6v-1zm10.303 0c-.4344 0-.86973.16881-1.2012.50586l-6.8008 6.918 2.4004 2.4414 6.8008-6.918c.66286-.6742.66286-1.7672 0-2.4414-.33144-.33705-.76482-.50586-1.1992-.50586zm.69727 6v6a1 1 0 0 1 -1 1h-6v1h6a2 2 0 0 0 2-2v-6zm-9.8848 2.5781c-.48501-.048725-.90521.12503-1.1953.45508-.26373.3-.41992.72958-.41992 1.2383 0 1.6277-3.1385-.17848-.33789 2.6699.88382.899 2.6552.67038 3.5391-.22852.88384-.899.88382-2.357 0-3.2559-.55011-.55955-1.1009-.83018-1.5859-.87891z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/CharacterBody3D.svg b/editor/icons/CharacterBody3D.svg
index d0def4f14a..21a642cacb 100644
--- a/editor/icons/CharacterBody3D.svg
+++ b/editor/icons/CharacterBody3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1c-.55401 0-1 .44599-1 1v3c0 .55401.44599 1 1 1h1v.99023a1.0001 1.0001 0 0 0 -.31641.0625l-2.0508.68359-.68359-2.0508a1.0001 1.0001 0 0 0 -.99023-.69727 1.0001 1.0001 0 0 0 -.9082 1.3281l1 3a1.0001 1.0001 0 0 0 1.2656.63281l1.6836-.56055v.61133c0 .04088.018715.07566.023437.11523l-4.5781 3.0527a1.0001 1.0001 0 1 0 1.1094 1.6641l5.0566-3.3711 1.4941 2.9863a1.0001 1.0001 0 0 0 1.2109.50195l3-1a1.0001 1.0001 0 1 0 -.63281-1.8965l-2.1777.72461-.97461-1.9512c.2759-.17764.46875-.47227.46875-.82617v-1h1.3828l.72266 1.4473a1.0001 1.0001 0 1 0 1.7891-.89453l-1-2a1.0001 1.0001 0 0 0 -.89453-.55273h-3v-1h1c.55401 0 1-.44599 1-1v-3c0-.55401-.44599-1-1-1zm0 2h1v2h-1z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1c-.55401 0-1 .44599-1 1v3c0 .55401.44599 1 1 1h1v.99023a1.0001 1.0001 0 0 0 -.31641.0625l-2.0508.68359-.68359-2.0508a1.0001 1.0001 0 0 0 -.99023-.69727 1.0001 1.0001 0 0 0 -.9082 1.3281l1 3a1.0001 1.0001 0 0 0 1.2656.63281l1.6836-.56055v.61133c0 .04088.018715.07566.023437.11523l-4.5781 3.0527a1.0001 1.0001 0 1 0 1.1094 1.6641l5.0566-3.3711 1.4941 2.9863a1.0001 1.0001 0 0 0 1.2109.50195l3-1a1.0001 1.0001 0 1 0 -.63281-1.8965l-2.1777.72461-.97461-1.9512c.2759-.17764.46875-.47227.46875-.82617v-1h1.3828l.72266 1.4473a1.0001 1.0001 0 1 0 1.7891-.89453l-1-2a1.0001 1.0001 0 0 0 -.89453-.55273h-3v-1h1c.55401 0 1-.44599 1-1v-3c0-.55401-.44599-1-1-1zm0 2h1v2h-1z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/Clear.svg b/editor/icons/Clear.svg
index 43c00311bc..577cacba22 100644
--- a/editor/icons/Clear.svg
+++ b/editor/icons/Clear.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a1 1 0 0 0 -1 1v5h-2c-1.108 0-2 .892-2 2v1h10v-1c0-1.108-.892-2-2-2h-2v-5a1 1 0 0 0 -1-1zm-5 10v4l10-1v-3z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a1 1 0 0 0 -1 1v5h-2c-1.108 0-2 .892-2 2v1h10v-1c0-1.108-.892-2-2-2h-2v-5a1 1 0 0 0 -1-1zm-5 10v4l10-1v-3z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/CollisionPolygon3D.svg b/editor/icons/CollisionPolygon3D.svg
index 57531fa9f4..121bd82685 100644
--- a/editor/icons/CollisionPolygon3D.svg
+++ b/editor/icons/CollisionPolygon3D.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="#fc7f7f" stroke-linejoin="round" stroke-opacity=".99608" 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="#fc7f7f" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/CollisionShape3D.svg b/editor/icons/CollisionShape3D.svg
index 7a8bbf8050..d7f8a308e6 100644
--- a/editor/icons/CollisionShape3D.svg
+++ b/editor/icons/CollisionShape3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1050.4-6-3v-6l6-3 6 3v6z" fill="none" stroke="#fc7f7f" stroke-linejoin="round" stroke-opacity=".99608" stroke-width="2" transform="translate(0 -1036.399988)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1050.4-6-3v-6l6-3 6 3v6z" fill="none" stroke="#fc7f7f" stroke-linejoin="round" stroke-width="2" transform="translate(0 -1036.399988)"/></svg>
diff --git a/editor/icons/CompressedTexture2D.svg b/editor/icons/CompressedTexture2D.svg
index 068f65dead..54ff10b3c1 100644
--- a/editor/icons/CompressedTexture2D.svg
+++ b/editor/icons/CompressedTexture2D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h6v-2h2v-2h-2-5v-8h5v-2zm6 2v2h2v-2zm2 0h2v-2h-2zm2 0v2h2v-2zm0 2h-2v2h2zm0 2v2h2v-2zm0 2h-2v2h2zm0 2v2h2v-2zm0 2h-2v2h2zm-2-4v-2h-2v-1h-1v1h-1v1h-1v1h-1v1h2 2v-1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h6v-2h2v-2h-2-5v-8h5v-2zm6 2v2h2v-2zm2 0h2v-2h-2zm2 0v2h2v-2zm0 2h-2v2h2zm0 2v2h2v-2zm0 2h-2v2h2zm0 2v2h2v-2zm0 2h-2v2h2zm-2-4v-2h-2v-1h-1v1h-1v1h-1v1h-1v1h2 2v-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/CurveTexture.svg b/editor/icons/CurveTexture.svg
index 761fb9a45b..f5a2eec195 100644
--- a/editor/icons/CurveTexture.svg
+++ b/editor/icons/CurveTexture.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.55228 0-1 .44772-1 1v9.1602c.32185-.10966.66-.16382 1-.16016.33117 0 .66575-.007902 1-.013672v-7.9863h10v1.1348c.29007-.10393.59442-.16256.90234-.17383.37315-.012796.74541.044169 1.0977.16797v-2.1289c0-.55228-.44772-1-1-1h-12zm7 4v1h-1v1h-2v1h-1v1h-1v1h2 2 .39062c1.1119-.56677 1.9678-1.4538 2.6094-3.4727v-.52734h-1v-1h-1zm4.9668.98828a1.0001 1.0001 0 0 0 -.92774.73828c-.92743 3.246-2.6356 4.6825-4.6523 5.4668-2.0168.7843-4.3867.80664-6.3867.80664a1.0001 1.0001 0 1 0 0 2c2 0 4.6301.023994 7.1133-.94141 2.4832-.9657 4.7751-3.0292 5.8477-6.7832a1.0001 1.0001 0 0 0 -.99414-1.2871z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.55228 0-1 .44772-1 1v9.1602c.32185-.10966.66-.16382 1-.16016.33117 0 .66575-.007902 1-.013672v-7.9863h10v1.1348c.29007-.10393.59442-.16256.90234-.17383.37315-.012796.74541.044169 1.0977.16797v-2.1289c0-.55228-.44772-1-1-1h-12zm7 4v1h-1v1h-2v1h-1v1h-1v1h2 2 .39062c1.1119-.56677 1.9678-1.4538 2.6094-3.4727v-.52734h-1v-1h-1zm4.9668.98828a1.0001 1.0001 0 0 0 -.92774.73828c-.92743 3.246-2.6356 4.6825-4.6523 5.4668-2.0168.7843-4.3867.80664-6.3867.80664a1.0001 1.0001 0 1 0 0 2c2 0 4.6301.023994 7.1133-.94141 2.4832-.9657 4.7751-3.0292 5.8477-6.7832a1.0001 1.0001 0 0 0 -.99414-1.2871z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/DebugSkipBreakpointsOff.svg b/editor/icons/DebugSkipBreakpointsOff.svg
index aef0d45a05..c0b6e8d188 100644
--- a/editor/icons/DebugSkipBreakpointsOff.svg
+++ b/editor/icons/DebugSkipBreakpointsOff.svg
@@ -1 +1,2 @@
-<svg height="17" viewBox="0 0 17 17" width="17" xmlns="http://www.w3.org/2000/svg"><path d="m4.8983252 3.006855a1.6192284 1.3289529 0 0 1 -.0000431.0097" stroke-width=".626319"/><path d="m8.796752 5.0553513a2.563139 3.6270869 0 0 1 -.0000683.02648" stroke-width=".626319"/><path d="m13.121337 4.512148a6.1594577 6.0545759 0 0 1 -.248787 8.20109 6.1594577 6.0545759 0 0 1 -8.3355404.427215 6.1594577 6.0545759 0 0 1 -1.1151058-8.1311866 6.1594577 6.0545759 0 0 1 8.1530832-1.7576713" fill="#fc7f7f" fill-opacity=".996078" stroke-width="1.019123"/></svg>
+<svg height="17" width="17" xmlns="http://www.w3.org/2000/svg"><circle cx="8.5" cy="8.5" r="6" fill="#fc7f7f" stroke-width="1"/></svg>
+
diff --git a/editor/icons/DebugSkipBreakpointsOn.svg b/editor/icons/DebugSkipBreakpointsOn.svg
index d8fbc6e43a..abea9579cf 100644
--- a/editor/icons/DebugSkipBreakpointsOn.svg
+++ b/editor/icons/DebugSkipBreakpointsOn.svg
@@ -1 +1,2 @@
-<svg height="17" viewBox="0 0 17 17" width="17" xmlns="http://www.w3.org/2000/svg"><path d="m4.8983252 3.006855a1.6192284 1.3289529 0 0 1 -.0000431.0097" stroke-width=".626319"/><path d="m8.796752 5.0553513a2.563139 3.6270869 0 0 1 -.0000683.02648" stroke-width=".626319"/><path d="m13.121337 4.512148a6.1594577 6.0545759 0 0 1 -.248787 8.20109 6.1594577 6.0545759 0 0 1 -8.3355404.427215 6.1594577 6.0545759 0 0 1 -1.1151058-8.1311866 6.1594577 6.0545759 0 0 1 8.1530832-1.7576713" fill="#fc7f7f" fill-opacity=".996078" stroke-width="1.019123"/><path d="m-9.290675 10.816157h18.575495v2.518711h-18.575495z" fill="#e0e0e0" stroke-width="1.187332" transform="matrix(.70605846 -.70815355 .70605846 .70815355 0 0)"/></svg>
+<svg height="17" width="17" xmlns="http://www.w3.org/2000/svg"><circle cx="8.5" cy="8.5" r="6" fill="#fc7f7f" stroke-width="1"/><path d="M1.077 14.239 14.192 1.084l1.779 1.784L2.855 16.022z" fill="#e0e0e0"/></svg>
+
diff --git a/editor/icons/DirectionalLight3D.svg b/editor/icons/DirectionalLight3D.svg
index ef25fd473a..a7c05452de 100644
--- a/editor/icons/DirectionalLight3D.svg
+++ b/editor/icons/DirectionalLight3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v3h2v-3zm-2.5352 2.0508-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm7.0703 0-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm-3.5352 1.9492c-1.6569 0-3 1.3432-3 3s1.3431 3 3 3 3-1.3432 3-3-1.3431-3-3-3zm-7 2v2h3v-2zm11 0v2h3v-2zm-7.5352 3.1211-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm7.0703 0-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm-4.5352 1.8789v3h2v-3z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v3h2v-3zm-2.5352 2.0508-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm7.0703 0-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm-3.5352 1.9492c-1.6569 0-3 1.3432-3 3s1.3431 3 3 3 3-1.3432 3-3-1.3431-3-3-3zm-7 2v2h3v-2zm11 0v2h3v-2zm-7.5352 3.1211-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm7.0703 0-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm-4.5352 1.8789v3h2v-3z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/EditorPlugin.svg b/editor/icons/EditorPlugin.svg
index 7008762fa8..8fab923c6d 100644
--- a/editor/icons/EditorPlugin.svg
+++ b/editor/icons/EditorPlugin.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.55226.0001-.99994.4477-1 1v8c.0000552.5523.44774.9999 1 1h3v.27148a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -1-1.7305v-.26953h3c.55226-.0001.99994-.4477 1-1v-3h.27148a2 2 0 0 0 1.7285 1 2 2 0 0 0 2-2 2 2 0 0 0 -2-2 2 2 0 0 0 -1.7305 1h-.26953v-3c-.000055-.5523-.44774-.9999-1-1h-8z" fill="#e0e0e0" fill-opacity=".99608" 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-.55226.0001-.99994.4477-1 1v8c.0000552.5523.44774.9999 1 1h3v.27148a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -1-1.7305v-.26953h3c.55226-.0001.99994-.4477 1-1v-3h.27148a2 2 0 0 0 1.7285 1 2 2 0 0 0 2-2 2 2 0 0 0 -2-2 2 2 0 0 0 -1.7305 1h-.26953v-3c-.000055-.5523-.44774-.9999-1-1h-8z" fill="#e0e0e0" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/Eraser.svg b/editor/icons/Eraser.svg
index 4995fa863c..c9be2569ef 100644
--- a/editor/icons/Eraser.svg
+++ b/editor/icons/Eraser.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10.228155 1.5447161-9.60250173 9.6107429 1.41421353 1.414213 1.6134635 1.885612.00693-.0069 4.2288056.000024 7.4852811-7.4852817zm-4.4456043 7.2823178 2.3136653 2.5858141-1.0357479 1.035746h-2.5853592l-1.0209853-1.293133z" fill="#e0e0e0" fill-opacity=".996078" stroke-width="1.02405"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10.228155 1.5447161-9.60250173 9.6107429 1.41421353 1.414213 1.6134635 1.885612.00693-.0069 4.2288056.000024 7.4852811-7.4852817zm-4.4456043 7.2823178 2.3136653 2.5858141-1.0357479 1.035746h-2.5853592l-1.0209853-1.293133z" fill="#e0e0e0" stroke-width="1.02405"/></svg>
diff --git a/editor/icons/FogVolume.svg b/editor/icons/FogVolume.svg
index b0a18eb29d..89ee466db4 100644
--- a/editor/icons/FogVolume.svg
+++ b/editor/icons/FogVolume.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f"><g fill-opacity=".996078"><path d="m4.5 9.0000002c-.2761429-.0000014-.5000014.2238571-.5.5-.0000014.2761429.2238571.5000008.5.4999998l8-.0000002c.276143.0000012.500001-.2238569.5-.4999998.000001-.2761429-.223857-.5000014-.5-.5z"/><path d="m3.5 11c-.2761429-.000001-.5000014.223857-.5.5-.0000014.276143.2238571.500001.5.5h5c.2761429.000001.500001-.223857.5-.5.000001-.276143-.2238571-.500001-.5-.5z"/><path d="m5.5 13c-.2761424 0-.5.223858-.5.5s.2238576.5.5.5h5c.276142 0 .5-.223858.5-.5s-.223858-.5-.5-.5z"/></g><path d="m2.5 8s-1.5 0-1.5-1.5 2-1.5 2-1.5 0-4 3.5-4 3.5 3 3.5 3 1.260711-2 3-1 .5 3 .5 3 1.5 0 1.5 1-1 1-1 1z" fill-opacity=".99608"/><path d="m10.5 11c-.276143-.000001-.500001.223857-.5.5-.000001.276143.223857.500001.5.5h2.5c.276143.000001.500001-.223857.5-.5.000001-.276143-.223857-.500001-.5-.5z" fill-opacity=".996078"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f"><g><path d="m4.5 9.0000002c-.2761429-.0000014-.5000014.2238571-.5.5-.0000014.2761429.2238571.5000008.5.4999998l8-.0000002c.276143.0000012.500001-.2238569.5-.4999998.000001-.2761429-.223857-.5000014-.5-.5z"/><path d="m3.5 11c-.2761429-.000001-.5000014.223857-.5.5-.0000014.276143.2238571.500001.5.5h5c.2761429.000001.500001-.223857.5-.5.000001-.276143-.2238571-.500001-.5-.5z"/><path d="m5.5 13c-.2761424 0-.5.223858-.5.5s.2238576.5.5.5h5c.276142 0 .5-.223858.5-.5s-.223858-.5-.5-.5z"/></g><path d="m2.5 8s-1.5 0-1.5-1.5 2-1.5 2-1.5 0-4 3.5-4 3.5 3 3.5 3 1.260711-2 3-1 .5 3 .5 3 1.5 0 1.5 1-1 1-1 1z"/><path d="m10.5 11c-.276143-.000001-.500001.223857-.5.5-.000001.276143.223857.500001.5.5h2.5c.276143.000001.500001-.223857.5-.5.000001-.276143-.223857-.500001-.5-.5z"/></g></svg>
diff --git a/editor/icons/GPUParticles3D.svg b/editor/icons/GPUParticles3D.svg
index bbc90ec35f..521a93efc6 100644
--- a/editor/icons/GPUParticles3D.svg
+++ b/editor/icons/GPUParticles3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a4.5 5 0 0 0 -4.4141 4.0312 3 3 0 0 0 -2.5859 2.9688 3 3 0 0 0 3 3h8a3 3 0 0 0 3-3 3 3 0 0 0 -2.5898-2.9668 4.5 5 0 0 0 -4.4102-4.0332zm-4 11a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm8 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-4 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a4.5 5 0 0 0 -4.4141 4.0312 3 3 0 0 0 -2.5859 2.9688 3 3 0 0 0 3 3h8a3 3 0 0 0 3-3 3 3 0 0 0 -2.5898-2.9668 4.5 5 0 0 0 -4.4102-4.0332zm-4 11a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm8 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-4 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/GPUParticlesAttractorBox3D.svg b/editor/icons/GPUParticlesAttractorBox3D.svg
index 7a2ee7a6b9..fdf65d11cb 100644
--- a/editor/icons/GPUParticlesAttractorBox3D.svg
+++ b/editor/icons/GPUParticlesAttractorBox3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#fc7f7f" fill-opacity=".996078" r="1"/><g fill="none" stroke="#fc7f7f" stroke-opacity=".996078"><ellipse cx="8" cy="-8" rx="2.339226" ry="4.949748" transform="rotate(90)"/><ellipse cx="8" cy="8" rx="2.339226" ry="4.949748"/><path d="m1.498906 1.498906h13.002189v13.002188h-13.002189z" stroke-width=".997813"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#fc7f7f" r="1"/><g fill="none" stroke="#fc7f7f"><ellipse cx="8" cy="-8" rx="2.339226" ry="4.949748" transform="rotate(90)"/><ellipse cx="8" cy="8" rx="2.339226" ry="4.949748"/><path d="m1.498906 1.498906h13.002189v13.002188h-13.002189z" stroke-width=".997813"/></g></svg>
diff --git a/editor/icons/GPUParticlesAttractorSphere3D.svg b/editor/icons/GPUParticlesAttractorSphere3D.svg
index 2215331a18..15a8016827 100644
--- a/editor/icons/GPUParticlesAttractorSphere3D.svg
+++ b/editor/icons/GPUParticlesAttractorSphere3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><ellipse cx="-8" cy="-7.999999" fill="none" rx="6.499003" ry="6.499001" stroke="#fc7f7f" stroke-opacity=".996078" stroke-width="1.002" transform="scale(-1)"/><circle cx="8" cy="8" fill="#fc7f7f" fill-opacity=".996078" r="1"/><g fill="none" stroke="#fc7f7f" stroke-opacity=".996078"><ellipse cx="11.313708" rx="2.339226" ry="4.949748" transform="matrix(.70710678 .70710678 -.70710678 .70710678 0 0)"/><ellipse cy="11.313708" rx="2.339226" ry="4.949748" transform="matrix(.70710678 -.70710678 .70710678 .70710678 0 0)"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><ellipse cx="-8" cy="-7.999999" fill="none" rx="6.499003" ry="6.499001" stroke="#fc7f7f" stroke-width="1.002" transform="scale(-1)"/><circle cx="8" cy="8" fill="#fc7f7f" r="1"/><g fill="none" stroke="#fc7f7f"><ellipse cx="11.313708" rx="2.339226" ry="4.949748" transform="matrix(.70710678 .70710678 -.70710678 .70710678 0 0)"/><ellipse cy="11.313708" rx="2.339226" ry="4.949748" transform="matrix(.70710678 -.70710678 .70710678 .70710678 0 0)"/></g></svg>
diff --git a/editor/icons/GPUParticlesAttractorVectorField3D.svg b/editor/icons/GPUParticlesAttractorVectorField3D.svg
index 87b2b21804..c9e0b4fae3 100644
--- a/editor/icons/GPUParticlesAttractorVectorField3D.svg
+++ b/editor/icons/GPUParticlesAttractorVectorField3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><ellipse cx="6.663637" cy="9.245457" fill="#fc7f7f" fill-opacity=".996078" rx="1.030661" ry=".998146"/><ellipse cx="-6.672815" cy="-9.387111" fill="none" rx="2.408711" ry="5.096776" stroke="#fc7f7f" stroke-opacity=".996078" stroke-width="1.0297" transform="matrix(-.99999945 .00104887 .00104887 -.99999945 0 0)"/><ellipse cx="9.387111" cy="-6.672815" fill="none" rx="2.408711" ry="5.096776" stroke="#fc7f7f" stroke-opacity=".996078" stroke-width="1.0297" transform="matrix(-.00104887 .99999945 -.99999945 .00104887 0 0)"/><g fill="#fc7f7f" fill-opacity=".996078"><path d="m11.8 15 2.4-2.4.8.8v-2.4h-2.4l.8.8-2.4 2.4z"/><path d="m11 6 3-3 1 1v-3h-3l1 1-3 3z"/><path d="m1.8 5 2.4-2.4.8.8v-2.4h-2.4l.8.8-2.4 2.4z"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><ellipse cx="6.663637" cy="9.245457" fill="#fc7f7f" rx="1.030661" ry=".998146"/><ellipse cx="-6.672815" cy="-9.387111" fill="none" rx="2.408711" ry="5.096776" stroke="#fc7f7f" stroke-width="1.0297" transform="matrix(-.99999945 .00104887 .00104887 -.99999945 0 0)"/><ellipse cx="9.387111" cy="-6.672815" fill="none" rx="2.408711" ry="5.096776" stroke="#fc7f7f" stroke-width="1.0297" transform="matrix(-.00104887 .99999945 -.99999945 .00104887 0 0)"/><g fill="#fc7f7f"><path d="m11.8 15 2.4-2.4.8.8v-2.4h-2.4l.8.8-2.4 2.4z"/><path d="m11 6 3-3 1 1v-3h-3l1 1-3 3z"/><path d="m1.8 5 2.4-2.4.8.8v-2.4h-2.4l.8.8-2.4 2.4z"/></g></svg>
diff --git a/editor/icons/GPUParticlesCollisionBox3D.svg b/editor/icons/GPUParticlesCollisionBox3D.svg
index 4f7325d086..ca595f16eb 100644
--- a/editor/icons/GPUParticlesCollisionBox3D.svg
+++ b/editor/icons/GPUParticlesCollisionBox3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 14.999999 14.999999" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f" fill-opacity=".996078"><path d="m7.5 2.8124998-5.5883107 2.7941554v5.7660988l5.5883107 2.794155 5.588311-2.794155v-5.7660988zm0 1.6886278 3.145021 1.5732692-3.145021 1.5717523-3.1450214-1.5717523zm-3.9916505 2.8362274 3.1933204 1.5966602v3.1465378l-3.1933204-1.598256zm7.9833015 0v3.145021l-3.1933209 1.598257v-3.146538z" stroke-width=".851579"/><circle cx="1.875" cy="3.75" r=".9375"/><circle cx="13.124999" cy="3.75" r=".9375"/><circle cx="9.374999" cy="1.875" r=".9375"/><circle cx="5.625" cy="1.875" r=".9375"/></g></svg>
+<svg height="16" viewBox="0 0 14.999999 14.999999" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f"><path d="m7.5 2.8124998-5.5883107 2.7941554v5.7660988l5.5883107 2.794155 5.588311-2.794155v-5.7660988zm0 1.6886278 3.145021 1.5732692-3.145021 1.5717523-3.1450214-1.5717523zm-3.9916505 2.8362274 3.1933204 1.5966602v3.1465378l-3.1933204-1.598256zm7.9833015 0v3.145021l-3.1933209 1.598257v-3.146538z" stroke-width=".851579"/><circle cx="1.875" cy="3.75" r=".9375"/><circle cx="13.124999" cy="3.75" r=".9375"/><circle cx="9.374999" cy="1.875" r=".9375"/><circle cx="5.625" cy="1.875" r=".9375"/></g></svg>
diff --git a/editor/icons/GPUParticlesCollisionSDF3D.svg b/editor/icons/GPUParticlesCollisionSDF3D.svg
index 00eca8295d..38fe6c49f8 100644
--- a/editor/icons/GPUParticlesCollisionSDF3D.svg
+++ b/editor/icons/GPUParticlesCollisionSDF3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 14h-12v-9s3 4 5.9999999 3.9999999c3.0000001-.0000001 6.0000001-3.9999999 6.0000001-3.9999999z" fill="none" stroke="#fc7f7f" stroke-linejoin="round" stroke-opacity=".996078" stroke-width="2"/><g fill="#fc7f7f" fill-opacity=".996078"><circle cx="2" cy="2" r="1"/><circle cx="14" cy="2" r="1"/><circle cx="10" cy="5" r="1"/><circle cx="6" cy="5" r="1"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 14h-12v-9s3 4 5.9999999 3.9999999c3.0000001-.0000001 6.0000001-3.9999999 6.0000001-3.9999999z" fill="none" stroke="#fc7f7f" stroke-linejoin="round" stroke-width="2"/><g fill="#fc7f7f"><circle cx="2" cy="2" r="1"/><circle cx="14" cy="2" r="1"/><circle cx="10" cy="5" r="1"/><circle cx="6" cy="5" r="1"/></g></svg>
diff --git a/editor/icons/GPUParticlesCollisionSphere3D.svg b/editor/icons/GPUParticlesCollisionSphere3D.svg
index cd188ddacc..4aa3f7c5bf 100644
--- a/editor/icons/GPUParticlesCollisionSphere3D.svg
+++ b/editor/icons/GPUParticlesCollisionSphere3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f" fill-opacity=".996078"><path d="m8 3.0532484c-3.2888554 0-5.9733758 2.6845204-5.9733758 5.9733758 0 3.2889408 2.6845204 5.9733758 5.9733758 5.9733758 3.288855 0 5.973376-2.684435 5.973376-5.9733758 0-3.2888554-2.684521-5.9733758-5.973376-5.9733758zm-.8533394 1.79005v4.1567016c-1.1034532-.0608789-2.2238878-.2544573-3.3650586-.5900074.256693-1.7901354 1.6087154-3.2141029 3.3650586-3.5667027zm1.7066788 0c1.7535276.3520281 3.1035956 1.77213 3.3633516 3.55834-1.113266.3129793-2.2321649.5142138-3.3633516.5866709zm3.2300606 5.3599956c-.434043 1.51792-1.663927 2.690664-3.2300606 3.005035v-2.518376c1.0915918-.0617 2.1691036-.227875 3.2300606-.486668zm-8.161765.015c1.0865571.272147 2.162106.428504 3.2250256.480003v2.510013c-1.5608431-.313338-2.7870065-1.479605-3.2250256-2.990016z" stroke-width=".853339"/><circle cx="2" cy="5" r="1"/><circle cx="14" cy="5" r="1"/><circle cx="10" cy="2" r="1"/><circle cx="6" cy="2" r="1"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f"><path d="m8 3.0532484c-3.2888554 0-5.9733758 2.6845204-5.9733758 5.9733758 0 3.2889408 2.6845204 5.9733758 5.9733758 5.9733758 3.288855 0 5.973376-2.684435 5.973376-5.9733758 0-3.2888554-2.684521-5.9733758-5.973376-5.9733758zm-.8533394 1.79005v4.1567016c-1.1034532-.0608789-2.2238878-.2544573-3.3650586-.5900074.256693-1.7901354 1.6087154-3.2141029 3.3650586-3.5667027zm1.7066788 0c1.7535276.3520281 3.1035956 1.77213 3.3633516 3.55834-1.113266.3129793-2.2321649.5142138-3.3633516.5866709zm3.2300606 5.3599956c-.434043 1.51792-1.663927 2.690664-3.2300606 3.005035v-2.518376c1.0915918-.0617 2.1691036-.227875 3.2300606-.486668zm-8.161765.015c1.0865571.272147 2.162106.428504 3.2250256.480003v2.510013c-1.5608431-.313338-2.7870065-1.479605-3.2250256-2.990016z" stroke-width=".853339"/><circle cx="2" cy="5" r="1"/><circle cx="14" cy="5" r="1"/><circle cx="10" cy="2" r="1"/><circle cx="6" cy="2" r="1"/></g></svg>
diff --git a/editor/icons/GradientTexture1D.svg b/editor/icons/GradientTexture1D.svg
index fa03e69805..9be4b00329 100644
--- a/editor/icons/GradientTexture1D.svg
+++ b/editor/icons/GradientTexture1D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m12.5 10.5v-7h-3v1h-1v1h1v1h-1v1h1v1h-1v1h1v1zm-4-1h-1v1h1zm-1 0v-1h-1v1zm0-1h1v-1h-1zm0-1v-1h-1v1zm0-1h1v-1h-1zm0-1v-1h-1v1zm0-1h1v-1h-1z" stroke-width=".787342"/><path d="m2 1c-.552285 0-1 .4477153-1 1v12.000001c0 .552285.447715 1 1 1h11.999999c.552285 0 1-.447715 1-1v-12.000001c0-.5522847-.447715-1-1-1zm1 2.0000001h9.999999v8.0000009h-9.999999z" fill-opacity=".99608"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m12.5 10.5v-7h-3v1h-1v1h1v1h-1v1h1v1h-1v1h1v1zm-4-1h-1v1h1zm-1 0v-1h-1v1zm0-1h1v-1h-1zm0-1v-1h-1v1zm0-1h1v-1h-1zm0-1v-1h-1v1zm0-1h1v-1h-1z" stroke-width=".787342"/><path d="m2 1c-.552285 0-1 .4477153-1 1v12.000001c0 .552285.447715 1 1 1h11.999999c.552285 0 1-.447715 1-1v-12.000001c0-.5522847-.447715-1-1-1zm1 2.0000001h9.999999v8.0000009h-9.999999z"/></g></svg>
diff --git a/editor/icons/GuiResizerTopLeft.svg b/editor/icons/GuiResizerTopLeft.svg
new file mode 100644
index 0000000000..a67c2c0722
--- /dev/null
+++ b/editor/icons/GuiResizerTopLeft.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 12c.55228 0 1-.44772 1-1v-6h6c.55228 0 1-.44772 1-1s-.44772-1-1-1h-7c-.55226.000055-.99994.44774-1 1v7c0 .55228.44772 1 1 1z" fill="#fff" fill-opacity=".58824"/></svg>
diff --git a/editor/icons/GuiVisibilityHidden.svg b/editor/icons/GuiVisibilityHidden.svg
index 6152fe8acf..1052d6dfcb 100644
--- a/editor/icons/GuiVisibilityHidden.svg
+++ b/editor/icons/GuiVisibilityHidden.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2.9609 7.7266-1.9219.54883c.31999 1.12.8236 2.0593 1.4316 2.8398l-.83398.83398 1.4141 1.4141.84375-.84375c.98585.74762 2.0766 1.2067 3.1055 1.3867v1.0938h2v-1.0938c1.0288-.17998 2.1196-.6391 3.1055-1.3867l.84375.84375 1.4141-1.4141-.83398-.83398c.60804-.78055 1.1117-1.7199 1.4316-2.8398l-1.9219-.54883c-.8756 3.0646-3.5391 4.2734-5.0391 4.2734s-4.1635-1.2088-5.0391-4.2734z" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2.9609 7.7266-1.9219.54883c.31999 1.12.8236 2.0593 1.4316 2.8398l-.83398.83398 1.4141 1.4141.84375-.84375c.98585.74762 2.0766 1.2067 3.1055 1.3867v1.0938h2v-1.0938c1.0288-.17998 2.1196-.6391 3.1055-1.3867l.84375.84375 1.4141-1.4141-.83398-.83398c.60804-.78055 1.1117-1.7199 1.4316-2.8398l-1.9219-.54883c-.8756 3.0646-3.5391 4.2734-5.0391 4.2734s-4.1635-1.2088-5.0391-4.2734z" fill="#e0e0e0" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/GuiVisibilityVisible.svg b/editor/icons/GuiVisibilityVisible.svg
index 32eaea633b..96659eb655 100644
--- a/editor/icons/GuiVisibilityVisible.svg
+++ b/editor/icons/GuiVisibilityVisible.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -.00586.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-2z" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -.00586.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-2z" fill="#e0e0e0" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/GuiVisibilityXray.svg b/editor/icons/GuiVisibilityXray.svg
index 109911df45..29ca9d0810 100644
--- a/editor/icons/GuiVisibilityXray.svg
+++ b/editor/icons/GuiVisibilityXray.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-rule="evenodd"><path d="m7.9998 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -.00586.5703c1.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-.5527c-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-2z" fill-opacity=".39216"/><path d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -.00586.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246v-2a4 4 0 0 1 -4-4 4 4 0 0 1 4-4zm0 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2z" fill-opacity=".99608"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-rule="evenodd"><path d="m7.9998 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -.00586.5703c1.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-.5527c-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-2z" fill-opacity=".39216"/><path d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -.00586.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246v-2a4 4 0 0 1 -4-4 4 4 0 0 1 4-4zm0 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2z"/></g></svg>
diff --git a/editor/icons/HTTPRequest.svg b/editor/icons/HTTPRequest.svg
index 1a2187fe15..34912dcd2b 100644
--- a/editor/icons/HTTPRequest.svg
+++ b/editor/icons/HTTPRequest.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 4h2v3h2v-3h2zm7 0v3h-2l3 4 3-4h-2v-3zm-10 9v2 1 2h1v-2h1v2h1v-5h-1v2h-1v-2zm4 0v1h1v4h1v-4h1v-1zm4 0v1h1v4h1v-4h1v-1zm4 0v2 1 2h1v-2h1 1v-1-2h-2zm1 1h1v1h-1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 1-3 4h2v3h2v-3h2zm7 0v3h-2l3 4 3-4h-2v-3zm-10 9v2 1 2h1v-2h1v2h1v-5h-1v2h-1v-2zm4 0v1h1v4h1v-4h1v-1zm4 0v1h1v4h1v-4h1v-1zm4 0v2 1 2h1v-2h1 1v-1-2h-2zm1 1h1v1h-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/History.svg b/editor/icons/History.svg
index 45bc565088..cb1bb4178f 100644
--- a/editor/icons/History.svg
+++ b/editor/icons/History.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/><path d="m8 1041.4h2v4h-2z"/><path d="m8 1043.4h4v2h-4z"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/><path d="m8 1041.4h2v4h-2z"/><path d="m8 1043.4h4v2h-4z"/></g></svg>
diff --git a/editor/icons/Hsize.svg b/editor/icons/Hsize.svg
index c7b62e58c8..cf805fce50 100644
--- a/editor/icons/Hsize.svg
+++ b/editor/icons/Hsize.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 7v-2l-3 3 3 3v-2h8v2l3-3-3-3v2z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 7v-2l-3 3 3 3v-2h8v2l3-3-3-3v2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Image.svg b/editor/icons/Image.svg
index ddf97ec59e..a990974a4f 100644
--- a/editor/icons/Image.svg
+++ b/editor/icons/Image.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-12a1 1 0 0 0 -1-1zm1 2h10v8h-10zm6 2-1.5 2.5-.70117 1.168-.099609-.16797-.89844-1.5-.90039 1.5-.90039 1.5h1.8008.19922 1.5996 1.4004 3l-1.5-2.5-1.5-2.5z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-12a1 1 0 0 0 -1-1zm1 2h10v8h-10zm6 2-1.5 2.5-.70117 1.168-.099609-.16797-.89844-1.5-.90039 1.5-.90039 1.5h1.8008.19922 1.5996 1.4004 3l-1.5-2.5-1.5-2.5z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/ImageTexture.svg b/editor/icons/ImageTexture.svg
index 013e847db3..25d4b53d00 100644
--- a/editor/icons/ImageTexture.svg
+++ b/editor/icons/ImageTexture.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-12a1 1 0 0 0 -1-1zm1 2h10v8h-10zm6 2v1h-1v1h-2v1h-1v1h-1v1h2 2 2 2v-2h-1v-2h-1v-1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-12a1 1 0 0 0 -1-1zm1 2h10v8h-10zm6 2v1h-1v1h-2v1h-1v1h-1v1h2 2 2 2v-2h-1v-2h-1v-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/JoyAxis.svg b/editor/icons/JoyAxis.svg
index 1ab65f0af0..11c694aede 100644
--- a/editor/icons/JoyAxis.svg
+++ b/editor/icons/JoyAxis.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="m27 1038.4h7v14h-7z" fill="#fff" fill-opacity=".99608"/><g fill="#e0e0e0"><path d="m3 1a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h12v-14zm4 2h2a1 1 0 0 1 1 1v2h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1-1v-2h-2a1 1 0 0 1 -1-1v-2a1 1 0 0 1 1-1h2v-2a1 1 0 0 1 1-1z" fill-opacity=".99608" transform="translate(0 1036.4)"/><circle cx="8" cy="1044.4" r="1"/></g></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="m27 1038.4h7v14h-7z" fill="#fff"/><g fill="#e0e0e0"><path d="m3 1a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h12v-14zm4 2h2a1 1 0 0 1 1 1v2h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1-1v-2h-2a1 1 0 0 1 -1-1v-2a1 1 0 0 1 1-1h2v-2a1 1 0 0 1 1-1z" transform="translate(0 1036.4)"/><circle cx="8" cy="1044.4" r="1"/></g></g></svg>
diff --git a/editor/icons/JoyButton.svg b/editor/icons/JoyButton.svg
index 080d91ad53..d3d6e22929 100644
--- a/editor/icons/JoyButton.svg
+++ b/editor/icons/JoyButton.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill-opacity=".99608" transform="translate(0 -1036.4)"><path d="m27 1038.4h7v14h-7z" fill="#fff"/><path d="m1 1v14h12c1.1046 0 2-.8954 2-2v-10c0-1.1046-.89543-2-2-2zm7 1a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2zm-4 4a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2zm8 0a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2zm-4 4a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2z" 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 transform="translate(0 -1036.4)"><path d="m27 1038.4h7v14h-7z" fill="#fff"/><path d="m1 1v14h12c1.1046 0 2-.8954 2-2v-10c0-1.1046-.89543-2-2-2zm7 1a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2zm-4 4a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2zm8 0a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2zm-4 4a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2z" fill="#e0e0e0" transform="translate(0 1036.4)"/></g></svg>
diff --git a/editor/icons/Joypad.svg b/editor/icons/Joypad.svg
index 3c6bbf2980..ead745379b 100644
--- a/editor/icons/Joypad.svg
+++ b/editor/icons/Joypad.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 3c-.55226.0000552-.99994.44774-1 1v8c.0000552.55226.44774.99994 1 1h14c.55226-.000055.99994-.44774 1-1v-8c-.000055-.55226-.44774-.99994-1-1zm2 2h2v2h2v2h-2v2h-2v-2h-2v-2h2zm10.5 0a1.5 1.5 0 0 1 1.5 1.5 1.5 1.5 0 0 1 -1.5 1.5 1.5 1.5 0 0 1 -1.5-1.5 1.5 1.5 0 0 1 1.5-1.5zm-3 3a1.5 1.5 0 0 1 1.5 1.5 1.5 1.5 0 0 1 -1.5 1.5 1.5 1.5 0 0 1 -1.5-1.5 1.5 1.5 0 0 1 1.5-1.5z" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 3c-.55226.0000552-.99994.44774-1 1v8c.0000552.55226.44774.99994 1 1h14c.55226-.000055.99994-.44774 1-1v-8c-.000055-.55226-.44774-.99994-1-1zm2 2h2v2h2v2h-2v2h-2v-2h-2v-2h2zm10.5 0a1.5 1.5 0 0 1 1.5 1.5 1.5 1.5 0 0 1 -1.5 1.5 1.5 1.5 0 0 1 -1.5-1.5 1.5 1.5 0 0 1 1.5-1.5zm-3 3a1.5 1.5 0 0 1 1.5 1.5 1.5 1.5 0 0 1 -1.5 1.5 1.5 1.5 0 0 1 -1.5-1.5 1.5 1.5 0 0 1 1.5-1.5z" fill="#e0e0e0" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/Key.svg b/editor/icons/Key.svg
index 544ebe5a47..01bf51dbd8 100644
--- a/editor/icons/Key.svg
+++ b/editor/icons/Key.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11 4a4 4 0 0 0 -3.8691 3h-6.1309v2h1v2h3v-2h2.1328a4 4 0 0 0 3.8672 3 4 4 0 0 0 4-4 4 4 0 0 0 -4-4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11 4a4 4 0 0 0 -3.8691 3h-6.1309v2h1v2h3v-2h2.1328a4 4 0 0 0 3.8672 3 4 4 0 0 0 4-4 4 4 0 0 0 -4-4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/KeyNext.svg b/editor/icons/KeyNext.svg
index 83a8329494..47387c875a 100644
--- a/editor/icons/KeyNext.svg
+++ b/editor/icons/KeyNext.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11 9v2h-2v2h2v2h2v-2h2v-2h-2v-2z" fill="#5fff97"/><path d="m11 1a4 4 0 0 0 -3.8691 3h-6.1309v2h1v2h3v-2h2.1328a4 4 0 0 0 2.8672 2.8691v-.86914h3.6387a4 4 0 0 0 1.3613-3 4 4 0 0 0 -4-4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11 9v2h-2v2h2v2h2v-2h2v-2h-2v-2z" fill="#5fff97"/><path d="m11 1a4 4 0 0 0 -3.8691 3h-6.1309v2h1v2h3v-2h2.1328a4 4 0 0 0 2.8672 2.8691v-.86914h3.6387a4 4 0 0 0 1.3613-3 4 4 0 0 0 -4-4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/KeyPosition.svg b/editor/icons/KeyPosition.svg
index 260a6f582f..c0fa703462 100644
--- a/editor/icons/KeyPosition.svg
+++ b/editor/icons/KeyPosition.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-.195 0-.38964.07519-.53906.22461l-3.2363 3.2363c-.29884.29884-.29884.77929 0 1.0781l3.2363 3.2363c.29884.29884.77929.29884 1.0781 0l3.2363-3.2363c.29884-.29884.29884-.77929 0-1.0781l-3.2363-3.2363c-.14942-.14942-.34406-.22461-.53906-.22461zm-7 7v5c0 1.6569 1.3471 3.114 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1v-5zm7 2c-1.645 0-3 1.355-3 3s1.355 3 3 3 3-1.355 3-3-1.355-3-3-3zm3 3c0 1.6569 1.3431 3 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1 .00001-.55228.44772-.99999 1-1h1v-2h-1c-1.6569 0-3 1.3431-3 3zm-3-1c.56413 0 1 .4359 1 1 0 .5642-.43587 1-1 1s-1-.4358-1-1c0-.5641.43587-1 1-1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-.195 0-.38964.07519-.53906.22461l-3.2363 3.2363c-.29884.29884-.29884.77929 0 1.0781l3.2363 3.2363c.29884.29884.77929.29884 1.0781 0l3.2363-3.2363c.29884-.29884.29884-.77929 0-1.0781l-3.2363-3.2363c-.14942-.14942-.34406-.22461-.53906-.22461zm-7 7v5c0 1.6569 1.3471 3.114 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1v-5zm7 2c-1.645 0-3 1.355-3 3s1.355 3 3 3 3-1.355 3-3-1.355-3-3-3zm3 3c0 1.6569 1.3431 3 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1 .00001-.55228.44772-.99999 1-1h1v-2h-1c-1.6569 0-3 1.3431-3 3zm-3-1c.56413 0 1 .4359 1 1 0 .5642-.43587 1-1 1s-1-.4358-1-1c0-.5641.43587-1 1-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/KeyRotation.svg b/editor/icons/KeyRotation.svg
index 284a835467..391511df7c 100644
--- a/editor/icons/KeyRotation.svg
+++ b/editor/icons/KeyRotation.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-.195 0-.38964.07519-.53906.22461l-3.2363 3.2363c-.29884.29884-.29884.77929 0 1.0781l3.2363 3.2363c.29884.29884.77929.29884 1.0781 0l3.2363-3.2363c.29884-.29884.29884-.77929 0-1.0781l-3.2363-3.2363c-.14942-.14942-.34406-.22461-.53906-.22461zm3 7v5c0 1.6569 1.3431 3 3 3h1v-2h-1c-.55228 0-.99999-.4477-1-1v-1h2v-2h-2v-2zm0 5c0-1.645-1.355-3-3-3s-3 1.355-3 3 1.355 3 3 3 3-1.355 3-3zm-7-3c-1.6569 0-3 1.3431-3 3v3h2v-3c.0000096-.5523.44772-1 1-1h1v-2zm4 2c.56413 0 1 .4359 1 1 0 .5642-.43587 1-1 1s-1-.4358-1-1c0-.5641.43587-1 1-1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-.195 0-.38964.07519-.53906.22461l-3.2363 3.2363c-.29884.29884-.29884.77929 0 1.0781l3.2363 3.2363c.29884.29884.77929.29884 1.0781 0l3.2363-3.2363c.29884-.29884.29884-.77929 0-1.0781l-3.2363-3.2363c-.14942-.14942-.34406-.22461-.53906-.22461zm3 7v5c0 1.6569 1.3431 3 3 3h1v-2h-1c-.55228 0-.99999-.4477-1-1v-1h2v-2h-2v-2zm0 5c0-1.645-1.355-3-3-3s-3 1.355-3 3 1.355 3 3 3 3-1.355 3-3zm-7-3c-1.6569 0-3 1.3431-3 3v3h2v-3c.0000096-.5523.44772-1 1-1h1v-2zm4 2c.56413 0 1 .4359 1 1 0 .5642-.43587 1-1 1s-1-.4358-1-1c0-.5641.43587-1 1-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/KeyScale.svg b/editor/icons/KeyScale.svg
index 84805191f2..5caf80e68e 100644
--- a/editor/icons/KeyScale.svg
+++ b/editor/icons/KeyScale.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-.195 0-.38964.07519-.53906.22461l-3.2363 3.2363c-.29884.29884-.29884.77929 0 1.0781l3.2363 3.2363c.29884.29884.77929.29884 1.0781 0l3.2363-3.2363c.29884-.29884.29884-.77929 0-1.0781l-3.2363-3.2363c-.14942-.14942-.34406-.22461-.53906-.22461zm3 7v5c0 1.6569 1.3431 3 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1v-5zm-8 2c-.71466-.0001-1.3751.3811-1.7324 1-.35727.6188-.35727 1.3812 0 2 .35733.6189 1.0178 1.0001 1.7324 1h-2v2h2c.71466.0001 1.3751-.3811 1.7324-1 .35727-.6188.35727-1.3812 0-2-.35733-.6189-1.0178-1.0001-1.7324-1h2v-2zm6 0c-1.6569 0-3 1.3431-3 3s1.3431 3 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1 .0000096-.55228.44772-.99999 1-1h1v-2z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-.195 0-.38964.07519-.53906.22461l-3.2363 3.2363c-.29884.29884-.29884.77929 0 1.0781l3.2363 3.2363c.29884.29884.77929.29884 1.0781 0l3.2363-3.2363c.29884-.29884.29884-.77929 0-1.0781l-3.2363-3.2363c-.14942-.14942-.34406-.22461-.53906-.22461zm3 7v5c0 1.6569 1.3431 3 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1v-5zm-8 2c-.71466-.0001-1.3751.3811-1.7324 1-.35727.6188-.35727 1.3812 0 2 .35733.6189 1.0178 1.0001 1.7324 1h-2v2h2c.71466.0001 1.3751-.3811 1.7324-1 .35727-.6188.35727-1.3812 0-2-.35733-.6189-1.0178-1.0001-1.7324-1h2v-2zm6 0c-1.6569 0-3 1.3431-3 3s1.3431 3 3 3h1v-2h-1c-.55228-.00001-.99999-.44772-1-1 .0000096-.55228.44772-.99999 1-1h1v-2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/LightmapProbe.svg b/editor/icons/LightmapProbe.svg
index 07f2b41a7c..dc5d8321e7 100644
--- a/editor/icons/LightmapProbe.svg
+++ b/editor/icons/LightmapProbe.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 9h3v-2h-3zm2.050781 2.535156 1.414063 1.414063 1.414062-1.414063-1.414062-1.414062zm0-7.070312 1.414063 1.414062 1.414062-1.414062-1.414062-1.414063zm1.949219 3.535156c0 1.6569 1.3432 3 3 3s3-1.3431 3-3-1.3432-3-3-3-3 1.3431-3 3zm3 7c3.865993 0 7-3.134007 7-7s-3.134007-7-7-7v2.333984c2.577329 0 4.666016 2.088687 4.666016 4.666016s-2.088687 4.666016-4.666016 4.666016z" fill="#fc7f7f" fill-opacity=".996078" stroke-width="1.16667"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 9h3v-2h-3zm2.050781 2.535156 1.414063 1.414063 1.414062-1.414063-1.414062-1.414062zm0-7.070312 1.414063 1.414062 1.414062-1.414062-1.414062-1.414063zm1.949219 3.535156c0 1.6569 1.3432 3 3 3s3-1.3431 3-3-1.3432-3-3-3-3 1.3431-3 3zm3 7c3.865993 0 7-3.134007 7-7s-3.134007-7-7-7v2.333984c2.577329 0 4.666016 2.088687 4.666016 4.666016s-2.088687 4.666016-4.666016 4.666016z" fill="#fc7f7f" stroke-width="1.16667"/></svg>
diff --git a/editor/icons/Line.svg b/editor/icons/Line.svg
new file mode 100644
index 0000000000..c7b1f8a701
--- /dev/null
+++ b/editor/icons/Line.svg
@@ -0,0 +1 @@
+<svg height="12" viewBox="0 0 12 12" width="12" xmlns="http://www.w3.org/2000/svg"><path d="m2 1050.4 8-8" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-width="2" transform="translate(0 -1040.4)"/></svg>
diff --git a/editor/icons/ListSelect.svg b/editor/icons/ListSelect.svg
index 9e2bf381d3..f1dac744d4 100644
--- a/editor/icons/ListSelect.svg
+++ b/editor/icons/ListSelect.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v14h8.2578l-.82227-2h-5.4355v-2h4.6113l-.82227-2h-3.7891v-2h3.8867a1.5002 1.5002 0 0 1 1.0977-.49805v-.0019531a1.5002 1.5002 0 0 1 .58594.11133l.94531.38867h.48438v.19922l2 .82227v-7.0215h-11zm2 2h7v2h-7zm5 5 3.291 8 .94726-2.8203 1.8828 1.8828.94336-.94141-1.8848-1.8828 2.8203-.94726-8-3.291z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v14h8.2578l-.82227-2h-5.4355v-2h4.6113l-.82227-2h-3.7891v-2h3.8867a1.5002 1.5002 0 0 1 1.0977-.49805v-.0019531a1.5002 1.5002 0 0 1 .58594.11133l.94531.38867h.48438v.19922l2 .82227v-7.0215h-11zm2 2h7v2h-7zm5 5 3.291 8 .94726-2.8203 1.8828 1.8828.94336-.94141-1.8848-1.8828 2.8203-.94726-8-3.291z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Loop.svg b/editor/icons/Loop.svg
index 7fd8561bc4..9bbf168189 100644
--- a/editor/icons/Loop.svg
+++ b/editor/icons/Loop.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1v2h-2a5 5 0 0 0 -5 5 5 5 0 0 0 1.0039 2.9961l1.4355-1.4355a3 3 0 0 1 -.43945-1.5605 3 3 0 0 1 3-3h2v2l2-1.5 2-1.5-2-1.5-2-1.5zm5.9961 4.0039-1.4355 1.4355a3 3 0 0 1 .43945 1.5605 3 3 0 0 1 -3 3h-2v-2l-2 1.5-2 1.5 2 1.5 2 1.5v-2h2a5 5 0 0 0 5-5 5 5 0 0 0 -1.0039-2.9961z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1v2h-2a5 5 0 0 0 -5 5 5 5 0 0 0 1.0039 2.9961l1.4355-1.4355a3 3 0 0 1 -.43945-1.5605 3 3 0 0 1 3-3h2v2l2-1.5 2-1.5-2-1.5-2-1.5zm5.9961 4.0039-1.4355 1.4355a3 3 0 0 1 .43945 1.5605 3 3 0 0 1 -3 3h-2v-2l-2 1.5-2 1.5 2 1.5 2 1.5v-2h2a5 5 0 0 0 5-5 5 5 0 0 0 -1.0039-2.9961z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Marker3D.svg b/editor/icons/Marker3D.svg
index 894b195589..bbc531cc3e 100644
--- a/editor/icons/Marker3D.svg
+++ b/editor/icons/Marker3D.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="#fc7f7f" fill-opacity=".99608"/></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="#fc7f7f"/></svg>
diff --git a/editor/icons/MemberAnnotation.svg b/editor/icons/MemberAnnotation.svg
index c73ebf7b9b..39bef6d9ee 100644
--- a/editor/icons/MemberAnnotation.svg
+++ b/editor/icons/MemberAnnotation.svg
@@ -1 +1 @@
-<svg width="16" height="16" version="1.0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><script id="custom-useragent-string-page-script"/><path d="m13.821 12.756c-5.0033 3.9148-12.551 2.248-12.49-4.538 0.67424-11.471 17.312-7.4502 12.446 2.1173-1.0549 1.1955-2.0737 1.4617-3.1983 0.4329-0.21023-0.19282-0.44783-1.1594-0.3819-1.5089 0.35827-1.8946 1.0885-4.0778-0.72151-4.7234-2.4171-0.86457-4.5592 1.6495-4.9697 4.0193-0.47396 2.7343 2.284 3.3749 4.1487 1.9879 0.4553-0.36324 1.6433-1.3796 1.6806-1.9742" fill="none" stroke="#e0e0e0" stroke-linejoin="round" stroke-width="1.4928"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13.821 12.756c-5.0033 3.9148-12.551 2.248-12.49-4.538.67424-11.471 17.312-7.4502 12.446 2.1173-1.0549 1.1955-2.0737 1.4617-3.1983.4329-.21023-.19282-.44783-1.1594-.3819-1.5089.35827-1.8946 1.0885-4.0778-.72151-4.7234-2.4171-.86457-4.5592 1.6495-4.9697 4.0193-.47396 2.7343 2.284 3.3749 4.1487 1.9879.4553-.36324 1.6433-1.3796 1.6806-1.9742" fill="none" stroke="#e0e0e0" stroke-linejoin="round" stroke-width="1.4928"/></svg>
diff --git a/editor/icons/MeshInstance3D.svg b/editor/icons/MeshInstance3D.svg
index a9258505f8..67757dafd2 100644
--- a/editor/icons/MeshInstance3D.svg
+++ b/editor/icons/MeshInstance3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305-1h6.541a2 2 0 0 0 1.7285 1 2 2 0 0 0 2-2 2 2 0 0 0 -1.0312-1.75h.03125v-6.5215a2 2 0 0 0 1-1.7285 2 2 0 0 0 -2-2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285-1zm2.4141 3h5.8574a2 2 0 0 0 .72852.73047v5.8555l-6.5859-6.5859zm-1.4141 1.4141 6.5859 6.5859h-5.8574a2 2 0 0 0 -.72852-.73047v-5.8555z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305-1h6.541a2 2 0 0 0 1.7285 1 2 2 0 0 0 2-2 2 2 0 0 0 -1.0312-1.75h.03125v-6.5215a2 2 0 0 0 1-1.7285 2 2 0 0 0 -2-2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285-1zm2.4141 3h5.8574a2 2 0 0 0 .72852.73047v5.8555l-6.5859-6.5859zm-1.4141 1.4141 6.5859 6.5859h-5.8574a2 2 0 0 0 -.72852-.73047v-5.8555z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/MeshTexture.svg b/editor/icons/MeshTexture.svg
index 988882c960..ccf16b828b 100644
--- a/editor/icons/MeshTexture.svg
+++ b/editor/icons/MeshTexture.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1c-1.1046 0-2 .89543-2 2 .0005649.71397.38169 1.3735 1 1.7305v6.541c-.61771.35663-.99874 1.0152-1 1.7285 0 1.1046.89543 2 2 2 .71397-.000565 1.3735-.38169 1.7305-1h6.541c.35663.61771 1.0152.99874 1.7285 1 1.1046 0 2-.89543 2-2 .000101-.72747-.39481-1.3976-1.0312-1.75h.03125v-6.5215c.61771-.35663.99874-1.0152 1-1.7285 0-1.1046-.89543-2-2-2-.71397.0005648-1.3735.38169-1.7305 1h-6.541c-.35663-.61771-1.0152-.99874-1.7285-1zm1.7266 3h.6875 5.168.68945c.17478.30301.42598.55488.72852.73047v.68359 5.1719.68555c-.30301.17478-.55488.42598-.73047.72852h-.68359-5.1719-.68555c-.17478-.30301-.42598-.55488-.72852-.73047v-.6875l-.0039062.003907v-5.8574c.30302-.17478.55488-.42598.73047-.72852zm4.0859 2.25v.70117h-.8125v.69922h-1.625v.69922h-.8125v.69922h-.8125v.70117h1.625 1.625 1.625 1.625v-1.4004h-.8125v-1.3984h-.8125v-.70117h-.8125z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1c-1.1046 0-2 .89543-2 2 .0005649.71397.38169 1.3735 1 1.7305v6.541c-.61771.35663-.99874 1.0152-1 1.7285 0 1.1046.89543 2 2 2 .71397-.000565 1.3735-.38169 1.7305-1h6.541c.35663.61771 1.0152.99874 1.7285 1 1.1046 0 2-.89543 2-2 .000101-.72747-.39481-1.3976-1.0312-1.75h.03125v-6.5215c.61771-.35663.99874-1.0152 1-1.7285 0-1.1046-.89543-2-2-2-.71397.0005648-1.3735.38169-1.7305 1h-6.541c-.35663-.61771-1.0152-.99874-1.7285-1zm1.7266 3h.6875 5.168.68945c.17478.30301.42598.55488.72852.73047v.68359 5.1719.68555c-.30301.17478-.55488.42598-.73047.72852h-.68359-5.1719-.68555c-.17478-.30301-.42598-.55488-.72852-.73047v-.6875l-.0039062.003907v-5.8574c.30302-.17478.55488-.42598.73047-.72852zm4.0859 2.25v.70117h-.8125v.69922h-1.625v.69922h-.8125v.69922h-.8125v.70117h1.625 1.625 1.625 1.625v-1.4004h-.8125v-1.3984h-.8125v-.70117h-.8125z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/MethodOverride.svg b/editor/icons/MethodOverride.svg
new file mode 100644
index 0000000000..004b9bf283
--- /dev/null
+++ b/editor/icons/MethodOverride.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 4.2333332 4.2333332" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m.49005985 3.3580432.83285685-.0000001v-.7093212c.0027125-.6681099.2054076-1.1321001 1.0021593-1.1328214h.3207573v-.79375l1.3229167 1.0648649-1.3229167 1.0518017v-.79375h-.3364788c-.2888876 0-.4514151.2436282-.4573001.5980603 0 .2833012.0000193.4455045.0000289.7134508h.79375v.4907171l-2.15577345.00147z" fill="#5fb2ff"/></svg>
diff --git a/editor/icons/MethodOverrideAndSlot.svg b/editor/icons/MethodOverrideAndSlot.svg
new file mode 100644
index 0000000000..d3bd9f0253
--- /dev/null
+++ b/editor/icons/MethodOverrideAndSlot.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 4.2333332 4.2333332" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m.15761184 3.636193h.37155483l.004252-.7093212c.0027092-.6681099.12999225-1.1321001.92674393-1.1328214h.1273374l.0042585-.7357171 1.3186582 1.006832-1.3229167 1.0700676v-.8531081h-.1260545c-.2888876 0-.3972562.2847204-.4031411.6391525 0 .2833012.0000193.4455045.0000289.7134508h1.2412654v.4907171h-2.14198686z" fill="#5fb2ff"/><path d="m2.38125.79375h1.5875v2.6458333h-1.5875v-.5291666h1.0583333v-1.5875h-1.0583333z" fill="#5fff97"/></svg>
diff --git a/editor/icons/MirrorX.svg b/editor/icons/MirrorX.svg
index fa668986ac..84c1da1b66 100644
--- a/editor/icons/MirrorX.svg
+++ b/editor/icons/MirrorX.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#e0e0e0" stroke-opacity=".99608" stroke-width="2" transform="translate(0 -1036.4)"><path d="m4 1042.4-2 2 2 2" stroke-linecap="round" stroke-linejoin="round"/><path d="m2 1044.4h11"/><path d="m12 1042.4 2 2-2 2" stroke-linecap="round" stroke-linejoin="round"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#e0e0e0" stroke-width="2" transform="translate(0 -1036.4)"><path d="m4 1042.4-2 2 2 2" stroke-linecap="round" stroke-linejoin="round"/><path d="m2 1044.4h11"/><path d="m12 1042.4 2 2-2 2" stroke-linecap="round" stroke-linejoin="round"/></g></svg>
diff --git a/editor/icons/MirrorY.svg b/editor/icons/MirrorY.svg
index bb4e4d3543..beaf8b0536 100644
--- a/editor/icons/MirrorY.svg
+++ b/editor/icons/MirrorY.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11.012 1048.4a1.0001 1.0001 0 0 0 -1.7168-.6973l-.29297.293v-7.1719l.29297.293a1.0001 1.0001 0 0 0 1.7148-.7266 1.0001 1.0001 0 0 0 -.30078-.6875l-2-2a1.0001 1.0001 0 0 0 -1.4141 0l-2 2a1.0001 1.0001 0 1 0 1.4141 1.4141l.29297-.293v7.1719l-.29297-.293a1.0001 1.0001 0 1 0 -1.4141 1.4141l2 2a1.0001 1.0001 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 .30273-.7168z" fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11.012 1048.4a1.0001 1.0001 0 0 0 -1.7168-.6973l-.29297.293v-7.1719l.29297.293a1.0001 1.0001 0 0 0 1.7148-.7266 1.0001 1.0001 0 0 0 -.30078-.6875l-2-2a1.0001 1.0001 0 0 0 -1.4141 0l-2 2a1.0001 1.0001 0 1 0 1.4141 1.4141l.29297-.293v7.1719l-.29297-.293a1.0001 1.0001 0 1 0 -1.4141 1.4141l2 2a1.0001 1.0001 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 .30273-.7168z" fill="#e0e0e0" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/MoveDown.svg b/editor/icons/MoveDown.svg
index 3c2d771cd5..85301f7f22 100644
--- a/editor/icons/MoveDown.svg
+++ b/editor/icons/MoveDown.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1a1.0001 1.0001 0 1 0 0 2h4a1.0001 1.0001 0 1 0 0-2zm2 4c-.55231 0-1 .4477-1 1v5.1484l-2.2188-2.7734c-.34504-.4317-.97482-.50165-1.4062-.15625-.4305.3449-.5004.9732-.15625 1.4043l4 5c.18868.2369.4745.37695.77734.37695.30559.0009.59477-.13795.78516-.37695l4-5c.34415-.4311.27424-1.0594-.15625-1.4043-.43143-.3454-1.0612-.27545-1.4062.15625l-2.2188 2.7734v-5.1484c0-.5523-.44769-1-1-1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1a1.0001 1.0001 0 1 0 0 2h4a1.0001 1.0001 0 1 0 0-2zm2 4c-.55231 0-1 .4477-1 1v5.1484l-2.2188-2.7734c-.34504-.4317-.97482-.50165-1.4062-.15625-.4305.3449-.5004.9732-.15625 1.4043l4 5c.18868.2369.4745.37695.77734.37695.30559.0009.59477-.13795.78516-.37695l4-5c.34415-.4311.27424-1.0594-.15625-1.4043-.43143-.3454-1.0612-.27545-1.4062.15625l-2.2188 2.7734v-5.1484c0-.5523-.44769-1-1-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/MoveLeft.svg b/editor/icons/MoveLeft.svg
index 8f96ee0060..eedae80a81 100644
--- a/editor/icons/MoveLeft.svg
+++ b/editor/icons/MoveLeft.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 10a1.0001 1.0001 0 1 1 -2 0v-4a1.0001 1.0001 0 1 1 2 0zm-4-2c0 .55231-.4477 1-1 1h-5.1484l2.7734 2.2188c.4317.34504.50165.97482.15625 1.4062-.3449.4305-.9732.5004-1.4043.15625l-5-4c-.2369-.18868-.37695-.4745-.37695-.77734-.0009-.30559.13795-.59477.37695-.78516l5-4c.4311-.34415 1.0594-.27424 1.4043.15625.3454.43143.27545 1.0612-.15625 1.4062l-2.7734 2.2188h5.1484c.5523 0 1 .44769 1 1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 10a1.0001 1.0001 0 1 1 -2 0v-4a1.0001 1.0001 0 1 1 2 0zm-4-2c0 .55231-.4477 1-1 1h-5.1484l2.7734 2.2188c.4317.34504.50165.97482.15625 1.4062-.3449.4305-.9732.5004-1.4043.15625l-5-4c-.2369-.18868-.37695-.4745-.37695-.77734-.0009-.30559.13795-.59477.37695-.78516l5-4c.4311-.34415 1.0594-.27424 1.4043.15625.3454.43143.27545 1.0612-.15625 1.4062l-2.7734 2.2188h5.1484c.5523 0 1 .44769 1 1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/MoveRight.svg b/editor/icons/MoveRight.svg
index ee8d1b45a4..951755fabe 100644
--- a/editor/icons/MoveRight.svg
+++ b/editor/icons/MoveRight.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 10a1.0001 1.0001 0 1 0 2 0v-4a1.0001 1.0001 0 1 0 -2 0zm4-2c0 .55231.4477 1 1 1h5.1484l-2.7734 2.2188c-.4317.34504-.50165.97482-.15625 1.4062.3449.4305.9732.5004 1.4043.15625l5-4c.2369-.18868.37695-.4745.37695-.77734.0009-.30559-.13795-.59477-.37695-.78516l-5-4c-.4311-.34415-1.0594-.27424-1.4043.15625-.3454.43143-.27545 1.0612.15625 1.4062l2.7734 2.2188h-5.1484c-.5523 0-1 .44769-1 1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 10a1.0001 1.0001 0 1 0 2 0v-4a1.0001 1.0001 0 1 0 -2 0zm4-2c0 .55231.4477 1 1 1h5.1484l-2.7734 2.2188c-.4317.34504-.50165.97482-.15625 1.4062.3449.4305.9732.5004 1.4043.15625l5-4c.2369-.18868.37695-.4745.37695-.77734.0009-.30559-.13795-.59477-.37695-.78516l-5-4c-.4311-.34415-1.0594-.27424-1.4043.15625-.3454.43143-.27545 1.0612.15625 1.4062l2.7734 2.2188h-5.1484c-.5523 0-1 .44769-1 1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/MoveUp.svg b/editor/icons/MoveUp.svg
index f1302b2984..6cdc984ebc 100644
--- a/editor/icons/MoveUp.svg
+++ b/editor/icons/MoveUp.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 15a1.0001 1.0001 0 1 1 0-2h4a1.0001 1.0001 0 1 1 0 2zm2-4c-.55231 0-1-.4477-1-1v-5.1484l-2.2188 2.7734c-.34504.4317-.97482.50165-1.4062.15625-.4305-.3449-.5004-.9732-.15625-1.4043l4-5c.18868-.2369.4745-.37695.77734-.37695.30559-.0009.59477.13795.78516.37695l4 5c.34415.4311.27424 1.0594-.15625 1.4043-.43143.3454-1.0612.27545-1.4062-.15625l-2.2188-2.7734v5.1484c0 .5523-.44769 1-1 1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 15a1.0001 1.0001 0 1 1 0-2h4a1.0001 1.0001 0 1 1 0 2zm2-4c-.55231 0-1-.4477-1-1v-5.1484l-2.2188 2.7734c-.34504.4317-.97482.50165-1.4062.15625-.4305-.3449-.5004-.9732-.15625-1.4043l4-5c.18868-.2369.4745-.37695.77734-.37695.30559-.0009.59477.13795.78516.37695l4 5c.34415.4311.27424 1.0594-.15625 1.4043-.43143.3454-1.0612.27545-1.4062-.15625l-2.2188-2.7734v5.1484c0 .5523-.44769 1-1 1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/MultiMeshInstance3D.svg b/editor/icons/MultiMeshInstance3D.svg
index 3ccd2c9cbe..eb82d4928b 100644
--- a/editor/icons/MultiMeshInstance3D.svg
+++ b/editor/icons/MultiMeshInstance3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1c-1.1046 0-2 .89543-2 2 .0005649.71397.38169 1.3735 1 1.7305v6.541c-.61771.35663-.99874 1.0152-1 1.7285 0 1.1046.89543 2 2 2 .71397-.000565 1.3735-.38169 1.7305-1h1.2695v-2h-1.2715c-.17478-.30301-.42598-.55488-.72852-.73047v-5.8555l3.5859 3.5859h1.4141v-1.4141l-3.5859-3.5859h5.8574c.17532.30158.42647.55205.72852.72656v1.2734h2v-1.2695c.61831-.35698.99944-1.0165 1-1.7305 0-1.1046-.89543-2-2-2-.71397.0005648-1.3735.38169-1.7305 1h-6.541c-.35663-.61771-1.0152-.99874-1.7285-1zm8 7v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1c-1.1046 0-2 .89543-2 2 .0005649.71397.38169 1.3735 1 1.7305v6.541c-.61771.35663-.99874 1.0152-1 1.7285 0 1.1046.89543 2 2 2 .71397-.000565 1.3735-.38169 1.7305-1h1.2695v-2h-1.2715c-.17478-.30301-.42598-.55488-.72852-.73047v-5.8555l3.5859 3.5859h1.4141v-1.4141l-3.5859-3.5859h5.8574c.17532.30158.42647.55205.72852.72656v1.2734h2v-1.2695c.61831-.35698.99944-1.0165 1-1.7305 0-1.1046-.89543-2-2-2-.71397.0005648-1.3735.38169-1.7305 1h-6.541c-.35663-.61771-1.0152-.99874-1.7285-1zm8 7v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/Navigation3D.svg b/editor/icons/Navigation3D.svg
index 646500d9ed..79cca958f8 100644
--- a/editor/icons/Navigation3D.svg
+++ b/editor/icons/Navigation3D.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="#fc7f7f" fill-opacity=".99608" 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="#fc7f7f" fill-rule="evenodd" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/NavigationLink2D.svg b/editor/icons/NavigationLink2D.svg
index 6c5f17e256..df470ece57 100644
--- a/editor/icons/NavigationLink2D.svg
+++ b/editor/icons/NavigationLink2D.svg
@@ -1,4 +1,4 @@
<svg version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<path d="m12.386 5.3097c-0.69157-0.021112-1.3071 0.36382-1.7492 0.86685-0.58 0.58-1.16 1.16-1.74 1.74 0.4588-0.28502 1.0599-0.064948 1.4771-0.037996 0.45549-0.44357 0.89024-0.91006 1.3596-1.3383 0.56256-0.44564 1.4906-0.15731 1.7028 0.52802 0.18967 0.4871-0.049221 1.0098-0.43284 1.3208-0.70048 0.68896-1.3789 1.4022-2.0935 2.0755-0.47999 0.3725-1.2044 0.226-1.5679-0.24034-0.38763-0.38194-1.0641 0.16031-0.78317 0.6241 0.6767 0.94379 2.1573 1.1282 3.0411 0.36751 0.80287-0.7704 1.5793-1.5696 2.3665-2.3564 0.79925-0.83719 0.70104-2.3112-0.19552-3.0393-0.38108-0.32877-0.8822-0.5119-1.385-0.51049zm-3.051 3.051c-0.69157-0.021106-1.3071 0.36382-1.7492 0.86685-0.67513 0.68452-1.37 1.3506-2.0319 2.0474-0.75433 0.87744-0.58087 2.3428 0.34933 3.0252 0.84748 0.68613 2.192 0.54839 2.8998-0.27341 0.63032-0.63031 1.2606-1.2606 1.8909-1.8909-0.4587 0.28554-1.0602 0.0659-1.477 0.038069-0.45445 0.44348-0.88773 0.91034-1.3564 1.3383-0.56256 0.44565-1.4906 0.15731-1.7028-0.52802-0.18967-0.4871 0.049229-1.0098 0.43284-1.3208 0.70048-0.68896 1.3789-1.4022 2.0935-2.0755 0.48-0.3725 1.2044-0.22601 1.5679 0.24036 0.38733 0.38325 1.064-0.16067 0.78313-0.6241-0.39353-0.52481-1.0429-0.84871-1.7002-0.8434z" fill="#8ea6f4" fill-opacity=".99608" stroke-linecap="round" stroke-linejoin="round" stroke-width=".013911"/>
-<path d="m2 1c-0.61942-0.0066969-1.0877 0.60314-1 1.198 0.00345 3.968-0.006897 7.9364 0.00517 11.904 0.043388 0.62851 0.69346 0.98513 1.272 0.89776h2.5896c-0.77174-0.5015-1.2078-1.2613-1.3143-2.3356-0.11601-1.1701 0.63729-2.024 1.6748-3.1566 0.65335-0.71326 1.4757-1.5822 2.3587-2.3316 0.76308-0.64765 1.7509-1.679 2.9376-2.578 0.91259-0.69136 2.2893-0.74691 3.1014-0.33143 0.91184 0.46649 1.2635 1.1209 1.4067 1.3826-0.0052-2.335-0.02135-1.3526-0.03955-3.6863 5e-3 -0.64349-0.67497-1.0568-1.2694-0.96289z" fill="#8ea6f4" fill-opacity=".99608"/>
+<path d="m12.386 5.3097c-0.69157-0.021112-1.3071 0.36382-1.7492 0.86685-0.58 0.58-1.16 1.16-1.74 1.74 0.4588-0.28502 1.0599-0.064948 1.4771-0.037996 0.45549-0.44357 0.89024-0.91006 1.3596-1.3383 0.56256-0.44564 1.4906-0.15731 1.7028 0.52802 0.18967 0.4871-0.049221 1.0098-0.43284 1.3208-0.70048 0.68896-1.3789 1.4022-2.0935 2.0755-0.47999 0.3725-1.2044 0.226-1.5679-0.24034-0.38763-0.38194-1.0641 0.16031-0.78317 0.6241 0.6767 0.94379 2.1573 1.1282 3.0411 0.36751 0.80287-0.7704 1.5793-1.5696 2.3665-2.3564 0.79925-0.83719 0.70104-2.3112-0.19552-3.0393-0.38108-0.32877-0.8822-0.5119-1.385-0.51049zm-3.051 3.051c-0.69157-0.021106-1.3071 0.36382-1.7492 0.86685-0.67513 0.68452-1.37 1.3506-2.0319 2.0474-0.75433 0.87744-0.58087 2.3428 0.34933 3.0252 0.84748 0.68613 2.192 0.54839 2.8998-0.27341 0.63032-0.63031 1.2606-1.2606 1.8909-1.8909-0.4587 0.28554-1.0602 0.0659-1.477 0.038069-0.45445 0.44348-0.88773 0.91034-1.3564 1.3383-0.56256 0.44565-1.4906 0.15731-1.7028-0.52802-0.18967-0.4871 0.049229-1.0098 0.43284-1.3208 0.70048-0.68896 1.3789-1.4022 2.0935-2.0755 0.48-0.3725 1.2044-0.22601 1.5679 0.24036 0.38733 0.38325 1.064-0.16067 0.78313-0.6241-0.39353-0.52481-1.0429-0.84871-1.7002-0.8434z" fill="#8ea6f4" stroke-linecap="round" stroke-linejoin="round" stroke-width=".013911"/>
+<path d="m2 1c-0.61942-0.0066969-1.0877 0.60314-1 1.198 0.00345 3.968-0.006897 7.9364 0.00517 11.904 0.043388 0.62851 0.69346 0.98513 1.272 0.89776h2.5896c-0.77174-0.5015-1.2078-1.2613-1.3143-2.3356-0.11601-1.1701 0.63729-2.024 1.6748-3.1566 0.65335-0.71326 1.4757-1.5822 2.3587-2.3316 0.76308-0.64765 1.7509-1.679 2.9376-2.578 0.91259-0.69136 2.2893-0.74691 3.1014-0.33143 0.91184 0.46649 1.2635 1.1209 1.4067 1.3826-0.0052-2.335-0.02135-1.3526-0.03955-3.6863 5e-3 -0.64349-0.67497-1.0568-1.2694-0.96289z" fill="#8ea6f4"/>
</svg>
diff --git a/editor/icons/NavigationLink3D.svg b/editor/icons/NavigationLink3D.svg
index ea4092c2c7..05f36da2b2 100644
--- a/editor/icons/NavigationLink3D.svg
+++ b/editor/icons/NavigationLink3D.svg
@@ -1,4 +1,4 @@
<svg version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<path d="m12.386 5.3097c-0.69157-0.021112-1.3071 0.36382-1.7492 0.86685-0.58 0.58-1.16 1.16-1.74 1.74 0.4588-0.28502 1.0599-0.064948 1.4771-0.037996 0.45549-0.44357 0.89024-0.91006 1.3596-1.3383 0.56256-0.44564 1.4906-0.15731 1.7028 0.52802 0.18967 0.4871-0.049221 1.0098-0.43284 1.3208-0.70048 0.68896-1.3789 1.4022-2.0935 2.0755-0.47999 0.3725-1.2044 0.226-1.5679-0.24034-0.38763-0.38194-1.0641 0.16031-0.78317 0.6241 0.6767 0.94379 2.1573 1.1282 3.0411 0.36751 0.80287-0.7704 1.5793-1.5696 2.3665-2.3564 0.79925-0.83719 0.70104-2.3112-0.19552-3.0393-0.38108-0.32877-0.8822-0.5119-1.385-0.51049zm-3.051 3.051c-0.69157-0.021106-1.3071 0.36382-1.7492 0.86685-0.67513 0.68452-1.37 1.3506-2.0319 2.0474-0.75433 0.87744-0.58087 2.3428 0.34933 3.0252 0.84748 0.68613 2.192 0.54839 2.8998-0.27341 0.63032-0.63031 1.2606-1.2606 1.8909-1.8909-0.4587 0.28554-1.0602 0.0659-1.477 0.038069-0.45445 0.44348-0.88773 0.91034-1.3564 1.3383-0.56256 0.44565-1.4906 0.15731-1.7028-0.52802-0.18967-0.4871 0.049229-1.0098 0.43284-1.3208 0.70048-0.68896 1.3789-1.4022 2.0935-2.0755 0.48-0.3725 1.2044-0.22601 1.5679 0.24036 0.38733 0.38325 1.064-0.16067 0.78313-0.6241-0.39353-0.52481-1.0429-0.84871-1.7002-0.8434z" fill="#fc7e7e" fill-opacity=".99608" stroke-linecap="round" stroke-linejoin="round" stroke-width=".013911"/>
-<path d="m2 1c-0.61942-0.0066969-1.0877 0.60314-1 1.198 0.00345 3.968-0.006897 7.9364 0.00517 11.904 0.043388 0.62851 0.69346 0.98513 1.272 0.89776h2.5896c-0.77174-0.5015-1.2078-1.2613-1.3143-2.3356-0.11601-1.1701 0.63729-2.024 1.6748-3.1566 0.65335-0.71326 1.4757-1.5822 2.3587-2.3316 0.76308-0.64765 1.7509-1.679 2.9376-2.578 0.91259-0.69136 2.2893-0.74691 3.1014-0.33143 0.91184 0.46649 1.2635 1.1209 1.4067 1.3826-0.0052-2.335-0.02135-1.3526-0.03955-3.6863 5e-3 -0.64349-0.67497-1.0568-1.2694-0.96289z" fill="#fc7d7d" fill-opacity=".99608"/>
+<path d="m12.386 5.3097c-0.69157-0.021112-1.3071 0.36382-1.7492 0.86685-0.58 0.58-1.16 1.16-1.74 1.74 0.4588-0.28502 1.0599-0.064948 1.4771-0.037996 0.45549-0.44357 0.89024-0.91006 1.3596-1.3383 0.56256-0.44564 1.4906-0.15731 1.7028 0.52802 0.18967 0.4871-0.049221 1.0098-0.43284 1.3208-0.70048 0.68896-1.3789 1.4022-2.0935 2.0755-0.47999 0.3725-1.2044 0.226-1.5679-0.24034-0.38763-0.38194-1.0641 0.16031-0.78317 0.6241 0.6767 0.94379 2.1573 1.1282 3.0411 0.36751 0.80287-0.7704 1.5793-1.5696 2.3665-2.3564 0.79925-0.83719 0.70104-2.3112-0.19552-3.0393-0.38108-0.32877-0.8822-0.5119-1.385-0.51049zm-3.051 3.051c-0.69157-0.021106-1.3071 0.36382-1.7492 0.86685-0.67513 0.68452-1.37 1.3506-2.0319 2.0474-0.75433 0.87744-0.58087 2.3428 0.34933 3.0252 0.84748 0.68613 2.192 0.54839 2.8998-0.27341 0.63032-0.63031 1.2606-1.2606 1.8909-1.8909-0.4587 0.28554-1.0602 0.0659-1.477 0.038069-0.45445 0.44348-0.88773 0.91034-1.3564 1.3383-0.56256 0.44565-1.4906 0.15731-1.7028-0.52802-0.18967-0.4871 0.049229-1.0098 0.43284-1.3208 0.70048-0.68896 1.3789-1.4022 2.0935-2.0755 0.48-0.3725 1.2044-0.22601 1.5679 0.24036 0.38733 0.38325 1.064-0.16067 0.78313-0.6241-0.39353-0.52481-1.0429-0.84871-1.7002-0.8434z" fill="#fc7e7e" stroke-linecap="round" stroke-linejoin="round" stroke-width=".013911"/>
+<path d="m2 1c-0.61942-0.0066969-1.0877 0.60314-1 1.198 0.00345 3.968-0.006897 7.9364 0.00517 11.904 0.043388 0.62851 0.69346 0.98513 1.272 0.89776h2.5896c-0.77174-0.5015-1.2078-1.2613-1.3143-2.3356-0.11601-1.1701 0.63729-2.024 1.6748-3.1566 0.65335-0.71326 1.4757-1.5822 2.3587-2.3316 0.76308-0.64765 1.7509-1.679 2.9376-2.578 0.91259-0.69136 2.2893-0.74691 3.1014-0.33143 0.91184 0.46649 1.2635 1.1209 1.4067 1.3826-0.0052-2.335-0.02135-1.3526-0.03955-3.6863 5e-3 -0.64349-0.67497-1.0568-1.2694-0.96289z" fill="#fc7d7d"/>
</svg>
diff --git a/editor/icons/NavigationRegion3D.svg b/editor/icons/NavigationRegion3D.svg
index 39b6d0ca13..523ae4d20d 100644
--- a/editor/icons/NavigationRegion3D.svg
+++ b/editor/icons/NavigationRegion3D.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.030668-.3652344.074219-.022275.00881-.041042.020919-.0625.03125-.088962.042467-.1681009.095499-.2382812.1601562-.021532.01952-.042739.037285-.0625.058594-.074111.081092-.13722.1698052-.1816406.2695312-.00343.00765-.00847.013733-.011719.021484l-.00195.00195c-.0452281.1091913-.0629952.2269004-.0683623.3457062-.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-.013206-.0073-.024027-.0078-.037109-.0054-.1188058-.02313-.2365149-.06836-.3457031l-.002-.00195c-.0032-.00756-.0084-.013999-.01172-.021484-.04442-.099726-.107529-.188439-.18164-.2695312-.01976-.021308-.04097-.039073-.0625-.058594-.07018-.064657-.149319-.1176895-.238282-.1601562-.02146-.010331-.04022-.022439-.0625-.03125-.111631-.0435548-.231276-.0741656-.365198-.0742225zm10 6-3 8 3-2 3 2z" fill="#fc7f7f" fill-opacity=".996078" 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.030668-.3652344.074219-.022275.00881-.041042.020919-.0625.03125-.088962.042467-.1681009.095499-.2382812.1601562-.021532.01952-.042739.037285-.0625.058594-.074111.081092-.13722.1698052-.1816406.2695312-.00343.00765-.00847.013733-.011719.021484l-.00195.00195c-.0452281.1091913-.0629952.2269004-.0683623.3457062-.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-.013206-.0073-.024027-.0078-.037109-.0054-.1188058-.02313-.2365149-.06836-.3457031l-.002-.00195c-.0032-.00756-.0084-.013999-.01172-.021484-.04442-.099726-.107529-.188439-.18164-.2695312-.01976-.021308-.04097-.039073-.0625-.058594-.07018-.064657-.149319-.1176895-.238282-.1601562-.02146-.010331-.04022-.022439-.0625-.03125-.111631-.0435548-.231276-.0741656-.365198-.0742225zm10 6-3 8 3-2 3 2z" fill="#fc7f7f" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/Node3D.svg b/editor/icons/Node3D.svg
index c8a3163e51..620bc95229 100644
--- a/editor/icons/Node3D.svg
+++ b/editor/icons/Node3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0 -6-6zm0 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-4z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0 -6-6zm0 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-4z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/OccluderInstance3D.svg b/editor/icons/OccluderInstance3D.svg
index cc7ccc410f..18f6054873 100644
--- a/editor/icons/OccluderInstance3D.svg
+++ b/editor/icons/OccluderInstance3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.90625 1a7 7 0 0 0 -1.2988281.1386719 4.5 4.5 0 0 1 3.3925781 4.3613281 4.5 4.5 0 0 1 -4.5 4.5 4.5 4.5 0 0 1 -4.359375-3.3886719 7 7 0 0 0 -.140625 1.3886719 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7 7 7 0 0 0 -.09375 0z" fill="#fc7f7f" fill-opacity=".996078" stroke-width=".365215"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.90625 1a7 7 0 0 0 -1.2988281.1386719 4.5 4.5 0 0 1 3.3925781 4.3613281 4.5 4.5 0 0 1 -4.5 4.5 4.5 4.5 0 0 1 -4.359375-3.3886719 7 7 0 0 0 -.140625 1.3886719 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7 7 7 0 0 0 -.09375 0z" fill="#fc7f7f" stroke-width=".365215"/></svg>
diff --git a/editor/icons/OmniLight3D.svg b/editor/icons/OmniLight3D.svg
index 391e9104a1..9d874b359c 100644
--- a/editor/icons/OmniLight3D.svg
+++ b/editor/icons/OmniLight3D.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="#fc7f7f" fill-opacity=".99608"/></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="#fc7f7f"/></svg>
diff --git a/editor/icons/OneWayTile.svg b/editor/icons/OneWayTile.svg
new file mode 100644
index 0000000000..273b1a183b
--- /dev/null
+++ b/editor/icons/OneWayTile.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" height="16" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10.958984 1.5-1.4785152 1.4667969-1.4785157 1.46875-1.4804687-1.4667969-1.4785156-1.4667969-.5214844.5136719-.5214844.5136719 2 1.9863281 2 1.984375 2-1.984375 2-1.9824219-.519531-.5175781zm0 8-1.4785152 1.466797-1.4785157 1.46875-1.4804687-1.466797-1.4785156-1.4667969-.5214844.5136719-.5214844.513672 2 1.986328 2 1.984375 2-1.984375 2-1.982422-.519531-.517578z" fill="#fff"/></svg>
diff --git a/editor/icons/ParallaxBackground.svg b/editor/icons/ParallaxBackground.svg
index f188230fcc..71a586eff4 100644
--- a/editor/icons/ParallaxBackground.svg
+++ b/editor/icons/ParallaxBackground.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="m2 2a1 1 0 0 0 -1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-10a1 1 0 0 0 -1-1zm0 1h12v10h-12zm5 2-3 3 3 3zm2 0v6l3-3z" fill="#e0e0e0" fill-opacity=".99608" 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="m2 2a1 1 0 0 0 -1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-10a1 1 0 0 0 -1-1zm0 1h12v10h-12zm5 2-3 3 3 3zm2 0v6l3-3z" fill="#e0e0e0" transform="translate(0 1036.4)"/></g></svg>
diff --git a/editor/icons/Path3D.svg b/editor/icons/Path3D.svg
index 076ce9acd2..4e84cf9789 100644
--- a/editor/icons/Path3D.svg
+++ b/editor/icons/Path3D.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="#fc7f7f" fill-opacity=".99608"/></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="#fc7f7f"/></svg>
diff --git a/editor/icons/PathFollow3D.svg b/editor/icons/PathFollow3D.svg
index f9bb38939e..01da0b0114 100644
--- a/editor/icons/PathFollow3D.svg
+++ b/editor/icons/PathFollow3D.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="#fc7f7f" fill-opacity=".99608"/></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="#fc7f7f"/></svg>
diff --git a/editor/icons/PickerShapeCircle.svg b/editor/icons/PickerShapeCircle.svg
new file mode 100644
index 0000000000..8e7fb7f06e
--- /dev/null
+++ b/editor/icons/PickerShapeCircle.svg
@@ -0,0 +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"><clipPath id="a"><path d="m0 0h16v16h-16z"/></clipPath><g clip-path="url(#a)" fill="#eaeaea"><rect height="11" rx="5.5" transform="translate(1 2)" width="11"/><path d="m0 0h2v11h-2z" transform="translate(13 2)"/></g></svg>
diff --git a/editor/icons/PickerShapeRectangle.svg b/editor/icons/PickerShapeRectangle.svg
new file mode 100644
index 0000000000..3c7dd46884
--- /dev/null
+++ b/editor/icons/PickerShapeRectangle.svg
@@ -0,0 +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"><clipPath id="a"><path d="m0 0h16v16h-16z"/></clipPath><g clip-path="url(#a)" fill="#eaeaea"><path d="m0 0h11v11h-11z" transform="translate(1 2)"/><path d="m0 0h2v11h-2z" transform="translate(13 2)"/></g></svg>
diff --git a/editor/icons/PickerShapeRectangleWheel.svg b/editor/icons/PickerShapeRectangleWheel.svg
new file mode 100644
index 0000000000..e85665a8f2
--- /dev/null
+++ b/editor/icons/PickerShapeRectangleWheel.svg
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ height="16"
+ viewBox="0 0 16 16"
+ width="16"
+ version="1.1"
+ id="svg11"
+ sodipodi:docname="PickerShapeRectangleWheel.svg"
+ inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs15" />
+ <sodipodi:namedview
+ id="namedview13"
+ pagecolor="#505050"
+ bordercolor="#ffffff"
+ borderopacity="1"
+ inkscape:pageshadow="0"
+ inkscape:pageopacity="0"
+ inkscape:pagecheckerboard="1"
+ showgrid="true"
+ inkscape:zoom="16"
+ inkscape:cx="0.53125"
+ inkscape:cy="5.28125"
+ inkscape:window-width="1920"
+ inkscape:window-height="1001"
+ inkscape:window-x="-9"
+ inkscape:window-y="-9"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg11">
+ <inkscape:grid
+ type="xygrid"
+ id="grid944" />
+ </sodipodi:namedview>
+ <clipPath
+ id="a">
+ <path
+ d="m0 0h16v16h-16z"
+ id="path2" />
+ </clipPath>
+ <g
+ clip-path="url(#a)"
+ fill="#eaeaea"
+ id="g9"
+ transform="matrix(0.85714286,0,0,0.85714286,1.1428571,1.1428571)">
+ <path
+ d="M 7,2 A 5,5 0 1 0 12,7 5.006,5.006 0 0 0 7,2 M 7,0 A 7,7 0 1 1 0,7 7,7 0 0 1 7,0 Z"
+ transform="translate(1,1)"
+ id="path5" />
+ <path
+ d="M 0,0 H 7 V 7 H 0 Z"
+ transform="translate(4.5,4.5)"
+ id="path7" />
+ </g>
+</svg>
diff --git a/editor/icons/PlayRemote.svg b/editor/icons/PlayRemote.svg
new file mode 100644
index 0000000000..ea2195294f
--- /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" style="fill:#e0e0e0;fill-opacity:1"/></svg>
diff --git a/editor/icons/PreviewEnvironment.svg b/editor/icons/PreviewEnvironment.svg
new file mode 100644
index 0000000000..e0b0257daf
--- /dev/null
+++ b/editor/icons/PreviewEnvironment.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><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.7305 2.3125c-.83125 1.5372-1.2685 3.1037-1.2695 4.6816-.64057-.11251-1.3005-.27158-1.9766-.47266a5 5 0 0 1 3.2461-4.209zm3.4629.00391a5 5 0 0 1 3.2383 4.1875c-.65187.17448-1.3077.32867-1.9727.44922-.0084-1.5627-.44294-3.1141-1.2656-4.6367zm-1.7324.0078088c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 .054042-.00662.10803-.00781.16211-.96392.096801-1.9566.1103-2.9844.027344-.00163-.063192-.00781-.12632-.00781-.18945 0-1.5333.48744-3.0828 1.5-4.6758zm4.8789 5.7578a5 5 0 0 1 -3.1484 3.6055002c.57106-1.0564.95277-2.1268 1.1367-3.2051002.68204-.10905 1.3556-.23789 2.0117-.40039zm-9.7461.033203c.68377.18153 1.3555.33345 2.0098.43164.18781 1.0551002.56647 2.1026002 1.125 3.1367002a5 5 0 0 1 -3.1348-3.5684002zm6.168.55469c-.22615.9886602-.65424 1.9884002-1.3008 3.0059002-.63811-1.0042-1.0645-1.9908-1.293-2.9668002.89027.054126 1.7517.029377 2.5938-.039062z"/><path d="m8 1v2.3242c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 .054042-.00662.10803-.00781.16211-.4894.049148-.98713.077552-1.4922.082031v1.4922c.43915-.0076.87287-.031628 1.3008-.066406-.22615.98866-.65424 1.9884-1.3008 3.0059v2.3242a7 7 0 0 0 7.000001-7 7 7 0 0 0 -7.000001-7zm1.7324 2.3164a5 5 0 0 1 3.2383 4.1875c-.65187.17448-1.3077.32867-1.9727.44922-.00845-1.5627-.44294-3.1141-1.2656-4.6367zm3.1465 5.7656a5 5 0 0 1 -3.1484 3.6055c.57106-1.0564.95277-2.1268 1.1367-3.2051.68204-.10905 1.3556-.23789 2.0117-.40039z"/></g></svg>
diff --git a/editor/icons/PreviewSun.svg b/editor/icons/PreviewSun.svg
new file mode 100644
index 0000000000..a8c652be65
--- /dev/null
+++ b/editor/icons/PreviewSun.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v3h2v-3zm-2.5352 2.0508-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm7.0703 0-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm-3.5352 1.9492c-1.6569 0-3 1.3432-3 3s1.3431 3 3 3 3-1.3432 3-3-1.3431-3-3-3zm-7 2v2h3v-2zm11 0v2h3v-2zm-7.5352 3.1211-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm7.0703 0-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141zm-4.5352 1.8789v3h2v-3z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Progress1.svg b/editor/icons/Progress1.svg
index 07505ddd67..d9a58d837e 100644
--- a/editor/icons/Progress1.svg
+++ b/editor/icons/Progress1.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1037.4v3.0547a4 4 0 0 1 1.0273.4258l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223z" fill-opacity=".99608"/><path d="m7 1.0801a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" 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 fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1037.4v3.0547a4 4 0 0 1 1.0273.4258l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223z"/><path d="m7 1.0801a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/></g></svg>
diff --git a/editor/icons/Progress2.svg b/editor/icons/Progress2.svg
index 0a48f7d3f5..d98de2e78b 100644
--- a/editor/icons/Progress2.svg
+++ b/editor/icons/Progress2.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm-1.3203 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m13.6 1040.2-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855z" fill-opacity=".99608"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm-1.3203 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m13.6 1040.2-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855z"/></g></svg>
diff --git a/editor/icons/Progress3.svg b/editor/icons/Progress3.svg
index a7f0f9c973..a1e84fa7cf 100644
--- a/editor/icons/Progress3.svg
+++ b/editor/icons/Progress3.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm4.8926 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m11.867 1045.4a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547z" fill-opacity=".99608"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm4.8926 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m11.867 1045.4a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547z"/></g></svg>
diff --git a/editor/icons/Progress4.svg b/editor/icons/Progress4.svg
index 171920915e..04a556fd93 100644
--- a/editor/icons/Progress4.svg
+++ b/editor/icons/Progress4.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m10.027 1047.8a4 4 0 0 1 -1.0273.4277v3.0508a7 7 0 0 0 3.1855-1.3203z" fill-opacity=".99608"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m10.027 1047.8a4 4 0 0 1 -1.0273.4277v3.0508a7 7 0 0 0 3.1855-1.3203z"/></g></svg>
diff --git a/editor/icons/Progress5.svg b/editor/icons/Progress5.svg
index 7289b7b8fe..d5a5432781 100644
--- a/editor/icons/Progress5.svg
+++ b/editor/icons/Progress5.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-1.8398 2.4414a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m5.9727 1047.8-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.4258z" fill-opacity=".99608"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-1.8398 2.4414a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m5.9727 1047.8-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.4258z"/></g></svg>
diff --git a/editor/icons/Progress6.svg b/editor/icons/Progress6.svg
index 3deba6d48c..95aebb3cf5 100644
--- a/editor/icons/Progress6.svg
+++ b/editor/icons/Progress6.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-1.7324 5.1855a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m1.0801 1045.4a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508z" fill-opacity=".99608"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm-4.5996 2.7344a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-1.7324 5.1855a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m1.0801 1045.4a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508z"/></g></svg>
diff --git a/editor/icons/Progress7.svg b/editor/icons/Progress7.svg
index 546155dc59..cbcd7df35f 100644
--- a/editor/icons/Progress7.svg
+++ b/editor/icons/Progress7.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm6.5996 2.7344-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m2.4004 1040.2a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582z" fill-opacity=".99608"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-2 .0019531a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.42773v-3.0508zm6.5996 2.7344-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m2.4004 1040.2a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582z"/></g></svg>
diff --git a/editor/icons/Progress8.svg b/editor/icons/Progress8.svg
index b56ffcb727..900b681c69 100644
--- a/editor/icons/Progress8.svg
+++ b/editor/icons/Progress8.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-6.5996 2.7363a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m7 1037.4a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.4277z" fill-opacity=".99608"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 1.0781v3.0547a4 4 0 0 1 1.0273.42578l2.1582-2.1582a7 7 0 0 0 -3.1855-1.3223zm-6.5996 2.7363a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 .42578-1.0273l-2.1582-2.1582zm11.199 0-2.1582 2.1582a4 4 0 0 1 .42774 1.0273h3.0508a7 7 0 0 0 -1.3203-3.1855zm-12.52 5.1855a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -.42773-1.0273h-3.0508zm10.787 0a4 4 0 0 1 -.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223-3.1855h-3.0547zm-5.8945 2.4414-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273-.42578zm4.0547 0a4 4 0 0 1 -1.0273.42774v3.0508a7 7 0 0 0 3.1855-1.3203l-2.1582-2.1582z" fill-opacity=".19608" transform="translate(0 1036.4)"/><path d="m7 1037.4a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273-.4277z"/></g></svg>
diff --git a/editor/icons/ProxyTexture.svg b/editor/icons/ProxyTexture.svg
index 526f21c379..5435e72a1b 100644
--- a/editor/icons/ProxyTexture.svg
+++ b/editor/icons/ProxyTexture.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v4h4v-4zm6 0v2h6v8h-6v4h7a1 1 0 0 0 1-1v-12a1 1 0 0 0 -1-1zm2 4v1h-1v1h-1v3h1 2 2v-2h-1v-2h-1v-1zm-8 1v4h4v-4zm0 5v4h4v-4z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v4h4v-4zm6 0v2h6v8h-6v4h7a1 1 0 0 0 1-1v-12a1 1 0 0 0 -1-1zm2 4v1h-1v1h-1v3h1 2 2v-2h-1v-2h-1v-1zm-8 1v4h4v-4zm0 5v4h4v-4z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Quad.svg b/editor/icons/Quad.svg
index 70ef6b7227..5627876bfb 100644
--- a/editor/icons/Quad.svg
+++ b/editor/icons/Quad.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2 10 2h2 12v-2-12h-12zm3.4141 2h8.5859v8.5859zm-1.4141 1.4141 8.5859 8.5859h-8.5859z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2 10 2h2 12v-2-12h-12zm3.4141 2h8.5859v8.5859zm-1.4141 1.4141 8.5859 8.5859h-8.5859z" fill="#fc7f7f"/></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/RayCast3D.svg b/editor/icons/RayCast3D.svg
index 9670e63022..59a5e181d6 100644
--- a/editor/icons/RayCast3D.svg
+++ b/editor/icons/RayCast3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v9h-3l4 5 4-5h-3v-9z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v9h-3l4 5 4-5h-3v-9z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/ReflectionProbe.svg b/editor/icons/ReflectionProbe.svg
index a88a3524be..dee37be8be 100644
--- a/editor/icons/ReflectionProbe.svg
+++ b/editor/icons/ReflectionProbe.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10 2a1.0001 1.0001 0 1 0 0 2h1.5859l-4.5195 4.5195-4.2988-5.1582-1.5352 1.2793 5 6a1.0001 1.0001 0 0 0 1.4746.064453l5.293-5.293v1.5879a1.0001 1.0001 0 1 0 2 0v-4a1.0001 1.0001 0 0 0 -1-1h-4zm-9 7v5a1.0001 1.0001 0 0 0 1 1h12a1.0001 1.0001 0 0 0 1-1v-4h-2v3h-10v-4z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10 2a1.0001 1.0001 0 1 0 0 2h1.5859l-4.5195 4.5195-4.2988-5.1582-1.5352 1.2793 5 6a1.0001 1.0001 0 0 0 1.4746.064453l5.293-5.293v1.5879a1.0001 1.0001 0 1 0 2 0v-4a1.0001 1.0001 0 0 0 -1-1h-4zm-9 7v5a1.0001 1.0001 0 0 0 1 1h12a1.0001 1.0001 0 0 0 1-1v-4h-2v3h-10v-4z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/Reload.svg b/editor/icons/Reload.svg
index 1200df1dde..4891455cea 100644
--- a/editor/icons/Reload.svg
+++ b/editor/icons/Reload.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg>
diff --git a/editor/icons/ReloadSmall.svg b/editor/icons/ReloadSmall.svg
index 9418a57ab1..ca13da056d 100644
--- a/editor/icons/ReloadSmall.svg
+++ b/editor/icons/ReloadSmall.svg
@@ -1 +1 @@
-<svg height="14" viewBox="0 0 14 14" width="14" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1038.4)"><path d="m8 1039.4a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1618 1050.3)"/></g></svg>
+<svg height="14" viewBox="0 0 14 14" width="14" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1038.4)"><path d="m8 1039.4a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1618 1050.3)"/></g></svg>
diff --git a/editor/icons/Remove.svg b/editor/icons/Remove.svg
index 5bcdf8e569..eb8e244d9a 100644
--- a/editor/icons/Remove.svg
+++ b/editor/icons/Remove.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m5 1v1h-4v2h14v-2h-4v-1zm-3 4v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-8zm1 2h2v6h-2zm4 0h2v6h-2zm4 0h2v6h-2z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m5 1v1h-4v2h14v-2h-4v-1zm-3 4v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-8zm1 2h2v6h-2zm4 0h2v6h-2zm4 0h2v6h-2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/RigidBody3D.svg b/editor/icons/RigidBody3D.svg
index 7f5db4ce88..593f6e1f57 100644
--- a/editor/icons/RigidBody3D.svg
+++ b/editor/icons/RigidBody3D.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 .035156.69922 7 7 0 0 0 .27734 1.3691 7 7 0 0 0 .91016 1.8848 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.001374.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.3848-6.4883 7 7 0 0 0 -.007812-.0039063 7 7 0 0 0 -.001953 0 7 7 0 0 0 -.61523-.21289 7 7 0 0 0 -.044922-.015625 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="#fc7f7f" fill-opacity=".99608"/></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 .035156.69922 7 7 0 0 0 .27734 1.3691 7 7 0 0 0 .91016 1.8848 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.001374.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.3848-6.4883 7 7 0 0 0 -.007812-.0039063 7 7 0 0 0 -.001953 0 7 7 0 0 0 -.61523-.21289 7 7 0 0 0 -.044922-.015625 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="#fc7f7f"/></svg>
diff --git a/editor/icons/RotateLeft.svg b/editor/icons/RotateLeft.svg
index 1200df1dde..4891455cea 100644
--- a/editor/icons/RotateLeft.svg
+++ b/editor/icons/RotateLeft.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(0 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg>
diff --git a/editor/icons/RotateRight.svg b/editor/icons/RotateRight.svg
index d69e6a7705..7c9da781dc 100644
--- a/editor/icons/RotateRight.svg
+++ b/editor/icons/RotateRight.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="matrix(-1 0 0 1 16.026308 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="matrix(-1 0 0 1 16.026308 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg>
diff --git a/editor/icons/Search.svg b/editor/icons/Search.svg
index fff4a3cb19..847163d766 100644
--- a/editor/icons/Search.svg
+++ b/editor/icons/Search.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 2.7539-.83203l4.3164 4.3164 1.4141-1.4141-4.3164-4.3164a5 5 0 0 0 .83203-2.7539 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-3z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 2.7539-.83203l4.3164 4.3164 1.4141-1.4141-4.3164-4.3164a5 5 0 0 0 .83203-2.7539 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-3z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Shortcut.svg b/editor/icons/Shortcut.svg
index 4ef16f0401..2e9a69d8b6 100644
--- a/editor/icons/Shortcut.svg
+++ b/editor/icons/Shortcut.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 2c-.55228 0-1 .4477-1 1v9.084c.0004015.506.448.91602 1 .91602h8c.552 0 .9996-.41002 1-.91602v-9.084c0-.5523-.44772-1-1-1zm-3 2v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9h-1v9a.99998.99998 0 0 1 -1 1h-10a1 1 0 0 1 -1-1v-9zm6 0h3l-1 3h2l-4 4 1-3h-2z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 2c-.55228 0-1 .4477-1 1v9.084c.0004015.506.448.91602 1 .91602h8c.552 0 .9996-.41002 1-.91602v-9.084c0-.5523-.44772-1-1-1zm-3 2v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9h-1v9a.99998.99998 0 0 1 -1 1h-10a1 1 0 0 1 -1-1v-9zm6 0h3l-1 3h2l-4 4 1-3h-2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Skeleton3D.svg b/editor/icons/Skeleton3D.svg
index f1a1db86a9..19a796c4f1 100644
--- a/editor/icons/Skeleton3D.svg
+++ b/editor/icons/Skeleton3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 2a4 4 0 0 0 -4 4 4 4 0 0 0 2 3.4531v3.5469a2 2 0 0 0 1 1.7324 2 2 0 0 0 1 .26562v.001953h4v-.001953a2 2 0 0 0 1-.26562 2 2 0 0 0 1-1.7324v-3.5469a4 4 0 0 0 2-3.4531 4 4 0 0 0 -4-4zm-1 3a1 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-1zm6 0a1 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-1zm-4 2h2v1h-2zm-2 2h1v1h1v-1h1 1v1h1v-1h1v.86719 3.1328h-1v-1h-1v1h-1-1v-1h-1v1h-1v-3.1309-.86914z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 2a4 4 0 0 0 -4 4 4 4 0 0 0 2 3.4531v3.5469a2 2 0 0 0 1 1.7324 2 2 0 0 0 1 .26562v.001953h4v-.001953a2 2 0 0 0 1-.26562 2 2 0 0 0 1-1.7324v-3.5469a4 4 0 0 0 2-3.4531 4 4 0 0 0 -4-4zm-1 3a1 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-1zm6 0a1 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-1zm-4 2h2v1h-2zm-2 2h1v1h1v-1h1 1v1h1v-1h1v.86719 3.1328h-1v-1h-1v1h-1-1v-1h-1v1h-1v-3.1309-.86914z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/SoftBody3D.svg b/editor/icons/SoftBody3D.svg
index 7bc9a22c22..1bd2531ce9 100644
--- a/editor/icons/SoftBody3D.svg
+++ b/editor/icons/SoftBody3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1s-3 5 0 7-1 7-1 7h13s3-6 0-8 1-6 1-6zm2 2h7s-2 3 1 5 0 5 0 5h-7s2-4-1-6 0-4 0-4z" fill="#fc7f7f" fill-opacity=".996078"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1s-3 5 0 7-1 7-1 7h13s3-6 0-8 1-6 1-6zm2 2h7s-2 3 1 5 0 5 0 5h-7s2-4-1-6 0-4 0-4z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/SpotLight3D.svg b/editor/icons/SpotLight3D.svg
index 73b738efcf..27c318257a 100644
--- a/editor/icons/SpotLight3D.svg
+++ b/editor/icons/SpotLight3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1a1 1 0 0 0 -1 1v3.6934c-1.7861.86608-3 2.4605-3 4.3066h4a2 2 0 0 0 2 2 2 2 0 0 0 2-2h4c0-1.8462-1.2139-3.4406-3-4.3066v-3.6934a1 1 0 0 0 -1-1zm-1.0977 9.6348-1.7324 1 1 1.7305 1.7324-1zm6.1953 0-1 1.7305 1.7324 1 1-1.7305zm-4.0977 2.3652v2h2v-2z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1a1 1 0 0 0 -1 1v3.6934c-1.7861.86608-3 2.4605-3 4.3066h4a2 2 0 0 0 2 2 2 2 0 0 0 2-2h4c0-1.8462-1.2139-3.4406-3-4.3066v-3.6934a1 1 0 0 0 -1-1zm-1.0977 9.6348-1.7324 1 1 1.7305 1.7324-1zm6.1953 0-1 1.7305 1.7324 1 1-1.7305zm-4.0977 2.3652v2h2v-2z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/StaticBody3D.svg b/editor/icons/StaticBody3D.svg
index 55b061571f..1172fb0821 100644
--- a/editor/icons/StaticBody3D.svg
+++ b/editor/icons/StaticBody3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><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="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><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="#fc7f7f"/></svg>
diff --git a/editor/icons/SubViewport.svg b/editor/icons/SubViewport.svg
index 1e17ae234f..d5da67ee53 100644
--- a/editor/icons/SubViewport.svg
+++ b/editor/icons/SubViewport.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 2c-.5304.0000801-1.0390625.2108475-1.4140625.5859375-.37509.37501-.5858575.8836225-.5859375 1.4140625v8c.0000803.5304.2108475 1.039063.5859375 1.414062.37501.375091.8836225.585858 1.4140625.585938h10c1.1046 0 2-.89543 2-2v-8c0-1.1046-.89543-2-2-2zm0 1h10c.55228.0000096.99999.44772 1 1v8c-.00001.55228-.44772.99999-1 1h-10c-.55228-.00001-.99999-.44772-1-1v-8c.0000096-.55228.44772-.99999 1-1zm3 1c-.5304.0001-1.0390625.2108375-1.4140625.5859375-.37509.375-.5858575.8836225-.5859375 1.4140625v4c.00008.5304.2108475 1.039062.5859375 1.414062.37501.3751.8836225.585838 1.4140625.585938h4c1.1046 0 2-.8954 2-2v-4c0-1.1046-.89543-2-2-2zm0 1h4c.55228 0 .99999.4477 1 1v4c-.00001.5523-.44772 1-1 1h-4c-.55228 0-.99999-.4477-1-1v-4c.00001-.5523.44772-1 1-1z" fill="#e0e0e0" fill-opacity=".996078"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 2c-.5304.0000801-1.0390625.2108475-1.4140625.5859375-.37509.37501-.5858575.8836225-.5859375 1.4140625v8c.0000803.5304.2108475 1.039063.5859375 1.414062.37501.375091.8836225.585858 1.4140625.585938h10c1.1046 0 2-.89543 2-2v-8c0-1.1046-.89543-2-2-2zm0 1h10c.55228.0000096.99999.44772 1 1v8c-.00001.55228-.44772.99999-1 1h-10c-.55228-.00001-.99999-.44772-1-1v-8c.0000096-.55228.44772-.99999 1-1zm3 1c-.5304.0001-1.0390625.2108375-1.4140625.5859375-.37509.375-.5858575.8836225-.5859375 1.4140625v4c.00008.5304.2108475 1.039062.5859375 1.414062.37501.3751.8836225.585838 1.4140625.585938h4c1.1046 0 2-.8954 2-2v-4c0-1.1046-.89543-2-2-2zm0 1h4c.55228 0 .99999.4477 1 1v4c-.00001.5523-.44772 1-1 1h-4c-.55228 0-.99999-.4477-1-1v-4c.00001-.5523.44772-1 1-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Texture2DArray.svg b/editor/icons/Texture2DArray.svg
index a71860023b..6d5bf0deb8 100644
--- a/editor/icons/Texture2DArray.svg
+++ b/editor/icons/Texture2DArray.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(-.359546 .287637)"><path d="m2 1c-.5522847 0-1 .4477153-1 1v12c0 .552285.4477153 1 1 1h12c.552285 0 1-.447715 1-1v-12c0-.5522847-.447715-1-1-1zm1 2h10v8h-10z" fill-opacity=".99608" transform="translate(.359546 -.287637)"/><g fill-opacity=".996078" stroke-width=".207395" transform="matrix(1.6197742 0 0 .750929 -3.723153 1.832957)"><path d="m4.9900159 2.5027746h1.85211v1.3316838h-.926055v5.3267353h.926055v1.3316833h-1.85211z"/><path d="m9.9289759 10.492877h-1.85211v-1.3316833h.926055v-5.3267353h-.926055v-1.3316838h1.85211z"/></g></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="translate(-.359546 .287637)"><path d="m2 1c-.5522847 0-1 .4477153-1 1v12c0 .552285.4477153 1 1 1h12c.552285 0 1-.447715 1-1v-12c0-.5522847-.447715-1-1-1zm1 2h10v8h-10z" transform="translate(.359546 -.287637)"/><g stroke-width=".207395" transform="matrix(1.6197742 0 0 .750929 -3.723153 1.832957)"><path d="m4.9900159 2.5027746h1.85211v1.3316838h-.926055v5.3267353h.926055v1.3316833h-1.85211z"/><path d="m9.9289759 10.492877h-1.85211v-1.3316833h.926055v-5.3267353h-.926055v-1.3316838h1.85211z"/></g></g></svg>
diff --git a/editor/icons/TileSelection.svg b/editor/icons/TileSelection.svg
new file mode 100644
index 0000000000..418382aa1c
--- /dev/null
+++ b/editor/icons/TileSelection.svg
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ height="5"
+ viewBox="0 0 5 5"
+ width="5"
+ version="1.1"
+ id="svg10"
+ sodipodi:docname="TileSelection.svg"
+ inkscape:version="1.1 (c68e22c387, 2021-05-23)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs14">
+ <linearGradient
+ id="linearGradient1060"
+ inkscape:swatch="solid">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop1058" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="namedview12"
+ pagecolor="#505050"
+ bordercolor="#ffffff"
+ borderopacity="1"
+ inkscape:pageshadow="0"
+ inkscape:pageopacity="0"
+ inkscape:pagecheckerboard="1"
+ showgrid="false"
+ inkscape:zoom="64"
+ inkscape:cx="4.3125"
+ inkscape:cy="1.984375"
+ inkscape:window-width="3840"
+ inkscape:window-height="2066"
+ inkscape:window-x="-11"
+ inkscape:window-y="-11"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg10" />
+ <rect
+ style="fill:none;stroke:#ffffff;stroke-width:1.00038;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect940"
+ width="3.9996195"
+ height="3.999619"
+ x="0.50019002"
+ y="0.50019002" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.999543;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3062"
+ width="2.000457"
+ height="2.000457"
+ x="1.4997715"
+ y="1.4997715" />
+</svg>
diff --git a/editor/icons/ToolMove.svg b/editor/icons/ToolMove.svg
index b83f62265f..8c14b76eba 100644
--- a/editor/icons/ToolMove.svg
+++ b/editor/icons/ToolMove.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.9844 1.002a1.0001 1.0001 0 0 0 -.69141.29102l-2 2 1.4141 1.4141 1.293-1.293 1.293 1.293 1.4141-1.4141-2-2a1.0001 1.0001 0 0 0 -.72266-.29102zm-4.6914 4.291-2 2a1.0001 1.0001 0 0 0 0 1.4141l2 2 1.4141-1.4141-1.293-1.293 1.293-1.293-1.4141-1.4141zm9.4141 0-1.4141 1.4141 1.293 1.293-1.293 1.293 1.4141 1.4141 2-2a1.0001 1.0001 0 0 0 0-1.4141l-2-2zm-4.707.70703a2 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-1.293 5.293-1.4141 1.4141 2 2a1.0001 1.0001 0 0 0 1.4141 0l2-2-1.4141-1.4141-1.293 1.293-1.293-1.293z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.9844 1.002a1.0001 1.0001 0 0 0 -.69141.29102l-2 2 1.4141 1.4141 1.293-1.293 1.293 1.293 1.4141-1.4141-2-2a1.0001 1.0001 0 0 0 -.72266-.29102zm-4.6914 4.291-2 2a1.0001 1.0001 0 0 0 0 1.4141l2 2 1.4141-1.4141-1.293-1.293 1.293-1.293-1.4141-1.4141zm9.4141 0-1.4141 1.4141 1.293 1.293-1.293 1.293 1.4141 1.4141 2-2a1.0001 1.0001 0 0 0 0-1.4141l-2-2zm-4.707.70703a2 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-1.293 5.293-1.4141 1.4141 2 2a1.0001 1.0001 0 0 0 1.4141 0l2-2-1.4141-1.4141-1.293 1.293-1.293-1.293z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/ToolPan.svg b/editor/icons/ToolPan.svg
index 28ffe6336a..51db68ae74 100644
--- a/editor/icons/ToolPan.svg
+++ b/editor/icons/ToolPan.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10 1a1 1 0 0 0 -1 1v6h-1v-5a1 1 0 0 0 -1-1 1 1 0 0 0 -1 1v8 .033203l-2.4746-1.8086c-.52015-.3803-1.1948-.4556-1.6504 0-.45566.4556-.45561 1.1948 0 1.6504l4.125 4.125h6a2 2 0 0 0 2-2v-5-4a1 1 0 0 0 -1-1 1 1 0 0 0 -1 1v4h-1v-6a1 1 0 0 0 -1-1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10 1a1 1 0 0 0 -1 1v6h-1v-5a1 1 0 0 0 -1-1 1 1 0 0 0 -1 1v8 .033203l-2.4746-1.8086c-.52015-.3803-1.1948-.4556-1.6504 0-.45566.4556-.45561 1.1948 0 1.6504l4.125 4.125h6a2 2 0 0 0 2-2v-5-4a1 1 0 0 0 -1-1 1 1 0 0 0 -1 1v4h-1v-6a1 1 0 0 0 -1-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/ToolRotate.svg b/editor/icons/ToolRotate.svg
index 41dd22584d..0fa1904937 100644
--- a/editor/icons/ToolRotate.svg
+++ b/editor/icons/ToolRotate.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8.0879 1.002a7 7 0 0 0 -.30469.0019531 7 7 0 0 0 -.69727.056641 7 7 0 0 0 -5.9512 5.5742 7 7 0 0 0 1.9707 6.3652h-1.1055v2h4a1.0001 1.0001 0 0 0 .9707-1.2422l-1-4-1.9414.48633.28125 1.1211a5 5 0 0 1 -1.3105-3.3652 5 5 0 0 1 5-5 5 5 0 0 1 5 5 5 5 0 0 1 -1.4668 3.5332l1.416 1.416a7 7 0 0 0 1.3281-8.0449 7 7 0 0 0 -6.1895-3.9023zm-.087891 4.998a2 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-2z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8.0879 1.002a7 7 0 0 0 -.30469.0019531 7 7 0 0 0 -.69727.056641 7 7 0 0 0 -5.9512 5.5742 7 7 0 0 0 1.9707 6.3652h-1.1055v2h4a1.0001 1.0001 0 0 0 .9707-1.2422l-1-4-1.9414.48633.28125 1.1211a5 5 0 0 1 -1.3105-3.3652 5 5 0 0 1 5-5 5 5 0 0 1 5 5 5 5 0 0 1 -1.4668 3.5332l1.416 1.416a7 7 0 0 0 1.3281-8.0449 7 7 0 0 0 -6.1895-3.9023zm-.087891 4.998a2 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-2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/ToolScale.svg b/editor/icons/ToolScale.svg
index 730143a474..9ebeaffeae 100644
--- a/editor/icons/ToolScale.svg
+++ b/editor/icons/ToolScale.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m9 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h2.5859l-1.293 1.293 1.4141 1.4141 1.293-1.293v2.5859a1 1 0 0 0 1 1 1 1 0 0 0 1-1v-5a1.0001 1.0001 0 0 0 -1-1zm-1 5a2 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-6 2a1 1 0 0 0 -1 1v5a1.0001 1.0001 0 0 0 1 1h5a1 1 0 0 0 1-1 1 1 0 0 0 -1-1h-2.5859l1.293-1.293-1.4141-1.4141-1.293 1.293v-2.5859a1 1 0 0 0 -1-1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m9 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h2.5859l-1.293 1.293 1.4141 1.4141 1.293-1.293v2.5859a1 1 0 0 0 1 1 1 1 0 0 0 1-1v-5a1.0001 1.0001 0 0 0 -1-1zm-1 5a2 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-6 2a1 1 0 0 0 -1 1v5a1.0001 1.0001 0 0 0 1 1h5a1 1 0 0 0 1-1 1 1 0 0 0 -1-1h-2.5859l1.293-1.293-1.4141-1.4141-1.293 1.293v-2.5859a1 1 0 0 0 -1-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/TrackTrigger.svg b/editor/icons/TrackTrigger.svg
deleted file mode 100644
index c403fba59a..0000000000
--- a/editor/icons/TrackTrigger.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h2v4h2v-4h2v-2zm13 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#f68f45"/></svg>
diff --git a/editor/icons/TripleBar.svg b/editor/icons/TripleBar.svg
index 2b521e6c15..6baea09478 100644
--- a/editor/icons/TripleBar.svg
+++ b/editor/icons/TripleBar.svg
@@ -1 +1 @@
-<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m1.9375 4h12.062zm0 4h12.062zm0 4h12.062z" fill="none" stroke="#e0e0e0" stroke-opacity=".99608" stroke-width=".92823"/></svg>
+<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m1.9375 4h12.062zm0 4h12.062zm0 4h12.062z" fill="none" stroke="#e0e0e0" stroke-width=".92823"/></svg>
diff --git a/editor/icons/VehicleBody3D.svg b/editor/icons/VehicleBody3D.svg
index 00e4696a17..5e21f40c85 100644
--- a/editor/icons/VehicleBody3D.svg
+++ b/editor/icons/VehicleBody3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m5 3a1 1 0 0 0 -1 1l-1 3h-2v4h1.0508c.23167-1.1411 1.2398-2 2.4492-2s2.2175.85893 2.4492 2h2.1016c.23167-1.1411 1.2398-2 2.4492-2s2.2175.85893 2.4492 2h1.0508v-4h-4v-4zm1 1h4v3h-4zm-1.5 6a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0 -1.5-1.5zm7 0a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0 -1.5-1.5z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m5 3a1 1 0 0 0 -1 1l-1 3h-2v4h1.0508c.23167-1.1411 1.2398-2 2.4492-2s2.2175.85893 2.4492 2h2.1016c.23167-1.1411 1.2398-2 2.4492-2s2.2175.85893 2.4492 2h1.0508v-4h-4v-4zm1 1h4v3h-4zm-1.5 6a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0 -1.5-1.5zm7 0a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0 -1.5-1.5z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/VehicleWheel3D.svg b/editor/icons/VehicleWheel3D.svg
index 4c825d6e34..540bad8ab0 100644
--- a/editor/icons/VehicleWheel3D.svg
+++ b/editor/icons/VehicleWheel3D.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 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm0 2a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5-5 5 5 0 0 1 5-5zm0 1a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0 -4-4zm0 1a1 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-1zm-2 2a1 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-1zm4 0a1 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-1zm-2 2a1 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="#fc7f7f" fill-opacity=".99608"/></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 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm0 2a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5-5 5 5 0 0 1 5-5zm0 1a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0 -4-4zm0 1a1 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-1zm-2 2a1 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-1zm4 0a1 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-1zm-2 2a1 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="#fc7f7f"/></svg>
diff --git a/editor/icons/Viewport.svg b/editor/icons/Viewport.svg
index 7d388c1c6d..9de1e8b05a 100644
--- a/editor/icons/Viewport.svg
+++ b/editor/icons/Viewport.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 2c-.5304.0000801-1.0391.21085-1.4141.58594-.37509.37501-.58586.88366-.58594 1.4141v8c.0000803.5304.21085 1.0391.58594 1.4141.37501.37509.88366.58586 1.4141.58594h10c1.1046 0 2-.89543 2-2v-8c0-1.1046-.89543-2-2-2zm0 1h10c.55228.0000096.99999.44772 1 1v8c-.00001.55228-.44772.99999-1 1h-10c-.55228-.00001-.99999-.44772-1-1v-8c.0000096-.55228.44772-.99999 1-1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 2c-.5304.0000801-1.0391.21085-1.4141.58594-.37509.37501-.58586.88366-.58594 1.4141v8c.0000803.5304.21085 1.0391.58594 1.4141.37501.37509.88366.58586 1.4141.58594h10c1.1046 0 2-.89543 2-2v-8c0-1.1046-.89543-2-2-2zm0 1h10c.55228.0000096.99999.44772 1 1v8c-.00001.55228-.44772.99999-1 1h-10c-.55228-.00001-.99999-.44772-1-1v-8c.0000096-.55228.44772-.99999 1-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/ViewportSpeed.svg b/editor/icons/ViewportSpeed.svg
index 57292e2e91..caed3cb1de 100644
--- a/editor/icons/ViewportSpeed.svg
+++ b/editor/icons/ViewportSpeed.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-width="3.77953"><path d="m6.0285136 0c-1.0906961 0-2.0000127.90931655-2.0000127 2.0000126v2.3105008c-.3234859-.1927559-.6845858-.3367559-1.0781102-.3223937-1.3171276.048-2.24957487 1.4115024-1.8164032 2.6561764l.9960945 2.9883213c.183927.5526806.6039307.9375116 1.1054741 1.1581986l-2.30275287 1.537096c-.49591181.31937-.83535119.846198-.91211339 1.373102-.07676977.526904.06603212 1.019906.33007748 1.416.26404536.396095.66572598.719811 1.18163158.851603.5153008.131528 1.1318173.02268 1.6171842-.312566h.00195l4.1015433-2.734413.9863434 1.972611c.4415244.884069 1.4843716 1.316372 2.4218832 1.00388l3-.999987-.02929.01134c.570898-.17159 1.048139-.590173 1.265613-1.082078.217466-.491906.208418-1.011893.05664-1.466797-.119282-.357543-.41469-.637606-.728504-.892611.261162-.206362.546142-.39171.681638-.730394.195632-.489109.17105-1.1070991-.08984-1.6289007l-1.000027-2.0011107c-.337916-.6777827-1.033625-1.1077039-1.789039-1.1075905h-.419906c.196645-.3087874.419906-.6128126.419906-.9999874v-3.0000001c0-1.09069605-.909317-2.0000126-2.000012-2.0000126z"/><path d="m6.0285136.99998741c-.5540032 0-.9999874.44598429-.9999874 1.00002519v3.0000001c0 .5540031.4459842.9999874.9999874.9999874h.9999874v.9902362a1.0001008 1.0001008 0 0 0 -.316407.062362l-2.0507716.6835656-.6836032-2.0507717a1.0001008 1.0001008 0 0 0 -.9902362-.6972473 1.0001008 1.0001008 0 0 0 -.9082205 1.328126l.9999874 3.0000001a1.0001008 1.0001008 0 0 0 1.2656126.6328063l1.6835906-.5605418v.6113008c0 .040819.018709.075591.023433.1152757l-4.5781418 3.052762a1.0001008 1.0001008 0 1 0 1.1093669 1.664051l5.05663-3.371112 1.4941228 2.986356a1.0001008 1.0001008 0 0 0 1.210922.501921l3.000001-.999987a1.0001008 1.0001008 0 1 0 -.632807-1.896378l-2.177726.724611-.9746262-1.951182c.275898-.177637.4687372-.472252.4687372-.8261665v-.9999874h1.382815l.722646 1.4472569a1.0001246 1.0001246 0 1 0 1.789077-.8945388l-.999987-1.9999748a1.0001008 1.0001008 0 0 0 -.894539-.5527559h-2.9999995v-.9999874h.9999875c.554003 0 .999987-.4459843.999987-.9999874v-3.0000001c0-.5540409-.445984-1.00002519-.999987-1.00002519zm0 2.00001259h.9999874v2.0000127h-.9999874z" fill="#fff" fill-opacity=".99608"/></g></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-width="3.77953"><path d="m6.0285136 0c-1.0906961 0-2.0000127.90931655-2.0000127 2.0000126v2.3105008c-.3234859-.1927559-.6845858-.3367559-1.0781102-.3223937-1.3171276.048-2.24957487 1.4115024-1.8164032 2.6561764l.9960945 2.9883213c.183927.5526806.6039307.9375116 1.1054741 1.1581986l-2.30275287 1.537096c-.49591181.31937-.83535119.846198-.91211339 1.373102-.07676977.526904.06603212 1.019906.33007748 1.416.26404536.396095.66572598.719811 1.18163158.851603.5153008.131528 1.1318173.02268 1.6171842-.312566h.00195l4.1015433-2.734413.9863434 1.972611c.4415244.884069 1.4843716 1.316372 2.4218832 1.00388l3-.999987-.02929.01134c.570898-.17159 1.048139-.590173 1.265613-1.082078.217466-.491906.208418-1.011893.05664-1.466797-.119282-.357543-.41469-.637606-.728504-.892611.261162-.206362.546142-.39171.681638-.730394.195632-.489109.17105-1.1070991-.08984-1.6289007l-1.000027-2.0011107c-.337916-.6777827-1.033625-1.1077039-1.789039-1.1075905h-.419906c.196645-.3087874.419906-.6128126.419906-.9999874v-3.0000001c0-1.09069605-.909317-2.0000126-2.000012-2.0000126z"/><path d="m6.0285136.99998741c-.5540032 0-.9999874.44598429-.9999874 1.00002519v3.0000001c0 .5540031.4459842.9999874.9999874.9999874h.9999874v.9902362a1.0001008 1.0001008 0 0 0 -.316407.062362l-2.0507716.6835656-.6836032-2.0507717a1.0001008 1.0001008 0 0 0 -.9902362-.6972473 1.0001008 1.0001008 0 0 0 -.9082205 1.328126l.9999874 3.0000001a1.0001008 1.0001008 0 0 0 1.2656126.6328063l1.6835906-.5605418v.6113008c0 .040819.018709.075591.023433.1152757l-4.5781418 3.052762a1.0001008 1.0001008 0 1 0 1.1093669 1.664051l5.05663-3.371112 1.4941228 2.986356a1.0001008 1.0001008 0 0 0 1.210922.501921l3.000001-.999987a1.0001008 1.0001008 0 1 0 -.632807-1.896378l-2.177726.724611-.9746262-1.951182c.275898-.177637.4687372-.472252.4687372-.8261665v-.9999874h1.382815l.722646 1.4472569a1.0001246 1.0001246 0 1 0 1.789077-.8945388l-.999987-1.9999748a1.0001008 1.0001008 0 0 0 -.894539-.5527559h-2.9999995v-.9999874h.9999875c.554003 0 .999987-.4459843.999987-.9999874v-3.0000001c0-.5540409-.445984-1.00002519-.999987-1.00002519zm0 2.00001259h.9999874v2.0000127h-.9999874z" fill="#fff"/></g></svg>
diff --git a/editor/icons/ViewportTexture.svg b/editor/icons/ViewportTexture.svg
index 3dd448b1ac..a5b1e4ab07 100644
--- a/editor/icons/ViewportTexture.svg
+++ b/editor/icons/ViewportTexture.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 2c-.5304.0000801-1.0391.21085-1.4141.58594-.37509.37501-.58586.88366-.58594 1.4141v8c.0000803.5304.21085 1.0391.58594 1.4141.37501.37509.88366.58586 1.4141.58594h10c1.1046 0 2-.89543 2-2v-8c0-1.1046-.89543-2-2-2h-10zm0 1h10c.55228.0000096.99999.44772 1 1v8c-.00001.55228-.44772.99999-1 1h-10c-.55228-.00001-.99999-.44772-1-1v-8c.0000096-.55228.44772-.99999 1-1zm6 3v1h-1v1h-2v1h-1v1h-1v1h2 2 2 2v-2h-1v-1-1h-1v-1z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 2c-.5304.0000801-1.0391.21085-1.4141.58594-.37509.37501-.58586.88366-.58594 1.4141v8c.0000803.5304.21085 1.0391.58594 1.4141.37501.37509.88366.58586 1.4141.58594h10c1.1046 0 2-.89543 2-2v-8c0-1.1046-.89543-2-2-2h-10zm0 1h10c.55228.0000096.99999.44772 1 1v8c-.00001.55228-.44772.99999-1 1h-10c-.55228-.00001-.99999-.44772-1-1v-8c.0000096-.55228.44772-.99999 1-1zm6 3v1h-1v1h-2v1h-1v1h-1v1h2 2 2 2v-2h-1v-1-1h-1v-1z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/VisibleOnScreenEnabler3D.svg b/editor/icons/VisibleOnScreenEnabler3D.svg
index 6923bcb46b..1c24a348a5 100644
--- a/editor/icons/VisibleOnScreenEnabler3D.svg
+++ b/editor/icons/VisibleOnScreenEnabler3D.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="#fc7f7f" fill-opacity=".99608" 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="#fc7f7f" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/VisibleOnScreenNotifier3D.svg b/editor/icons/VisibleOnScreenNotifier3D.svg
index 2fdf784701..f731ae99a2 100644
--- a/editor/icons/VisibleOnScreenNotifier3D.svg
+++ b/editor/icons/VisibleOnScreenNotifier3D.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m12 1v6h2v-6zm-4 2c-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.7246 1.4907 0 3.2717-.65207 4.7109-2h-.71094-2v-.54102a4 4 0 0 1 -2 .54102 4 4 0 0 1 -4-4 4 4 0 0 1 4-4 4 4 0 0 1 2 .54102v-2.1816c-.68312-.23834-1.3644-.35938-2-.35938zm0 4a2 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-2zm4 2v2h2v-2z" fill="#fc7f7f" fill-opacity=".99608" fill-rule="evenodd"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m12 1v6h2v-6zm-4 2c-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.7246 1.4907 0 3.2717-.65207 4.7109-2h-.71094-2v-.54102a4 4 0 0 1 -2 .54102 4 4 0 0 1 -4-4 4 4 0 0 1 4-4 4 4 0 0 1 2 .54102v-2.1816c-.68312-.23834-1.3644-.35938-2-.35938zm0 4a2 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-2zm4 2v2h2v-2z" fill="#fc7f7f" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/VisualScriptComment.svg b/editor/icons/VisualScriptComment.svg
deleted file mode 100644
index 3887853b58..0000000000
--- a/editor/icons/VisualScriptComment.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="14" viewBox="0 0 14 14" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m3 1v2h-2v2h2v4h-2v2h2v2h2v-2h4v2h2v-2h2v-2h-2v-4h2v-2h-2v-2h-2v2h-4v-2zm2 4h4v4h-4z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/VisualScriptExpression.svg b/editor/icons/VisualScriptExpression.svg
deleted file mode 100644
index d6a3c2d9a8..0000000000
--- a/editor/icons/VisualScriptExpression.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m4.859536 3.0412379c-2.0539867 0-3.7190721 1.6650852-3.7190721 3.719072v6.1984521h2.4793814v-2.479381h2.4793814v-2.4793803h-2.4793814v-1.2396908c0-.6846622.5550285-1.2396907 1.2396907-1.2396907h1.2396907v-2.4793813z"/><path d="m7.5889175 3.0000003 2.5000005 4.9999997-2.5000005 5h2.5000005l1.135249-2.727 1.36475 2.727h2.499999l-2.499999-5 2.499999-4.9999997h-2.499999l-1.13525 2.7269998-1.364749-2.7269998zm7.4999985 9.9999997v-6.25z"/></g></svg>
diff --git a/editor/icons/VoxelGI.svg b/editor/icons/VoxelGI.svg
index f5e1025260..58567569af 100644
--- a/editor/icons/VoxelGI.svg
+++ b/editor/icons/VoxelGI.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h4v-2h-3v-10h9v-2zm9 3a4 4 0 0 0 -4 4 4 4 0 0 0 2 3.459v.54102c0 .55401.44599 1 1 1h2c.55401 0 1-.44599 1-1v-.54102a4 4 0 0 0 2-3.459 4 4 0 0 0 -4-4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2zm-1 8v1h2v-1z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h4v-2h-3v-10h9v-2zm9 3a4 4 0 0 0 -4 4 4 4 0 0 0 2 3.459v.54102c0 .55401.44599 1 1 1h2c.55401 0 1-.44599 1-1v-.54102a4 4 0 0 0 2-3.459 4 4 0 0 0 -4-4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2zm-1 8v1h2v-1z" fill="#fc7f7f"/></svg>
diff --git a/editor/icons/WorldEnvironment.svg b/editor/icons/WorldEnvironment.svg
index d26ec52034..6c7e34657f 100644
--- a/editor/icons/WorldEnvironment.svg
+++ b/editor/icons/WorldEnvironment.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"><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.7305 2.3125c-.83125 1.5372-1.2685 3.1037-1.2695 4.6816-.64057-.11251-1.3005-.27158-1.9766-.47266a5 5 0 0 1 3.2461-4.209zm3.4629.0039062a5 5 0 0 1 3.2383 4.1875c-.65187.17448-1.3077.32867-1.9727.44922-.00845-1.5627-.44294-3.1141-1.2656-4.6367zm-1.7324.0078126c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 .054042-.0066161.10803-.0078125.16211-.96392.096801-1.9566.1103-2.9844.027344-.0016335-.063192-.0078125-.12632-.0078125-.18945 0-1.5333.48744-3.0828 1.5-4.6758zm4.8789 5.7578a5 5 0 0 1 -3.1484 3.6055c.57106-1.0564.95277-2.1268 1.1367-3.2051.68204-.10905 1.3556-.23789 2.0117-.40039zm-9.7461.033203c.68377.18153 1.3555.33345 2.0098.43164.18781 1.0551.56647 2.1026 1.125 3.1367a5 5 0 0 1 -3.1348-3.5684zm6.168.55469c-.22615.98866-.65424 1.9884-1.3008 3.0059-.63811-1.0042-1.0645-1.9908-1.293-2.9668.89027.054126 1.7517.029377 2.5938-.039062z" fill="#fc7f7f" fill-opacity=".99608"/><path d="m8 1v2.3242c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 .054042-.0066161.10803-.0078125.16211-.4894.049148-.98713.077552-1.4922.082031v1.4922c.43915-.0075968.87287-.031628 1.3008-.066406-.22615.98866-.65424 1.9884-1.3008 3.0059v2.3242a7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm1.7324 2.3164a5 5 0 0 1 3.2383 4.1875c-.65187.17448-1.3077.32867-1.9727.44922-.00845-1.5627-.44294-3.1141-1.2656-4.6367zm3.1465 5.7656a5 5 0 0 1 -3.1484 3.6055c.57106-1.0564.95277-2.1268 1.1367-3.2051.68204-.10905 1.3556-.23789 2.0117-.40039z" fill="#8da5f3"/></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"><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.7305 2.3125c-.83125 1.5372-1.2685 3.1037-1.2695 4.6816-.64057-.11251-1.3005-.27158-1.9766-.47266a5 5 0 0 1 3.2461-4.209zm3.4629.0039062a5 5 0 0 1 3.2383 4.1875c-.65187.17448-1.3077.32867-1.9727.44922-.00845-1.5627-.44294-3.1141-1.2656-4.6367zm-1.7324.0078126c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 .054042-.0066161.10803-.0078125.16211-.96392.096801-1.9566.1103-2.9844.027344-.0016335-.063192-.0078125-.12632-.0078125-.18945 0-1.5333.48744-3.0828 1.5-4.6758zm4.8789 5.7578a5 5 0 0 1 -3.1484 3.6055c.57106-1.0564.95277-2.1268 1.1367-3.2051.68204-.10905 1.3556-.23789 2.0117-.40039zm-9.7461.033203c.68377.18153 1.3555.33345 2.0098.43164.18781 1.0551.56647 2.1026 1.125 3.1367a5 5 0 0 1 -3.1348-3.5684zm6.168.55469c-.22615.98866-.65424 1.9884-1.3008 3.0059-.63811-1.0042-1.0645-1.9908-1.293-2.9668.89027.054126 1.7517.029377 2.5938-.039062z" fill="#fc7f7f"/><path d="m8 1v2.3242c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 .054042-.0066161.10803-.0078125.16211-.4894.049148-.98713.077552-1.4922.082031v1.4922c.43915-.0075968.87287-.031628 1.3008-.066406-.22615.98866-.65424 1.9884-1.3008 3.0059v2.3242a7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm1.7324 2.3164a5 5 0 0 1 3.2383 4.1875c-.65187.17448-1.3077.32867-1.9727.44922-.00845-1.5627-.44294-3.1141-1.2656-4.6367zm3.1465 5.7656a5 5 0 0 1 -3.1484 3.6055c.57106-1.0564.95277-2.1268 1.1367-3.2051.68204-.10905 1.3556-.23789 2.0117-.40039z" fill="#8da5f3"/></g></svg>
diff --git a/editor/icons/Zoom.svg b/editor/icons/Zoom.svg
index fc0102f0e3..6e6462af35 100644
--- a/editor/icons/Zoom.svg
+++ b/editor/icons/Zoom.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 2.752-.83398l4.3184 4.3184 1.4141-1.4141-4.3184-4.3184a5 5 0 0 0 .41016-.75195h-.57617v-2h-1a3 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 2 .76758v-1.7676h.99023a5 5 0 0 0 -2.9902-1zm5 0v2h-2v2h2v2h2v-2h2v-2h-2v-2z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 2.752-.83398l4.3184 4.3184 1.4141-1.4141-4.3184-4.3184a5 5 0 0 0 .41016-.75195h-.57617v-2h-1a3 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 2 .76758v-1.7676h.99023a5 5 0 0 0 -2.9902-1zm5 0v2h-2v2h2v2h2v-2h2v-2h-2v-2z" fill="#e0e0e0"/></svg>
diff --git a/editor/import/audio_stream_import_settings.cpp b/editor/import/audio_stream_import_settings.cpp
index e3da82a5cb..41a2f7a643 100644
--- a/editor/import/audio_stream_import_settings.cpp
+++ b/editor/import/audio_stream_import_settings.cpp
@@ -1,37 +1,38 @@
-/*************************************************************************/
-/* audio_stream_import_settings.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* audio_stream_import_settings.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 "audio_stream_import_settings.h"
#include "editor/audio_stream_preview.h"
#include "editor/editor_file_system.h"
#include "editor/editor_scale.h"
+#include "scene/gui/check_box.h"
AudioStreamImportSettings *AudioStreamImportSettings::singleton = nullptr;
@@ -76,7 +77,7 @@ void AudioStreamImportSettings::_notification(int p_what) {
void AudioStreamImportSettings::_draw_preview() {
Rect2 rect = _preview->get_rect();
- Size2 size = rect.size;
+ Size2 rect_size = rect.size;
Ref<AudioStreamPreview> preview = AudioStreamPreviewGenerator::get_singleton()->generate_preview(stream);
float preview_offset = zoom_bar->get_value();
@@ -85,7 +86,7 @@ void AudioStreamImportSettings::_draw_preview() {
Ref<Font> beat_font = get_theme_font(SNAME("main"), SNAME("EditorFonts"));
int main_size = get_theme_font_size(SNAME("main_size"), SNAME("EditorFonts"));
Vector<Vector2> lines;
- lines.resize(size.width * 2);
+ lines.resize(rect_size.width * 2);
Color color_active = get_theme_color(SNAME("contrast_color_2"), SNAME("Editor"));
Color color_inactive = color_active;
color_inactive.a *= 0.5;
@@ -107,9 +108,9 @@ void AudioStreamImportSettings::_draw_preview() {
}
}
- for (int i = 0; i < size.width; i++) {
- float ofs = preview_offset + i * preview_len / size.width;
- float ofs_n = preview_offset + (i + 1) * preview_len / size.width;
+ for (int i = 0; i < rect_size.width; i++) {
+ float ofs = preview_offset + i * preview_len / rect_size.width;
+ float ofs_n = preview_offset + (i + 1) * preview_len / rect_size.width;
float max = preview->get_max(ofs, ofs_n) * 0.5 + 0.5;
float min = preview->get_min(ofs, ofs_n) * 0.5 + 0.5;
@@ -139,8 +140,8 @@ void AudioStreamImportSettings::_draw_preview() {
int bar_beats = stream->get_bar_beats();
int last_text_end_x = 0;
- for (int i = 0; i < size.width; i++) {
- float ofs = preview_offset + i * preview_len / size.width;
+ for (int i = 0; i < rect_size.width; i++) {
+ float ofs = preview_offset + i * preview_len / rect_size.width;
int beat = int(ofs / beat_size);
if (beat != prev_beat) {
String text = itos(beat);
@@ -287,17 +288,15 @@ void AudioStreamImportSettings::_draw_indicator() {
float preview_len = zoom_bar->get_page();
float beat_size = 60 / float(stream->get_bpm());
int prev_beat = 0;
- int last_text_end_x = 0;
for (int i = 0; i < rect.size.width; i++) {
float ofs = preview_offset + i * preview_len / rect.size.width;
int beat = int(ofs / beat_size);
if (beat != prev_beat) {
String text = itos(beat);
int text_w = beat_font->get_string_size(text).width;
- if (i - text_w / 2 > last_text_end_x + 2 * EDSCALE && beat == _hovering_beat) {
+ if (i - text_w / 2 > 2 * EDSCALE && beat == _hovering_beat) {
int x_ofs = i - text_w / 2;
_indicator->draw_string(beat_font, Point2(x_ofs, 2 * EDSCALE + beat_font->get_ascent(main_size)), text, HORIZONTAL_ALIGNMENT_LEFT, rect.size.width - x_ofs, Font::DEFAULT_FONT_SIZE, color);
- last_text_end_x = i + text_w / 2;
break;
}
prev_beat = beat;
@@ -466,12 +465,17 @@ void AudioStreamImportSettings::_settings_changed() {
updating_settings = true;
stream->call("set_loop", loop->is_pressed());
stream->call("set_loop_offset", loop_offset->get_value());
+ if (loop->is_pressed()) {
+ loop_offset->set_editable(true);
+ } else {
+ loop_offset->set_editable(false);
+ }
+
if (bpm_enabled->is_pressed()) {
stream->call("set_bpm", bpm_edit->get_value());
- beats_enabled->show();
- beats_edit->show();
- bar_beats_label->show();
- bar_beats_edit->show();
+ beats_enabled->set_disabled(false);
+ beats_edit->set_editable(true);
+ bar_beats_edit->set_editable(true);
double bpm = bpm_edit->get_value();
if (bpm > 0) {
float beat_size = 60 / float(bpm);
@@ -487,10 +491,9 @@ void AudioStreamImportSettings::_settings_changed() {
} else {
stream->call("set_bpm", 0);
stream->call("set_bar_beats", 4);
- beats_enabled->hide();
- beats_edit->hide();
- bar_beats_label->hide();
- bar_beats_edit->hide();
+ beats_enabled->set_disabled(true);
+ beats_edit->set_editable(false);
+ bar_beats_edit->set_editable(false);
}
if (bpm_enabled->is_pressed() && beats_enabled->is_pressed()) {
stream->call("set_beat_count", beats_edit->get_value());
@@ -553,17 +556,8 @@ AudioStreamImportSettings::AudioStreamImportSettings() {
bpm_edit->connect("value_changed", callable_mp(this, &AudioStreamImportSettings::_settings_changed).unbind(1));
interactive_hb->add_child(bpm_edit);
interactive_hb->add_spacer();
- bar_beats_label = memnew(Label(TTR("Beats/Bar:")));
- interactive_hb->add_child(bar_beats_label);
- bar_beats_edit = memnew(SpinBox);
- bar_beats_edit->set_tooltip_text(TTR("Configure the Beats Per Bar. This used for music-aware transitions between AudioStreams."));
- bar_beats_edit->set_min(2);
- bar_beats_edit->set_max(32);
- bar_beats_edit->connect("value_changed", callable_mp(this, &AudioStreamImportSettings::_settings_changed).unbind(1));
- interactive_hb->add_child(bar_beats_edit);
- interactive_hb->add_spacer();
beats_enabled = memnew(CheckBox);
- beats_enabled->set_text(TTR("Length (in beats):"));
+ beats_enabled->set_text(TTR("Beat Count:"));
beats_enabled->connect("toggled", callable_mp(this, &AudioStreamImportSettings::_settings_changed).unbind(1));
interactive_hb->add_child(beats_enabled);
beats_edit = memnew(SpinBox);
@@ -571,6 +565,15 @@ AudioStreamImportSettings::AudioStreamImportSettings() {
beats_edit->set_max(99999);
beats_edit->connect("value_changed", callable_mp(this, &AudioStreamImportSettings::_settings_changed).unbind(1));
interactive_hb->add_child(beats_edit);
+ bar_beats_label = memnew(Label(TTR("Bar Beats:")));
+ interactive_hb->add_child(bar_beats_label);
+ bar_beats_edit = memnew(SpinBox);
+ bar_beats_edit->set_tooltip_text(TTR("Configure the Beats Per Bar. This used for music-aware transitions between AudioStreams."));
+ bar_beats_edit->set_min(2);
+ bar_beats_edit->set_max(32);
+ bar_beats_edit->connect("value_changed", callable_mp(this, &AudioStreamImportSettings::_settings_changed).unbind(1));
+ interactive_hb->add_child(bar_beats_edit);
+ interactive_hb->add_spacer();
main_vbox->add_margin_child(TTR("Music Playback:"), interactive_hb);
color_rect = memnew(ColorRect);
diff --git a/editor/import/audio_stream_import_settings.h b/editor/import/audio_stream_import_settings.h
index 5e399237ca..939dcd9769 100644
--- a/editor/import/audio_stream_import_settings.h
+++ b/editor/import/audio_stream_import_settings.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* audio_stream_import_settings.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* audio_stream_import_settings.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 AUDIO_STREAM_IMPORT_SETTINGS_H
#define AUDIO_STREAM_IMPORT_SETTINGS_H
@@ -34,9 +34,12 @@
#include "editor/editor_plugin.h"
#include "scene/audio/audio_stream_player.h"
#include "scene/gui/color_rect.h"
+#include "scene/gui/dialogs.h"
#include "scene/gui/spin_box.h"
#include "scene/resources/texture.h"
+class CheckBox;
+
class AudioStreamImportSettings : public ConfirmationDialog {
GDCLASS(AudioStreamImportSettings, ConfirmationDialog);
diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp
index 5d8e453395..a8d746fde6 100644
--- a/editor/import/collada.cpp
+++ b/editor/import/collada.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* collada.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* collada.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 "collada.h"
@@ -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,6 +848,8 @@ 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_named_attribute_value_safe("closed").to_lower();
+ curvedata.closed = closed == "true" || closed == "1";
COLLADA_PRINT("curve name: " + p_name);
@@ -863,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);
@@ -886,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;
@@ -943,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);
@@ -959,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++);
@@ -996,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;
@@ -1072,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;
@@ -1089,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);
@@ -1123,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;
@@ -1136,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;
@@ -1153,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;
@@ -1226,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) {
@@ -1235,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);
@@ -1259,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;
@@ -1270,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;
@@ -1293,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;
@@ -1318,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;
@@ -1327,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;
@@ -1368,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);
@@ -1389,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);
@@ -1435,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;
@@ -1453,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()) {
@@ -1488,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;
@@ -1499,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;
@@ -1511,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;
@@ -1525,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;
@@ -1542,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;
@@ -1607,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;
@@ -1617,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) {
@@ -1654,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;
@@ -1666,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>();
@@ -1681,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") {
@@ -1855,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);
}
@@ -1892,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") {
@@ -1923,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") {
@@ -2036,11 +2038,7 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) {
ERR_CONTINUE(!state.scene_map.has(nodeid)); //weird, it should have it...
-#ifdef NO_SAFE_CAST
- NodeJoint *nj = static_cast<NodeJoint *>(state.scene_map[nodeid]);
-#else
NodeJoint *nj = dynamic_cast<NodeJoint *>(state.scene_map[nodeid]);
-#endif
ERR_CONTINUE(!nj); //broken collada
ERR_CONTINUE(!nj->owner); //weird, node should have a skeleton owner
@@ -2197,11 +2195,7 @@ bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, L
String nodeid = ng->skeletons[0];
ERR_FAIL_COND_V(!state.scene_map.has(nodeid), false); //weird, it should have it...
-#ifdef NO_SAFE_CAST
- NodeJoint *nj = static_cast<NodeJoint *>(state.scene_map[nodeid]);
-#else
NodeJoint *nj = dynamic_cast<NodeJoint *>(state.scene_map[nodeid]);
-#endif
ERR_FAIL_COND_V(!nj, false);
ERR_FAIL_COND_V(!nj->owner, false); //weird, node should have a skeleton owner
@@ -2352,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/collada.h b/editor/import/collada.h
index f1d9c5593f..12b32f982d 100644
--- a/editor/import/collada.h
+++ b/editor/import/collada.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* collada.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* collada.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 COLLADA_H
#define COLLADA_H
diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp
index d1f37179f3..cfbe34b868 100644
--- a/editor/import/dynamic_font_import_settings.cpp
+++ b/editor/import/dynamic_font_import_settings.cpp
@@ -1,35 +1,36 @@
-/*************************************************************************/
-/* dynamic_font_import_settings.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* dynamic_font_import_settings.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 "dynamic_font_import_settings.h"
+#include "core/config/project_settings.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_file_system.h"
#include "editor/editor_inspector.h"
@@ -302,6 +303,7 @@ static UniRange unicode_ranges[] = {
{ 0x10D00, 0x10D3F, U"Hanifi Rohingya" },
{ 0x10E60, 0x10E7F, U"Rumi Numeral Symbols" },
{ 0x10E80, 0x10EBF, U"Yezidi" },
+ { 0x10EC0, 0x10EFF, U"Arabic Extended-C" },
{ 0x10F00, 0x10F2F, U"Old Sogdian" },
{ 0x10F30, 0x10F6F, U"Sogdian" },
{ 0x10F70, 0x10FAF, U"Old Uyghur" },
@@ -333,11 +335,13 @@ static UniRange unicode_ranges[] = {
{ 0x11A50, 0x11AAF, U"Soyombo" },
{ 0x11AB0, 0x11ABF, U"Unified Canadian Aboriginal Syllabics Extended-A" },
{ 0x11AC0, 0x11AFF, U"Pau Cin Hau" },
+ { 0x11B00, 0x11B5F, U"Devanagari Extended-A" },
{ 0x11C00, 0x11C6F, U"Bhaiksuki" },
{ 0x11C70, 0x11CBF, U"Marchen" },
{ 0x11D00, 0x11D5F, U"Masaram Gondi" },
{ 0x11D60, 0x11DAF, U"Gunjala Gondi" },
{ 0x11EE0, 0x11EFF, U"Makasar" },
+ { 0x11F00, 0x11F5F, U"Kawi" },
{ 0x11FB0, 0x11FBF, U"Lisu Supplement" },
{ 0x11FC0, 0x11FFF, U"Tamil Supplement" },
{ 0x12000, 0x123FF, U"Cuneiform" },
@@ -370,6 +374,7 @@ static UniRange unicode_ranges[] = {
{ 0x1D000, 0x1D0FF, U"Byzantine Musical Symbols" },
{ 0x1D100, 0x1D1FF, U"Musical Symbols" },
{ 0x1D200, 0x1D24F, U"Ancient Greek Musical Notation" },
+ { 0x1D2C0, 0x1D2DF, U"Kaktovik Numerals" },
{ 0x1D2E0, 0x1D2FF, U"Mayan Numerals" },
{ 0x1D300, 0x1D35F, U"Tai Xuan Jing Symbols" },
{ 0x1D360, 0x1D37F, U"Counting Rod Numerals" },
@@ -377,9 +382,11 @@ static UniRange unicode_ranges[] = {
{ 0x1D800, 0x1DAAF, U"Sutton SignWriting" },
{ 0x1DF00, 0x1DFFF, U"Latin Extended-G" },
{ 0x1E000, 0x1E02F, U"Glagolitic Supplement" },
+ { 0x1E030, 0x1E08F, U"Cyrillic Extended-D" },
{ 0x1E100, 0x1E14F, U"Nyiakeng Puachue Hmong" },
{ 0x1E290, 0x1E2BF, U"Toto" },
{ 0x1E2C0, 0x1E2FF, U"Wancho" },
+ { 0x1E4D0, 0x1E4FF, U"Nag Mundari" },
{ 0x1E7E0, 0x1E7FF, U"Ethiopic Extended-B" },
{ 0x1E800, 0x1E8DF, U"Mende Kikakui" },
{ 0x1E900, 0x1E95F, U"Adlam" },
@@ -409,6 +416,7 @@ static UniRange unicode_ranges[] = {
{ 0x2CEB0, 0x2EBEF, U"CJK Unified Ideographs Extension F" },
{ 0x2F800, 0x2FA1F, U"CJK Compatibility Ideographs Supplement" },
{ 0x30000, 0x3134F, U"CJK Unified Ideographs Extension G" },
+ { 0x31350, 0x323AF, U"CJK Unified Ideographs Extension H" },
//{ 0xE0000, 0xE007F, U"Tags" },
//{ 0xE0100, 0xE01EF, U"Variation Selectors Supplement" },
{ 0xF0000, 0xFFFFF, U"Supplementary Private Use Area-A" },
@@ -461,6 +469,8 @@ void DynamicFontImportSettings::_main_prop_changed(const String &p_edited_proper
font_preview->set_msdf_pixel_range(import_settings_data->get("msdf_pixel_range"));
} else if (p_edited_property == "msdf_size") {
font_preview->set_msdf_size(import_settings_data->get("msdf_size"));
+ } else if (p_edited_property == "allow_system_fallback") {
+ font_preview->set_allow_system_fallback(import_settings_data->get("allow_system_fallback"));
} else if (p_edited_property == "force_autohinter") {
font_preview->set_force_autohinter(import_settings_data->get("force_autohinter"));
} else if (p_edited_property == "hinting") {
@@ -485,9 +495,9 @@ void DynamicFontImportSettings::_variation_add() {
TreeItem *vars_item = vars_list->create_item(vars_list_root);
ERR_FAIL_NULL(vars_item);
- vars_item->set_text(0, TTR("New configuration"));
+ vars_item->set_text(0, TTR("New Configuration"));
vars_item->set_editable(0, true);
- vars_item->add_button(1, vars_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove Variation"));
+ vars_item->add_button(1, get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove Variation"));
vars_item->set_button_color(1, 0, Color(1, 1, 1, 0.75));
Ref<DynamicFontImportSettingsData> import_variation_data;
@@ -521,6 +531,12 @@ void DynamicFontImportSettings::_variation_selected() {
label_glyphs->set_text(TTR("Preloaded glyphs: ") + itos(import_variation_data->selected_glyphs.size()));
_range_selected();
_change_text_opts();
+
+ btn_fill->set_disabled(false);
+ btn_fill_locales->set_disabled(false);
+ } else {
+ btn_fill->set_disabled(true);
+ btn_fill_locales->set_disabled(true);
}
}
@@ -544,6 +560,15 @@ void DynamicFontImportSettings::_variation_remove(Object *p_item, int p_column,
}
_variations_validate();
+
+ vars_item = vars_list->get_selected();
+ if (vars_item) {
+ btn_fill->set_disabled(false);
+ btn_fill_locales->set_disabled(false);
+ } else {
+ btn_fill->set_disabled(true);
+ btn_fill_locales->set_disabled(true);
+ }
}
void DynamicFontImportSettings::_variation_changed(const String &p_edited_property) {
@@ -575,10 +600,10 @@ void DynamicFontImportSettings::_variations_validate() {
}
}
if ((TextServer::FontAntialiasing)(int)import_settings_data->get("antialiasing") == TextServer::FONT_ANTIALIASING_LCD) {
- warn += "\n" + TTR("Note: LCD sub-pixel anti-aliasing is selected, each of the glyphs will be pre-rendered for all supported sub-pixel layouts (5x).");
+ warn += "\n" + TTR("Note: LCD Subpixel antialiasing is selected, each of the glyphs will be pre-rendered for all supported subpixel layouts (5x).");
}
if ((TextServer::SubpixelPositioning)(int)import_settings_data->get("subpixel_positioning") != TextServer::SUBPIXEL_POSITIONING_DISABLED) {
- warn += "\n" + TTR("Note: Sub-pixel positioning is selected, each of the glyphs might be pre-rendered for multiple sub-pixel offsets (up to 4x).");
+ warn += "\n" + TTR("Note: Subpixel positioning is selected, each of the glyphs might be pre-rendered for multiple subpixel offsets (up to 4x).");
}
if (warn.is_empty()) {
label_warn->set_text("");
@@ -616,6 +641,27 @@ void DynamicFontImportSettings::_change_text_opts() {
text_edit->add_theme_font_override("font", font_main_text);
}
+void DynamicFontImportSettings::_glyph_update_lbl() {
+ Ref<DynamicFontImportSettingsData> import_variation_data;
+
+ TreeItem *vars_item = vars_list->get_selected();
+ if (vars_item) {
+ import_variation_data = vars_item->get_metadata(0);
+ }
+ if (import_variation_data.is_null()) {
+ return;
+ }
+
+ int linked_glyphs = 0;
+ for (const char32_t &c : import_variation_data->selected_chars) {
+ if (import_variation_data->selected_glyphs.has(font_main->get_glyph_index(16, c))) {
+ linked_glyphs++;
+ }
+ }
+ int unlinked_glyphs = import_variation_data->selected_glyphs.size() - linked_glyphs;
+ label_glyphs->set_text(TTR("Preloaded glyphs:") + " " + itos(unlinked_glyphs + import_variation_data->selected_chars.size()));
+}
+
void DynamicFontImportSettings::_glyph_clear() {
Ref<DynamicFontImportSettingsData> import_variation_data;
@@ -628,7 +674,7 @@ void DynamicFontImportSettings::_glyph_clear() {
}
import_variation_data->selected_glyphs.clear();
- label_glyphs->set_text(TTR("Preloaded glyphs:") + " " + itos(import_variation_data->selected_glyphs.size()));
+ _glyph_update_lbl();
_range_selected();
}
@@ -655,7 +701,7 @@ void DynamicFontImportSettings::_glyph_text_selected() {
}
}
TS->free_rid(text_rid);
- label_glyphs->set_text(TTR("Preloaded glyphs:") + " " + itos(import_variation_data->selected_glyphs.size()));
+ _glyph_update_lbl();
}
_range_selected();
}
@@ -692,7 +738,7 @@ void DynamicFontImportSettings::_glyph_selected() {
item->clear_custom_bg_color(glyph_table->get_selected_column());
}
}
- label_glyphs->set_text(TTR("Preloaded glyphs:") + " " + itos(import_variation_data->selected_glyphs.size()));
+ _glyph_update_lbl();
item = glyph_tree->get_selected();
ERR_FAIL_NULL(item);
@@ -793,7 +839,7 @@ void DynamicFontImportSettings::_edit_range(int32_t p_start, int32_t p_end) {
col = 0;
}
}
- label_glyphs->set_text(TTR("Preloaded glyphs:") + " " + itos(import_variation_data->selected_glyphs.size()));
+ _glyph_update_lbl();
}
bool DynamicFontImportSettings::_char_update(int32_t p_char) {
@@ -878,7 +924,7 @@ void DynamicFontImportSettings::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- add_var->set_icon(add_var->get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
+ add_var->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
} break;
}
}
@@ -892,6 +938,7 @@ void DynamicFontImportSettings::_re_import() {
main_settings["multichannel_signed_distance_field"] = import_settings_data->get("multichannel_signed_distance_field");
main_settings["msdf_pixel_range"] = import_settings_data->get("msdf_pixel_range");
main_settings["msdf_size"] = import_settings_data->get("msdf_size");
+ main_settings["allow_system_fallback"] = import_settings_data->get("allow_system_fallback");
main_settings["force_autohinter"] = import_settings_data->get("force_autohinter");
main_settings["hinting"] = import_settings_data->get("hinting");
main_settings["subpixel_positioning"] = import_settings_data->get("subpixel_positioning");
@@ -907,9 +954,18 @@ void DynamicFontImportSettings::_re_import() {
Dictionary preload_config;
preload_config["name"] = vars_item->get_text(0);
+ Size2i conf_size = Vector2i(16, 0);
for (const KeyValue<StringName, Variant> &E : import_variation_data->settings) {
- preload_config[E.key] = E.value;
+ if (E.key == "size") {
+ conf_size.x = E.value;
+ }
+ if (E.key == "outline_size") {
+ conf_size.y = E.value;
+ } else {
+ preload_config[E.key] = E.value;
+ }
}
+ preload_config["size"] = conf_size;
Array chars;
for (const char32_t &E : import_variation_data->selected_chars) {
@@ -940,13 +996,76 @@ void DynamicFontImportSettings::_re_import() {
EditorFileSystem::get_singleton()->reimport_file_with_custom_parameters(base_path, "font_data_dynamic", main_settings);
}
+void DynamicFontImportSettings::_locale_edited() {
+ TreeItem *item = locale_tree->get_selected();
+ ERR_FAIL_NULL(item);
+ item->set_checked(0, !item->is_checked(0));
+}
+
+void DynamicFontImportSettings::_process_locales() {
+ Ref<DynamicFontImportSettingsData> import_variation_data;
+
+ TreeItem *vars_item = vars_list->get_selected();
+ if (vars_item) {
+ import_variation_data = vars_item->get_metadata(0);
+ }
+ if (import_variation_data.is_null()) {
+ return;
+ }
+
+ for (int i = 0; i < locale_root->get_child_count(); i++) {
+ TreeItem *item = locale_root->get_child(i);
+ if (item) {
+ if (item->is_checked(0)) {
+ String locale = item->get_text(0);
+ Ref<Translation> tr = ResourceLoader::load(locale);
+ if (tr.is_valid()) {
+ Vector<String> messages = tr->get_translated_message_list();
+ for (const String &E : messages) {
+ RID text_rid = TS->create_shaped_text();
+ if (text_rid.is_valid()) {
+ TS->shaped_text_add_string(text_rid, E, font_main->get_rids(), 16, Dictionary(), tr->get_locale());
+ TS->shaped_text_shape(text_rid);
+ const Glyph *gl = TS->shaped_text_get_glyphs(text_rid);
+ const int gl_size = TS->shaped_text_get_glyph_count(text_rid);
+
+ for (int j = 0; j < gl_size; j++) {
+ if (gl[j].font_rid.is_valid() && gl[j].index != 0) {
+ import_variation_data->selected_glyphs.insert(gl[j].index);
+ }
+ }
+ TS->free_rid(text_rid);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ _glyph_update_lbl();
+ _range_selected();
+}
+
void DynamicFontImportSettings::open_settings(const String &p_path) {
// Load base font data.
- Vector<uint8_t> data = FileAccess::get_file_as_array(p_path);
+ Vector<uint8_t> font_data = FileAccess::get_file_as_bytes(p_path);
+
+ // Load project locale list.
+ locale_tree->clear();
+ locale_root = locale_tree->create_item();
+ ERR_FAIL_NULL(locale_root);
+
+ Vector<String> translations = GLOBAL_GET("internationalization/locale/translations");
+ for (const String &E : translations) {
+ TreeItem *item = locale_tree->create_item(locale_root);
+ ERR_FAIL_NULL(item);
+ item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ item->set_text(0, E);
+ }
// Load font for preview.
font_preview.instantiate();
- font_preview->set_data(data);
+ font_preview->set_data(font_data);
String font_name = vformat("%s (%s)", font_preview->get_font_name(), font_preview->get_font_style_name());
String sample;
@@ -969,7 +1088,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) {
// Load second copy of font with MSDF disabled for the glyph table and metadata extraction.
font_main.instantiate();
- font_main->set_data(data);
+ font_main->set_data(font_data);
font_main->set_multichannel_signed_distance_field(false);
text_edit->add_theme_font_override("font", font_main);
@@ -996,12 +1115,14 @@ void DynamicFontImportSettings::open_settings(const String &p_path) {
int gww = get_theme_font(SNAME("font"))->get_string_size("00000").x + 50;
glyph_table->set_column_custom_minimum_width(0, gww);
-
glyph_table->clear();
vars_list->clear();
+ glyph_tree->set_selected(glyph_root->get_child(0));
+
vars_list_root = vars_list->create_item();
+ import_settings_data->settings.clear();
import_settings_data->defaults.clear();
for (List<ResourceImporter::ImportOption>::Element *E = options_general.front(); E; E = E->next()) {
import_settings_data->defaults[E->get().option.name] = E->get().default_value;
@@ -1028,7 +1149,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) {
double embolden = preload_config.has("variation_embolden") ? preload_config["variation_embolden"].operator double() : 0;
int face_index = preload_config.has("variation_face_index") ? preload_config["variation_face_index"].operator int() : 0;
Transform2D transform = preload_config.has("variation_transform") ? preload_config["variation_transform"].operator Transform2D() : Transform2D();
- Vector2i size = preload_config.has("size") ? preload_config["size"].operator Vector2i() : Vector2i(16, 0);
+ Vector2i font_size = preload_config.has("size") ? preload_config["size"].operator Vector2i() : Vector2i(16, 0);
String cfg_name = preload_config.has("name") ? preload_config["name"].operator String() : vformat("Configuration %d", i);
TreeItem *vars_item = vars_list->create_item(vars_list_root);
@@ -1036,7 +1157,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) {
vars_item->set_text(0, cfg_name);
vars_item->set_editable(0, true);
- vars_item->add_button(1, vars_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove Variation"));
+ vars_item->add_button(1, get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove Variation"));
vars_item->set_button_color(1, 0, Color(1, 1, 1, 0.75));
Ref<DynamicFontImportSettingsData> import_variation_data_custom;
@@ -1053,8 +1174,8 @@ void DynamicFontImportSettings::open_settings(const String &p_path) {
import_variation_data_custom->options = options_variations;
vars_item->set_metadata(0, import_variation_data_custom);
- import_variation_data_custom->set("size", size.x);
- import_variation_data_custom->set("outline_size", size.y);
+ import_variation_data_custom->set("size", font_size.x);
+ import_variation_data_custom->set("outline_size", font_size.y);
import_variation_data_custom->set("variation_opentype", variation);
import_variation_data_custom->set("variation_embolden", embolden);
import_variation_data_custom->set("variation_face_index", face_index);
@@ -1072,6 +1193,10 @@ void DynamicFontImportSettings::open_settings(const String &p_path) {
import_variation_data_custom->selected_glyphs.insert(c);
}
}
+ if (preload_configurations.is_empty()) {
+ _variation_add(); // Add default variation.
+ }
+ vars_list->set_selected(vars_list_root->get_child(0));
} else {
Variant value = config->get_value("params", key);
import_settings_data->defaults[key] = value;
@@ -1089,6 +1214,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) {
font_preview->set_multichannel_signed_distance_field(import_settings_data->get("multichannel_signed_distance_field"));
font_preview->set_msdf_pixel_range(import_settings_data->get("msdf_pixel_range"));
font_preview->set_msdf_size(import_settings_data->get("msdf_size"));
+ font_preview->set_allow_system_fallback(import_settings_data->get("allow_system_fallback"));
font_preview->set_force_autohinter(import_settings_data->get("force_autohinter"));
font_preview->set_hinting((TextServer::Hinting)import_settings_data->get("hinting").operator int());
font_preview->set_subpixel_positioning((TextServer::SubpixelPositioning)import_settings_data->get("subpixel_positioning").operator int());
@@ -1114,14 +1240,15 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::NIL, "Rendering", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP), Variant()));
- options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "antialiasing", PROPERTY_HINT_ENUM, "None,Grayscale,LCD sub-pixel"), 1));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "antialiasing", PROPERTY_HINT_ENUM, "None,Grayscale,LCD Subpixel"), 1));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "generate_mipmaps"), false));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "multichannel_signed_distance_field", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "msdf_pixel_range", PROPERTY_HINT_RANGE, "1,100,1"), 8));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "msdf_size", PROPERTY_HINT_RANGE, "1,250,1"), 48));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "allow_system_fallback"), true));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "force_autohinter"), false));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal"), 1));
- options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One half of a pixel,One quarter of a pixel"), 1));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One Half of a Pixel,One Quarter of a Pixel"), 1));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::FLOAT, "oversampling", PROPERTY_HINT_RANGE, "0,10,0.1"), 0.0));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::NIL, "Metadata Overrides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP), Variant()));
@@ -1130,7 +1257,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::DICTIONARY, "opentype_features"), Dictionary()));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::NIL, "Fallbacks", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP), Variant()));
- options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "Font")), Array()));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, MAKE_RESOURCE_TYPE_HINT("Font")), Array()));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::NIL, "Compress", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP), Variant()));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "compress", PROPERTY_HINT_NONE, ""), false));
@@ -1211,7 +1338,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
// Page 2 layout: Configurations
VBoxContainer *page2_vb = memnew(VBoxContainer);
- page2_vb->set_name(TTR("Pre-render configurations"));
+ page2_vb->set_name(TTR("Pre-render Configurations"));
main_pages->add_child(page2_vb);
page2_description = memnew(Label);
@@ -1240,7 +1367,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
add_var = memnew(Button);
page2_hb_vars->add_child(add_var);
add_var->set_tooltip_text(TTR("Add configuration"));
- add_var->set_icon(add_var->get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
+ add_var->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
add_var->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_variation_add));
vars_list = memnew(Tree);
@@ -1261,11 +1388,57 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
inspector_vars->connect("property_edited", callable_mp(this, &DynamicFontImportSettings::_variation_changed));
page2_side_vb->add_child(inspector_vars);
+ VBoxContainer *preload_pages_vb = memnew(VBoxContainer);
+ page2_hb->add_child(preload_pages_vb);
+
preload_pages = memnew(TabContainer);
preload_pages->set_tab_alignment(TabBar::ALIGNMENT_CENTER);
preload_pages->set_v_size_flags(Control::SIZE_EXPAND_FILL);
preload_pages->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- page2_hb->add_child(preload_pages);
+ preload_pages_vb->add_child(preload_pages);
+
+ HBoxContainer *gl_hb = memnew(HBoxContainer);
+ preload_pages_vb->add_child(gl_hb);
+ gl_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+
+ label_glyphs = memnew(Label);
+ gl_hb->add_child(label_glyphs);
+ label_glyphs->set_text(TTR("Preloaded glyphs:") + " " + itos(0));
+ label_glyphs->set_custom_minimum_size(Size2(50 * EDSCALE, 0));
+
+ Button *btn_clear = memnew(Button);
+ gl_hb->add_child(btn_clear);
+ btn_clear->set_text(TTR("Clear Glyph List"));
+ btn_clear->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_glyph_clear));
+
+ VBoxContainer *page2_0_vb = memnew(VBoxContainer);
+ page2_0_vb->set_name(TTR("Glyphs from the Translations"));
+ preload_pages->add_child(page2_0_vb);
+
+ page2_0_description = memnew(Label);
+ page2_0_description->set_text(TTR("Select translations to add all required glyphs to pre-render list:"));
+ page2_0_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ page2_0_description->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
+ page2_0_vb->add_child(page2_0_description);
+
+ locale_tree = memnew(Tree);
+ page2_0_vb->add_child(locale_tree);
+ locale_tree->set_columns(1);
+ locale_tree->set_hide_root(true);
+ locale_tree->set_column_expand(0, true);
+ locale_tree->connect("item_activated", callable_mp(this, &DynamicFontImportSettings::_locale_edited));
+ locale_tree->set_column_custom_minimum_width(0, 120 * EDSCALE);
+ locale_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ locale_root = locale_tree->create_item();
+
+ HBoxContainer *locale_hb = memnew(HBoxContainer);
+ page2_0_vb->add_child(locale_hb);
+ locale_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+
+ btn_fill_locales = memnew(Button);
+ locale_hb->add_child(btn_fill_locales);
+ btn_fill_locales->set_text(TTR("Shape all Strings in the Translations and Add Glyphs"));
+ btn_fill_locales->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_process_locales));
// Page 2.1 layout: Text to select glyphs
VBoxContainer *page2_1_vb = memnew(VBoxContainer);
@@ -1273,7 +1446,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
preload_pages->add_child(page2_1_vb);
page2_1_description = memnew(Label);
- page2_1_description->set_text(TTR("Enter a text to shape and add all required glyphs to pre-render list:"));
+ page2_1_description->set_text(TTR("Enter a text and select OpenType features to shape and add all required glyphs to pre-render list:"));
page2_1_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
page2_1_description->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
page2_1_vb->add_child(page2_1_description);
@@ -1299,21 +1472,11 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
page2_1_vb->add_child(text_hb);
text_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- label_glyphs = memnew(Label);
- text_hb->add_child(label_glyphs);
- label_glyphs->set_text(TTR("Preloaded glyphs:") + " " + itos(0));
- label_glyphs->set_custom_minimum_size(Size2(50 * EDSCALE, 0));
-
- Button *btn_fill = memnew(Button);
+ btn_fill = memnew(Button);
text_hb->add_child(btn_fill);
- btn_fill->set_text(TTR("Shape text and add glyphs"));
+ btn_fill->set_text(TTR("Shape Text and Add Glyphs"));
btn_fill->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_glyph_text_selected));
- Button *btn_clear = memnew(Button);
- text_hb->add_child(btn_clear);
- btn_clear->set_text(TTR("Clear glyph list"));
- btn_clear->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_glyph_clear));
-
// Page 2.2 layout: Character map
VBoxContainer *page2_2_vb = memnew(VBoxContainer);
page2_2_vb->set_name(TTR("Glyphs from the Character Map"));
diff --git a/editor/import/dynamic_font_import_settings.h b/editor/import/dynamic_font_import_settings.h
index a1f763b445..4a586049fa 100644
--- a/editor/import/dynamic_font_import_settings.h
+++ b/editor/import/dynamic_font_import_settings.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* dynamic_font_import_settings.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* dynamic_font_import_settings.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 DYNAMIC_FONT_IMPORT_SETTINGS_H
#define DYNAMIC_FONT_IMPORT_SETTINGS_H
@@ -118,18 +118,30 @@ class DynamicFontImportSettings : public ConfirmationDialog {
TabContainer *preload_pages = nullptr;
+ Label *label_glyphs = nullptr;
+ void _glyph_clear();
+ void _glyph_update_lbl();
+
+ // Page 2.0 layout: Translations
+ Label *page2_0_description = nullptr;
+ Tree *locale_tree = nullptr;
+ TreeItem *locale_root = nullptr;
+ Button *btn_fill_locales = nullptr;
+
+ void _locale_edited();
+ void _process_locales();
+
// Page 2.1 layout: Text to select glyphs
Label *page2_1_description = nullptr;
- Label *label_glyphs = nullptr;
TextEdit *text_edit = nullptr;
EditorInspector *inspector_text = nullptr;
+ Button *btn_fill = nullptr;
List<ResourceImporter::ImportOption> options_text;
Ref<DynamicFontImportSettingsData> text_settings_data;
void _change_text_opts();
void _glyph_text_selected();
- void _glyph_clear();
// Page 2.2 layout: Character map
Label *page2_2_description = nullptr;
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 8d44329022..4b0ece3367 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_import_collada.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_import_collada.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 "editor_import_collada.h"
@@ -65,7 +65,7 @@ struct ColladaImport {
bool force_make_tangents = false;
bool apply_mesh_xform_to_vertices = true;
bool use_mesh_builtin_materials = false;
- float bake_fps = 15;
+ float bake_fps = 30;
HashMap<String, NodeMap> node_map; //map from collada node to engine node
HashMap<String, String> node_name_map; //map from collada node to engine node
@@ -1090,6 +1090,12 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
c->set_point_tilt(i, tilts->array[i]);
}
}
+ if (cd.closed && pc > 1) {
+ Vector3 pos = c->get_point_position(0);
+ Vector3 in = c->get_point_in(0);
+ Vector3 out = c->get_point_out(0);
+ c->add_point(pos, in, out, -1);
+ }
curve_cache[ng->source] = c;
path->set_curve(c);
@@ -1754,7 +1760,7 @@ void EditorSceneFormatImporterCollada::get_extensions(List<String> *r_extensions
r_extensions->push_back("dae");
}
-Node *EditorSceneFormatImporterCollada::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
+Node *EditorSceneFormatImporterCollada::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, List<String> *r_missing_deps, Error *r_err) {
if (r_err) {
*r_err = OK;
}
@@ -1765,7 +1771,7 @@ Node *EditorSceneFormatImporterCollada::import_scene(const String &p_path, uint3
}
state.use_mesh_builtin_materials = true;
- state.bake_fps = p_bake_fps;
+ state.bake_fps = (float)p_options["animation/fps"];
Error err = state.load(p_path, flags, p_flags & EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS, false);
diff --git a/editor/import/editor_import_collada.h b/editor/import/editor_import_collada.h
index a75b0a903f..2950f499cb 100644
--- a/editor/import/editor_import_collada.h
+++ b/editor/import/editor_import_collada.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_import_collada.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_import_collada.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 EDITOR_IMPORT_COLLADA_H
#define EDITOR_IMPORT_COLLADA_H
@@ -39,7 +39,7 @@ class EditorSceneFormatImporterCollada : public EditorSceneFormatImporter {
public:
virtual uint32_t get_import_flags() const override;
virtual void get_extensions(List<String> *r_extensions) const override;
- virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr) override;
+ virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, List<String> *r_missing_deps = nullptr, Error *r_err = nullptr) override;
EditorSceneFormatImporterCollada();
};
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index 5211f003c1..fb14dcf888 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_import_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_import_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 "editor_import_plugin.h"
@@ -154,7 +154,7 @@ bool EditorImportPlugin::get_option_visibility(const String &p_path, const Strin
d[E->key] = E->value;
++E;
}
- bool visible;
+ bool visible = false;
if (GDVIRTUAL_CALL(_get_option_visibility, p_path, p_option, d, visible)) {
return visible;
}
@@ -172,7 +172,7 @@ Error EditorImportPlugin::import(const String &p_source_file, const String &p_sa
++E;
}
- int err;
+ int err = 0;
if (GDVIRTUAL_CALL(_import, p_source_file, p_save_path, options, platform_variants, gen_files, err)) {
Error ret_err = Error(err);
diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h
index 1468ed082b..0f79ba4783 100644
--- a/editor/import/editor_import_plugin.h
+++ b/editor/import/editor_import_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_import_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_import_plugin.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 EDITOR_IMPORT_PLUGIN_H
#define EDITOR_IMPORT_PLUGIN_H
diff --git a/editor/import/post_import_plugin_skeleton_renamer.cpp b/editor/import/post_import_plugin_skeleton_renamer.cpp
index 72ccb832c7..59e07a7117 100644
--- a/editor/import/post_import_plugin_skeleton_renamer.cpp
+++ b/editor/import/post_import_plugin_skeleton_renamer.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* post_import_plugin_skeleton_renamer.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* post_import_plugin_skeleton_renamer.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 "post_import_plugin_skeleton_renamer.h"
@@ -44,100 +44,164 @@ void PostImportPluginSkeletonRenamer::get_internal_import_options(InternalImport
}
}
-void PostImportPluginSkeletonRenamer::internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options) {
- if (p_category == INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE) {
- // Prepare objects.
- Object *map = p_options["retarget/bone_map"].get_validated_object();
- if (!map || !bool(p_options["retarget/bone_renamer/rename_bones"])) {
- return;
- }
- BoneMap *bone_map = Object::cast_to<BoneMap>(map);
- Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_node);
+void PostImportPluginSkeletonRenamer::_internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options, HashMap<String, String> p_rename_map) {
+ // Prepare objects.
+ Object *map = p_options["retarget/bone_map"].get_validated_object();
+ if (!map || !bool(p_options["retarget/bone_renamer/rename_bones"])) {
+ return;
+ }
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_node);
- // Rename bones in Skeleton3D.
- {
- int len = skeleton->get_bone_count();
- for (int i = 0; i < len; i++) {
- StringName bn = bone_map->find_profile_bone_name(skeleton->get_bone_name(i));
- if (bn) {
- skeleton->set_bone_name(i, bn);
- }
+ // Rename bones in Skeleton3D.
+ {
+ int len = skeleton->get_bone_count();
+ for (int i = 0; i < len; i++) {
+ StringName bn = p_rename_map[skeleton->get_bone_name(i)];
+ if (bn) {
+ skeleton->set_bone_name(i, bn);
}
}
+ }
- // Rename bones in Skin.
- {
- TypedArray<Node> nodes = p_base_scene->find_children("*", "ImporterMeshInstance3D");
- while (nodes.size()) {
- ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(nodes.pop_back());
- Ref<Skin> skin = mi->get_skin();
- if (skin.is_valid()) {
- Node *node = mi->get_node(mi->get_skeleton_path());
- if (node) {
- Skeleton3D *mesh_skeleton = Object::cast_to<Skeleton3D>(node);
- if (mesh_skeleton && node == skeleton) {
- int len = skin->get_bind_count();
- for (int i = 0; i < len; i++) {
- StringName bn = bone_map->find_profile_bone_name(skin->get_bind_name(i));
- if (bn) {
- skin->set_bind_name(i, bn);
- }
+ // Rename bones in Skin.
+ {
+ TypedArray<Node> nodes = p_base_scene->find_children("*", "ImporterMeshInstance3D");
+ while (nodes.size()) {
+ ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(nodes.pop_back());
+ Ref<Skin> skin = mi->get_skin();
+ if (skin.is_valid()) {
+ Node *node = mi->get_node(mi->get_skeleton_path());
+ if (node) {
+ Skeleton3D *mesh_skeleton = Object::cast_to<Skeleton3D>(node);
+ if (mesh_skeleton && node == skeleton) {
+ int len = skin->get_bind_count();
+ for (int i = 0; i < len; i++) {
+ StringName bn = p_rename_map[skin->get_bind_name(i)];
+ if (bn) {
+ skin->set_bind_name(i, bn);
}
}
}
}
}
}
+ }
- // Rename bones in AnimationPlayer.
- {
- TypedArray<Node> nodes = p_base_scene->find_children("*", "AnimationPlayer");
- while (nodes.size()) {
- AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(nodes.pop_back());
- List<StringName> anims;
- ap->get_animation_list(&anims);
- for (const StringName &name : anims) {
- Ref<Animation> anim = ap->get_animation(name);
- int len = anim->get_track_count();
- for (int i = 0; i < len; i++) {
- if (anim->track_get_path(i).get_subname_count() != 1 || !(anim->track_get_type(i) == Animation::TYPE_POSITION_3D || anim->track_get_type(i) == Animation::TYPE_ROTATION_3D || anim->track_get_type(i) == Animation::TYPE_SCALE_3D)) {
- continue;
- }
- String track_path = String(anim->track_get_path(i).get_concatenated_names());
- Node *node = (ap->get_node(ap->get_root()))->get_node(NodePath(track_path));
- if (node) {
- Skeleton3D *track_skeleton = Object::cast_to<Skeleton3D>(node);
- if (track_skeleton && track_skeleton == skeleton) {
- StringName bn = bone_map->find_profile_bone_name(anim->track_get_path(i).get_subname(0));
- if (bn) {
- anim->track_set_path(i, track_path + ":" + bn);
- }
+ // Rename bones in AnimationPlayer.
+ {
+ TypedArray<Node> nodes = p_base_scene->find_children("*", "AnimationPlayer");
+ while (nodes.size()) {
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(nodes.pop_back());
+ List<StringName> anims;
+ ap->get_animation_list(&anims);
+ for (const StringName &name : anims) {
+ Ref<Animation> anim = ap->get_animation(name);
+ int len = anim->get_track_count();
+ for (int i = 0; i < len; i++) {
+ if (anim->track_get_path(i).get_subname_count() != 1 || !(anim->track_get_type(i) == Animation::TYPE_POSITION_3D || anim->track_get_type(i) == Animation::TYPE_ROTATION_3D || anim->track_get_type(i) == Animation::TYPE_SCALE_3D)) {
+ continue;
+ }
+ String track_path = String(anim->track_get_path(i).get_concatenated_names());
+ Node *node = (ap->get_node(ap->get_root()))->get_node(NodePath(track_path));
+ if (node) {
+ Skeleton3D *track_skeleton = Object::cast_to<Skeleton3D>(node);
+ if (track_skeleton && track_skeleton == skeleton) {
+ StringName bn = p_rename_map[anim->track_get_path(i).get_subname(0)];
+ if (bn) {
+ anim->track_set_path(i, track_path + ":" + bn);
}
}
}
}
}
}
+ }
+
+ // Rename bones in all Nodes by calling method.
+ {
+ Vector<Variant> vargs;
+ vargs.push_back(p_base_scene);
+ vargs.push_back(skeleton);
+ Dictionary rename_map_dict;
+ for (HashMap<String, String>::Iterator E = p_rename_map.begin(); E; ++E) {
+ rename_map_dict[E->key] = E->value;
+ }
+ vargs.push_back(rename_map_dict);
+ const Variant **argptrs = (const Variant **)alloca(sizeof(const Variant **) * vargs.size());
+ const Variant *args = vargs.ptr();
+ uint32_t argcount = vargs.size();
+ for (uint32_t i = 0; i < argcount; i++) {
+ argptrs[i] = &args[i];
+ }
+
+ TypedArray<Node> nodes = p_base_scene->find_children("*");
+ while (nodes.size()) {
+ Node *nd = Object::cast_to<Node>(nodes.pop_back());
+ Callable::CallError ce;
+ nd->callp("_notify_skeleton_bones_renamed", argptrs, argcount, ce);
+ }
+ }
+}
+
+void PostImportPluginSkeletonRenamer::internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options) {
+ if (p_category == INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE) {
+ // Prepare objects.
+ Object *map = p_options["retarget/bone_map"].get_validated_object();
+ if (!map || !bool(p_options["retarget/bone_renamer/rename_bones"])) {
+ return;
+ }
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_node);
+ BoneMap *bone_map = Object::cast_to<BoneMap>(map);
+ int len = skeleton->get_bone_count();
+
+ // First, prepare main rename map.
+ HashMap<String, String> main_rename_map;
+ for (int i = 0; i < len; i++) {
+ String bone_name = skeleton->get_bone_name(i);
+ String target_name = bone_map->find_profile_bone_name(bone_name);
+ if (target_name.is_empty()) {
+ continue;
+ }
+ main_rename_map.insert(bone_name, target_name);
+ }
- // Rename bones in all Nodes by calling method.
+ // Preprocess of renaming bones to avoid to conflict with original bone name.
+ HashMap<String, String> pre_rename_map; // HashMap<skeleton bone name, target(profile) bone name>
{
- Vector<Variant> vargs;
- vargs.push_back(p_base_scene);
- vargs.push_back(skeleton);
- vargs.push_back(bone_map);
- const Variant **argptrs = (const Variant **)alloca(sizeof(const Variant **) * vargs.size());
- const Variant *args = vargs.ptr();
- uint32_t argcount = vargs.size();
- for (uint32_t i = 0; i < argcount; i++) {
- argptrs[i] = &args[i];
+ Vector<String> solved_name_stack;
+ for (int i = 0; i < len; i++) {
+ String bone_name = skeleton->get_bone_name(i);
+ String target_name = bone_map->find_profile_bone_name(bone_name);
+ if (target_name.is_empty() || bone_name == target_name || skeleton->find_bone(target_name) == -1) {
+ continue; // No conflicting.
+ }
+
+ // Solve conflicting.
+ Ref<SkeletonProfile> profile = bone_map->get_profile();
+ String solved_name = target_name;
+ for (int j = 2; skeleton->find_bone(solved_name) >= 0 || profile->find_bone(solved_name) >= 0 || solved_name_stack.has(solved_name); j++) {
+ solved_name = target_name + itos(j);
+ }
+ solved_name_stack.push_back(solved_name);
+ pre_rename_map.insert(target_name, solved_name);
}
+ _internal_process(p_category, p_base_scene, p_node, p_resource, p_options, pre_rename_map);
+ }
- TypedArray<Node> nodes = p_base_scene->find_children("*");
- while (nodes.size()) {
- Node *nd = Object::cast_to<Node>(nodes.pop_back());
- Callable::CallError ce;
- nd->callp("_notify_skeleton_bones_renamed", argptrs, argcount, ce);
+ // Main process of renaming bones.
+ {
+ // Apply pre-renaming result to prepared main rename map.
+ Vector<String> remove_queue;
+ for (HashMap<String, String>::Iterator E = main_rename_map.begin(); E; ++E) {
+ if (pre_rename_map.has(E->key)) {
+ remove_queue.push_back(E->key);
+ }
+ }
+ for (int i = 0; i < remove_queue.size(); i++) {
+ main_rename_map.insert(pre_rename_map[remove_queue[i]], main_rename_map[remove_queue[i]]);
+ main_rename_map.erase(remove_queue[i]);
}
+ _internal_process(p_category, p_base_scene, p_node, p_resource, p_options, main_rename_map);
}
// Make unique skeleton.
diff --git a/editor/import/post_import_plugin_skeleton_renamer.h b/editor/import/post_import_plugin_skeleton_renamer.h
index 73cbabd1c5..98f778f6c2 100644
--- a/editor/import/post_import_plugin_skeleton_renamer.h
+++ b/editor/import/post_import_plugin_skeleton_renamer.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* post_import_plugin_skeleton_renamer.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* post_import_plugin_skeleton_renamer.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 POST_IMPORT_PLUGIN_SKELETON_RENAMER_H
#define POST_IMPORT_PLUGIN_SKELETON_RENAMER_H
@@ -40,6 +40,8 @@ public:
virtual void get_internal_import_options(InternalImportCategory p_category, List<ResourceImporter::ImportOption> *r_options) override;
virtual void internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options) override;
+ void _internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref<Resource> p_resource, const Dictionary &p_options, HashMap<String, String> p_rename_map);
+
PostImportPluginSkeletonRenamer();
};
diff --git a/editor/import/post_import_plugin_skeleton_rest_fixer.cpp b/editor/import/post_import_plugin_skeleton_rest_fixer.cpp
index a5ef2e7f97..e105135c11 100644
--- a/editor/import/post_import_plugin_skeleton_rest_fixer.cpp
+++ b/editor/import/post_import_plugin_skeleton_rest_fixer.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* post_import_plugin_skeleton_rest_fixer.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* post_import_plugin_skeleton_rest_fixer.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 "post_import_plugin_skeleton_rest_fixer.h"
diff --git a/editor/import/post_import_plugin_skeleton_rest_fixer.h b/editor/import/post_import_plugin_skeleton_rest_fixer.h
index 11e9d08e88..c765169fd0 100644
--- a/editor/import/post_import_plugin_skeleton_rest_fixer.h
+++ b/editor/import/post_import_plugin_skeleton_rest_fixer.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* post_import_plugin_skeleton_rest_fixer.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* post_import_plugin_skeleton_rest_fixer.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 POST_IMPORT_PLUGIN_SKELETON_REST_FIXER_H
#define POST_IMPORT_PLUGIN_SKELETON_REST_FIXER_H
diff --git a/editor/import/post_import_plugin_skeleton_track_organizer.cpp b/editor/import/post_import_plugin_skeleton_track_organizer.cpp
index 01186f47fe..829d97dea7 100644
--- a/editor/import/post_import_plugin_skeleton_track_organizer.cpp
+++ b/editor/import/post_import_plugin_skeleton_track_organizer.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* post_import_plugin_skeleton_track_organizer.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* post_import_plugin_skeleton_track_organizer.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 "post_import_plugin_skeleton_track_organizer.h"
diff --git a/editor/import/post_import_plugin_skeleton_track_organizer.h b/editor/import/post_import_plugin_skeleton_track_organizer.h
index 1830861430..24a4f70aa9 100644
--- a/editor/import/post_import_plugin_skeleton_track_organizer.h
+++ b/editor/import/post_import_plugin_skeleton_track_organizer.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* post_import_plugin_skeleton_track_organizer.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* post_import_plugin_skeleton_track_organizer.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 POST_IMPORT_PLUGIN_SKELETON_TRACK_ORGANIZER_H
#define POST_IMPORT_PLUGIN_SKELETON_TRACK_ORGANIZER_H
diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp
index 577a4c32b3..e7b7850b02 100644
--- a/editor/import/resource_importer_bitmask.cpp
+++ b/editor/import/resource_importer_bitmask.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_bitmask.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_bitmask.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 "resource_importer_bitmask.h"
diff --git a/editor/import/resource_importer_bitmask.h b/editor/import/resource_importer_bitmask.h
index e791788d50..8963c8d918 100644
--- a/editor/import/resource_importer_bitmask.h
+++ b/editor/import/resource_importer_bitmask.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_bitmask.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_bitmask.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 RESOURCE_IMPORTER_BITMASK_H
#define RESOURCE_IMPORTER_BITMASK_H
diff --git a/editor/import/resource_importer_bmfont.cpp b/editor/import/resource_importer_bmfont.cpp
index 14b5638755..6ff497930e 100644
--- a/editor/import/resource_importer_bmfont.cpp
+++ b/editor/import/resource_importer_bmfont.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_bmfont.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_bmfont.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 "resource_importer_bmfont.h"
@@ -60,7 +60,7 @@ bool ResourceImporterBMFont::get_option_visibility(const String &p_path, const S
}
void ResourceImporterBMFont::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const {
- r_options->push_back(ImportOption(PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "Font")), Array()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, MAKE_RESOURCE_TYPE_HINT("Font")), Array()));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true));
}
@@ -76,6 +76,7 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String &
Error err = font->load_bitmap_font(p_source_file);
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot load font to file \"" + p_source_file + "\".");
+ font->set_allow_system_fallback(false);
font->set_fallbacks(fallbacks);
int flg = 0;
diff --git a/editor/import/resource_importer_bmfont.h b/editor/import/resource_importer_bmfont.h
index 0711302bd5..d31cd03736 100644
--- a/editor/import/resource_importer_bmfont.h
+++ b/editor/import/resource_importer_bmfont.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_bmfont.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_bmfont.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 RESOURCE_IMPORTER_BMFONT_H
#define RESOURCE_IMPORTER_BMFONT_H
diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp
index 8b429e74d1..5971f3b07f 100644
--- a/editor/import/resource_importer_csv_translation.cpp
+++ b/editor/import/resource_importer_csv_translation.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_csv_translation.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_csv_translation.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 "resource_importer_csv_translation.h"
diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h
index 2ed121c5e8..c6b05eb043 100644
--- a/editor/import/resource_importer_csv_translation.h
+++ b/editor/import/resource_importer_csv_translation.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_csv_translation.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_csv_translation.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 RESOURCE_IMPORTER_CSV_TRANSLATION_H
#define RESOURCE_IMPORTER_CSV_TRANSLATION_H
diff --git a/editor/import/resource_importer_dynamic_font.cpp b/editor/import/resource_importer_dynamic_font.cpp
index c822cd0fec..bb20d3b941 100644
--- a/editor/import/resource_importer_dynamic_font.cpp
+++ b/editor/import/resource_importer_dynamic_font.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_dynamic_font.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_dynamic_font.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 "resource_importer_dynamic_font.h"
@@ -76,6 +76,9 @@ bool ResourceImporterDynamicFont::get_option_visibility(const String &p_path, co
if (p_option == "msdf_size" && !bool(p_options["multichannel_signed_distance_field"])) {
return false;
}
+ if (p_option == "antialiasing" && bool(p_options["multichannel_signed_distance_field"])) {
+ return false;
+ }
if (p_option == "oversampling" && bool(p_options["multichannel_signed_distance_field"])) {
return false;
}
@@ -105,19 +108,20 @@ void ResourceImporterDynamicFont::get_import_options(const String &p_path, List<
r_options->push_back(ImportOption(PropertyInfo(Variant::NIL, "Rendering", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP), Variant()));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "antialiasing", PROPERTY_HINT_ENUM, "None,Grayscale,LCD sub-pixel"), 1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "antialiasing", PROPERTY_HINT_ENUM, "None,Grayscale,LCD Subpixel"), 1));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "generate_mipmaps"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "multichannel_signed_distance_field", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), (msdf) ? true : false));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "msdf_pixel_range", PROPERTY_HINT_RANGE, "1,100,1"), 8));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "msdf_size", PROPERTY_HINT_RANGE, "1,250,1"), 48));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "allow_system_fallback"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force_autohinter"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal"), 1));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One half of a pixel,One quarter of a pixel"), 1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One Half of a Pixel,One Quarter of a Pixel"), 1));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "oversampling", PROPERTY_HINT_RANGE, "0,10,0.1"), 0.0));
r_options->push_back(ImportOption(PropertyInfo(Variant::NIL, "Fallbacks", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP), Variant()));
- r_options->push_back(ImportOption(PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "Font")), Array()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, MAKE_RESOURCE_TYPE_HINT("Font")), Array()));
r_options->push_back(ImportOption(PropertyInfo(Variant::NIL, "Compress", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP), Variant()));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true));
@@ -147,13 +151,14 @@ Error ResourceImporterDynamicFont::import(const String &p_source_file, const Str
Dictionary ot_ov = p_options["opentype_features"];
bool autohinter = p_options["force_autohinter"];
+ bool allow_system_fallback = p_options["allow_system_fallback"];
int hinting = p_options["hinting"];
int subpixel_positioning = p_options["subpixel_positioning"];
real_t oversampling = p_options["oversampling"];
Array fallbacks = p_options["fallbacks"];
// Load base font data.
- Vector<uint8_t> data = FileAccess::get_file_as_array(p_source_file);
+ Vector<uint8_t> data = FileAccess::get_file_as_bytes(p_source_file);
// Create font.
Ref<FontFile> font;
@@ -167,6 +172,7 @@ Error ResourceImporterDynamicFont::import(const String &p_source_file, const Str
font->set_opentype_feature_overrides(ot_ov);
font->set_fixed_size(0);
font->set_force_autohinter(autohinter);
+ font->set_allow_system_fallback(allow_system_fallback);
font->set_subpixel_positioning((TextServer::SubpixelPositioning)subpixel_positioning);
font->set_hinting((TextServer::Hinting)hinting);
font->set_oversampling(oversampling);
diff --git a/editor/import/resource_importer_dynamic_font.h b/editor/import/resource_importer_dynamic_font.h
index a05c8bab05..de89e6b76f 100644
--- a/editor/import/resource_importer_dynamic_font.h
+++ b/editor/import/resource_importer_dynamic_font.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_dynamic_font.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_dynamic_font.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 RESOURCE_IMPORTER_DYNAMIC_FONT_H
#define RESOURCE_IMPORTER_DYNAMIC_FONT_H
diff --git a/editor/import/resource_importer_image.cpp b/editor/import/resource_importer_image.cpp
index fa7c4cd24f..4f6dd4e4ef 100644
--- a/editor/import/resource_importer_image.cpp
+++ b/editor/import/resource_importer_image.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_image.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_image.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 "resource_importer_image.h"
diff --git a/editor/import/resource_importer_image.h b/editor/import/resource_importer_image.h
index a1a345287e..1490ab30d5 100644
--- a/editor/import/resource_importer_image.h
+++ b/editor/import/resource_importer_image.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_image.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_image.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 RESOURCE_IMPORTER_IMAGE_H
#define RESOURCE_IMPORTER_IMAGE_H
diff --git a/editor/import/resource_importer_imagefont.cpp b/editor/import/resource_importer_imagefont.cpp
index 58c2061051..a3f595ddfc 100644
--- a/editor/import/resource_importer_imagefont.cpp
+++ b/editor/import/resource_importer_imagefont.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_imagefont.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_imagefont.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 "resource_importer_imagefont.h"
@@ -63,9 +63,10 @@ void ResourceImporterImageFont::get_import_options(const String &p_path, List<Im
r_options->push_back(ImportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "character_ranges"), Vector<String>()));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "columns"), 1));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "rows"), 1));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "font_size"), 14));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::RECT2I, "image_margin"), Rect2i()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::RECT2I, "character_margin"), Rect2i()));
- r_options->push_back(ImportOption(PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "Font")), Array()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, MAKE_RESOURCE_TYPE_HINT("Font")), Array()));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true));
}
@@ -93,33 +94,40 @@ Error ResourceImporterImageFont::import(const String &p_source_file, const Strin
int columns = p_options["columns"];
int rows = p_options["rows"];
- int base_size = p_options["font_size"];
Vector<String> ranges = p_options["character_ranges"];
Array fallbacks = p_options["fallbacks"];
+ Rect2i img_margin = p_options["image_margin"];
+ Rect2i char_margin = p_options["character_margin"];
+
+ Ref<Image> img;
+ img.instantiate();
+ Error err = ImageLoader::load_image(p_source_file, img);
+ ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_READ, TTR("Can't load font texture:") + " \"" + p_source_file + "\".");
+
+ int count = columns * rows;
+ int chr_cell_width = (img->get_width() - img_margin.position.x - img_margin.size.x) / columns;
+ int chr_cell_height = (img->get_height() - img_margin.position.y - img_margin.size.y) / rows;
+ ERR_FAIL_COND_V_MSG(chr_cell_width <= 0 || chr_cell_height <= 0, ERR_FILE_CANT_READ, TTR("Image margin too big."));
+
+ int chr_width = chr_cell_width - char_margin.position.x - char_margin.size.x;
+ int chr_height = chr_cell_height - char_margin.position.y - char_margin.size.y;
+ ERR_FAIL_COND_V_MSG(chr_width <= 0 || chr_height <= 0, ERR_FILE_CANT_READ, TTR("Character margin too bit."));
Ref<FontFile> font;
font.instantiate();
font->set_antialiasing(TextServer::FONT_ANTIALIASING_NONE);
font->set_generate_mipmaps(false);
font->set_multichannel_signed_distance_field(false);
- font->set_fixed_size(base_size);
+ font->set_fixed_size(chr_height);
font->set_subpixel_positioning(TextServer::SUBPIXEL_POSITIONING_DISABLED);
font->set_force_autohinter(false);
+ font->set_allow_system_fallback(false);
font->set_hinting(TextServer::HINTING_NONE);
font->set_oversampling(1.0f);
font->set_fallbacks(fallbacks);
+ font->set_texture_image(0, Vector2i(chr_height, 0), 0, img);
- Ref<Image> img;
- img.instantiate();
- Error err = ImageLoader::load_image(p_source_file, img);
- ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_READ, TTR("Can't load font texture:") + " \"" + p_source_file + "\".");
- font->set_texture_image(0, Vector2i(base_size, 0), 0, img);
-
- int count = columns * rows;
- int chr_width = img->get_width() / columns;
- int chr_height = img->get_height() / rows;
int pos = 0;
-
for (int i = 0; i < ranges.size(); i++) {
int32_t start, end;
Vector<String> tokens = ranges[i].split("-");
@@ -141,17 +149,17 @@ Error ResourceImporterImageFont::import(const String &p_source_file, const Strin
for (int32_t idx = start; idx <= end; idx++) {
int x = pos % columns;
int y = pos / columns;
- font->set_glyph_advance(0, base_size, idx, Vector2(chr_width, 0));
- font->set_glyph_offset(0, Vector2i(base_size, 0), idx, Vector2(0, -0.5 * chr_height));
- font->set_glyph_size(0, Vector2i(base_size, 0), idx, Vector2(chr_width, chr_height));
- font->set_glyph_uv_rect(0, Vector2i(base_size, 0), idx, Rect2(chr_width * x, chr_height * y, chr_width, chr_height));
- font->set_glyph_texture_idx(0, Vector2i(base_size, 0), idx, 0);
+ font->set_glyph_advance(0, chr_height, idx, Vector2(chr_width, 0));
+ font->set_glyph_offset(0, Vector2i(chr_height, 0), idx, Vector2(0, -0.5 * chr_height));
+ font->set_glyph_size(0, Vector2i(chr_height, 0), idx, Vector2(chr_width, chr_height));
+ font->set_glyph_uv_rect(0, Vector2i(chr_height, 0), idx, Rect2(img_margin.position.x + chr_cell_width * x + char_margin.position.x, img_margin.position.y + chr_cell_height * y + char_margin.position.y, chr_width, chr_height));
+ font->set_glyph_texture_idx(0, Vector2i(chr_height, 0), idx, 0);
pos++;
- ERR_FAIL_COND_V_MSG(pos >= count, ERR_CANT_CREATE, "Too many characters in range.");
+ ERR_FAIL_COND_V_MSG(pos >= count, ERR_CANT_CREATE, "Too many characters in range, should be " + itos(columns * rows));
}
}
- font->set_cache_ascent(0, base_size, 0.5 * chr_height);
- font->set_cache_descent(0, base_size, 0.5 * chr_height);
+ font->set_cache_ascent(0, chr_height, 0.5 * chr_height);
+ font->set_cache_descent(0, chr_height, 0.5 * chr_height);
int flg = 0;
if ((bool)p_options["compress"]) {
diff --git a/editor/import/resource_importer_imagefont.h b/editor/import/resource_importer_imagefont.h
index e163f873da..1f6d1bf778 100644
--- a/editor/import/resource_importer_imagefont.h
+++ b/editor/import/resource_importer_imagefont.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_imagefont.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_imagefont.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 RESOURCE_IMPORTER_IMAGEFONT_H
#define RESOURCE_IMPORTER_IMAGEFONT_H
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp
index ed83535421..bc4ced7ea2 100644
--- a/editor/import/resource_importer_layered_texture.cpp
+++ b/editor/import/resource_importer_layered_texture.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_layered_texture.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_layered_texture.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 "resource_importer_layered_texture.h"
@@ -135,7 +135,7 @@ 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 (PNG),Lossy (WebP),Video RAM (S3TC/ETC/BPTC),Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::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::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));
@@ -186,9 +186,7 @@ void ResourceImporterLayeredTexture::_save_tex(Vector<Ref<Image>> p_images, cons
int mm_d = MAX(1, d >> 1);
for (int i = 0; i < mm_d; i++) {
- Ref<Image> mm;
- mm.instantiate();
- mm->create(mm_w, mm_h, false, p_images[0]->get_format());
+ Ref<Image> mm = Image::create_empty(mm_w, mm_h, false, p_images[0]->get_format());
Vector3 pos;
pos.z = float(i) * float(d) / float(mm_d) + 0.5;
for (int x = 0; x < mm_w; x++) {
@@ -370,7 +368,7 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
for (int j = 0; j < hslices; j++) {
int x = slice_w * j;
int y = slice_h * i;
- Ref<Image> slice = image->get_rect(Rect2i(x, y, slice_w, slice_h));
+ Ref<Image> slice = image->get_region(Rect2i(x, y, slice_w, slice_h));
ERR_CONTINUE(slice.is_null() || slice->is_empty());
if (slice->get_width() != slice_w || slice->get_height() != slice_h) {
slice->resize(slice_w, slice_h);
@@ -396,12 +394,12 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
texture_import->used_channels = used_channels;
_check_compress_ctex(p_source_file, texture_import);
if (r_metadata) {
- Dictionary metadata;
- metadata["vram_texture"] = compress_mode == COMPRESS_VRAM_COMPRESSED;
+ Dictionary meta;
+ meta["vram_texture"] = compress_mode == COMPRESS_VRAM_COMPRESSED;
if (formats_imported.size()) {
- metadata["imported_formats"] = formats_imported;
+ meta["imported_formats"] = formats_imported;
}
- *r_metadata = metadata;
+ *r_metadata = meta;
}
return OK;
@@ -420,7 +418,7 @@ String ResourceImporterLayeredTexture::get_import_settings_string() const {
int index = 0;
while (compression_formats[index]) {
String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]);
- bool test = ProjectSettings::get_singleton()->get(setting_path);
+ bool test = GLOBAL_GET(setting_path);
if (test) {
s += String(compression_formats[index]);
}
@@ -432,27 +430,27 @@ String ResourceImporterLayeredTexture::get_import_settings_string() const {
bool ResourceImporterLayeredTexture::are_import_settings_valid(const String &p_path) const {
//will become invalid if formats are missing to import
- Dictionary metadata = ResourceFormatImporter::get_singleton()->get_resource_metadata(p_path);
+ Dictionary meta = ResourceFormatImporter::get_singleton()->get_resource_metadata(p_path);
- if (!metadata.has("vram_texture")) {
+ if (!meta.has("vram_texture")) {
return false;
}
- bool vram = metadata["vram_texture"];
+ bool vram = meta["vram_texture"];
if (!vram) {
return true; //do not care about non vram
}
Vector<String> formats_imported;
- if (metadata.has("imported_formats")) {
- formats_imported = metadata["imported_formats"];
+ if (meta.has("imported_formats")) {
+ formats_imported = meta["imported_formats"];
}
int index = 0;
bool valid = true;
while (compression_formats[index]) {
String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]);
- bool test = ProjectSettings::get_singleton()->get(setting_path);
+ bool test = GLOBAL_GET(setting_path);
if (test) {
if (!formats_imported.has(compression_formats[index])) {
valid = false;
@@ -486,7 +484,7 @@ 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 = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_bptc");
+ 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.
}
@@ -494,7 +492,7 @@ void ResourceImporterLayeredTexture::_check_compress_ctex(const String &p_source
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 = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_s3tc");
+ 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) {
@@ -532,7 +530,7 @@ void ResourceImporterLayeredTexture::_check_compress_ctex(const String &p_source
}
}
if (!(r_texture_import->used_channels == Image::USED_CHANNELS_LA || r_texture_import->used_channels == Image::USED_CHANNELS_RGBA)) {
- if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2")) {
+ 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");
diff --git a/editor/import/resource_importer_layered_texture.h b/editor/import/resource_importer_layered_texture.h
index e292390fb3..5118ad7ba4 100644
--- a/editor/import/resource_importer_layered_texture.h
+++ b/editor/import/resource_importer_layered_texture.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_layered_texture.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_layered_texture.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 RESOURCE_IMPORTER_LAYERED_TEXTURE_H
#define RESOURCE_IMPORTER_LAYERED_TEXTURE_H
diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp
index fe70fd58b5..3dd01754a3 100644
--- a/editor/import/resource_importer_obj.cpp
+++ b/editor/import/resource_importer_obj.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_obj.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_obj.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 "resource_importer_obj.h"
@@ -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 = "";
}
@@ -422,7 +461,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_
return OK;
}
-Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
+Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, List<String> *r_missing_deps, Error *r_err) {
List<Ref<Mesh>> meshes;
Error err = _parse_obj(p_path, meshes, false, p_flags & IMPORT_GENERATE_TANGENT_ARRAYS, false, Vector3(1, 1, 1), Vector3(0, 0, 0), r_missing_deps);
@@ -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_obj.h b/editor/import/resource_importer_obj.h
index 4dfac90fa1..faf0f336c0 100644
--- a/editor/import/resource_importer_obj.h
+++ b/editor/import/resource_importer_obj.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_obj.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_obj.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 RESOURCE_IMPORTER_OBJ_H
#define RESOURCE_IMPORTER_OBJ_H
@@ -39,7 +39,7 @@ class EditorOBJImporter : public EditorSceneFormatImporter {
public:
virtual uint32_t get_import_flags() const override;
virtual void get_extensions(List<String> *r_extensions) const override;
- virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override;
+ virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, List<String> *r_missing_deps, Error *r_err = nullptr) override;
EditorOBJImporter();
};
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 41061c3fc3..102fa903b8 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_scene.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_scene.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 "resource_importer_scene.h"
@@ -74,13 +74,13 @@ void EditorSceneFormatImporter::get_extensions(List<String> *r_extensions) const
ERR_FAIL();
}
-Node *EditorSceneFormatImporter::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
+Node *EditorSceneFormatImporter::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, List<String> *r_missing_deps, Error *r_err) {
Dictionary options_dict;
for (const KeyValue<StringName, Variant> &elem : p_options) {
options_dict[elem.key] = elem.value;
}
Object *ret = nullptr;
- if (GDVIRTUAL_CALL(_import_scene, p_path, p_flags, options_dict, p_bake_fps, ret)) {
+ if (GDVIRTUAL_CALL(_import_scene, p_path, p_flags, options_dict, ret)) {
return Object::cast_to<Node>(ret);
}
@@ -100,7 +100,7 @@ Variant EditorSceneFormatImporter::get_option_visibility(const String &p_path, b
void EditorSceneFormatImporter::_bind_methods() {
GDVIRTUAL_BIND(_get_import_flags);
GDVIRTUAL_BIND(_get_extensions);
- GDVIRTUAL_BIND(_import_scene, "path", "flags", "options", "bake_fps");
+ GDVIRTUAL_BIND(_import_scene, "path", "flags", "options");
GDVIRTUAL_BIND(_get_import_options, "path");
GDVIRTUAL_BIND(_get_option_visibility, "path", "for_animation", "option");
@@ -355,7 +355,7 @@ static void _pre_gen_shape_list(Ref<ImporterMesh> &mesh, Vector<Ref<Shape3D>> &r
ERR_FAIL_NULL_MSG(mesh, "Cannot generate shape list with null mesh value");
ERR_FAIL_NULL_MSG(mesh->get_mesh(), "Cannot generate shape list with null mesh value");
if (!p_convex) {
- Ref<Shape3D> shape = mesh->create_trimesh_shape();
+ Ref<ConcavePolygonShape3D> shape = mesh->create_trimesh_shape();
r_shape_list.push_back(shape);
} else {
Vector<Ref<Shape3D>> cd;
@@ -402,7 +402,7 @@ void _rescale_importer_mesh(Vector3 p_scale, Ref<ImporterMesh> p_mesh, bool is_s
const int fmt_compress_flags = p_mesh->get_surface_format(surf_idx);
Array arr = p_mesh->get_surface_arrays(surf_idx);
String name = p_mesh->get_surface_name(surf_idx);
- Dictionary lods = Dictionary();
+ Dictionary lods;
Ref<Material> mat = p_mesh->get_surface_material(surf_idx);
{
Vector<Vector3> vertex_array = arr[ArrayMesh::ARRAY_VERTEX];
@@ -953,43 +953,49 @@ Node *ResourceImporterScene::_pre_fix_animations(Node *p_node, Node *p_root, con
if (Object::cast_to<AnimationPlayer>(p_node)) {
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
+ List<StringName> anims;
+ ap->get_animation_list(&anims);
- Array animation_clips;
- {
- int clip_count = node_settings["clips/amount"];
+ for (const StringName &name : anims) {
+ Ref<Animation> anim = ap->get_animation(name);
+ Array animation_slices;
- for (int i = 0; i < clip_count; i++) {
- String name = node_settings["clip_" + itos(i + 1) + "/name"];
- int from_frame = node_settings["clip_" + itos(i + 1) + "/start_frame"];
- int end_frame = node_settings["clip_" + itos(i + 1) + "/end_frame"];
- Animation::LoopMode loop_mode = static_cast<Animation::LoopMode>((int)node_settings["clip_" + itos(i + 1) + "/loop_mode"]);
- bool save_to_file = node_settings["clip_" + itos(i + 1) + "/save_to_file/enabled"];
- bool save_to_path = node_settings["clip_" + itos(i + 1) + "/save_to_file/path"];
- bool save_to_file_keep_custom = node_settings["clip_" + itos(i + 1) + "/save_to_file/keep_custom_tracks"];
+ if (p_animation_data.has(name)) {
+ Dictionary anim_settings = p_animation_data[name];
+ int slices_count = anim_settings["slices/amount"];
+
+ for (int i = 0; i < slices_count; i++) {
+ String slice_name = anim_settings["slice_" + itos(i + 1) + "/name"];
+ int from_frame = anim_settings["slice_" + itos(i + 1) + "/start_frame"];
+ int end_frame = anim_settings["slice_" + itos(i + 1) + "/end_frame"];
+ Animation::LoopMode loop_mode = static_cast<Animation::LoopMode>((int)anim_settings["slice_" + itos(i + 1) + "/loop_mode"]);
+ bool save_to_file = anim_settings["slice_" + itos(i + 1) + "/save_to_file/enabled"];
+ bool save_to_path = anim_settings["slice_" + itos(i + 1) + "/save_to_file/path"];
+ bool save_to_file_keep_custom = anim_settings["slice_" + itos(i + 1) + "/save_to_file/keep_custom_tracks"];
+
+ animation_slices.push_back(slice_name);
+ animation_slices.push_back(from_frame / p_animation_fps);
+ animation_slices.push_back(end_frame / p_animation_fps);
+ animation_slices.push_back(loop_mode);
+ animation_slices.push_back(save_to_file);
+ animation_slices.push_back(save_to_path);
+ animation_slices.push_back(save_to_file_keep_custom);
+ }
+ }
- animation_clips.push_back(name);
- animation_clips.push_back(from_frame / p_animation_fps);
- animation_clips.push_back(end_frame / p_animation_fps);
- animation_clips.push_back(loop_mode);
- animation_clips.push_back(save_to_file);
- animation_clips.push_back(save_to_path);
- animation_clips.push_back(save_to_file_keep_custom);
+ if (animation_slices.size() > 0) {
+ _create_slices(ap, anim, animation_slices, true);
}
}
- if (animation_clips.size()) {
- _create_clips(ap, animation_clips, true);
- } else {
- List<StringName> anims;
- ap->get_animation_list(&anims);
- AnimationImportTracks import_tracks_mode[TRACK_CHANNEL_MAX] = {
- AnimationImportTracks(int(node_settings["import_tracks/position"])),
- AnimationImportTracks(int(node_settings["import_tracks/rotation"])),
- AnimationImportTracks(int(node_settings["import_tracks/scale"]))
- };
- if (anims.size() > 1 && (import_tracks_mode[0] != ANIMATION_IMPORT_TRACKS_IF_PRESENT || import_tracks_mode[1] != ANIMATION_IMPORT_TRACKS_IF_PRESENT || import_tracks_mode[2] != ANIMATION_IMPORT_TRACKS_IF_PRESENT)) {
- _optimize_track_usage(ap, import_tracks_mode);
- }
+ AnimationImportTracks import_tracks_mode[TRACK_CHANNEL_MAX] = {
+ AnimationImportTracks(int(node_settings["import_tracks/position"])),
+ AnimationImportTracks(int(node_settings["import_tracks/rotation"])),
+ AnimationImportTracks(int(node_settings["import_tracks/scale"]))
+ };
+
+ if (anims.size() > 1 && (import_tracks_mode[0] != ANIMATION_IMPORT_TRACKS_IF_PRESENT || import_tracks_mode[1] != ANIMATION_IMPORT_TRACKS_IF_PRESENT || import_tracks_mode[2] != ANIMATION_IMPORT_TRACKS_IF_PRESENT)) {
+ _optimize_track_usage(ap, import_tracks_mode);
}
}
@@ -1270,14 +1276,12 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
} break;
}
- int idx = 0;
for (const Ref<Shape3D> &E : shapes) {
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(E);
base->add_child(cshape, true);
cshape->set_owner(base->get_owner());
- idx++;
}
}
}
@@ -1367,7 +1371,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
}
for (int i = 0; i < post_importer_plugins.size(); i++) {
- post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_ANIMATION, p_root, p_node, anim, node_settings);
+ post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_ANIMATION, p_root, p_node, anim, anim_settings);
}
}
}
@@ -1408,144 +1412,138 @@ Ref<Animation> ResourceImporterScene::_save_animation_to_file(Ref<Animation> ani
return anim;
}
-void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_clips, bool p_bake_all) {
- if (!anim->has_animation("default")) {
- ERR_FAIL_COND_MSG(p_clips.size() > 0, "To create clips, animations must be named \"default\".");
- return;
- }
+void ResourceImporterScene::_create_slices(AnimationPlayer *ap, Ref<Animation> anim, const Array &p_slices, bool p_bake_all) {
+ Ref<AnimationLibrary> al = ap->get_animation_library(ap->find_animation_library(anim));
- Ref<Animation> default_anim = anim->get_animation("default");
- Ref<AnimationLibrary> al = anim->get_animation_library(anim->find_animation(default_anim));
-
- for (int i = 0; i < p_clips.size(); i += 7) {
- String name = p_clips[i];
- float from = p_clips[i + 1];
- float to = p_clips[i + 2];
- Animation::LoopMode loop_mode = static_cast<Animation::LoopMode>((int)p_clips[i + 3]);
- bool save_to_file = p_clips[i + 4];
- String save_to_path = p_clips[i + 5];
- bool keep_current = p_clips[i + 6];
+ for (int i = 0; i < p_slices.size(); i += 7) {
+ String name = p_slices[i];
+ float from = p_slices[i + 1];
+ float to = p_slices[i + 2];
+ Animation::LoopMode loop_mode = static_cast<Animation::LoopMode>((int)p_slices[i + 3]);
+ bool save_to_file = p_slices[i + 4];
+ String save_to_path = p_slices[i + 5];
+ bool keep_current = p_slices[i + 6];
if (from >= to) {
continue;
}
Ref<Animation> new_anim = memnew(Animation);
- for (int j = 0; j < default_anim->get_track_count(); j++) {
+ for (int j = 0; j < anim->get_track_count(); j++) {
List<float> keys;
- int kc = default_anim->track_get_key_count(j);
+ int kc = anim->track_get_key_count(j);
int dtrack = -1;
for (int k = 0; k < kc; k++) {
- float kt = default_anim->track_get_key_time(j, k);
+ float kt = anim->track_get_key_time(j, k);
if (kt >= from && kt < to) {
//found a key within range, so create track
if (dtrack == -1) {
- new_anim->add_track(default_anim->track_get_type(j));
+ new_anim->add_track(anim->track_get_type(j));
dtrack = new_anim->get_track_count() - 1;
- new_anim->track_set_path(dtrack, default_anim->track_get_path(j));
+ new_anim->track_set_path(dtrack, anim->track_get_path(j));
if (kt > (from + 0.01) && k > 0) {
- if (default_anim->track_get_type(j) == Animation::TYPE_POSITION_3D) {
+ if (anim->track_get_type(j) == Animation::TYPE_POSITION_3D) {
Vector3 p;
- default_anim->position_track_interpolate(j, from, &p);
+ anim->position_track_interpolate(j, from, &p);
new_anim->position_track_insert_key(dtrack, 0, p);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) {
Quaternion r;
- default_anim->rotation_track_interpolate(j, from, &r);
+ anim->rotation_track_interpolate(j, from, &r);
new_anim->rotation_track_insert_key(dtrack, 0, r);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_SCALE_3D) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_SCALE_3D) {
Vector3 s;
- default_anim->scale_track_interpolate(j, from, &s);
+ anim->scale_track_interpolate(j, from, &s);
new_anim->scale_track_insert_key(dtrack, 0, s);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) {
- Variant var = default_anim->value_track_interpolate(j, from);
+ } else if (anim->track_get_type(j) == Animation::TYPE_VALUE) {
+ Variant var = anim->value_track_interpolate(j, from);
new_anim->track_insert_key(dtrack, 0, var);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) {
float interp;
- default_anim->blend_shape_track_interpolate(j, from, &interp);
+ anim->blend_shape_track_interpolate(j, from, &interp);
new_anim->blend_shape_track_insert_key(dtrack, 0, interp);
}
}
}
- if (default_anim->track_get_type(j) == Animation::TYPE_POSITION_3D) {
+ if (anim->track_get_type(j) == Animation::TYPE_POSITION_3D) {
Vector3 p;
- default_anim->position_track_get_key(j, k, &p);
+ anim->position_track_get_key(j, k, &p);
new_anim->position_track_insert_key(dtrack, kt - from, p);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) {
Quaternion r;
- default_anim->rotation_track_get_key(j, k, &r);
+ anim->rotation_track_get_key(j, k, &r);
new_anim->rotation_track_insert_key(dtrack, kt - from, r);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_SCALE_3D) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_SCALE_3D) {
Vector3 s;
- default_anim->scale_track_get_key(j, k, &s);
+ anim->scale_track_get_key(j, k, &s);
new_anim->scale_track_insert_key(dtrack, kt - from, s);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) {
- Variant var = default_anim->track_get_key_value(j, k);
+ } else if (anim->track_get_type(j) == Animation::TYPE_VALUE) {
+ Variant var = anim->track_get_key_value(j, k);
new_anim->track_insert_key(dtrack, kt - from, var);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) {
float interp;
- default_anim->blend_shape_track_get_key(j, k, &interp);
+ anim->blend_shape_track_get_key(j, k, &interp);
new_anim->blend_shape_track_insert_key(dtrack, kt - from, interp);
}
}
if (dtrack != -1 && kt >= to) {
- if (default_anim->track_get_type(j) == Animation::TYPE_POSITION_3D) {
+ if (anim->track_get_type(j) == Animation::TYPE_POSITION_3D) {
Vector3 p;
- default_anim->position_track_interpolate(j, to, &p);
+ anim->position_track_interpolate(j, to, &p);
new_anim->position_track_insert_key(dtrack, to - from, p);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) {
Quaternion r;
- default_anim->rotation_track_interpolate(j, to, &r);
+ anim->rotation_track_interpolate(j, to, &r);
new_anim->rotation_track_insert_key(dtrack, to - from, r);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_SCALE_3D) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_SCALE_3D) {
Vector3 s;
- default_anim->scale_track_interpolate(j, to, &s);
+ anim->scale_track_interpolate(j, to, &s);
new_anim->scale_track_insert_key(dtrack, to - from, s);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) {
- Variant var = default_anim->value_track_interpolate(j, to);
+ } else if (anim->track_get_type(j) == Animation::TYPE_VALUE) {
+ Variant var = anim->value_track_interpolate(j, to);
new_anim->track_insert_key(dtrack, to - from, var);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) {
float interp;
- default_anim->blend_shape_track_interpolate(j, to, &interp);
+ anim->blend_shape_track_interpolate(j, to, &interp);
new_anim->blend_shape_track_insert_key(dtrack, to - from, interp);
}
}
}
if (dtrack == -1 && p_bake_all) {
- new_anim->add_track(default_anim->track_get_type(j));
+ new_anim->add_track(anim->track_get_type(j));
dtrack = new_anim->get_track_count() - 1;
- new_anim->track_set_path(dtrack, default_anim->track_get_path(j));
- if (default_anim->track_get_type(j) == Animation::TYPE_POSITION_3D) {
+ new_anim->track_set_path(dtrack, anim->track_get_path(j));
+ if (anim->track_get_type(j) == Animation::TYPE_POSITION_3D) {
Vector3 p;
- default_anim->position_track_interpolate(j, from, &p);
+ anim->position_track_interpolate(j, from, &p);
new_anim->position_track_insert_key(dtrack, 0, p);
- default_anim->position_track_interpolate(j, to, &p);
+ anim->position_track_interpolate(j, to, &p);
new_anim->position_track_insert_key(dtrack, to - from, p);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_ROTATION_3D) {
Quaternion r;
- default_anim->rotation_track_interpolate(j, from, &r);
+ anim->rotation_track_interpolate(j, from, &r);
new_anim->rotation_track_insert_key(dtrack, 0, r);
- default_anim->rotation_track_interpolate(j, to, &r);
+ anim->rotation_track_interpolate(j, to, &r);
new_anim->rotation_track_insert_key(dtrack, to - from, r);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_SCALE_3D) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_SCALE_3D) {
Vector3 s;
- default_anim->scale_track_interpolate(j, from, &s);
+ anim->scale_track_interpolate(j, from, &s);
new_anim->scale_track_insert_key(dtrack, 0, s);
- default_anim->scale_track_interpolate(j, to, &s);
+ anim->scale_track_interpolate(j, to, &s);
new_anim->scale_track_insert_key(dtrack, to - from, s);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_VALUE) {
- Variant var = default_anim->value_track_interpolate(j, from);
+ } else if (anim->track_get_type(j) == Animation::TYPE_VALUE) {
+ Variant var = anim->value_track_interpolate(j, from);
new_anim->track_insert_key(dtrack, 0, var);
- Variant to_var = default_anim->value_track_interpolate(j, to);
+ Variant to_var = anim->value_track_interpolate(j, to);
new_anim->track_insert_key(dtrack, to - from, to_var);
- } else if (default_anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) {
+ } else if (anim->track_get_type(j) == Animation::TYPE_BLEND_SHAPE) {
float interp;
- default_anim->blend_shape_track_interpolate(j, from, &interp);
+ anim->blend_shape_track_interpolate(j, from, &interp);
new_anim->blend_shape_track_insert_key(dtrack, 0, interp);
- default_anim->blend_shape_track_interpolate(j, to, &interp);
+ anim->blend_shape_track_interpolate(j, to, &interp);
new_anim->blend_shape_track_insert_key(dtrack, to - from, interp);
}
}
@@ -1562,7 +1560,7 @@ void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_
}
}
- al->remove_animation("default"); // Remove default (no longer needed).
+ al->remove_animation(ap->find_animation(anim)); // Remove original animation (no longer needed).
}
void ResourceImporterScene::_optimize_animations(AnimationPlayer *anim, float p_max_vel_error, float p_max_ang_error, int p_prc_error) {
@@ -1642,6 +1640,17 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "save_to_file/path", PROPERTY_HINT_SAVE_FILE, "*.res,*.tres"), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/keep_custom_tracks"), ""));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slices/amount", PROPERTY_HINT_RANGE, "0,256,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
+
+ for (int i = 0; i < 256; i++) {
+ r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/name"), ""));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/start_frame"), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/end_frame"), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/loop_mode", PROPERTY_HINT_ENUM, "None,Linear,Pingpong"), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/save_to_file/path", PROPERTY_HINT_SAVE_FILE, ".res,*.tres"), ""));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/save_to_file/keep_custom_tracks"), false));
+ }
} break;
case INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE: {
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "import/skip_import", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
@@ -1654,17 +1663,6 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "import_tracks/position", PROPERTY_HINT_ENUM, "IfPresent,IfPresentForAll,Never"), 1));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "import_tracks/rotation", PROPERTY_HINT_ENUM, "IfPresent,IfPresentForAll,Never"), 1));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "import_tracks/scale", PROPERTY_HINT_ENUM, "IfPresent,IfPresentForAll,Never"), 1));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slices/amount", PROPERTY_HINT_RANGE, "0,256,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
-
- for (int i = 0; i < 256; i++) {
- r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/name"), ""));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/start_frame"), 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/end_frame"), 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/loop_mode", PROPERTY_HINT_ENUM, "None,Linear,Pingpong"), 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
- r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/save_to_file/path", PROPERTY_HINT_SAVE_FILE, ".res,*.tres"), ""));
- r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/save_to_file/keep_custom_tracks"), false));
- }
} break;
case INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE: {
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "import/skip_import", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
@@ -1767,6 +1765,13 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor
if (p_option == "save_to_file/path" || p_option == "save_to_file/keep_custom_tracks") {
return p_options["save_to_file/enabled"];
}
+ if (p_option.begins_with("slice_")) {
+ int max_slice = p_options["slices/amount"];
+ int slice = p_option.get_slice("_", 1).to_int() - 1;
+ if (slice >= max_slice) {
+ return false;
+ }
+ }
} break;
case INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE: {
if (p_option.begins_with("optimizer/") && p_option != "optimizer/enabled" && !bool(p_options["optimizer/enabled"])) {
@@ -1775,14 +1780,6 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor
if (p_option.begins_with("compression/") && p_option != "compression/enabled" && !bool(p_options["compression/enabled"])) {
return false;
}
-
- if (p_option.begins_with("slice_")) {
- int max_slice = p_options["slices/amount"];
- int slice = p_option.get_slice("_", 1).to_int() - 1;
- if (slice >= max_slice) {
- return false;
- }
- }
} break;
case INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE: {
const bool use_retarget = p_options["retarget/bone_map"].get_validated_object() != nullptr;
@@ -1867,6 +1864,7 @@ void ResourceImporterScene::get_import_options(const String &p_path, List<Import
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "skins/use_named_skins"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 30));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/trimming"), false));
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()));
@@ -1891,6 +1889,39 @@ void ResourceImporterScene::_replace_owner(Node *p_node, Node *p_scene, Node *p_
}
}
+Array ResourceImporterScene::_get_skinned_pose_transforms(ImporterMeshInstance3D *p_src_mesh_node) {
+ Array skin_pose_transform_array;
+
+ const Ref<Skin> skin = p_src_mesh_node->get_skin();
+ if (skin.is_valid()) {
+ NodePath skeleton_path = p_src_mesh_node->get_skeleton_path();
+ const Node *node = p_src_mesh_node->get_node_or_null(skeleton_path);
+ const Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(node);
+ if (skeleton) {
+ int bind_count = skin->get_bind_count();
+
+ for (int i = 0; i < bind_count; i++) {
+ Transform3D bind_pose = skin->get_bind_pose(i);
+ String bind_name = skin->get_bind_name(i);
+
+ int bone_idx = bind_name.is_empty() ? skin->get_bind_bone(i) : skeleton->find_bone(bind_name);
+ ERR_FAIL_COND_V(bone_idx >= skeleton->get_bone_count(), Array());
+
+ Transform3D bp_global_rest;
+ if (bone_idx >= 0) {
+ bp_global_rest = skeleton->get_bone_global_pose(bone_idx);
+ } else {
+ bp_global_rest = skeleton->get_bone_global_pose(i);
+ }
+
+ skin_pose_transform_array.push_back(bp_global_rest * bind_pose);
+ }
+ }
+ }
+
+ return skin_pose_transform_array;
+}
+
void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_mesh_data, bool p_generate_lods, bool p_create_shadow_meshes, LightBakeMode p_light_bake_mode, float p_lightmap_texel_size, const Vector<uint8_t> &p_src_lightmap_cache, Vector<Vector<uint8_t>> &r_lightmap_caches) {
ImporterMeshInstance3D *src_mesh_node = Object::cast_to<ImporterMeshInstance3D>(p_node);
if (src_mesh_node) {
@@ -2007,7 +2038,8 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_m
}
if (generate_lods) {
- src_mesh_node->get_mesh()->generate_lods(merge_angle, split_angle);
+ Array skin_pose_transform_array = _get_skinned_pose_transforms(src_mesh_node);
+ src_mesh_node->get_mesh()->generate_lods(merge_angle, split_angle, skin_pose_transform_array);
}
if (create_shadow_meshes) {
@@ -2250,13 +2282,8 @@ Node *ResourceImporterScene::pre_import(const String &p_source_file, const HashM
ERR_FAIL_COND_V(!importer.is_valid(), nullptr);
- int bake_fps = 30;
- if (p_options.has(SNAME("animation/fps"))) {
- bake_fps = p_options[SNAME("animation/fps")];
- }
-
Error err = OK;
- Node *scene = importer->import_scene(p_source_file, EditorSceneFormatImporter::IMPORT_ANIMATION | EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS, p_options, bake_fps, nullptr, &err);
+ Node *scene = importer->import_scene(p_source_file, EditorSceneFormatImporter::IMPORT_ANIMATION | EditorSceneFormatImporter::IMPORT_GENERATE_TANGENT_ARRAYS, p_options, nullptr, &err);
if (!scene || err != OK) {
return nullptr;
}
@@ -2295,8 +2322,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
ERR_FAIL_COND_V(!importer.is_valid(), ERR_FILE_UNRECOGNIZED);
- float fps = p_options["animation/fps"];
-
int import_flags = 0;
if (animation_importer) {
@@ -2319,7 +2344,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
Error err = OK;
List<String> missing_deps; // for now, not much will be done with this
- Node *scene = importer->import_scene(src_path, import_flags, p_options, fps, &missing_deps, &err);
+ Node *scene = importer->import_scene(src_path, import_flags, p_options, &missing_deps, &err);
if (!scene || err != OK) {
return err;
}
@@ -2367,6 +2392,10 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
post_importer_plugins.write[i]->pre_process(scene, p_options);
}
+ float fps = 30;
+ if (p_options.has(SNAME("animation/fps"))) {
+ 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_animations(scene, scene, node_data, animation_data, fps);
@@ -2419,7 +2448,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
Vector<Vector<uint8_t>> mesh_lightmap_caches;
{
- src_lightmap_cache = FileAccess::get_file_as_array(p_source_file + ".unwrap_cache", &err);
+ src_lightmap_cache = FileAccess::get_file_as_bytes(p_source_file + ".unwrap_cache", &err);
if (err != OK) {
src_lightmap_cache.clear();
}
@@ -2581,7 +2610,7 @@ void EditorSceneFormatImporterESCN::get_extensions(List<String> *r_extensions) c
r_extensions->push_back("escn");
}
-Node *EditorSceneFormatImporterESCN::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
+Node *EditorSceneFormatImporterESCN::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, List<String> *r_missing_deps, Error *r_err) {
Error error;
Ref<PackedScene> ps = ResourceFormatLoaderText::singleton->load(p_path, p_path, &error);
ERR_FAIL_COND_V_MSG(!ps.is_valid(), nullptr, "Cannot load scene as text resource from path '" + p_path + "'.");
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index da37893cc5..2d08d4df50 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_scene.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_scene.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 RESOURCE_IMPORTER_SCENE_H
#define RESOURCE_IMPORTER_SCENE_H
@@ -34,11 +34,14 @@
#include "core/error/error_macros.h"
#include "core/io/resource_importer.h"
#include "core/variant/dictionary.h"
-#include "scene/3d/node_3d.h"
+#include "scene/3d/importer_mesh_instance_3d.h"
#include "scene/resources/animation.h"
+#include "scene/resources/box_shape_3d.h"
+#include "scene/resources/capsule_shape_3d.h"
+#include "scene/resources/cylinder_shape_3d.h"
#include "scene/resources/mesh.h"
#include "scene/resources/shape_3d.h"
-#include "scene/resources/skin.h"
+#include "scene/resources/sphere_shape_3d.h"
class Material;
class AnimationPlayer;
@@ -50,12 +53,12 @@ class EditorSceneFormatImporter : public RefCounted {
protected:
static void _bind_methods();
- Node *import_scene_wrapper(const String &p_path, uint32_t p_flags, Dictionary p_options, int p_bake_fps);
- Ref<Animation> import_animation_wrapper(const String &p_path, uint32_t p_flags, Dictionary p_options, int p_bake_fps);
+ 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(Vector<String>, _get_extensions)
- GDVIRTUAL4R(Object *, _import_scene, String, uint32_t, Dictionary, uint32_t)
+ GDVIRTUAL3R(Object *, _import_scene, String, uint32_t, Dictionary)
GDVIRTUAL1(_get_import_options, String)
GDVIRTUAL3RC(Variant, _get_option_visibility, String, bool, String)
@@ -71,7 +74,7 @@ public:
virtual uint32_t get_import_flags() const;
virtual void get_extensions(List<String> *r_extensions) const;
- virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr);
+ virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, List<String> *r_missing_deps, Error *r_err = nullptr);
virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options);
virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options);
@@ -208,6 +211,7 @@ class ResourceImporterScene : public ResourceImporter {
SHAPE_TYPE_CAPSULE,
};
+ Array _get_skinned_pose_transforms(ImporterMeshInstance3D *p_src_mesh_node);
void _replace_owner(Node *p_node, Node *p_scene, Node *p_new_owner);
void _generate_meshes(Node *p_node, const Dictionary &p_mesh_data, bool p_generate_lods, bool p_create_shadow_meshes, LightBakeMode p_light_bake_mode, float p_lightmap_texel_size, const Vector<uint8_t> &p_src_lightmap_cache, Vector<Vector<uint8_t>> &r_lightmap_caches);
void _add_shapes(Node *p_node, const Vector<Ref<Shape3D>> &p_shapes);
@@ -279,7 +283,7 @@ public:
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);
- void _create_clips(AnimationPlayer *anim, const Array &p_clips, bool p_bake_all);
+ void _create_slices(AnimationPlayer *ap, Ref<Animation> anim, const Array &p_clips, bool p_bake_all);
void _optimize_animations(AnimationPlayer *anim, float p_max_vel_error, float p_max_ang_error, int p_prc_error);
void _compress_animations(AnimationPlayer *anim, int p_page_size_kb);
@@ -306,14 +310,9 @@ class EditorSceneFormatImporterESCN : public EditorSceneFormatImporter {
public:
virtual uint32_t get_import_flags() const override;
virtual void get_extensions(List<String> *r_extensions) const override;
- virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override;
+ virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, List<String> *r_missing_deps, Error *r_err = nullptr) override;
};
-#include "scene/resources/box_shape_3d.h"
-#include "scene/resources/capsule_shape_3d.h"
-#include "scene/resources/cylinder_shape_3d.h"
-#include "scene/resources/sphere_shape_3d.h"
-
template <class M>
Vector<Ref<Shape3D>> ResourceImporterScene::get_collision_shapes(const Ref<Mesh> &p_mesh, const M &p_options) {
ShapeType generate_shape_type = SHAPE_TYPE_DECOMPOSE_CONVEX;
@@ -475,7 +474,7 @@ Transform3D ResourceImporterScene::get_collision_shapes_transform(const M &p_opt
}
if (p_options.has(SNAME("primitive/rotation"))) {
- transform.basis.set_euler((p_options[SNAME("primitive/rotation")].operator Vector3() / 180.0) * Math_PI);
+ transform.basis = Basis::from_euler(p_options[SNAME("primitive/rotation")].operator Vector3() * (Math_PI / 180.0));
}
}
return transform;
diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp
index 55afd71c76..ba48fc9029 100644
--- a/editor/import/resource_importer_shader_file.cpp
+++ b/editor/import/resource_importer_shader_file.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_shader_file.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_shader_file.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 "resource_importer_shader_file.h"
@@ -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_shader_file.h b/editor/import/resource_importer_shader_file.h
index 9d0ef88b05..aefc967989 100644
--- a/editor/import/resource_importer_shader_file.h
+++ b/editor/import/resource_importer_shader_file.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_shader_file.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_shader_file.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 RESOURCE_IMPORTER_SHADER_FILE_H
#define RESOURCE_IMPORTER_SHADER_FILE_H
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index c06756ff0b..2f543ea02d 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_texture.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_texture.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 "resource_importer_texture.h"
@@ -192,7 +192,7 @@ bool ResourceImporterTexture::get_option_visibility(const String &p_path, const
if (compress_mode < COMPRESS_VRAM_COMPRESSED) {
return false;
}
- if (!ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_bptc")) {
+ if (!GLOBAL_GET("rendering/textures/vram_compression/import_bptc")) {
return false;
}
}
@@ -233,7 +233,8 @@ void ResourceImporterTexture::get_import_options(const String &p_path, List<Impo
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "process/size_limit", PROPERTY_HINT_RANGE, "0,4096,1"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "detect_3d/compress_to", PROPERTY_HINT_ENUM, "Disabled,VRAM Compressed,Basis Universal"), (p_preset == PRESET_DETECT) ? 1 : 0));
- if (p_path.get_extension() == "svg") {
+ // Do path based customization only if a path was passed.
+ if (p_path.is_empty() || p_path.get_extension() == "svg") {
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0));
// Editor use only, applies to SVG.
@@ -245,7 +246,7 @@ void ResourceImporterTexture::get_import_options(const String &p_path, List<Impo
void ResourceImporterTexture::save_to_ctex_format(Ref<FileAccess> f, const Ref<Image> &p_image, CompressMode p_compress_mode, Image::UsedChannels p_channels, Image::CompressMode p_compress_format, float p_lossy_quality) {
switch (p_compress_mode) {
case COMPRESS_LOSSLESS: {
- bool lossless_force_png = ProjectSettings::get_singleton()->get("rendering/textures/lossless_compression/force_png") ||
+ bool lossless_force_png = GLOBAL_GET("rendering/textures/lossless_compression/force_png") ||
!Image::_webp_mem_loader_func; // WebP module disabled.
bool use_webp = !lossless_force_png && p_image->get_width() <= 16383 && p_image->get_height() <= 16383; // WebP has a size limit
f->store_32(use_webp ? CompressedTexture2D::DATA_FORMAT_WEBP : CompressedTexture2D::DATA_FORMAT_PNG);
@@ -598,8 +599,8 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
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 = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_bptc");
- const bool can_s3tc = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_s3tc");
+ const bool can_bptc = GLOBAL_GET("rendering/textures/vram_compression/import_bptc");
+ const bool can_s3tc = GLOBAL_GET("rendering/textures/vram_compression/import_s3tc");
if (can_bptc) {
// Add to the list anyway.
@@ -644,13 +645,13 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
formats_imported.push_back("s3tc");
}
- if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2")) {
+ 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 (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc")) {
+ 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");
@@ -669,23 +670,23 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
}
if (r_metadata) {
- Dictionary metadata;
- metadata["vram_texture"] = compress_mode == COMPRESS_VRAM_COMPRESSED;
+ Dictionary meta;
+ meta["vram_texture"] = compress_mode == COMPRESS_VRAM_COMPRESSED;
if (formats_imported.size()) {
- metadata["imported_formats"] = formats_imported;
+ meta["imported_formats"] = formats_imported;
}
if (editor_image.is_valid()) {
- metadata["has_editor_variant"] = true;
+ meta["has_editor_variant"] = true;
if (use_editor_scale) {
- metadata["editor_scale"] = EDSCALE;
+ meta["editor_scale"] = EDSCALE;
}
if (convert_editor_colors) {
- metadata["editor_dark_theme"] = EditorSettings::get_singleton()->is_dark_theme();
+ meta["editor_dark_theme"] = EditorSettings::get_singleton()->is_dark_theme();
}
}
- *r_metadata = metadata;
+ *r_metadata = meta;
}
return OK;
}
@@ -703,7 +704,7 @@ String ResourceImporterTexture::get_import_settings_string() const {
int index = 0;
while (compression_formats[index]) {
String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]);
- bool test = ProjectSettings::get_singleton()->get(setting_path);
+ bool test = GLOBAL_GET(setting_path);
if (test) {
s += String(compression_formats[index]);
}
@@ -715,36 +716,36 @@ String ResourceImporterTexture::get_import_settings_string() const {
bool ResourceImporterTexture::are_import_settings_valid(const String &p_path) const {
//will become invalid if formats are missing to import
- Dictionary metadata = ResourceFormatImporter::get_singleton()->get_resource_metadata(p_path);
+ Dictionary meta = ResourceFormatImporter::get_singleton()->get_resource_metadata(p_path);
- if (metadata.has("has_editor_variant")) {
- if (metadata.has("editor_scale") && (float)metadata["editor_scale"] != EDSCALE) {
+ if (meta.has("has_editor_variant")) {
+ if (meta.has("editor_scale") && (float)meta["editor_scale"] != EDSCALE) {
return false;
}
- if (metadata.has("editor_dark_theme") && (bool)metadata["editor_dark_theme"] != EditorSettings::get_singleton()->is_dark_theme()) {
+ if (meta.has("editor_dark_theme") && (bool)meta["editor_dark_theme"] != EditorSettings::get_singleton()->is_dark_theme()) {
return false;
}
}
- if (!metadata.has("vram_texture")) {
+ if (!meta.has("vram_texture")) {
return false;
}
- bool vram = metadata["vram_texture"];
+ bool vram = meta["vram_texture"];
if (!vram) {
return true; // Do not care about non-VRAM.
}
Vector<String> formats_imported;
- if (metadata.has("imported_formats")) {
- formats_imported = metadata["imported_formats"];
+ if (meta.has("imported_formats")) {
+ formats_imported = meta["imported_formats"];
}
int index = 0;
bool valid = true;
while (compression_formats[index]) {
String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]);
- bool test = ProjectSettings::get_singleton()->get(setting_path);
+ bool test = GLOBAL_GET(setting_path);
if (test) {
if (!formats_imported.has(compression_formats[index])) {
valid = false;
diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h
index 496ad3bf70..86d4dd7e35 100644
--- a/editor/import/resource_importer_texture.h
+++ b/editor/import/resource_importer_texture.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_texture.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_texture.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 RESOURCE_IMPORTER_TEXTURE_H
#define RESOURCE_IMPORTER_TEXTURE_H
diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp
index 9171f04f42..bca24a126c 100644
--- a/editor/import/resource_importer_texture_atlas.cpp
+++ b/editor/import/resource_importer_texture_atlas.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_texture_atlas.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_texture_atlas.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 "resource_importer_texture_atlas.h"
@@ -273,9 +273,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
EditorAtlasPacker::chart_pack(charts, atlas_width, atlas_height);
//blit the atlas
- Ref<Image> new_atlas;
- new_atlas.instantiate();
- new_atlas->create(atlas_width, atlas_height, false, Image::FORMAT_RGBA8);
+ Ref<Image> new_atlas = Image::create_empty(atlas_width, atlas_height, false, Image::FORMAT_RGBA8);
for (int i = 0; i < pack_data_files.size(); i++) {
PackData &pack_data = pack_data_files.write[i];
diff --git a/editor/import/resource_importer_texture_atlas.h b/editor/import/resource_importer_texture_atlas.h
index 971eb067df..0f2b10424c 100644
--- a/editor/import/resource_importer_texture_atlas.h
+++ b/editor/import/resource_importer_texture_atlas.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_texture_atlas.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_texture_atlas.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 RESOURCE_IMPORTER_TEXTURE_ATLAS_H
#define RESOURCE_IMPORTER_TEXTURE_ATLAS_H
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp
index 1dcae2841b..6d54c08031 100644
--- a/editor/import/resource_importer_wav.cpp
+++ b/editor/import/resource_importer_wav.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_wav.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_wav.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 "resource_importer_wav.h"
@@ -107,7 +107,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
file->get_buffer((uint8_t *)&riff, 4); //RIFF
if (riff[0] != 'R' || riff[1] != 'I' || riff[2] != 'F' || riff[3] != 'F') {
- ERR_FAIL_V(ERR_FILE_UNRECOGNIZED);
+ ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, vformat("Not a WAV file. File should start with 'RIFF', but found '%s', in file of size %d bytes", riff, file->get_length()));
}
/* GET FILESIZE */
@@ -115,12 +115,12 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
/* CHECK WAVE */
- char wave[4];
-
- file->get_buffer((uint8_t *)&wave, 4); //RIFF
+ char wave[5];
+ wave[4] = 0;
+ file->get_buffer((uint8_t *)&wave, 4); //WAVE
if (wave[0] != 'W' || wave[1] != 'A' || wave[2] != 'V' || wave[3] != 'E') {
- ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, "Not a WAV file (no WAVE RIFF header).");
+ ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, vformat("Not a WAV file. Header should contain 'WAVE', but found '%s', in file of size %d bytes", wave, file->get_length()));
}
// Let users override potential loop points from the WAV.
diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h
index 739ec9b181..47af37ba41 100644
--- a/editor/import/resource_importer_wav.h
+++ b/editor/import/resource_importer_wav.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_importer_wav.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_importer_wav.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 RESOURCE_IMPORTER_WAV_H
#define RESOURCE_IMPORTER_WAV_H
diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp
index 730aa3bd61..044f7475c2 100644
--- a/editor/import/scene_import_settings.cpp
+++ b/editor/import/scene_import_settings.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* scene_import_settings.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* scene_import_settings.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 "scene_import_settings.h"
@@ -555,6 +555,7 @@ void SceneImportSettings::open_settings(const String &p_path, bool p_for_animati
material_set.clear();
mesh_set.clear();
+ animation_map.clear();
material_map.clear();
mesh_map.clear();
node_map.clear();
@@ -702,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);
@@ -848,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);
@@ -957,15 +960,15 @@ void SceneImportSettings::_notification(int p_what) {
void SceneImportSettings::_menu_callback(int p_id) {
switch (p_id) {
case ACTION_EXTRACT_MATERIALS: {
- save_path->set_text(TTR("Select folder to extract material resources"));
+ save_path->set_title(TTR("Select folder to extract material resources"));
external_extension_type->select(0);
} break;
case ACTION_CHOOSE_MESH_SAVE_PATHS: {
- save_path->set_text(TTR("Select folder where mesh resources will save on import"));
+ save_path->set_title(TTR("Select folder where mesh resources will save on import"));
external_extension_type->select(1);
} break;
case ACTION_CHOOSE_ANIMATION_SAVE_PATHS: {
- save_path->set_text(TTR("Select folder where animations will save on import"));
+ save_path->set_title(TTR("Select folder where animations will save on import"));
external_extension_type->select(1);
} break;
}
@@ -1233,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/import/scene_import_settings.h b/editor/import/scene_import_settings.h
index 0e12a83116..6481221ad6 100644
--- a/editor/import/scene_import_settings.h
+++ b/editor/import/scene_import_settings.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* scene_import_settings.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* scene_import_settings.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 SCENE_IMPORT_SETTINGS_H
#define SCENE_IMPORT_SETTINGS_H
diff --git a/editor/import_defaults_editor.cpp b/editor/import_defaults_editor.cpp
index a70f5225e9..0e25468e1a 100644
--- a/editor/import_defaults_editor.cpp
+++ b/editor/import_defaults_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* import_defaults_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* import_defaults_editor.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 "import_defaults_editor.h"
@@ -140,7 +140,7 @@ void ImportDefaultsEditor::_update_importer() {
importer->get_import_options("", &options);
Dictionary d;
if (ProjectSettings::get_singleton()->has_setting("importer_defaults/" + importer->get_importer_name())) {
- d = ProjectSettings::get_singleton()->get("importer_defaults/" + importer->get_importer_name());
+ d = GLOBAL_GET("importer_defaults/" + importer->get_importer_name());
}
for (const ResourceImporter::ImportOption &E : options) {
diff --git a/editor/import_defaults_editor.h b/editor/import_defaults_editor.h
index f0433f6065..763cdf8bf1 100644
--- a/editor/import_defaults_editor.h
+++ b/editor/import_defaults_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* import_defaults_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* import_defaults_editor.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 IMPORT_DEFAULTS_EDITOR_H
#define IMPORT_DEFAULTS_EDITOR_H
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 4732268256..b5680f2f2c 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* import_dock.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* import_dock.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 "import_dock.h"
@@ -384,7 +384,7 @@ void ImportDock::_preset_selected(int p_idx) {
case ITEM_LOAD_DEFAULT: {
ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("importer_defaults/" + params->importer->get_importer_name()));
- Dictionary d = ProjectSettings::get_singleton()->get("importer_defaults/" + params->importer->get_importer_name());
+ Dictionary d = GLOBAL_GET("importer_defaults/" + params->importer->get_importer_name());
List<Variant> v;
d.get_key_list(&v);
diff --git a/editor/import_dock.h b/editor/import_dock.h
index 3098c6e815..f627cd965d 100644
--- a/editor/import_dock.h
+++ b/editor/import_dock.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* import_dock.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* import_dock.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 IMPORT_DOCK_H
#define IMPORT_DOCK_H
diff --git a/editor/input_event_configuration_dialog.cpp b/editor/input_event_configuration_dialog.cpp
new file mode 100644
index 0000000000..08d4bfff4a
--- /dev/null
+++ b/editor/input_event_configuration_dialog.cpp
@@ -0,0 +1,634 @@
+/**************************************************************************/
+/* input_event_configuration_dialog.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 "editor/input_event_configuration_dialog.h"
+#include "core/input/input_map.h"
+#include "editor/editor_scale.h"
+#include "editor/event_listener_line_edit.h"
+#include "scene/gui/check_box.h"
+#include "scene/gui/line_edit.h"
+#include "scene/gui/option_button.h"
+#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) {
+ if (p_event.is_valid()) {
+ event = p_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.
+ const Ref<InputEvent> listener_event = event_listener->get_event();
+ if (listener_event.is_valid() && !listener_event->is_match(p_event)) {
+ event_listener->clear_event();
+ }
+
+ // Update Label
+ event_as_text->set_text(EventListenerLineEdit::get_event_text(event, true));
+
+ Ref<InputEventKey> k = p_event;
+ Ref<InputEventMouseButton> mb = p_event;
+ Ref<InputEventJoypadButton> joyb = p_event;
+ Ref<InputEventJoypadMotion> joym = p_event;
+ Ref<InputEventWithModifiers> mod = p_event;
+
+ // Update option values and visibility
+ bool show_mods = false;
+ bool show_device = false;
+ bool show_phys_key = false;
+
+ if (mod.is_valid()) {
+ show_mods = true;
+ mod_checkboxes[MOD_ALT]->set_pressed(mod->is_alt_pressed());
+ mod_checkboxes[MOD_SHIFT]->set_pressed(mod->is_shift_pressed());
+ mod_checkboxes[MOD_CTRL]->set_pressed(mod->is_ctrl_pressed());
+ mod_checkboxes[MOD_META]->set_pressed(mod->is_meta_pressed());
+
+ autoremap_command_or_control_checkbox->set_pressed(mod->is_command_or_control_autoremap());
+ }
+
+ if (k.is_valid()) {
+ show_phys_key = true;
+ physical_key_checkbox->set_pressed(k->get_physical_keycode() != Key::NONE && k->get_keycode() == Key::NONE);
+
+ } else if (joyb.is_valid() || joym.is_valid() || mb.is_valid()) {
+ show_device = true;
+ _set_current_device(event->get_device());
+ }
+
+ mod_container->set_visible(show_mods);
+ device_container->set_visible(show_device);
+ physical_key_checkbox->set_visible(show_phys_key);
+ additional_options_container->show();
+
+ // Update selected item in input list.
+ if (p_update_input_list_selection && (k.is_valid() || joyb.is_valid() || joym.is_valid() || mb.is_valid())) {
+ TreeItem *category = input_list_tree->get_root()->get_first_child();
+ while (category) {
+ TreeItem *input_item = category->get_first_child();
+
+ if (input_item != nullptr) {
+ // 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) {
+ return;
+ }
+
+ // If event type matches input types of this category.
+ if ((k.is_valid() && input_type == INPUT_KEY) || (joyb.is_valid() && input_type == INPUT_JOY_BUTTON) || (joym.is_valid() && input_type == INPUT_JOY_MOTION) || (mb.is_valid() && input_type == INPUT_MOUSE_BUTTON)) {
+ // Loop through all items of this category until one matches.
+ while (input_item) {
+ bool key_match = k.is_valid() && (Variant(k->get_keycode()) == input_item->get_meta("__keycode") || Variant(k->get_physical_keycode()) == input_item->get_meta("__keycode"));
+ bool joyb_match = joyb.is_valid() && Variant(joyb->get_button_index()) == input_item->get_meta("__index");
+ bool joym_match = joym.is_valid() && Variant(joym->get_axis()) == input_item->get_meta("__axis") && joym->get_axis_value() == (float)input_item->get_meta("__value");
+ bool mb_match = mb.is_valid() && Variant(mb->get_button_index()) == input_item->get_meta("__index");
+ if (key_match || joyb_match || joym_match || mb_match) {
+ category->set_collapsed(false);
+ input_item->select(0);
+ input_list_tree->ensure_cursor_is_visible();
+ return;
+ }
+ input_item = input_item->get_next();
+ }
+ }
+ }
+
+ category->set_collapsed(true); // Event not in this category, so collapse;
+ category = category->get_next();
+ }
+ }
+ } else {
+ // Event is not valid, reset dialog
+ event = p_event;
+ 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();
+ }
+}
+
+void InputEventConfigurationDialog::_on_listen_input_changed(const Ref<InputEvent> &p_event) {
+ // Ignore if invalid, echo or not pressed
+ if (p_event.is_null() || p_event->is_echo() || !p_event->is_pressed()) {
+ return;
+ }
+
+ // Create an editable reference
+ Ref<InputEvent> received_event = p_event;
+ // Check what the type is and if it is allowed.
+ Ref<InputEventKey> k = received_event;
+ Ref<InputEventJoypadButton> joyb = received_event;
+ Ref<InputEventJoypadMotion> joym = received_event;
+ Ref<InputEventMouseButton> mb = received_event;
+
+ int type = 0;
+ if (k.is_valid()) {
+ type = INPUT_KEY;
+ } else if (joyb.is_valid()) {
+ type = INPUT_JOY_BUTTON;
+ } else if (joym.is_valid()) {
+ type = INPUT_JOY_MOTION;
+ } else if (mb.is_valid()) {
+ type = INPUT_MOUSE_BUTTON;
+ }
+
+ if (!(allowed_input_types & type)) {
+ return;
+ }
+
+ if (joym.is_valid()) {
+ joym->set_axis_value(SIGN(joym->get_axis_value()));
+ }
+
+ 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_keycode(Key::NONE);
+ } else {
+ k->set_physical_keycode(Key::NONE);
+ }
+ }
+
+ Ref<InputEventWithModifiers> mod = received_event;
+ if (mod.is_valid()) {
+ mod->set_window_id(0);
+ }
+
+ // Maintain device selection.
+ received_event->set_device(_get_current_device());
+
+ _set_event(received_event);
+}
+
+void InputEventConfigurationDialog::_on_listen_focus_changed() {
+ if (event_listener->has_focus()) {
+ set_close_on_escape(false);
+ } else {
+ set_close_on_escape(true);
+ }
+}
+
+void InputEventConfigurationDialog::_search_term_updated(const String &) {
+ _update_input_list();
+}
+
+void InputEventConfigurationDialog::_update_input_list() {
+ input_list_tree->clear();
+
+ TreeItem *root = input_list_tree->create_item();
+ String search_term = input_list_search->get_text();
+
+ bool collapse = input_list_search->get_text().is_empty();
+
+ if (allowed_input_types & INPUT_KEY) {
+ TreeItem *kb_root = input_list_tree->create_item(root);
+ kb_root->set_text(0, TTR("Keyboard Keys"));
+ kb_root->set_icon(0, icon_cache.keyboard);
+ kb_root->set_collapsed(collapse);
+ kb_root->set_meta("__type", INPUT_KEY);
+
+ for (int i = 0; i < keycode_get_count(); i++) {
+ String name = keycode_get_name_by_index(i);
+
+ if (!search_term.is_empty() && name.findn(search_term) == -1) {
+ continue;
+ }
+
+ TreeItem *item = input_list_tree->create_item(kb_root);
+ item->set_text(0, name);
+ item->set_meta("__keycode", keycode_get_value_by_index(i));
+ }
+ }
+
+ if (allowed_input_types & INPUT_MOUSE_BUTTON) {
+ TreeItem *mouse_root = input_list_tree->create_item(root);
+ mouse_root->set_text(0, TTR("Mouse Buttons"));
+ mouse_root->set_icon(0, icon_cache.mouse);
+ mouse_root->set_collapsed(collapse);
+ mouse_root->set_meta("__type", INPUT_MOUSE_BUTTON);
+
+ MouseButton mouse_buttons[9] = { MouseButton::LEFT, MouseButton::RIGHT, MouseButton::MIDDLE, MouseButton::WHEEL_UP, MouseButton::WHEEL_DOWN, MouseButton::WHEEL_LEFT, MouseButton::WHEEL_RIGHT, MouseButton::MB_XBUTTON1, MouseButton::MB_XBUTTON2 };
+ for (int i = 0; i < 9; i++) {
+ Ref<InputEventMouseButton> mb;
+ mb.instantiate();
+ mb->set_button_index(mouse_buttons[i]);
+ String desc = EventListenerLineEdit::get_event_text(mb, false);
+
+ if (!search_term.is_empty() && desc.findn(search_term) == -1) {
+ continue;
+ }
+
+ TreeItem *item = input_list_tree->create_item(mouse_root);
+ item->set_text(0, desc);
+ item->set_meta("__index", mouse_buttons[i]);
+ }
+ }
+
+ if (allowed_input_types & INPUT_JOY_BUTTON) {
+ TreeItem *joyb_root = input_list_tree->create_item(root);
+ joyb_root->set_text(0, TTR("Joypad Buttons"));
+ joyb_root->set_icon(0, icon_cache.joypad_button);
+ joyb_root->set_collapsed(collapse);
+ joyb_root->set_meta("__type", INPUT_JOY_BUTTON);
+
+ for (int i = 0; i < (int)JoyButton::MAX; i++) {
+ Ref<InputEventJoypadButton> joyb;
+ joyb.instantiate();
+ joyb->set_button_index((JoyButton)i);
+ String desc = EventListenerLineEdit::get_event_text(joyb, false);
+
+ if (!search_term.is_empty() && desc.findn(search_term) == -1) {
+ continue;
+ }
+
+ TreeItem *item = input_list_tree->create_item(joyb_root);
+ item->set_text(0, desc);
+ item->set_meta("__index", i);
+ }
+ }
+
+ if (allowed_input_types & INPUT_JOY_MOTION) {
+ TreeItem *joya_root = input_list_tree->create_item(root);
+ joya_root->set_text(0, TTR("Joypad Axes"));
+ joya_root->set_icon(0, icon_cache.joypad_axis);
+ joya_root->set_collapsed(collapse);
+ joya_root->set_meta("__type", INPUT_JOY_MOTION);
+
+ for (int i = 0; i < (int)JoyAxis::MAX * 2; i++) {
+ int axis = i / 2;
+ int direction = (i & 1) ? 1 : -1;
+ Ref<InputEventJoypadMotion> joym;
+ joym.instantiate();
+ joym->set_axis((JoyAxis)axis);
+ joym->set_axis_value(direction);
+ String desc = EventListenerLineEdit::get_event_text(joym, false);
+
+ if (!search_term.is_empty() && desc.findn(search_term) == -1) {
+ continue;
+ }
+
+ TreeItem *item = input_list_tree->create_item(joya_root);
+ item->set_text(0, desc);
+ item->set_meta("__axis", i >> 1);
+ item->set_meta("__value", (i & 1) ? 1 : -1);
+ }
+ }
+}
+
+void InputEventConfigurationDialog::_mod_toggled(bool p_checked, int p_index) {
+ Ref<InputEventWithModifiers> ie = event;
+
+ // Not event with modifiers
+ if (ie.is_null()) {
+ return;
+ }
+
+ if (p_index == 0) {
+ ie->set_alt_pressed(p_checked);
+ } else if (p_index == 1) {
+ ie->set_shift_pressed(p_checked);
+ } else if (p_index == 2) {
+ if (!autoremap_command_or_control_checkbox->is_pressed()) {
+ ie->set_ctrl_pressed(p_checked);
+ }
+ } else if (p_index == 3) {
+ if (!autoremap_command_or_control_checkbox->is_pressed()) {
+ ie->set_meta_pressed(p_checked);
+ }
+ }
+
+ _set_event(ie);
+}
+
+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);
+ }
+
+ if (p_checked) {
+ mod_checkboxes[MOD_META]->hide();
+ mod_checkboxes[MOD_CTRL]->hide();
+ } else {
+ mod_checkboxes[MOD_META]->show();
+ mod_checkboxes[MOD_CTRL]->show();
+ }
+}
+
+void InputEventConfigurationDialog::_physical_keycode_toggled(bool p_checked) {
+ Ref<InputEventKey> k = event;
+
+ if (k.is_null()) {
+ return;
+ }
+
+ if (p_checked) {
+ k->set_physical_keycode(k->get_keycode());
+ k->set_keycode(Key::NONE);
+ } else {
+ k->set_keycode((Key)k->get_physical_keycode());
+ k->set_physical_keycode(Key::NONE);
+ }
+
+ _set_event(k);
+}
+
+void InputEventConfigurationDialog::_input_list_item_selected() {
+ TreeItem *selected = input_list_tree->get_selected();
+
+ // Invalid tree selection - type only exists on the "category" items, which are not a valid selection.
+ if (selected->has_meta("__type")) {
+ return;
+ }
+
+ InputType input_type = (InputType)(int)selected->get_parent()->get_meta("__type");
+
+ switch (input_type) {
+ case INPUT_KEY: {
+ Key keycode = (Key)(int)selected->get_meta("__keycode");
+ 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);
+ }
+
+ // 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()) {
+ k->set_command_or_control_autoremap(true);
+ } else {
+ k->set_ctrl_pressed(mod_checkboxes[MOD_CTRL]->is_pressed());
+ k->set_meta_pressed(mod_checkboxes[MOD_META]->is_pressed());
+ }
+
+ _set_event(k, false);
+ } break;
+ case INPUT_MOUSE_BUTTON: {
+ MouseButton idx = (MouseButton)(int)selected->get_meta("__index");
+ Ref<InputEventMouseButton> mb;
+ mb.instantiate();
+ mb->set_button_index(idx);
+ // Maintain modifier state from checkboxes
+ mb->set_alt_pressed(mod_checkboxes[MOD_ALT]->is_pressed());
+ mb->set_shift_pressed(mod_checkboxes[MOD_SHIFT]->is_pressed());
+ if (autoremap_command_or_control_checkbox->is_pressed()) {
+ mb->set_command_or_control_autoremap(true);
+ } else {
+ mb->set_ctrl_pressed(mod_checkboxes[MOD_CTRL]->is_pressed());
+ mb->set_meta_pressed(mod_checkboxes[MOD_META]->is_pressed());
+ }
+
+ // Maintain selected device
+ mb->set_device(_get_current_device());
+
+ _set_event(mb, false);
+ } break;
+ case INPUT_JOY_BUTTON: {
+ JoyButton idx = (JoyButton)(int)selected->get_meta("__index");
+ Ref<InputEventJoypadButton> jb = InputEventJoypadButton::create_reference(idx);
+
+ // Maintain selected device
+ jb->set_device(_get_current_device());
+
+ _set_event(jb, false);
+ } break;
+ case INPUT_JOY_MOTION: {
+ JoyAxis axis = (JoyAxis)(int)selected->get_meta("__axis");
+ int value = selected->get_meta("__value");
+
+ Ref<InputEventJoypadMotion> jm;
+ jm.instantiate();
+ jm->set_axis(axis);
+ jm->set_axis_value(value);
+
+ // Maintain selected device
+ jm->set_device(_get_current_device());
+
+ _set_event(jm, false);
+ } break;
+ }
+}
+
+void InputEventConfigurationDialog::_device_selection_changed(int p_option_button_index) {
+ // Subtract 1 as option index 0 corresponds to "All Devices" (value of -1)
+ // and option index 1 corresponds to device 0, etc...
+ event->set_device(p_option_button_index - 1);
+ event_as_text->set_text(EventListenerLineEdit::get_event_text(event, true));
+}
+
+void InputEventConfigurationDialog::_set_current_device(int p_device) {
+ device_id_option->select(p_device + 1);
+}
+
+int InputEventConfigurationDialog::_get_current_device() const {
+ return device_id_option->get_selected() - 1;
+}
+
+void InputEventConfigurationDialog::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ event_listener->grab_focus();
+ } break;
+
+ case NOTIFICATION_ENTER_TREE:
+ 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")));
+
+ icon_cache.keyboard = get_theme_icon(SNAME("Keyboard"), SNAME("EditorIcons"));
+ icon_cache.mouse = get_theme_icon(SNAME("Mouse"), SNAME("EditorIcons"));
+ icon_cache.joypad_button = get_theme_icon(SNAME("JoyButton"), SNAME("EditorIcons"));
+ icon_cache.joypad_axis = get_theme_icon(SNAME("JoyAxis"), SNAME("EditorIcons"));
+
+ _update_input_list();
+ } break;
+ }
+}
+
+void InputEventConfigurationDialog::popup_and_configure(const Ref<InputEvent> &p_event) {
+ if (p_event.is_valid()) {
+ _set_event(p_event);
+ } else {
+ // Clear Event
+ _set_event(p_event);
+
+ // 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.
+ // 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);
+
+ autoremap_command_or_control_checkbox->set_pressed(false);
+
+ // Select "All Devices" by default.
+ device_id_option->select(0);
+ }
+
+ popup_centered(Size2(0, 400) * EDSCALE);
+}
+
+Ref<InputEvent> InputEventConfigurationDialog::get_event() const {
+ return event;
+}
+
+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() {
+ allowed_input_types = INPUT_KEY | INPUT_MOUSE_BUTTON | INPUT_JOY_BUTTON | INPUT_JOY_MOTION;
+
+ set_title(TTR("Event Configuration"));
+ set_min_size(Size2i(550 * EDSCALE, 0)); // Min width
+
+ VBoxContainer *main_vbox = memnew(VBoxContainer);
+ add_child(main_vbox);
+
+ event_as_text = memnew(Label);
+ event_as_text->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
+ event_as_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
+ event_as_text->add_theme_font_override("font", get_theme_font(SNAME("bold"), SNAME("EditorFonts")));
+ event_as_text->add_theme_font_size_override("font_size", 18 * EDSCALE);
+ main_vbox->add_child(event_as_text);
+
+ event_listener = memnew(EventListenerLineEdit);
+ event_listener->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ event_listener->set_stretch_ratio(0.75);
+ event_listener->connect("event_changed", callable_mp(this, &InputEventConfigurationDialog::_on_listen_input_changed));
+ event_listener->connect("focus_entered", callable_mp(this, &InputEventConfigurationDialog::_on_listen_focus_changed));
+ event_listener->connect("focus_exited", callable_mp(this, &InputEventConfigurationDialog::_on_listen_focus_changed));
+ main_vbox->add_child(event_listener);
+
+ main_vbox->add_child(memnew(HSeparator));
+
+ // List of all input options to manually select from.
+ VBoxContainer *manual_vbox = memnew(VBoxContainer);
+ manual_vbox->set_name(TTR("Manual Selection"));
+ manual_vbox->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ main_vbox->add_child(manual_vbox);
+
+ input_list_search = memnew(LineEdit);
+ input_list_search->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ input_list_search->set_placeholder(TTR("Filter Inputs"));
+ input_list_search->set_clear_button_enabled(true);
+ input_list_search->connect("text_changed", callable_mp(this, &InputEventConfigurationDialog::_search_term_updated));
+ manual_vbox->add_child(input_list_search);
+
+ input_list_tree = memnew(Tree);
+ input_list_tree->set_custom_minimum_size(Size2(0, 100 * EDSCALE)); // Min height for tree
+ input_list_tree->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_input_list_item_selected));
+ input_list_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ manual_vbox->add_child(input_list_tree);
+
+ input_list_tree->set_hide_root(true);
+ input_list_tree->set_columns(1);
+
+ _update_input_list();
+
+ // Additional Options
+ additional_options_container = memnew(VBoxContainer);
+ additional_options_container->hide();
+
+ Label *opts_label = memnew(Label);
+ opts_label->set_theme_type_variation("HeaderSmall");
+ opts_label->set_text(TTR("Additional Options"));
+ additional_options_container->add_child(opts_label);
+
+ // Device Selection
+ device_container = memnew(HBoxContainer);
+ device_container->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+
+ Label *device_label = memnew(Label);
+ device_label->set_theme_type_variation("HeaderSmall");
+ device_label->set_text(TTR("Device:"));
+ device_container->add_child(device_label);
+
+ device_id_option = memnew(OptionButton);
+ device_id_option->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ for (int i = -1; i < 8; i++) {
+ device_id_option->add_item(EventListenerLineEdit::get_device_string(i));
+ }
+ device_id_option->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_device_selection_changed));
+ _set_current_device(InputMap::ALL_DEVICES);
+ device_container->add_child(device_id_option);
+
+ device_container->hide();
+ additional_options_container->add_child(device_container);
+
+ // Modifier Selection
+ mod_container = memnew(HBoxContainer);
+ for (int i = 0; i < MOD_MAX; i++) {
+ String name = mods[i];
+ mod_checkboxes[i] = memnew(CheckBox);
+ mod_checkboxes[i]->connect("toggled", callable_mp(this, &InputEventConfigurationDialog::_mod_toggled).bind(i));
+ mod_checkboxes[i]->set_text(name);
+ mod_checkboxes[i]->set_tooltip_text(TTR(mods_tip[i]));
+ mod_container->add_child(mod_checkboxes[i]);
+ }
+
+ mod_container->add_child(memnew(VSeparator));
+
+ autoremap_command_or_control_checkbox = memnew(CheckBox);
+ autoremap_command_or_control_checkbox->connect("toggled", callable_mp(this, &InputEventConfigurationDialog::_autoremap_command_or_control_toggled));
+ autoremap_command_or_control_checkbox->set_pressed(false);
+ autoremap_command_or_control_checkbox->set_text(TTR("Command / Control (auto)"));
+ autoremap_command_or_control_checkbox->set_tooltip_text(TTR("Automatically remaps between 'Meta' ('Command') and 'Control' depending on current platform."));
+ mod_container->add_child(autoremap_command_or_control_checkbox);
+
+ mod_container->hide();
+ additional_options_container->add_child(mod_container);
+
+ // Physical Key Checkbox
+
+ 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);
+
+ main_vbox->add_child(additional_options_container);
+}
diff --git a/editor/input_event_configuration_dialog.h b/editor/input_event_configuration_dialog.h
new file mode 100644
index 0000000000..67906233dd
--- /dev/null
+++ b/editor/input_event_configuration_dialog.h
@@ -0,0 +1,122 @@
+/**************************************************************************/
+/* input_event_configuration_dialog.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 INPUT_EVENT_CONFIGURATION_DIALOG_H
+#define INPUT_EVENT_CONFIGURATION_DIALOG_H
+
+#include "scene/gui/dialogs.h"
+
+class OptionButton;
+class Tree;
+class EventListenerLineEdit;
+class CheckBox;
+
+// Confirmation Dialog used when configuring an input event.
+// Separate from ActionMapEditor for code cleanliness and separation of responsibilities.
+class InputEventConfigurationDialog : public ConfirmationDialog {
+ GDCLASS(InputEventConfigurationDialog, ConfirmationDialog)
+private:
+ struct IconCache {
+ Ref<Texture2D> keyboard;
+ Ref<Texture2D> mouse;
+ Ref<Texture2D> joypad_button;
+ Ref<Texture2D> joypad_axis;
+ } icon_cache;
+
+ Ref<InputEvent> event = Ref<InputEvent>();
+
+ // Listening for input
+ EventListenerLineEdit *event_listener = nullptr;
+ Label *event_as_text = nullptr;
+
+ // List of All Key/Mouse/Joypad input options.
+ int allowed_input_types;
+ Tree *input_list_tree = nullptr;
+ LineEdit *input_list_search = nullptr;
+
+ // Additional Options, shown depending on event selected
+ VBoxContainer *additional_options_container = nullptr;
+
+ HBoxContainer *device_container = nullptr;
+ OptionButton *device_id_option = nullptr;
+
+ HBoxContainer *mod_container = nullptr; // Contains the subcontainer and the store command checkbox.
+
+ enum ModCheckbox {
+ MOD_ALT,
+ MOD_SHIFT,
+ MOD_CTRL,
+ MOD_META,
+ MOD_MAX
+ };
+#if defined(MACOS_ENABLED)
+ String mods[MOD_MAX] = { "Option", "Shift", "Ctrl", "Command" };
+#elif defined(WINDOWS_ENABLED)
+ String mods[MOD_MAX] = { "Alt", "Shift", "Ctrl", "Windows" };
+#else
+ String mods[MOD_MAX] = { "Alt", "Shift", "Ctrl", "Meta" };
+#endif
+ String mods_tip[MOD_MAX] = { "Alt or Option key", "Shift key", "Control key", "Meta/Windows or Command key" };
+
+ CheckBox *mod_checkboxes[MOD_MAX];
+ CheckBox *autoremap_command_or_control_checkbox = nullptr;
+
+ CheckBox *physical_key_checkbox = nullptr;
+
+ void _set_event(const Ref<InputEvent> &p_event, bool p_update_input_list_selection = true);
+ void _on_listen_input_changed(const Ref<InputEvent> &p_event);
+ void _on_listen_focus_changed();
+
+ void _search_term_updated(const String &p_term);
+ void _update_input_list();
+ void _input_list_item_selected();
+
+ 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 _device_selection_changed(int p_option_button_index);
+ void _set_current_device(int p_device);
+ int _get_current_device() const;
+
+protected:
+ void _notification(int p_what);
+
+public:
+ // Pass an existing event to configure it. Alternatively, pass no event to start with a blank configuration.
+ void popup_and_configure(const Ref<InputEvent> &p_event = Ref<InputEvent>());
+ Ref<InputEvent> get_event() const;
+
+ void set_allowed_input_types(int p_type_masks);
+
+ InputEventConfigurationDialog();
+};
+
+#endif // INPUT_EVENT_CONFIGURATION_DIALOG_H
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 74fdbdebd7..b28373e308 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* inspector_dock.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* inspector_dock.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 "inspector_dock.h"
@@ -34,6 +34,8 @@
#include "editor/editor_node.h"
#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;
@@ -85,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) {
@@ -141,10 +148,11 @@ void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) {
ti->set_text(0, bool(EDITOR_GET("interface/inspector/capitalize_properties")) ? propname.capitalize() : propname);
}
+ unique_resources_label->set_text(TTR("The following resources will be duplicated and embedded within this resource/object."));
unique_resources_confirmation->popup_centered();
} else {
- unique_resources_confirmation->set_text(TTR("This object has no resources."));
current_option = -1;
+ unique_resources_label->set_text(TTR("This object has no resources."));
unique_resources_confirmation->popup_centered();
}
} else {
@@ -178,8 +186,8 @@ 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);
@@ -227,7 +235,7 @@ void InspectorDock::_load_resource(const String &p_type) {
load_resource_dialog->add_filter("*." + extensions[i], extensions[i].to_upper());
}
- const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false);
+ const Vector<String> textfile_ext = ((String)(EDITOR_GET("docks/filesystem/textfile_extensions"))).split(",", false);
for (int i = 0; i < textfile_ext.size(); i++) {
load_resource_dialog->add_filter("*." + textfile_ext[i], textfile_ext[i].to_upper());
}
@@ -240,7 +248,7 @@ void InspectorDock::_resource_file_selected(String p_file) {
if (ResourceLoader::exists(p_file, "")) {
res = ResourceLoader::load(p_file);
} else {
- const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false);
+ const Vector<String> textfile_ext = ((String)(EDITOR_GET("docks/filesystem/textfile_extensions"))).split(",", false);
if (textfile_ext.has(p_file.get_extension())) {
res = ScriptEditor::get_singleton()->open_file(p_file);
}
@@ -255,12 +263,8 @@ void InspectorDock::_resource_file_selected(String p_file) {
}
void InspectorDock::_save_resource(bool save_as) {
- ObjectID current = EditorNode::get_singleton()->get_editor_selection_history()->get_current();
- Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : 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);
@@ -270,24 +274,15 @@ void InspectorDock::_save_resource(bool save_as) {
}
void InspectorDock::_unref_resource() {
- ObjectID current = EditorNode::get_singleton()->get_editor_selection_history()->get_current();
- Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : 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 = EditorNode::get_singleton()->get_editor_selection_history()->get_current();
- Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : 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);
}
@@ -302,6 +297,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() {
@@ -364,7 +369,7 @@ void InspectorDock::_select_history(int p_idx) {
}
void InspectorDock::_resource_created() {
- Variant c = new_resource_dialog->instance_selected();
+ Variant c = new_resource_dialog->instantiate_selected();
ERR_FAIL_COND(!c);
Resource *r = Object::cast_to<Resource>(c);
@@ -610,8 +615,8 @@ void InspectorDock::apply_script_properties(Object *p_object) {
}
for (const Pair<StringName, Variant> &E : stored_properties) {
- Variant current;
- if (si->get(E.first, current) && current.get_type() == E.second.get_type()) {
+ Variant current_prop;
+ if (si->get(E.first, current_prop) && current_prop.get_type() == E.second.get_type()) {
si->set(E.first, E.second);
}
}
@@ -660,6 +665,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));
@@ -669,14 +675,14 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
backward_button = memnew(Button);
backward_button->set_flat(true);
general_options_hb->add_child(backward_button);
- backward_button->set_tooltip_text(TTR("Go to the previous edited object in history."));
+ backward_button->set_tooltip_text(TTR("Go to previous edited object in history."));
backward_button->set_disabled(true);
backward_button->connect("pressed", callable_mp(this, &InspectorDock::_edit_back));
forward_button = memnew(Button);
forward_button->set_flat(true);
general_options_hb->add_child(forward_button);
- forward_button->set_tooltip_text(TTR("Go to the next edited object in history."));
+ forward_button->set_tooltip_text(TTR("Go to next edited object in history."));
forward_button->set_disabled(true);
forward_button->connect("pressed", callable_mp(this, &InspectorDock::_edit_forward));
@@ -733,9 +739,8 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
VBoxContainer *container = memnew(VBoxContainer);
unique_resources_confirmation->add_child(container);
- Label *top_label = memnew(Label);
- top_label->set_text(TTR("The following resources will be duplicated and embedded within this resource/object."));
- container->add_child(top_label);
+ unique_resources_label = memnew(Label);
+ container->add_child(unique_resources_label);
unique_resources_list_tree = memnew(Tree);
unique_resources_list_tree->set_hide_root(true);
@@ -769,7 +774,6 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
inspector->set_property_name_style(EditorPropertyNameProcessor::get_default_inspector_style());
inspector->set_use_folding(!bool(EDITOR_GET("interface/inspector/disable_folding")));
inspector->register_text_enter(search);
- inspector->set_undo_redo(editor_data->get_undo_redo());
inspector->set_use_filter(true); // TODO: check me
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
index 5ebcbf70c7..c2c1b55fb1 100644
--- a/editor/inspector_dock.h
+++ b/editor/inspector_dock.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* inspector_dock.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* inspector_dock.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 INSPECTOR_DOCK_H
#define 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,
@@ -99,6 +100,7 @@ class InspectorDock : public VBoxContainer {
int current_option = -1;
ConfirmationDialog *unique_resources_confirmation = nullptr;
+ Label *unique_resources_label = nullptr;
Tree *unique_resources_list_tree = nullptr;
EditorPropertyNameProcessor::Style property_name_style;
@@ -118,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 683481ecc1..5503645930 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -1,39 +1,38 @@
-/*************************************************************************/
-/* localization_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* localization_editor.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 "localization_editor.h"
#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"
@@ -73,7 +72,7 @@ void LocalizationEditor::add_translation(const String &p_translation) {
}
void LocalizationEditor::_translation_add(const PackedStringArray &p_paths) {
- PackedStringArray translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
+ PackedStringArray translations = GLOBAL_GET("internationalization/locale/translations");
for (int i = 0; i < p_paths.size(); i++) {
if (!translations.has(p_paths[i])) {
// Don't add duplicate translation paths.
@@ -81,9 +80,10 @@ void LocalizationEditor::_translation_add(const PackedStringArray &p_paths) {
}
}
+ 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", ProjectSettings::get_singleton()->get("internationalization/locale/translations"));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", GLOBAL_GET("internationalization/locale/translations"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -105,15 +105,16 @@ void LocalizationEditor::_translation_delete(Object *p_item, int p_column, int p
int idx = ti->get_metadata(0);
- PackedStringArray translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
+ PackedStringArray translations = GLOBAL_GET("internationalization/locale/translations");
ERR_FAIL_INDEX(idx, translations.size());
translations.remove_at(idx);
+ 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", ProjectSettings::get_singleton()->get("internationalization/locale/translations"));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", GLOBAL_GET("internationalization/locale/translations"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -130,7 +131,7 @@ void LocalizationEditor::_translation_res_add(const PackedStringArray &p_paths)
Dictionary remaps;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
- remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
+ remaps = GLOBAL_GET("internationalization/locale/translation_remaps");
prev = remaps;
}
@@ -141,6 +142,7 @@ void LocalizationEditor::_translation_res_add(const PackedStringArray &p_paths)
}
}
+ 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);
@@ -158,7 +160,7 @@ void LocalizationEditor::_translation_res_option_file_open() {
void LocalizationEditor::_translation_res_option_add(const PackedStringArray &p_paths) {
ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps"));
- Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
+ Dictionary remaps = GLOBAL_GET("internationalization/locale/translation_remaps");
TreeItem *k = translation_remap->get_selected();
ERR_FAIL_COND(!k);
@@ -172,9 +174,10 @@ void LocalizationEditor::_translation_res_option_add(const PackedStringArray &p_
}
remaps[key] = r;
+ 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", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", GLOBAL_GET("internationalization/locale/translation_remaps"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -216,7 +219,7 @@ void LocalizationEditor::_translation_res_option_changed() {
return;
}
- Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
+ Dictionary remaps = GLOBAL_GET("internationalization/locale/translation_remaps");
TreeItem *k = translation_remap->get_selected();
ERR_FAIL_COND(!k);
@@ -234,9 +237,11 @@ void LocalizationEditor::_translation_res_option_changed() {
remaps[key] = r;
updating_translations = true;
+
+ 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", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", GLOBAL_GET("internationalization/locale/translation_remaps"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -258,7 +263,7 @@ void LocalizationEditor::_translation_res_delete(Object *p_item, int p_column, i
return;
}
- Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
+ Dictionary remaps = GLOBAL_GET("internationalization/locale/translation_remaps");
TreeItem *k = Object::cast_to<TreeItem>(p_item);
@@ -267,9 +272,10 @@ void LocalizationEditor::_translation_res_delete(Object *p_item, int p_column, i
remaps.erase(key);
+ 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", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", GLOBAL_GET("internationalization/locale/translation_remaps"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -290,7 +296,7 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co
return;
}
- Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
+ Dictionary remaps = GLOBAL_GET("internationalization/locale/translation_remaps");
TreeItem *k = translation_remap->get_selected();
ERR_FAIL_COND(!k);
@@ -306,9 +312,10 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co
r.remove_at(idx);
remaps[key] = r;
+ 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", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", GLOBAL_GET("internationalization/locale/translation_remaps"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -317,16 +324,17 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co
}
void LocalizationEditor::_pot_add(const PackedStringArray &p_paths) {
- PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
+ PackedStringArray pot_translations = GLOBAL_GET("internationalization/locale/translations_pot_files");
for (int i = 0; i < p_paths.size(); i++) {
if (!pot_translations.has(p_paths[i])) {
pot_translations.push_back(p_paths[i]);
}
}
+ 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", ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files"));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", GLOBAL_GET("internationalization/locale/translations_pot_files"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -344,15 +352,16 @@ void LocalizationEditor::_pot_delete(Object *p_item, int p_column, int p_button,
int idx = ti->get_metadata(0);
- PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
+ PackedStringArray pot_translations = GLOBAL_GET("internationalization/locale/translations_pot_files");
ERR_FAIL_INDEX(idx, pot_translations.size());
pot_translations.remove_at(idx);
+ 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", ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files"));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", GLOBAL_GET("internationalization/locale/translations_pot_files"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -392,7 +401,7 @@ void LocalizationEditor::_filesystem_files_moved(const String &p_old_file, const
bool remaps_changed = false;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
- remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
+ remaps = GLOBAL_GET("internationalization/locale/translation_remaps");
}
// Check for the keys.
@@ -442,7 +451,7 @@ void LocalizationEditor::_filesystem_file_removed(const String &p_file) {
Dictionary remaps;
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
- remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
+ remaps = GLOBAL_GET("internationalization/locale/translation_remaps");
}
bool remaps_changed = remaps.has(p_file);
@@ -481,7 +490,7 @@ void LocalizationEditor::update_translations() {
TreeItem *root = translation_list->create_item(nullptr);
translation_list->set_hide_root(true);
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translations")) {
- PackedStringArray translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
+ PackedStringArray translations = GLOBAL_GET("internationalization/locale/translations");
for (int i = 0; i < translations.size(); i++) {
TreeItem *t = translation_list->create_item(root);
t->set_editable(0, false);
@@ -507,7 +516,7 @@ void LocalizationEditor::update_translations() {
translation_res_option_add_button->set_disabled(true);
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
- Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
+ Dictionary remaps = GLOBAL_GET("internationalization/locale/translation_remaps");
List<Variant> rk;
remaps.get_key_list(&rk);
Vector<String> keys;
@@ -568,7 +577,7 @@ void LocalizationEditor::update_translations() {
root = translation_pot_list->create_item(nullptr);
translation_pot_list->set_hide_root(true);
if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translations_pot_files")) {
- PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
+ PackedStringArray pot_translations = GLOBAL_GET("internationalization/locale/translations_pot_files");
for (int i = 0; i < pot_translations.size(); i++) {
TreeItem *t = translation_pot_list->create_item(root);
t->set_editable(0, false);
@@ -592,7 +601,6 @@ void LocalizationEditor::_bind_methods() {
}
LocalizationEditor::LocalizationEditor() {
- undo_redo = EditorNode::get_undo_redo();
localization_changed = "localization_changed";
TabContainer *translations = memnew(TabContainer);
diff --git a/editor/localization_editor.h b/editor/localization_editor.h
index ecac171fe3..670ac5793b 100644
--- a/editor/localization_editor.h
+++ b/editor/localization_editor.h
@@ -1,37 +1,36 @@
-/*************************************************************************/
-/* localization_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* localization_editor.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 LOCALIZATION_EDITOR_H
#define LOCALIZATION_EDITOR_H
-#include "core/object/undo_redo.h"
#include "editor/editor_locale_dialog.h"
#include "scene/gui/tree.h"
@@ -56,7 +55,6 @@ class LocalizationEditor : public VBoxContainer {
EditorFileDialog *pot_file_open_dialog = nullptr;
EditorFileDialog *pot_generate_dialog = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
bool updating_translations = false;
String localization_changed;
diff --git a/editor/multi_node_edit.cpp b/editor/multi_node_edit.cpp
index a386fba84d..4f0db70681 100644
--- a/editor/multi_node_edit.cpp
+++ b/editor/multi_node_edit.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* multi_node_edit.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* multi_node_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 "multi_node_edit.h"
@@ -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/multi_node_edit.h b/editor/multi_node_edit.h
index 9c0ec85e20..deef88633e 100644
--- a/editor/multi_node_edit.h
+++ b/editor/multi_node_edit.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* multi_node_edit.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* multi_node_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 MULTI_NODE_EDIT_H
#define MULTI_NODE_EDIT_H
diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp
index 55fa2f22dd..545769d327 100644
--- a/editor/node_dock.cpp
+++ b/editor/node_dock.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* node_dock.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* node_dock.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 "node_dock.h"
@@ -117,13 +117,11 @@ NodeDock::NodeDock() {
groups_button->connect("pressed", callable_mp(this, &NodeDock::show_groups));
connections = memnew(ConnectionsDock);
- connections->set_undo_redo(EditorNode::get_undo_redo());
add_child(connections);
connections->set_v_size_flags(SIZE_EXPAND_FILL);
connections->hide();
groups = memnew(GroupsEditor);
- groups->set_undo_redo(EditorNode::get_undo_redo());
add_child(groups);
groups->set_v_size_flags(SIZE_EXPAND_FILL);
groups->hide();
diff --git a/editor/node_dock.h b/editor/node_dock.h
index 35af1a8121..e9dcc41d48 100644
--- a/editor/node_dock.h
+++ b/editor/node_dock.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* node_dock.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* node_dock.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 NODE_DOCK_H
#define NODE_DOCK_H
diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp
index 71ff77e9bc..4f6487fa77 100644
--- a/editor/plugin_config_dialog.cpp
+++ b/editor/plugin_config_dialog.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* plugin_config_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* plugin_config_dialog.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 "plugin_config_dialog.h"
@@ -36,6 +36,7 @@
#include "editor/editor_plugin.h"
#include "editor/editor_scale.h"
#include "editor/project_settings_editor.h"
+#include "scene/gui/grid_container.h"
void PluginConfigDialog::_clear_fields() {
name_edit->set_text("");
@@ -80,11 +81,11 @@ void PluginConfigDialog::_on_confirmed() {
if (!templates.is_empty()) {
template_content = templates[0].content;
}
- Ref<Script> script = ScriptServer::get_language(lang_idx)->make_template(template_content, class_name, "EditorPlugin");
- script->set_path(script_path, true);
- ResourceSaver::save(script);
+ Ref<Script> scr = ScriptServer::get_language(lang_idx)->make_template(template_content, class_name, "EditorPlugin");
+ scr->set_path(script_path, true);
+ ResourceSaver::save(scr);
- emit_signal(SNAME("plugin_ready"), script.ptr(), active_edit->is_pressed() ? _to_absolute_plugin_path(_get_subfolder()) : "");
+ emit_signal(SNAME("plugin_ready"), scr.ptr(), active_edit->is_pressed() ? _to_absolute_plugin_path(_get_subfolder()) : "");
} else {
EditorNode::get_singleton()->get_project_settings()->update_plugins();
}
@@ -218,6 +219,7 @@ PluginConfigDialog::PluginConfigDialog() {
GridContainer *grid = memnew(GridContainer);
grid->set_columns(3);
+ grid->set_v_size_flags(Control::SIZE_EXPAND_FILL);
vbox->add_child(grid);
// Plugin Name
@@ -233,6 +235,7 @@ PluginConfigDialog::PluginConfigDialog() {
name_edit = memnew(LineEdit);
name_edit->connect("text_changed", callable_mp(this, &PluginConfigDialog::_on_required_text_changed));
name_edit->set_placeholder("MyPlugin");
+ name_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(name_edit);
// Subfolder
@@ -247,6 +250,7 @@ PluginConfigDialog::PluginConfigDialog() {
subfolder_edit = memnew(LineEdit);
subfolder_edit->set_placeholder("\"my_plugin\" -> res://addons/my_plugin");
+ subfolder_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
subfolder_edit->connect("text_changed", callable_mp(this, &PluginConfigDialog::_on_required_text_changed));
grid->add_child(subfolder_edit);
@@ -262,6 +266,8 @@ PluginConfigDialog::PluginConfigDialog() {
desc_edit = memnew(TextEdit);
desc_edit->set_custom_minimum_size(Size2(400, 80) * EDSCALE);
desc_edit->set_line_wrapping_mode(TextEdit::LineWrappingMode::LINE_WRAPPING_BOUNDARY);
+ desc_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ desc_edit->set_v_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(desc_edit);
// Author
@@ -275,6 +281,7 @@ PluginConfigDialog::PluginConfigDialog() {
author_edit = memnew(LineEdit);
author_edit->set_placeholder("Godette");
+ author_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(author_edit);
// Version
@@ -288,6 +295,7 @@ PluginConfigDialog::PluginConfigDialog() {
version_edit = memnew(LineEdit);
version_edit->set_placeholder("1.0");
+ version_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(version_edit);
// Language dropdown
@@ -325,6 +333,7 @@ PluginConfigDialog::PluginConfigDialog() {
script_edit = memnew(LineEdit);
script_edit->connect("text_changed", callable_mp(this, &PluginConfigDialog::_on_required_text_changed));
script_edit->set_placeholder("\"plugin.gd\" -> res://addons/my_plugin/plugin.gd");
+ script_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(script_edit);
// Activate now checkbox
diff --git a/editor/plugin_config_dialog.h b/editor/plugin_config_dialog.h
index 6e0cbea378..e8df308c54 100644
--- a/editor/plugin_config_dialog.h
+++ b/editor/plugin_config_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* plugin_config_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* plugin_config_dialog.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 PLUGIN_CONFIG_DIALOG_H
#define PLUGIN_CONFIG_DIALOG_H
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index c928b95642..7c23e19564 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* abstract_polygon_2d_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* abstract_polygon_2d_editor.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 "abstract_polygon_2d_editor.h"
@@ -91,6 +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();
+ 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);
}
@@ -100,6 +101,7 @@ Vector2 AbstractPolygon2DEditor::_get_offset(int p_idx) const {
}
void AbstractPolygon2DEditor::_commit_action() {
+ 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();
@@ -203,6 +205,7 @@ void AbstractPolygon2DEditor::_wip_close() {
if (_is_line()) {
_set_polygon(0, wip);
} else if (wip.size() >= (_is_line() ? 2 : 3)) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Create Polygon"));
_action_add_polygon(wip);
if (_has_uv()) {
@@ -254,6 +257,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
return false;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<InputEventMouseButton> mb = p_event;
if (!_has_resource()) {
@@ -406,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.
@@ -561,15 +565,19 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
const Vector2 p = (vertex == edited_point) ? edited_point.pos : (points[i] + offset);
const Vector2 point = xform.xform(p);
- const Color modulate = vertex == active_point ? Color(0.5, 1, 2) : Color(1, 1, 1);
- p_overlay->draw_texture(handle, point - handle->get_size() * 0.5, modulate);
+ const Color overlay_modulate = vertex == active_point ? Color(0.5, 1, 2) : Color(1, 1, 1);
+ p_overlay->draw_texture(handle, point - handle->get_size() * 0.5, overlay_modulate);
if (vertex == hover_point) {
- Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label"));
- int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label"));
+ Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
+ int font_size = 1.3 * get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
String num = String::num(vertex.vertex);
Size2 num_size = font->get_string_size(num, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size);
- p_overlay->draw_string(font, point - num_size * 0.5, num, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, Color(1.0, 1.0, 1.0, 0.5));
+ const float outline_size = 4;
+ Color font_color = get_theme_color(SNAME("font_color"), SNAME("Editor"));
+ Color outline_color = font_color.inverted();
+ p_overlay->draw_string_outline(font, point - num_size * 0.5, num, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, outline_size, outline_color);
+ p_overlay->draw_string(font, point - num_size * 0.5, num, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, font_color);
}
}
}
@@ -611,6 +619,7 @@ void AbstractPolygon2DEditor::_bind_methods() {
}
void AbstractPolygon2DEditor::remove_point(const Vertex &p_vertex) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Vector<Vector2> vertices = _get_polygon(p_vertex.polygon);
if (vertices.size() > (_is_line() ? 2 : 3)) {
@@ -706,8 +715,6 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_edge_point(c
}
AbstractPolygon2DEditor::AbstractPolygon2DEditor(bool p_wip_destructive) {
- undo_redo = EditorNode::get_undo_redo();
-
edited_point = PosVertex();
wip_destructive = p_wip_destructive;
diff --git a/editor/plugins/abstract_polygon_2d_editor.h b/editor/plugins/abstract_polygon_2d_editor.h
index 1fbbe67c8d..832972c398 100644
--- a/editor/plugins/abstract_polygon_2d_editor.h
+++ b/editor/plugins/abstract_polygon_2d_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* abstract_polygon_2d_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* abstract_polygon_2d_editor.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 ABSTRACT_POLYGON_2D_EDITOR_H
#define ABSTRACT_POLYGON_2D_EDITOR_H
@@ -36,7 +36,7 @@
#include "scene/gui/box_container.h"
class CanvasItemEditor;
-class EditorUndoRedoManager;
+class ConfirmationDialog;
class AbstractPolygon2DEditor : public HBoxContainer {
GDCLASS(AbstractPolygon2DEditor, HBoxContainer);
@@ -100,8 +100,6 @@ protected:
int mode = MODE_EDIT;
- Ref<EditorUndoRedoManager> undo_redo;
-
virtual void _menu_option(int p_option);
void _wip_changed();
void _wip_close();
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index 0e941ad433..33aebe5883 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_blend_space_1d_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_blend_space_1d_editor.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 "animation_blend_space_1d_editor.h"
@@ -37,6 +37,8 @@
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "scene/animation/animation_blend_tree.h"
+#include "scene/gui/check_box.h"
+#include "scene/gui/panel_container.h"
StringName AnimationNodeBlendSpace1DEditor::get_blend_position_path() const {
StringName path = AnimationTreeEditor::get_singleton()->get_base_path() + "blend_position";
@@ -44,6 +46,11 @@ StringName AnimationNodeBlendSpace1DEditor::get_blend_position_path() const {
}
void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEvent> &p_event) {
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
Ref<InputEventKey> k = p_event;
if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == Key::KEY_DELETE && !k->is_echo()) {
@@ -69,11 +76,8 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
menu->add_submenu_item(TTR("Add Animation"), "animations");
- AnimationTree *gp = AnimationTreeEditor::get_singleton()->get_tree();
- ERR_FAIL_COND(!gp);
-
- if (gp->has_node(gp->get_animation_player())) {
- AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(gp->get_node(gp->get_animation_player()));
+ if (tree->has_node(tree->get_animation_player())) {
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(tree->get_node(tree->get_animation_player()));
if (ap) {
List<StringName> names;
@@ -153,6 +157,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
}
updating = true;
+ 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));
@@ -177,7 +182,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
blend_pos *= blend_space->get_max_space() - blend_space->get_min_space();
blend_pos += blend_space->get_min_space();
- AnimationTreeEditor::get_singleton()->get_tree()->set(get_blend_position_path(), blend_pos);
+ tree->set(get_blend_position_path(), blend_pos);
blend_space_draw->queue_redraw();
}
@@ -195,18 +200,23 @@ 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();
- AnimationTreeEditor::get_singleton()->get_tree()->set(get_blend_position_path(), blend_pos);
+ tree->set(get_blend_position_path(), blend_pos);
blend_space_draw->queue_redraw();
}
}
void AnimationNodeBlendSpace1DEditor::_blend_space_draw() {
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
Color linecolor = get_theme_color(SNAME("font_color"), SNAME("Label"));
Color linecolor_soft = linecolor;
linecolor_soft.a *= 0.5;
@@ -298,7 +308,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_draw() {
color.a *= 0.5;
}
- float point = AnimationTreeEditor::get_singleton()->get_tree()->get(get_blend_position_path());
+ float point = tree->get(get_blend_position_path());
point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space());
point *= s.width;
@@ -341,6 +351,7 @@ void AnimationNodeBlendSpace1DEditor::_config_changed(double) {
}
updating = true;
+ 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());
@@ -364,6 +375,7 @@ void AnimationNodeBlendSpace1DEditor::_labels_changed(String) {
}
updating = true;
+ 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());
@@ -381,6 +393,8 @@ void AnimationNodeBlendSpace1DEditor::_file_opened(const String &p_file) {
file_loaded = ResourceLoader::load(p_file);
if (file_loaded.is_valid()) {
_add_menu_type(MENU_LOAD_FILE_CONFIRM);
+ } else {
+ EditorNode::get_singleton()->show_warning(TTR("This type of node can't be used. Only animation nodes are allowed."));
}
}
@@ -417,6 +431,7 @@ void AnimationNodeBlendSpace1DEditor::_add_menu_type(int p_index) {
}
updating = true;
+ 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());
@@ -435,6 +450,7 @@ void AnimationNodeBlendSpace1DEditor::_add_animation_type(int p_index) {
anim->set_animation(animations_to_add[p_index]);
updating = true;
+ 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());
@@ -508,6 +524,7 @@ void AnimationNodeBlendSpace1DEditor::_erase_selected() {
if (selected_point != -1) {
updating = true;
+ 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);
@@ -527,6 +544,7 @@ void AnimationNodeBlendSpace1DEditor::_edit_point_pos(double) {
}
updating = true;
+ 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));
@@ -564,12 +582,17 @@ void AnimationNodeBlendSpace1DEditor::_notification(int p_what) {
} break;
case NOTIFICATION_PROCESS: {
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
String error;
- if (!AnimationTreeEditor::get_singleton()->get_tree()->is_active()) {
+ if (!tree->is_active()) {
error = TTR("AnimationTree is inactive.\nActivate to enable playback, check node warnings if activation fails.");
- } else if (AnimationTreeEditor::get_singleton()->get_tree()->is_state_invalid()) {
- error = AnimationTreeEditor::get_singleton()->get_tree()->get_invalid_state_reason();
+ } else if (tree->is_state_invalid()) {
+ error = tree->get_invalid_state_reason();
}
if (error != error_label->get_text()) {
@@ -760,8 +783,6 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
error_panel->add_child(error_label);
error_label->set_text("hmmm");
- undo_redo = EditorNode::get_undo_redo();
-
menu = memnew(PopupMenu);
add_child(menu);
menu->connect("id_pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_add_menu_type));
@@ -776,7 +797,6 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
open_file->set_title(TTR("Open Animation Node"));
open_file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
open_file->connect("file_selected", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_file_opened));
- undo_redo = EditorNode::get_undo_redo();
set_custom_minimum_size(Size2(0, 150 * EDSCALE));
}
diff --git a/editor/plugins/animation_blend_space_1d_editor.h b/editor/plugins/animation_blend_space_1d_editor.h
index c8b01cb54b..e71a4bd1b9 100644
--- a/editor/plugins/animation_blend_space_1d_editor.h
+++ b/editor/plugins/animation_blend_space_1d_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_blend_space_1d_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_blend_space_1d_editor.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 ANIMATION_BLEND_SPACE_1D_EDITOR_H
#define ANIMATION_BLEND_SPACE_1D_EDITOR_H
@@ -40,7 +40,8 @@
#include "scene/gui/separator.h"
#include "scene/gui/tree.h"
-class EditorUndoRedoManager;
+class CheckBox;
+class PanelContainer;
class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
GDCLASS(AnimationNodeBlendSpace1DEditor, AnimationTreeNodeEditorPlugin);
@@ -79,8 +80,6 @@ class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
bool updating = false;
- Ref<EditorUndoRedoManager> undo_redo;
-
static AnimationNodeBlendSpace1DEditor *singleton;
void _blend_space_gui_input(const Ref<InputEvent> &p_event);
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index f75dcdf2d6..0daf934e17 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_blend_space_2d_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_blend_space_2d_editor.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 "animation_blend_space_2d_editor.h"
@@ -42,8 +42,12 @@
#include "editor/editor_undo_redo_manager.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/animation/animation_player.h"
+#include "scene/gui/check_box.h"
+#include "scene/gui/grid_container.h"
#include "scene/gui/menu_button.h"
+#include "scene/gui/option_button.h"
#include "scene/gui/panel.h"
+#include "scene/gui/panel_container.h"
#include "scene/main/window.h"
bool AnimationNodeBlendSpace2DEditor::can_edit(const Ref<AnimationNode> &p_node) {
@@ -70,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);
@@ -91,6 +94,11 @@ StringName AnimationNodeBlendSpace2DEditor::get_blend_position_path() const {
}
void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEvent> &p_event) {
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
Ref<InputEventKey> k = p_event;
if (tool_select->is_pressed() && k.is_valid() && k->is_pressed() && k->get_keycode() == Key::KEY_DELETE && !k->is_echo()) {
if (selected_point != -1 || selected_triangle != -1) {
@@ -114,10 +122,8 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
ClassDB::get_inheriters_from_class("AnimationRootNode", &classes);
menu->add_submenu_item(TTR("Add Animation"), "animations");
- AnimationTree *gp = AnimationTreeEditor::get_singleton()->get_tree();
- ERR_FAIL_COND(!gp);
- if (gp && gp->has_node(gp->get_animation_player())) {
- AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(gp->get_node(gp->get_animation_player()));
+ if (tree->has_node(tree->get_animation_player())) {
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(tree->get_node(tree->get_animation_player()));
if (ap) {
List<StringName> names;
ap->get_animation_list(&names);
@@ -221,6 +227,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
}
updating = true;
+ 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());
@@ -246,6 +253,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
if (!read_only) {
updating = true;
+ 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));
@@ -269,7 +277,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
blend_pos *= (blend_space->get_max_space() - blend_space->get_min_space());
blend_pos += blend_space->get_min_space();
- AnimationTreeEditor::get_singleton()->get_tree()->set(get_blend_position_path(), blend_pos);
+ tree->set(get_blend_position_path(), blend_pos);
blend_space_draw->queue_redraw();
}
@@ -299,13 +307,13 @@ 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());
blend_pos += blend_space->get_min_space();
- AnimationTreeEditor::get_singleton()->get_tree()->set(get_blend_position_path(), blend_pos);
+ tree->set(get_blend_position_path(), blend_pos);
blend_space_draw->queue_redraw();
}
@@ -315,6 +323,8 @@ void AnimationNodeBlendSpace2DEditor::_file_opened(const String &p_file) {
file_loaded = ResourceLoader::load(p_file);
if (file_loaded.is_valid()) {
_add_menu_type(MENU_LOAD_FILE_CONFIRM);
+ } else {
+ EditorNode::get_singleton()->show_warning(TTR("This type of node can't be used. Only animation nodes are allowed."));
}
}
@@ -351,6 +361,7 @@ void AnimationNodeBlendSpace2DEditor::_add_menu_type(int p_index) {
}
updating = true;
+ 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());
@@ -369,6 +380,7 @@ void AnimationNodeBlendSpace2DEditor::_add_animation_type(int p_index) {
anim->set_animation(animations_to_add[p_index]);
updating = true;
+ 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());
@@ -406,11 +418,11 @@ void AnimationNodeBlendSpace2DEditor::_tool_switch(int p_tool) {
making_triangle.clear();
if (p_tool == 2) {
- Vector<Vector2> points;
+ Vector<Vector2> bl_points;
for (int i = 0; i < blend_space->get_blend_point_count(); i++) {
- points.push_back(blend_space->get_blend_point_position(i));
+ bl_points.push_back(blend_space->get_blend_point_position(i));
}
- Vector<Delaunay2D::Triangle> tr = Delaunay2D::triangulate(points);
+ Vector<Delaunay2D::Triangle> tr = Delaunay2D::triangulate(bl_points);
for (int i = 0; i < tr.size(); i++) {
blend_space->add_triangle(tr[i].points[0], tr[i].points[1], tr[i].points[2]);
}
@@ -428,6 +440,11 @@ void AnimationNodeBlendSpace2DEditor::_tool_switch(int p_tool) {
}
void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
Color linecolor = get_theme_color(SNAME("font_color"), SNAME("Label"));
Color linecolor_soft = linecolor;
linecolor_soft.a *= 0.5;
@@ -494,8 +511,8 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
//triangles first
for (int i = 0; i < blend_space->get_triangle_count(); i++) {
- Vector<Vector2> points;
- points.resize(3);
+ Vector<Vector2> bl_points;
+ bl_points.resize(3);
for (int j = 0; j < 3; j++) {
int point_idx = blend_space->get_triangle_point(i, j);
@@ -509,11 +526,11 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space());
point *= s;
point.y = s.height - point.y;
- points.write[j] = point;
+ bl_points.write[j] = point;
}
for (int j = 0; j < 3; j++) {
- blend_space_draw->draw_line(points[j], points[(j + 1) % 3], linecolor, Math::round(EDSCALE), true);
+ blend_space_draw->draw_line(bl_points[j], bl_points[(j + 1) % 3], linecolor, Math::round(EDSCALE), true);
}
Color color;
@@ -530,7 +547,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
color,
color
};
- blend_space_draw->draw_primitive(points, colors, Vector<Vector2>());
+ blend_space_draw->draw_primitive(bl_points, colors, Vector<Vector2>());
}
points.clear();
@@ -560,19 +577,19 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
}
if (making_triangle.size()) {
- Vector<Vector2> points;
+ Vector<Vector2> bl_points;
for (int i = 0; i < making_triangle.size(); i++) {
Vector2 point = blend_space->get_blend_point_position(making_triangle[i]);
point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space());
point *= s;
point.y = s.height - point.y;
- points.push_back(point);
+ bl_points.push_back(point);
}
- for (int i = 0; i < points.size() - 1; i++) {
- blend_space_draw->draw_line(points[i], points[i + 1], linecolor, Math::round(2 * EDSCALE), true);
+ for (int i = 0; i < bl_points.size() - 1; i++) {
+ blend_space_draw->draw_line(bl_points[i], bl_points[i + 1], linecolor, Math::round(2 * EDSCALE), true);
}
- blend_space_draw->draw_line(points[points.size() - 1], blend_space_draw->get_local_mouse_position(), linecolor, Math::round(2 * EDSCALE), true);
+ blend_space_draw->draw_line(bl_points[bl_points.size() - 1], blend_space_draw->get_local_mouse_position(), linecolor, Math::round(2 * EDSCALE), true);
}
///draw cursor position
@@ -586,7 +603,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
color.a *= 0.5;
}
- Vector2 blend_pos = AnimationTreeEditor::get_singleton()->get_tree()->get(get_blend_position_path());
+ Vector2 blend_pos = tree->get(get_blend_position_path());
Vector2 point = blend_pos;
point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space());
@@ -658,6 +675,7 @@ void AnimationNodeBlendSpace2DEditor::_config_changed(double) {
}
updating = true;
+ 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());
@@ -683,6 +701,7 @@ void AnimationNodeBlendSpace2DEditor::_labels_changed(String) {
}
updating = true;
+ 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());
@@ -695,6 +714,7 @@ void AnimationNodeBlendSpace2DEditor::_labels_changed(String) {
}
void AnimationNodeBlendSpace2DEditor::_erase_selected() {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (selected_point != -1) {
updating = true;
undo_redo->create_action(TTR("Remove BlendSpace2D Point"));
@@ -757,6 +777,7 @@ void AnimationNodeBlendSpace2DEditor::_edit_point_pos(double) {
return;
}
updating = true;
+ 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));
@@ -792,14 +813,19 @@ void AnimationNodeBlendSpace2DEditor::_notification(int p_what) {
} break;
case NOTIFICATION_PROCESS: {
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
String error;
- if (!AnimationTreeEditor::get_singleton()->get_tree()) {
+ if (!tree) {
error = TTR("BlendSpace2D does not belong to an AnimationTree node.");
- } else if (!AnimationTreeEditor::get_singleton()->get_tree()->is_active()) {
+ } else if (!tree->is_active()) {
error = TTR("AnimationTree is inactive.\nActivate to enable playback, check node warnings if activation fails.");
- } else if (AnimationTreeEditor::get_singleton()->get_tree()->is_state_invalid()) {
- error = AnimationTreeEditor::get_singleton()->get_tree()->get_invalid_state_reason();
+ } else if (tree->is_state_invalid()) {
+ error = tree->get_invalid_state_reason();
} else if (blend_space->get_triangle_count() == 0) {
error = TTR("No triangles exist, so no blending can take place.");
}
@@ -828,11 +854,8 @@ void AnimationNodeBlendSpace2DEditor::_open_editor() {
}
}
-void AnimationNodeBlendSpace2DEditor::_removed_from_graph() {
- EditorNode::get_singleton()->edit_item(nullptr);
-}
-
void AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled() {
+ 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());
@@ -846,8 +869,6 @@ void AnimationNodeBlendSpace2DEditor::_bind_methods() {
ClassDB::bind_method("_update_tool_erase", &AnimationNodeBlendSpace2DEditor::_update_tool_erase);
ClassDB::bind_method("_update_edited_point_pos", &AnimationNodeBlendSpace2DEditor::_update_edited_point_pos);
-
- ClassDB::bind_method("_removed_from_graph", &AnimationNodeBlendSpace2DEditor::_removed_from_graph);
}
AnimationNodeBlendSpace2DEditor *AnimationNodeBlendSpace2DEditor::singleton = nullptr;
@@ -1056,8 +1077,6 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
error_panel->add_child(error_label);
error_label->set_text("eh");
- undo_redo = EditorNode::get_undo_redo();
-
set_custom_minimum_size(Size2(0, 300 * EDSCALE));
menu = memnew(PopupMenu);
@@ -1074,7 +1093,6 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
open_file->set_title(TTR("Open Animation Node"));
open_file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
open_file->connect("file_selected", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_file_opened));
- undo_redo = EditorNode::get_undo_redo();
selected_point = -1;
selected_triangle = -1;
diff --git a/editor/plugins/animation_blend_space_2d_editor.h b/editor/plugins/animation_blend_space_2d_editor.h
index 1f015a1804..f11cccabc1 100644
--- a/editor/plugins/animation_blend_space_2d_editor.h
+++ b/editor/plugins/animation_blend_space_2d_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_blend_space_2d_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_blend_space_2d_editor.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 ANIMATION_BLEND_SPACE_2D_EDITOR_H
#define ANIMATION_BLEND_SPACE_2D_EDITOR_H
@@ -40,7 +40,9 @@
#include "scene/gui/separator.h"
#include "scene/gui/tree.h"
-class EditorUndoRedoManager;
+class CheckBox;
+class OptionButton;
+class PanelContainer;
class AnimationNodeBlendSpace2DEditor : public AnimationTreeNodeEditorPlugin {
GDCLASS(AnimationNodeBlendSpace2DEditor, AnimationTreeNodeEditorPlugin);
@@ -85,8 +87,6 @@ class AnimationNodeBlendSpace2DEditor : public AnimationTreeNodeEditorPlugin {
bool updating;
- Ref<EditorUndoRedoManager> undo_redo;
-
static AnimationNodeBlendSpace2DEditor *singleton;
void _blend_space_gui_input(const Ref<InputEvent> &p_event);
@@ -121,8 +121,6 @@ class AnimationNodeBlendSpace2DEditor : public AnimationTreeNodeEditorPlugin {
void _edit_point_pos(double);
void _open_editor();
- void _removed_from_graph();
-
void _auto_triangles_toggled();
StringName get_blend_position_path() const;
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index f1e6c70549..f5f9ec11b3 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_blend_tree_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_blend_tree_editor_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 "animation_blend_tree_editor_plugin.h"
@@ -41,9 +41,11 @@
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "scene/animation/animation_player.h"
+#include "scene/gui/check_box.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/panel.h"
#include "scene/gui/progress_bar.h"
+#include "scene/gui/separator.h"
#include "scene/gui/view_panner.h"
#include "scene/main/window.h"
@@ -96,22 +98,31 @@ Size2 AnimationNodeBlendTreeEditor::get_minimum_size() const {
}
void AnimationNodeBlendTreeEditor::_property_changed(const StringName &p_property, const Variant &p_value, const String &p_field, bool p_changing) {
- AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_tree();
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
updating = true;
+ 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));
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->add_do_method(this, "update_graph");
+ undo_redo->add_undo_method(this, "update_graph");
undo_redo->commit_action();
updating = false;
}
-void AnimationNodeBlendTreeEditor::_update_graph() {
+void AnimationNodeBlendTreeEditor::update_graph() {
if (updating || blend_tree.is_null()) {
return;
}
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
visible_properties.clear();
graph->set_scroll_ofs(blend_tree->get_graph_offset() * EDSCALE);
@@ -153,7 +164,8 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
node->add_child(name);
node->set_slot(0, false, 0, Color(), true, read_only ? -1 : 0, get_theme_color(SNAME("font_color"), SNAME("Label")));
name->connect("text_submitted", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_renamed).bind(agnode), CONNECT_DEFERRED);
- name->connect("focus_exited", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_renamed_focus_out).bind(name, agnode), CONNECT_DEFERRED);
+ name->connect("focus_exited", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_renamed_focus_out).bind(agnode), CONNECT_DEFERRED);
+ name->connect("text_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_rename_lineedit_changed), CONNECT_DEFERRED);
base = 1;
node->set_show_close_button(true);
node->connect("close_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_request).bind(E), CONNECT_DEFERRED);
@@ -173,10 +185,10 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
continue;
}
String base_path = AnimationTreeEditor::get_singleton()->get_base_path() + String(E) + "/" + F.name;
- EditorProperty *prop = EditorInspector::instantiate_property_editor(AnimationTreeEditor::get_singleton()->get_tree(), F.type, base_path, F.hint, F.hint_string, F.usage);
+ 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_object_and_property(AnimationTreeEditor::get_singleton()->get_tree(), base_path);
+ 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);
prop->connect("property_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_property_changed));
@@ -224,9 +236,8 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
ProgressBar *pb = memnew(ProgressBar);
- AnimationTree *player = AnimationTreeEditor::get_singleton()->get_tree();
- if (player->has_node(player->get_animation_player())) {
- AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(player->get_node(player->get_animation_player()));
+ if (tree->has_node(tree->get_animation_player())) {
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(tree->get_node(tree->get_animation_player()));
if (ap) {
List<StringName> anims;
ap->get_animation_list(&anims);
@@ -262,10 +273,10 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
node->add_theme_color_override("resizer_color", c);
}
- List<AnimationNodeBlendTree::NodeConnection> connections;
- blend_tree->get_node_connections(&connections);
+ List<AnimationNodeBlendTree::NodeConnection> node_connections;
+ blend_tree->get_node_connections(&node_connections);
- for (const AnimationNodeBlendTree::NodeConnection &E : connections) {
+ for (const AnimationNodeBlendTree::NodeConnection &E : node_connections) {
StringName from = E.output_node;
StringName to = E.input_node;
int to_idx = E.input_index;
@@ -273,9 +284,9 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
graph->connect_node(from, 0, to, to_idx);
}
- float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
+ float graph_minimap_opacity = EDITOR_GET("editors/visual_editors/minimap_opacity");
graph->set_minimap_opacity(graph_minimap_opacity);
- float graph_lines_curvature = EditorSettings::get_singleton()->get("editors/visual_editors/lines_curvature");
+ float graph_lines_curvature = EDITOR_GET("editors/visual_editors/lines_curvature");
graph->set_connection_lines_curvature(graph_lines_curvature);
}
@@ -283,6 +294,8 @@ void AnimationNodeBlendTreeEditor::_file_opened(const String &p_file) {
file_loaded = ResourceLoader::load(p_file);
if (file_loaded.is_valid()) {
_add_node(MENU_LOAD_FILE_CONFIRM);
+ } else {
+ EditorNode::get_singleton()->show_warning(TTR("This type of node can't be used. Only animation nodes are allowed."));
}
}
@@ -293,9 +306,9 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
if (p_idx == MENU_LOAD_FILE) {
open_file->clear_filters();
- List<String> filters;
- ResourceLoader::get_recognized_extensions_for_type("AnimationNode", &filters);
- for (const String &E : filters) {
+ List<String> ext_filters;
+ ResourceLoader::get_recognized_extensions_for_type("AnimationNode", &ext_filters);
+ for (const String &E : ext_filters) {
open_file->add_filter("*." + E);
}
open_file->popup_file_dialog();
@@ -350,6 +363,7 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
name = base_name + " " + itos(base);
}
+ 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);
@@ -364,16 +378,16 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
to_slot = -1;
}
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->add_do_method(this, "update_graph");
+ undo_redo->add_undo_method(this, "update_graph");
undo_redo->commit_action();
}
-void AnimationNodeBlendTreeEditor::_popup(bool p_has_input_ports, const Vector2 &p_popup_position, const Vector2 &p_node_position) {
+void AnimationNodeBlendTreeEditor::_popup(bool p_has_input_ports, const Vector2 &p_node_position) {
_update_options_menu(p_has_input_ports);
use_position_from_popup_menu = true;
position_from_popup_menu = p_node_position;
- add_node->get_popup()->set_position(p_popup_position);
+ add_node->get_popup()->set_position(graph->get_screen_position() + graph->get_local_mouse_position());
add_node->get_popup()->reset_size();
add_node->get_popup()->popup();
}
@@ -383,7 +397,7 @@ void AnimationNodeBlendTreeEditor::_popup_request(const Vector2 &p_position) {
return;
}
- _popup(false, graph->get_screen_position() + graph->get_local_mouse_position(), p_position);
+ _popup(false, p_position);
}
void AnimationNodeBlendTreeEditor::_connection_to_empty(const String &p_from, int p_from_slot, const Vector2 &p_release_position) {
@@ -394,7 +408,7 @@ void AnimationNodeBlendTreeEditor::_connection_to_empty(const String &p_from, in
Ref<AnimationNode> node = blend_tree->get_node(p_from);
if (node.is_valid()) {
from_node = p_from;
- _popup(true, p_release_position, graph->get_global_mouse_position());
+ _popup(true, p_release_position);
}
}
@@ -407,17 +421,23 @@ void AnimationNodeBlendTreeEditor::_connection_from_empty(const String &p_to, in
if (node.is_valid()) {
to_node = p_to;
to_slot = p_to_slot;
- _popup(false, p_release_position, graph->get_global_mouse_position());
+ _popup(false, p_release_position);
}
}
+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;
+ 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);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->add_do_method(this, "update_graph");
+ undo_redo->add_undo_method(this, "update_graph");
undo_redo->commit_action();
updating = false;
}
@@ -434,11 +454,12 @@ void AnimationNodeBlendTreeEditor::_connection_request(const String &p_from, int
return;
}
+ 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);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->add_do_method(this, "update_graph");
+ undo_redo->add_undo_method(this, "update_graph");
undo_redo->commit_action();
}
@@ -450,11 +471,12 @@ void AnimationNodeBlendTreeEditor::_disconnection_request(const String &p_from,
graph->disconnect_node(p_from, p_from_index, p_to, p_to_index);
updating = true;
+ 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);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->add_do_method(this, "update_graph");
+ undo_redo->add_undo_method(this, "update_graph");
undo_redo->commit_action();
updating = false;
}
@@ -465,11 +487,12 @@ 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());
+ 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());
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->add_do_method(this, "update_graph");
+ undo_redo->add_undo_method(this, "update_graph");
undo_redo->commit_action();
}
@@ -478,6 +501,7 @@ void AnimationNodeBlendTreeEditor::_delete_request(const String &p_which) {
return;
}
+ 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));
@@ -491,8 +515,8 @@ void AnimationNodeBlendTreeEditor::_delete_request(const String &p_which) {
}
}
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->add_do_method(this, "update_graph");
+ undo_redo->add_undo_method(this, "update_graph");
undo_redo->commit_action();
}
@@ -522,6 +546,7 @@ void AnimationNodeBlendTreeEditor::_delete_nodes_request(const TypedArray<String
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete Node(s)"));
for (const StringName &F : to_erase) {
@@ -555,6 +580,7 @@ void AnimationNodeBlendTreeEditor::_open_in_editor(const String &p_which) {
void AnimationNodeBlendTreeEditor::_filter_toggled() {
updating = true;
+ 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());
@@ -572,6 +598,7 @@ void AnimationNodeBlendTreeEditor::_filter_edited() {
bool filtered = edited->is_checked(0);
updating = true;
+ 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));
@@ -586,14 +613,19 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
return false;
}
- NodePath player_path = AnimationTreeEditor::get_singleton()->get_tree()->get_animation_player();
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return false;
+ }
+
+ NodePath player_path = tree->get_animation_player();
- if (!AnimationTreeEditor::get_singleton()->get_tree()->has_node(player_path)) {
+ if (!tree->has_node(player_path)) {
EditorNode::get_singleton()->show_warning(TTR("No animation player set, so unable to retrieve track names."));
return false;
}
- AnimationPlayer *player = Object::cast_to<AnimationPlayer>(AnimationTreeEditor::get_singleton()->get_tree()->get_node(player_path));
+ AnimationPlayer *player = Object::cast_to<AnimationPlayer>(tree->get_node(player_path));
if (!player) {
EditorNode::get_singleton()->show_warning(TTR("Player path set is invalid, so unable to retrieve track names."));
return false;
@@ -611,10 +643,10 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
HashSet<String> paths;
HashMap<String, RBSet<String>> types;
{
- List<StringName> animations;
- player->get_animation_list(&animations);
+ List<StringName> animation_list;
+ player->get_animation_list(&animation_list);
- for (const StringName &E : animations) {
+ for (const StringName &E : animation_list) {
Ref<Animation> anim = player->get_animation(E);
for (int i = 0; i < anim->get_track_count(); i++) {
String track_path = anim->track_get_path(i);
@@ -788,15 +820,9 @@ void AnimationNodeBlendTreeEditor::_inspect_filters(const String &p_which) {
filter_dialog->popup_centered(Size2(500, 500) * EDSCALE);
}
-void AnimationNodeBlendTreeEditor::_removed_from_graph() {
- if (is_visible()) {
- EditorNode::get_singleton()->edit_item(nullptr);
- }
-}
-
void AnimationNodeBlendTreeEditor::_update_editor_settings() {
- graph->get_panner()->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/sub_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
- graph->set_warped_panning(bool(EditorSettings::get_singleton()->get("editors/panning/warped_mouse_panning")));
+ graph->get_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")));
+ graph->set_warped_panning(bool(EDITOR_GET("editors/panning/warped_mouse_panning")));
}
void AnimationNodeBlendTreeEditor::_update_theme() {
@@ -819,17 +845,22 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) {
_update_theme();
if (is_visible_in_tree()) {
- _update_graph();
+ update_graph();
}
} break;
case NOTIFICATION_PROCESS: {
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return; // Node has been changed.
+ }
+
String error;
- if (!AnimationTreeEditor::get_singleton()->get_tree()->is_active()) {
+ if (!tree->is_active()) {
error = TTR("AnimationTree is inactive.\nActivate to enable playback, check node warnings if activation fails.");
- } else if (AnimationTreeEditor::get_singleton()->get_tree()->is_state_invalid()) {
- error = AnimationTreeEditor::get_singleton()->get_tree()->get_invalid_state_reason();
+ } else if (tree->is_state_invalid()) {
+ error = tree->get_invalid_state_reason();
}
if (error != error_label->get_text()) {
@@ -846,16 +877,15 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) {
for (const AnimationNodeBlendTree::NodeConnection &E : conns) {
float activity = 0;
StringName path = AnimationTreeEditor::get_singleton()->get_base_path() + E.input_node;
- if (AnimationTreeEditor::get_singleton()->get_tree() && !AnimationTreeEditor::get_singleton()->get_tree()->is_state_invalid()) {
- activity = AnimationTreeEditor::get_singleton()->get_tree()->get_connection_activity(path, E.input_index);
+ if (!tree->is_state_invalid()) {
+ activity = tree->get_connection_activity(path, E.input_index);
}
graph->set_connection_activity(E.output_node, 0, E.input_node, E.input_index, activity);
}
- AnimationTree *graph_player = AnimationTreeEditor::get_singleton()->get_tree();
AnimationPlayer *player = nullptr;
- if (graph_player->has_node(graph_player->get_animation_player())) {
- player = Object::cast_to<AnimationPlayer>(graph_player->get_node(graph_player->get_animation_player()));
+ if (tree->has_node(tree->get_animation_player())) {
+ player = Object::cast_to<AnimationPlayer>(tree->get_node(tree->get_animation_player()));
}
if (player) {
@@ -868,7 +898,7 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) {
E.value->set_max(anim->get_length());
//StringName path = AnimationTreeEditor::get_singleton()->get_base_path() + E.input_node;
StringName time_path = AnimationTreeEditor::get_singleton()->get_base_path() + String(E.key) + "/time";
- E.value->set_value(AnimationTreeEditor::get_singleton()->get_tree()->get(time_path));
+ E.value->set_value(tree->get(time_path));
}
}
}
@@ -900,13 +930,33 @@ void AnimationNodeBlendTreeEditor::_scroll_changed(const Vector2 &p_scroll) {
}
void AnimationNodeBlendTreeEditor::_bind_methods() {
- ClassDB::bind_method("_update_graph", &AnimationNodeBlendTreeEditor::_update_graph);
+ ClassDB::bind_method("update_graph", &AnimationNodeBlendTreeEditor::update_graph);
ClassDB::bind_method("_update_filters", &AnimationNodeBlendTreeEditor::_update_filters);
}
AnimationNodeBlendTreeEditor *AnimationNodeBlendTreeEditor::singleton = nullptr;
+// AnimationNode's "node_changed" signal means almost update_input.
+void AnimationNodeBlendTreeEditor::_node_changed(const StringName &p_node_name) {
+ // TODO:
+ // Here is executed during the commit of EditorNode::undo_redo, it is not possible to create an undo_redo action here.
+ // The disconnect when the number of enabled inputs decreases is done in AnimationNodeBlendTree and update_graph().
+ // This means that there is no place to register undo_redo actions.
+ // In order to implement undo_redo correctly, we may need to implement AnimationNodeEdit such as AnimationTrackKeyEdit
+ // and add it to _node_selected() with EditorNode::get_singleton()->push_item(AnimationNodeEdit).
+ update_graph();
+}
+
void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<AnimationNode> p_node) {
+ if (blend_tree.is_null()) {
+ return;
+ }
+
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
String prev_name = blend_tree->get_node_name(p_node);
ERR_FAIL_COND(prev_name.is_empty());
GraphNode *gn = Object::cast_to<GraphNode>(graph->get_node(prev_name));
@@ -931,13 +981,14 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
String base_path = AnimationTreeEditor::get_singleton()->get_base_path();
updating = true;
+ 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);
- undo_redo->add_do_method(AnimationTreeEditor::get_singleton()->get_tree(), "rename_parameter", base_path + prev_name, base_path + name);
- undo_redo->add_undo_method(AnimationTreeEditor::get_singleton()->get_tree(), "rename_parameter", base_path + name, base_path + prev_name);
- undo_redo->add_do_method(this, "_update_graph");
- undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->add_do_method(tree, "rename_parameter", base_path + prev_name, base_path + name);
+ undo_redo->add_undo_method(tree, "rename_parameter", base_path + name, base_path + prev_name);
+ undo_redo->add_do_method(this, "update_graph");
+ undo_redo->add_undo_method(this, "update_graph");
undo_redo->commit_action();
updating = false;
gn->set_name(new_name);
@@ -955,10 +1006,10 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
//recreate connections
graph->clear_connections();
- List<AnimationNodeBlendTree::NodeConnection> connections;
- blend_tree->get_node_connections(&connections);
+ List<AnimationNodeBlendTree::NodeConnection> node_connections;
+ blend_tree->get_node_connections(&node_connections);
- for (const AnimationNodeBlendTree::NodeConnection &E : connections) {
+ for (const AnimationNodeBlendTree::NodeConnection &E : node_connections) {
StringName from = E.output_node;
StringName to = E.input_node;
int to_idx = E.input_index;
@@ -975,14 +1026,19 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
}
}
- _update_graph(); // Needed to update the signal connections with the new name.
+ update_graph(); // Needed to update the signal connections with the new name.
+ current_node_rename_text = String();
}
-void AnimationNodeBlendTreeEditor::_node_renamed_focus_out(Node *le, Ref<AnimationNode> p_node) {
- if (le == nullptr) {
+void AnimationNodeBlendTreeEditor::_node_renamed_focus_out(Ref<AnimationNode> p_node) {
+ if (current_node_rename_text.is_empty()) {
return; // The text_submitted signal triggered the graph update and freed the LineEdit.
}
- _node_renamed(le->call("get_text"), p_node);
+ _node_renamed(current_node_rename_text, p_node);
+}
+
+void AnimationNodeBlendTreeEditor::_node_rename_lineedit_changed(const String &p_text) {
+ current_node_rename_text = p_text;
}
bool AnimationNodeBlendTreeEditor::can_edit(const Ref<AnimationNode> &p_node) {
@@ -992,7 +1048,7 @@ bool AnimationNodeBlendTreeEditor::can_edit(const Ref<AnimationNode> &p_node) {
void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) {
if (blend_tree.is_valid()) {
- blend_tree->disconnect("removed_from_graph", callable_mp(this, &AnimationNodeBlendTreeEditor::_removed_from_graph));
+ blend_tree->disconnect("node_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_changed));
}
blend_tree = p_node;
@@ -1004,9 +1060,9 @@ void AnimationNodeBlendTreeEditor::edit(const Ref<AnimationNode> &p_node) {
} else {
read_only = EditorNode::get_singleton()->is_resource_read_only(blend_tree);
- blend_tree->connect("removed_from_graph", callable_mp(this, &AnimationNodeBlendTreeEditor::_removed_from_graph));
+ blend_tree->connect("node_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_changed));
- _update_graph();
+ update_graph();
}
add_node->set_disabled(read_only);
@@ -1031,9 +1087,9 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
graph->connect("popup_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_popup_request));
graph->connect("connection_to_empty", callable_mp(this, &AnimationNodeBlendTreeEditor::_connection_to_empty));
graph->connect("connection_from_empty", callable_mp(this, &AnimationNodeBlendTreeEditor::_connection_from_empty));
- float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
+ float graph_minimap_opacity = EDITOR_GET("editors/visual_editors/minimap_opacity");
graph->set_minimap_opacity(graph_minimap_opacity);
- float graph_lines_curvature = EditorSettings::get_singleton()->get("editors/visual_editors/lines_curvature");
+ float graph_lines_curvature = EDITOR_GET("editors/visual_editors/lines_curvature");
graph->set_connection_lines_curvature(graph_lines_curvature);
VSeparator *vs = memnew(VSeparator);
@@ -1045,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);
@@ -1092,5 +1149,4 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
open_file->set_title(TTR("Open Animation Node"));
open_file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
open_file->connect("file_selected", callable_mp(this, &AnimationNodeBlendTreeEditor::_file_opened));
- undo_redo = EditorNode::get_undo_redo();
}
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h
index 30a54930a2..afb3394238 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.h
+++ b/editor/plugins/animation_blend_tree_editor_plugin.h
@@ -1,47 +1,51 @@
-/*************************************************************************/
-/* animation_blend_tree_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_blend_tree_editor_plugin.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 ANIMATION_BLEND_TREE_EDITOR_PLUGIN_H
#define ANIMATION_BLEND_TREE_EDITOR_PLUGIN_H
-#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
+#include "scene/gui/panel_container.h"
#include "scene/gui/popup.h"
#include "scene/gui/tree.h"
+class AcceptDialog;
+class CheckBox;
class ProgressBar;
class EditorFileDialog;
-class EditorUndoRedoManager;
+class EditorProperty;
+class MenuButton;
+class PanelContainer;
class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
GDCLASS(AnimationNodeBlendTreeEditor, AnimationTreeNodeEditorPlugin);
@@ -58,8 +62,6 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
PanelContainer *error_panel = nullptr;
Label *error_label = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
-
AcceptDialog *filter_dialog = nullptr;
Tree *filters = nullptr;
CheckBox *filter_enabled = nullptr;
@@ -71,8 +73,6 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
int to_slot = -1;
String from_node = "";
- void _update_graph();
-
struct AddOption {
String name;
String type;
@@ -94,8 +94,11 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
void _node_dragged(const Vector2 &p_from, const Vector2 &p_to, const StringName &p_which);
void _node_renamed(const String &p_text, Ref<AnimationNode> p_node);
- void _node_renamed_focus_out(Node *le, Ref<AnimationNode> p_node);
+ void _node_renamed_focus_out(Ref<AnimationNode> p_node);
+ void _node_rename_lineedit_changed(const String &p_text);
+ void _node_changed(const StringName &p_node_name);
+ String current_node_rename_text;
bool updating;
void _connection_request(const String &p_from, int p_from_index, const String &p_to, int p_to_index);
@@ -114,13 +117,13 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
void _filter_toggled();
Ref<AnimationNode> _filter_edit;
- void _popup(bool p_has_input_ports, const Vector2 &p_popup_position, const Vector2 &p_node_position);
+ void _popup(bool p_has_input_ports, const Vector2 &p_node_position);
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);
- void _removed_from_graph();
void _update_editor_settings();
void _update_theme();
@@ -150,6 +153,8 @@ public:
virtual bool can_edit(const Ref<AnimationNode> &p_node) override;
virtual void edit(const Ref<AnimationNode> &p_node) override;
+ void update_graph();
+
AnimationNodeBlendTreeEditor();
};
diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp
index 2d20c0cca7..bf7e419fe4 100644
--- a/editor/plugins/animation_library_editor.cpp
+++ b/editor/plugins/animation_library_editor.cpp
@@ -1,37 +1,38 @@
-/*************************************************************************/
-/* animation_library_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_library_editor.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 "animation_library_editor.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
void AnimationLibraryEditor::set_animation_player(Object *p_player) {
@@ -93,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());
@@ -110,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();
@@ -210,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);
@@ -279,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);
@@ -327,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);
@@ -365,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);
@@ -381,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());
@@ -402,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());
@@ -420,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;
@@ -534,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);
@@ -553,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);
@@ -593,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;
@@ -601,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_library_editor.h b/editor/plugins/animation_library_editor.h
index 6e214860b8..a9b2c72b9d 100644
--- a/editor/plugins/animation_library_editor.h
+++ b/editor/plugins/animation_library_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_library_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_library_editor.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 ANIMATION_LIBRARY_EDITOR_H
#define ANIMATION_LIBRARY_EDITOR_H
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 5406aada09..06241d07cf 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_player_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_player_editor_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 "animation_player_editor_plugin.h"
@@ -39,9 +39,12 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
+#include "editor/inspector_dock.h"
#include "editor/plugins/canvas_item_editor_plugin.h" // For onion skinning.
#include "editor/plugins/node_3d_editor_plugin.h" // For onion skinning.
#include "editor/scene_tree_dock.h"
+#include "scene/gui/separator.h"
#include "scene/main/window.h"
#include "scene/resources/animation.h"
#include "scene/scene_string_names.h"
@@ -84,13 +87,14 @@ void AnimationPlayerEditor::_notification(int p_what) {
}
frame->set_value(player->get_current_animation_position());
track_editor->set_anim_pos(player->get_current_animation_position());
-
} else if (!player->is_valid()) {
// Reset timeline when the player has been stopped externally
frame->set_value(0);
} else if (last_active) {
// 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();
@@ -116,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")));
@@ -128,16 +139,12 @@ void AnimationPlayerEditor::_notification(int p_what) {
{
Ref<Image> autoplay_img = autoplay_icon->get_image();
Ref<Image> reset_img = reset_icon->get_image();
- Ref<Image> autoplay_reset_img;
Size2 icon_size = autoplay_img->get_size();
- autoplay_reset_img.instantiate();
- autoplay_reset_img->create(icon_size.x * 2, icon_size.y, false, autoplay_img->get_format());
+ Ref<Image> autoplay_reset_img = Image::create_empty(icon_size.x * 2, icon_size.y, false, autoplay_img->get_format());
autoplay_reset_img->blit_rect(autoplay_img, Rect2i(Point2i(), icon_size), Point2i());
autoplay_reset_img->blit_rect(reset_img, Rect2i(Point2i(), icon_size), Point2i(icon_size.x, 0));
- autoplay_reset_icon.instantiate();
- autoplay_reset_icon->set_image(autoplay_reset_img);
+ 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,6 +177,7 @@ void AnimationPlayerEditor::_autoplay_pressed() {
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
String current = animation->get_item_text(animation->get_selected());
if (player->get_autoplay() == current) {
//unset
@@ -198,11 +206,12 @@ void AnimationPlayerEditor::_play_pressed() {
if (current == player->get_assigned_animation()) {
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);
}
//unstop
- stop->set_pressed(false);
+ stop->set_icon(pause_icon);
}
void AnimationPlayerEditor::_play_from_pressed() {
@@ -210,17 +219,16 @@ void AnimationPlayerEditor::_play_from_pressed() {
if (!current.is_empty()) {
float time = player->get_current_animation_position();
-
if (current == player->get_assigned_animation() && player->is_playing()) {
player->stop(); //so it won't blend with itself
}
-
- player->play(current);
+ 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);
}
//unstop
- stop->set_pressed(false);
+ stop->set_icon(pause_icon);
}
String AnimationPlayerEditor::_get_current() const {
@@ -236,11 +244,12 @@ void AnimationPlayerEditor::_play_bw_pressed() {
if (current == player->get_assigned_animation()) {
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);
}
//unstop
- stop->set_pressed(false);
+ stop->set_icon(pause_icon);
}
void AnimationPlayerEditor::_play_bw_from_pressed() {
@@ -251,13 +260,13 @@ void AnimationPlayerEditor::_play_bw_from_pressed() {
if (current == player->get_assigned_animation()) {
player->stop(); //so it won't blend with itself
}
-
- player->play(current, -1, -1, true);
+ 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);
}
//unstop
- stop->set_pressed(false);
+ stop->set_icon(pause_icon);
}
void AnimationPlayerEditor::_stop_pressed() {
@@ -265,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) {
@@ -302,11 +318,13 @@ void AnimationPlayerEditor::_animation_selected(int p_which) {
AnimationPlayerEditor::get_singleton()->get_track_editor()->update_keying();
_animation_key_editor_seek(timeline_position, false);
+
+ emit_signal("animation_selected", current);
}
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());
@@ -319,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++;
@@ -384,6 +402,7 @@ void AnimationPlayerEditor::_animation_remove_confirmed() {
if (current.contains("/")) {
current = current.get_slice("/", 1);
}
+ 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", "");
@@ -418,7 +437,7 @@ void AnimationPlayerEditor::_select_anim_by_name(const String &p_anim) {
_animation_selected(idx);
}
-double AnimationPlayerEditor::_get_editor_step() const {
+float AnimationPlayerEditor::_get_editor_step() const {
// Returns the effective snapping value depending on snapping modifiers, or 0 if snapping is disabled.
if (track_editor->is_snap_enabled()) {
const String current = player->get_assigned_animation();
@@ -429,7 +448,7 @@ double AnimationPlayerEditor::_get_editor_step() const {
return Input::get_singleton()->is_key_pressed(Key::SHIFT) ? anim->get_step() * 0.25 : anim->get_step();
}
- return 0.0;
+ return 0.0f;
}
void AnimationPlayerEditor::_animation_name_edited() {
@@ -459,6 +478,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (name_dialog_op) {
case TOOL_RENAME_ANIM: {
String current = animation->get_item_text(animation->get_selected());
@@ -593,6 +613,7 @@ void AnimationPlayerEditor::_blend_editor_next_changed(const int p_idx) {
String current = animation->get_item_text(animation->get_selected());
+ 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));
@@ -679,6 +700,7 @@ void AnimationPlayerEditor::_blend_edited() {
float blend_time = selected->get_range(1);
float prev_blend_time = player->get_blend_time(current, to);
+ 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);
@@ -720,7 +742,18 @@ void AnimationPlayerEditor::set_state(const Dictionary &p_state) {
if (p_state.has("player")) {
Node *n = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["player"]);
if (Object::cast_to<AnimationPlayer>(n) && EditorNode::get_singleton()->get_editor_selection()->is_selected(n)) {
+ if (player) {
+ if (player->is_connected("animation_libraries_updated", callable_mp(this, &AnimationPlayerEditor::_animation_libraries_updated))) {
+ player->disconnect("animation_libraries_updated", callable_mp(this, &AnimationPlayerEditor::_animation_libraries_updated));
+ }
+ }
player = Object::cast_to<AnimationPlayer>(n);
+ if (player) {
+ if (!player->is_connected("animation_libraries_updated", callable_mp(this, &AnimationPlayerEditor::_animation_libraries_updated))) {
+ player->connect("animation_libraries_updated", callable_mp(this, &AnimationPlayerEditor::_animation_libraries_updated));
+ }
+ }
+
_update_player();
EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
set_process(true);
@@ -779,12 +812,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));
@@ -826,13 +856,13 @@ void AnimationPlayerEditor::_update_player() {
}
// Check if the global library is foreign since we want to disable options for adding/remove/renaming animations if it is.
- Ref<AnimationLibrary> library = player->get_animation_library(K);
+ Ref<AnimationLibrary> anim_library = player->get_animation_library(K);
if (K == "") {
- foreign_global_anim_lib = EditorNode::get_singleton()->is_resource_read_only(library);
+ foreign_global_anim_lib = EditorNode::get_singleton()->is_resource_read_only(anim_library);
}
List<StringName> animlist;
- library->get_animation_list(&animlist);
+ anim_library->get_animation_list(&animlist);
for (const StringName &E : animlist) {
String path = K;
@@ -874,6 +904,11 @@ void AnimationPlayerEditor::_update_player() {
onion_toggle->set_disabled(no_anims_found);
onion_skinning->set_disabled(no_anims_found);
+ if (hack_disable_onion_skinning) {
+ onion_toggle->set_disabled(true);
+ onion_skinning->set_disabled(true);
+ }
+
_update_animation_list_icons();
updating = false;
@@ -908,19 +943,19 @@ void AnimationPlayerEditor::_update_player() {
void AnimationPlayerEditor::_update_animation_list_icons() {
for (int i = 0; i < animation->get_item_count(); i++) {
- String name = animation->get_item_text(i);
+ String anim_name = animation->get_item_text(i);
if (animation->is_item_disabled(i) || animation->is_item_separator(i)) {
continue;
}
Ref<Texture2D> icon;
- if (name == player->get_autoplay()) {
- if (name == SceneStringNames::get_singleton()->RESET) {
+ if (anim_name == player->get_autoplay()) {
+ if (anim_name == SceneStringNames::get_singleton()->RESET) {
icon = autoplay_reset_icon;
} else {
icon = autoplay_icon;
}
- } else if (name == SceneStringNames::get_singleton()->RESET) {
+ } else if (anim_name == SceneStringNames::get_singleton()->RESET) {
icon = reset_icon;
}
@@ -929,7 +964,7 @@ void AnimationPlayerEditor::_update_animation_list_icons() {
}
void AnimationPlayerEditor::_update_name_dialog_library_dropdown() {
- StringName current_library_name = StringName();
+ StringName current_library_name;
if (animation->has_selectable_items()) {
String current_animation_name = animation->get_item_text(animation->get_selected());
Ref<Animation> current_animation = player->get_animation(current_animation_name);
@@ -969,17 +1004,22 @@ void AnimationPlayerEditor::_update_name_dialog_library_dropdown() {
}
}
-void AnimationPlayerEditor::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
void AnimationPlayerEditor::edit(AnimationPlayer *p_player) {
if (player && pin->is_pressed()) {
return; // Ignore, pinned.
}
+
+ if (player) {
+ if (player->is_connected("animation_libraries_updated", callable_mp(this, &AnimationPlayerEditor::_animation_libraries_updated))) {
+ player->disconnect("animation_libraries_updated", callable_mp(this, &AnimationPlayerEditor::_animation_libraries_updated));
+ }
+ }
player = p_player;
if (player) {
+ if (!player->is_connected("animation_libraries_updated", callable_mp(this, &AnimationPlayerEditor::_animation_libraries_updated))) {
+ player->connect("animation_libraries_updated", callable_mp(this, &AnimationPlayerEditor::_animation_libraries_updated));
+ }
_update_player();
if (onion.enabled) {
@@ -1126,7 +1166,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);
}
}
@@ -1146,6 +1186,10 @@ void AnimationPlayerEditor::_animation_player_changed(Object *p_pl) {
}
}
+void AnimationPlayerEditor::_animation_libraries_updated() {
+ _animation_player_changed(player);
+}
+
void AnimationPlayerEditor::_list_changed() {
if (is_visible_in_tree()) {
_update_player();
@@ -1351,8 +1395,8 @@ void AnimationPlayerEditor::_free_onion_layers() {
void AnimationPlayerEditor::_prepare_onion_layers_1() {
// This would be called per viewport and we want to act once only.
- int64_t frame = get_tree()->get_frame();
- if (frame == onion.last_frame) {
+ int64_t cur_frame = get_tree()->get_frame();
+ if (cur_frame == onion.last_frame) {
return;
}
@@ -1361,7 +1405,7 @@ void AnimationPlayerEditor::_prepare_onion_layers_1() {
return;
}
- onion.last_frame = frame;
+ onion.last_frame = cur_frame;
// Refresh viewports with no onion layers overlaid.
onion.can_overlay = false;
@@ -1532,6 +1576,53 @@ void AnimationPlayerEditor::_pin_pressed() {
SceneTreeDock::get_singleton()->get_tree_editor()->update_tree();
}
+bool AnimationPlayerEditor::_validate_tracks(const Ref<Animation> p_anim) {
+ bool is_valid = true;
+ if (!p_anim.is_valid()) {
+ return true; // There is a problem outside of the animation track.
+ }
+ int len = p_anim->get_track_count();
+ for (int i = 0; i < len; i++) {
+ Animation::TrackType ttype = p_anim->track_get_type(i);
+ if (ttype == Animation::TYPE_ROTATION_3D) {
+ int key_len = p_anim->track_get_key_count(i);
+ for (int j = 0; j < key_len; j++) {
+ Quaternion q;
+ p_anim->rotation_track_get_key(i, j, &q);
+ ERR_BREAK_EDMSG(!q.is_normalized(), "AnimationPlayer: '" + player->get_name() + "', Animation: '" + player->get_current_animation() + "', rotation track: '" + p_anim->track_get_path(i) + "' contains unnormalized Quaternion key.");
+ }
+ } else if (ttype == Animation::TYPE_VALUE) {
+ int key_len = p_anim->track_get_key_count(i);
+ if (key_len == 0) {
+ continue;
+ }
+ switch (p_anim->track_get_key_value(i, 0).get_type()) {
+ case Variant::QUATERNION: {
+ for (int j = 0; j < key_len; j++) {
+ Quaternion q = Quaternion(p_anim->track_get_key_value(i, j));
+ if (!q.is_normalized()) {
+ is_valid = false;
+ ERR_BREAK_EDMSG(true, "AnimationPlayer: '" + player->get_name() + "', Animation: '" + player->get_current_animation() + "', value track: '" + p_anim->track_get_path(i) + "' contains unnormalized Quaternion key.");
+ }
+ }
+ } break;
+ case Variant::TRANSFORM3D: {
+ for (int j = 0; j < key_len; j++) {
+ Transform3D t = Transform3D(p_anim->track_get_key_value(i, j));
+ if (!t.basis.orthonormalized().is_rotation()) {
+ is_valid = false;
+ ERR_BREAK_EDMSG(true, "AnimationPlayer: '" + player->get_name() + "', Animation: '" + player->get_current_animation() + "', value track: '" + p_anim->track_get_path(i) + "' contains corrupted basis (some axes are too close other axis or scaled by zero) Transform3D key.");
+ }
+ }
+ } break;
+ default: {
+ } break;
+ }
+ }
+ }
+ return is_valid;
+}
+
void AnimationPlayerEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_animation_new"), &AnimationPlayerEditor::_animation_new);
ClassDB::bind_method(D_METHOD("_animation_rename"), &AnimationPlayerEditor::_animation_rename);
@@ -1540,6 +1631,7 @@ void AnimationPlayerEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_animation_edit"), &AnimationPlayerEditor::_animation_edit);
ClassDB::bind_method(D_METHOD("_animation_resource_edit"), &AnimationPlayerEditor::_animation_resource_edit);
ClassDB::bind_method(D_METHOD("_animation_player_changed"), &AnimationPlayerEditor::_animation_player_changed);
+ ClassDB::bind_method(D_METHOD("_animation_libraries_updated"), &AnimationPlayerEditor::_animation_libraries_updated);
ClassDB::bind_method(D_METHOD("_list_changed"), &AnimationPlayerEditor::_list_changed);
ClassDB::bind_method(D_METHOD("_animation_duplicate"), &AnimationPlayerEditor::_animation_duplicate);
@@ -1547,6 +1639,8 @@ void AnimationPlayerEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_prepare_onion_layers_2"), &AnimationPlayerEditor::_prepare_onion_layers_2);
ClassDB::bind_method(D_METHOD("_start_onion_skinning"), &AnimationPlayerEditor::_start_onion_skinning);
ClassDB::bind_method(D_METHOD("_stop_onion_skinning"), &AnimationPlayerEditor::_stop_onion_skinning);
+
+ ADD_SIGNAL(MethodInfo("animation_selected", PropertyInfo(Variant::STRING, "name")));
}
AnimationPlayerEditor *AnimationPlayerEditor::singleton = nullptr;
@@ -1580,7 +1674,6 @@ 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)"));
@@ -1678,6 +1771,16 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
onion_skinning->get_popup()->add_check_item(TTR("Include Gizmos (3D)"), ONION_SKINNING_INCLUDE_GIZMOS);
hb->add_child(onion_skinning);
+ // FIXME: Onion skinning disabled for now as it's broken and triggers fast
+ // flickering red/blue modulation (GH-53870).
+ if (hack_disable_onion_skinning) {
+ onion_toggle->set_disabled(true);
+ onion_toggle->set_tooltip_text(TTR("Onion Skinning temporarily disabled due to rendering bug."));
+
+ onion_skinning->set_disabled(true);
+ onion_skinning->set_tooltip_text(TTR("Onion Skinning temporarily disabled due to rendering bug."));
+ }
+
hb->add_child(memnew(VSeparator));
pin = memnew(Button);
@@ -1829,10 +1932,12 @@ void AnimationPlayerEditorPlugin::_notification(int p_what) {
}
void AnimationPlayerEditorPlugin::_property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance) {
- if (!anim_editor->get_track_editor()->has_keying()) {
+ AnimationTrackEditor *te = anim_editor->get_track_editor();
+ if (!te || !te->has_keying()) {
return;
}
- anim_editor->get_track_editor()->insert_value_key(p_keyed, p_value, p_advance);
+ te->_clear_selection();
+ te->insert_value_key(p_keyed, p_value, p_advance);
}
void AnimationPlayerEditorPlugin::_transform_key_request(Object *sp, const String &p_sub, const Transform3D &p_key) {
@@ -1853,7 +1958,6 @@ void AnimationPlayerEditorPlugin::_update_keying() {
}
void AnimationPlayerEditorPlugin::edit(Object *p_object) {
- anim_editor->set_undo_redo(get_undo_redo());
if (!p_object) {
return;
}
@@ -1874,9 +1978,31 @@ void AnimationPlayerEditorPlugin::make_visible(bool p_visible) {
AnimationPlayerEditorPlugin::AnimationPlayerEditorPlugin() {
anim_editor = memnew(AnimationPlayerEditor(this));
- anim_editor->set_undo_redo(EditorNode::get_undo_redo());
EditorNode::get_singleton()->add_bottom_panel_item(TTR("Animation"), anim_editor);
}
AnimationPlayerEditorPlugin::~AnimationPlayerEditorPlugin() {
}
+
+// AnimationTrackKeyEditEditorPlugin
+
+bool EditorInspectorPluginAnimationTrackKeyEdit::can_handle(Object *p_object) {
+ return Object::cast_to<AnimationTrackKeyEdit>(p_object) != nullptr;
+}
+
+void EditorInspectorPluginAnimationTrackKeyEdit::parse_begin(Object *p_object) {
+ AnimationTrackKeyEdit *atk = Object::cast_to<AnimationTrackKeyEdit>(p_object);
+ ERR_FAIL_COND(!atk);
+
+ atk_editor = memnew(AnimationTrackKeyEditEditor(atk->animation, atk->track, atk->key_ofs, atk->use_fps));
+ add_custom_control(atk_editor);
+}
+
+AnimationTrackKeyEditEditorPlugin::AnimationTrackKeyEditEditorPlugin() {
+ atk_plugin = memnew(EditorInspectorPluginAnimationTrackKeyEdit);
+ EditorInspector::add_inspector_plugin(atk_plugin);
+}
+
+bool AnimationTrackKeyEditEditorPlugin::handles(Object *p_object) const {
+ return p_object->is_class("AnimationTrackKeyEdit");
+}
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index a37a9debef..327200506f 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_player_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_player_editor_plugin.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 ANIMATION_PLAYER_EDITOR_PLUGIN_H
#define ANIMATION_PLAYER_EDITOR_PLUGIN_H
@@ -41,7 +41,6 @@
#include "scene/gui/texture_button.h"
#include "scene/gui/tree.h"
-class EditorUndoRedoManager;
class AnimationPlayerEditorPlugin;
class AnimationPlayerEditor : public VBoxContainer {
@@ -101,8 +100,9 @@ class AnimationPlayerEditor : public VBoxContainer {
LineEdit *name = nullptr;
OptionButton *library = nullptr;
Label *name_title = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
+ Ref<Texture2D> stop_icon;
+ Ref<Texture2D> pause_icon;
Ref<Texture2D> autoplay_icon;
Ref<Texture2D> reset_icon;
Ref<ImageTexture> autoplay_reset_icon;
@@ -131,6 +131,8 @@ class AnimationPlayerEditor : public VBoxContainer {
AnimationTrackEditor *track_editor = nullptr;
static AnimationPlayerEditor *singleton;
+ bool hack_disable_onion_skinning = true; // Temporary hack for GH-53870.
+
// Onion skinning.
struct {
// Settings.
@@ -162,7 +164,7 @@ class AnimationPlayerEditor : public VBoxContainer {
} onion;
void _select_anim_by_name(const String &p_anim);
- double _get_editor_step() const;
+ float _get_editor_step() const;
void _play_pressed();
void _play_from_pressed();
void _play_bw_pressed();
@@ -193,6 +195,7 @@ class AnimationPlayerEditor : public VBoxContainer {
void _blend_edited();
void _animation_player_changed(Object *p_pl);
+ void _animation_libraries_updated();
void _animation_key_editor_seek(float p_pos, bool p_drag, bool p_timeline_only = false);
void _animation_key_editor_anim_len_changed(float p_len);
@@ -211,6 +214,8 @@ class AnimationPlayerEditor : public VBoxContainer {
void _start_onion_skinning();
void _stop_onion_skinning();
+ bool _validate_tracks(const Ref<Animation> p_anim);
+
void _pin_pressed();
String _get_current() const;
@@ -234,7 +239,6 @@ public:
void ensure_visibility();
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
void edit(AnimationPlayer *p_player);
void forward_force_draw_over_viewport(Control *p_overlay);
@@ -264,10 +268,36 @@ public:
virtual void make_visible(bool p_visible) override;
virtual void forward_canvas_force_draw_over_viewport(Control *p_overlay) override { anim_editor->forward_force_draw_over_viewport(p_overlay); }
- virtual void forward_spatial_force_draw_over_viewport(Control *p_overlay) override { anim_editor->forward_force_draw_over_viewport(p_overlay); }
+ virtual void forward_3d_force_draw_over_viewport(Control *p_overlay) override { anim_editor->forward_force_draw_over_viewport(p_overlay); }
AnimationPlayerEditorPlugin();
~AnimationPlayerEditorPlugin();
};
+// AnimationTrackKeyEditEditorPlugin
+
+class EditorInspectorPluginAnimationTrackKeyEdit : public EditorInspectorPlugin {
+ GDCLASS(EditorInspectorPluginAnimationTrackKeyEdit, EditorInspectorPlugin);
+
+ AnimationTrackKeyEditEditor *atk_editor = nullptr;
+
+public:
+ virtual bool can_handle(Object *p_object) override;
+ virtual void parse_begin(Object *p_object) override;
+};
+
+class AnimationTrackKeyEditEditorPlugin : public EditorPlugin {
+ GDCLASS(AnimationTrackKeyEditEditorPlugin, EditorPlugin);
+
+ EditorInspectorPluginAnimationTrackKeyEdit *atk_plugin = nullptr;
+
+public:
+ bool has_main_screen() const override { return false; }
+ virtual bool handles(Object *p_object) const override;
+
+ virtual String get_name() const override { return "AnimationTrackKeyEdit"; }
+
+ AnimationTrackKeyEditEditorPlugin();
+};
+
#endif // ANIMATION_PLAYER_EDITOR_PLUGIN_H
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 461326a47b..a675495429 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_state_machine_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_state_machine_editor.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 "animation_state_machine_editor.h"
@@ -43,7 +43,10 @@
#include "scene/animation/animation_blend_tree.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/menu_button.h"
+#include "scene/gui/option_button.h"
#include "scene/gui/panel.h"
+#include "scene/gui/panel_container.h"
+#include "scene/gui/separator.h"
#include "scene/gui/tree.h"
#include "scene/main/viewport.h"
#include "scene/main/window.h"
@@ -76,7 +79,12 @@ void AnimationNodeStateMachineEditor::edit(const Ref<AnimationNode> &p_node) {
}
void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEvent> &p_event) {
- Ref<AnimationNodeStateMachinePlayback> playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
+ 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_null()) {
return;
}
@@ -238,6 +246,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
Ref<AnimationNode> an = state_machine->get_node(selected_node);
updating = true;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Move Node"));
for (int i = 0; i < node_rects.size(); i++) {
@@ -328,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);
}
@@ -420,7 +429,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
if (mm.is_valid()) {
state_machine_draw->grab_focus();
- String new_over_node = StringName();
+ String new_over_node;
int new_over_node_what = -1;
if (tool_select->is_pressed()) {
for (int i = node_rects.size() - 1; i >= 0; i--) { // Inverse to draw order.
@@ -534,6 +543,7 @@ void AnimationNodeStateMachineEditor::_group_selected_nodes() {
}
updating = true;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action("Group");
// Move selected nodes to the new state machine
@@ -648,6 +658,7 @@ void AnimationNodeStateMachineEditor::_ungroup_selected_nodes() {
Vector<TransitionUR> transitions_ur;
updating = true;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action("Ungroup");
// Move all child nodes to current state machine
@@ -730,6 +741,11 @@ void AnimationNodeStateMachineEditor::_ungroup_selected_nodes() {
}
void AnimationNodeStateMachineEditor::_open_menu(const Vector2 &p_position) {
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
menu->clear();
animations_menu->clear();
animations_to_add.clear();
@@ -739,10 +755,8 @@ void AnimationNodeStateMachineEditor::_open_menu(const Vector2 &p_position) {
ClassDB::get_inheriters_from_class("AnimationRootNode", &classes);
menu->add_submenu_item(TTR("Add Animation"), "animations");
- AnimationTree *gp = AnimationTreeEditor::get_singleton()->get_tree();
- ERR_FAIL_COND(!gp);
- if (gp && gp->has_node(gp->get_animation_player())) {
- AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(gp->get_node(gp->get_animation_player()));
+ if (tree->has_node(tree->get_animation_player())) {
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(tree->get_node(tree->get_animation_player()));
if (ap) {
List<StringName> names;
ap->get_animation_list(&names);
@@ -921,6 +935,7 @@ void AnimationNodeStateMachineEditor::_stop_connecting() {
void AnimationNodeStateMachineEditor::_delete_selected() {
TreeItem *item = delete_tree->get_next_selected(nullptr);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
while (item) {
if (!updating) {
updating = true;
@@ -948,6 +963,7 @@ void AnimationNodeStateMachineEditor::_delete_all() {
selected_multi_transition = TransitionLine();
updating = true;
+ 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++) {
@@ -974,6 +990,8 @@ void AnimationNodeStateMachineEditor::_file_opened(const String &p_file) {
file_loaded = ResourceLoader::load(p_file);
if (file_loaded.is_valid()) {
_add_menu_type(MENU_LOAD_FILE_CONFIRM);
+ } else {
+ EditorNode::get_singleton()->show_warning(TTR("This type of node can't be used. Only animation nodes are allowed."));
}
}
@@ -1025,6 +1043,7 @@ void AnimationNodeStateMachineEditor::_add_menu_type(int p_index) {
}
updating = true;
+ 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);
@@ -1051,6 +1070,7 @@ void AnimationNodeStateMachineEditor::_add_animation_type(int p_index) {
}
updating = true;
+ 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);
@@ -1077,8 +1097,10 @@ void AnimationNodeStateMachineEditor::_add_transition(const bool p_nested_action
Ref<AnimationNodeStateMachineTransition> tr;
tr.instantiate();
- tr->set_switch_mode(AnimationNodeStateMachineTransition::SwitchMode(transition_mode->get_selected()));
+ 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()));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (!p_nested_action) {
updating = true;
undo_redo->create_action(TTR("Add Transition"));
@@ -1179,7 +1201,12 @@ void AnimationNodeStateMachineEditor::_clip_dst_line_to_rect(const Vector2 &p_fr
}
void AnimationNodeStateMachineEditor::_state_machine_draw() {
- Ref<AnimationNodeStateMachinePlayback> playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
+ Ref<AnimationNodeStateMachinePlayback> playback = tree->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
Ref<StyleBoxFlat> style = get_theme_stylebox(SNAME("state_machine_frame"), SNAME("GraphNode"));
Ref<StyleBoxFlat> style_selected = get_theme_stylebox(SNAME("state_machine_selected_frame"), SNAME("GraphNode"));
@@ -1300,7 +1327,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
}
}
- _connection_draw(from, to, AnimationNodeStateMachineTransition::SwitchMode(transition_mode->get_selected()), true, false, false, false, false);
+ _connection_draw(from, to, AnimationNodeStateMachineTransition::SwitchMode(switch_mode->get_selected()), true, false, false, false, false);
}
Ref<Texture2D> tr_reference_icon = get_theme_icon(SNAME("TransitionImmediateBig"), SNAME("EditorIcons"));
@@ -1323,8 +1350,8 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
tl.to = (state_machine->get_node_position(local_to) * EDSCALE) + ofs_to - state_machine->get_graph_offset() * EDSCALE;
Ref<AnimationNodeStateMachineTransition> tr = state_machine->get_transition(i);
- tl.disabled = tr->is_disabled();
- tl.auto_advance = tr->has_auto_advance();
+ tl.disabled = bool(tr->get_advance_mode() == AnimationNodeStateMachineTransition::ADVANCE_MODE_DISABLED);
+ tl.auto_advance = bool(tr->get_advance_mode() == AnimationNodeStateMachineTransition::ADVANCE_MODE_AUTO);
tl.advance_condition_name = tr->get_advance_condition_name();
tl.advance_condition_state = false;
tl.mode = tr->get_switch_mode();
@@ -1367,7 +1394,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
}
StringName fullpath = AnimationTreeEditor::get_singleton()->get_base_path() + String(tl.advance_condition_name);
- if (tl.advance_condition_name != StringName() && bool(AnimationTreeEditor::get_singleton()->get_tree()->get(fullpath))) {
+ if (tl.advance_condition_name != StringName() && bool(tree->get(fullpath))) {
tl.advance_condition_state = true;
tl.auto_advance = true;
}
@@ -1482,7 +1509,12 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
}
void AnimationNodeStateMachineEditor::_state_machine_pos_draw() {
- Ref<AnimationNodeStateMachinePlayback> playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
+ 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;
@@ -1559,10 +1591,12 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
tool_create->set_icon(get_theme_icon(SNAME("ToolAddNode"), SNAME("EditorIcons")));
tool_connect->set_icon(get_theme_icon(SNAME("ToolConnect"), SNAME("EditorIcons")));
- transition_mode->clear();
- transition_mode->add_icon_item(get_theme_icon(SNAME("TransitionImmediate"), SNAME("EditorIcons")), TTR("Immediate"));
- transition_mode->add_icon_item(get_theme_icon(SNAME("TransitionSync"), SNAME("EditorIcons")), TTR("Sync"));
- transition_mode->add_icon_item(get_theme_icon(SNAME("TransitionEnd"), SNAME("EditorIcons")), TTR("At End"));
+ switch_mode->clear();
+ switch_mode->add_icon_item(get_theme_icon(SNAME("TransitionImmediate"), SNAME("EditorIcons")), TTR("Immediate"));
+ switch_mode->add_icon_item(get_theme_icon(SNAME("TransitionSync"), SNAME("EditorIcons")), TTR("Sync"));
+ switch_mode->add_icon_item(get_theme_icon(SNAME("TransitionEnd"), SNAME("EditorIcons")), TTR("At End"));
+
+ auto_advance->set_icon(get_theme_icon(SNAME("AutoPlay"), SNAME("EditorIcons")));
tool_erase->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
tool_group->set_icon(get_theme_icon(SNAME("Group"), SNAME("EditorIcons")));
@@ -1574,17 +1608,22 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
} break;
case NOTIFICATION_PROCESS: {
+ AnimationTree *tree = AnimationTreeEditor::get_singleton()->get_animation_tree();
+ if (!tree) {
+ return;
+ }
+
String error;
- Ref<AnimationNodeStateMachinePlayback> playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
+ Ref<AnimationNodeStateMachinePlayback> playback = tree->get(AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
if (error_time > 0) {
error = error_text;
error_time -= get_process_delta_time();
- } else if (!AnimationTreeEditor::get_singleton()->get_tree()->is_active()) {
+ } else if (!tree->is_active()) {
error = TTR("AnimationTree is inactive.\nActivate to enable playback, check node warnings if activation fails.");
- } else if (AnimationTreeEditor::get_singleton()->get_tree()->is_state_invalid()) {
- error = AnimationTreeEditor::get_singleton()->get_tree()->get_invalid_state_reason();
+ } else if (tree->is_state_invalid()) {
+ error = tree->get_invalid_state_reason();
/*} else if (state_machine->get_parent().is_valid() && state_machine->get_parent()->is_class("AnimationNodeStateMachine")) {
if (state_machine->get_start_node() == StringName() || state_machine->get_end_node() == StringName()) {
error = TTR("Start and end nodes are needed for a sub-transition.");
@@ -1616,12 +1655,12 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
break;
}
- if (transition_lines[i].disabled != state_machine->get_transition(tidx)->is_disabled()) {
+ if (transition_lines[i].disabled != bool(state_machine->get_transition(tidx)->get_advance_mode() == AnimationNodeStateMachineTransition::ADVANCE_MODE_DISABLED)) {
state_machine_draw->queue_redraw();
break;
}
- if (transition_lines[i].auto_advance != state_machine->get_transition(tidx)->has_auto_advance()) {
+ if (transition_lines[i].auto_advance != bool(state_machine->get_transition(tidx)->get_advance_mode() == AnimationNodeStateMachineTransition::ADVANCE_MODE_AUTO)) {
state_machine_draw->queue_redraw();
break;
}
@@ -1636,7 +1675,7 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
break;
}
- bool acstate = transition_lines[i].advance_condition_name != StringName() && bool(AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + String(transition_lines[i].advance_condition_name)));
+ bool acstate = transition_lines[i].advance_condition_name != StringName() && bool(tree->get(AnimationTreeEditor::get_singleton()->get_base_path() + String(transition_lines[i].advance_condition_name)));
if (transition_lines[i].advance_condition_state != acstate) {
state_machine_draw->queue_redraw();
@@ -1691,7 +1730,7 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
Ref<AnimationNodeStateMachinePlayback> current_node_playback;
while (anodesm.is_valid()) {
- current_node_playback = AnimationTreeEditor::get_singleton()->get_tree()->get(AnimationTreeEditor::get_singleton()->get_base_path() + next + "/playback");
+ current_node_playback = tree->get(AnimationTreeEditor::get_singleton()->get_base_path() + next + "/playback");
next += "/" + current_node_playback->get_current_node();
anodesm = anodesm->get_node(current_node_playback->get_current_node());
}
@@ -1721,10 +1760,6 @@ void AnimationNodeStateMachineEditor::_open_editor(const String &p_name) {
AnimationTreeEditor::get_singleton()->enter_editor(p_name);
}
-void AnimationNodeStateMachineEditor::_removed_from_graph() {
- EditorNode::get_singleton()->edit_item(nullptr);
-}
-
void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) {
const String &new_name = p_text;
@@ -1743,6 +1778,7 @@ void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) {
}
updating = true;
+ 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);
@@ -1777,6 +1813,7 @@ void AnimationNodeStateMachineEditor::_erase_selected(const bool p_nested_action
if (!p_nested_action) {
updating = true;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Node Removed"));
for (int i = 0; i < node_rects.size(); i++) {
@@ -1845,6 +1882,7 @@ void AnimationNodeStateMachineEditor::_erase_selected(const bool p_nested_action
if (!p_nested_action) {
updating = true;
}
+ 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);
@@ -1865,7 +1903,7 @@ void AnimationNodeStateMachineEditor::_erase_selected(const bool p_nested_action
void AnimationNodeStateMachineEditor::_update_mode() {
if (tool_select->is_pressed()) {
- tool_erase_hb->show();
+ selection_tools_hb->show();
bool nothing_selected = selected_nodes.is_empty() && selected_transition_from == StringName() && selected_transition_to == StringName();
bool start_end_selected = selected_nodes.size() == 1 && (*selected_nodes.begin() == state_machine->start_node || *selected_nodes.begin() == state_machine->end_node);
tool_erase->set_disabled(nothing_selected || start_end_selected || read_only);
@@ -1888,13 +1926,18 @@ void AnimationNodeStateMachineEditor::_update_mode() {
}
}
} else {
- tool_erase_hb->hide();
+ selection_tools_hb->hide();
+ }
+
+ if (tool_connect->is_pressed()) {
+ transition_tools_hb->show();
+ } else {
+ transition_tools_hb->hide();
}
}
void AnimationNodeStateMachineEditor::_bind_methods() {
ClassDB::bind_method("_update_graph", &AnimationNodeStateMachineEditor::_update_graph);
- ClassDB::bind_method("_removed_from_graph", &AnimationNodeStateMachineEditor::_removed_from_graph);
ClassDB::bind_method("_open_editor", &AnimationNodeStateMachineEditor::_open_editor);
ClassDB::bind_method("_connect_to", &AnimationNodeStateMachineEditor::_connect_to);
ClassDB::bind_method("_stop_connecting", &AnimationNodeStateMachineEditor::_stop_connecting);
@@ -1939,35 +1982,48 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_connect->set_tooltip_text(TTR("Connect nodes."));
tool_connect->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
- tool_erase_hb = memnew(HBoxContainer);
- top_hb->add_child(tool_erase_hb);
- tool_erase_hb->add_child(memnew(VSeparator));
+ // Context-sensitive selection tools:
+ selection_tools_hb = memnew(HBoxContainer);
+ top_hb->add_child(selection_tools_hb);
+ selection_tools_hb->add_child(memnew(VSeparator));
tool_group = memnew(Button);
tool_group->set_flat(true);
tool_group->set_tooltip_text(TTR("Group Selected Node(s)") + " (Ctrl+G)");
tool_group->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_group_selected_nodes));
tool_group->set_disabled(true);
- tool_erase_hb->add_child(tool_group);
+ selection_tools_hb->add_child(tool_group);
tool_ungroup = memnew(Button);
tool_ungroup->set_flat(true);
tool_ungroup->set_tooltip_text(TTR("Ungroup Selected Node") + " (Ctrl+Shift+G)");
tool_ungroup->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_ungroup_selected_nodes));
tool_ungroup->set_visible(false);
- tool_erase_hb->add_child(tool_ungroup);
+ selection_tools_hb->add_child(tool_ungroup);
tool_erase = memnew(Button);
tool_erase->set_flat(true);
tool_erase->set_tooltip_text(TTR("Remove selected node or transition."));
tool_erase->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_erase_selected).bind(false));
tool_erase->set_disabled(true);
- tool_erase_hb->add_child(tool_erase);
+ selection_tools_hb->add_child(tool_erase);
+
+ transition_tools_hb = memnew(HBoxContainer);
+ top_hb->add_child(transition_tools_hb);
+ transition_tools_hb->add_child(memnew(VSeparator));
- top_hb->add_child(memnew(VSeparator));
- top_hb->add_child(memnew(Label(TTR("Transition:"))));
- transition_mode = memnew(OptionButton);
- top_hb->add_child(transition_mode);
+ transition_tools_hb->add_child(memnew(Label(TTR("Transition:"))));
+ switch_mode = memnew(OptionButton);
+ transition_tools_hb->add_child(switch_mode);
+
+ auto_advance = memnew(Button);
+ auto_advance->set_flat(true);
+ auto_advance->set_tooltip_text(TTR("New Transitions Should Auto Advance"));
+ auto_advance->set_toggle_mode(true);
+ auto_advance->set_pressed(true);
+ transition_tools_hb->add_child(auto_advance);
+
+ //
top_hb->add_spacer();
@@ -2011,8 +2067,6 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
error_panel->add_child(error_label);
error_panel->hide();
- undo_redo = EditorNode::get_undo_redo();
-
set_custom_minimum_size(Size2(0, 300 * EDSCALE));
menu = memnew(PopupMenu);
@@ -2053,7 +2107,6 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
open_file->set_title(TTR("Open Animation Node"));
open_file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
open_file->connect("file_selected", callable_mp(this, &AnimationNodeStateMachineEditor::_file_opened));
- undo_redo = EditorNode::get_undo_redo();
delete_window = memnew(ConfirmationDialog);
delete_window->set_flag(Window::FLAG_RESIZE_DISABLED, true);
diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h
index d0828a5f52..46fe13ccc1 100644
--- a/editor/plugins/animation_state_machine_editor.h
+++ b/editor/plugins/animation_state_machine_editor.h
@@ -1,46 +1,46 @@
-/*************************************************************************/
-/* animation_state_machine_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_state_machine_editor.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 ANIMATION_STATE_MACHINE_EDITOR_H
#define ANIMATION_STATE_MACHINE_EDITOR_H
-#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
#include "scene/animation/animation_node_state_machine.h"
-#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
#include "scene/gui/popup.h"
#include "scene/gui/tree.h"
+class ConfirmationDialog;
class EditorFileDialog;
-class EditorUndoRedoManager;
+class OptionButton;
+class PanelContainer;
class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
GDCLASS(AnimationNodeStateMachineEditor, AnimationTreeNodeEditorPlugin);
@@ -52,15 +52,18 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
Button *tool_select = nullptr;
Button *tool_create = nullptr;
Button *tool_connect = nullptr;
- Button *tool_group = nullptr;
- Button *tool_ungroup = nullptr;
Popup *name_edit_popup = nullptr;
LineEdit *name_edit = nullptr;
- HBoxContainer *tool_erase_hb = nullptr;
+ HBoxContainer *selection_tools_hb = nullptr;
+ Button *tool_group = nullptr;
+ Button *tool_ungroup = nullptr;
Button *tool_erase = nullptr;
- OptionButton *transition_mode = nullptr;
+ HBoxContainer *transition_tools_hb = nullptr;
+ OptionButton *switch_mode = nullptr;
+ Button *auto_advance = nullptr;
+
OptionButton *play_mode = nullptr;
PanelContainer *panel = nullptr;
@@ -79,8 +82,6 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
bool updating = false;
- Ref<EditorUndoRedoManager> undo_redo;
-
static AnimationNodeStateMachineEditor *singleton;
void _state_machine_gui_input(const Ref<InputEvent> &p_event);
@@ -126,8 +127,6 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
void _add_animation_type(int p_index);
void _connect_to(int p_index);
- void _removed_from_graph();
-
struct NodeRect {
StringName node_name;
Rect2 node;
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index ed231c446b..720deb0b92 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_tree_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_tree_editor_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 "animation_tree_editor_plugin.h"
@@ -50,10 +50,18 @@
#include "scene/scene_string_names.h"
void AnimationTreeEditor::edit(AnimationTree *p_tree) {
+ if (p_tree && !p_tree->is_connected("animation_player_changed", callable_mp(this, &AnimationTreeEditor::_animation_list_changed))) {
+ p_tree->connect("animation_player_changed", callable_mp(this, &AnimationTreeEditor::_animation_list_changed), CONNECT_DEFERRED);
+ }
+
if (tree == p_tree) {
return;
}
+ if (tree && tree->is_connected("animation_player_changed", callable_mp(this, &AnimationTreeEditor::_animation_list_changed))) {
+ tree->disconnect("animation_player_changed", callable_mp(this, &AnimationTreeEditor::_animation_list_changed));
+ }
+
tree = p_tree;
Vector<String> path;
@@ -66,6 +74,13 @@ void AnimationTreeEditor::edit(AnimationTree *p_tree) {
edit_path(path);
}
+void AnimationTreeEditor::_node_removed(Node *p_node) {
+ if (p_node == tree) {
+ tree = nullptr;
+ _clear_editors();
+ }
+}
+
void AnimationTreeEditor::_path_button_pressed(int p_path) {
edited_path.clear();
for (int i = 0; i <= p_path; i++) {
@@ -73,6 +88,13 @@ void AnimationTreeEditor::_path_button_pressed(int p_path) {
}
}
+void AnimationTreeEditor::_animation_list_changed() {
+ AnimationNodeBlendTreeEditor *bte = AnimationNodeBlendTreeEditor::get_singleton();
+ if (bte) {
+ bte->update_graph();
+ }
+}
+
void AnimationTreeEditor::_update_path() {
while (path_hb->get_child_count() > 1) {
memdelete(path_hb->get_child(1));
@@ -130,7 +152,6 @@ void AnimationTreeEditor::edit_path(const Vector<String> &p_path) {
} else {
current_root = ObjectID();
edited_path = button_path;
-
for (int i = 0; i < editors.size(); i++) {
editors[i]->edit(Ref<AnimationNode>());
editors[i]->hide();
@@ -140,6 +161,17 @@ void AnimationTreeEditor::edit_path(const Vector<String> &p_path) {
_update_path();
}
+void AnimationTreeEditor::_clear_editors() {
+ button_path.clear();
+ current_root = ObjectID();
+ edited_path = button_path;
+ for (int i = 0; i < editors.size(); i++) {
+ editors[i]->edit(Ref<AnimationNode>());
+ editors[i]->hide();
+ }
+ _update_path();
+}
+
Vector<String> AnimationTreeEditor::get_edited_path() const {
return button_path;
}
@@ -152,6 +184,9 @@ void AnimationTreeEditor::enter_editor(const String &p_path) {
void AnimationTreeEditor::_notification(int p_what) {
switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ get_tree()->connect("node_removed", callable_mp(this, &AnimationTreeEditor::_node_removed));
+ } break;
case NOTIFICATION_PROCESS: {
ObjectID root;
if (tree && tree->get_tree_root().is_valid()) {
@@ -166,6 +201,9 @@ void AnimationTreeEditor::_notification(int p_what) {
edit_path(edited_path);
}
} break;
+ case NOTIFICATION_EXIT_TREE: {
+ get_tree()->disconnect("node_removed", callable_mp(this, &AnimationTreeEditor::_node_removed));
+ } break;
}
}
diff --git a/editor/plugins/animation_tree_editor_plugin.h b/editor/plugins/animation_tree_editor_plugin.h
index a33d97f62f..ac937000cb 100644
--- a/editor/plugins/animation_tree_editor_plugin.h
+++ b/editor/plugins/animation_tree_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* animation_tree_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* animation_tree_editor_plugin.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 ANIMATION_TREE_EDITOR_PLUGIN_H
#define ANIMATION_TREE_EDITOR_PLUGIN_H
@@ -35,8 +35,6 @@
#include "scene/animation/animation_tree.h"
#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
-#include "scene/gui/popup.h"
-#include "scene/gui/tree.h"
class EditorFileDialog;
@@ -62,20 +60,23 @@ class AnimationTreeEditor : public VBoxContainer {
Vector<AnimationTreeNodeEditorPlugin *> editors;
void _update_path();
+ void _clear_editors();
ObjectID current_root;
void _path_button_pressed(int p_path);
+ void _animation_list_changed();
static Vector<String> get_animation_list();
protected:
void _notification(int p_what);
+ void _node_removed(Node *p_node);
static void _bind_methods();
static AnimationTreeEditor *singleton;
public:
- AnimationTree *get_tree() { return tree; }
+ AnimationTree *get_animation_tree() { return tree; }
void add_plugin(AnimationTreeNodeEditorPlugin *p_editor);
void remove_plugin(AnimationTreeNodeEditorPlugin *p_editor);
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 3c9486cdaa..eab5eb0404 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* asset_library_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* asset_library_editor_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 "asset_library_editor_plugin.h"
@@ -41,6 +41,12 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/project_settings_editor.h"
+#include "scene/gui/menu_button.h"
+
+#include "modules/modules_enabled.gen.h" // For svg.
+#ifdef MODULE_SVG_ENABLED
+#include "modules/svg/image_loader_svg.h"
+#endif
static inline void setup_http_request(HTTPRequest *request) {
request->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
@@ -65,13 +71,13 @@ void EditorAssetLibraryItem::set_image(int p_type, int p_index, const Ref<Textur
ERR_FAIL_COND(p_type != EditorAssetLibrary::IMAGE_QUEUE_ICON);
ERR_FAIL_COND(p_index != 0);
- icon->set_normal_texture(p_image);
+ icon->set_texture_normal(p_image);
}
void EditorAssetLibraryItem::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- icon->set_normal_texture(get_theme_icon(SNAME("ProjectIconLoading"), SNAME("EditorIcons")));
+ icon->set_texture_normal(get_theme_icon(SNAME("ProjectIconLoading"), SNAME("EditorIcons")));
category->add_theme_color_override("font_color", Color(0.5, 0.5, 0.5));
author->add_theme_color_override("font_color", Color(0.5, 0.5, 0.5));
price->add_theme_color_override("font_color", Color(0.5, 0.5, 0.5));
@@ -243,19 +249,19 @@ void EditorAssetLibraryItemDescription::configure(const String &p_title, int p_a
}
void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, const String &p_url) {
- Preview preview;
- preview.id = p_id;
- preview.video_link = p_url;
- preview.is_video = p_video;
- preview.button = memnew(Button);
- preview.button->set_icon(previews->get_theme_icon(SNAME("ThumbnailWait"), SNAME("EditorIcons")));
- preview.button->set_toggle_mode(true);
- preview.button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDescription::_preview_click).bind(p_id));
- preview_hb->add_child(preview.button);
+ Preview new_preview;
+ new_preview.id = p_id;
+ new_preview.video_link = p_url;
+ new_preview.is_video = p_video;
+ new_preview.button = memnew(Button);
+ new_preview.button->set_icon(previews->get_theme_icon(SNAME("ThumbnailWait"), SNAME("EditorIcons")));
+ new_preview.button->set_toggle_mode(true);
+ new_preview.button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDescription::_preview_click).bind(p_id));
+ preview_hb->add_child(new_preview.button);
if (!p_video) {
- preview.image = previews->get_theme_icon(SNAME("ThumbnailWait"), SNAME("EditorIcons"));
+ new_preview.image = previews->get_theme_icon(SNAME("ThumbnailWait"), SNAME("EditorIcons"));
}
- preview_images.push_back(preview);
+ preview_images.push_back(new_preview);
if (preview_images.size() == 1 && !p_video) {
_preview_click(p_id);
}
@@ -287,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);
@@ -402,7 +408,7 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("AssetLib")));
status->add_theme_color_override("font_color", get_theme_color(SNAME("status_color"), SNAME("AssetLib")));
- dismiss_button->set_normal_texture(get_theme_icon(SNAME("dismiss"), SNAME("AssetLib")));
+ dismiss_button->set_texture_normal(get_theme_icon(SNAME("dismiss"), SNAME("AssetLib")));
} break;
case NOTIFICATION_PROCESS: {
@@ -460,7 +466,7 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
void EditorAssetLibraryItemDownload::_close() {
// Clean up downloaded file.
DirAccess::remove_file_or_error(download->get_download_file());
- queue_delete();
+ queue_free();
}
bool EditorAssetLibraryItemDownload::can_install() const {
@@ -699,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.
}
@@ -750,13 +762,30 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PackedB
uint8_t png_signature[8] = { 137, 80, 78, 71, 13, 10, 26, 10 };
uint8_t jpg_signature[3] = { 255, 216, 255 };
+ uint8_t webp_signature[4] = { 82, 73, 70, 70 };
+ uint8_t bmp_signature[2] = { 66, 77 };
if (r) {
if ((memcmp(&r[0], &png_signature[0], 8) == 0) && Image::_png_mem_loader_func) {
image->copy_internals_from(Image::_png_mem_loader_func(r, len));
} else if ((memcmp(&r[0], &jpg_signature[0], 3) == 0) && Image::_jpg_mem_loader_func) {
image->copy_internals_from(Image::_jpg_mem_loader_func(r, len));
+ } else if ((memcmp(&r[0], &webp_signature[0], 4) == 0) && Image::_webp_mem_loader_func) {
+ image->copy_internals_from(Image::_webp_mem_loader_func(r, len));
+ } else if ((memcmp(&r[0], &bmp_signature[0], 2) == 0) && Image::_bmp_mem_loader_func) {
+ image->copy_internals_from(Image::_bmp_mem_loader_func(r, len));
+ }
+#ifdef MODULE_SVG_ENABLED
+ else {
+ ImageLoaderSVG svg_loader;
+ Ref<Image> img = Ref<Image>(memnew(Image));
+ Error err = svg_loader.create_image_from_utf8_buffer(img, image_data, 1.0, false);
+
+ if (err == OK) {
+ image->copy_internals_from(img);
+ }
}
+#endif
}
if (!image->is_empty()) {
@@ -832,7 +861,7 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons
}
}
- image_queue[p_queue_id].request->queue_delete();
+ image_queue[p_queue_id].request->queue_free();
image_queue.erase(p_queue_id);
_update_image_queue();
@@ -868,7 +897,7 @@ void EditorAssetLibrary::_update_image_queue() {
}
while (to_delete.size()) {
- image_queue[to_delete.front()->get()].request->queue_delete();
+ image_queue[to_delete.front()->get()].request->queue_free();
image_queue.erase(to_delete.front()->get());
to_delete.pop_front();
}
@@ -1219,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 {
@@ -1487,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));
diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h
index 070d25e29f..8c74da0e2a 100644
--- a/editor/plugins/asset_library_editor_plugin.h
+++ b/editor/plugins/asset_library_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* asset_library_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* asset_library_editor_plugin.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 ASSET_LIBRARY_EDITOR_PLUGIN_H
#define ASSET_LIBRARY_EDITOR_PLUGIN_H
@@ -50,6 +50,9 @@
#include "scene/gui/texture_button.h"
#include "scene/main/http_request.h"
+class EditorFileDialog;
+class MenuButton;
+
class EditorAssetLibraryItem : public PanelContainer {
GDCLASS(EditorAssetLibraryItem, PanelContainer);
@@ -231,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_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp
new file mode 100644
index 0000000000..61f70f6b1e
--- /dev/null
+++ b/editor/plugins/audio_stream_editor_plugin.cpp
@@ -0,0 +1,280 @@
+/**************************************************************************/
+/* audio_stream_editor_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 "audio_stream_editor_plugin.h"
+
+#include "core/core_string_names.h"
+#include "editor/audio_stream_preview.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "scene/resources/audio_stream_wav.h"
+
+// AudioStreamEditor
+
+void AudioStreamEditor::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_READY: {
+ AudioStreamPreviewGenerator::get_singleton()->connect(SNAME("preview_updated"), callable_mp(this, &AudioStreamEditor::_preview_changed));
+ } break;
+ case NOTIFICATION_THEME_CHANGED:
+ case NOTIFICATION_ENTER_TREE: {
+ Ref<Font> font = get_theme_font(SNAME("status_source"), SNAME("EditorFonts"));
+
+ _current_label->add_theme_font_override(SNAME("font"), font);
+ _duration_label->add_theme_font_override(SNAME("font"), font);
+
+ _play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ _stop_button->set_icon(get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
+ _preview->set_color(get_theme_color(SNAME("dark_color_2"), SNAME("Editor")));
+
+ set_color(get_theme_color(SNAME("dark_color_1"), SNAME("Editor")));
+
+ _indicator->queue_redraw();
+ _preview->queue_redraw();
+ } break;
+ case NOTIFICATION_PROCESS: {
+ _current = _player->get_playback_position();
+ _indicator->queue_redraw();
+ } break;
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ if (!is_visible_in_tree()) {
+ _stop();
+ }
+ } break;
+ default: {
+ } break;
+ }
+}
+
+void AudioStreamEditor::_draw_preview() {
+ Rect2 rect = _preview->get_rect();
+ Size2 size = get_size();
+
+ Ref<AudioStreamPreview> preview = AudioStreamPreviewGenerator::get_singleton()->generate_preview(stream);
+ float preview_len = preview->get_length();
+
+ Vector<Vector2> lines;
+ lines.resize(size.width * 2);
+
+ for (int i = 0; i < size.width; i++) {
+ float ofs = i * preview_len / size.width;
+ float ofs_n = (i + 1) * preview_len / size.width;
+ float max = preview->get_max(ofs, ofs_n) * 0.5 + 0.5;
+ float min = preview->get_min(ofs, ofs_n) * 0.5 + 0.5;
+
+ int idx = i;
+ lines.write[idx * 2 + 0] = Vector2(i + 1, rect.position.y + min * rect.size.y);
+ lines.write[idx * 2 + 1] = Vector2(i + 1, rect.position.y + max * rect.size.y);
+ }
+
+ RS::get_singleton()->canvas_item_add_multiline(_preview->get_canvas_item(), lines, { get_theme_color(SNAME("contrast_color_2"), SNAME("Editor")) });
+}
+
+void AudioStreamEditor::_preview_changed(ObjectID p_which) {
+ if (stream.is_valid() && stream->get_instance_id() == p_which) {
+ _preview->queue_redraw();
+ }
+}
+
+void AudioStreamEditor::_stream_changed() {
+ if (!is_visible()) {
+ return;
+ }
+ queue_redraw();
+}
+
+void AudioStreamEditor::_play() {
+ if (_player->is_playing()) {
+ _pausing = true;
+ _player->stop();
+ _play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ set_process(false);
+ } else {
+ _pausing = false;
+ _player->play(_current);
+ _play_button->set_icon(get_theme_icon(SNAME("Pause"), SNAME("EditorIcons")));
+ set_process(true);
+ }
+}
+
+void AudioStreamEditor::_stop() {
+ _player->stop();
+ _play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ _current = 0;
+ _indicator->queue_redraw();
+ set_process(false);
+}
+
+void AudioStreamEditor::_on_finished() {
+ _play_button->set_icon(get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
+ if (!_pausing) {
+ _current = 0;
+ _indicator->queue_redraw();
+ } else {
+ _pausing = false;
+ }
+ set_process(false);
+}
+
+void AudioStreamEditor::_draw_indicator() {
+ if (stream.is_null()) {
+ return;
+ }
+
+ Rect2 rect = _preview->get_rect();
+ float len = stream->get_length();
+ float ofs_x = _current / len * rect.size.width;
+ const Color col = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ Ref<Texture2D> icon = get_theme_icon(SNAME("TimelineIndicator"), SNAME("EditorIcons"));
+ _indicator->draw_line(Point2(ofs_x, 0), Point2(ofs_x, rect.size.height), col, Math::round(2 * EDSCALE));
+ _indicator->draw_texture(
+ icon,
+ Point2(ofs_x - icon->get_width() * 0.5, 0),
+ col);
+
+ _current_label->set_text(String::num(_current, 2).pad_decimals(2) + " /");
+}
+
+void AudioStreamEditor::_on_input_indicator(Ref<InputEvent> p_event) {
+ const Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) {
+ if (mb->is_pressed()) {
+ _seek_to(mb->get_position().x);
+ }
+ _dragging = mb->is_pressed();
+ }
+
+ const Ref<InputEventMouseMotion> mm = p_event;
+ if (mm.is_valid()) {
+ if (_dragging) {
+ _seek_to(mm->get_position().x);
+ }
+ }
+}
+
+void AudioStreamEditor::_seek_to(real_t p_x) {
+ _current = p_x / _preview->get_rect().size.x * stream->get_length();
+ _current = CLAMP(_current, 0, stream->get_length());
+ _player->seek(_current);
+ _indicator->queue_redraw();
+}
+
+void AudioStreamEditor::set_stream(const Ref<AudioStream> &p_stream) {
+ if (stream.is_valid()) {
+ stream->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &AudioStreamEditor::_stream_changed));
+ }
+
+ stream = p_stream;
+ if (stream.is_null()) {
+ hide();
+ return;
+ }
+ stream->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &AudioStreamEditor::_stream_changed));
+
+ _player->set_stream(stream);
+ _current = 0;
+
+ String text = String::num(stream->get_length(), 2).pad_decimals(2) + "s";
+ _duration_label->set_text(text);
+
+ queue_redraw();
+}
+
+AudioStreamEditor::AudioStreamEditor() {
+ set_custom_minimum_size(Size2(1, 100) * EDSCALE);
+
+ _player = memnew(AudioStreamPlayer);
+ _player->connect(SNAME("finished"), callable_mp(this, &AudioStreamEditor::_on_finished));
+ add_child(_player);
+
+ VBoxContainer *vbox = memnew(VBoxContainer);
+ vbox->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
+ add_child(vbox);
+
+ _preview = memnew(ColorRect);
+ _preview->set_v_size_flags(SIZE_EXPAND_FILL);
+ _preview->connect(SNAME("draw"), callable_mp(this, &AudioStreamEditor::_draw_preview));
+ vbox->add_child(_preview);
+
+ _indicator = memnew(Control);
+ _indicator->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
+ _indicator->connect(SNAME("draw"), callable_mp(this, &AudioStreamEditor::_draw_indicator));
+ _indicator->connect(SNAME("gui_input"), callable_mp(this, &AudioStreamEditor::_on_input_indicator));
+ _preview->add_child(_indicator);
+
+ HBoxContainer *hbox = memnew(HBoxContainer);
+ hbox->add_theme_constant_override("separation", 0);
+ vbox->add_child(hbox);
+
+ _play_button = memnew(Button);
+ hbox->add_child(_play_button);
+ _play_button->set_flat(true);
+ _play_button->set_focus_mode(Control::FOCUS_NONE);
+ _play_button->connect(SNAME("pressed"), callable_mp(this, &AudioStreamEditor::_play));
+ _play_button->set_shortcut(ED_SHORTCUT("audio_stream_editor/audio_preview_play_pause", TTR("Audio Preview Play/Pause"), Key::SPACE));
+
+ _stop_button = memnew(Button);
+ hbox->add_child(_stop_button);
+ _stop_button->set_flat(true);
+ _stop_button->set_focus_mode(Control::FOCUS_NONE);
+ _stop_button->connect(SNAME("pressed"), callable_mp(this, &AudioStreamEditor::_stop));
+
+ _current_label = memnew(Label);
+ _current_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
+ _current_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ _current_label->set_modulate(Color(1, 1, 1, 0.5));
+ hbox->add_child(_current_label);
+
+ _duration_label = memnew(Label);
+ hbox->add_child(_duration_label);
+}
+
+// EditorInspectorPluginAudioStream
+
+bool EditorInspectorPluginAudioStream::can_handle(Object *p_object) {
+ return Object::cast_to<AudioStreamWAV>(p_object) != nullptr;
+}
+
+void EditorInspectorPluginAudioStream::parse_begin(Object *p_object) {
+ AudioStream *stream = Object::cast_to<AudioStream>(p_object);
+
+ editor = memnew(AudioStreamEditor);
+ editor->set_stream(Ref<AudioStream>(stream));
+
+ add_custom_control(editor);
+}
+
+// AudioStreamEditorPlugin
+
+AudioStreamEditorPlugin::AudioStreamEditorPlugin() {
+ Ref<EditorInspectorPluginAudioStream> plugin;
+ plugin.instantiate();
+ add_inspector_plugin(plugin);
+}
diff --git a/editor/plugins/audio_stream_editor_plugin.h b/editor/plugins/audio_stream_editor_plugin.h
new file mode 100644
index 0000000000..52aa5f6150
--- /dev/null
+++ b/editor/plugins/audio_stream_editor_plugin.h
@@ -0,0 +1,93 @@
+/**************************************************************************/
+/* audio_stream_editor_plugin.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 AUDIO_STREAM_EDITOR_PLUGIN_H
+#define AUDIO_STREAM_EDITOR_PLUGIN_H
+
+#include "editor/editor_inspector.h"
+#include "editor/editor_plugin.h"
+#include "scene/audio/audio_stream_player.h"
+#include "scene/gui/button.h"
+#include "scene/gui/color_rect.h"
+#include "scene/gui/label.h"
+
+class AudioStreamEditor : public ColorRect {
+ GDCLASS(AudioStreamEditor, ColorRect);
+
+ Ref<AudioStream> stream;
+
+ AudioStreamPlayer *_player = nullptr;
+ ColorRect *_preview = nullptr;
+ Control *_indicator = nullptr;
+ Label *_current_label = nullptr;
+ Label *_duration_label = nullptr;
+
+ Button *_play_button = nullptr;
+ Button *_stop_button = nullptr;
+
+ float _current = 0;
+ bool _dragging = false;
+ bool _pausing = false;
+
+protected:
+ void _notification(int p_what);
+ void _preview_changed(ObjectID p_which);
+ void _play();
+ void _stop();
+ void _on_finished();
+ void _draw_preview();
+ void _draw_indicator();
+ void _on_input_indicator(Ref<InputEvent> p_event);
+ void _seek_to(real_t p_x);
+ void _stream_changed();
+
+public:
+ void set_stream(const Ref<AudioStream> &p_stream);
+
+ AudioStreamEditor();
+};
+
+class EditorInspectorPluginAudioStream : public EditorInspectorPlugin {
+ GDCLASS(EditorInspectorPluginAudioStream, EditorInspectorPlugin);
+ AudioStreamEditor *editor = nullptr;
+
+public:
+ virtual bool can_handle(Object *p_object) override;
+ virtual void parse_begin(Object *p_object) override;
+};
+
+class AudioStreamEditorPlugin : public EditorPlugin {
+ GDCLASS(AudioStreamEditorPlugin, EditorPlugin);
+
+public:
+ AudioStreamEditorPlugin();
+};
+
+#endif // AUDIO_STREAM_EDITOR_PLUGIN_H
diff --git a/editor/plugins/audio_stream_randomizer_editor_plugin.cpp b/editor/plugins/audio_stream_randomizer_editor_plugin.cpp
index d670197c53..bb3b8a124e 100644
--- a/editor/plugins/audio_stream_randomizer_editor_plugin.cpp
+++ b/editor/plugins/audio_stream_randomizer_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* audio_stream_randomizer_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* audio_stream_randomizer_editor_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 "audio_stream_randomizer_editor_plugin.h"
@@ -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 = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
- ERR_FAIL_COND(undo_redo.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) {
@@ -76,12 +76,12 @@ void AudioStreamRandomizerEditorPlugin::_move_stream_array_element(Object *p_und
end = MIN(MAX(p_from_index, p_to_pos) + 1, end);
}
-#define ADD_UNDO(obj, property) undo_redo->add_undo_property(obj, property, obj->get(property));
+#define ADD_UNDO(obj, property) undo_redo_man->add_undo_property(obj, property, obj->get(property));
// Save layers' properties.
if (p_from_index < 0) {
- undo_redo->add_undo_method(randomizer, "remove_stream", p_to_pos < 0 ? randomizer->get_streams_count() : p_to_pos);
+ undo_redo_man->add_undo_method(randomizer, "remove_stream", p_to_pos < 0 ? randomizer->get_streams_count() : p_to_pos);
} else if (p_to_pos < 0) {
- undo_redo->add_undo_method(randomizer, "add_stream", p_from_index);
+ undo_redo_man->add_undo_method(randomizer, "add_stream", p_from_index, Ref<AudioStream>());
}
List<PropertyInfo> properties;
@@ -107,11 +107,11 @@ void AudioStreamRandomizerEditorPlugin::_move_stream_array_element(Object *p_und
#undef ADD_UNDO
if (p_from_index < 0) {
- undo_redo->add_do_method(randomizer, "add_stream", p_to_pos);
+ undo_redo_man->add_do_method(randomizer, "add_stream", p_to_pos, Ref<AudioStream>());
} else if (p_to_pos < 0) {
- undo_redo->add_do_method(randomizer, "remove_stream", p_from_index);
+ undo_redo_man->add_do_method(randomizer, "remove_stream", p_from_index);
} else {
- undo_redo->add_do_method(randomizer, "move_stream", p_from_index, p_to_pos);
+ undo_redo_man->add_do_method(randomizer, "move_stream", p_from_index, p_to_pos);
}
}
diff --git a/editor/plugins/audio_stream_randomizer_editor_plugin.h b/editor/plugins/audio_stream_randomizer_editor_plugin.h
index 7e509dc670..72cdaeee30 100644
--- a/editor/plugins/audio_stream_randomizer_editor_plugin.h
+++ b/editor/plugins/audio_stream_randomizer_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* audio_stream_randomizer_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* audio_stream_randomizer_editor_plugin.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 AUDIO_STREAM_RANDOMIZER_EDITOR_PLUGIN_H
#define AUDIO_STREAM_RANDOMIZER_EDITOR_PLUGIN_H
diff --git a/editor/plugins/bit_map_editor_plugin.cpp b/editor/plugins/bit_map_editor_plugin.cpp
index 657c5a36b6..4f82aaf071 100644
--- a/editor/plugins/bit_map_editor_plugin.cpp
+++ b/editor/plugins/bit_map_editor_plugin.cpp
@@ -1,36 +1,38 @@
-/*************************************************************************/
-/* bit_map_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* bit_map_editor_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 "bit_map_editor_plugin.h"
#include "editor/editor_scale.h"
+#include "scene/gui/label.h"
+#include "scene/gui/texture_rect.h"
void BitMapEditor::setup(const Ref<BitMap> &p_bitmap) {
texture_rect->set_texture(ImageTexture::create_from_image(p_bitmap->convert_to_image()));
diff --git a/editor/plugins/bit_map_editor_plugin.h b/editor/plugins/bit_map_editor_plugin.h
index b045f8c751..afab1da2f7 100644
--- a/editor/plugins/bit_map_editor_plugin.h
+++ b/editor/plugins/bit_map_editor_plugin.h
@@ -1,39 +1,42 @@
-/*************************************************************************/
-/* bit_map_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* bit_map_editor_plugin.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 BIT_MAP_EDITOR_PLUGIN_H
#define BIT_MAP_EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "scene/resources/bit_map.h"
+class TextureRect;
+
class BitMapEditor : public VBoxContainer {
GDCLASS(BitMapEditor, VBoxContainer);
diff --git a/editor/plugins/bone_map_editor_plugin.cpp b/editor/plugins/bone_map_editor_plugin.cpp
index 46e2fe41af..c913a9b0ab 100644
--- a/editor/plugins/bone_map_editor_plugin.cpp
+++ b/editor/plugins/bone_map_editor_plugin.cpp
@@ -1,46 +1,50 @@
-/*************************************************************************/
-/* bone_map_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* bone_map_editor_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 "bone_map_editor_plugin.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/import/post_import_plugin_skeleton_renamer.h"
#include "editor/import/post_import_plugin_skeleton_rest_fixer.h"
#include "editor/import/post_import_plugin_skeleton_track_organizer.h"
#include "editor/import/scene_import_settings.h"
+#include "scene/gui/aspect_ratio_container.h"
+#include "scene/gui/separator.h"
+#include "scene/gui/texture_rect.h"
void BoneMapperButton::fetch_textures() {
if (selected) {
- set_normal_texture(get_theme_icon(SNAME("BoneMapperHandleSelected"), SNAME("EditorIcons")));
+ set_texture_normal(get_theme_icon(SNAME("BoneMapperHandleSelected"), SNAME("EditorIcons")));
} else {
- set_normal_texture(get_theme_icon(SNAME("BoneMapperHandle"), SNAME("EditorIcons")));
+ set_texture_normal(get_theme_icon(SNAME("BoneMapperHandle"), SNAME("EditorIcons")));
}
set_offset(SIDE_LEFT, 0);
set_offset(SIDE_RIGHT, 0);
@@ -63,16 +67,16 @@ StringName BoneMapperButton::get_profile_bone_name() const {
void BoneMapperButton::set_state(BoneMapState p_state) {
switch (p_state) {
case BONE_MAP_STATE_UNSET: {
- circle->set_modulate(EditorSettings::get_singleton()->get("editors/bone_mapper/handle_colors/unset"));
+ circle->set_modulate(EDITOR_GET("editors/bone_mapper/handle_colors/unset"));
} break;
case BONE_MAP_STATE_SET: {
- circle->set_modulate(EditorSettings::get_singleton()->get("editors/bone_mapper/handle_colors/set"));
+ circle->set_modulate(EDITOR_GET("editors/bone_mapper/handle_colors/set"));
} break;
case BONE_MAP_STATE_MISSING: {
- circle->set_modulate(EditorSettings::get_singleton()->get("editors/bone_mapper/handle_colors/missing"));
+ circle->set_modulate(EDITOR_GET("editors/bone_mapper/handle_colors/missing"));
} break;
case BONE_MAP_STATE_ERROR: {
- circle->set_modulate(EditorSettings::get_singleton()->get("editors/bone_mapper/handle_colors/error"));
+ circle->set_modulate(EDITOR_GET("editors/bone_mapper/handle_colors/error"));
} break;
default: {
} break;
@@ -312,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);
@@ -742,7 +746,6 @@ void BoneMapper::auto_mapping_process(Ref<BoneMap> &p_bone_map) {
} else {
p_bone_map->_set_skeleton_bone_name("LeftEye", skeleton->get_bone_name(bone_idx));
}
- bone_idx = -1;
bone_idx = search_bone_by_name(skeleton, picklist, BONE_SEGREGATION_RIGHT, neck_or_head);
if (bone_idx == -1) {
@@ -750,7 +753,6 @@ void BoneMapper::auto_mapping_process(Ref<BoneMap> &p_bone_map) {
} else {
p_bone_map->_set_skeleton_bone_name("RightEye", skeleton->get_bone_name(bone_idx));
}
- bone_idx = -1;
picklist.clear();
// 4-2. Guess Jaw
@@ -1309,7 +1311,7 @@ void BoneMapEditor::create_editors() {
void BoneMapEditor::fetch_objects() {
skeleton = nullptr;
- // Hackey... but it may be the easist way to get a selected object from "ImporterScene".
+ // Hackey... but it may be the easiest way to get a selected object from "ImporterScene".
SceneImportSettings *si = SceneImportSettings::get_singleton();
if (!si) {
return;
diff --git a/editor/plugins/bone_map_editor_plugin.h b/editor/plugins/bone_map_editor_plugin.h
index 55261ab477..7974d241a2 100644
--- a/editor/plugins/bone_map_editor_plugin.h
+++ b/editor/plugins/bone_map_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* bone_map_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* bone_map_editor_plugin.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 BONE_MAP_EDITOR_PLUGIN_H
#define BONE_MAP_EDITOR_PLUGIN_H
@@ -41,11 +41,14 @@
#endif
#include "scene/3d/skeleton_3d.h"
+#include "scene/gui/box_container.h"
#include "scene/gui/color_rect.h"
#include "scene/gui/dialogs.h"
#include "scene/resources/bone_map.h"
#include "scene/resources/texture.h"
+class AspectRatioContainer;
+
class BoneMapperButton : public TextureButton {
GDCLASS(BoneMapperButton, TextureButton);
@@ -206,7 +209,6 @@ class BoneMapEditor : public VBoxContainer {
BoneMapper *bone_mapper = nullptr;
void fetch_objects();
- void clear_editors();
void create_editors();
protected:
diff --git a/editor/plugins/camera_3d_editor_plugin.cpp b/editor/plugins/camera_3d_editor_plugin.cpp
index 1aedb3b4ce..b9555296b8 100644
--- a/editor/plugins/camera_3d_editor_plugin.cpp
+++ b/editor/plugins/camera_3d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* camera_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* camera_3d_editor_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 "camera_3d_editor_plugin.h"
diff --git a/editor/plugins/camera_3d_editor_plugin.h b/editor/plugins/camera_3d_editor_plugin.h
index a969b31976..7d5fae6f2b 100644
--- a/editor/plugins/camera_3d_editor_plugin.h
+++ b/editor/plugins/camera_3d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* camera_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* camera_3d_editor_plugin.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 CAMERA_3D_EDITOR_PLUGIN_H
#define CAMERA_3D_EDITOR_PLUGIN_H
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 070834b33b..4c14755b03 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -1,46 +1,45 @@
-/*************************************************************************/
-/* canvas_item_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* canvas_item_editor_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 "canvas_item_editor_plugin.h"
#include "core/config/project_settings.h"
#include "core/input/input.h"
-#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
-#include "core/string/print_string.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/editor_toaster.h"
#include "editor/editor_undo_redo_manager.h"
+#include "editor/editor_zoom_widget.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/scene_tree_dock.h"
@@ -55,6 +54,7 @@
#include "scene/gui/grid_container.h"
#include "scene/gui/nine_patch_rect.h"
#include "scene/gui/separator.h"
+#include "scene/gui/split_container.h"
#include "scene/gui/subviewport_container.h"
#include "scene/gui/view_panner.h"
#include "scene/main/canvas_layer.h"
@@ -116,6 +116,7 @@ public:
grid_offset_x->set_allow_greater(true);
grid_offset_x->set_suffix("px");
grid_offset_x->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ grid_offset_x->set_select_all_on_focus(true);
child_container->add_child(grid_offset_x);
grid_offset_y = memnew(SpinBox);
@@ -125,6 +126,7 @@ public:
grid_offset_y->set_allow_greater(true);
grid_offset_y->set_suffix("px");
grid_offset_y->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ grid_offset_y->set_select_all_on_focus(true);
child_container->add_child(grid_offset_y);
label = memnew(Label);
@@ -133,19 +135,21 @@ public:
label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid_step_x = memnew(SpinBox);
- grid_step_x->set_min(0.01);
+ grid_step_x->set_min(1);
grid_step_x->set_max(SPIN_BOX_GRID_RANGE);
grid_step_x->set_allow_greater(true);
grid_step_x->set_suffix("px");
grid_step_x->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ grid_step_x->set_select_all_on_focus(true);
child_container->add_child(grid_step_x);
grid_step_y = memnew(SpinBox);
- grid_step_y->set_min(0.01);
+ grid_step_y->set_min(1);
grid_step_y->set_max(SPIN_BOX_GRID_RANGE);
grid_step_y->set_allow_greater(true);
grid_step_y->set_suffix("px");
grid_step_y->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ grid_step_y->set_select_all_on_focus(true);
child_container->add_child(grid_step_y);
child_container = memnew(GridContainer);
@@ -164,6 +168,7 @@ public:
primary_grid_steps->set_allow_greater(true);
primary_grid_steps->set_suffix(TTR("steps"));
primary_grid_steps->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ primary_grid_steps->set_select_all_on_focus(true);
child_container->add_child(primary_grid_steps);
container->add_child(memnew(HSeparator));
@@ -184,6 +189,7 @@ public:
rotation_offset->set_max(SPIN_BOX_ROTATION_RANGE);
rotation_offset->set_suffix("deg");
rotation_offset->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ rotation_offset->set_select_all_on_focus(true);
child_container->add_child(rotation_offset);
label = memnew(Label);
@@ -196,6 +202,7 @@ public:
rotation_step->set_max(SPIN_BOX_ROTATION_RANGE);
rotation_step->set_suffix("deg");
rotation_step->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ rotation_step->set_select_all_on_focus(true);
child_container->add_child(rotation_step);
container->add_child(memnew(HSeparator));
@@ -214,6 +221,7 @@ public:
scale_step->set_allow_greater(true);
scale_step->set_h_size_flags(Control::SIZE_EXPAND_FILL);
scale_step->set_step(0.01f);
+ scale_step->set_select_all_on_focus(true);
child_container->add_child(scale_step);
}
@@ -304,7 +312,7 @@ void CanvasItemEditor::_snap_other_nodes(
Point2 &r_current_snap, SnapTarget (&r_current_snap_target)[2],
const SnapTarget p_snap_target, List<const CanvasItem *> p_exceptions,
const Node *p_current) {
- const CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_current);
+ const CanvasItem *ci = Object::cast_to<CanvasItem>(p_current);
// Check if the element is in the exception
bool exception = false;
@@ -315,12 +323,12 @@ void CanvasItemEditor::_snap_other_nodes(
}
};
- if (canvas_item && !exception) {
- Transform2D ci_transform = canvas_item->get_global_transform_with_canvas();
+ if (ci && !exception) {
+ Transform2D ci_transform = ci->get_global_transform_with_canvas();
if (fmod(ci_transform.get_rotation() - p_transform_to_snap.get_rotation(), (real_t)360.0) == 0.0) {
- if (canvas_item->_edit_use_rect()) {
- Point2 begin = ci_transform.xform(canvas_item->_edit_get_rect().get_position());
- Point2 end = ci_transform.xform(canvas_item->_edit_get_rect().get_position() + canvas_item->_edit_get_rect().get_size());
+ if (ci->_edit_use_rect()) {
+ Point2 begin = ci_transform.xform(ci->_edit_get_rect().get_position());
+ Point2 end = ci_transform.xform(ci->_edit_get_rect().get_position() + ci->_edit_get_rect().get_size());
_snap_if_closer_point(p_value, r_current_snap, r_current_snap_target, begin, p_snap_target, ci_transform.get_rotation());
_snap_if_closer_point(p_value, r_current_snap, r_current_snap_target, end, p_snap_target, ci_transform.get_rotation());
@@ -404,7 +412,7 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, unsig
// Other nodes sides
if ((is_snap_active && snap_other_nodes && (p_modes & SNAP_OTHER_NODES)) || (p_forced_modes & SNAP_OTHER_NODES)) {
- Transform2D to_snap_transform = Transform2D();
+ Transform2D to_snap_transform;
List<const CanvasItem *> exceptions = List<const CanvasItem *>();
for (const CanvasItem *E : p_other_nodes_exceptions) {
exceptions.push_back(E);
@@ -528,14 +536,14 @@ Rect2 CanvasItemEditor::_get_encompassing_rect_from_list(List<CanvasItem *> p_li
ERR_FAIL_COND_V(p_list.is_empty(), Rect2());
// Handles the first element
- CanvasItem *canvas_item = p_list.front()->get();
- Rect2 rect = Rect2(canvas_item->get_global_transform_with_canvas().xform(canvas_item->_edit_get_rect().get_center()), Size2());
+ CanvasItem *ci = p_list.front()->get();
+ Rect2 rect = Rect2(ci->get_global_transform_with_canvas().xform(ci->_edit_get_rect().get_center()), Size2());
// Expand with the other ones
- for (CanvasItem *canvas_item2 : p_list) {
- Transform2D xform = canvas_item2->get_global_transform_with_canvas();
+ for (CanvasItem *ci2 : p_list) {
+ Transform2D xform = ci2->get_global_transform_with_canvas();
- Rect2 current_rect = canvas_item2->_edit_get_rect();
+ Rect2 current_rect = ci2->_edit_get_rect();
rect.expand_to(xform.xform(current_rect.position));
rect.expand_to(xform.xform(current_rect.position + Vector2(current_rect.size.x, 0)));
rect.expand_to(xform.xform(current_rect.position + current_rect.size));
@@ -553,24 +561,24 @@ void CanvasItemEditor::_expand_encompassing_rect_using_children(Rect2 &r_rect, c
return;
}
- const CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
+ const CanvasItem *ci = Object::cast_to<CanvasItem>(p_node);
for (int i = p_node->get_child_count() - 1; i >= 0; i--) {
- if (canvas_item && !canvas_item->is_set_as_top_level()) {
- _expand_encompassing_rect_using_children(r_rect, p_node->get_child(i), r_first, p_parent_xform * canvas_item->get_transform(), p_canvas_xform);
+ if (ci && !ci->is_set_as_top_level()) {
+ _expand_encompassing_rect_using_children(r_rect, p_node->get_child(i), r_first, p_parent_xform * ci->get_transform(), p_canvas_xform);
} else {
- const CanvasLayer *canvas_layer = Object::cast_to<CanvasLayer>(p_node);
- _expand_encompassing_rect_using_children(r_rect, p_node->get_child(i), r_first, Transform2D(), canvas_layer ? canvas_layer->get_transform() : p_canvas_xform);
+ const CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node);
+ _expand_encompassing_rect_using_children(r_rect, p_node->get_child(i), r_first, Transform2D(), cl ? cl->get_transform() : p_canvas_xform);
}
}
- if (canvas_item && canvas_item->is_visible_in_tree() && (include_locked_nodes || !_is_node_locked(canvas_item))) {
+ if (ci && ci->is_visible_in_tree() && (include_locked_nodes || !_is_node_locked(ci))) {
Transform2D xform = p_canvas_xform;
- if (!canvas_item->is_set_as_top_level()) {
+ if (!ci->is_set_as_top_level()) {
xform *= p_parent_xform;
}
- xform *= canvas_item->get_transform();
- Rect2 rect = canvas_item->_edit_get_rect();
+ xform *= ci->get_transform();
+ Rect2 rect = ci->_edit_get_rect();
if (r_first) {
r_rect = Rect2(xform.xform(rect.get_center()), Size2());
r_first = false;
@@ -599,14 +607,14 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
}
const real_t grab_distance = EDITOR_GET("editors/polygon_editor/point_grab_radius");
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
+ CanvasItem *ci = Object::cast_to<CanvasItem>(p_node);
for (int i = p_node->get_child_count() - 1; i >= 0; i--) {
- if (canvas_item) {
- if (!canvas_item->is_set_as_top_level()) {
- _find_canvas_items_at_pos(p_pos, p_node->get_child(i), r_items, p_parent_xform * canvas_item->get_transform(), p_canvas_xform);
+ if (ci) {
+ if (!ci->is_set_as_top_level()) {
+ _find_canvas_items_at_pos(p_pos, p_node->get_child(i), r_items, p_parent_xform * ci->get_transform(), p_canvas_xform);
} else {
- _find_canvas_items_at_pos(p_pos, p_node->get_child(i), r_items, canvas_item->get_transform(), p_canvas_xform);
+ _find_canvas_items_at_pos(p_pos, p_node->get_child(i), r_items, ci->get_transform(), p_canvas_xform);
}
} else {
CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node);
@@ -614,18 +622,18 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
}
}
- if (canvas_item && canvas_item->is_visible_in_tree()) {
+ if (ci && ci->is_visible_in_tree()) {
Transform2D xform = p_canvas_xform;
- if (!canvas_item->is_set_as_top_level()) {
+ if (!ci->is_set_as_top_level()) {
xform *= p_parent_xform;
}
- xform = (xform * canvas_item->get_transform()).affine_inverse();
+ xform = (xform * ci->get_transform()).affine_inverse();
const real_t local_grab_distance = xform.basis_xform(Vector2(grab_distance, 0)).length() / zoom;
- if (canvas_item->_edit_is_selected_on_click(xform.xform(p_pos), local_grab_distance)) {
- Node2D *node = Object::cast_to<Node2D>(canvas_item);
+ if (ci->_edit_is_selected_on_click(xform.xform(p_pos), local_grab_distance)) {
+ Node2D *node = Object::cast_to<Node2D>(ci);
_SelectResult res;
- res.item = canvas_item;
+ res.item = ci;
res.z_index = node ? node->get_z_index() : 0;
res.has_z = node;
r_items.push_back(res);
@@ -647,13 +655,13 @@ void CanvasItemEditor::_get_canvas_items_at_pos(const Point2 &p_pos, Vector<_Sel
node = scene->get_deepest_editable_node(node);
}
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(node);
+ CanvasItem *ci = Object::cast_to<CanvasItem>(node);
if (!p_allow_locked) {
// Replace the node by the group if grouped
while (node && node != scene->get_parent()) {
- CanvasItem *canvas_item_tmp = Object::cast_to<CanvasItem>(node);
- if (canvas_item_tmp && node->has_meta("_edit_group_")) {
- canvas_item = canvas_item_tmp;
+ CanvasItem *ci_tmp = Object::cast_to<CanvasItem>(node);
+ if (ci_tmp && node->has_meta("_edit_group_")) {
+ ci = ci_tmp;
}
node = node->get_parent();
}
@@ -662,18 +670,18 @@ void CanvasItemEditor::_get_canvas_items_at_pos(const Point2 &p_pos, Vector<_Sel
// Check if the canvas item is already in the list (for groups or scenes)
bool duplicate = false;
for (int j = 0; j < i; j++) {
- if (r_items[j].item == canvas_item) {
+ if (r_items[j].item == ci) {
duplicate = true;
break;
}
}
//Remove the item if invalid
- if (!canvas_item || duplicate || (canvas_item != scene && canvas_item->get_owner() != scene && !scene->is_editable_instance(canvas_item->get_owner())) || (!p_allow_locked && _is_node_locked(canvas_item))) {
+ if (!ci || duplicate || (ci != scene && ci->get_owner() != scene && !scene->is_editable_instance(ci->get_owner())) || (!p_allow_locked && _is_node_locked(ci))) {
r_items.remove_at(i);
i--;
} else {
- r_items.write[i].item = canvas_item;
+ r_items.write[i].item = ci;
}
}
}
@@ -686,7 +694,7 @@ void CanvasItemEditor::_find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_n
return;
}
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
+ CanvasItem *ci = Object::cast_to<CanvasItem>(p_node);
Node *scene = EditorNode::get_singleton()->get_edited_scene();
bool editable = p_node == scene || p_node->get_owner() == scene || p_node == scene->get_deepest_editable_node(p_node);
@@ -695,37 +703,37 @@ void CanvasItemEditor::_find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_n
if (!lock_children || !editable) {
for (int i = p_node->get_child_count() - 1; i >= 0; i--) {
- if (canvas_item) {
- if (!canvas_item->is_set_as_top_level()) {
- _find_canvas_items_in_rect(p_rect, p_node->get_child(i), r_items, p_parent_xform * canvas_item->get_transform(), p_canvas_xform);
+ if (ci) {
+ if (!ci->is_set_as_top_level()) {
+ _find_canvas_items_in_rect(p_rect, p_node->get_child(i), r_items, p_parent_xform * ci->get_transform(), p_canvas_xform);
} else {
- _find_canvas_items_in_rect(p_rect, p_node->get_child(i), r_items, canvas_item->get_transform(), p_canvas_xform);
+ _find_canvas_items_in_rect(p_rect, p_node->get_child(i), r_items, ci->get_transform(), p_canvas_xform);
}
} else {
- CanvasLayer *canvas_layer = Object::cast_to<CanvasLayer>(p_node);
- _find_canvas_items_in_rect(p_rect, p_node->get_child(i), r_items, Transform2D(), canvas_layer ? canvas_layer->get_transform() : p_canvas_xform);
+ CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node);
+ _find_canvas_items_in_rect(p_rect, p_node->get_child(i), r_items, Transform2D(), cl ? cl->get_transform() : p_canvas_xform);
}
}
}
- if (canvas_item && canvas_item->is_visible_in_tree() && !locked && editable) {
+ if (ci && ci->is_visible_in_tree() && !locked && editable) {
Transform2D xform = p_canvas_xform;
- if (!canvas_item->is_set_as_top_level()) {
+ if (!ci->is_set_as_top_level()) {
xform *= p_parent_xform;
}
- xform *= canvas_item->get_transform();
+ xform *= ci->get_transform();
- if (canvas_item->_edit_use_rect()) {
- Rect2 rect = canvas_item->_edit_get_rect();
+ if (ci->_edit_use_rect()) {
+ Rect2 rect = ci->_edit_get_rect();
if (p_rect.has_point(xform.xform(rect.position)) &&
p_rect.has_point(xform.xform(rect.position + Vector2(rect.size.x, 0))) &&
p_rect.has_point(xform.xform(rect.position + Vector2(rect.size.x, rect.size.y))) &&
p_rect.has_point(xform.xform(rect.position + Vector2(0, rect.size.y)))) {
- r_items->push_back(canvas_item);
+ r_items->push_back(ci);
}
} else {
if (p_rect.has_point(xform.xform(Point2()))) {
- r_items->push_back(canvas_item);
+ r_items->push_back(ci);
}
}
}
@@ -765,11 +773,11 @@ bool CanvasItemEditor::_select_click_on_item(CanvasItem *item, Point2 p_click_po
List<CanvasItem *> CanvasItemEditor::_get_edited_canvas_items(bool retrieve_locked, bool remove_canvas_item_if_parent_in_selection) {
List<CanvasItem *> selection;
for (const KeyValue<Node *, Object *> &E : editor_selection->get_selection()) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key);
- if (canvas_item && canvas_item->is_visible_in_tree() && canvas_item->get_viewport() == EditorNode::get_singleton()->get_scene_root() && (retrieve_locked || !_is_node_locked(canvas_item))) {
- CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
+ CanvasItem *ci = Object::cast_to<CanvasItem>(E.key);
+ if (ci && ci->is_visible_in_tree() && ci->get_viewport() == EditorNode::get_singleton()->get_scene_root() && (retrieve_locked || !_is_node_locked(ci))) {
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci);
if (se) {
- selection.push_back(canvas_item);
+ selection.push_back(ci);
}
}
}
@@ -805,7 +813,7 @@ Vector2 CanvasItemEditor::_position_to_anchor(const Control *p_control, Vector2
Rect2 parent_rect = p_control->get_parent_anchorable_rect();
- Vector2 output = Vector2();
+ Vector2 output;
if (p_control->is_layout_rtl()) {
output.x = (parent_rect.size.x == 0) ? 0.0 : (parent_rect.size.x - p_control->get_transform().xform(position).x - parent_rect.position.x) / parent_rect.size.x;
} else {
@@ -819,18 +827,18 @@ void CanvasItemEditor::_save_canvas_item_state(List<CanvasItem *> p_canvas_items
original_transform = Transform2D();
bool transform_stored = false;
- for (CanvasItem *canvas_item : p_canvas_items) {
- CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
+ for (CanvasItem *ci : p_canvas_items) {
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci);
if (se) {
if (!transform_stored) {
- original_transform = canvas_item->get_global_transform();
+ original_transform = ci->get_global_transform();
transform_stored = true;
}
- se->undo_state = canvas_item->_edit_get_state();
- se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
- if (canvas_item->_edit_use_rect()) {
- se->pre_drag_rect = canvas_item->_edit_get_rect();
+ se->undo_state = ci->_edit_get_state();
+ se->pre_drag_xform = ci->get_global_transform_with_canvas();
+ if (ci->_edit_use_rect()) {
+ se->pre_drag_rect = ci->_edit_get_rect();
} else {
se->pre_drag_rect = Rect2();
}
@@ -839,20 +847,20 @@ void CanvasItemEditor::_save_canvas_item_state(List<CanvasItem *> p_canvas_items
}
void CanvasItemEditor::_restore_canvas_item_state(List<CanvasItem *> p_canvas_items, bool restore_bones) {
- for (CanvasItem *canvas_item : drag_selection) {
- CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
- canvas_item->_edit_set_state(se->undo_state);
+ for (CanvasItem *ci : drag_selection) {
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci);
+ ci->_edit_set_state(se->undo_state);
}
}
void CanvasItemEditor::_commit_canvas_item_state(List<CanvasItem *> p_canvas_items, String action_name, bool commit_bones) {
List<CanvasItem *> modified_canvas_items;
- for (CanvasItem *canvas_item : p_canvas_items) {
- Dictionary old_state = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item)->undo_state;
- Dictionary new_state = canvas_item->_edit_get_state();
+ for (CanvasItem *ci : p_canvas_items) {
+ Dictionary old_state = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci)->undo_state;
+ Dictionary new_state = ci->_edit_get_state();
if (old_state.hash() != new_state.hash()) {
- modified_canvas_items.push_back(canvas_item);
+ modified_canvas_items.push_back(ci);
}
}
@@ -860,17 +868,18 @@ void CanvasItemEditor::_commit_canvas_item_state(List<CanvasItem *> p_canvas_ite
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(action_name);
- for (CanvasItem *canvas_item : modified_canvas_items) {
- CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
+ for (CanvasItem *ci : modified_canvas_items) {
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci);
if (se) {
- undo_redo->add_do_method(canvas_item, "_edit_set_state", canvas_item->_edit_get_state());
- undo_redo->add_undo_method(canvas_item, "_edit_set_state", se->undo_state);
+ undo_redo->add_do_method(ci, "_edit_set_state", ci->_edit_get_state());
+ undo_redo->add_undo_method(ci, "_edit_set_state", se->undo_state);
if (commit_bones) {
for (const Dictionary &F : se->pre_drag_bones_undo_state) {
- canvas_item = Object::cast_to<CanvasItem>(canvas_item->get_parent());
- undo_redo->add_do_method(canvas_item, "_edit_set_state", canvas_item->_edit_get_state());
- undo_redo->add_undo_method(canvas_item, "_edit_set_state", F);
+ ci = Object::cast_to<CanvasItem>(ci->get_parent());
+ undo_redo->add_do_method(ci, "_edit_set_state", ci->_edit_get_state());
+ undo_redo->add_undo_method(ci, "_edit_set_state", F);
}
}
}
@@ -919,13 +928,12 @@ void CanvasItemEditor::_add_node_pressed(int p_result) {
[[fallthrough]];
}
case ADD_MOVE: {
- if (p_result == ADD_MOVE) {
- nodes_to_move = EditorNode::get_singleton()->get_editor_selection()->get_selected_node_list();
- }
+ nodes_to_move = EditorNode::get_singleton()->get_editor_selection()->get_selected_node_list();
if (nodes_to_move.is_empty()) {
return;
}
+ 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);
@@ -1014,6 +1022,7 @@ void CanvasItemEditor::_on_grid_menu_id_pressed(int p_id) {
}
bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_event) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<InputEventMouseButton> b = p_event;
Ref<InputEventMouseMotion> m = p_event;
@@ -1313,14 +1322,14 @@ 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
drag_selection = List<CanvasItem *>();
- for (CanvasItem *canvas_item : selection) {
- if (canvas_item->_edit_use_pivot()) {
- drag_selection.push_back(canvas_item);
+ for (CanvasItem *ci : selection) {
+ if (ci->_edit_use_pivot()) {
+ drag_selection.push_back(ci);
}
}
@@ -1334,8 +1343,8 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) {
} else {
new_pos = snap_point(drag_from, SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, nullptr, drag_selection);
}
- for (CanvasItem *canvas_item : drag_selection) {
- canvas_item->_edit_set_pivot(canvas_item->get_global_transform_with_canvas().affine_inverse().xform(new_pos));
+ for (CanvasItem *ci : drag_selection) {
+ ci->_edit_set_pivot(ci->get_global_transform_with_canvas().affine_inverse().xform(new_pos));
}
drag_type = DRAG_PIVOT;
@@ -1355,8 +1364,8 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) {
} else {
new_pos = snap_point(drag_to, SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL);
}
- for (CanvasItem *canvas_item : drag_selection) {
- canvas_item->_edit_set_pivot(canvas_item->get_global_transform_with_canvas().affine_inverse().xform(new_pos));
+ for (CanvasItem *ci : drag_selection) {
+ ci->_edit_set_pivot(ci->get_global_transform_with_canvas().affine_inverse().xform(new_pos));
}
return true;
}
@@ -1408,11 +1417,11 @@ bool CanvasItemEditor::_gui_input_rotate(const Ref<InputEvent> &p_event) {
if (drag_selection.size() > 0) {
drag_type = DRAG_ROTATE;
drag_from = transform.affine_inverse().xform(b->get_position());
- CanvasItem *canvas_item = drag_selection[0];
- if (canvas_item->_edit_use_pivot()) {
- drag_rotation_center = canvas_item->get_global_transform_with_canvas().xform(canvas_item->_edit_get_pivot());
+ CanvasItem *ci = drag_selection[0];
+ if (ci->_edit_use_pivot()) {
+ drag_rotation_center = ci->get_global_transform_with_canvas().xform(ci->_edit_get_pivot());
} else {
- drag_rotation_center = canvas_item->get_global_transform_with_canvas().get_origin();
+ drag_rotation_center = ci->get_global_transform_with_canvas().get_origin();
}
_save_canvas_item_state(drag_selection);
return true;
@@ -1425,11 +1434,11 @@ bool CanvasItemEditor::_gui_input_rotate(const Ref<InputEvent> &p_event) {
// Rotate the node
if (m.is_valid()) {
_restore_canvas_item_state(drag_selection);
- for (CanvasItem *canvas_item : drag_selection) {
+ for (CanvasItem *ci : drag_selection) {
drag_to = transform.affine_inverse().xform(m->get_position());
//Rotate the opposite way if the canvas item's compounded scale has an uneven number of negative elements
- bool opposite = (canvas_item->get_global_transform().get_scale().sign().dot(canvas_item->get_transform().get_scale().sign()) == 0);
- canvas_item->_edit_set_rotation(snap_angle(canvas_item->_edit_get_rotation() + (opposite ? -1 : 1) * (drag_from - drag_rotation_center).angle_to(drag_to - drag_rotation_center), canvas_item->_edit_get_rotation()));
+ bool opposite = (ci->get_global_transform().get_scale().sign().dot(ci->get_transform().get_scale().sign()) == 0);
+ ci->_edit_set_rotation(snap_angle(ci->_edit_get_rotation() + (opposite ? -1 : 1) * (drag_from - drag_rotation_center).angle_to(drag_to - drag_rotation_center), ci->_edit_get_rotation()));
viewport->queue_redraw();
}
return true;
@@ -1477,9 +1486,9 @@ bool CanvasItemEditor::_gui_input_open_scene_on_double_click(const Ref<InputEven
if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && b->is_double_click() && tool == TOOL_SELECT) {
List<CanvasItem *> selection = _get_edited_canvas_items();
if (selection.size() == 1) {
- CanvasItem *canvas_item = selection[0];
- if (!canvas_item->get_scene_file_path().is_empty() && canvas_item != EditorNode::get_singleton()->get_edited_scene()) {
- EditorNode::get_singleton()->open_request(canvas_item->get_scene_file_path());
+ CanvasItem *ci = selection[0];
+ if (!ci->get_scene_file_path().is_empty() && ci != EditorNode::get_singleton()->get_edited_scene()) {
+ EditorNode::get_singleton()->open_request(ci->get_scene_file_path());
return true;
}
}
@@ -1641,10 +1650,10 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) {
if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && tool == TOOL_SELECT) {
List<CanvasItem *> selection = _get_edited_canvas_items();
if (selection.size() == 1) {
- CanvasItem *canvas_item = selection[0];
- if (canvas_item->_edit_use_rect() && _is_node_movable(canvas_item)) {
- Rect2 rect = canvas_item->_edit_get_rect();
- Transform2D xform = transform * canvas_item->get_global_transform_with_canvas();
+ CanvasItem *ci = selection[0];
+ if (ci->_edit_use_rect() && _is_node_movable(ci)) {
+ Rect2 rect = ci->_edit_get_rect();
+ Transform2D xform = transform * ci->get_global_transform_with_canvas();
const Vector2 endpoints[4] = {
xform.xform(rect.position),
@@ -1689,7 +1698,7 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) {
drag_type = resize_drag;
drag_from = transform.affine_inverse().xform(b->get_position());
drag_selection = List<CanvasItem *>();
- drag_selection.push_back(canvas_item);
+ drag_selection.push_back(ci);
_save_canvas_item_state(drag_selection);
return true;
}
@@ -1702,40 +1711,34 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) {
drag_type == DRAG_TOP_LEFT || drag_type == DRAG_TOP_RIGHT || drag_type == DRAG_BOTTOM_LEFT || drag_type == DRAG_BOTTOM_RIGHT) {
// Resize the node
if (m.is_valid()) {
- CanvasItem *canvas_item = drag_selection[0];
- CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
+ CanvasItem *ci = drag_selection[0];
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci);
//Reset state
- canvas_item->_edit_set_state(se->undo_state);
+ ci->_edit_set_state(se->undo_state);
bool uniform = m->is_shift_pressed();
bool symmetric = m->is_alt_pressed();
- Rect2 local_rect = canvas_item->_edit_get_rect();
+ Rect2 local_rect = ci->_edit_get_rect();
real_t aspect = local_rect.get_size().y / local_rect.get_size().x;
Point2 current_begin = local_rect.get_position();
Point2 current_end = local_rect.get_position() + local_rect.get_size();
- Point2 max_begin = (symmetric) ? (current_begin + current_end - canvas_item->_edit_get_minimum_size()) / 2.0 : current_end - canvas_item->_edit_get_minimum_size();
- Point2 min_end = (symmetric) ? (current_begin + current_end + canvas_item->_edit_get_minimum_size()) / 2.0 : current_begin + canvas_item->_edit_get_minimum_size();
+ Point2 max_begin = (symmetric) ? (current_begin + current_end - ci->_edit_get_minimum_size()) / 2.0 : current_end - ci->_edit_get_minimum_size();
+ Point2 min_end = (symmetric) ? (current_begin + current_end + ci->_edit_get_minimum_size()) / 2.0 : current_begin + ci->_edit_get_minimum_size();
Point2 center = (current_begin + current_end) / 2.0;
drag_to = transform.affine_inverse().xform(m->get_position());
- Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse();
+ Transform2D xform = ci->get_global_transform_with_canvas();
Point2 drag_to_snapped_begin;
Point2 drag_to_snapped_end;
- // last call decides which snapping lines are drawn
- if (drag_type == DRAG_LEFT || drag_type == DRAG_TOP || drag_type == DRAG_TOP_LEFT) {
- drag_to_snapped_end = snap_point(xform.affine_inverse().xform(current_end) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, canvas_item);
- drag_to_snapped_begin = snap_point(xform.affine_inverse().xform(current_begin) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, canvas_item);
- } else {
- drag_to_snapped_begin = snap_point(xform.affine_inverse().xform(current_begin) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, canvas_item);
- drag_to_snapped_end = snap_point(xform.affine_inverse().xform(current_end) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, canvas_item);
- }
+ drag_to_snapped_end = snap_point(xform.xform(current_end) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, ci);
+ drag_to_snapped_begin = snap_point(xform.xform(current_begin) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, 0, ci);
- Point2 drag_begin = xform.xform(drag_to_snapped_begin);
- Point2 drag_end = xform.xform(drag_to_snapped_end);
+ Point2 drag_begin = xform.affine_inverse().xform(drag_to_snapped_begin);
+ Point2 drag_end = xform.affine_inverse().xform(drag_to_snapped_end);
// Horizontal resize
if (drag_type == DRAG_LEFT || drag_type == DRAG_TOP_LEFT || drag_type == DRAG_BOTTOM_LEFT) {
@@ -1787,7 +1790,7 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) {
current_begin.y = 2.0 * center.y - current_end.y;
}
}
- canvas_item->_edit_set_rect(Rect2(current_begin, current_end - current_begin));
+ ci->_edit_set_rect(Rect2(current_begin, current_end - current_begin));
return true;
}
@@ -1847,14 +1850,14 @@ 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 *canvas_item = selection[0];
+ CanvasItem *ci = selection[0];
- if (_is_node_movable(canvas_item)) {
- Transform2D xform = transform * canvas_item->get_global_transform_with_canvas();
- Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * canvas_item->_edit_get_transform()).orthonormalized();
+ if (_is_node_movable(ci)) {
+ Transform2D xform = transform * ci->get_global_transform_with_canvas();
+ Transform2D unscaled_transform = (xform * ci->get_transform().affine_inverse() * ci->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
drag_type = DRAG_SCALE_BOTH;
@@ -1873,7 +1876,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) {
drag_from = transform.affine_inverse().xform(b->get_position());
drag_selection = List<CanvasItem *>();
- drag_selection.push_back(canvas_item);
+ drag_selection.push_back(ci);
_save_canvas_item_state(drag_selection);
return true;
}
@@ -1885,22 +1888,22 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) {
// Resize the node
if (m.is_valid()) {
_restore_canvas_item_state(drag_selection);
- CanvasItem *canvas_item = drag_selection[0];
+ CanvasItem *ci = drag_selection[0];
drag_to = transform.affine_inverse().xform(m->get_position());
- Transform2D parent_xform = canvas_item->get_global_transform_with_canvas() * canvas_item->get_transform().affine_inverse();
- Transform2D unscaled_transform = (transform * parent_xform * canvas_item->_edit_get_transform()).orthonormalized();
+ Transform2D parent_xform = ci->get_global_transform_with_canvas() * ci->get_transform().affine_inverse();
+ Transform2D unscaled_transform = (transform * parent_xform * ci->_edit_get_transform()).orthonormalized();
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);
Point2 offset = drag_to_local - drag_from_local;
- Size2 scale = canvas_item->_edit_get_scale();
+ Size2 scale = ci->_edit_get_scale();
Size2 original_scale = scale;
real_t ratio = scale.y / scale.x;
if (drag_type == DRAG_SCALE_BOTH) {
@@ -1938,7 +1941,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) {
}
}
- canvas_item->_edit_set_scale(scale);
+ ci->_edit_set_scale(scale);
return true;
}
@@ -1986,7 +1989,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();
@@ -1999,9 +2002,9 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
if (selection.size() > 0) {
drag_type = DRAG_MOVE;
- CanvasItem *canvas_item = selection[0];
- Transform2D parent_xform = canvas_item->get_global_transform_with_canvas() * canvas_item->get_transform().affine_inverse();
- Transform2D unscaled_transform = (transform * parent_xform * canvas_item->_edit_get_transform()).orthonormalized();
+ CanvasItem *ci = selection[0];
+ Transform2D parent_xform = ci->get_global_transform_with_canvas() * ci->get_transform().affine_inverse();
+ Transform2D unscaled_transform = (transform * parent_xform * ci->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
if (show_transformation_gizmos) {
@@ -2057,12 +2060,9 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
}
}
- int index = 0;
- for (CanvasItem *canvas_item : drag_selection) {
- Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse() * canvas_item->get_transform();
-
- canvas_item->_edit_set_position(canvas_item->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos));
- index++;
+ for (CanvasItem *ci : drag_selection) {
+ Transform2D xform = ci->get_global_transform_with_canvas().affine_inverse() * ci->get_transform();
+ ci->_edit_set_position(ci->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos));
}
return true;
}
@@ -2180,12 +2180,9 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
new_pos = previous_pos + (drag_to - drag_from);
}
- int index = 0;
- for (CanvasItem *canvas_item : drag_selection) {
- Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse() * canvas_item->get_transform();
-
- canvas_item->_edit_set_position(canvas_item->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos));
- index++;
+ for (CanvasItem *ci : drag_selection) {
+ Transform2D xform = ci->get_global_transform_with_canvas().affine_inverse() * ci->get_transform();
+ ci->_edit_set_position(ci->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos));
}
}
return true;
@@ -2263,15 +2260,15 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
Node *node = item;
while (node && node != scene->get_parent()) {
- CanvasItem *canvas_item_tmp = Object::cast_to<CanvasItem>(node);
- if (canvas_item_tmp && node->has_meta("_edit_group_")) {
+ CanvasItem *ci_tmp = Object::cast_to<CanvasItem>(node);
+ if (ci_tmp && node->has_meta("_edit_group_")) {
locked = 2;
}
node = node->get_parent();
}
}
- String suffix = String();
+ String suffix;
if (locked == 1) {
suffix = " (" + TTR("Locked") + ")";
} else if (locked == 2) {
@@ -2325,16 +2322,16 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
}
// Find the item to select
- CanvasItem *canvas_item = nullptr;
+ CanvasItem *ci = nullptr;
Vector<_SelectResult> selection = Vector<_SelectResult>();
// Retrieve the canvas items
_get_canvas_items_at_pos(click, selection);
if (!selection.is_empty()) {
- canvas_item = selection[0].item;
+ ci = selection[0].item;
}
- if (!canvas_item) {
+ if (!ci) {
// Start a box selection
if (!b->is_shift_pressed()) {
// Clear the selection if not additive
@@ -2348,7 +2345,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
box_selecting_to = drag_from;
return true;
} else {
- bool still_selected = _select_click_on_item(canvas_item, click, b->is_shift_pressed());
+ bool still_selected = _select_click_on_item(ci, click, b->is_shift_pressed());
// Start dragging
if (still_selected) {
// Drag the node(s) if requested
@@ -2488,16 +2485,16 @@ bool CanvasItemEditor::_gui_input_hover(const Ref<InputEvent> &p_event) {
// Compute the nodes names and icon position
Vector<_HoverResult> hovering_results_tmp;
for (int i = 0; i < hovering_results_items.size(); i++) {
- CanvasItem *canvas_item = hovering_results_items[i].item;
+ CanvasItem *ci = hovering_results_items[i].item;
- if (canvas_item->_edit_use_rect()) {
+ if (ci->_edit_use_rect()) {
continue;
}
_HoverResult hover_result;
- hover_result.position = canvas_item->get_global_transform_with_canvas().get_origin();
- hover_result.icon = EditorNode::get_singleton()->get_object_icon(canvas_item);
- hover_result.name = canvas_item->get_name();
+ hover_result.position = ci->get_global_transform_with_canvas().get_origin();
+ hover_result.icon = EditorNode::get_singleton()->get_object_icon(ci);
+ hover_result.name = ci->get_name();
hovering_results_tmp.push_back(hover_result);
}
@@ -2534,31 +2531,33 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
bool release_lmb = (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT); // Required to properly release some stuff (e.g. selection box) while panning.
- if (EditorSettings::get_singleton()->get("editors/panning/simple_panning") || !pan_pressed || release_lmb) {
- if ((accepted = _gui_input_rulers_and_guides(p_event))) {
+ if (EDITOR_GET("editors/panning/simple_panning") || !pan_pressed || release_lmb) {
+ accepted = true;
+ if (_gui_input_rulers_and_guides(p_event)) {
// print_line("Rulers and guides");
- } else if ((accepted = EditorNode::get_singleton()->get_editor_plugins_over()->forward_gui_input(p_event))) {
+ } else if (EditorNode::get_singleton()->get_editor_plugins_over()->forward_gui_input(p_event)) {
// print_line("Plugin");
- } else if ((accepted = _gui_input_open_scene_on_double_click(p_event))) {
+ } else if (_gui_input_open_scene_on_double_click(p_event)) {
// print_line("Open scene on double click");
- } else if ((accepted = _gui_input_scale(p_event))) {
+ } else if (_gui_input_scale(p_event)) {
// print_line("Set scale");
- } else if ((accepted = _gui_input_pivot(p_event))) {
+ } else if (_gui_input_pivot(p_event)) {
// print_line("Set pivot");
- } else if ((accepted = _gui_input_resize(p_event))) {
+ } else if (_gui_input_resize(p_event)) {
// print_line("Resize");
- } else if ((accepted = _gui_input_rotate(p_event))) {
+ } else if (_gui_input_rotate(p_event)) {
// print_line("Rotate");
- } else if ((accepted = _gui_input_move(p_event))) {
+ } else if (_gui_input_move(p_event)) {
// print_line("Move");
- } else if ((accepted = _gui_input_anchors(p_event))) {
+ } else if (_gui_input_anchors(p_event)) {
// print_line("Anchors");
- } else if ((accepted = _gui_input_select(p_event))) {
+ } else if (_gui_input_select(p_event)) {
// print_line("Selection");
- } else if ((accepted = _gui_input_ruler_tool(p_event))) {
+ } else if (_gui_input_ruler_tool(p_event)) {
// print_line("Measure");
} else {
// print_line("Not accepted");
+ accepted = false;
}
}
@@ -2720,7 +2719,7 @@ void CanvasItemEditor::_draw_focus() {
}
void CanvasItemEditor::_draw_guides() {
- Color guide_color = EditorSettings::get_singleton()->get("editors/2d/guides_color");
+ Color guide_color = EDITOR_GET("editors/2d/guides_color");
Transform2D xform = viewport_scrollable->get_transform() * transform;
// Guides already there.
@@ -2751,7 +2750,7 @@ void CanvasItemEditor::_draw_guides() {
if (drag_type == DRAG_DOUBLE_GUIDE || drag_type == DRAG_V_GUIDE) {
String str = TS->format_number(vformat("%d px", Math::round(xform.affine_inverse().xform(dragged_guide_pos).x)));
Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
- int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
+ int font_size = 1.3 * get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
Size2 text_size = font->get_string_size(str, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size);
viewport->draw_string_outline(font, Point2(dragged_guide_pos.x + 10, RULER_WIDTH + text_size.y / 2 + 10), str, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, outline_size, outline_color);
viewport->draw_string(font, Point2(dragged_guide_pos.x + 10, RULER_WIDTH + text_size.y / 2 + 10), str, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, text_color);
@@ -2760,7 +2759,7 @@ void CanvasItemEditor::_draw_guides() {
if (drag_type == DRAG_DOUBLE_GUIDE || drag_type == DRAG_H_GUIDE) {
String str = TS->format_number(vformat("%d px", Math::round(xform.affine_inverse().xform(dragged_guide_pos).y)));
Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
- int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
+ int font_size = 1.3 * get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
Size2 text_size = font->get_string_size(str, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size);
viewport->draw_string_outline(font, Point2(RULER_WIDTH + 10, dragged_guide_pos.y + text_size.y / 2 + 10), str, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, outline_size, outline_color);
viewport->draw_string(font, Point2(RULER_WIDTH + 10, dragged_guide_pos.y + text_size.y / 2 + 10), str, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, text_color);
@@ -2769,7 +2768,7 @@ void CanvasItemEditor::_draw_guides() {
}
void CanvasItemEditor::_draw_smart_snapping() {
- Color line_color = EditorSettings::get_singleton()->get("editors/2d/smart_snapping_line_color");
+ Color line_color = EDITOR_GET("editors/2d/smart_snapping_line_color");
if (snap_target[0] != SNAP_TARGET_NONE && snap_target[0] != SNAP_TARGET_GRID) {
viewport->draw_set_transform_matrix(viewport->get_transform() * transform * snap_transform);
viewport->draw_line(Point2(0, -1.0e+10F), Point2(0, 1.0e+10F), line_color);
@@ -2791,7 +2790,7 @@ void CanvasItemEditor::_draw_rulers() {
int font_size = get_theme_font_size(SNAME("rulers_size"), SNAME("EditorFonts"));
// The rule transform
- Transform2D ruler_transform = Transform2D();
+ Transform2D ruler_transform;
if (grid_snap_active || _is_grid_visible()) {
List<CanvasItem *> selection = _get_edited_canvas_items();
if (snap_relative && selection.size() > 0) {
@@ -2817,11 +2816,11 @@ void CanvasItemEditor::_draw_rulers() {
// Subdivisions
int major_subdivision = 2;
- Transform2D major_subdivide = Transform2D();
+ Transform2D major_subdivide;
major_subdivide.scale(Size2(1.0 / major_subdivision, 1.0 / major_subdivision));
int minor_subdivision = 5;
- Transform2D minor_subdivide = Transform2D();
+ Transform2D minor_subdivide;
minor_subdivide.scale(Size2(1.0 / minor_subdivision, 1.0 / minor_subdivision));
// First and last graduations to draw (in the ruler space)
@@ -2887,7 +2886,7 @@ void CanvasItemEditor::_draw_grid() {
// Draw a "primary" line every several lines to make measurements easier.
// The step is configurable in the Configure Snap dialog.
- const Color secondary_grid_color = EditorSettings::get_singleton()->get("editors/2d/grid_color");
+ const Color secondary_grid_color = EDITOR_GET("editors/2d/grid_color");
const Color primary_grid_color =
Color(secondary_grid_color.r, secondary_grid_color.g, secondary_grid_color.b, secondary_grid_color.a * 2.5);
@@ -2962,14 +2961,14 @@ void CanvasItemEditor::_draw_ruler_tool() {
const real_t vertical_angle_rad = Math_PI / 2.0 - horizontal_angle_rad;
Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
- int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
+ int font_size = 1.3 * get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
Color font_color = get_theme_color(SNAME("font_color"), SNAME("Editor"));
Color font_secondary_color = font_color;
font_secondary_color.set_v(font_secondary_color.get_v() > 0.5 ? 0.7 : 0.3);
Color outline_color = font_color.inverted();
float text_height = font->get_height(font_size);
- const float outline_size = 2;
+ const float outline_size = 4;
const float text_width = 76;
const float angle_text_width = 54;
@@ -3033,7 +3032,7 @@ void CanvasItemEditor::_draw_ruler_tool() {
viewport->draw_string_outline(font, text_pos2, TS->format_number(vformat("%.1f px", length_vector.y)), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, outline_size, outline_color);
viewport->draw_string(font, text_pos2, TS->format_number(vformat("%.1f px", length_vector.y)), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, font_secondary_color);
- Point2 v_angle_text_pos = Point2();
+ Point2 v_angle_text_pos;
v_angle_text_pos.x = CLAMP(begin.x - angle_text_width / 2, angle_text_width / 2, viewport->get_rect().size.x - angle_text_width);
v_angle_text_pos.y = begin.y < end.y ? MIN(text_pos2.y - 2 * text_height, begin.y - text_height * 0.5) : MAX(text_pos2.y + text_height * 3, begin.y + text_height * 1.5);
viewport->draw_string_outline(font, v_angle_text_pos, TS->format_number(vformat(String::utf8("%d°"), vertical_angle)), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, outline_size, outline_color);
@@ -3044,7 +3043,7 @@ void CanvasItemEditor::_draw_ruler_tool() {
viewport->draw_string_outline(font, text_pos2, TS->format_number(vformat("%.1f px", length_vector.x)), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, outline_size, outline_color);
viewport->draw_string(font, text_pos2, TS->format_number(vformat("%.1f px", length_vector.x)), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, font_secondary_color);
- Point2 h_angle_text_pos = Point2();
+ Point2 h_angle_text_pos;
h_angle_text_pos.x = CLAMP(end.x - angle_text_width / 2, angle_text_width / 2, viewport->get_rect().size.x - angle_text_width);
if (begin.y < end.y) {
h_angle_text_pos.y = end.y + text_height * 1.5;
@@ -3310,16 +3309,16 @@ void CanvasItemEditor::_draw_selection() {
Ref<Texture2D> position_icon = get_theme_icon(SNAME("EditorPosition"), SNAME("EditorIcons"));
Ref<Texture2D> previous_position_icon = get_theme_icon(SNAME("EditorPositionPrevious"), SNAME("EditorIcons"));
- RID ci = viewport->get_canvas_item();
+ RID vp_ci = viewport->get_canvas_item();
List<CanvasItem *> selection = _get_edited_canvas_items(true, false);
bool single = selection.size() == 1;
for (CanvasItem *E : selection) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E);
- CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
+ CanvasItem *ci = Object::cast_to<CanvasItem>(E);
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci);
- bool item_locked = canvas_item->has_meta("_edit_lock_");
+ bool item_locked = ci->has_meta("_edit_lock_");
// Draw the previous position if we are dragging the node
if (show_helpers &&
@@ -3329,7 +3328,7 @@ void CanvasItemEditor::_draw_selection() {
const Transform2D pre_drag_xform = transform * se->pre_drag_xform;
const Color pre_drag_color = Color(0.4, 0.6, 1, 0.7);
- if (canvas_item->_edit_use_rect()) {
+ if (ci->_edit_use_rect()) {
Vector2 pre_drag_endpoints[4] = {
pre_drag_xform.xform(se->pre_drag_rect.position),
pre_drag_xform.xform(se->pre_drag_rect.position + Vector2(se->pre_drag_rect.size.x, 0)),
@@ -3345,11 +3344,11 @@ void CanvasItemEditor::_draw_selection() {
}
}
- Transform2D xform = transform * canvas_item->get_global_transform_with_canvas();
+ Transform2D xform = transform * ci->get_global_transform_with_canvas();
// Draw the selected items position / surrounding boxes
- if (canvas_item->_edit_use_rect()) {
- Rect2 rect = canvas_item->_edit_get_rect();
+ if (ci->_edit_use_rect()) {
+ Rect2 rect = ci->_edit_get_rect();
const Vector2 endpoints[4] = {
xform.xform(rect.position),
xform.xform(rect.position + Vector2(rect.size.x, 0)),
@@ -3367,7 +3366,7 @@ void CanvasItemEditor::_draw_selection() {
viewport->draw_line(endpoints[i], endpoints[(i + 1) % 4], c, Math::round(2 * EDSCALE));
}
} else {
- Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * canvas_item->_edit_get_transform()).orthonormalized();
+ Transform2D unscaled_transform = (xform * ci->get_transform().affine_inverse() * ci->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
viewport->draw_set_transform_matrix(simple_xform);
viewport->draw_texture(position_icon, -(position_icon->get_size() / 2));
@@ -3376,9 +3375,9 @@ void CanvasItemEditor::_draw_selection() {
if (single && !item_locked && (tool == TOOL_SELECT || tool == TOOL_MOVE || tool == TOOL_SCALE || tool == TOOL_ROTATE || tool == TOOL_EDIT_PIVOT)) { //kind of sucks
// Draw the pivot
- if (canvas_item->_edit_use_pivot()) {
+ if (ci->_edit_use_pivot()) {
// Draw the node's pivot
- Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * canvas_item->_edit_get_transform()).orthonormalized();
+ Transform2D unscaled_transform = (xform * ci->get_transform().affine_inverse() * ci->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
viewport->draw_set_transform_matrix(simple_xform);
@@ -3387,15 +3386,15 @@ void CanvasItemEditor::_draw_selection() {
}
// Draw control-related helpers
- Control *control = Object::cast_to<Control>(canvas_item);
+ Control *control = Object::cast_to<Control>(ci);
if (control && _is_node_movable(control)) {
_draw_control_anchors(control);
_draw_control_helpers(control);
}
// Draw the resize handles
- if (tool == TOOL_SELECT && canvas_item->_edit_use_rect() && _is_node_movable(canvas_item)) {
- Rect2 rect = canvas_item->_edit_get_rect();
+ if (tool == TOOL_SELECT && ci->_edit_use_rect() && _is_node_movable(ci)) {
+ Rect2 rect = ci->_edit_get_rect();
const Vector2 endpoints[4] = {
xform.xform(rect.position),
xform.xform(rect.position + Vector2(rect.size.x, 0)),
@@ -3409,21 +3408,21 @@ void CanvasItemEditor::_draw_selection() {
Vector2 ofs = ((endpoints[i] - endpoints[prev]).normalized() + ((endpoints[i] - endpoints[next]).normalized())).normalized();
ofs *= Math_SQRT2 * (select_handle->get_size().width / 2);
- select_handle->draw(ci, (endpoints[i] + ofs - (select_handle->get_size() / 2)).floor());
+ select_handle->draw(vp_ci, (endpoints[i] + ofs - (select_handle->get_size() / 2)).floor());
ofs = (endpoints[i] + endpoints[next]) / 2;
ofs += (endpoints[next] - endpoints[i]).orthogonal().normalized() * (select_handle->get_size().width / 2);
- select_handle->draw(ci, (ofs - (select_handle->get_size() / 2)).floor());
+ select_handle->draw(vp_ci, (ofs - (select_handle->get_size() / 2)).floor());
}
}
// 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(canvas_item)) {
- Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * canvas_item->_edit_get_transform()).orthonormalized();
+ if (_is_node_movable(ci)) {
+ Transform2D unscaled_transform = (xform * ci->get_transform().affine_inverse() * ci->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
Size2 move_factor = Size2(MOVE_HANDLE_DISTANCE, MOVE_HANDLE_DISTANCE);
@@ -3452,8 +3451,8 @@ void CanvasItemEditor::_draw_selection() {
// Draw the rescale handles
if (show_transformation_gizmos && ((is_alt && is_ctrl) || tool == TOOL_SCALE || drag_type == DRAG_SCALE_X || drag_type == DRAG_SCALE_Y)) {
- if (_is_node_movable(canvas_item)) {
- Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * canvas_item->_edit_get_transform()).orthonormalized();
+ if (_is_node_movable(ci)) {
+ Transform2D unscaled_transform = (xform * ci->get_transform().affine_inverse() * ci->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
Size2 scale_factor = Size2(SCALE_HANDLE_DISTANCE, SCALE_HANDLE_DISTANCE);
@@ -3563,9 +3562,9 @@ void CanvasItemEditor::_draw_axis() {
if (show_viewport) {
RID ci = viewport->get_canvas_item();
- Color area_axis_color = EditorSettings::get_singleton()->get("editors/2d/viewport_border_color");
+ Color area_axis_color = EDITOR_GET("editors/2d/viewport_border_color");
- Size2 screen_size = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
+ Size2 screen_size = Size2(GLOBAL_GET("display/window/size/viewport_width"), GLOBAL_GET("display/window/size/viewport_height"));
Vector2 screen_endpoints[4] = {
transform.xform(Vector2(0, 0)),
@@ -3587,16 +3586,16 @@ void CanvasItemEditor::_draw_invisible_nodes_positions(Node *p_node, const Trans
if (p_node != scene && p_node->get_owner() != scene && !scene->is_editable_instance(p_node->get_owner())) {
return;
}
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
- if (canvas_item && !canvas_item->is_visible_in_tree()) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(p_node);
+ if (ci && !ci->is_visible_in_tree()) {
return;
}
Transform2D parent_xform = p_parent_xform;
Transform2D canvas_xform = p_canvas_xform;
- if (canvas_item && !canvas_item->is_set_as_top_level()) {
- parent_xform = parent_xform * canvas_item->get_transform();
+ if (ci && !ci->is_set_as_top_level()) {
+ parent_xform = parent_xform * ci->get_transform();
} else {
CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node);
parent_xform = Transform2D();
@@ -3607,12 +3606,12 @@ void CanvasItemEditor::_draw_invisible_nodes_positions(Node *p_node, const Trans
_draw_invisible_nodes_positions(p_node->get_child(i), parent_xform, canvas_xform);
}
- if (canvas_item && !canvas_item->_edit_use_rect() && (!editor_selection->is_selected(canvas_item) || _is_node_locked(canvas_item))) {
+ if (ci && !ci->_edit_use_rect() && (!editor_selection->is_selected(ci) || _is_node_locked(ci))) {
Transform2D xform = transform * canvas_xform * parent_xform;
// Draw the node's position
Ref<Texture2D> position_icon = get_theme_icon(SNAME("EditorPositionUnselected"), SNAME("EditorIcons"));
- Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * canvas_item->_edit_get_transform()).orthonormalized();
+ Transform2D unscaled_transform = (xform * ci->get_transform().affine_inverse() * ci->_edit_get_transform()).orthonormalized();
Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
viewport->draw_set_transform_matrix(simple_xform);
viewport->draw_texture(position_icon, -position_icon->get_size() / 2, Color(1.0, 1.0, 1.0, 0.5));
@@ -3718,16 +3717,16 @@ void CanvasItemEditor::_draw_locks_and_groups(Node *p_node, const Transform2D &p
if (p_node != scene && p_node->get_owner() != scene && !scene->is_editable_instance(p_node->get_owner())) {
return;
}
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
- if (canvas_item && !canvas_item->is_visible_in_tree()) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(p_node);
+ if (ci && !ci->is_visible_in_tree()) {
return;
}
Transform2D parent_xform = p_parent_xform;
Transform2D canvas_xform = p_canvas_xform;
- if (canvas_item && !canvas_item->is_set_as_top_level()) {
- parent_xform = parent_xform * canvas_item->get_transform();
+ if (ci && !ci->is_set_as_top_level()) {
+ parent_xform = parent_xform * ci->get_transform();
} else {
CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node);
parent_xform = Transform2D();
@@ -3738,19 +3737,19 @@ void CanvasItemEditor::_draw_locks_and_groups(Node *p_node, const Transform2D &p
_draw_locks_and_groups(p_node->get_child(i), parent_xform, canvas_xform);
}
- RID viewport_canvas_item = viewport->get_canvas_item();
- if (canvas_item) {
+ RID viewport_ci = viewport->get_canvas_item();
+ if (ci) {
real_t offset = 0;
Ref<Texture2D> lock = get_theme_icon(SNAME("LockViewport"), SNAME("EditorIcons"));
if (p_node->has_meta("_edit_lock_") && show_edit_locks) {
- lock->draw(viewport_canvas_item, (transform * canvas_xform * parent_xform).xform(Point2(0, 0)) + Point2(offset, 0));
+ lock->draw(viewport_ci, (transform * canvas_xform * parent_xform).xform(Point2(0, 0)) + Point2(offset, 0));
offset += lock->get_size().x;
}
Ref<Texture2D> group = get_theme_icon(SNAME("GroupViewport"), SNAME("EditorIcons"));
- if (canvas_item->has_meta("_edit_group_") && show_edit_locks) {
- group->draw(viewport_canvas_item, (transform * canvas_xform * parent_xform).xform(Point2(0, 0)) + Point2(offset, 0));
+ if (ci->has_meta("_edit_group_") && show_edit_locks) {
+ group->draw(viewport_ci, (transform * canvas_xform * parent_xform).xform(Point2(0, 0)) + Point2(offset, 0));
//offset += group->get_size().x;
}
}
@@ -3869,9 +3868,9 @@ 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(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
- pan_speed = int(EditorSettings::get_singleton()->get("editors/panning/2d_editor_pan_speed"));
- warped_panning = bool(EditorSettings::get_singleton()->get("editors/panning/warped_mouse_panning"));
+ 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"));
+ warped_panning = bool(EDITOR_GET("editors/panning/warped_mouse_panning"));
}
void CanvasItemEditor::_notification(int p_what) {
@@ -3883,16 +3882,16 @@ void CanvasItemEditor::_notification(int p_what) {
// Update the viewport if the canvas_item changes
List<CanvasItem *> selection = _get_edited_canvas_items(true);
- for (CanvasItem *canvas_item : selection) {
- CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
+ for (CanvasItem *ci : selection) {
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(ci);
Rect2 rect;
- if (canvas_item->_edit_use_rect()) {
- rect = canvas_item->_edit_get_rect();
+ if (ci->_edit_use_rect()) {
+ rect = ci->_edit_get_rect();
} else {
rect = Rect2();
}
- Transform2D xform = canvas_item->get_transform();
+ Transform2D xform = ci->get_transform();
if (rect != se->prev_rect || xform != se->prev_xform) {
viewport->queue_redraw();
@@ -3900,7 +3899,7 @@ void CanvasItemEditor::_notification(int p_what) {
se->prev_xform = xform;
}
- Control *control = Object::cast_to<Control>(canvas_item);
+ Control *control = Object::cast_to<Control>(ci);
if (control) {
real_t anchors[4];
Vector2 pivot;
@@ -3921,7 +3920,7 @@ void CanvasItemEditor::_notification(int p_what) {
}
}
- if (canvas_item->_edit_use_pivot()) {
+ if (ci->_edit_use_pivot()) {
nb_having_pivot++;
}
}
@@ -3990,10 +3989,6 @@ void CanvasItemEditor::_selection_changed() {
selected_from_canvas = false;
}
-void CanvasItemEditor::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
void CanvasItemEditor::edit(CanvasItem *p_canvas_item) {
Array selection = editor_selection->get_selected_nodes();
if (selection.size() != 1 || Object::cast_to<Node>(selection[0]) != p_canvas_item) {
@@ -4017,7 +4012,7 @@ void CanvasItemEditor::_update_scrollbars() {
Size2 vmin = v_scroll->get_minimum_size();
// Get the visible frame.
- Size2 screen_rect = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
+ Size2 screen_rect = Size2(GLOBAL_GET("display/window/size/viewport_width"), GLOBAL_GET("display/window/size/viewport_height"));
Rect2 local_rect = Rect2(Point2(), viewport->get_size() - Size2(vmin.width, hmin.height));
// Calculate scrollable area.
@@ -4034,7 +4029,7 @@ void CanvasItemEditor::_update_scrollbars() {
Size2 size = viewport->get_size();
Point2 begin = canvas_item_rect.position;
Point2 end = canvas_item_rect.position + canvas_item_rect.size - local_rect.size / zoom;
- bool constrain_editor_view = bool(EditorSettings::get_singleton()->get("editors/2d/constrain_editor_view"));
+ bool constrain_editor_view = bool(EDITOR_GET("editors/2d/constrain_editor_view"));
if (canvas_item_rect.size.height <= (local_rect.size.y / zoom)) {
real_t centered = -(size.y / 2) / zoom + screen_rect.y / 2;
@@ -4182,17 +4177,17 @@ void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation,
AnimationTrackEditor *te = AnimationPlayerEditor::get_singleton()->get_track_editor();
te->make_insert_queue();
for (const KeyValue<Node *, Object *> &E : selection) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key);
- if (!canvas_item || !canvas_item->is_visible_in_tree()) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(E.key);
+ if (!ci || !ci->is_visible_in_tree()) {
continue;
}
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
+ if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}
- if (Object::cast_to<Node2D>(canvas_item)) {
- Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
+ if (Object::cast_to<Node2D>(ci)) {
+ Node2D *n2d = Object::cast_to<Node2D>(ci);
if (key_pos && p_location) {
te->insert_node_value_key(n2d, "position", n2d->get_position(), p_on_existing);
@@ -4239,8 +4234,8 @@ void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation,
}
}
- } else if (Object::cast_to<Control>(canvas_item)) {
- Control *ctrl = Object::cast_to<Control>(canvas_item);
+ } else if (Object::cast_to<Control>(ci)) {
+ Control *ctrl = Object::cast_to<Control>(ci);
if (key_pos) {
te->insert_node_value_key(ctrl, "position", ctrl->get_position(), p_on_existing);
@@ -4268,6 +4263,7 @@ void CanvasItemEditor::_update_override_camera_button(bool p_game_running) {
}
void CanvasItemEditor::_popup_callback(int p_op) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
last_option = MenuOption(p_op);
switch (p_op) {
case SHOW_ORIGIN: {
@@ -4374,8 +4370,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;
@@ -4388,16 +4383,16 @@ void CanvasItemEditor::_popup_callback(int p_op) {
List<Node *> selection = editor_selection->get_selected_node_list();
for (Node *E : selection) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E);
- if (!canvas_item || !canvas_item->is_inside_tree()) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(E);
+ if (!ci || !ci->is_inside_tree()) {
continue;
}
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
+ if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}
- undo_redo->add_do_method(canvas_item, "set_meta", "_edit_lock_", true);
- undo_redo->add_undo_method(canvas_item, "remove_meta", "_edit_lock_");
+ undo_redo->add_do_method(ci, "set_meta", "_edit_lock_", true);
+ undo_redo->add_undo_method(ci, "remove_meta", "_edit_lock_");
undo_redo->add_do_method(this, "emit_signal", "item_lock_status_changed");
undo_redo->add_undo_method(this, "emit_signal", "item_lock_status_changed");
}
@@ -4410,16 +4405,16 @@ void CanvasItemEditor::_popup_callback(int p_op) {
List<Node *> selection = editor_selection->get_selected_node_list();
for (Node *E : selection) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E);
- if (!canvas_item || !canvas_item->is_inside_tree()) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(E);
+ if (!ci || !ci->is_inside_tree()) {
continue;
}
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
+ if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}
- undo_redo->add_do_method(canvas_item, "remove_meta", "_edit_lock_");
- undo_redo->add_undo_method(canvas_item, "set_meta", "_edit_lock_", true);
+ undo_redo->add_do_method(ci, "remove_meta", "_edit_lock_");
+ undo_redo->add_undo_method(ci, "set_meta", "_edit_lock_", true);
undo_redo->add_do_method(this, "emit_signal", "item_lock_status_changed");
undo_redo->add_undo_method(this, "emit_signal", "item_lock_status_changed");
}
@@ -4432,16 +4427,16 @@ void CanvasItemEditor::_popup_callback(int p_op) {
List<Node *> selection = editor_selection->get_selected_node_list();
for (Node *E : selection) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E);
- if (!canvas_item || !canvas_item->is_inside_tree()) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(E);
+ if (!ci || !ci->is_inside_tree()) {
continue;
}
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
+ if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}
- undo_redo->add_do_method(canvas_item, "set_meta", "_edit_group_", true);
- undo_redo->add_undo_method(canvas_item, "remove_meta", "_edit_group_");
+ undo_redo->add_do_method(ci, "set_meta", "_edit_group_", true);
+ undo_redo->add_undo_method(ci, "remove_meta", "_edit_group_");
undo_redo->add_do_method(this, "emit_signal", "item_group_status_changed");
undo_redo->add_undo_method(this, "emit_signal", "item_group_status_changed");
}
@@ -4454,16 +4449,16 @@ void CanvasItemEditor::_popup_callback(int p_op) {
List<Node *> selection = editor_selection->get_selected_node_list();
for (Node *E : selection) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E);
- if (!canvas_item || !canvas_item->is_inside_tree()) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(E);
+ if (!ci || !ci->is_inside_tree()) {
continue;
}
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
+ if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}
- undo_redo->add_do_method(canvas_item, "remove_meta", "_edit_group_");
- undo_redo->add_undo_method(canvas_item, "set_meta", "_edit_group_", true);
+ undo_redo->add_do_method(ci, "remove_meta", "_edit_group_");
+ undo_redo->add_undo_method(ci, "set_meta", "_edit_group_", true);
undo_redo->add_do_method(this, "emit_signal", "item_group_status_changed");
undo_redo->add_undo_method(this, "emit_signal", "item_group_status_changed");
}
@@ -4494,17 +4489,17 @@ void CanvasItemEditor::_popup_callback(int p_op) {
const HashMap<Node *, Object *> &selection = editor_selection->get_selection();
for (const KeyValue<Node *, Object *> &E : selection) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key);
- if (!canvas_item || !canvas_item->is_visible_in_tree()) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(E.key);
+ if (!ci || !ci->is_visible_in_tree()) {
continue;
}
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
+ if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}
- if (Object::cast_to<Node2D>(canvas_item)) {
- Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
+ if (Object::cast_to<Node2D>(ci)) {
+ Node2D *n2d = Object::cast_to<Node2D>(ci);
PoseClipboard pc;
pc.pos = n2d->get_position();
pc.rot = n2d->get_rotation();
@@ -4540,17 +4535,17 @@ void CanvasItemEditor::_popup_callback(int p_op) {
HashMap<Node *, Object *> &selection = editor_selection->get_selection();
for (const KeyValue<Node *, Object *> &E : selection) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key);
- if (!canvas_item || !canvas_item->is_visible_in_tree()) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(E.key);
+ if (!ci || !ci->is_visible_in_tree()) {
continue;
}
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
+ if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}
- if (Object::cast_to<Node2D>(canvas_item)) {
- Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
+ if (Object::cast_to<Node2D>(ci)) {
+ Node2D *n2d = Object::cast_to<Node2D>(ci);
if (key_pos) {
n2d->set_position(Vector2());
@@ -4561,8 +4556,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (key_scale) {
n2d->set_scale(Vector2(1, 1));
}
- } else if (Object::cast_to<Control>(canvas_item)) {
- Control *ctrl = Object::cast_to<Control>(canvas_item);
+ } else if (Object::cast_to<Control>(ci)) {
+ Control *ctrl = Object::cast_to<Control>(ci);
if (key_pos) {
ctrl->set_position(Point2());
@@ -4656,28 +4651,28 @@ void CanvasItemEditor::_focus_selection(int p_op) {
const HashMap<Node *, Object *> &selection = editor_selection->get_selection();
for (const KeyValue<Node *, Object *> &E : selection) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E.key);
- if (!canvas_item) {
+ CanvasItem *ci = Object::cast_to<CanvasItem>(E.key);
+ if (!ci) {
continue;
}
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
+ if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}
// counting invisible items, for now
- //if (!canvas_item->is_visible_in_tree()) continue;
+ //if (!ci->is_visible_in_tree()) continue;
++count;
Rect2 item_rect;
- if (canvas_item->_edit_use_rect()) {
- item_rect = canvas_item->_edit_get_rect();
+ if (ci->_edit_use_rect()) {
+ item_rect = ci->_edit_get_rect();
} else {
item_rect = Rect2();
}
- Vector2 pos = canvas_item->get_global_transform().get_origin();
- Vector2 scale = canvas_item->get_global_transform().get_scale();
- real_t angle = canvas_item->get_global_transform().get_rotation();
+ Vector2 pos = ci->get_global_transform().get_origin();
+ Vector2 scale = ci->get_global_transform().get_scale();
+ real_t angle = ci->get_global_transform().get_rotation();
Transform2D t(angle, Vector2(0.f, 0.f));
item_rect = t.xform(item_rect);
@@ -4687,25 +4682,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,12 +4703,11 @@ void CanvasItemEditor::_reset_drag() {
}
void CanvasItemEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_update_override_camera_button", "game_running"), &CanvasItemEditor::_update_override_camera_button);
ClassDB::bind_method("_get_editor_data", &CanvasItemEditor::_get_editor_data);
ClassDB::bind_method(D_METHOD("set_state"), &CanvasItemEditor::set_state);
ClassDB::bind_method(D_METHOD("update_viewport"), &CanvasItemEditor::update_viewport);
- ClassDB::bind_method(D_METHOD("_zoom_on_position"), &CanvasItemEditor::_zoom_on_position);
+ ClassDB::bind_method(D_METHOD("center_at", "position"), &CanvasItemEditor::center_at);
ClassDB::bind_method("_set_owner_for_node_and_children", &CanvasItemEditor::_set_owner_for_node_and_children);
@@ -4967,6 +4954,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);
@@ -4975,7 +4968,6 @@ CanvasItemEditor::CanvasItemEditor() {
snap_target[0] = SNAP_TARGET_NONE;
snap_target[1] = SNAP_TARGET_NONE;
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
editor_selection = EditorNode::get_singleton()->get_editor_selection();
editor_selection->add_editor_plugin(this);
editor_selection->connect("selection_changed", callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw));
@@ -4984,8 +4976,8 @@ CanvasItemEditor::CanvasItemEditor() {
SceneTreeDock::get_singleton()->connect("node_created", callable_mp(this, &CanvasItemEditor::_node_created));
SceneTreeDock::get_singleton()->connect("add_node_used", callable_mp(this, &CanvasItemEditor::_reset_create_position));
- EditorNode::get_singleton()->call_deferred(SNAME("connect"), "play_pressed", Callable(this, "_update_override_camera_button").bind(true));
- EditorNode::get_singleton()->call_deferred(SNAME("connect"), "stop_pressed", Callable(this, "_update_override_camera_button").bind(false));
+ EditorNode::get_singleton()->call_deferred(SNAME("connect"), "play_pressed", callable_mp(this, &CanvasItemEditor::_update_override_camera_button).bind(true));
+ EditorNode::get_singleton()->call_deferred(SNAME("connect"), "stop_pressed", callable_mp(this, &CanvasItemEditor::_update_override_camera_button).bind(false));
// A fluid container for all toolbars.
HFlowContainer *main_flow = memnew(HFlowContainer);
@@ -5060,6 +5052,7 @@ CanvasItemEditor::CanvasItemEditor() {
zoom_widget = memnew(EditorZoomWidget);
controls_vb->add_child(zoom_widget);
zoom_widget->set_anchors_and_offsets_preset(Control::PRESET_TOP_LEFT, Control::PRESET_MODE_MINSIZE, 2 * EDSCALE);
+ zoom_widget->set_shortcut_context(this);
zoom_widget->connect("zoom_changed", callable_mp(this, &CanvasItemEditor::_update_zoom));
panner.instantiate();
@@ -5316,7 +5309,7 @@ CanvasItemEditor::CanvasItemEditor() {
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/frame_selection", TTR("Frame Selection"), KeyModifierMask::SHIFT | Key::F), VIEW_FRAME_TO_SELECTION);
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/clear_guides", TTR("Clear Guides")), CLEAR_GUIDES);
p->add_separator();
- p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/preview_canvas_scale", TTR("Preview Canvas Scale"), KeyModifierMask::SHIFT | KeyModifierMask::CMD_OR_CTRL | Key::P), PREVIEW_CANVAS_SCALE);
+ p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/preview_canvas_scale", TTR("Preview Canvas Scale")), PREVIEW_CANVAS_SCALE);
main_menu_hbox->add_child(memnew(VSeparator));
@@ -5425,7 +5418,6 @@ CanvasItemEditor::CanvasItemEditor() {
CanvasItemEditor *CanvasItemEditor::singleton = nullptr;
void CanvasItemEditorPlugin::edit(Object *p_object) {
- canvas_item_editor->set_undo_redo(EditorNode::get_undo_redo());
canvas_item_editor->edit(Object::cast_to<CanvasItem>(p_object));
}
@@ -5454,6 +5446,15 @@ void CanvasItemEditorPlugin::set_state(const Dictionary &p_state) {
canvas_item_editor->set_state(p_state);
}
+void CanvasItemEditorPlugin::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ connect("scene_changed", callable_mp((CanvasItem *)canvas_item_editor->get_viewport_control(), &CanvasItem::queue_redraw).unbind(1));
+ connect("scene_closed", callable_mp((CanvasItem *)canvas_item_editor->get_viewport_control(), &CanvasItem::queue_redraw).unbind(1));
+ } break;
+ }
+}
+
CanvasItemEditorPlugin::CanvasItemEditorPlugin() {
canvas_item_editor = memnew(CanvasItemEditor);
canvas_item_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -5502,6 +5503,11 @@ void CanvasItemEditorViewport::_create_preview(const Vector<String> &files) cons
Ref<Texture2D> texture = Ref<Texture2D>(Object::cast_to<Texture2D>(*res));
Ref<PackedScene> scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*res));
if (texture != nullptr || scene != nullptr) {
+ bool root_node_selected = EditorNode::get_singleton()->get_editor_selection()->is_selected(EditorNode::get_singleton()->get_edited_scene());
+ String desc = TTR("Drag and drop to add as child of current scene's root node.") + "\n" + TTR("Hold Ctrl when dropping to add as child of selected node.");
+ if (!root_node_selected) {
+ desc += "\n" + TTR("Hold Shift when dropping to add as sibling of selected node.");
+ }
if (texture != nullptr) {
Sprite2D *sprite = memnew(Sprite2D);
sprite->set_texture(texture);
@@ -5509,14 +5515,15 @@ void CanvasItemEditorViewport::_create_preview(const Vector<String> &files) cons
preview_node->add_child(sprite);
label->show();
label_desc->show();
- label_desc->set_text(TTR("Drag and drop to add as child of current scene's root node.\nHold Ctrl when dropping to add as child of selected node.\nHold Shift when dropping to add as sibling of selected node.\nHold Alt when dropping to add as a different node type."));
+ desc += "\n" + TTR("Hold Alt when dropping to add as a different node type.");
+ label_desc->set_text(desc);
} else {
if (scene.is_valid()) {
Node *instance = scene->instantiate();
if (instance) {
preview_node->add_child(instance);
label_desc->show();
- label_desc->set_text(TTR("Drag and drop to add as child of current scene's root node.\nHold Ctrl when dropping to add as child of selected node.\nHold Shift when dropping to add as sibling of selected node."));
+ label_desc->set_text(desc);
}
}
}
@@ -5533,7 +5540,7 @@ void CanvasItemEditorViewport::_remove_preview() {
if (preview_node->get_parent()) {
for (int i = preview_node->get_child_count() - 1; i >= 0; i--) {
Node *node = preview_node->get_child(i);
- node->queue_delete();
+ node->queue_free();
preview_node->remove_child(node);
}
EditorNode::get_singleton()->get_scene_root()->remove_child(preview_node);
@@ -5563,37 +5570,38 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &
String name = path.get_file().get_basename();
child->set_name(Node::adjust_name_casing(name));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<Texture2D> texture = ResourceCache::get_ref(path);
if (parent) {
- editor_data->get_undo_redo()->add_do_method(parent, "add_child", child, true);
- editor_data->get_undo_redo()->add_do_method(child, "set_owner", EditorNode::get_singleton()->get_edited_scene());
- editor_data->get_undo_redo()->add_do_reference(child);
- editor_data->get_undo_redo()->add_undo_method(parent, "remove_child", child);
+ undo_redo->add_do_method(parent, "add_child", child, true);
+ undo_redo->add_do_method(child, "set_owner", EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_reference(child);
+ undo_redo->add_undo_method(parent, "remove_child", child);
} else { // If no parent is selected, set as root node of the scene.
- editor_data->get_undo_redo()->add_do_method(EditorNode::get_singleton(), "set_edited_scene", child);
- editor_data->get_undo_redo()->add_do_method(child, "set_owner", EditorNode::get_singleton()->get_edited_scene());
- editor_data->get_undo_redo()->add_do_reference(child);
- editor_data->get_undo_redo()->add_undo_method(EditorNode::get_singleton(), "set_edited_scene", (Object *)nullptr);
+ undo_redo->add_do_method(EditorNode::get_singleton(), "set_edited_scene", child);
+ undo_redo->add_do_method(child, "set_owner", EditorNode::get_singleton()->get_edited_scene());
+ undo_redo->add_do_reference(child);
+ undo_redo->add_undo_method(EditorNode::get_singleton(), "set_edited_scene", (Object *)nullptr);
}
if (parent) {
String new_name = parent->validate_child_name(child);
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
- editor_data->get_undo_redo()->add_do_method(ed, "live_debug_create_node", EditorNode::get_singleton()->get_edited_scene()->get_path_to(parent), child->get_class(), new_name);
- editor_data->get_undo_redo()->add_undo_method(ed, "live_debug_remove_node", NodePath(String(EditorNode::get_singleton()->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
+ undo_redo->add_do_method(ed, "live_debug_create_node", EditorNode::get_singleton()->get_edited_scene()->get_path_to(parent), child->get_class(), new_name);
+ undo_redo->add_undo_method(ed, "live_debug_remove_node", NodePath(String(EditorNode::get_singleton()->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
}
if (Object::cast_to<TouchScreenButton>(child) || Object::cast_to<TextureButton>(child)) {
- editor_data->get_undo_redo()->add_do_property(child, "texture_normal", texture);
+ undo_redo->add_do_property(child, "texture_normal", texture);
} else {
- editor_data->get_undo_redo()->add_do_property(child, "texture", texture);
+ undo_redo->add_do_property(child, "texture", texture);
}
// make visible for certain node type
if (Object::cast_to<Control>(child)) {
Size2 texture_size = texture->get_size();
- editor_data->get_undo_redo()->add_do_property(child, "rect_size", texture_size);
+ undo_redo->add_do_property(child, "size", texture_size);
} else if (Object::cast_to<Polygon2D>(child)) {
Size2 texture_size = texture->get_size();
Vector<Vector2> list = {
@@ -5602,16 +5610,21 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &
Vector2(texture_size.width, texture_size.height),
Vector2(0, texture_size.height)
};
- editor_data->get_undo_redo()->add_do_property(child, "polygon", list);
+ undo_redo->add_do_property(child, "polygon", list);
}
// Compute the global position
Transform2D xform = canvas_item_editor->get_canvas_transform();
Point2 target_position = xform.affine_inverse().xform(p_point);
+ // Adjust position for Control and TouchScreenButton
+ if (Object::cast_to<Control>(child) || Object::cast_to<TouchScreenButton>(child)) {
+ target_position -= texture->get_size() / 2;
+ }
+
// there's nothing to be used as source position so snapping will work as absolute if enabled
target_position = canvas_item_editor->snap_point(target_position);
- editor_data->get_undo_redo()->add_do_method(child, "set_global_position", target_position);
+ undo_redo->add_do_method(child, "set_global_position", target_position);
}
bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, const Point2 &p_point) {
@@ -5621,13 +5634,13 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
}
Node *instantiated_scene = sdata->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE);
- if (!instantiated_scene) { // error on instancing
+ if (!instantiated_scene) { // Error on instantiation.
return false;
}
Node *edited_scene = EditorNode::get_singleton()->get_edited_scene();
- if (!edited_scene->get_scene_file_path().is_empty()) { // cyclical instancing
+ if (!edited_scene->get_scene_file_path().is_empty()) { // Cyclic instantiation.
if (_cyclical_dependency_exists(edited_scene->get_scene_file_path(), instantiated_scene)) {
memdelete(instantiated_scene);
return false;
@@ -5636,15 +5649,16 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path));
- editor_data->get_undo_redo()->add_do_method(parent, "add_child", instantiated_scene, true);
- editor_data->get_undo_redo()->add_do_method(instantiated_scene, "set_owner", edited_scene);
- editor_data->get_undo_redo()->add_do_reference(instantiated_scene);
- editor_data->get_undo_redo()->add_undo_method(parent, "remove_child", instantiated_scene);
+ 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);
+ undo_redo->add_undo_method(parent, "remove_child", instantiated_scene);
String new_name = parent->validate_child_name(instantiated_scene);
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
- editor_data->get_undo_redo()->add_do_method(ed, "live_debug_instance_node", edited_scene->get_path_to(parent), path, new_name);
- editor_data->get_undo_redo()->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)) + "/" + new_name));
+ undo_redo->add_do_method(ed, "live_debug_instantiate_node", edited_scene->get_path_to(parent), path, new_name);
+ undo_redo->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)) + "/" + new_name));
CanvasItem *instance_ci = Object::cast_to<CanvasItem>(instantiated_scene);
if (instance_ci) {
@@ -5658,7 +5672,7 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
// Preserve instance position of the original scene.
target_pos += instance_ci->_edit_get_position();
- editor_data->get_undo_redo()->add_do_method(instantiated_scene, "set_position", target_pos);
+ undo_redo->add_do_method(instantiated_scene, "set_position", target_pos);
}
return true;
@@ -5676,7 +5690,8 @@ void CanvasItemEditorViewport::_perform_drop_data() {
Vector<String> error_files;
- editor_data->get_undo_redo()->create_action(TTR("Create Node"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Create Node"));
for (int i = 0; i < selected_files.size(); i++) {
String path = selected_files[i];
@@ -5707,7 +5722,7 @@ void CanvasItemEditorViewport::_perform_drop_data() {
}
}
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->commit_action();
if (error_files.size() > 0) {
String files_str;
@@ -5715,7 +5730,7 @@ void CanvasItemEditorViewport::_perform_drop_data() {
files_str += error_files[i].get_file().get_basename() + ",";
}
files_str = files_str.substr(0, files_str.length() - 1);
- accept->set_text(vformat(TTR("Error instancing scene from %s"), files_str.get_data()));
+ accept->set_text(vformat(TTR("Error instantiating scene from %s"), files_str.get_data()));
accept->popup_centered();
}
}
@@ -5733,8 +5748,10 @@ bool CanvasItemEditorViewport::can_drop_data(const Point2 &p_point, const Varian
ResourceLoader::get_recognized_extensions_for_type("Texture2D", &texture_extensions);
for (int i = 0; i < files.size(); i++) {
+ String extension = files[i].get_extension().to_lower();
+
// Check if dragged files with texture or scene extension can be created at least once.
- if (texture_extensions.find(files[i].get_extension()) || scene_extensions.find(files[i].get_extension())) {
+ if (texture_extensions.find(extension) || scene_extensions.find(extension)) {
Ref<Resource> res = ResourceLoader::load(files[i]);
if (res.is_null()) {
continue;
@@ -5883,9 +5900,6 @@ void CanvasItemEditorViewport::_notification(int p_what) {
}
}
-void CanvasItemEditorViewport::_bind_methods() {
-}
-
CanvasItemEditorViewport::CanvasItemEditorViewport(CanvasItemEditor *p_canvas_item_editor) {
default_texture_node_type = "Sprite2D";
// Node2D
@@ -5901,7 +5915,6 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(CanvasItemEditor *p_canvas_it
texture_node_types.push_back("NinePatchRect");
target_node = nullptr;
- editor_data = SceneTreeDock::get_singleton()->get_editor_data();
canvas_item_editor = p_canvas_item_editor;
preview_node = memnew(Control);
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 0a840d6fd6..f4fcc8a3d2 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -1,51 +1,52 @@
-/*************************************************************************/
-/* canvas_item_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* canvas_item_editor_plugin.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 CANVAS_ITEM_EDITOR_PLUGIN_H
#define CANVAS_ITEM_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
-#include "editor/editor_zoom_widget.h"
+#include "scene/gui/base_button.h"
#include "scene/gui/box_container.h"
-#include "scene/gui/check_box.h"
-#include "scene/gui/label.h"
-#include "scene/gui/panel_container.h"
-#include "scene/gui/spin_box.h"
-#include "scene/gui/split_container.h"
-#include "scene/gui/texture_rect.h"
-#include "scene/main/canvas_item.h"
-class EditorData;
+class AcceptDialog;
class CanvasItemEditorViewport;
+class ConfirmationDialog;
+class EditorData;
+class EditorZoomWidget;
+class HScrollBar;
+class HSplitContainer;
+class MenuButton;
+class PanelContainer;
class ViewPanner;
-class EditorUndoRedoManager;
+class VScrollBar;
+class VSplitContainer;
class CanvasItemEditorSelectedItem : public Object {
GDCLASS(CanvasItemEditorSelectedItem, Object);
@@ -337,12 +338,12 @@ private:
Point2 drag_start_origin;
DragType drag_type = DRAG_NONE;
- Point2 drag_from = Vector2();
- Point2 drag_to = Vector2();
+ Point2 drag_from;
+ Point2 drag_to;
Point2 drag_rotation_center;
List<CanvasItem *> drag_selection;
int dragged_guide_index = -1;
- Point2 dragged_guide_pos = Point2();
+ Point2 dragged_guide_pos;
bool is_hovering_h_guide = false;
bool is_hovering_v_guide = false;
@@ -401,8 +402,6 @@ private:
void _prepare_grid_menu();
void _on_grid_menu_id_pressed(int p_id);
- Ref<EditorUndoRedoManager> undo_redo;
-
List<CanvasItem *> _get_edited_canvas_items(bool retrieve_locked = false, bool remove_canvas_item_if_parent_in_selection = true);
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);
@@ -548,10 +547,10 @@ public:
Tool get_current_tool() { return tool; }
void set_current_tool(Tool p_tool);
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
void edit(CanvasItem *p_canvas_item);
void focus_selection();
+ void center_at(const Point2 &p_pos);
EditorSelection *editor_selection = nullptr;
@@ -563,6 +562,9 @@ class CanvasItemEditorPlugin : public EditorPlugin {
CanvasItemEditor *canvas_item_editor = nullptr;
+protected:
+ void _notification(int p_what);
+
public:
virtual String get_name() const override { return "2D"; }
bool has_main_screen() const override { return true; }
@@ -590,7 +592,6 @@ class CanvasItemEditorViewport : public Control {
Node *target_node = nullptr;
Point2 drop_pos;
- EditorData *editor_data = nullptr;
CanvasItemEditor *canvas_item_editor = nullptr;
Control *preview_node = nullptr;
AcceptDialog *accept = nullptr;
@@ -618,8 +619,6 @@ class CanvasItemEditorViewport : public Control {
void _show_resource_type_selector();
void _update_theme();
- static void _bind_methods();
-
protected:
void _notification(int p_what);
diff --git a/editor/plugins/cast_2d_editor_plugin.cpp b/editor/plugins/cast_2d_editor_plugin.cpp
index a8d255f997..723082c293 100644
--- a/editor/plugins/cast_2d_editor_plugin.cpp
+++ b/editor/plugins/cast_2d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* cast_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* cast_2d_editor_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 "cast_2d_editor_plugin.h"
@@ -77,6 +77,7 @@ bool Cast2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
return false;
}
} else if (pressed) {
+ 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");
@@ -130,10 +131,6 @@ void Cast2DEditor::edit(Node2D *p_node) {
canvas_item_editor->update_viewport();
}
-Cast2DEditor::Cast2DEditor() {
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
-}
-
///////////////////////
void Cast2DEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/cast_2d_editor_plugin.h b/editor/plugins/cast_2d_editor_plugin.h
index ceed9b9111..ad48d6a524 100644
--- a/editor/plugins/cast_2d_editor_plugin.h
+++ b/editor/plugins/cast_2d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* cast_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* cast_2d_editor_plugin.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 CAST_2D_EDITOR_PLUGIN_H
#define CAST_2D_EDITOR_PLUGIN_H
@@ -35,12 +35,10 @@
#include "scene/2d/node_2d.h"
class CanvasItemEditor;
-class EditorUndoRedoManager;
class Cast2DEditor : public Control {
GDCLASS(Cast2DEditor, Control);
- Ref<EditorUndoRedoManager> undo_redo;
CanvasItemEditor *canvas_item_editor = nullptr;
Node2D *node = nullptr;
@@ -55,8 +53,6 @@ public:
bool forward_canvas_gui_input(const Ref<InputEvent> &p_event);
void forward_canvas_draw_over_viewport(Control *p_overlay);
void edit(Node2D *p_node);
-
- Cast2DEditor();
};
class Cast2DEditorPlugin : public EditorPlugin {
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index f018376e4b..7f4e0d3f27 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* collision_polygon_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* collision_polygon_2d_editor_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 "collision_polygon_2d_editor_plugin.h"
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.h b/editor/plugins/collision_polygon_2d_editor_plugin.h
index 0225d5d620..070a01f651 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.h
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* collision_polygon_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* collision_polygon_2d_editor_plugin.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 COLLISION_POLYGON_2D_EDITOR_PLUGIN_H
#define COLLISION_POLYGON_2D_EDITOR_PLUGIN_H
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 11992ad10e..c2d5885e43 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* collision_shape_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* collision_shape_2d_editor_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 "collision_shape_2d_editor_plugin.h"
@@ -219,6 +219,7 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) {
}
void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Handle"));
switch (shape_type) {
@@ -588,8 +589,6 @@ CollisionShape2DEditor::CollisionShape2DEditor() {
node = nullptr;
canvas_item_editor = nullptr;
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
-
edit_handle = -1;
pressed = false;
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.h b/editor/plugins/collision_shape_2d_editor_plugin.h
index 49e0820ae9..68fc0ddbdf 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.h
+++ b/editor/plugins/collision_shape_2d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* collision_shape_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* collision_shape_2d_editor_plugin.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 COLLISION_SHAPE_2D_EDITOR_PLUGIN_H
#define COLLISION_SHAPE_2D_EDITOR_PLUGIN_H
@@ -35,7 +35,6 @@
#include "scene/2d/collision_shape_2d.h"
class CanvasItemEditor;
-class EditorUndoRedoManager;
class CollisionShape2DEditor : public Control {
GDCLASS(CollisionShape2DEditor, Control);
@@ -62,7 +61,6 @@ class CollisionShape2DEditor : public Control {
Point2(1, -1),
};
- Ref<EditorUndoRedoManager> undo_redo;
CanvasItemEditor *canvas_item_editor = nullptr;
CollisionShape2D *node = nullptr;
diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp
index bb6092755e..470b90aa7f 100644
--- a/editor/plugins/control_editor_plugin.cpp
+++ b/editor/plugins/control_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* control_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* control_editor_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 "control_editor_plugin.h"
@@ -35,6 +35,7 @@
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
+#include "scene/gui/grid_container.h"
#include "scene/gui/separator.h"
// Inspector controls.
@@ -720,11 +721,13 @@ void ControlEditorToolbar::_anchors_preset_selected(int p_preset) {
LayoutPreset preset = (LayoutPreset)p_preset;
List<Node *> selection = editor_selection->get_selected_node_list();
+ 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());
}
@@ -739,6 +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();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Change Anchors, Offsets (Keep Ratio)"));
for (Node *E : selection) {
@@ -789,6 +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();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (p_vertical) {
undo_redo->create_action(TTR("Change Vertical Size Flags"));
} else {
@@ -810,25 +815,12 @@ void ControlEditorToolbar::_container_flags_selected(int p_flags, bool p_vertica
undo_redo->commit_action();
}
-Vector2 ControlEditorToolbar::_anchor_to_position(const Control *p_control, Vector2 anchor) {
- ERR_FAIL_COND_V(!p_control, Vector2());
-
- Transform2D parent_transform = p_control->get_transform().affine_inverse();
- Rect2 parent_rect = p_control->get_parent_anchorable_rect();
-
- if (p_control->is_layout_rtl()) {
- return parent_transform.xform(parent_rect.position + Vector2(parent_rect.size.x - parent_rect.size.x * anchor.x, parent_rect.size.y * anchor.y));
- } else {
- return parent_transform.xform(parent_rect.position + Vector2(parent_rect.size.x * anchor.x, parent_rect.size.y * anchor.y));
- }
-}
-
Vector2 ControlEditorToolbar::_position_to_anchor(const Control *p_control, Vector2 position) {
ERR_FAIL_COND_V(!p_control, Vector2());
Rect2 parent_rect = p_control->get_parent_anchorable_rect();
- Vector2 output = Vector2();
+ Vector2 output;
if (p_control->is_layout_rtl()) {
output.x = (parent_rect.size.x == 0) ? 0.0 : (parent_rect.size.x - p_control->get_transform().xform(position).x - parent_rect.position.x) / parent_rect.size.x;
} else {
@@ -1037,7 +1029,6 @@ ControlEditorToolbar::ControlEditorToolbar() {
container_v_picker->connect("size_flags_selected", callable_mp(this, &ControlEditorToolbar::_container_flags_selected).bind(true));
// Editor connections.
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
editor_selection = EditorNode::get_singleton()->get_editor_selection();
editor_selection->add_editor_plugin(this);
editor_selection->connect("selection_changed", callable_mp(this, &ControlEditorToolbar::_selection_changed));
diff --git a/editor/plugins/control_editor_plugin.h b/editor/plugins/control_editor_plugin.h
index 22267cbc04..779637317d 100644
--- a/editor/plugins/control_editor_plugin.h
+++ b/editor/plugins/control_editor_plugin.h
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* control_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* control_editor_plugin.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 CONTROL_EDITOR_PLUGIN_H
#define CONTROL_EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
@@ -44,7 +45,7 @@
#include "scene/gui/separator.h"
#include "scene/gui/texture_rect.h"
-class EditorUndoRedoManager;
+class GridContainer;
// Inspector controls.
class ControlPositioningWarning : public MarginContainer {
@@ -205,7 +206,6 @@ public:
class ControlEditorToolbar : public HBoxContainer {
GDCLASS(ControlEditorToolbar, HBoxContainer);
- Ref<EditorUndoRedoManager> undo_redo;
EditorSelection *editor_selection = nullptr;
ControlEditorPopupButton *anchors_button = nullptr;
@@ -222,7 +222,6 @@ class ControlEditorToolbar : public HBoxContainer {
void _anchor_mode_toggled(bool p_status);
void _container_flags_selected(int p_flags, bool p_vertical);
- Vector2 _anchor_to_position(const Control *p_control, Vector2 anchor);
Vector2 _position_to_anchor(const Control *p_control, Vector2 position);
bool _is_node_locked(const Node *p_node);
List<Control *> _get_edited_controls();
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.cpp b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
index e56fd5dfe3..85897742fb 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* cpu_particles_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* cpu_particles_2d_editor_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 "cpu_particles_2d_editor_plugin.h"
@@ -34,9 +34,12 @@
#include "core/io/image_loader.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
-#include "editor/editor_undo_redo_manager.h"
#include "scene/2d/cpu_particles_2d.h"
+#include "scene/gui/check_box.h"
+#include "scene/gui/menu_button.h"
+#include "scene/gui/option_button.h"
#include "scene/gui/separator.h"
+#include "scene/gui/spin_box.h"
#include "scene/resources/particle_process_material.h"
void CPUParticles2DEditorPlugin::edit(Object *p_object) {
@@ -110,8 +113,8 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
int vpc = 0;
{
- Vector<uint8_t> data = img->get_data();
- const uint8_t *r = data.ptr();
+ Vector<uint8_t> img_data = img->get_data();
+ const uint8_t *r = img_data.ptr();
for (int i = 0; i < s.width; i++) {
for (int j = 0; j < s.height; j++) {
@@ -239,7 +242,6 @@ void CPUParticles2DEditorPlugin::_bind_methods() {
CPUParticles2DEditorPlugin::CPUParticles2DEditorPlugin() {
particles = nullptr;
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
toolbar = memnew(HBoxContainer);
add_control_to_container(CONTAINER_CANVAS_EDITOR_MENU, toolbar);
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.h b/editor/plugins/cpu_particles_2d_editor_plugin.h
index 06ca208463..cab9fca4d6 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.h
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* cpu_particles_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* cpu_particles_2d_editor_plugin.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 CPU_PARTICLES_2D_EDITOR_PLUGIN_H
#define CPU_PARTICLES_2D_EDITOR_PLUGIN_H
@@ -36,10 +36,12 @@
#include "scene/2d/cpu_particles_2d.h"
#include "scene/gui/box_container.h"
-class EditorPlugin;
+class CheckBox;
+class ConfirmationDialog;
class SpinBox;
class EditorFileDialog;
-class EditorUndoRedoManager;
+class MenuButton;
+class OptionButton;
class CPUParticles2DEditorPlugin : public EditorPlugin {
GDCLASS(CPUParticles2DEditorPlugin, EditorPlugin);
@@ -71,7 +73,6 @@ class CPUParticles2DEditorPlugin : public EditorPlugin {
String source_emission_file;
- Ref<EditorUndoRedoManager> undo_redo;
void _file_selected(const String &p_file);
void _menu_callback(int p_idx);
void _generate_emission_mask();
diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.cpp b/editor/plugins/cpu_particles_3d_editor_plugin.cpp
index ad12b8bef0..61702493da 100644
--- a/editor/plugins/cpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_3d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* cpu_particles_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* cpu_particles_3d_editor_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 "cpu_particles_3d_editor_plugin.h"
diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.h b/editor/plugins/cpu_particles_3d_editor_plugin.h
index f38349985c..894e0dfb31 100644
--- a/editor/plugins/cpu_particles_3d_editor_plugin.h
+++ b/editor/plugins/cpu_particles_3d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* cpu_particles_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* cpu_particles_3d_editor_plugin.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 CPU_PARTICLES_3D_EDITOR_PLUGIN_H
#define CPU_PARTICLES_3D_EDITOR_PLUGIN_H
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 8d1df0b32c..20710bac19 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* curve_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* curve_editor_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 "curve_editor_plugin.h"
@@ -37,6 +37,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
CurveEditor::CurveEditor() {
_selected_point = -1;
@@ -139,14 +140,13 @@ 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> &ur = EditorNode::get_undo_redo();
-
- ur->create_action(_selected_tangent == TANGENT_NONE ? TTR("Modify Curve Point") : TTR("Modify Curve Tangent"));
- ur->add_do_method(*_curve_ref, "_set_data", _curve_ref->get_data());
- ur->add_undo_method(*_curve_ref, "_set_data", _undo_data);
+ 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);
// Note: this will trigger one more "changed" signal even if nothing changes,
// but it's ok since it would have fired every frame during the drag anyways
- ur->commit_action();
+ undo_redo->commit_action();
_has_undo_data = false;
}
@@ -301,13 +301,11 @@ void CurveEditor::on_preset_item_selected(int preset_id) {
break;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
- ur->create_action(TTR("Load Curve Preset"));
-
- ur->add_do_method(&curve, "_set_data", curve.get_data());
- ur->add_undo_method(&curve, "_set_data", previous_data);
-
- ur->commit_action();
+ 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);
+ undo_redo->commit_action();
}
void CurveEditor::_curve_changed() {
@@ -435,8 +433,8 @@ CurveEditor::TangentIndex CurveEditor::get_tangent_at(Vector2 pos) const {
void CurveEditor::add_point(Vector2 pos) {
ERR_FAIL_COND(_curve_ref.is_null());
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
- ur->create_action(TTR("Remove Curve Point"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Remove Curve Point"));
Vector2 point_pos = get_world_pos(pos);
if (point_pos.y < 0.0) {
@@ -449,22 +447,21 @@ void CurveEditor::add_point(Vector2 pos) {
int i = _curve_ref->add_point(point_pos);
_curve_ref->remove_point(i);
- ur->add_do_method(*_curve_ref, "add_point", point_pos);
- ur->add_undo_method(*_curve_ref, "remove_point", i);
-
- ur->commit_action();
+ undo_redo->add_do_method(*_curve_ref, "add_point", point_pos);
+ undo_redo->add_undo_method(*_curve_ref, "remove_point", i);
+ undo_redo->commit_action();
}
void CurveEditor::remove_point(int index) {
ERR_FAIL_COND(_curve_ref.is_null());
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
- ur->create_action(TTR("Remove Curve Point"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Remove Curve Point"));
Curve::Point p = _curve_ref->get_point(index);
- ur->add_do_method(*_curve_ref, "remove_point", index);
- ur->add_undo_method(*_curve_ref, "add_point", p.position, p.left_tangent, p.right_tangent, p.left_mode, p.right_mode);
+ undo_redo->add_do_method(*_curve_ref, "remove_point", index);
+ undo_redo->add_undo_method(*_curve_ref, "add_point", p.position, p.left_tangent, p.right_tangent, p.left_mode, p.right_mode);
if (index == _selected_point) {
set_selected_point(-1);
@@ -474,14 +471,14 @@ void CurveEditor::remove_point(int index) {
set_hover_point_index(-1);
}
- ur->commit_action();
+ undo_redo->commit_action();
}
void CurveEditor::toggle_linear(TangentIndex tangent) {
ERR_FAIL_COND(_curve_ref.is_null());
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
- ur->create_action(TTR("Toggle Curve Linear Tangent"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Toggle Curve Linear Tangent"));
if (tangent == TANGENT_NONE) {
tangent = _selected_tangent;
@@ -493,8 +490,8 @@ void CurveEditor::toggle_linear(TangentIndex tangent) {
Curve::TangentMode prev_mode = _curve_ref->get_point_left_mode(_selected_point);
Curve::TangentMode mode = is_linear ? Curve::TANGENT_FREE : Curve::TANGENT_LINEAR;
- ur->add_do_method(*_curve_ref, "set_point_left_mode", _selected_point, mode);
- ur->add_undo_method(*_curve_ref, "set_point_left_mode", _selected_point, prev_mode);
+ undo_redo->add_do_method(*_curve_ref, "set_point_left_mode", _selected_point, mode);
+ undo_redo->add_undo_method(*_curve_ref, "set_point_left_mode", _selected_point, prev_mode);
} else {
bool is_linear = _curve_ref->get_point_right_mode(_selected_point) == Curve::TANGENT_LINEAR;
@@ -502,11 +499,11 @@ void CurveEditor::toggle_linear(TangentIndex tangent) {
Curve::TangentMode prev_mode = _curve_ref->get_point_right_mode(_selected_point);
Curve::TangentMode mode = is_linear ? Curve::TANGENT_FREE : Curve::TANGENT_LINEAR;
- ur->add_do_method(*_curve_ref, "set_point_right_mode", _selected_point, mode);
- ur->add_undo_method(*_curve_ref, "set_point_right_mode", _selected_point, prev_mode);
+ undo_redo->add_do_method(*_curve_ref, "set_point_right_mode", _selected_point, mode);
+ undo_redo->add_undo_method(*_curve_ref, "set_point_right_mode", _selected_point, prev_mode);
}
- ur->commit_action();
+ undo_redo->commit_action();
}
void CurveEditor::set_selected_point(int index) {
@@ -624,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);
}
};
@@ -755,10 +752,10 @@ void CurveEditor::_draw() {
float width = view_size.x - 60 * EDSCALE;
if (_selected_point > 0 && _selected_point + 1 < curve.get_point_count()) {
text_color.a *= 0.4;
- draw_multiline_string(font, Vector2(50 * EDSCALE, font_height), TTR("Hold Shift to edit tangents individually"), HORIZONTAL_ALIGNMENT_LEFT, width, -1, font_size, text_color);
+ draw_multiline_string(font, Vector2(50 * EDSCALE, font_height), TTR("Hold Shift to edit tangents individually"), HORIZONTAL_ALIGNMENT_LEFT, width, font_size, -1, text_color);
} else if (curve.get_point_count() == 0) {
text_color.a *= 0.4;
- draw_multiline_string(font, Vector2(50 * EDSCALE, font_height), TTR("Right click to add point"), HORIZONTAL_ALIGNMENT_LEFT, width, -1, font_size, text_color);
+ draw_multiline_string(font, Vector2(50 * EDSCALE, font_height), TTR("Right click to add point"), HORIZONTAL_ALIGNMENT_LEFT, width, font_size, -1, text_color);
}
}
@@ -799,13 +796,13 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons
Curve &curve = **curve_ref;
// FIXME: Should be ported to use p_size as done in b2633a97
- int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
+ int thumbnail_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
thumbnail_size *= EDSCALE;
Ref<Image> img_ref;
img_ref.instantiate();
Image &im = **img_ref;
- im.create(thumbnail_size, thumbnail_size / 2, false, Image::FORMAT_RGBA8);
+ im.initialize_data(thumbnail_size, thumbnail_size / 2, false, Image::FORMAT_RGBA8);
Color bg_color(0.1, 0.1, 0.1, 1.0);
diff --git a/editor/plugins/curve_editor_plugin.h b/editor/plugins/curve_editor_plugin.h
index 5cf3b16a06..d5cc0cb66a 100644
--- a/editor/plugins/curve_editor_plugin.h
+++ b/editor/plugins/curve_editor_plugin.h
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* curve_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* curve_editor_plugin.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 CURVE_EDITOR_PLUGIN_H
#define CURVE_EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "editor/editor_resource_preview.h"
#include "scene/resources/curve.h"
diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp
index 40e7dfead2..28151800b6 100644
--- a/editor/plugins/debugger_editor_plugin.cpp
+++ b/editor/plugins/debugger_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* debugger_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* debugger_editor_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 "debugger_editor_plugin.h"
@@ -47,7 +47,6 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(PopupMenu *p_debug_menu) {
ED_SHORTCUT("debugger/step_over", TTR("Step Over"), Key::F10);
ED_SHORTCUT("debugger/break", TTR("Break"));
ED_SHORTCUT("debugger/continue", TTR("Continue"), Key::F12);
- ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open"));
ED_SHORTCUT("debugger/debug_with_external_editor", TTR("Debug with External Editor"));
// File Server for deploy with remote filesystem.
@@ -69,7 +68,7 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(PopupMenu *p_debug_menu) {
debug_menu->set_item_tooltip(-1,
TTR("When this option is enabled, using one-click deploy for Android will only export an executable without the project data.\nThe filesystem will be provided from the project by the editor over the network.\nOn Android, deploying will use the USB cable for faster performance. This option speeds up testing for projects with large assets."));
debug_menu->add_separator();
- debug_menu->add_check_shortcut(ED_SHORTCUT("editor/visible_collision_shapes", TTR("Visible Collision Shapes")), RUN_DEBUG_COLLISONS);
+ debug_menu->add_check_shortcut(ED_SHORTCUT("editor/visible_collision_shapes", TTR("Visible Collision Shapes")), RUN_DEBUG_COLLISIONS);
debug_menu->set_item_tooltip(-1,
TTR("When this option is enabled, collision shapes and raycast nodes (for 2D and 3D) will be visible in the running project."));
debug_menu->add_check_shortcut(ED_SHORTCUT("editor/visible_paths", TTR("Visible Paths")), RUN_DEBUG_PATHS);
@@ -85,6 +84,9 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(PopupMenu *p_debug_menu) {
debug_menu->add_check_shortcut(ED_SHORTCUT("editor/sync_script_changes", TTR("Synchronize Script Changes")), RUN_RELOAD_SCRIPTS);
debug_menu->set_item_tooltip(-1,
TTR("When this option is enabled, any script that is saved will be reloaded in the running project.\nWhen used remotely on a device, this is more efficient when the network filesystem option is enabled."));
+ debug_menu->add_check_shortcut(ED_SHORTCUT("editor/keep_server_open", TTR("Keep Debug Server Open")), SERVER_KEEP_OPEN);
+ debug_menu->set_item_tooltip(-1,
+ TTR("When this option is enabled, the editor debug server will stay open and listen for new sessions started outside of the editor itself."));
// Multi-instance, start/stop
instances_menu = memnew(PopupMenu);
@@ -150,10 +152,10 @@ void DebuggerEditorPlugin::_menu_option(int p_option) {
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_deploy_remote_debug", !ischecked);
} break;
- case RUN_DEBUG_COLLISONS: {
- bool ischecked = debug_menu->is_item_checked(debug_menu->get_item_index(RUN_DEBUG_COLLISONS));
- debug_menu->set_item_checked(debug_menu->get_item_index(RUN_DEBUG_COLLISONS), !ischecked);
- EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_collisons", !ischecked);
+ case RUN_DEBUG_COLLISIONS: {
+ bool ischecked = debug_menu->is_item_checked(debug_menu->get_item_index(RUN_DEBUG_COLLISIONS));
+ debug_menu->set_item_checked(debug_menu->get_item_index(RUN_DEBUG_COLLISIONS), !ischecked);
+ EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_collisions", !ischecked);
} break;
case RUN_DEBUG_PATHS: {
@@ -176,6 +178,14 @@ void DebuggerEditorPlugin::_menu_option(int p_option) {
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_reload_scripts", !ischecked);
} break;
+ case SERVER_KEEP_OPEN: {
+ bool ischecked = debug_menu->is_item_checked(debug_menu->get_item_index(SERVER_KEEP_OPEN));
+ debug_menu->set_item_checked(debug_menu->get_item_index(SERVER_KEEP_OPEN), !ischecked);
+
+ EditorDebuggerNode::get_singleton()->set_keep_open(!ischecked);
+ EditorSettings::get_singleton()->set_project_metadata("debug_options", "server_keep_open", !ischecked);
+
+ } break;
}
}
@@ -190,11 +200,12 @@ void DebuggerEditorPlugin::_notification(int p_what) {
void DebuggerEditorPlugin::_update_debug_options() {
bool check_deploy_remote = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_deploy_remote_debug", false);
bool check_file_server = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_file_server", false);
- bool check_debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisons", false);
+ bool check_debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisions", false);
bool check_debug_paths = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_paths", false);
bool check_debug_navigation = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_navigation", false);
bool check_live_debug = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_live_debug", true);
bool check_reload_scripts = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_reload_scripts", true);
+ bool check_server_keep_open = EditorSettings::get_singleton()->get_project_metadata("debug_options", "server_keep_open", false);
int instances = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_instances", 1);
if (check_deploy_remote) {
@@ -204,7 +215,7 @@ void DebuggerEditorPlugin::_update_debug_options() {
_menu_option(RUN_FILE_SERVER);
}
if (check_debug_collisions) {
- _menu_option(RUN_DEBUG_COLLISONS);
+ _menu_option(RUN_DEBUG_COLLISIONS);
}
if (check_debug_paths) {
_menu_option(RUN_DEBUG_PATHS);
@@ -218,6 +229,9 @@ void DebuggerEditorPlugin::_update_debug_options() {
if (check_reload_scripts) {
_menu_option(RUN_RELOAD_SCRIPTS);
}
+ if (check_server_keep_open) {
+ _menu_option(SERVER_KEEP_OPEN);
+ }
int len = instances_menu->get_item_count();
for (int idx = 0; idx < len; idx++) {
diff --git a/editor/plugins/debugger_editor_plugin.h b/editor/plugins/debugger_editor_plugin.h
index d8871128c3..6e2d2c02ee 100644
--- a/editor/plugins/debugger_editor_plugin.h
+++ b/editor/plugins/debugger_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* debugger_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* debugger_editor_plugin.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 DEBUGGER_EDITOR_PLUGIN_H
#define DEBUGGER_EDITOR_PLUGIN_H
@@ -48,11 +48,12 @@ private:
enum MenuOptions {
RUN_FILE_SERVER,
RUN_LIVE_DEBUG,
- RUN_DEBUG_COLLISONS,
+ RUN_DEBUG_COLLISIONS,
RUN_DEBUG_PATHS,
RUN_DEBUG_NAVIGATION,
RUN_DEPLOY_REMOTE_DEBUG,
RUN_RELOAD_SCRIPTS,
+ SERVER_KEEP_OPEN,
};
void _update_debug_options();
diff --git a/editor/plugins/editor_debugger_plugin.cpp b/editor/plugins/editor_debugger_plugin.cpp
index 4ce3d7cfd5..eb1b2dcca7 100644
--- a/editor/plugins/editor_debugger_plugin.cpp
+++ b/editor/plugins/editor_debugger_plugin.cpp
@@ -1,38 +1,38 @@
-/*************************************************************************/
-/* editor_debugger_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_debugger_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 "editor_debugger_plugin.h"
#include "editor/debugger/script_editor_debugger.h"
-void EditorDebuggerPlugin::_breaked(bool p_really_did, bool p_can_debug, String p_message, bool p_has_stackdump) {
+void EditorDebuggerSession::_breaked(bool p_really_did, bool p_can_debug, String p_message, bool p_has_stackdump) {
if (p_really_did) {
emit_signal(SNAME("breaked"), p_can_debug);
} else {
@@ -40,22 +40,22 @@ void EditorDebuggerPlugin::_breaked(bool p_really_did, bool p_can_debug, String
}
}
-void EditorDebuggerPlugin::_started() {
+void EditorDebuggerSession::_started() {
emit_signal(SNAME("started"));
}
-void EditorDebuggerPlugin::_stopped() {
+void EditorDebuggerSession::_stopped() {
emit_signal(SNAME("stopped"));
}
-void EditorDebuggerPlugin::_bind_methods() {
- ClassDB::bind_method(D_METHOD("send_message", "message", "data"), &EditorDebuggerPlugin::send_message);
- ClassDB::bind_method(D_METHOD("register_message_capture", "name", "callable"), &EditorDebuggerPlugin::register_message_capture);
- ClassDB::bind_method(D_METHOD("unregister_message_capture", "name"), &EditorDebuggerPlugin::unregister_message_capture);
- ClassDB::bind_method(D_METHOD("has_capture", "name"), &EditorDebuggerPlugin::has_capture);
- ClassDB::bind_method(D_METHOD("is_breaked"), &EditorDebuggerPlugin::is_breaked);
- ClassDB::bind_method(D_METHOD("is_debuggable"), &EditorDebuggerPlugin::is_debuggable);
- ClassDB::bind_method(D_METHOD("is_session_active"), &EditorDebuggerPlugin::is_session_active);
+void EditorDebuggerSession::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("send_message", "message", "data"), &EditorDebuggerSession::send_message, DEFVAL(Array()));
+ ClassDB::bind_method(D_METHOD("toggle_profiler", "profiler", "enable", "data"), &EditorDebuggerSession::toggle_profiler, DEFVAL(Array()));
+ ClassDB::bind_method(D_METHOD("is_breaked"), &EditorDebuggerSession::is_breaked);
+ ClassDB::bind_method(D_METHOD("is_debuggable"), &EditorDebuggerSession::is_debuggable);
+ ClassDB::bind_method(D_METHOD("is_active"), &EditorDebuggerSession::is_active);
+ ClassDB::bind_method(D_METHOD("add_session_tab", "control"), &EditorDebuggerSession::add_session_tab);
+ ClassDB::bind_method(D_METHOD("remove_session_tab", "control"), &EditorDebuggerSession::remove_session_tab);
ADD_SIGNAL(MethodInfo("started"));
ADD_SIGNAL(MethodInfo("stopped"));
@@ -63,62 +63,131 @@ void EditorDebuggerPlugin::_bind_methods() {
ADD_SIGNAL(MethodInfo("continued"));
}
-void EditorDebuggerPlugin::attach_debugger(ScriptEditorDebugger *p_debugger) {
- debugger = p_debugger;
- if (debugger) {
- debugger->connect("started", callable_mp(this, &EditorDebuggerPlugin::_started));
- debugger->connect("stopped", callable_mp(this, &EditorDebuggerPlugin::_stopped));
- debugger->connect("breaked", callable_mp(this, &EditorDebuggerPlugin::_breaked));
- }
+void EditorDebuggerSession::add_session_tab(Control *p_tab) {
+ ERR_FAIL_COND(!p_tab || !debugger);
+ debugger->add_debugger_tab(p_tab);
+ tabs.insert(p_tab);
}
-void EditorDebuggerPlugin::detach_debugger(bool p_call_debugger) {
- if (debugger) {
- debugger->disconnect("started", callable_mp(this, &EditorDebuggerPlugin::_started));
- debugger->disconnect("stopped", callable_mp(this, &EditorDebuggerPlugin::_stopped));
- debugger->disconnect("breaked", callable_mp(this, &EditorDebuggerPlugin::_breaked));
- if (p_call_debugger && get_script_instance()) {
- debugger->remove_debugger_plugin(get_script_instance()->get_script());
- }
- debugger = nullptr;
- }
+void EditorDebuggerSession::remove_session_tab(Control *p_tab) {
+ ERR_FAIL_COND(!p_tab || !debugger);
+ debugger->remove_debugger_tab(p_tab);
+ tabs.erase(p_tab);
}
-void EditorDebuggerPlugin::send_message(const String &p_message, const Array &p_args) {
+void EditorDebuggerSession::send_message(const String &p_message, const Array &p_args) {
ERR_FAIL_COND_MSG(!debugger, "Plugin is not attached to debugger");
debugger->send_message(p_message, p_args);
}
-void EditorDebuggerPlugin::register_message_capture(const StringName &p_name, const Callable &p_callable) {
+void EditorDebuggerSession::toggle_profiler(const String &p_profiler, bool p_enable, const Array &p_data) {
ERR_FAIL_COND_MSG(!debugger, "Plugin is not attached to debugger");
- debugger->register_message_capture(p_name, p_callable);
+ debugger->toggle_profiler(p_profiler, p_enable, p_data);
}
-void EditorDebuggerPlugin::unregister_message_capture(const StringName &p_name) {
- ERR_FAIL_COND_MSG(!debugger, "Plugin is not attached to debugger");
- debugger->unregister_message_capture(p_name);
-}
-
-bool EditorDebuggerPlugin::has_capture(const StringName &p_name) {
- ERR_FAIL_COND_V_MSG(!debugger, false, "Plugin is not attached to debugger");
- return debugger->has_capture(p_name);
-}
-
-bool EditorDebuggerPlugin::is_breaked() {
+bool EditorDebuggerSession::is_breaked() {
ERR_FAIL_COND_V_MSG(!debugger, false, "Plugin is not attached to debugger");
return debugger->is_breaked();
}
-bool EditorDebuggerPlugin::is_debuggable() {
+bool EditorDebuggerSession::is_debuggable() {
ERR_FAIL_COND_V_MSG(!debugger, false, "Plugin is not attached to debugger");
return debugger->is_debuggable();
}
-bool EditorDebuggerPlugin::is_session_active() {
+bool EditorDebuggerSession::is_active() {
ERR_FAIL_COND_V_MSG(!debugger, false, "Plugin is not attached to debugger");
return debugger->is_session_active();
}
+void EditorDebuggerSession::detach_debugger() {
+ if (!debugger) {
+ return;
+ }
+ debugger->disconnect("started", callable_mp(this, &EditorDebuggerSession::_started));
+ debugger->disconnect("stopped", callable_mp(this, &EditorDebuggerSession::_stopped));
+ debugger->disconnect("breaked", callable_mp(this, &EditorDebuggerSession::_breaked));
+ debugger->disconnect("tree_exited", callable_mp(this, &EditorDebuggerSession::_debugger_gone_away));
+ for (Control *tab : tabs) {
+ debugger->remove_debugger_tab(tab);
+ }
+ tabs.clear();
+ debugger = nullptr;
+}
+
+void EditorDebuggerSession::_debugger_gone_away() {
+ debugger = nullptr;
+ tabs.clear();
+}
+
+EditorDebuggerSession::EditorDebuggerSession(ScriptEditorDebugger *p_debugger) {
+ ERR_FAIL_COND(!p_debugger);
+ debugger = p_debugger;
+ debugger->connect("started", callable_mp(this, &EditorDebuggerSession::_started));
+ debugger->connect("stopped", callable_mp(this, &EditorDebuggerSession::_stopped));
+ debugger->connect("breaked", callable_mp(this, &EditorDebuggerSession::_breaked));
+ debugger->connect("tree_exited", callable_mp(this, &EditorDebuggerSession::_debugger_gone_away), CONNECT_ONE_SHOT);
+}
+
+EditorDebuggerSession::~EditorDebuggerSession() {
+ detach_debugger();
+}
+
+/// EditorDebuggerPlugin
+
EditorDebuggerPlugin::~EditorDebuggerPlugin() {
- detach_debugger(true);
+ clear();
+}
+
+void EditorDebuggerPlugin::clear() {
+ for (int i = 0; i < sessions.size(); i++) {
+ sessions[i]->detach_debugger();
+ }
+ sessions.clear();
+}
+
+void EditorDebuggerPlugin::create_session(ScriptEditorDebugger *p_debugger) {
+ sessions.push_back(Ref<EditorDebuggerSession>(memnew(EditorDebuggerSession(p_debugger))));
+ setup_session(sessions.size() - 1);
+}
+
+void EditorDebuggerPlugin::setup_session(int p_idx) {
+ GDVIRTUAL_CALL(_setup_session, p_idx);
+}
+
+Ref<EditorDebuggerSession> EditorDebuggerPlugin::get_session(int p_idx) {
+ ERR_FAIL_INDEX_V(p_idx, sessions.size(), nullptr);
+ return sessions[p_idx];
+}
+
+Array EditorDebuggerPlugin::get_sessions() {
+ Array ret;
+ for (int i = 0; i < sessions.size(); i++) {
+ ret.push_back(sessions[i]);
+ }
+ return ret;
+}
+
+bool EditorDebuggerPlugin::has_capture(const String &p_message) const {
+ bool ret = false;
+ if (GDVIRTUAL_CALL(_has_capture, p_message, ret)) {
+ return ret;
+ }
+ return false;
+}
+
+bool EditorDebuggerPlugin::capture(const String &p_message, const Array &p_data, int p_session_id) {
+ bool ret = false;
+ if (GDVIRTUAL_CALL(_capture, p_message, p_data, p_session_id, ret)) {
+ return ret;
+ }
+ return false;
+}
+
+void EditorDebuggerPlugin::_bind_methods() {
+ GDVIRTUAL_BIND(_setup_session, "session_id");
+ GDVIRTUAL_BIND(_has_capture, "capture");
+ GDVIRTUAL_BIND(_capture, "message", "data", "session_id");
+ ClassDB::bind_method(D_METHOD("get_session", "id"), &EditorDebuggerPlugin::get_session);
+ ClassDB::bind_method(D_METHOD("get_sessions"), &EditorDebuggerPlugin::get_sessions);
}
diff --git a/editor/plugins/editor_debugger_plugin.h b/editor/plugins/editor_debugger_plugin.h
index b602c36912..10c0e29f6e 100644
--- a/editor/plugins/editor_debugger_plugin.h
+++ b/editor/plugins/editor_debugger_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_debugger_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_debugger_plugin.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 EDITOR_DEBUGGER_PLUGIN_H
#define EDITOR_DEBUGGER_PLUGIN_H
@@ -35,29 +35,62 @@
class ScriptEditorDebugger;
-class EditorDebuggerPlugin : public Control {
- GDCLASS(EditorDebuggerPlugin, Control);
+class EditorDebuggerSession : public RefCounted {
+ GDCLASS(EditorDebuggerSession, RefCounted);
private:
+ HashSet<Control *> tabs;
+
ScriptEditorDebugger *debugger = nullptr;
void _breaked(bool p_really_did, bool p_can_debug, String p_message, bool p_has_stackdump);
void _started();
void _stopped();
+ void _debugger_gone_away();
protected:
static void _bind_methods();
public:
- void attach_debugger(ScriptEditorDebugger *p_debugger);
- void detach_debugger(bool p_call_debugger);
- void send_message(const String &p_message, const Array &p_args);
- void register_message_capture(const StringName &p_name, const Callable &p_callable);
- void unregister_message_capture(const StringName &p_name);
- bool has_capture(const StringName &p_name);
+ void detach_debugger();
+
+ void add_session_tab(Control *p_tab);
+ void remove_session_tab(Control *p_tab);
+ void send_message(const String &p_message, const Array &p_args = Array());
+ void toggle_profiler(const String &p_profiler, bool p_enable, const Array &p_data = Array());
bool is_breaked();
bool is_debuggable();
- bool is_session_active();
+ bool is_active();
+
+ EditorDebuggerSession(ScriptEditorDebugger *p_debugger);
+ ~EditorDebuggerSession();
+};
+
+class EditorDebuggerPlugin : public RefCounted {
+ GDCLASS(EditorDebuggerPlugin, RefCounted);
+
+private:
+ List<Ref<EditorDebuggerSession>> sessions;
+
+protected:
+ static void _bind_methods();
+
+public:
+ void create_session(ScriptEditorDebugger *p_debugger);
+ void clear();
+
+ virtual void setup_session(int p_idx);
+ virtual bool capture(const String &p_message, const Array &p_data, int p_session);
+ virtual bool has_capture(const String &p_capture) const;
+
+ Ref<EditorDebuggerSession> get_session(int p_session_id);
+ Array get_sessions();
+
+ GDVIRTUAL3R(bool, _capture, const String &, const Array &, int);
+ GDVIRTUAL1RC(bool, _has_capture, const String &);
+ GDVIRTUAL1(_setup_session, int);
+
+ EditorDebuggerPlugin() {}
~EditorDebuggerPlugin();
};
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 59b8f31720..523e7703c4 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_preview_plugins.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_preview_plugins.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 "editor_preview_plugins.h"
@@ -93,7 +93,7 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const Ref<Resource> &p_from,
return Ref<Texture2D>();
}
- img = atlas->get_rect(atex->get_region());
+ img = atlas->get_region(atex->get_region());
} else {
Ref<Texture2D> tex = p_from;
if (tex.is_valid()) {
@@ -210,9 +210,7 @@ Ref<Texture2D> EditorBitmapPreviewPlugin::generate(const Ref<Resource> &p_from,
}
}
- Ref<Image> img;
- img.instantiate();
- img->create(bm->get_size().width, bm->get_size().height, false, Image::FORMAT_L8, data);
+ Ref<Image> img = Image::create_from_data(bm->get_size().width, bm->get_size().height, false, Image::FORMAT_L8, data);
if (img->is_compressed()) {
if (img->decompress() != OK) {
@@ -438,6 +436,7 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() {
}
EditorMaterialPreviewPlugin::~EditorMaterialPreviewPlugin() {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
RS::get_singleton()->free(sphere);
RS::get_singleton()->free(sphere_instance);
RS::get_singleton()->free(viewport);
@@ -483,17 +482,15 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const Ref<Resource> &p_from,
int line = 0;
int col = 0;
- Ref<Image> img;
- img.instantiate();
int thumbnail_size = MAX(p_size.x, p_size.y);
- img->create(thumbnail_size, thumbnail_size, false, Image::FORMAT_RGBA8);
+ Ref<Image> img = Image::create_empty(thumbnail_size, thumbnail_size, false, Image::FORMAT_RGBA8);
- Color bg_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/background_color");
- Color keyword_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/keyword_color");
- Color control_flow_keyword_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/control_flow_keyword_color");
- Color text_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/text_color");
- Color symbol_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/symbol_color");
- Color comment_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/comment_color");
+ Color bg_color = EDITOR_GET("text_editor/theme/highlighting/background_color");
+ Color keyword_color = EDITOR_GET("text_editor/theme/highlighting/keyword_color");
+ Color control_flow_keyword_color = EDITOR_GET("text_editor/theme/highlighting/control_flow_keyword_color");
+ Color text_color = EDITOR_GET("text_editor/theme/highlighting/text_color");
+ Color symbol_color = EDITOR_GET("text_editor/theme/highlighting/symbol_color");
+ Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
if (bg_color.a == 0) {
bg_color = Color(0, 0, 0, 0);
@@ -660,9 +657,7 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const Ref<Resource> &p_f
//post_process_preview(img);
- Ref<Image> image;
- image.instantiate();
- image->create(w, h, false, Image::FORMAT_RGB8, img);
+ Ref<Image> image = Image::create_from_data(w, h, false, Image::FORMAT_RGB8, img);
return ImageTexture::create_from_image(image);
}
@@ -773,6 +768,7 @@ EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() {
}
EditorMeshPreviewPlugin::~EditorMeshPreviewPlugin() {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
//RS::get_singleton()->free(sphere);
RS::get_singleton()->free(mesh_instance);
RS::get_singleton()->free(viewport);
@@ -873,6 +869,7 @@ EditorFontPreviewPlugin::EditorFontPreviewPlugin() {
}
EditorFontPreviewPlugin::~EditorFontPreviewPlugin() {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
RS::get_singleton()->free(canvas_item);
RS::get_singleton()->free(canvas);
RS::get_singleton()->free(viewport);
diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h
index efb2c80cfd..6e4b73481c 100644
--- a/editor/plugins/editor_preview_plugins.h
+++ b/editor/plugins/editor_preview_plugins.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_preview_plugins.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_preview_plugins.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 EDITOR_PREVIEW_PLUGINS_H
#define EDITOR_PREVIEW_PLUGINS_H
@@ -70,10 +70,12 @@ public:
};
class EditorPackedScenePreviewPlugin : public EditorResourcePreviewGenerator {
+ GDCLASS(EditorPackedScenePreviewPlugin, EditorResourcePreviewGenerator);
+
public:
- virtual bool handles(const String &p_type) const;
- virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const;
- virtual Ref<Texture2D> generate_from_path(const String &p_path, const Size2 &p_size) const;
+ virtual bool handles(const String &p_type) const override;
+ virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override;
+ virtual Ref<Texture2D> generate_from_path(const String &p_path, const Size2 &p_size) const override;
EditorPackedScenePreviewPlugin();
};
@@ -107,17 +109,21 @@ public:
};
class EditorScriptPreviewPlugin : public EditorResourcePreviewGenerator {
+ GDCLASS(EditorScriptPreviewPlugin, EditorResourcePreviewGenerator);
+
public:
- virtual bool handles(const String &p_type) const;
- virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const;
+ virtual bool handles(const String &p_type) const override;
+ virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override;
EditorScriptPreviewPlugin();
};
class EditorAudioStreamPreviewPlugin : public EditorResourcePreviewGenerator {
+ GDCLASS(EditorAudioStreamPreviewPlugin, EditorResourcePreviewGenerator);
+
public:
- virtual bool handles(const String &p_type) const;
- virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const;
+ virtual bool handles(const String &p_type) const override;
+ virtual Ref<Texture2D> generate(const Ref<Resource> &p_from, const Size2 &p_size) const override;
EditorAudioStreamPreviewPlugin();
};
diff --git a/editor/plugins/editor_resource_conversion_plugin.cpp b/editor/plugins/editor_resource_conversion_plugin.cpp
index 91394dbac7..3209b576b2 100644
--- a/editor/plugins/editor_resource_conversion_plugin.cpp
+++ b/editor/plugins/editor_resource_conversion_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_resource_conversion_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_resource_conversion_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 "editor_resource_conversion_plugin.h"
@@ -38,27 +38,18 @@ void EditorResourceConversionPlugin::_bind_methods() {
String EditorResourceConversionPlugin::converts_to() const {
String ret;
- if (GDVIRTUAL_CALL(_converts_to, ret)) {
- return ret;
- }
-
- return "";
+ GDVIRTUAL_CALL(_converts_to, ret);
+ return ret;
}
bool EditorResourceConversionPlugin::handles(const Ref<Resource> &p_resource) const {
- bool ret;
- if (GDVIRTUAL_CALL(_handles, p_resource, ret)) {
- return ret;
- }
-
- return false;
+ bool ret = false;
+ GDVIRTUAL_CALL(_handles, p_resource, ret);
+ return ret;
}
Ref<Resource> EditorResourceConversionPlugin::convert(const Ref<Resource> &p_resource) const {
Ref<Resource> ret;
- if (GDVIRTUAL_CALL(_convert, p_resource, ret)) {
- return ret;
- }
-
- return Ref<Resource>();
+ GDVIRTUAL_CALL(_convert, p_resource, ret);
+ return ret;
}
diff --git a/editor/plugins/editor_resource_conversion_plugin.h b/editor/plugins/editor_resource_conversion_plugin.h
index 34b0837383..32e05585ee 100644
--- a/editor/plugins/editor_resource_conversion_plugin.h
+++ b/editor/plugins/editor_resource_conversion_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* editor_resource_conversion_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* editor_resource_conversion_plugin.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 EDITOR_RESOURCE_CONVERSION_PLUGIN_H
#define EDITOR_RESOURCE_CONVERSION_PLUGIN_H
diff --git a/editor/plugins/font_config_plugin.cpp b/editor/plugins/font_config_plugin.cpp
index 2df951518e..db4a103624 100644
--- a/editor/plugins/font_config_plugin.cpp
+++ b/editor/plugins/font_config_plugin.cpp
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* font_config_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* font_config_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 "font_config_plugin.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/import/dynamic_font_import_settings.h"
/*************************************************************************/
@@ -154,7 +155,7 @@ void EditorPropertyFontMetaOverride::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- if (Object::cast_to<Button>(button_add)) {
+ if (button_add) {
button_add->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
}
} break;
@@ -260,7 +261,7 @@ void EditorPropertyFontMetaOverride::update_property() {
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = property_vbox->get_child_count() - 1; i >= 0; i--) {
- property_vbox->get_child(i)->queue_delete();
+ property_vbox->get_child(i)->queue_free();
}
button_add = nullptr;
}
@@ -457,7 +458,7 @@ void EditorPropertyOTVariation::update_property() {
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = property_vbox->get_child_count() - 1; i >= 0; i--) {
- property_vbox->get_child(i)->queue_delete();
+ property_vbox->get_child(i)->queue_free();
}
}
@@ -482,7 +483,7 @@ void EditorPropertyOTVariation::update_property() {
Vector3i range = supported.get_value_at_index(i);
EditorPropertyInteger *prop = memnew(EditorPropertyInteger);
- prop->setup(range.x, range.y, 1, false, false);
+ prop->setup(range.x, range.y, false, 1, false, false);
prop->set_object_and_property(object.ptr(), "keys/" + itos(name_tag));
String name = TS->tag_to_name(name_tag);
@@ -549,7 +550,7 @@ void EditorPropertyOTFeatures::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- if (Object::cast_to<Button>(button_add)) {
+ if (button_add) {
button_add->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
}
} break;
@@ -622,6 +623,16 @@ void EditorPropertyOTFeatures::update_property() {
supported = fd->get_supported_feature_list();
}
+ if (supported.is_empty()) {
+ edit->set_text(vformat(TTR("No supported features")));
+ if (container) {
+ set_bottom_editor(nullptr);
+ memdelete(container);
+ button_add = nullptr;
+ container = nullptr;
+ }
+ return;
+ }
edit->set_text(vformat(TTR("Features (%d of %d set)"), dict.size(), supported.size()));
bool unfolded = get_edited_object()->editor_is_section_unfolded(get_edited_property());
@@ -652,7 +663,7 @@ void EditorPropertyOTFeatures::update_property() {
} else {
// Queue children for deletion, deleting immediately might cause errors.
for (int i = property_vbox->get_child_count() - 1; i >= 0; i--) {
- property_vbox->get_child(i)->queue_delete();
+ property_vbox->get_child(i)->queue_free();
}
button_add = nullptr;
}
@@ -751,7 +762,7 @@ void EditorPropertyOTFeatures::update_property() {
} break;
case Variant::INT: {
EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
- editor->setup(0, 255, 1, false, false);
+ editor->setup(0, 255, 1, false, false, false);
prop = editor;
} break;
default: {
diff --git a/editor/plugins/font_config_plugin.h b/editor/plugins/font_config_plugin.h
index 41dde3cc59..150e97f7e2 100644
--- a/editor/plugins/font_config_plugin.h
+++ b/editor/plugins/font_config_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* font_config_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* font_config_plugin.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 FONT_CONFIG_PLUGIN_H
#define FONT_CONFIG_PLUGIN_H
diff --git a/editor/plugins/gdextension_export_plugin.h b/editor/plugins/gdextension_export_plugin.h
index e1d68d97b5..f3d2867030 100644
--- a/editor/plugins/gdextension_export_plugin.h
+++ b/editor/plugins/gdextension_export_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gdextension_export_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gdextension_export_plugin.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 GDEXTENSION_EXPORT_PLUGIN_H
#define GDEXTENSION_EXPORT_PLUGIN_H
@@ -40,7 +40,7 @@ protected:
};
void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) {
- if (p_type != "NativeExtension") {
+ if (p_type != "GDExtension") {
return;
}
@@ -54,60 +54,38 @@ void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p
String entry_symbol = config->get_value("configuration", "entry_symbol");
- List<String> libraries;
-
- config->get_section_keys("libraries", &libraries);
-
- bool could_export = false;
- for (const String &E : libraries) {
- Vector<String> tags = E.split(".");
- bool all_tags_met = true;
- for (int i = 0; i < tags.size(); i++) {
- String tag = tags[i].strip_edges();
- if (!p_features.has(tag)) {
- all_tags_met = false;
- break;
- }
- }
-
- if (all_tags_met) {
- String library_path = config->get_value("libraries", E);
- if (!library_path.begins_with("res://")) {
- print_line("Skipping export of out-of-project library " + library_path);
- continue;
- }
- add_shared_object(library_path, tags);
-
- if (p_features.has("iOS") && (library_path.ends_with(".a") || library_path.ends_with(".xcframework"))) {
- String additional_code = "extern void register_dynamic_symbol(char *name, void *address);\n"
- "extern void add_ios_init_callback(void (*cb)());\n"
- "\n"
- "extern \"C\" void $ENTRY();\n"
- "void $ENTRY_init() {\n"
- " if (&$ENTRY) register_dynamic_symbol((char *)\"$ENTRY\", (void *)$ENTRY);\n"
- "}\n"
- "struct $ENTRY_struct {\n"
- " $ENTRY_struct() {\n"
- " add_ios_init_callback($ENTRY_init);\n"
- " }\n"
- "};\n"
- "$ENTRY_struct $ENTRY_struct_instance;\n\n";
- additional_code = additional_code.replace("$ENTRY", entry_symbol);
- add_ios_cpp_code(additional_code);
-
- String linker_flags = "-Wl,-U,_" + entry_symbol;
- add_ios_linker_flags(linker_flags);
- }
- could_export = true;
- break;
+ PackedStringArray tags;
+ String library_path = GDExtension::find_extension_library(
+ p_path, config, [p_features](String p_feature) { return p_features.has(p_feature); }, &tags);
+ if (!library_path.is_empty()) {
+ add_shared_object(library_path, tags);
+
+ if (p_features.has("iOS") && (library_path.ends_with(".a") || library_path.ends_with(".xcframework"))) {
+ String additional_code = "extern void register_dynamic_symbol(char *name, void *address);\n"
+ "extern void add_ios_init_callback(void (*cb)());\n"
+ "\n"
+ "extern \"C\" void $ENTRY();\n"
+ "void $ENTRY_init() {\n"
+ " if (&$ENTRY) register_dynamic_symbol((char *)\"$ENTRY\", (void *)$ENTRY);\n"
+ "}\n"
+ "struct $ENTRY_struct {\n"
+ " $ENTRY_struct() {\n"
+ " add_ios_init_callback($ENTRY_init);\n"
+ " }\n"
+ "};\n"
+ "$ENTRY_struct $ENTRY_struct_instance;\n\n";
+ additional_code = additional_code.replace("$ENTRY", entry_symbol);
+ add_ios_cpp_code(additional_code);
+
+ String linker_flags = "-Wl,-U,_" + entry_symbol;
+ add_ios_linker_flags(linker_flags);
}
- }
- if (!could_export) {
- Vector<String> tags;
+ } else {
+ Vector<String> features_vector;
for (const String &E : p_features) {
- tags.append(E);
+ features_vector.append(E);
}
- ERR_FAIL_MSG(vformat("Couldn't export extension: %s. No suitable library found for export flags: %s", p_path, String(", ").join(tags)));
+ ERR_FAIL_MSG(vformat("No suitable library found for GDExtension: %s. Possible feature flags for your platform: %s", p_path, String(", ").join(features_vector)));
}
List<String> dependencies;
@@ -115,11 +93,11 @@ void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p
config->get_section_keys("dependencies", &dependencies);
}
- for (const String &E : libraries) {
- Vector<String> tags = E.split(".");
+ for (const String &E : dependencies) {
+ Vector<String> dependency_tags = E.split(".");
bool all_tags_met = true;
- for (int i = 0; i < tags.size(); i++) {
- String tag = tags[i].strip_edges();
+ for (int i = 0; i < dependency_tags.size(); i++) {
+ String tag = dependency_tags[i].strip_edges();
if (!p_features.has(tag)) {
all_tags_met = false;
break;
@@ -129,13 +107,12 @@ void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p
if (all_tags_met) {
Dictionary dependency = config->get_value("dependencies", E);
for (const Variant *key = dependency.next(nullptr); key; key = dependency.next(key)) {
- String library_path = *key;
+ String dependency_path = *key;
String target_path = dependency[*key];
- if (!library_path.begins_with("res://")) {
- print_line("Skipping export of out-of-project library " + library_path);
- continue;
+ if (dependency_path.is_relative_path()) {
+ dependency_path = p_path.get_base_dir().path_join(dependency_path);
}
- add_shared_object(library_path, tags, target_path);
+ add_shared_object(dependency_path, dependency_tags, target_path);
}
break;
}
diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.cpp b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
index e2d19c34e6..04b2a9337e 100644
--- a/editor/plugins/gpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gpu_particles_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gpu_particles_2d_editor_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 "gpu_particles_2d_editor_plugin.h"
@@ -37,6 +37,7 @@
#include "editor/editor_undo_redo_manager.h"
#include "editor/scene_tree_dock.h"
#include "scene/2d/cpu_particles_2d.h"
+#include "scene/gui/menu_button.h"
#include "scene/gui/separator.h"
#include "scene/resources/particle_process_material.h"
@@ -112,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);
@@ -160,6 +161,7 @@ void GPUParticles2DEditorPlugin::_generate_visibility_rect() {
particles->set_emitting(false);
}
+ 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());
@@ -207,8 +209,8 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
int vpc = 0;
{
- Vector<uint8_t> data = img->get_data();
- const uint8_t *r = data.ptr();
+ Vector<uint8_t> img_data = img->get_data();
+ const uint8_t *r = img_data.ptr();
for (int i = 0; i < s.width; i++) {
for (int j = 0; j < s.height; j++) {
@@ -299,7 +301,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
}
img.instantiate();
- img->create(w, h, false, Image::FORMAT_RGF, texdata);
+ img->set_data(w, h, false, Image::FORMAT_RGF, texdata);
pm->set_emission_point_texture(ImageTexture::create_from_image(img));
pm->set_emission_point_count(vpc);
@@ -315,7 +317,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
}
img.instantiate();
- img->create(w, h, false, Image::FORMAT_RGBA8, colordata);
+ img->set_data(w, h, false, Image::FORMAT_RGBA8, colordata);
pm->set_emission_color_texture(ImageTexture::create_from_image(img));
}
@@ -335,7 +337,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
}
img.instantiate();
- img->create(w, h, false, Image::FORMAT_RGF, normdata);
+ img->set_data(w, h, false, Image::FORMAT_RGF, normdata);
pm->set_emission_normal_texture(ImageTexture::create_from_image(img));
} else {
@@ -359,7 +361,6 @@ void GPUParticles2DEditorPlugin::_bind_methods() {
GPUParticles2DEditorPlugin::GPUParticles2DEditorPlugin() {
particles = nullptr;
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
toolbar = memnew(HBoxContainer);
add_control_to_container(CONTAINER_CANVAS_EDITOR_MENU, toolbar);
diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.h b/editor/plugins/gpu_particles_2d_editor_plugin.h
index 0229b57c10..aa6d166d85 100644
--- a/editor/plugins/gpu_particles_2d_editor_plugin.h
+++ b/editor/plugins/gpu_particles_2d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gpu_particles_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gpu_particles_2d_editor_plugin.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 GPU_PARTICLES_2D_EDITOR_PLUGIN_H
#define GPU_PARTICLES_2D_EDITOR_PLUGIN_H
@@ -37,8 +37,11 @@
#include "scene/gui/box_container.h"
#include "scene/gui/spin_box.h"
+class CheckBox;
+class ConfirmationDialog;
class EditorFileDialog;
-class EditorUndoRedoManager;
+class MenuButton;
+class OptionButton;
class GPUParticles2DEditorPlugin : public EditorPlugin {
GDCLASS(GPUParticles2DEditorPlugin, EditorPlugin);
@@ -76,7 +79,6 @@ class GPUParticles2DEditorPlugin : public EditorPlugin {
String source_emission_file;
- Ref<EditorUndoRedoManager> undo_redo;
void _file_selected(const String &p_file);
void _menu_callback(int p_idx);
void _generate_visibility_rect();
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
index d91cbb6571..65f66c2661 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gpu_particles_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gpu_particles_3d_editor_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 "gpu_particles_3d_editor_plugin.h"
@@ -36,6 +36,8 @@
#include "editor/plugins/node_3d_editor_plugin.h"
#include "editor/scene_tree_dock.h"
#include "scene/3d/cpu_particles_3d.h"
+#include "scene/3d/mesh_instance_3d.h"
+#include "scene/gui/menu_button.h"
#include "scene/resources/particle_process_material.h"
bool GPUParticles3DEditorBase::_generate(Vector<Vector3> &points, Vector<Vector3> &normals) {
@@ -255,8 +257,8 @@ void GPUParticles3DEditor::_menu_option(int p_option) {
}
} break;
case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: {
- Ref<ParticleProcessMaterial> material = node->get_process_material();
- if (material.is_null()) {
+ Ref<ParticleProcessMaterial> mat = node->get_process_material();
+ if (mat.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("A processor material of type 'ParticleProcessMaterial' is required."));
return;
}
@@ -272,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);
@@ -322,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());
@@ -366,13 +368,13 @@ void GPUParticles3DEditor::_generate_emission_points() {
Ref<Image> image = memnew(Image(w, h, false, Image::FORMAT_RGBF, point_img));
Ref<ImageTexture> tex = ImageTexture::create_from_image(image);
- Ref<ParticleProcessMaterial> material = node->get_process_material();
- ERR_FAIL_COND(material.is_null());
+ Ref<ParticleProcessMaterial> mat = node->get_process_material();
+ ERR_FAIL_COND(mat.is_null());
if (normals.size() > 0) {
- material->set_emission_shape(ParticleProcessMaterial::EMISSION_SHAPE_DIRECTED_POINTS);
- material->set_emission_point_count(point_count);
- material->set_emission_point_texture(tex);
+ mat->set_emission_shape(ParticleProcessMaterial::EMISSION_SHAPE_DIRECTED_POINTS);
+ mat->set_emission_point_count(point_count);
+ mat->set_emission_point_texture(tex);
Vector<uint8_t> point_img2;
point_img2.resize(w * h * 3 * sizeof(float));
@@ -390,11 +392,11 @@ void GPUParticles3DEditor::_generate_emission_points() {
}
Ref<Image> image2 = memnew(Image(w, h, false, Image::FORMAT_RGBF, point_img2));
- material->set_emission_normal_texture(ImageTexture::create_from_image(image2));
+ mat->set_emission_normal_texture(ImageTexture::create_from_image(image2));
} else {
- material->set_emission_shape(ParticleProcessMaterial::EMISSION_SHAPE_POINTS);
- material->set_emission_point_count(point_count);
- material->set_emission_point_texture(tex);
+ mat->set_emission_shape(ParticleProcessMaterial::EMISSION_SHAPE_POINTS);
+ mat->set_emission_point_count(point_count);
+ mat->set_emission_point_texture(tex);
}
}
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.h b/editor/plugins/gpu_particles_3d_editor_plugin.h
index 17bdfa6e3f..176a45df56 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.h
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gpu_particles_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gpu_particles_3d_editor_plugin.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 GPU_PARTICLES_3D_EDITOR_PLUGIN_H
#define GPU_PARTICLES_3D_EDITOR_PLUGIN_H
@@ -35,6 +35,10 @@
#include "scene/3d/gpu_particles_3d.h"
#include "scene/gui/spin_box.h"
+class ConfirmationDialog;
+class HBoxContainer;
+class MenuButton;
+class OptionButton;
class SceneTreeDialog;
class GPUParticles3DEditorBase : public Control {
diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
index 59d665342f..72c234c1d4 100644
--- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gpu_particles_collision_sdf_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gpu_particles_collision_sdf_editor_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 "gpu_particles_collision_sdf_editor_plugin.h"
diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h
index 684279039a..9f59f6e2cd 100644
--- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h
+++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gpu_particles_collision_sdf_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gpu_particles_collision_sdf_editor_plugin.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 GPU_PARTICLES_COLLISION_SDF_EDITOR_PLUGIN_H
#define GPU_PARTICLES_COLLISION_SDF_EDITOR_PLUGIN_H
@@ -37,6 +37,7 @@
struct EditorProgress;
class EditorFileDialog;
+class HBoxContainer;
class GPUParticlesCollisionSDF3DEditorPlugin : public EditorPlugin {
GDCLASS(GPUParticlesCollisionSDF3DEditorPlugin, EditorPlugin);
diff --git a/editor/plugins/gradient_editor.cpp b/editor/plugins/gradient_editor.cpp
index c13b162db6..3676c2c222 100644
--- a/editor/plugins/gradient_editor.cpp
+++ b/editor/plugins/gradient_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gradient_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gradient_editor.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 "gradient_editor.h"
@@ -57,7 +57,7 @@ int GradientEditor::_get_point_from_pos(int x) {
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 = (draw_point_width / 2 * 1.7); //make it easier to grab
+ float min = (handle_width / 2 * 1.7); // Make it easier to grab.
if (distance <= min && distance < min_distance) {
result = i;
min_distance = distance;
@@ -90,8 +90,8 @@ void GradientEditor::_gradient_changed() {
}
editing = true;
- Vector<Gradient::Point> points = gradient->get_points();
- set_points(points);
+ Vector<Gradient::Point> grad_points = gradient->get_points();
+ set_points(grad_points);
set_interpolation_mode(gradient->get_interpolation_mode());
queue_redraw();
editing = false;
@@ -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());
@@ -203,6 +203,7 @@ void GradientEditor::gui_input(const Ref<InputEvent> &p_event) {
grabbed = _get_point_from_pos(mb->get_position().x);
_show_color_picker();
accept_event();
+ return;
}
// Delete point on right click.
@@ -396,7 +397,7 @@ void GradientEditor::_notification(int p_what) {
}
case NOTIFICATION_THEME_CHANGED: {
draw_spacing = BASE_SPACING * get_theme_default_base_scale();
- draw_point_width = BASE_POINT_WIDTH * get_theme_default_base_scale();
+ handle_width = BASE_HANDLE_WIDTH * get_theme_default_base_scale();
} break;
case NOTIFICATION_DRAW: {
@@ -407,32 +408,38 @@ void GradientEditor::_notification(int p_what) {
return; // Safety check. We have division by 'h'. And in any case there is nothing to draw with such size.
}
- int total_w = get_size().width - get_size().height - draw_spacing;
+ int total_w = get_size().width - get_size().height - draw_spacing - handle_width;
// Draw checker pattern for ramp.
- draw_texture_rect(get_theme_icon(SNAME("GuiMiniCheckerboard"), SNAME("EditorIcons")), Rect2(0, 0, total_w, h), true);
+ draw_texture_rect(get_theme_icon(SNAME("GuiMiniCheckerboard"), SNAME("EditorIcons")), Rect2(handle_width / 2, 0, total_w, h), true);
// Draw color ramp.
gradient_cache->set_points(points);
gradient_cache->set_interpolation_mode(interpolation_mode);
preview_texture->set_gradient(gradient_cache);
- draw_texture_rect(preview_texture, Rect2(0, 0, total_w, h));
+ draw_texture_rect(preview_texture, Rect2(handle_width / 2, 0, total_w, h));
+
+ // 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 point markers.
for (int i = 0; i < points.size(); i++) {
- Color col = points[i].color.inverted();
+ Color col = points[i].color.get_v() > 0.5 ? Color(0, 0, 0) : Color(1, 1, 1);
col.a = 0.9;
- draw_line(Vector2(points[i].offset * total_w, 0), Vector2(points[i].offset * total_w, h / 2), col);
- Rect2 rect = Rect2(points[i].offset * total_w - draw_point_width / 2, h / 2, draw_point_width, h / 2);
+ 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);
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, Color(1, 0, 0, 0.9), false);
+ draw_rect(rect, focus_color, false);
} else {
- draw_rect(rect, Color(0.6, 0, 0, 0.9), false);
+ draw_rect(rect, focus_color.darkened(0.4), false);
}
rect = rect.grow(-1);
@@ -441,23 +448,16 @@ void GradientEditor::_notification(int p_what) {
}
// Draw "button" for color selector.
- draw_texture_rect(get_theme_icon(SNAME("GuiMiniCheckerboard"), SNAME("EditorIcons")), Rect2(total_w + draw_spacing, 0, h, h), true);
+ int button_offset = total_w + handle_width + draw_spacing;
+ draw_texture_rect(get_theme_icon(SNAME("GuiMiniCheckerboard"), SNAME("EditorIcons")), Rect2(button_offset, 0, h, h), true);
if (grabbed != -1) {
// Draw with selection color.
- draw_rect(Rect2(total_w + draw_spacing, 0, h, h), points[grabbed].color);
+ draw_rect(Rect2(button_offset, 0, h, h), points[grabbed].color);
} else {
// If no color selected draw grey color with 'X' on top.
- draw_rect(Rect2(total_w + draw_spacing, 0, h, h), Color(0.5, 0.5, 0.5, 1));
- draw_line(Vector2(total_w + draw_spacing, 0), Vector2(total_w + draw_spacing + h, h), Color(1, 1, 1, 0.6));
- draw_line(Vector2(total_w + draw_spacing, h), Vector2(total_w + draw_spacing + h, 0), Color(1, 1, 1, 0.6));
- }
-
- // Draw borders around color ramp if in focus.
- if (has_focus()) {
- draw_line(Vector2(-1, -1), Vector2(total_w + 1, -1), Color(1, 1, 1, 0.6));
- draw_line(Vector2(total_w + 1, -1), Vector2(total_w + 1, h + 1), Color(1, 1, 1, 0.6));
- draw_line(Vector2(total_w + 1, h + 1), Vector2(-1, h + 1), Color(1, 1, 1, 0.6));
- draw_line(Vector2(-1, -1), Vector2(-1, h + 1), Color(1, 1, 1, 0.6));
+ 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));
}
} break;
diff --git a/editor/plugins/gradient_editor.h b/editor/plugins/gradient_editor.h
index 816b539ba2..a8757573d5 100644
--- a/editor/plugins/gradient_editor.h
+++ b/editor/plugins/gradient_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gradient_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gradient_editor.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 GRADIENT_EDITOR_H
#define GRADIENT_EDITOR_H
@@ -53,10 +53,10 @@ class GradientEditor : public Control {
// Make sure to use the scaled value below.
const int BASE_SPACING = 3;
- const int BASE_POINT_WIDTH = 8;
+ const int BASE_HANDLE_WIDTH = 8;
int draw_spacing = BASE_SPACING;
- int draw_point_width = BASE_POINT_WIDTH;
+ int handle_width = BASE_HANDLE_WIDTH;
void _gradient_changed();
void _ramp_changed();
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 0f412aaefd..57a7f527ec 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gradient_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gradient_editor_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 "gradient_editor_plugin.h"
diff --git a/editor/plugins/gradient_editor_plugin.h b/editor/plugins/gradient_editor_plugin.h
index ab191d83e2..f6908f2cbd 100644
--- a/editor/plugins/gradient_editor_plugin.h
+++ b/editor/plugins/gradient_editor_plugin.h
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* gradient_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gradient_editor_plugin.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 GRADIENT_EDITOR_PLUGIN_H
#define GRADIENT_EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "gradient_editor.h"
diff --git a/editor/plugins/gradient_texture_2d_editor_plugin.cpp b/editor/plugins/gradient_texture_2d_editor_plugin.cpp
index dc01a52bb3..7bd159a5b8 100644
--- a/editor/plugins/gradient_texture_2d_editor_plugin.cpp
+++ b/editor/plugins/gradient_texture_2d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* gradient_texture_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gradient_texture_2d_editor_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 "gradient_texture_2d_editor_plugin.h"
@@ -55,6 +55,7 @@ void GradientTexture2DEditorRect::_update_fill_position() {
String property_name = handle == HANDLE_FILL_FROM ? "fill_from" : "fill_to";
+ 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());
@@ -121,13 +122,12 @@ void GradientTexture2DEditorRect::_notification(int p_what) {
Size2 rect_size = get_size();
// Get the size and position to draw the texture and handles at.
- size = Size2(texture->get_width() * rect_size.height / texture->get_height(), rect_size.height);
- if (size.width > rect_size.width) {
- size.width = rect_size.width;
- size.height = texture->get_height() * size.width / texture->get_width();
- }
- offset = ((rect_size - size + handle_size) / 2).round();
- size -= handle_size;
+ // Subtract handle sizes so they stay inside the preview, but keep the texture's aspect ratio.
+ Size2 available_size = rect_size - handle_size;
+ Size2 ratio = available_size / texture->get_size();
+ size = MIN(ratio.x, ratio.y) * texture->get_size();
+ offset = ((rect_size - size) / 2).round();
+
checkerboard->set_rect(Rect2(offset, size));
draw_set_transform(offset);
@@ -176,12 +176,11 @@ void GradientTexture2DEditorRect::_notification(int p_what) {
}
GradientTexture2DEditorRect::GradientTexture2DEditorRect() {
- undo_redo = EditorNode::get_undo_redo();
-
checkerboard = memnew(TextureRect);
checkerboard->set_stretch_mode(TextureRect::STRETCH_TILE);
+ checkerboard->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
checkerboard->set_draw_behind_parent(true);
- add_child(checkerboard);
+ add_child(checkerboard, false, INTERNAL_MODE_FRONT);
set_custom_minimum_size(Size2(0, 250 * EDSCALE));
}
@@ -189,6 +188,7 @@ GradientTexture2DEditorRect::GradientTexture2DEditorRect() {
///////////////////////
void GradientTexture2DEditor::_reverse_button_pressed() {
+ 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());
@@ -223,8 +223,6 @@ void GradientTexture2DEditor::_notification(int p_what) {
}
GradientTexture2DEditor::GradientTexture2DEditor() {
- undo_redo = EditorNode::get_undo_redo();
-
HFlowContainer *toolbar = memnew(HFlowContainer);
add_child(toolbar);
diff --git a/editor/plugins/gradient_texture_2d_editor_plugin.h b/editor/plugins/gradient_texture_2d_editor_plugin.h
index 9faf33152a..724ec63b4e 100644
--- a/editor/plugins/gradient_texture_2d_editor_plugin.h
+++ b/editor/plugins/gradient_texture_2d_editor_plugin.h
@@ -1,41 +1,40 @@
-/*************************************************************************/
-/* gradient_texture_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* gradient_texture_2d_editor_plugin.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 GRADIENT_TEXTURE_2D_EDITOR_PLUGIN_H
#define GRADIENT_TEXTURE_2D_EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "editor/editor_spin_slider.h"
-class EditorUndoRedoManager;
-
class GradientTexture2DEditorRect : public Control {
GDCLASS(GradientTexture2DEditorRect, Control);
@@ -46,7 +45,6 @@ class GradientTexture2DEditorRect : public Control {
};
Ref<GradientTexture2D> texture;
- Ref<EditorUndoRedoManager> undo_redo;
bool snap_enabled = false;
float snap_size = 0;
@@ -76,7 +74,6 @@ class GradientTexture2DEditor : public VBoxContainer {
GDCLASS(GradientTexture2DEditor, VBoxContainer);
Ref<GradientTexture2D> texture;
- Ref<EditorUndoRedoManager> undo_redo;
Button *reverse_button = nullptr;
Button *snap_button = nullptr;
diff --git a/editor/plugins/input_event_editor_plugin.cpp b/editor/plugins/input_event_editor_plugin.cpp
index 153eab32d2..be36447432 100644
--- a/editor/plugins/input_event_editor_plugin.cpp
+++ b/editor/plugins/input_event_editor_plugin.cpp
@@ -1,35 +1,38 @@
-/*************************************************************************/
-/* input_event_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* input_event_editor_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 "input_event_editor_plugin.h"
+#include "editor/event_listener_line_edit.h"
+#include "editor/input_event_configuration_dialog.h"
+
void InputEventConfigContainer::_bind_methods() {
}
@@ -63,13 +66,13 @@ void InputEventConfigContainer::set_event(const Ref<InputEvent> &p_event) {
Ref<InputEventJoypadMotion> jm = p_event;
if (k.is_valid()) {
- config_dialog->set_allowed_input_types(InputEventConfigurationDialog::InputType::INPUT_KEY);
+ config_dialog->set_allowed_input_types(INPUT_KEY);
} else if (m.is_valid()) {
- config_dialog->set_allowed_input_types(InputEventConfigurationDialog::InputType::INPUT_MOUSE_BUTTON);
+ config_dialog->set_allowed_input_types(INPUT_MOUSE_BUTTON);
} else if (jb.is_valid()) {
- config_dialog->set_allowed_input_types(InputEventConfigurationDialog::InputType::INPUT_JOY_BUTTON);
+ config_dialog->set_allowed_input_types(INPUT_JOY_BUTTON);
} else if (jm.is_valid()) {
- config_dialog->set_allowed_input_types(InputEventConfigurationDialog::InputType::INPUT_JOY_MOTION);
+ config_dialog->set_allowed_input_types(INPUT_JOY_MOTION);
}
input_event = p_event;
diff --git a/editor/plugins/input_event_editor_plugin.h b/editor/plugins/input_event_editor_plugin.h
index 344f176e78..779e59edd4 100644
--- a/editor/plugins/input_event_editor_plugin.h
+++ b/editor/plugins/input_event_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* input_event_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* input_event_editor_plugin.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 INPUT_EVENT_EDITOR_PLUGIN_H
#define INPUT_EVENT_EDITOR_PLUGIN_H
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp
index e7ef65c32b..429add4540 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -1,35 +1,38 @@
-/*************************************************************************/
-/* light_occluder_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* light_occluder_2d_editor_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 "light_occluder_2d_editor_plugin.h"
+#include "editor/editor_node.h"
+#include "editor/editor_undo_redo_manager.h"
+
Ref<OccluderPolygon2D> LightOccluder2DEditor::_ensure_occluder() const {
Ref<OccluderPolygon2D> occluder = node->get_occluder_polygon();
if (!occluder.is_valid()) {
@@ -81,6 +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();
+ 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);
}
@@ -94,6 +98,7 @@ void LightOccluder2DEditor::_create_resource() {
return;
}
+ 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/light_occluder_2d_editor_plugin.h b/editor/plugins/light_occluder_2d_editor_plugin.h
index aeee12b5b6..01c8a185b6 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.h
+++ b/editor/plugins/light_occluder_2d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* light_occluder_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* light_occluder_2d_editor_plugin.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 LIGHT_OCCLUDER_2D_EDITOR_PLUGIN_H
#define LIGHT_OCCLUDER_2D_EDITOR_PLUGIN_H
diff --git a/editor/plugins/lightmap_gi_editor_plugin.cpp b/editor/plugins/lightmap_gi_editor_plugin.cpp
index 8413c5e875..1adcc2a3b4 100644
--- a/editor/plugins/lightmap_gi_editor_plugin.cpp
+++ b/editor/plugins/lightmap_gi_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* lightmap_gi_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* lightmap_gi_editor_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 "lightmap_gi_editor_plugin.h"
diff --git a/editor/plugins/lightmap_gi_editor_plugin.h b/editor/plugins/lightmap_gi_editor_plugin.h
index a06f97fc94..1234438c8d 100644
--- a/editor/plugins/lightmap_gi_editor_plugin.h
+++ b/editor/plugins/lightmap_gi_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* lightmap_gi_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* lightmap_gi_editor_plugin.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 LIGHTMAP_GI_EDITOR_PLUGIN_H
#define LIGHTMAP_GI_EDITOR_PLUGIN_H
diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp
index 31053f90b8..0185617c36 100644
--- a/editor/plugins/line_2d_editor_plugin.cpp
+++ b/editor/plugins/line_2d_editor_plugin.cpp
@@ -1,35 +1,38 @@
-/*************************************************************************/
-/* line_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* line_2d_editor_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 "line_2d_editor_plugin.h"
+#include "editor/editor_node.h"
+#include "editor/editor_undo_redo_manager.h"
+
Node2D *Line2DEditor::_get_node() const {
return node;
}
@@ -51,9 +54,10 @@ 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();
- undo_redo->add_do_method(node, "set_points", p_polygon);
- undo_redo->add_undo_method(node, "set_points", p_previous);
+ Node2D *_node = _get_node();
+ 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);
}
Line2DEditor::Line2DEditor() {}
diff --git a/editor/plugins/line_2d_editor_plugin.h b/editor/plugins/line_2d_editor_plugin.h
index 0d407b3150..f91fec80dd 100644
--- a/editor/plugins/line_2d_editor_plugin.h
+++ b/editor/plugins/line_2d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* line_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* line_2d_editor_plugin.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 LINE_2D_EDITOR_PLUGIN_H
#define LINE_2D_EDITOR_PLUGIN_H
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index fe7713f175..36c143ca8d 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* material_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* material_editor_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 "material_editor_plugin.h"
@@ -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;
@@ -72,15 +72,15 @@ void MaterialEditor::_update_theme_item_cache() {
void MaterialEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- light_1_switch->set_normal_texture(theme_cache.light_1_on);
- light_1_switch->set_pressed_texture(theme_cache.light_1_off);
- light_2_switch->set_normal_texture(theme_cache.light_2_on);
- light_2_switch->set_pressed_texture(theme_cache.light_2_off);
-
- sphere_switch->set_normal_texture(theme_cache.sphere_off);
- sphere_switch->set_pressed_texture(theme_cache.sphere_on);
- box_switch->set_normal_texture(theme_cache.box_off);
- box_switch->set_pressed_texture(theme_cache.box_on);
+ light_1_switch->set_texture_normal(theme_cache.light_1_on);
+ light_1_switch->set_texture_pressed(theme_cache.light_1_off);
+ light_2_switch->set_texture_normal(theme_cache.light_2_on);
+ light_2_switch->set_texture_pressed(theme_cache.light_2_off);
+
+ sphere_switch->set_texture_normal(theme_cache.sphere_off);
+ sphere_switch->set_texture_pressed(theme_cache.sphere_on);
+ box_switch->set_texture_normal(theme_cache.box_off);
+ box_switch->set_texture_pressed(theme_cache.box_on);
} break;
case NOTIFICATION_DRAW: {
@@ -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/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index 8e64434d8b..63ee053b1d 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* material_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* material_editor_plugin.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 MATERIAL_EDITOR_PLUGIN_H
#define MATERIAL_EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "editor/plugins/editor_resource_conversion_plugin.h"
#include "scene/3d/camera_3d.h"
@@ -40,12 +41,14 @@
#include "scene/resources/material.h"
#include "scene/resources/primitive_meshes.h"
+class SubViewport;
class SubViewportContainer;
+class TextureButton;
class MaterialEditor : public Control {
GDCLASS(MaterialEditor, Control);
- Vector2 rot = Vector2();
+ Vector2 rot;
HBoxContainer *layout_2d = nullptr;
ColorRect *rect_instance = nullptr;
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index be26baaea5..ee555ae8d4 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -1,43 +1,45 @@
-/*************************************************************************/
-/* mesh_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* mesh_editor_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 "mesh_editor_plugin.h"
#include "core/config/project_settings.h"
#include "editor/editor_scale.h"
+#include "scene/gui/texture_button.h"
+#include "scene/main/viewport.h"
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) {
@@ -61,10 +63,10 @@ void MeshEditor::_update_theme_item_cache() {
void MeshEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- light_1_switch->set_normal_texture(theme_cache.light_1_on);
- light_1_switch->set_pressed_texture(theme_cache.light_1_off);
- light_2_switch->set_normal_texture(theme_cache.light_2_on);
- light_2_switch->set_pressed_texture(theme_cache.light_2_off);
+ light_1_switch->set_texture_normal(theme_cache.light_1_on);
+ light_1_switch->set_texture_pressed(theme_cache.light_1_off);
+ light_2_switch->set_texture_normal(theme_cache.light_2_on);
+ light_2_switch->set_texture_pressed(theme_cache.light_2_off);
} break;
}
}
diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h
index 6394cb1171..335244ffd2 100644
--- a/editor/plugins/mesh_editor_plugin.h
+++ b/editor/plugins/mesh_editor_plugin.h
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* mesh_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* mesh_editor_plugin.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 MESH_EDITOR_PLUGIN_H
#define MESH_EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/light_3d.h"
@@ -39,6 +40,9 @@
#include "scene/resources/camera_attributes.h"
#include "scene/resources/material.h"
+class SubViewport;
+class TextureButton;
+
class MeshEditor : public SubViewportContainer {
GDCLASS(MeshEditor, SubViewportContainer);
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index c502d47669..e8976667dd 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* mesh_instance_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* mesh_instance_3d_editor_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 "mesh_instance_3d_editor_plugin.h"
@@ -38,6 +38,10 @@
#include "scene/3d/navigation_region_3d.h"
#include "scene/3d/physics_body_3d.h"
#include "scene/gui/box_container.h"
+#include "scene/gui/menu_button.h"
+#include "scene/resources/concave_polygon_shape_3d.h"
+#include "scene/resources/convex_polygon_shape_3d.h"
+#include "scene/scene_string_names.h"
void MeshInstance3DEditor::_node_removed(Node *p_node) {
if (p_node == node) {
@@ -61,12 +65,12 @@ 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();
if (selection.is_empty()) {
- Ref<Shape3D> shape = mesh->create_trimesh_shape();
+ Ref<ConcavePolygonShape3D> shape = mesh->create_trimesh_shape();
if (shape.is_null()) {
err_dialog->set_text(TTR("Couldn't create a Trimesh collision shape."));
err_dialog->popup_centered();
@@ -84,8 +88,8 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
ur->add_do_method(node, "add_child", body, true);
ur->add_do_method(body, "set_owner", owner);
ur->add_do_method(cshape, "set_owner", owner);
- ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", body);
- ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, body);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
ur->add_do_reference(body);
ur->add_undo_method(node, "remove_child", body);
ur->commit_action();
@@ -105,7 +109,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
continue;
}
- Ref<Shape3D> shape = m->create_trimesh_shape();
+ Ref<ConcavePolygonShape3D> shape = m->create_trimesh_shape();
if (shape.is_null()) {
continue;
}
@@ -120,8 +124,8 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
ur->add_do_method(instance, "add_child", body, true);
ur->add_do_method(body, "set_owner", owner);
ur->add_do_method(cshape, "set_owner", owner);
- ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", body);
- ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, body);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
ur->add_do_reference(body);
ur->add_undo_method(instance, "remove_child", body);
}
@@ -137,7 +141,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
return;
}
- Ref<Shape3D> shape = mesh->create_trimesh_shape();
+ Ref<ConcavePolygonShape3D> shape = mesh->create_trimesh_shape();
if (shape.is_null()) {
return;
}
@@ -148,14 +152,14 @@ 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"));
ur->add_do_method(node->get_parent(), "add_child", cshape, true);
ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1);
ur->add_do_method(cshape, "set_owner", owner);
- ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
ur->add_do_reference(cshape);
ur->add_undo_method(node->get_parent(), "remove_child", cshape);
ur->commit_action();
@@ -171,14 +175,14 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
bool simplify = (p_option == MENU_OPTION_CREATE_SIMPLIFIED_CONVEX_COLLISION_SHAPE);
- Ref<Shape3D> shape = mesh->create_convex_shape(true, simplify);
+ Ref<ConvexPolygonShape3D> shape = mesh->create_convex_shape(true, simplify);
if (shape.is_null()) {
err_dialog->set_text(TTR("Couldn't create a single convex collision shape."));
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"));
@@ -195,7 +199,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
ur->add_do_method(node->get_parent(), "add_child", cshape, true);
ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1);
ur->add_do_method(cshape, "set_owner", owner);
- ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
ur->add_do_reference(cshape);
ur->add_undo_method(node->get_parent(), "remove_child", cshape);
@@ -218,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"));
@@ -234,7 +238,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
ur->add_do_method(node->get_parent(), "add_child", cshape);
ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1);
ur->add_do_method(cshape, "set_owner", owner);
- ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
ur->add_do_reference(cshape);
ur->add_undo_method(node->get_parent(), "remove_child", cshape);
}
@@ -255,12 +259,12 @@ 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);
ur->add_do_method(nmi, "set_owner", owner);
- ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", nmi);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, nmi);
ur->add_do_reference(nmi);
ur->add_undo_method(node, "remove_child", nmi);
@@ -270,6 +274,24 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
case MENU_OPTION_CREATE_OUTLINE_MESH: {
outline_dialog->popup_centered(Vector2(200, 90));
} break;
+ case MENU_OPTION_CREATE_DEBUG_TANGENTS: {
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
+ ur->create_action(TTR("Create Debug Tangents"));
+
+ MeshInstance3D *tangents = node->create_debug_tangents_node();
+
+ if (tangents) {
+ Node *owner = get_tree()->get_edited_scene_root();
+
+ ur->add_do_reference(tangents);
+ ur->add_do_method(node, "add_child", tangents, true);
+ ur->add_do_method(tangents, "set_owner", owner);
+
+ ur->add_undo_method(node, "remove_child", tangents);
+ }
+
+ ur->commit_action();
+ } break;
case MENU_OPTION_CREATE_UV2: {
Ref<ArrayMesh> mesh2 = node->get_mesh();
if (!mesh2.is_valid()) {
@@ -312,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);
@@ -438,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() {
@@ -471,13 +493,13 @@ 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"));
ur->add_do_method(node, "add_child", mi, true);
ur->add_do_method(mi, "set_owner", owner);
- ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", mi);
+ ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, mi);
ur->add_do_reference(mi);
ur->add_undo_method(node, "remove_child", mi);
@@ -511,6 +533,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Create Outline Mesh..."), MENU_OPTION_CREATE_OUTLINE_MESH);
options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a static outline mesh. The outline mesh will have its normals flipped automatically.\nThis can be used instead of the StandardMaterial Grow property when using that property isn't possible."));
+ options->get_popup()->add_item(TTR("Create Debug Tangents"), MENU_OPTION_CREATE_DEBUG_TANGENTS);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("View UV1"), MENU_OPTION_DEBUG_UV1);
options->get_popup()->add_item(TTR("View UV2"), MENU_OPTION_DEBUG_UV2);
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.h b/editor/plugins/mesh_instance_3d_editor_plugin.h
index 7968176744..aa72d4fa33 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.h
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* mesh_instance_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* mesh_instance_3d_editor_plugin.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 MESH_INSTANCE_3D_EDITOR_PLUGIN_H
#define MESH_INSTANCE_3D_EDITOR_PLUGIN_H
@@ -35,6 +35,10 @@
#include "scene/3d/mesh_instance_3d.h"
#include "scene/gui/spin_box.h"
+class AcceptDialog;
+class ConfirmationDialog;
+class MenuButton;
+
class MeshInstance3DEditor : public Control {
GDCLASS(MeshInstance3DEditor, Control);
@@ -46,6 +50,7 @@ class MeshInstance3DEditor : public Control {
MENU_OPTION_CREATE_MULTIPLE_CONVEX_COLLISION_SHAPES,
MENU_OPTION_CREATE_NAVMESH,
MENU_OPTION_CREATE_OUTLINE_MESH,
+ MENU_OPTION_CREATE_DEBUG_TANGENTS,
MENU_OPTION_CREATE_UV2,
MENU_OPTION_DEBUG_UV1,
MENU_OPTION_DEBUG_UV2,
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index 420ebe5942..2981862291 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -1,43 +1,45 @@
-/*************************************************************************/
-/* mesh_library_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* mesh_library_editor_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 "mesh_library_editor_plugin.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
+#include "editor/inspector_dock.h"
#include "main/main.h"
#include "node_3d_editor_plugin.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/3d/navigation_region_3d.h"
#include "scene/3d/physics_body_3d.h"
+#include "scene/gui/menu_button.h"
#include "scene/main/window.h"
#include "scene/resources/packed_scene.h"
@@ -158,23 +160,23 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
p_library->set_item_shapes(id, collisions);
- Ref<NavigationMesh> navmesh;
- Transform3D navmesh_transform;
+ Ref<NavigationMesh> navigation_mesh;
+ Transform3D navigation_mesh_transform;
for (int j = 0; j < mi->get_child_count(); j++) {
Node *child2 = mi->get_child(j);
if (!Object::cast_to<NavigationRegion3D>(child2)) {
continue;
}
NavigationRegion3D *sb = Object::cast_to<NavigationRegion3D>(child2);
- navmesh = sb->get_navigation_mesh();
- navmesh_transform = sb->get_transform();
- if (!navmesh.is_null()) {
+ navigation_mesh = sb->get_navigation_mesh();
+ navigation_mesh_transform = sb->get_transform();
+ if (!navigation_mesh.is_null()) {
break;
}
}
- if (!navmesh.is_null()) {
- p_library->set_item_navmesh(id, navmesh);
- p_library->set_item_navmesh_transform(id, navmesh_transform);
+ if (!navigation_mesh.is_null()) {
+ p_library->set_item_navigation_mesh(id, navigation_mesh);
+ p_library->set_item_navigation_mesh_transform(id, navigation_mesh_transform);
}
}
@@ -191,7 +193,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
}
}
- Vector<Ref<Texture2D>> textures = EditorInterface::get_singleton()->make_mesh_previews(meshes, &transforms, EditorSettings::get_singleton()->get("editors/grid_map/preview_size"));
+ Vector<Ref<Texture2D>> textures = EditorInterface::get_singleton()->make_mesh_previews(meshes, &transforms, EDITOR_GET("editors/grid_map/preview_size"));
int j = 0;
for (int i = 0; i < ids.size(); i++) {
if (mesh_instances.find(ids[i])) {
diff --git a/editor/plugins/mesh_library_editor_plugin.h b/editor/plugins/mesh_library_editor_plugin.h
index f4b4288a5f..c0900c8f35 100644
--- a/editor/plugins/mesh_library_editor_plugin.h
+++ b/editor/plugins/mesh_library_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* mesh_library_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* mesh_library_editor_plugin.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 MESH_LIBRARY_EDITOR_PLUGIN_H
#define MESH_LIBRARY_EDITOR_PLUGIN_H
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index b0e206b020..9845e8a9c3 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* multimesh_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* multimesh_editor_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 "multimesh_editor_plugin.h"
@@ -35,6 +35,8 @@
#include "node_3d_editor_plugin.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/gui/box_container.h"
+#include "scene/gui/menu_button.h"
+#include "scene/gui/option_button.h"
void MultiMeshEditor::_node_removed(Node *p_node) {
if (p_node == node) {
diff --git a/editor/plugins/multimesh_editor_plugin.h b/editor/plugins/multimesh_editor_plugin.h
index 5773989d0d..b21a932809 100644
--- a/editor/plugins/multimesh_editor_plugin.h
+++ b/editor/plugins/multimesh_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* multimesh_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* multimesh_editor_plugin.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 MULTIMESH_EDITOR_PLUGIN_H
#define MULTIMESH_EDITOR_PLUGIN_H
@@ -36,6 +36,10 @@
#include "scene/gui/slider.h"
#include "scene/gui/spin_box.h"
+class AcceptDialog;
+class ConfirmationDialog;
+class MenuButton;
+class OptionButton;
class SceneTreeDialog;
class MultiMeshEditor : public Control {
diff --git a/editor/plugins/navigation_link_2d_editor_plugin.cpp b/editor/plugins/navigation_link_2d_editor_plugin.cpp
index b72f639fbf..21a1d839f0 100644
--- a/editor/plugins/navigation_link_2d_editor_plugin.cpp
+++ b/editor/plugins/navigation_link_2d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* navigation_link_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* navigation_link_2d_editor_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 "navigation_link_2d_editor_plugin.h"
@@ -85,6 +85,7 @@ bool NavigationLink2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
end_grabbed = false;
}
} else {
+ 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());
@@ -165,10 +166,6 @@ void NavigationLink2DEditor::edit(NavigationLink2D *p_node) {
canvas_item_editor->update_viewport();
}
-NavigationLink2DEditor::NavigationLink2DEditor() {
- undo_redo = EditorNode::get_undo_redo();
-}
-
///////////////////////
void NavigationLink2DEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/navigation_link_2d_editor_plugin.h b/editor/plugins/navigation_link_2d_editor_plugin.h
index 0a3d9b8810..76444403d0 100644
--- a/editor/plugins/navigation_link_2d_editor_plugin.h
+++ b/editor/plugins/navigation_link_2d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* navigation_link_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* navigation_link_2d_editor_plugin.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 NAVIGATION_LINK_2D_EDITOR_PLUGIN_H
#define NAVIGATION_LINK_2D_EDITOR_PLUGIN_H
@@ -35,12 +35,10 @@
#include "scene/2d/navigation_link_2d.h"
class CanvasItemEditor;
-class EditorUndoRedoManager;
class NavigationLink2DEditor : public Control {
GDCLASS(NavigationLink2DEditor, Control);
- Ref<EditorUndoRedoManager> undo_redo;
CanvasItemEditor *canvas_item_editor = nullptr;
NavigationLink2D *node = nullptr;
@@ -58,8 +56,6 @@ public:
bool forward_canvas_gui_input(const Ref<InputEvent> &p_event);
void forward_canvas_draw_over_viewport(Control *p_overlay);
void edit(NavigationLink2D *p_node);
-
- NavigationLink2DEditor();
};
class NavigationLink2DEditorPlugin : public EditorPlugin {
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index 8f3553b8cf..957a520d8a 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -1,35 +1,38 @@
-/*************************************************************************/
-/* navigation_polygon_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* navigation_polygon_editor_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 "navigation_polygon_editor_plugin.h"
+#include "editor/editor_node.h"
+#include "editor/editor_undo_redo_manager.h"
+
Ref<NavigationPolygon> NavigationPolygonEditor::_ensure_navpoly() const {
Ref<NavigationPolygon> navpoly = node->get_navigation_polygon();
if (!navpoly.is_valid()) {
@@ -73,6 +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();
+ 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");
@@ -81,6 +85,7 @@ void NavigationPolygonEditor::_action_add_polygon(const Variant &p_polygon) {
void NavigationPolygonEditor::_action_remove_polygon(int p_idx) {
Ref<NavigationPolygon> navpoly = _ensure_navpoly();
+ 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");
@@ -89,6 +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();
+ 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");
@@ -104,6 +110,7 @@ void NavigationPolygonEditor::_create_resource() {
return;
}
+ 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/navigation_polygon_editor_plugin.h b/editor/plugins/navigation_polygon_editor_plugin.h
index 239da88ba2..f43c052dd3 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/editor/plugins/navigation_polygon_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* navigation_polygon_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* navigation_polygon_editor_plugin.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 NAVIGATION_POLYGON_EDITOR_PLUGIN_H
#define NAVIGATION_POLYGON_EDITOR_PLUGIN_H
diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp
index ec6ea7f39b..bb71c27bff 100644
--- a/editor/plugins/node_3d_editor_gizmos.cpp
+++ b/editor/plugins/node_3d_editor_gizmos.cpp
@@ -1,35 +1,36 @@
-/*************************************************************************/
-/* node_3d_editor_gizmos.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* node_3d_editor_gizmos.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 "node_3d_editor_gizmos.h"
+#include "core/config/project_settings.h"
#include "core/math/convex_hull.h"
#include "core/math/geometry_2d.h"
#include "core/math/geometry_3d.h"
@@ -99,6 +100,7 @@ bool EditorNode3DGizmo::is_editable() const {
}
void EditorNode3DGizmo::clear() {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
for (int i = 0; i < instances.size(); i++) {
if (instances[i].instance.is_valid()) {
RS::get_singleton()->free(instances[i].instance);
@@ -110,7 +112,9 @@ void EditorNode3DGizmo::clear() {
collision_mesh = Ref<TriangleMesh>();
instances.clear();
handles.clear();
+ handle_ids.clear();
secondary_handles.clear();
+ secondary_handle_ids.clear();
}
void EditorNode3DGizmo::redraw() {
@@ -231,7 +235,7 @@ void EditorNode3DGizmo::commit_subgizmos(const Vector<int> &p_ids, const Vector<
gizmo_plugin->commit_subgizmos(this, p_ids, p_restore, p_cancel);
}
-void EditorNode3DGizmo::set_spatial_node(Node3D *p_node) {
+void EditorNode3DGizmo::set_node_3d(Node3D *p_node) {
ERR_FAIL_NULL(p_node);
spatial_node = p_node;
}
@@ -406,12 +410,15 @@ void EditorNode3DGizmo::add_handles(const Vector<Vector3> &p_handles, const Ref<
return;
}
- ERR_FAIL_COND(!spatial_node);
+ ERR_FAIL_NULL(spatial_node);
+
+ Vector<Vector3> &handle_list = p_secondary ? secondary_handles : handles;
+ Vector<int> &id_list = p_secondary ? secondary_handle_ids : handle_ids;
if (p_ids.is_empty()) {
- ERR_FAIL_COND_MSG((!handles.is_empty() && !handle_ids.is_empty()) || (!secondary_handles.is_empty() && !secondary_handle_ids.is_empty()), "Fail");
+ ERR_FAIL_COND_MSG(!id_list.is_empty(), "IDs must be provided for all handles, as handles with IDs already exist.");
} else {
- ERR_FAIL_COND_MSG(handles.size() != handle_ids.size() || secondary_handles.size() != secondary_handle_ids.size(), "Fail");
+ ERR_FAIL_COND_MSG(p_handles.size() != p_ids.size(), "The number of IDs should be the same as the number of handles.");
}
bool is_current_hover_gizmo = Node3DEditor::get_singleton()->get_current_hover_gizmo() == this;
@@ -464,19 +471,17 @@ void EditorNode3DGizmo::add_handles(const Vector<Vector3> &p_handles, const Ref<
}
instances.push_back(ins);
- Vector<Vector3> &h = p_secondary ? secondary_handles : handles;
- int current_size = h.size();
- h.resize(current_size + p_handles.size());
+ int current_size = handle_list.size();
+ handle_list.resize(current_size + p_handles.size());
for (int i = 0; i < p_handles.size(); i++) {
- h.write[current_size + i] = p_handles[i];
+ handle_list.write[current_size + i] = p_handles[i];
}
if (!p_ids.is_empty()) {
- Vector<int> &ids = p_secondary ? secondary_handle_ids : handle_ids;
- current_size = ids.size();
- ids.resize(current_size + p_ids.size());
+ current_size = id_list.size();
+ id_list.resize(current_size + p_ids.size());
for (int i = 0; i < p_ids.size(); i++) {
- ids.write[current_size + i] = p_ids[i];
+ id_list.write[current_size + i] = p_ids[i];
}
}
}
@@ -805,6 +810,7 @@ void EditorNode3DGizmo::transform() {
}
void EditorNode3DGizmo::free() {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
ERR_FAIL_COND(!spatial_node);
ERR_FAIL_COND(!valid);
@@ -839,8 +845,8 @@ void EditorNode3DGizmo::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_collision_triangles", "triangles"), &EditorNode3DGizmo::add_collision_triangles);
ClassDB::bind_method(D_METHOD("add_unscaled_billboard", "material", "default_scale", "modulate"), &EditorNode3DGizmo::add_unscaled_billboard, DEFVAL(1), DEFVAL(Color(1, 1, 1)));
ClassDB::bind_method(D_METHOD("add_handles", "handles", "material", "ids", "billboard", "secondary"), &EditorNode3DGizmo::add_handles, DEFVAL(false), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("set_spatial_node", "node"), &EditorNode3DGizmo::_set_spatial_node);
- ClassDB::bind_method(D_METHOD("get_spatial_node"), &EditorNode3DGizmo::get_spatial_node);
+ ClassDB::bind_method(D_METHOD("set_node_3d", "node"), &EditorNode3DGizmo::_set_node_3d);
+ ClassDB::bind_method(D_METHOD("get_node_3d"), &EditorNode3DGizmo::get_node_3d);
ClassDB::bind_method(D_METHOD("get_plugin"), &EditorNode3DGizmo::get_plugin);
ClassDB::bind_method(D_METHOD("clear"), &EditorNode3DGizmo::clear);
ClassDB::bind_method(D_METHOD("set_hidden", "hidden"), &EditorNode3DGizmo::set_hidden);
@@ -1012,8 +1018,9 @@ Ref<StandardMaterial3D> EditorNode3DGizmoPlugin::get_material(const String &p_na
}
String EditorNode3DGizmoPlugin::get_gizmo_name() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_gizmo_name")) {
- return get_script_instance()->call("_get_gizmo_name");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_gizmo_name, ret)) {
+ return ret;
}
WARN_PRINT_ONCE("A 3D editor gizmo has no name defined (it will appear as \"Unnamed Gizmo\" in the \"View > Gizmos\" menu). To resolve this, override the `_get_gizmo_name()` function to return a String in the script that extends EditorNode3DGizmoPlugin.");
@@ -1021,8 +1028,9 @@ String EditorNode3DGizmoPlugin::get_gizmo_name() const {
}
int EditorNode3DGizmoPlugin::get_priority() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_priority")) {
- return get_script_instance()->call("_get_priority");
+ int ret;
+ if (GDVIRTUAL_CALL(_get_priority, ret)) {
+ return ret;
}
return 0;
}
@@ -1039,7 +1047,7 @@ Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::get_gizmo(Node3D *p_spatial) {
}
ref->set_plugin(this);
- ref->set_spatial_node(p_spatial);
+ ref->set_node_3d(p_spatial);
ref->set_hidden(current_state == HIDDEN);
current_gizmos.push_back(ref.ptr());
@@ -1078,11 +1086,9 @@ void EditorNode3DGizmoPlugin::_bind_methods() {
}
bool EditorNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
- bool success;
- if (GDVIRTUAL_CALL(_has_gizmo, p_spatial, success)) {
- return success;
- }
- return false;
+ bool success = false;
+ GDVIRTUAL_CALL(_has_gizmo, p_spatial, success);
+ return success;
}
Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::create_gizmo(Node3D *p_spatial) {
@@ -1099,19 +1105,15 @@ Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::create_gizmo(Node3D *p_spatial)
}
bool EditorNode3DGizmoPlugin::can_be_hidden() const {
- bool ret;
- if (GDVIRTUAL_CALL(_can_be_hidden, ret)) {
- return ret;
- }
- return true;
+ bool ret = true;
+ GDVIRTUAL_CALL(_can_be_hidden, ret);
+ return ret;
}
bool EditorNode3DGizmoPlugin::is_selectable_when_hidden() const {
- bool ret;
- if (GDVIRTUAL_CALL(_is_selectable_when_hidden, ret)) {
- return ret;
- }
- return false;
+ bool ret = false;
+ GDVIRTUAL_CALL(_is_selectable_when_hidden, ret);
+ return ret;
}
void EditorNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
@@ -1119,27 +1121,21 @@ void EditorNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
bool EditorNode3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- bool ret;
- if (GDVIRTUAL_CALL(_is_handle_highlighted, Ref<EditorNode3DGizmo>(p_gizmo), p_id, p_secondary, ret)) {
- return ret;
- }
- return false;
+ bool ret = false;
+ GDVIRTUAL_CALL(_is_handle_highlighted, Ref<EditorNode3DGizmo>(p_gizmo), p_id, p_secondary, ret);
+ return ret;
}
String EditorNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
String ret;
- if (GDVIRTUAL_CALL(_get_handle_name, Ref<EditorNode3DGizmo>(p_gizmo), p_id, p_secondary, ret)) {
- return ret;
- }
- return "";
+ GDVIRTUAL_CALL(_get_handle_name, Ref<EditorNode3DGizmo>(p_gizmo), p_id, p_secondary, ret);
+ return ret;
}
Variant EditorNode3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
Variant ret;
- if (GDVIRTUAL_CALL(_get_handle_value, Ref<EditorNode3DGizmo>(p_gizmo), p_id, p_secondary, ret)) {
- return ret;
- }
- return Variant();
+ GDVIRTUAL_CALL(_get_handle_value, Ref<EditorNode3DGizmo>(p_gizmo), p_id, p_secondary, ret);
+ return ret;
}
void EditorNode3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
@@ -1151,34 +1147,26 @@ void EditorNode3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, in
}
int EditorNode3DGizmoPlugin::subgizmos_intersect_ray(const EditorNode3DGizmo *p_gizmo, Camera3D *p_camera, const Vector2 &p_point) const {
- int ret;
- if (GDVIRTUAL_CALL(_subgizmos_intersect_ray, Ref<EditorNode3DGizmo>(p_gizmo), p_camera, p_point, ret)) {
- return ret;
- }
- return -1;
+ int ret = -1;
+ GDVIRTUAL_CALL(_subgizmos_intersect_ray, Ref<EditorNode3DGizmo>(p_gizmo), p_camera, p_point, ret);
+ return ret;
}
Vector<int> EditorNode3DGizmoPlugin::subgizmos_intersect_frustum(const EditorNode3DGizmo *p_gizmo, const Camera3D *p_camera, const Vector<Plane> &p_frustum) const {
- TypedArray<Transform3D> frustum;
+ TypedArray<Plane> frustum;
frustum.resize(p_frustum.size());
for (int i = 0; i < p_frustum.size(); i++) {
frustum[i] = p_frustum[i];
}
Vector<int> ret;
- if (GDVIRTUAL_CALL(_subgizmos_intersect_frustum, Ref<EditorNode3DGizmo>(p_gizmo), p_camera, frustum, ret)) {
- return ret;
- }
-
- return Vector<int>();
+ GDVIRTUAL_CALL(_subgizmos_intersect_frustum, Ref<EditorNode3DGizmo>(p_gizmo), p_camera, frustum, ret);
+ return ret;
}
Transform3D EditorNode3DGizmoPlugin::get_subgizmo_transform(const EditorNode3DGizmo *p_gizmo, int p_id) const {
Transform3D ret;
- if (GDVIRTUAL_CALL(_get_subgizmo_transform, Ref<EditorNode3DGizmo>(p_gizmo), p_id, ret)) {
- return ret;
- }
-
- return Transform3D();
+ GDVIRTUAL_CALL(_get_subgizmo_transform, Ref<EditorNode3DGizmo>(p_gizmo), p_id, ret);
+ return ret;
}
void EditorNode3DGizmoPlugin::set_subgizmo_transform(const EditorNode3DGizmo *p_gizmo, int p_id, Transform3D p_transform) {
@@ -1217,7 +1205,7 @@ EditorNode3DGizmoPlugin::EditorNode3DGizmoPlugin() {
EditorNode3DGizmoPlugin::~EditorNode3DGizmoPlugin() {
for (int i = 0; i < current_gizmos.size(); ++i) {
current_gizmos[i]->set_plugin(nullptr);
- current_gizmos[i]->get_spatial_node()->remove_gizmo(current_gizmos[i]);
+ current_gizmos[i]->get_node_3d()->remove_gizmo(current_gizmos[i]);
}
if (Node3DEditor::get_singleton()) {
Node3DEditor::get_singleton()->update_all_gizmos();
@@ -1261,7 +1249,7 @@ String Light3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int
}
Variant Light3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
+ Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_node_3d());
if (p_id == 0) {
return light->get_param(Light3D::PARAM_RANGE);
}
@@ -1300,7 +1288,7 @@ static float _find_closest_angle_to_half_pi_arc(const Vector3 &p_from, const Vec
}
void Light3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
+ Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_node_3d());
Transform3D gt = light->get_global_transform();
Transform3D gi = gt.affine_inverse();
@@ -1344,18 +1332,18 @@ void Light3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id,
}
void Light3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
+ Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_node_3d());
if (p_cancel) {
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);
@@ -1364,7 +1352,7 @@ void Light3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_i
}
void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_spatial_node());
+ Light3D *light = Object::cast_to<Light3D>(p_gizmo->get_node_3d());
Color color = light->get_color().srgb_to_linear() * light->get_correlated_color().srgb_to_linear();
color = color.linear_to_srgb();
@@ -1526,12 +1514,12 @@ String AudioStreamPlayer3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *
}
Variant AudioStreamPlayer3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
+ AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_node_3d());
return player->get_emission_angle();
}
void AudioStreamPlayer3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
+ AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_node_3d());
Transform3D gt = player->get_global_transform();
Transform3D gi = gt.affine_inverse();
@@ -1568,13 +1556,13 @@ void AudioStreamPlayer3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo
}
void AudioStreamPlayer3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
+ AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_node_3d());
if (p_cancel) {
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);
@@ -1583,7 +1571,7 @@ void AudioStreamPlayer3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gi
}
void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- const AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_spatial_node());
+ const AudioStreamPlayer3D *player = Object::cast_to<AudioStreamPlayer3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -1749,6 +1737,24 @@ Camera3DGizmoPlugin::Camera3DGizmoPlugin() {
create_handle_material("handles");
}
+Size2i Camera3DGizmoPlugin::_get_viewport_size(Camera3D *p_camera) {
+ Viewport *viewport = p_camera->get_viewport();
+
+ Window *window = Object::cast_to<Window>(viewport);
+ if (window) {
+ return window->get_size();
+ }
+
+ SubViewport *sub_viewport = Object::cast_to<SubViewport>(viewport);
+ ERR_FAIL_NULL_V(sub_viewport, Size2i());
+
+ if (sub_viewport == EditorNode::get_singleton()->get_scene_root()) {
+ return Size2(GLOBAL_GET("display/window/size/viewport_width"), GLOBAL_GET("display/window/size/viewport_height"));
+ }
+
+ return sub_viewport->get_size();
+}
+
bool Camera3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
return Object::cast_to<Camera3D>(p_spatial) != nullptr;
}
@@ -1762,7 +1768,7 @@ int Camera3DGizmoPlugin::get_priority() const {
}
String Camera3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
+ Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_node_3d());
if (camera->get_projection() == Camera3D::PROJECTION_PERSPECTIVE) {
return "FOV";
@@ -1772,7 +1778,7 @@ String Camera3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, in
}
Variant Camera3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
+ Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_node_3d());
if (camera->get_projection() == Camera3D::PROJECTION_PERSPECTIVE) {
return camera->get_fov();
@@ -1782,7 +1788,7 @@ Variant Camera3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo,
}
void Camera3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
+ Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_node_3d());
Transform3D gt = camera->get_global_transform();
Transform3D gi = gt.affine_inverse();
@@ -1811,13 +1817,13 @@ void Camera3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id,
}
void Camera3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
+ Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_node_3d());
if (camera->get_projection() == Camera3D::PROJECTION_PERSPECTIVE) {
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);
@@ -1828,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);
@@ -1838,7 +1844,7 @@ void Camera3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_
}
void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_spatial_node());
+ Camera3D *camera = Object::cast_to<Camera3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -1847,6 +1853,10 @@ void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Ref<Material> material = get_material("camera_material", p_gizmo);
+ const Size2i viewport_size = _get_viewport_size(camera);
+ const real_t viewport_aspect = viewport_size.x > 0 && viewport_size.y > 0 ? viewport_size.aspect() : 1.0;
+ const Size2 size_factor = viewport_aspect > 1.0 ? Size2(1.0, 1.0 / viewport_aspect) : Size2(viewport_aspect, 1.0);
+
#define ADD_TRIANGLE(m_a, m_b, m_c) \
{ \
lines.push_back(m_a); \
@@ -1874,10 +1884,11 @@ void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
// The real FOV is halved for accurate representation
float fov = camera->get_fov() / 2.0;
- Vector3 side = Vector3(Math::sin(Math::deg_to_rad(fov)), 0, -Math::cos(Math::deg_to_rad(fov)));
- Vector3 nside = side;
- nside.x = -nside.x;
- Vector3 up = Vector3(0, side.x, 0);
+ const float hsize = Math::sin(Math::deg_to_rad(fov));
+ const float depth = -Math::cos(Math::deg_to_rad(fov));
+ Vector3 side = Vector3(hsize * size_factor.x, 0, depth);
+ Vector3 nside = Vector3(-side.x, side.y, side.z);
+ Vector3 up = Vector3(0, hsize * size_factor.y, 0);
ADD_TRIANGLE(Vector3(), side + up, side - up);
ADD_TRIANGLE(Vector3(), nside + up, nside - up);
@@ -1885,18 +1896,18 @@ void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
ADD_TRIANGLE(Vector3(), side - up, nside - up);
handles.push_back(side);
- side.x *= 0.25;
- nside.x *= 0.25;
- Vector3 tup(0, up.y * 3 / 2, side.z);
+ side.x = MIN(side.x, hsize * 0.25);
+ nside.x = -side.x;
+ Vector3 tup(0, up.y + hsize / 2, side.z);
ADD_TRIANGLE(tup, side + up, nside + up);
-
} break;
+
case Camera3D::PROJECTION_ORTHOGONAL: {
float size = camera->get_size();
float hsize = size * 0.5;
- Vector3 right(hsize, 0, 0);
- Vector3 up(0, hsize, 0);
+ Vector3 right(hsize * size_factor.x, 0, 0);
+ Vector3 up(0, hsize * size_factor.y, 0);
Vector3 back(0, 0, -1.0);
Vector3 front(0, 0, 0);
@@ -1907,18 +1918,19 @@ void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
handles.push_back(right + back);
- right.x *= 0.25;
- Vector3 tup(0, up.y * 3 / 2, back.z);
+ right.x = MIN(right.x, hsize * 0.25);
+ Vector3 tup(0, up.y + hsize / 2, back.z);
ADD_TRIANGLE(tup, right + up + back, -right + up + back);
} break;
+
case Camera3D::PROJECTION_FRUSTUM: {
float hsize = camera->get_size() / 2.0;
Vector3 side = Vector3(hsize, 0, -camera->get_near()).normalized();
- Vector3 nside = side;
- nside.x = -nside.x;
- Vector3 up = Vector3(0, side.x, 0);
+ side.x *= size_factor.x;
+ Vector3 nside = Vector3(-side.x, side.y, side.z);
+ Vector3 up = Vector3(0, hsize * size_factor.y, 0);
Vector3 offset = Vector3(camera->get_frustum_offset().x, camera->get_frustum_offset().y, 0.0);
ADD_TRIANGLE(Vector3(), side + up + offset, side - up + offset);
@@ -1926,18 +1938,22 @@ void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
ADD_TRIANGLE(Vector3(), side + up + offset, nside + up + offset);
ADD_TRIANGLE(Vector3(), side - up + offset, nside - up + offset);
- side.x *= 0.25;
- nside.x *= 0.25;
- Vector3 tup(0, up.y * 3 / 2, side.z);
+ side.x = MIN(side.x, hsize * 0.25);
+ nside.x = -side.x;
+ Vector3 tup(0, up.y + hsize / 2, side.z);
ADD_TRIANGLE(tup + offset, side + up + offset, nside + up + offset);
- }
+ } break;
}
#undef ADD_TRIANGLE
#undef ADD_QUAD
p_gizmo->add_lines(lines, material);
- p_gizmo->add_handles(handles, get_material("handles"));
+ p_gizmo->add_collision_segments(lines);
+
+ if (!handles.is_empty()) {
+ p_gizmo->add_handles(handles, get_material("handles"));
+ }
}
//////
@@ -1962,7 +1978,7 @@ bool MeshInstance3DGizmoPlugin::can_be_hidden() const {
}
void MeshInstance3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- MeshInstance3D *mesh = Object::cast_to<MeshInstance3D>(p_gizmo->get_spatial_node());
+ MeshInstance3D *mesh = Object::cast_to<MeshInstance3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -1998,7 +2014,7 @@ int OccluderInstance3DGizmoPlugin::get_priority() const {
}
String OccluderInstance3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- const OccluderInstance3D *cs = Object::cast_to<OccluderInstance3D>(p_gizmo->get_spatial_node());
+ const OccluderInstance3D *cs = Object::cast_to<OccluderInstance3D>(p_gizmo->get_node_3d());
Ref<Occluder3D> o = cs->get_occluder();
if (o.is_null()) {
@@ -2017,7 +2033,7 @@ String OccluderInstance3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p
}
Variant OccluderInstance3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- OccluderInstance3D *oi = Object::cast_to<OccluderInstance3D>(p_gizmo->get_spatial_node());
+ OccluderInstance3D *oi = Object::cast_to<OccluderInstance3D>(p_gizmo->get_node_3d());
Ref<Occluder3D> o = oi->get_occluder();
if (o.is_null()) {
@@ -2043,7 +2059,7 @@ Variant OccluderInstance3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo
}
void OccluderInstance3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- OccluderInstance3D *oi = Object::cast_to<OccluderInstance3D>(p_gizmo->get_spatial_node());
+ OccluderInstance3D *oi = Object::cast_to<OccluderInstance3D>(p_gizmo->get_node_3d());
Ref<Occluder3D> o = oi->get_occluder();
if (o.is_null()) {
@@ -2130,7 +2146,7 @@ void OccluderInstance3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo,
}
void OccluderInstance3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- OccluderInstance3D *oi = Object::cast_to<OccluderInstance3D>(p_gizmo->get_spatial_node());
+ OccluderInstance3D *oi = Object::cast_to<OccluderInstance3D>(p_gizmo->get_node_3d());
Ref<Occluder3D> o = oi->get_occluder();
if (o.is_null()) {
@@ -2144,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);
@@ -2158,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);
@@ -2172,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);
@@ -2181,7 +2197,7 @@ void OccluderInstance3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_giz
}
void OccluderInstance3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- OccluderInstance3D *occluder_instance = Object::cast_to<OccluderInstance3D>(p_gizmo->get_spatial_node());
+ OccluderInstance3D *occluder_instance = Object::cast_to<OccluderInstance3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -2250,7 +2266,7 @@ bool Sprite3DGizmoPlugin::can_be_hidden() const {
}
void Sprite3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- Sprite3D *sprite = Object::cast_to<Sprite3D>(p_gizmo->get_spatial_node());
+ Sprite3D *sprite = Object::cast_to<Sprite3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -2282,7 +2298,7 @@ bool Label3DGizmoPlugin::can_be_hidden() const {
}
void Label3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- Label3D *label = Object::cast_to<Label3D>(p_gizmo->get_spatial_node());
+ Label3D *label = Object::cast_to<Label3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -2296,10 +2312,10 @@ void Label3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Marker3DGizmoPlugin::Marker3DGizmoPlugin() {
pos3d_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
- cursor_points = Vector<Vector3>();
+ Vector<Vector3> cursor_points;
Vector<Color> cursor_colors;
- const float cs = 0.25;
+ const float cs = 1.0;
// Add more points to create a "hard stop" in the color gradient.
cursor_points.push_back(Vector3(+cs, 0, 0));
cursor_points.push_back(Vector3());
@@ -2367,9 +2383,22 @@ int Marker3DGizmoPlugin::get_priority() const {
}
void Marker3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+ const Marker3D *marker = Object::cast_to<Marker3D>(p_gizmo->get_node_3d());
+ const real_t extents = marker->get_gizmo_extents();
+ const Transform3D xform(Basis::from_scale(Vector3(extents, extents, extents)));
+
p_gizmo->clear();
- p_gizmo->add_mesh(pos3d_mesh);
- p_gizmo->add_collision_segments(cursor_points);
+ p_gizmo->add_mesh(pos3d_mesh, Ref<Material>(), xform);
+
+ const Vector<Vector3> points = {
+ Vector3(-extents, 0, 0),
+ Vector3(+extents, 0, 0),
+ Vector3(0, -extents, 0),
+ Vector3(0, +extents, 0),
+ Vector3(0, 0, -extents),
+ Vector3(0, 0, +extents),
+ };
+ p_gizmo->add_collision_segments(points);
}
////
@@ -2393,7 +2422,7 @@ int PhysicalBone3DGizmoPlugin::get_priority() const {
void PhysicalBone3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->clear();
- PhysicalBone3D *physical_bone = Object::cast_to<PhysicalBone3D>(p_gizmo->get_spatial_node());
+ PhysicalBone3D *physical_bone = Object::cast_to<PhysicalBone3D>(p_gizmo->get_node_3d());
if (!physical_bone) {
return;
@@ -2528,7 +2557,7 @@ int RayCast3DGizmoPlugin::get_priority() const {
}
void RayCast3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- RayCast3D *raycast = Object::cast_to<RayCast3D>(p_gizmo->get_spatial_node());
+ RayCast3D *raycast = Object::cast_to<RayCast3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -2566,7 +2595,7 @@ int ShapeCast3DGizmoPlugin::get_priority() const {
}
void ShapeCast3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- ShapeCast3D *shapecast = Object::cast_to<ShapeCast3D>(p_gizmo->get_spatial_node());
+ ShapeCast3D *shapecast = Object::cast_to<ShapeCast3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -2584,7 +2613,7 @@ void ShapeCast3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
/////
void SpringArm3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- SpringArm3D *spring_arm = Object::cast_to<SpringArm3D>(p_gizmo->get_spatial_node());
+ SpringArm3D *spring_arm = Object::cast_to<SpringArm3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -2636,7 +2665,7 @@ int VehicleWheel3DGizmoPlugin::get_priority() const {
}
void VehicleWheel3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- VehicleWheel3D *car_wheel = Object::cast_to<VehicleWheel3D>(p_gizmo->get_spatial_node());
+ VehicleWheel3D *car_wheel = Object::cast_to<VehicleWheel3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -2712,7 +2741,7 @@ bool SoftBody3DGizmoPlugin::is_selectable_when_hidden() const {
}
void SoftBody3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
+ SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -2753,17 +2782,17 @@ String SoftBody3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo,
}
Variant SoftBody3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
+ SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_node_3d());
return Variant(soft_body->is_point_pinned(p_id));
}
void SoftBody3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
+ SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_node_3d());
soft_body->pin_point_toggle(p_id);
}
bool SoftBody3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
+ SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_node_3d());
return soft_body->is_point_pinned(p_id);
}
@@ -2809,12 +2838,12 @@ String VisibleOnScreenNotifier3DGizmoPlugin::get_handle_name(const EditorNode3DG
}
Variant VisibleOnScreenNotifier3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_spatial_node());
+ VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_node_3d());
return notifier->get_aabb();
}
void VisibleOnScreenNotifier3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_spatial_node());
+ VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_node_3d());
Transform3D gt = notifier->get_global_transform();
@@ -2866,14 +2895,14 @@ void VisibleOnScreenNotifier3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p
}
void VisibleOnScreenNotifier3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_spatial_node());
+ VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_node_3d());
if (p_cancel) {
notifier->set_aabb(p_restore);
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);
@@ -2881,7 +2910,7 @@ void VisibleOnScreenNotifier3DGizmoPlugin::commit_handle(const EditorNode3DGizmo
}
void VisibleOnScreenNotifier3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_spatial_node());
+ VisibleOnScreenNotifier3D *notifier = Object::cast_to<VisibleOnScreenNotifier3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -3001,12 +3030,12 @@ String GPUParticles3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_giz
}
Variant GPUParticles3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node());
+ GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_node_3d());
return particles->get_visibility_aabb();
}
void GPUParticles3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node());
+ GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_node_3d());
Transform3D gt = particles->get_global_transform();
Transform3D gi = gt.affine_inverse();
@@ -3057,14 +3086,14 @@ void GPUParticles3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int
}
void GPUParticles3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node());
+ GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_node_3d());
if (p_cancel) {
particles->set_visibility_aabb(p_restore);
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);
@@ -3072,7 +3101,7 @@ void GPUParticles3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo,
}
void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_spatial_node());
+ GPUParticles3D *particles = Object::cast_to<GPUParticles3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -3148,7 +3177,7 @@ int GPUParticlesCollision3DGizmoPlugin::get_priority() const {
}
String GPUParticlesCollision3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- const Node3D *cs = p_gizmo->get_spatial_node();
+ const Node3D *cs = p_gizmo->get_node_3d();
if (Object::cast_to<GPUParticlesCollisionSphere3D>(cs) || Object::cast_to<GPUParticlesAttractorSphere3D>(cs)) {
return "Radius";
@@ -3162,21 +3191,21 @@ String GPUParticlesCollision3DGizmoPlugin::get_handle_name(const EditorNode3DGiz
}
Variant GPUParticlesCollision3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- const Node3D *cs = p_gizmo->get_spatial_node();
+ const Node3D *cs = p_gizmo->get_node_3d();
if (Object::cast_to<GPUParticlesCollisionSphere3D>(cs) || Object::cast_to<GPUParticlesAttractorSphere3D>(cs)) {
- return p_gizmo->get_spatial_node()->call("get_radius");
+ return p_gizmo->get_node_3d()->call("get_radius");
}
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_spatial_node()->call("get_extents"));
+ return Vector3(p_gizmo->get_node_3d()->call("get_extents"));
}
return Variant();
}
void GPUParticlesCollision3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- Node3D *sn = p_gizmo->get_spatial_node();
+ Node3D *sn = p_gizmo->get_node_3d();
Transform3D gt = sn->get_global_transform();
Transform3D gi = gt.affine_inverse();
@@ -3222,7 +3251,7 @@ void GPUParticlesCollision3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_g
}
void GPUParticlesCollision3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- Node3D *sn = p_gizmo->get_spatial_node();
+ Node3D *sn = p_gizmo->get_node_3d();
if (Object::cast_to<GPUParticlesCollisionSphere3D>(sn) || Object::cast_to<GPUParticlesAttractorSphere3D>(sn)) {
if (p_cancel) {
@@ -3230,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);
@@ -3243,7 +3272,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 Box Shape Extents"));
ur->add_do_method(sn, "set_extents", sn->call("get_extents"));
ur->add_undo_method(sn, "set_extents", p_restore);
@@ -3252,7 +3281,7 @@ void GPUParticlesCollision3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *
}
void GPUParticlesCollision3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- Node3D *cs = p_gizmo->get_spatial_node();
+ Node3D *cs = p_gizmo->get_node_3d();
p_gizmo->clear();
@@ -3430,12 +3459,12 @@ 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_spatial_node());
+ ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_node_3d());
return AABB(probe->get_extents(), probe->get_origin_offset());
}
void ReflectionProbeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node());
+ ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_node_3d());
Transform3D gt = probe->get_global_transform();
Transform3D gi = gt.affine_inverse();
@@ -3492,7 +3521,7 @@ void ReflectionProbeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, in
}
void ReflectionProbeGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node());
+ ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_node_3d());
AABB restore = p_restore;
@@ -3502,7 +3531,7 @@ void ReflectionProbeGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo,
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change Probe Extents"));
ur->add_do_method(probe, "set_extents", probe->get_extents());
ur->add_do_method(probe, "set_origin_offset", probe->get_origin_offset());
@@ -3512,7 +3541,7 @@ void ReflectionProbeGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo,
}
void ReflectionProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_spatial_node());
+ ReflectionProbe *probe = Object::cast_to<ReflectionProbe>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -3609,12 +3638,12 @@ 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_spatial_node());
+ Decal *decal = Object::cast_to<Decal>(p_gizmo->get_node_3d());
return decal->get_extents();
}
void DecalGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node());
+ Decal *decal = Object::cast_to<Decal>(p_gizmo->get_node_3d());
Transform3D gt = decal->get_global_transform();
Transform3D gi = gt.affine_inverse();
@@ -3645,7 +3674,7 @@ void DecalGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bo
}
void DecalGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node());
+ Decal *decal = Object::cast_to<Decal>(p_gizmo->get_node_3d());
Vector3 restore = p_restore;
@@ -3654,7 +3683,7 @@ void DecalGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id,
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
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);
@@ -3662,7 +3691,7 @@ void DecalGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id,
}
void DecalGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- Decal *decal = Object::cast_to<Decal>(p_gizmo->get_spatial_node());
+ Decal *decal = Object::cast_to<Decal>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -3749,12 +3778,12 @@ 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_spatial_node());
+ VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_node_3d());
return probe->get_extents();
}
void VoxelGIGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_spatial_node());
+ VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_node_3d());
Transform3D gt = probe->get_global_transform();
Transform3D gi = gt.affine_inverse();
@@ -3785,7 +3814,7 @@ void VoxelGIGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id,
}
void VoxelGIGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_spatial_node());
+ VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_node_3d());
Vector3 restore = p_restore;
@@ -3794,7 +3823,7 @@ void VoxelGIGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_i
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
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);
@@ -3802,7 +3831,7 @@ void VoxelGIGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_i
}
void VoxelGIGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_spatial_node());
+ VoxelGI *probe = Object::cast_to<VoxelGI>(p_gizmo->get_node_3d());
Ref<Material> material = get_material("voxel_gi_material", p_gizmo);
Ref<Material> icon = get_material("voxel_gi_icon", p_gizmo);
@@ -3913,7 +3942,7 @@ int LightmapGIGizmoPlugin::get_priority() const {
void LightmapGIGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Ref<Material> icon = get_material("baked_indirect_light_icon", p_gizmo);
- LightmapGI *baker = Object::cast_to<LightmapGI>(p_gizmo->get_spatial_node());
+ LightmapGI *baker = Object::cast_to<LightmapGI>(p_gizmo->get_node_3d());
Ref<LightmapGIData> data = baker->get_light_data();
p_gizmo->add_unscaled_billboard(icon, 0.05);
@@ -4163,13 +4192,13 @@ int CollisionObject3DGizmoPlugin::get_priority() const {
}
void CollisionObject3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- CollisionObject3D *co = Object::cast_to<CollisionObject3D>(p_gizmo->get_spatial_node());
+ CollisionObject3D *co = Object::cast_to<CollisionObject3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
- List<uint32_t> owners;
- co->get_shape_owners(&owners);
- for (uint32_t &owner_id : owners) {
+ List<uint32_t> owner_ids;
+ co->get_shape_owners(&owner_ids);
+ for (uint32_t &owner_id : owner_ids) {
Transform3D xform = co->shape_owner_get_transform(owner_id);
Object *owner = co->shape_owner_get_owner(owner_id);
// Exclude CollisionShape3D and CollisionPolygon3D as they have their gizmo.
@@ -4214,7 +4243,7 @@ int CollisionShape3DGizmoPlugin::get_priority() const {
}
String CollisionShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- const CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
+ const CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_node_3d());
Ref<Shape3D> s = cs->get_shape();
if (s.is_null()) {
@@ -4245,7 +4274,7 @@ String CollisionShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_g
}
Variant CollisionShape3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
+ CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_node_3d());
Ref<Shape3D> s = cs->get_shape();
if (s.is_null()) {
@@ -4281,7 +4310,7 @@ Variant CollisionShape3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p
}
void CollisionShape3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
+ CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_node_3d());
Ref<Shape3D> s = cs->get_shape();
if (s.is_null()) {
@@ -4395,7 +4424,7 @@ void CollisionShape3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, i
}
void CollisionShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
+ CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_node_3d());
Ref<Shape3D> s = cs->get_shape();
if (s.is_null()) {
@@ -4409,7 +4438,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);
@@ -4423,7 +4452,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);
@@ -4440,7 +4469,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());
@@ -4465,7 +4494,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());
@@ -4490,7 +4519,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);
@@ -4499,7 +4528,7 @@ void CollisionShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo
}
void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_spatial_node());
+ CollisionShape3D *cs = Object::cast_to<CollisionShape3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -4751,9 +4780,9 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
if (err == OK) {
Vector<Vector3> points2;
points2.resize(md.edges.size() * 2);
- for (int i = 0; i < md.edges.size(); i++) {
- points2.write[i * 2 + 0] = md.vertices[md.edges[i].a];
- points2.write[i * 2 + 1] = md.vertices[md.edges[i].b];
+ for (uint32_t i = 0; i < md.edges.size(); i++) {
+ points2.write[i * 2 + 0] = md.vertices[md.edges[i].vertex_a];
+ points2.write[i * 2 + 1] = md.vertices[md.edges[i].vertex_b];
}
p_gizmo->add_lines(points2, material);
@@ -4814,7 +4843,7 @@ int CollisionPolygon3DGizmoPlugin::get_priority() const {
}
void CollisionPolygon3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- CollisionPolygon3D *polygon = Object::cast_to<CollisionPolygon3D>(p_gizmo->get_spatial_node());
+ CollisionPolygon3D *polygon = Object::cast_to<CollisionPolygon3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -4861,7 +4890,7 @@ int NavigationRegion3DGizmoPlugin::get_priority() const {
}
void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- NavigationRegion3D *navigationregion = Object::cast_to<NavigationRegion3D>(p_gizmo->get_spatial_node());
+ NavigationRegion3D *navigationregion = Object::cast_to<NavigationRegion3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
Ref<NavigationMesh> navigationmesh = navigationregion->get_navigation_mesh();
@@ -5021,7 +5050,7 @@ int NavigationLink3DGizmoPlugin::get_priority() const {
}
void NavigationLink3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- NavigationLink3D *link = Object::cast_to<NavigationLink3D>(p_gizmo->get_spatial_node());
+ NavigationLink3D *link = Object::cast_to<NavigationLink3D>(p_gizmo->get_node_3d());
RID nav_map = link->get_world_3d()->get_navigation_map();
real_t search_radius = NavigationServer3D::get_singleton()->map_get_link_connection_radius(nav_map);
@@ -5106,12 +5135,12 @@ 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_spatial_node());
+ NavigationLink3D *link = Object::cast_to<NavigationLink3D>(p_gizmo->get_node_3d());
return p_id == 0 ? link->get_start_location() : link->get_end_location();
}
void NavigationLink3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- NavigationLink3D *link = Object::cast_to<NavigationLink3D>(p_gizmo->get_spatial_node());
+ NavigationLink3D *link = Object::cast_to<NavigationLink3D>(p_gizmo->get_node_3d());
Transform3D gt = link->get_global_transform();
Transform3D gi = gt.affine_inverse();
@@ -5144,7 +5173,7 @@ void NavigationLink3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, i
}
void NavigationLink3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, const Variant &p_restore, bool p_cancel) {
- NavigationLink3D *link = Object::cast_to<NavigationLink3D>(p_gizmo->get_spatial_node());
+ NavigationLink3D *link = Object::cast_to<NavigationLink3D>(p_gizmo->get_node_3d());
if (p_cancel) {
if (p_id == 0) {
@@ -5155,7 +5184,7 @@ void NavigationLink3DGizmoPlugin::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 Start Location"));
ur->add_do_method(link, "set_start_location", link->get_start_location());
@@ -5444,7 +5473,7 @@ int Joint3DGizmoPlugin::get_priority() const {
}
void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- Joint3D *joint = Object::cast_to<Joint3D>(p_gizmo->get_spatial_node());
+ Joint3D *joint = Object::cast_to<Joint3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
@@ -5877,11 +5906,11 @@ String FogVolumeGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, i
}
Variant FogVolumeGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary) const {
- return Vector3(p_gizmo->get_spatial_node()->call("get_extents"));
+ return Vector3(p_gizmo->get_node_3d()->call("get_extents"));
}
void FogVolumeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, bool p_secondary, Camera3D *p_camera, const Point2 &p_point) {
- Node3D *sn = p_gizmo->get_spatial_node();
+ Node3D *sn = p_gizmo->get_node_3d();
Transform3D gt = sn->get_global_transform();
Transform3D gi = gt.affine_inverse();
@@ -5910,14 +5939,14 @@ void FogVolumeGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id
}
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_spatial_node();
+ Node3D *sn = p_gizmo->get_node_3d();
if (p_cancel) {
sn->call("set_extents", p_restore);
return;
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
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);
@@ -5925,11 +5954,11 @@ void FogVolumeGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p
}
void FogVolumeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- Node3D *cs = p_gizmo->get_spatial_node();
+ Node3D *cs = p_gizmo->get_node_3d();
p_gizmo->clear();
- if (RS::FogVolumeShape(int(p_gizmo->get_spatial_node()->call("get_shape"))) != RS::FOG_VOLUME_SHAPE_WORLD) {
+ if (RS::FogVolumeShape(int(p_gizmo->get_node_3d()->call("get_shape"))) != RS::FOG_VOLUME_SHAPE_WORLD) {
const Ref<Material> material =
get_material("shape_material", p_gizmo);
const Ref<Material> material_internal =
diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h
index 5924f8571a..8cb0fe54d9 100644
--- a/editor/plugins/node_3d_editor_gizmos.h
+++ b/editor/plugins/node_3d_editor_gizmos.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* node_3d_editor_gizmos.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* node_3d_editor_gizmos.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 NODE_3D_EDITOR_GIZMOS_H
#define NODE_3D_EDITOR_GIZMOS_H
@@ -72,7 +72,7 @@ class EditorNode3DGizmo : public Node3DGizmo {
Vector<Instance> instances;
Node3D *spatial_node = nullptr;
- void _set_spatial_node(Node *p_node) { set_spatial_node(Object::cast_to<Node3D>(p_node)); }
+ void _set_node_3d(Node *p_node) { set_node_3d(Object::cast_to<Node3D>(p_node)); }
protected:
static void _bind_methods();
@@ -116,8 +116,8 @@ public:
void set_selected(bool p_selected) { selected = p_selected; }
bool is_selected() const { return selected; }
- void set_spatial_node(Node3D *p_node);
- Node3D *get_spatial_node() const { return spatial_node; }
+ void set_node_3d(Node3D *p_node);
+ Node3D *get_node_3d() const { return spatial_node; }
Ref<EditorNode3DGizmoPlugin> get_plugin() const { return gizmo_plugin; }
bool intersect_frustum(const Camera3D *p_camera, const Vector<Plane> &p_frustum);
void handles_intersect_ray(Camera3D *p_camera, const Vector2 &p_point, bool p_shift_pressed, int &r_id, bool &r_secondary);
@@ -264,6 +264,9 @@ public:
class Camera3DGizmoPlugin : public EditorNode3DGizmoPlugin {
GDCLASS(Camera3DGizmoPlugin, EditorNode3DGizmoPlugin);
+private:
+ static Size2i _get_viewport_size(Camera3D *p_camera);
+
public:
bool has_gizmo(Node3D *p_spatial) override;
String get_gizmo_name() const override;
@@ -338,7 +341,6 @@ class Marker3DGizmoPlugin : public EditorNode3DGizmoPlugin {
GDCLASS(Marker3DGizmoPlugin, EditorNode3DGizmoPlugin);
Ref<ArrayMesh> pos3d_mesh;
- Vector<Vector3> cursor_points;
public:
bool has_gizmo(Node3D *p_spatial) override;
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 34d2cc3cd4..f1b7ed73b8 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* node_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* node_3d_editor_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 "node_3d_editor_plugin.h"
@@ -36,13 +36,12 @@
#include "core/math/math_funcs.h"
#include "core/math/projection.h"
#include "core/os/keyboard.h"
-#include "core/templates/sort_array.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/node_3d_editor_gizmos.h"
-#include "editor/plugins/script_editor_plugin.h"
#include "editor/scene_tree_dock.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/collision_shape_3d.h"
@@ -53,9 +52,12 @@
#include "scene/3d/visual_instance_3d.h"
#include "scene/3d/world_environment.h"
#include "scene/gui/center_container.h"
+#include "scene/gui/color_picker.h"
#include "scene/gui/flow_container.h"
+#include "scene/gui/split_container.h"
#include "scene/gui/subviewport_container.h"
#include "scene/resources/packed_scene.h"
+#include "scene/resources/sky_material.h"
#include "scene/resources/surface_tool.h"
constexpr real_t DISTANCE_DEFAULT = 4;
@@ -84,6 +86,177 @@ constexpr real_t MAX_Z = 1000000.0;
constexpr real_t MIN_FOV = 0.01;
constexpr real_t MAX_FOV = 179;
+void ViewportNavigationControl::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ if (!is_connected("mouse_exited", callable_mp(this, &ViewportNavigationControl::_on_mouse_exited))) {
+ connect("mouse_exited", callable_mp(this, &ViewportNavigationControl::_on_mouse_exited));
+ }
+ if (!is_connected("mouse_entered", callable_mp(this, &ViewportNavigationControl::_on_mouse_entered))) {
+ connect("mouse_entered", callable_mp(this, &ViewportNavigationControl::_on_mouse_entered));
+ }
+ } break;
+
+ case NOTIFICATION_DRAW: {
+ if (viewport != nullptr) {
+ _draw();
+ _update_navigation();
+ }
+ } break;
+ }
+}
+
+void ViewportNavigationControl::_draw() {
+ if (nav_mode == Node3DEditorViewport::NAVIGATION_NONE) {
+ return;
+ }
+
+ Vector2 center = get_size() / 2.0;
+ float radius = get_size().x / 2.0;
+
+ const bool focused = focused_index != -1;
+ draw_circle(center, radius, Color(0.5, 0.5, 0.5, focused || hovered ? 0.35 : 0.15));
+
+ const Color c = focused ? Color(0.9, 0.9, 0.9, 0.9) : Color(0.5, 0.5, 0.5, 0.25);
+
+ Vector2 circle_pos = focused ? center.move_toward(focused_pos, radius) : center;
+
+ draw_circle(circle_pos, AXIS_CIRCLE_RADIUS, c);
+ draw_circle(circle_pos, AXIS_CIRCLE_RADIUS * 0.8, c.darkened(0.4));
+}
+
+void ViewportNavigationControl::_process_click(int p_index, Vector2 p_position, bool p_pressed) {
+ hovered = false;
+ queue_redraw();
+
+ if (focused_index != -1 && focused_index != p_index) {
+ return;
+ }
+ if (p_pressed) {
+ if (p_position.distance_to(get_size() / 2.0) < get_size().x / 2.0) {
+ focused_pos = p_position;
+ focused_index = p_index;
+ queue_redraw();
+ }
+ } else {
+ focused_index = -1;
+ if (Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_CAPTURED) {
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
+ Input::get_singleton()->warp_mouse(focused_mouse_start);
+ }
+ }
+}
+
+void ViewportNavigationControl::_process_drag(int p_index, Vector2 p_position, Vector2 p_relative_position) {
+ if (focused_index == p_index) {
+ if (Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_VISIBLE) {
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED);
+ focused_mouse_start = p_position;
+ }
+ focused_pos += p_relative_position;
+ queue_redraw();
+ }
+}
+
+void ViewportNavigationControl::gui_input(const Ref<InputEvent> &p_event) {
+ // Mouse events
+ const Ref<InputEventMouseButton> mouse_button = p_event;
+ if (mouse_button.is_valid() && mouse_button->get_button_index() == MouseButton::LEFT) {
+ _process_click(100, mouse_button->get_position(), mouse_button->is_pressed());
+ }
+
+ const Ref<InputEventMouseMotion> mouse_motion = p_event;
+ if (mouse_motion.is_valid()) {
+ _process_drag(100, mouse_motion->get_global_position(), viewport->_get_warped_mouse_motion(mouse_motion));
+ }
+
+ // Touch events
+ const Ref<InputEventScreenTouch> screen_touch = p_event;
+ if (screen_touch.is_valid()) {
+ _process_click(screen_touch->get_index(), screen_touch->get_position(), screen_touch->is_pressed());
+ }
+
+ const Ref<InputEventScreenDrag> screen_drag = p_event;
+ if (screen_drag.is_valid()) {
+ _process_drag(screen_drag->get_index(), screen_drag->get_position(), screen_drag->get_relative());
+ }
+}
+
+void ViewportNavigationControl::_update_navigation() {
+ if (focused_index == -1) {
+ return;
+ }
+
+ Vector2 delta = focused_pos - (get_size() / 2.0);
+ Vector2 delta_normalized = delta.normalized();
+ switch (nav_mode) {
+ case Node3DEditorViewport::NavigationMode::NAVIGATION_MOVE: {
+ real_t speed_multiplier = MIN(delta.length() / (get_size().x * 100.0), 3.0);
+ real_t speed = viewport->freelook_speed * speed_multiplier;
+
+ const Node3DEditorViewport::FreelookNavigationScheme navigation_scheme = (Node3DEditorViewport::FreelookNavigationScheme)EditorSettings::get_singleton()->get("editors/3d/freelook/freelook_navigation_scheme").operator int();
+
+ Vector3 forward;
+ if (navigation_scheme == Node3DEditorViewport::FreelookNavigationScheme::FREELOOK_FULLY_AXIS_LOCKED) {
+ // Forward/backward keys will always go straight forward/backward, never moving on the Y axis.
+ forward = Vector3(0, 0, delta_normalized.y).rotated(Vector3(0, 1, 0), viewport->camera->get_rotation().y);
+ } else {
+ // Forward/backward keys will be relative to the camera pitch.
+ forward = viewport->camera->get_transform().basis.xform(Vector3(0, 0, delta_normalized.y));
+ }
+
+ const Vector3 right = viewport->camera->get_transform().basis.xform(Vector3(delta_normalized.x, 0, 0));
+
+ const Vector3 direction = forward + right;
+ const Vector3 motion = direction * speed;
+ viewport->cursor.pos += motion;
+ viewport->cursor.eye_pos += motion;
+ } break;
+
+ case Node3DEditorViewport::NavigationMode::NAVIGATION_LOOK: {
+ real_t speed_multiplier = MIN(delta.length() / (get_size().x * 2.5), 3.0);
+ real_t speed = viewport->freelook_speed * speed_multiplier;
+ viewport->_nav_look(nullptr, delta_normalized * speed);
+ } break;
+
+ case Node3DEditorViewport::NAVIGATION_PAN: {
+ real_t speed_multiplier = MIN(delta.length() / (get_size().x), 3.0);
+ real_t speed = viewport->freelook_speed * speed_multiplier;
+ viewport->_nav_pan(nullptr, -delta_normalized * speed);
+ } break;
+ case Node3DEditorViewport::NAVIGATION_ZOOM: {
+ real_t speed_multiplier = MIN(delta.length() / (get_size().x), 3.0);
+ real_t speed = viewport->freelook_speed * speed_multiplier;
+ viewport->_nav_zoom(nullptr, delta_normalized * speed);
+ } break;
+ case Node3DEditorViewport::NAVIGATION_ORBIT: {
+ real_t speed_multiplier = MIN(delta.length() / (get_size().x), 3.0);
+ real_t speed = viewport->freelook_speed * speed_multiplier;
+ viewport->_nav_orbit(nullptr, delta_normalized * speed);
+ } break;
+ case Node3DEditorViewport::NAVIGATION_NONE: {
+ } break;
+ }
+}
+
+void ViewportNavigationControl::_on_mouse_entered() {
+ hovered = true;
+ queue_redraw();
+}
+
+void ViewportNavigationControl::_on_mouse_exited() {
+ hovered = false;
+ queue_redraw();
+}
+
+void ViewportNavigationControl::set_navigation_mode(Node3DEditorViewport::NavigationMode p_nav_mode) {
+ nav_mode = p_nav_mode;
+}
+
+void ViewportNavigationControl::set_viewport(Node3DEditorViewport *p_viewport) {
+ viewport = p_viewport;
+}
+
void ViewportRotationControl::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
@@ -118,7 +291,7 @@ void ViewportRotationControl::_draw() {
const Vector2i center = get_size() / 2.0;
const real_t radius = get_size().x / 2.0;
- if (focused_axis > -2 || orbiting) {
+ if (focused_axis > -2 || orbiting_index != -1) {
draw_circle(center, radius, Color(0.5, 0.5, 0.5, 0.25));
}
@@ -189,41 +362,63 @@ void ViewportRotationControl::_get_sorted_axis(Vector<Axis2D> &r_axis) {
r_axis.sort_custom<Axis2DCompare>();
}
+void ViewportRotationControl::_process_click(int p_index, Vector2 p_position, bool p_pressed) {
+ if (orbiting_index != -1 && orbiting_index != p_index) {
+ return;
+ }
+ if (p_pressed) {
+ if (p_position.distance_to(get_size() / 2.0) < get_size().x / 2.0) {
+ orbiting_index = p_index;
+ }
+ } else {
+ if (focused_axis > -1) {
+ viewport->_menu_option(axis_menu_options[focused_axis]);
+ _update_focus();
+ }
+ orbiting_index = -1;
+ if (Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_CAPTURED) {
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
+ Input::get_singleton()->warp_mouse(orbiting_mouse_start);
+ }
+ }
+}
+
+void ViewportRotationControl::_process_drag(Ref<InputEventWithModifiers> p_event, int p_index, Vector2 p_position, Vector2 p_relative_position) {
+ if (orbiting_index == p_index) {
+ if (Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_VISIBLE) {
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED);
+ orbiting_mouse_start = p_position;
+ }
+ viewport->_nav_orbit(p_event, p_relative_position);
+ focused_axis = -1;
+ } else {
+ _update_focus();
+ }
+}
+
void ViewportRotationControl::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
+ // Mouse events
const Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT) {
- Vector2 pos = mb->get_position();
- if (mb->is_pressed()) {
- if (pos.distance_to(get_size() / 2.0) < get_size().x / 2.0) {
- orbiting = true;
- }
- } else {
- if (focused_axis > -1) {
- viewport->_menu_option(axis_menu_options[focused_axis]);
- _update_focus();
- }
- orbiting = false;
- if (Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_CAPTURED) {
- Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
- Input::get_singleton()->warp_mouse(orbiting_mouse_start);
- }
- }
+ _process_click(100, mb->get_position(), mb->is_pressed());
}
const Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
- if (orbiting) {
- if (Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_VISIBLE) {
- Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED);
- orbiting_mouse_start = mm->get_global_position();
- }
- viewport->_nav_orbit(mm, viewport->_get_warped_mouse_motion(mm));
- focused_axis = -1;
- } else {
- _update_focus();
- }
+ _process_drag(mm, 100, mm->get_global_position(), viewport->_get_warped_mouse_motion(mm));
+ }
+
+ // Touch events
+ const Ref<InputEventScreenTouch> screen_touch = p_event;
+ if (screen_touch.is_valid()) {
+ _process_click(screen_touch->get_index(), screen_touch->get_position(), screen_touch->is_pressed());
+ }
+
+ const Ref<InputEventScreenDrag> screen_drag = p_event;
+ if (screen_drag.is_valid()) {
+ _process_drag(screen_drag, screen_drag->get_index(), screen_drag->get_position(), screen_drag->get_relative());
}
}
@@ -268,6 +463,15 @@ void Node3DEditorViewport::_view_settings_confirmed(real_t p_interp_delta) {
_update_camera(p_interp_delta);
}
+void Node3DEditorViewport::_update_navigation_controls_visibility() {
+ bool show_viewport_rotation_gizmo = EDITOR_GET("editors/3d/navigation/show_viewport_rotation_gizmo") && (!previewing_cinema && !previewing_camera);
+ rotation_control->set_visible(show_viewport_rotation_gizmo);
+
+ bool show_viewport_navigation_gizmo = EDITOR_GET("editors/3d/navigation/show_viewport_navigation_gizmo") && (!previewing_cinema && !previewing_camera);
+ position_control->set_visible(show_viewport_navigation_gizmo);
+ look_control->set_visible(show_viewport_navigation_gizmo);
+}
+
void Node3DEditorViewport::_update_camera(real_t p_interp_delta) {
bool is_orthogonal = camera->get_projection() == Camera3D::PROJECTION_ORTHOGONAL;
@@ -351,6 +555,8 @@ void Node3DEditorViewport::_update_camera(real_t p_interp_delta) {
update_transform_gizmo_view();
rotation_control->queue_redraw();
+ position_control->queue_redraw();
+ look_control->queue_redraw();
spatial_editor->update_grid();
}
}
@@ -939,7 +1145,7 @@ void Node3DEditorViewport::_compute_edit(const Point2 &p_point) {
}
static Key _get_key_modifier_setting(const String &p_property) {
- switch (EditorSettings::get_singleton()->get(p_property).operator int()) {
+ switch (EDITOR_GET(p_property).operator int()) {
case 0:
return Key::NONE;
case 1:
@@ -1328,7 +1534,7 @@ void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
}
}
- String suffix = String();
+ String suffix;
if (locked == 1) {
suffix = " (" + TTR("Locked") + ")";
} else if (locked == 2) {
@@ -1356,7 +1562,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
EditorNode *en = EditorNode::get_singleton();
EditorPluginList *force_input_forwarding_list = en->get_editor_plugins_force_input_forwarding();
if (!force_input_forwarding_list->is_empty()) {
- EditorPlugin::AfterGUIInput discard = force_input_forwarding_list->forward_spatial_gui_input(camera, p_event, true);
+ EditorPlugin::AfterGUIInput discard = force_input_forwarding_list->forward_3d_gui_input(camera, p_event, true);
if (discard == EditorPlugin::AFTER_GUI_INPUT_STOP) {
return;
}
@@ -1369,7 +1575,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
EditorNode *en = EditorNode::get_singleton();
EditorPluginList *over_plugin_list = en->get_editor_plugins_over();
if (!over_plugin_list->is_empty()) {
- EditorPlugin::AfterGUIInput discard = over_plugin_list->forward_spatial_gui_input(camera, p_event, false);
+ EditorPlugin::AfterGUIInput discard = over_plugin_list->forward_3d_gui_input(camera, p_event, false);
if (discard == EditorPlugin::AFTER_GUI_INPUT_STOP) {
return;
}
@@ -1401,7 +1607,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
} break;
case MouseButton::RIGHT: {
- NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
+ NavigationScheme nav_scheme = (NavigationScheme)EDITOR_GET("editors/3d/navigation/navigation_scheme").operator int();
if (b->is_pressed() && _edit.gizmo.is_valid()) {
//restore
@@ -1481,7 +1687,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
commit_transform();
break; // just commit the edit, stop processing the event so we don't deselect the object
}
- NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
+ NavigationScheme nav_scheme = (NavigationScheme)EDITOR_GET("editors/3d/navigation/navigation_scheme").operator int();
if ((nav_scheme == NAVIGATION_MAYA || nav_scheme == NAVIGATION_MODO) && b->is_alt_pressed()) {
break;
}
@@ -1650,12 +1856,12 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
se->gizmo->commit_subgizmos(ids, restore, false);
- spatial_editor->update_transform_gizmo();
} else {
commit_transform();
}
_edit.mode = TRANSFORM_NONE;
set_message("");
+ spatial_editor->update_transform_gizmo();
}
surface->queue_redraw();
}
@@ -1705,11 +1911,11 @@ 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);
}
- NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
+ NavigationScheme nav_scheme = (NavigationScheme)EDITOR_GET("editors/3d/navigation/navigation_scheme").operator int();
NavigationMode nav_mode = NAVIGATION_NONE;
if (_edit.gizmo.is_valid()) {
@@ -1718,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()) {
@@ -1757,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) {
@@ -1766,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")) {
@@ -1782,7 +1988,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
nav_mode = NAVIGATION_PAN;
}
}
- } else if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_3_button_mouse")) {
+ } else if (EDITOR_GET("editors/3d/navigation/emulate_3_button_mouse")) {
// Handle trackpad (no external mouse) use case
const Key mod = _get_key_modifier(m);
@@ -1835,7 +2041,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Ref<InputEventPanGesture> pan_gesture = p_event;
if (pan_gesture.is_valid()) {
- NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
+ NavigationScheme nav_scheme = (NavigationScheme)EDITOR_GET("editors/3d/navigation/navigation_scheme").operator int();
NavigationMode nav_mode = NAVIGATION_NONE;
if (nav_scheme == NAVIGATION_GODOT) {
@@ -1889,7 +2095,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
return;
}
- if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_numpad")) {
+ if (EDITOR_GET("editors/3d/navigation/emulate_numpad")) {
const Key code = k->get_physical_keycode();
if (code >= Key::KEY_0 && code <= Key::KEY_9) {
k->set_keycode(code - Key::KEY_0 + Key::KP_0);
@@ -2002,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);
}
@@ -2086,10 +2287,10 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
void Node3DEditorViewport::_nav_pan(Ref<InputEventWithModifiers> p_event, const Vector2 &p_relative) {
- const NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
+ const NavigationScheme nav_scheme = (NavigationScheme)EDITOR_GET("editors/3d/navigation/navigation_scheme").operator int();
real_t pan_speed = 1 / 150.0;
- if (nav_scheme == NAVIGATION_MAYA && p_event->is_shift_pressed()) {
+ if (p_event.is_valid() && nav_scheme == NAVIGATION_MAYA && p_event->is_shift_pressed()) {
pan_speed *= 10;
}
@@ -2098,8 +2299,8 @@ void Node3DEditorViewport::_nav_pan(Ref<InputEventWithModifiers> p_event, const
camera_transform.translate_local(cursor.pos);
camera_transform.basis.rotate(Vector3(1, 0, 0), -cursor.x_rot);
camera_transform.basis.rotate(Vector3(0, 1, 0), -cursor.y_rot);
- const bool invert_x_axis = EditorSettings::get_singleton()->get("editors/3d/navigation/invert_x_axis");
- const bool invert_y_axis = EditorSettings::get_singleton()->get("editors/3d/navigation/invert_y_axis");
+ const bool invert_x_axis = EDITOR_GET("editors/3d/navigation/invert_x_axis");
+ const bool invert_y_axis = EDITOR_GET("editors/3d/navigation/invert_y_axis");
Vector3 translation(
(invert_x_axis ? -1 : 1) * -p_relative.x * pan_speed,
(invert_y_axis ? -1 : 1) * p_relative.y * pan_speed,
@@ -2110,14 +2311,14 @@ void Node3DEditorViewport::_nav_pan(Ref<InputEventWithModifiers> p_event, const
}
void Node3DEditorViewport::_nav_zoom(Ref<InputEventWithModifiers> p_event, const Vector2 &p_relative) {
- const NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation/navigation_scheme").operator int();
+ const NavigationScheme nav_scheme = (NavigationScheme)EDITOR_GET("editors/3d/navigation/navigation_scheme").operator int();
real_t zoom_speed = 1 / 80.0;
- if (nav_scheme == NAVIGATION_MAYA && p_event->is_shift_pressed()) {
+ if (p_event.is_valid() && nav_scheme == NAVIGATION_MAYA && p_event->is_shift_pressed()) {
zoom_speed *= 10;
}
- NavigationZoomStyle zoom_style = (NavigationZoomStyle)EditorSettings::get_singleton()->get("editors/3d/navigation/zoom_style").operator int();
+ NavigationZoomStyle zoom_style = (NavigationZoomStyle)EDITOR_GET("editors/3d/navigation/zoom_style").operator int();
if (zoom_style == NAVIGATION_ZOOM_HORIZONTAL) {
if (p_relative.x > 0) {
scale_cursor_distance(1 - p_relative.x * zoom_speed);
@@ -2143,10 +2344,10 @@ void Node3DEditorViewport::_nav_orbit(Ref<InputEventWithModifiers> p_event, cons
_menu_option(VIEW_PERSPECTIVE);
}
- const real_t degrees_per_pixel = EditorSettings::get_singleton()->get("editors/3d/navigation_feel/orbit_sensitivity");
+ const real_t degrees_per_pixel = EDITOR_GET("editors/3d/navigation_feel/orbit_sensitivity");
const real_t radians_per_pixel = Math::deg_to_rad(degrees_per_pixel);
- const bool invert_y_axis = EditorSettings::get_singleton()->get("editors/3d/navigation/invert_y_axis");
- const bool invert_x_axis = EditorSettings::get_singleton()->get("editors/3d/navigation/invert_x_axis");
+ const bool invert_y_axis = EDITOR_GET("editors/3d/navigation/invert_y_axis");
+ const bool invert_x_axis = EDITOR_GET("editors/3d/navigation/invert_x_axis");
if (invert_y_axis) {
cursor.x_rot -= p_relative.y * radians_per_pixel;
@@ -2176,9 +2377,9 @@ void Node3DEditorViewport::_nav_look(Ref<InputEventWithModifiers> p_event, const
}
// Scale mouse sensitivity with camera FOV scale when zoomed in to make it easier to point at things.
- const real_t degrees_per_pixel = real_t(EditorSettings::get_singleton()->get("editors/3d/freelook/freelook_sensitivity")) * MIN(1.0, cursor.fov_scale);
+ const real_t degrees_per_pixel = real_t(EDITOR_GET("editors/3d/freelook/freelook_sensitivity")) * MIN(1.0, cursor.fov_scale);
const real_t radians_per_pixel = Math::deg_to_rad(degrees_per_pixel);
- const bool invert_y_axis = EditorSettings::get_singleton()->get("editors/3d/navigation/invert_y_axis");
+ const bool invert_y_axis = EDITOR_GET("editors/3d/navigation/invert_y_axis");
// Note: do NOT assume the camera has the "current" transform, because it is interpolated and may have "lag".
const Transform3D prev_camera_transform = to_camera_transform(cursor);
@@ -2215,9 +2416,9 @@ void Node3DEditorViewport::set_freelook_active(bool active_now) {
// Also sync the camera cursor, otherwise switching to freelook will be trippy if inertia is active
camera_cursor.eye_pos = cursor.eye_pos;
- if (EditorSettings::get_singleton()->get("editors/3d/freelook/freelook_speed_zoom_link")) {
+ if (EDITOR_GET("editors/3d/freelook/freelook_speed_zoom_link")) {
// Re-adjust freelook speed from the current zoom level
- real_t base_speed = EditorSettings::get_singleton()->get("editors/3d/freelook/freelook_base_speed");
+ real_t base_speed = EDITOR_GET("editors/3d/freelook/freelook_base_speed");
freelook_speed = base_speed * cursor.distance;
}
@@ -2299,7 +2500,7 @@ void Node3DEditorViewport::_update_freelook(real_t delta) {
return;
}
- const FreelookNavigationScheme navigation_scheme = (FreelookNavigationScheme)EditorSettings::get_singleton()->get("editors/3d/freelook/freelook_navigation_scheme").operator int();
+ const FreelookNavigationScheme navigation_scheme = (FreelookNavigationScheme)EDITOR_GET("editors/3d/freelook/freelook_navigation_scheme").operator int();
Vector3 forward;
if (navigation_scheme == FREELOOK_FULLY_AXIS_LOCKED) {
@@ -2375,12 +2576,12 @@ void Node3DEditorPlugin::edited_scene_changed() {
void Node3DEditorViewport::_project_settings_changed() {
//update shadow atlas if changed
- int shadowmap_size = ProjectSettings::get_singleton()->get("rendering/lights_and_shadows/positional_shadow/atlas_size");
- bool shadowmap_16_bits = ProjectSettings::get_singleton()->get("rendering/lights_and_shadows/positional_shadow/atlas_16_bits");
- int atlas_q0 = ProjectSettings::get_singleton()->get("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv");
- int atlas_q1 = ProjectSettings::get_singleton()->get("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv");
- int atlas_q2 = ProjectSettings::get_singleton()->get("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv");
- int atlas_q3 = ProjectSettings::get_singleton()->get("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv");
+ int shadowmap_size = GLOBAL_GET("rendering/lights_and_shadows/positional_shadow/atlas_size");
+ bool shadowmap_16_bits = GLOBAL_GET("rendering/lights_and_shadows/positional_shadow/atlas_16_bits");
+ int atlas_q0 = GLOBAL_GET("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv");
+ int atlas_q1 = GLOBAL_GET("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv");
+ int atlas_q2 = GLOBAL_GET("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv");
+ int atlas_q3 = GLOBAL_GET("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv");
viewport->set_positional_shadow_atlas_size(shadowmap_size);
viewport->set_positional_shadow_atlas_16_bits(shadowmap_16_bits);
@@ -2393,13 +2594,16 @@ void Node3DEditorViewport::_project_settings_changed() {
// Update MSAA, screen-space AA and debanding if changed
- const int msaa_mode = ProjectSettings::get_singleton()->get("rendering/anti_aliasing/quality/msaa_3d");
+ const int msaa_mode = GLOBAL_GET("rendering/anti_aliasing/quality/msaa_3d");
viewport->set_msaa_3d(Viewport::MSAA(msaa_mode));
const int ssaa_mode = GLOBAL_GET("rendering/anti_aliasing/quality/screen_space_aa");
viewport->set_screen_space_aa(Viewport::ScreenSpaceAA(ssaa_mode));
const bool use_taa = GLOBAL_GET("rendering/anti_aliasing/quality/use_taa");
viewport->set_use_taa(use_taa);
+ const bool transparent_background = GLOBAL_GET("rendering/viewport/transparent_background");
+ viewport->set_transparent_background(transparent_background);
+
const bool use_debanding = GLOBAL_GET("rendering/anti_aliasing/quality/use_debanding");
viewport->set_use_debanding(use_debanding);
@@ -2429,11 +2633,12 @@ void Node3DEditorViewport::_notification(int p_what) {
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
- bool visible = is_visible_in_tree();
+ bool vp_visible = is_visible_in_tree();
- set_process(visible);
+ set_process(vp_visible);
+ set_physics_process(vp_visible);
- if (visible) {
+ if (vp_visible) {
orthogonal = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_ORTHOGONAL));
_update_name();
_update_camera(0);
@@ -2441,7 +2646,6 @@ void Node3DEditorViewport::_notification(int p_what) {
set_freelook_active(false);
}
call_deferred(SNAME("update_transform_gizmo_view"));
- rotation_control->set_visible(EditorSettings::get_singleton()->get("editors/3d/navigation/show_viewport_rotation_gizmo"));
} break;
case NOTIFICATION_RESIZED: {
@@ -2459,6 +2663,7 @@ void Node3DEditorViewport::_notification(int p_what) {
}
}
+ _update_navigation_controls_visibility();
_update_freelook(delta);
Node *scene_root = SceneTreeDock::get_singleton()->get_editor_data()->get_edited_scene_root();
@@ -2655,6 +2860,21 @@ void Node3DEditorViewport::_notification(int p_what) {
}
} break;
+ case NOTIFICATION_PHYSICS_PROCESS: {
+ if (!update_preview_node) {
+ return;
+ }
+ if (preview_node->is_inside_tree()) {
+ preview_node_pos = spatial_editor->snap_point(_get_instance_position(preview_node_viewport_pos));
+ Transform3D preview_gl_transform = Transform3D(Basis(), preview_node_pos);
+ preview_node->set_global_transform(preview_gl_transform);
+ if (!preview_node->is_visible()) {
+ preview_node->show();
+ }
+ }
+ update_preview_node = false;
+ } break;
+
case NOTIFICATION_ENTER_TREE: {
surface->connect("draw", callable_mp(this, &Node3DEditorViewport::_draw));
surface->connect("gui_input", callable_mp(this, &Node3DEditorViewport::_sinput));
@@ -2735,12 +2955,12 @@ static void draw_indicator_bar(Control &p_surface, real_t p_fill, const Ref<Text
void Node3DEditorViewport::_draw() {
EditorPluginList *over_plugin_list = EditorNode::get_singleton()->get_editor_plugins_over();
if (!over_plugin_list->is_empty()) {
- over_plugin_list->forward_spatial_draw_over_viewport(surface);
+ over_plugin_list->forward_3d_draw_over_viewport(surface);
}
EditorPluginList *force_over_plugin_list = EditorNode::get_singleton()->get_editor_plugins_force_over();
if (!force_over_plugin_list->is_empty()) {
- force_over_plugin_list->forward_spatial_force_draw_over_viewport(surface);
+ force_over_plugin_list->forward_3d_force_draw_over_viewport(surface);
}
if (surface->has_focus()) {
@@ -2802,7 +3022,7 @@ void Node3DEditorViewport::_draw() {
Math::round(2 * EDSCALE));
}
if (previewing) {
- Size2 ss = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
+ Size2 ss = Size2(GLOBAL_GET("display/window/size/viewport_width"), GLOBAL_GET("display/window/size/viewport_height"));
float aspect = ss.aspect();
Size2 s = get_size();
@@ -2879,6 +3099,7 @@ void Node3DEditorViewport::_draw() {
}
void Node3DEditorViewport::_menu_option(int p_option) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (p_option) {
case VIEW_TOP: {
cursor.y_rot = 0;
@@ -2967,7 +3188,7 @@ void Node3DEditorViewport::_menu_option(int p_option) {
Transform3D xform;
if (orthogonal) {
xform = sp->get_global_transform();
- xform.basis.set_euler(camera_transform.basis.get_euler());
+ xform.basis = Basis::from_euler(camera_transform.basis.get_euler());
} else {
xform = camera_transform;
xform.scale_basis(sp->get_scale());
@@ -3053,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);
@@ -3331,6 +3556,7 @@ void Node3DEditorViewport::_init_gizmo_instance(int p_idx) {
}
void Node3DEditorViewport::_finish_gizmo_instances() {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
for (int i = 0; i < 3; i++) {
RS::get_singleton()->free(move_gizmo_instance[i]);
RS::get_singleton()->free(move_plane_gizmo_instance[i]);
@@ -3347,7 +3573,8 @@ void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) {
ERR_FAIL_COND(p_activate && !preview);
ERR_FAIL_COND(!p_activate && !previewing);
- rotation_control->set_visible(!p_activate);
+ previewing_camera = p_activate;
+ _update_navigation_controls_visibility();
if (!p_activate) {
previewing->disconnect("tree_exiting", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene));
@@ -3368,7 +3595,7 @@ void Node3DEditorViewport::_toggle_camera_preview(bool p_activate) {
void Node3DEditorViewport::_toggle_cinema_preview(bool p_activate) {
previewing_cinema = p_activate;
- rotation_control->set_visible(!p_activate);
+ _update_navigation_controls_visibility();
if (!previewing_cinema) {
if (previewing != nullptr) {
@@ -3445,7 +3672,7 @@ void Node3DEditorViewport::update_transform_gizmo_view() {
const real_t d1 = camera->unproject_position(camera_xform.origin + camz * gizmo_d + camy).y;
const real_t dd = MAX(Math::abs(d0 - d1), CMP_EPSILON);
- const real_t gizmo_size = EditorSettings::get_singleton()->get("editors/3d/manipulator_gizmo_size");
+ const real_t gizmo_size = EDITOR_GET("editors/3d/manipulator_gizmo_size");
// At low viewport heights, multiply the gizmo scale based on the viewport height.
// This prevents the gizmo from growing very large and going outside the viewport.
const int viewport_base_height = 400 * MAX(1, EDSCALE);
@@ -3471,7 +3698,7 @@ void Node3DEditorViewport::update_transform_gizmo_view() {
}
for (int i = 0; i < 3; i++) {
- Transform3D axis_angle = Transform3D();
+ Transform3D axis_angle;
if (xform.basis.get_column(i).normalized().dot(xform.basis.get_column((i + 1) % 3).normalized()) < 1.0) {
axis_angle = axis_angle.looking_at(xform.basis.get_column(i).normalized(), xform.basis.get_column((i + 1) % 3).normalized());
}
@@ -3666,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")));
@@ -3729,24 +3954,45 @@ void Node3DEditorViewport::assign_pending_data_pointers(Node3D *p_preview_node,
Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const {
const float MAX_DISTANCE = 50.0;
+ const float FALLBACK_DISTANCE = 5.0;
Vector3 world_ray = _get_ray(p_pos);
Vector3 world_pos = _get_ray_pos(p_pos);
- Vector3 point = world_pos + world_ray * MAX_DISTANCE;
-
PhysicsDirectSpaceState3D *ss = get_tree()->get_root()->get_world_3d()->get_direct_space_state();
PhysicsDirectSpaceState3D::RayParameters ray_params;
ray_params.from = world_pos;
- ray_params.to = world_pos + world_ray * MAX_DISTANCE;
+ ray_params.to = world_pos + world_ray * camera->get_far();
PhysicsDirectSpaceState3D::RayResult result;
if (ss->intersect_ray(ray_params, result)) {
- point = result.position;
+ return result.position;
+ }
+
+ const bool is_orthogonal = camera->get_projection() == Camera3D::PROJECTION_ORTHOGONAL;
+
+ // The XZ plane.
+ Vector3 intersection;
+ Plane plane(Vector3(0, 1, 0));
+ if (plane.intersects_ray(world_pos, world_ray, &intersection)) {
+ if (is_orthogonal || world_pos.distance_to(intersection) <= MAX_DISTANCE) {
+ return intersection;
+ }
+ }
+
+ // Plane facing the camera using fallback distance.
+ if (is_orthogonal) {
+ plane = Plane(world_ray, cursor.pos - world_ray * (cursor.distance - FALLBACK_DISTANCE));
+ } else {
+ plane = Plane(world_ray, world_pos + world_ray * FALLBACK_DISTANCE);
+ }
+ if (plane.intersects_ray(world_pos, world_ray, &intersection)) {
+ return intersection;
}
- return point;
+ // Not likely, but just in case...
+ return world_pos + world_ray * FALLBACK_DISTANCE;
}
AABB Node3DEditorViewport::_calculate_spatial_bounds(const Node3D *p_parent, bool p_exclude_top_level_transform) {
@@ -3762,7 +4008,7 @@ AABB Node3DEditorViewport::_calculate_spatial_bounds(const Node3D *p_parent, boo
if (child) {
AABB child_bounds = _calculate_spatial_bounds(child, false);
- if (bounds.size == Vector3() && Object::cast_to<Node3D>(p_parent)) {
+ if (bounds.size == Vector3() && p_parent) {
bounds = child_bounds;
} else {
bounds.merge_with(child_bounds);
@@ -3770,7 +4016,7 @@ AABB Node3DEditorViewport::_calculate_spatial_bounds(const Node3D *p_parent, boo
}
}
- if (bounds.size == Vector3() && !Object::cast_to<Node3D>(p_parent)) {
+ if (bounds.size == Vector3() && !p_parent) {
bounds = AABB(Vector3(-0.2, -0.2, -0.2), Vector3(0.4, 0.4, 0.4));
}
@@ -3843,7 +4089,7 @@ void Node3DEditorViewport::_remove_preview_node() {
if (preview_node->get_parent()) {
for (int i = preview_node->get_child_count() - 1; i >= 0; i--) {
Node *node = preview_node->get_child(i);
- node->queue_delete();
+ node->queue_free();
preview_node->remove_child(node);
}
EditorNode::get_singleton()->get_scene_root()->remove_child(preview_node);
@@ -3880,8 +4126,8 @@ bool Node3DEditorViewport::_apply_preview_material(ObjectID p_target, const Poin
Vector3 xform_ray = ai.basis.xform(world_ray).normalized();
Vector3 xform_pos = ai.xform(world_pos);
- for (int surface = 0; surface < surface_count; surface++) {
- Ref<TriangleMesh> surface_mesh = mesh->generate_surface_triangle_mesh(surface);
+ for (int surface_idx = 0; surface_idx < surface_count; surface_idx++) {
+ Ref<TriangleMesh> surface_mesh = mesh->generate_surface_triangle_mesh(surface_idx);
Vector3 rpos, rnorm;
if (surface_mesh->intersect_ray(xform_pos, xform_ray, rpos, rnorm)) {
@@ -3894,7 +4140,7 @@ bool Node3DEditorViewport::_apply_preview_material(ObjectID p_target, const Poin
}
if (dist < closest_dist) {
- closest_surface = surface;
+ closest_surface = surface_idx;
closest_dist = dist;
}
}
@@ -3997,7 +4243,7 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po
return false;
}
- if (!EditorNode::get_singleton()->get_edited_scene()->get_scene_file_path().is_empty()) { // cyclical instancing
+ if (!EditorNode::get_singleton()->get_edited_scene()->get_scene_file_path().is_empty()) { // Cyclic instantiation.
if (_cyclical_dependency_exists(EditorNode::get_singleton()->get_edited_scene()->get_scene_file_path(), instantiated_scene)) {
memdelete(instantiated_scene);
return false;
@@ -4008,47 +4254,49 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po
instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path));
}
- editor_data->get_undo_redo()->add_do_method(parent, "add_child", instantiated_scene, true);
- editor_data->get_undo_redo()->add_do_method(instantiated_scene, "set_owner", EditorNode::get_singleton()->get_edited_scene());
- editor_data->get_undo_redo()->add_do_reference(instantiated_scene);
- editor_data->get_undo_redo()->add_undo_method(parent, "remove_child", instantiated_scene);
+ 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);
+ undo_redo->add_undo_method(parent, "remove_child", instantiated_scene);
String new_name = parent->validate_child_name(instantiated_scene);
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
- editor_data->get_undo_redo()->add_do_method(ed, "live_debug_instance_node", EditorNode::get_singleton()->get_edited_scene()->get_path_to(parent), path, new_name);
- editor_data->get_undo_redo()->add_undo_method(ed, "live_debug_remove_node", NodePath(String(EditorNode::get_singleton()->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
+ undo_redo->add_do_method(ed, "live_debug_instantiate_node", EditorNode::get_singleton()->get_edited_scene()->get_path_to(parent), path, new_name);
+ undo_redo->add_undo_method(ed, "live_debug_remove_node", NodePath(String(EditorNode::get_singleton()->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
Node3D *node3d = Object::cast_to<Node3D>(instantiated_scene);
if (node3d) {
- Transform3D global_transform;
+ Transform3D gl_transform;
Node3D *parent_node3d = Object::cast_to<Node3D>(parent);
if (parent_node3d) {
- global_transform = parent_node3d->get_global_gizmo_transform();
+ gl_transform = parent_node3d->get_global_gizmo_transform();
}
- global_transform.origin = spatial_editor->snap_point(_get_instance_position(p_point));
- global_transform.basis *= node3d->get_transform().basis;
+ gl_transform.origin = preview_node_pos;
+ gl_transform.basis *= node3d->get_transform().basis;
- editor_data->get_undo_redo()->add_do_method(instantiated_scene, "set_global_transform", global_transform);
+ undo_redo->add_do_method(instantiated_scene, "set_global_transform", gl_transform);
}
return true;
}
void Node3DEditorViewport::_perform_drop_data() {
+ 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()));
if (mesh_instance && spatial_editor->get_preview_material_surface() != -1) {
- editor_data->get_undo_redo()->create_action(vformat(TTR("Set Surface %d Override Material"), spatial_editor->get_preview_material_surface()));
- editor_data->get_undo_redo()->add_do_method(geometry_instance, "set_surface_override_material", spatial_editor->get_preview_material_surface(), spatial_editor->get_preview_material());
- editor_data->get_undo_redo()->add_undo_method(geometry_instance, "set_surface_override_material", spatial_editor->get_preview_material_surface(), spatial_editor->get_preview_reset_material());
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->create_action(vformat(TTR("Set Surface %d Override Material"), spatial_editor->get_preview_material_surface()));
+ undo_redo->add_do_method(geometry_instance, "set_surface_override_material", spatial_editor->get_preview_material_surface(), spatial_editor->get_preview_material());
+ undo_redo->add_undo_method(geometry_instance, "set_surface_override_material", spatial_editor->get_preview_material_surface(), spatial_editor->get_preview_reset_material());
+ undo_redo->commit_action();
} else if (geometry_instance) {
- editor_data->get_undo_redo()->create_action(TTR("Set Material Override"));
- editor_data->get_undo_redo()->add_do_method(geometry_instance, "set_material_override", spatial_editor->get_preview_material());
- editor_data->get_undo_redo()->add_undo_method(geometry_instance, "set_material_override", spatial_editor->get_preview_reset_material());
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->create_action(TTR("Set Material Override"));
+ undo_redo->add_do_method(geometry_instance, "set_material_override", spatial_editor->get_preview_material());
+ undo_redo->add_undo_method(geometry_instance, "set_material_override", spatial_editor->get_preview_reset_material());
+ undo_redo->commit_action();
}
_remove_preview_material();
@@ -4059,7 +4307,7 @@ void Node3DEditorViewport::_perform_drop_data() {
Vector<String> error_files;
- editor_data->get_undo_redo()->create_action(TTR("Create Node"));
+ undo_redo->create_action(TTR("Create Node"));
for (int i = 0; i < selected_files.size(); i++) {
String path = selected_files[i];
@@ -4077,7 +4325,7 @@ void Node3DEditorViewport::_perform_drop_data() {
}
}
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->commit_action();
if (error_files.size() > 0) {
String files_str;
@@ -4085,12 +4333,14 @@ void Node3DEditorViewport::_perform_drop_data() {
files_str += error_files[i].get_file().get_basename() + ",";
}
files_str = files_str.substr(0, files_str.length() - 1);
- accept->set_text(vformat(TTR("Error instancing scene from %s"), files_str.get_data()));
+ accept->set_text(vformat(TTR("Error instantiating scene from %s"), files_str.get_data()));
accept->popup_centered();
}
}
-bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
+bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
+ preview_node_viewport_pos = p_point;
+
bool can_instantiate = false;
if (!preview_node->is_inside_tree() && spatial_editor->get_preview_material().is_null()) {
@@ -4108,11 +4358,13 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant
ResourceLoader::get_recognized_extensions_for_type("Texture", &texture_extensions);
for (int i = 0; i < files.size(); i++) {
+ String extension = files[i].get_extension().to_lower();
+
// Check if dragged files with mesh or scene extension can be created at least once.
- if (mesh_extensions.find(files[i].get_extension()) ||
- scene_extensions.find(files[i].get_extension()) ||
- material_extensions.find(files[i].get_extension()) ||
- texture_extensions.find(files[i].get_extension())) {
+ if (mesh_extensions.find(extension) ||
+ scene_extensions.find(extension) ||
+ material_extensions.find(extension) ||
+ texture_extensions.find(extension)) {
Ref<Resource> res = ResourceLoader::load(files[i]);
if (res.is_null()) {
continue;
@@ -4154,6 +4406,7 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant
}
if (can_instantiate) {
_create_preview_node(files);
+ preview_node->hide();
}
}
} else {
@@ -4163,8 +4416,7 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant
}
if (can_instantiate) {
- Transform3D global_transform = Transform3D(Basis(), _get_instance_position(p_point));
- preview_node->set_global_transform(global_transform);
+ update_preview_node = true;
return true;
}
@@ -4241,6 +4493,7 @@ void Node3DEditorViewport::commit_transform() {
TTRC("Translate"),
TTRC("Scale"),
};
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(_transform_name[_edit.mode]);
List<Node *> &selection = editor_selection->get_selected_node_list();
@@ -4646,9 +4899,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
_edit.gizmo_handle_secondary = false;
index = p_index;
- editor_data = SceneTreeDock::get_singleton()->get_editor_data();
editor_selection = EditorNode::get_singleton()->get_editor_selection();
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
orthogonal = false;
auto_orthogonal = false;
@@ -4667,7 +4918,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);
@@ -4700,8 +4951,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);
@@ -4773,10 +5025,9 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
view_menu->get_popup()->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
display_submenu->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
view_menu->set_disable_shortcuts(true);
-#ifndef _MSC_VER
-#warning this needs to be fixed
-#endif
- //if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) {
+
+ // TODO: Re-evaluate with new OpenGL3 renderer, and implement.
+ //if (OS::get_singleton()->get_current_video_driver() == OS::RENDERING_DRIVER_OPENGL3) {
if (false) {
// Alternate display modes only work when using the Vulkan renderer; make this explicit.
const int normal_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_NORMAL);
@@ -4827,6 +5078,14 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
preview_node = nullptr;
+ bottom_center_vbox = memnew(VBoxContainer);
+ bottom_center_vbox->set_anchors_preset(LayoutPreset::PRESET_CENTER);
+ bottom_center_vbox->set_anchor_and_offset(SIDE_TOP, ANCHOR_END, -20 * EDSCALE);
+ bottom_center_vbox->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, -10 * EDSCALE);
+ bottom_center_vbox->set_h_grow_direction(GROW_DIRECTION_BOTH);
+ bottom_center_vbox->set_v_grow_direction(GROW_DIRECTION_BEGIN);
+ surface->add_child(bottom_center_vbox);
+
info_label = memnew(Label);
info_label->set_anchor_and_offset(SIDE_LEFT, ANCHOR_END, -90 * EDSCALE);
info_label->set_anchor_and_offset(SIDE_TOP, ANCHOR_END, -90 * EDSCALE);
@@ -4847,23 +5106,18 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
previewing_cinema = false;
locked_label = memnew(Label);
- locked_label->set_anchor_and_offset(SIDE_TOP, ANCHOR_END, -20 * EDSCALE);
- locked_label->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, -10 * EDSCALE);
- locked_label->set_h_grow_direction(GROW_DIRECTION_END);
- locked_label->set_v_grow_direction(GROW_DIRECTION_BEGIN);
locked_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
- surface->add_child(locked_label);
+ locked_label->set_h_size_flags(SIZE_SHRINK_CENTER);
+ bottom_center_vbox->add_child(locked_label);
locked_label->set_text(TTR("View Rotation Locked"));
locked_label->hide();
zoom_limit_label = memnew(Label);
- zoom_limit_label->set_anchors_and_offsets_preset(LayoutPreset::PRESET_BOTTOM_LEFT);
- zoom_limit_label->set_offset(Side::SIDE_TOP, -28 * EDSCALE);
zoom_limit_label->set_text(TTR("To zoom further, change the camera's clipping planes (View -> Settings...)"));
zoom_limit_label->set_name("ZoomLimitMessageLabel");
zoom_limit_label->add_theme_color_override("font_color", Color(1, 1, 1, 1));
zoom_limit_label->hide();
- surface->add_child(zoom_limit_label);
+ bottom_center_vbox->add_child(zoom_limit_label);
preview_material_label = memnew(Label);
preview_material_label->set_anchors_and_offsets_preset(LayoutPreset::PRESET_BOTTOM_LEFT);
@@ -4894,6 +5148,30 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
// Prevent visible spacing between frame time labels.
top_right_vbox->add_theme_constant_override("separation", 0);
+ const int navigation_control_size = 150;
+
+ position_control = memnew(ViewportNavigationControl);
+ position_control->set_navigation_mode(Node3DEditorViewport::NAVIGATION_MOVE);
+ position_control->set_custom_minimum_size(Size2(navigation_control_size, navigation_control_size) * EDSCALE);
+ position_control->set_h_size_flags(SIZE_SHRINK_END);
+ position_control->set_anchor_and_offset(SIDE_LEFT, ANCHOR_BEGIN, 0 * EDSCALE);
+ position_control->set_anchor_and_offset(SIDE_TOP, ANCHOR_END, -navigation_control_size * EDSCALE);
+ position_control->set_anchor_and_offset(SIDE_RIGHT, ANCHOR_BEGIN, navigation_control_size * EDSCALE);
+ position_control->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, 0 * EDSCALE);
+ position_control->set_viewport(this);
+ surface->add_child(position_control);
+
+ look_control = memnew(ViewportNavigationControl);
+ look_control->set_navigation_mode(Node3DEditorViewport::NAVIGATION_LOOK);
+ look_control->set_custom_minimum_size(Size2(navigation_control_size, navigation_control_size) * EDSCALE);
+ look_control->set_h_size_flags(SIZE_SHRINK_END);
+ look_control->set_anchor_and_offset(SIDE_LEFT, ANCHOR_END, -navigation_control_size * EDSCALE);
+ look_control->set_anchor_and_offset(SIDE_TOP, ANCHOR_END, -navigation_control_size * EDSCALE);
+ look_control->set_anchor_and_offset(SIDE_RIGHT, ANCHOR_END, 0 * EDSCALE);
+ look_control->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, 0 * EDSCALE);
+ look_control->set_viewport(this);
+ surface->add_child(look_control);
+
rotation_control = memnew(ViewportRotationControl);
rotation_control->set_custom_minimum_size(Size2(80, 80) * EDSCALE);
rotation_control->set_h_size_flags(SIZE_SHRINK_END);
@@ -4918,7 +5196,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
accept = nullptr;
freelook_active = false;
- freelook_speed = EditorSettings::get_singleton()->get("editors/3d/freelook/freelook_base_speed");
+ freelook_speed = EDITOR_GET("editors/3d/freelook/freelook_base_speed");
selection_menu = memnew(PopupMenu);
add_child(selection_menu);
@@ -5257,6 +5535,7 @@ Node3DEditorViewportContainer::Node3DEditorViewportContainer() {
Node3DEditor *Node3DEditor::singleton = nullptr;
Node3DEditorSelectedItem::~Node3DEditorSelectedItem() {
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
if (sbox_instance.is_valid()) {
RenderingServer::get_singleton()->free(sbox_instance);
}
@@ -5516,8 +5795,8 @@ Dictionary Node3DEditor::get_state() const {
pd["sun_color"] = sun_color->get_pick_color();
pd["sun_energy"] = sun_energy->get_value();
- pd["sun_disabled"] = sun_button->is_pressed();
- pd["environ_disabled"] = environ_button->is_pressed();
+ pd["sun_enabled"] = sun_button->is_pressed();
+ pd["environ_enabled"] = environ_button->is_pressed();
d["preview_sun_env"] = pd;
}
@@ -5648,8 +5927,8 @@ void Node3DEditor::set_state(const Dictionary &p_state) {
sun_color->set_pick_color(pd["sun_color"]);
sun_energy->set_value(pd["sun_energy"]);
- sun_button->set_pressed(pd["sun_disabled"]);
- environ_button->set_pressed(pd["environ_disabled"]);
+ sun_button->set_pressed(pd["sun_enabled"]);
+ environ_button->set_pressed(pd["environ_enabled"]);
sun_environ_updating = false;
@@ -5657,8 +5936,8 @@ void Node3DEditor::set_state(const Dictionary &p_state) {
_update_preview_environment();
} else {
_load_default_preview_settings();
- sun_button->set_pressed(false);
- environ_button->set_pressed(false);
+ sun_button->set_pressed(true);
+ environ_button->set_pressed(true);
_preview_settings_changed();
_update_preview_environment();
}
@@ -5733,6 +6012,7 @@ void Node3DEditor::_xform_dialog_action() {
t.basis.rotate(rotate);
t.origin = translate;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("XForm Dialog"));
const List<Node *> &selection = editor_selection->get_selected_node_list();
@@ -5844,6 +6124,7 @@ void Node3DEditor::_update_camera_override_viewport(Object *p_viewport) {
}
void Node3DEditor::_menu_item_pressed(int p_option) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (p_option) {
case MENU_TOOL_SELECT:
case MENU_TOOL_MOVE:
@@ -6171,9 +6452,9 @@ void fragment() {
grid_mat[i]->set_shader(grid_shader);
}
- grid_enable[0] = EditorSettings::get_singleton()->get("editors/3d/grid_xy_plane");
- grid_enable[1] = EditorSettings::get_singleton()->get("editors/3d/grid_yz_plane");
- grid_enable[2] = EditorSettings::get_singleton()->get("editors/3d/grid_xz_plane");
+ grid_enable[0] = EDITOR_GET("editors/3d/grid_xy_plane");
+ grid_enable[1] = EDITOR_GET("editors/3d/grid_yz_plane");
+ grid_enable[2] = EDITOR_GET("editors/3d/grid_xz_plane");
grid_visible[0] = grid_enable[0];
grid_visible[1] = grid_enable[1];
grid_visible[2] = grid_enable[2];
@@ -6223,7 +6504,7 @@ void fragment() {
break;
}
- col.a = EditorSettings::get_singleton()->get("editors/3d/manipulator_gizmo_opacity");
+ col.a = EDITOR_GET("editors/3d/manipulator_gizmo_opacity");
move_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh));
move_plane_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh));
@@ -6639,23 +6920,23 @@ void Node3DEditor::_init_grid() {
Vector<Vector3> grid_points[3];
Vector<Vector3> grid_normals[3];
- Color primary_grid_color = EditorSettings::get_singleton()->get("editors/3d/primary_grid_color");
- Color secondary_grid_color = EditorSettings::get_singleton()->get("editors/3d/secondary_grid_color");
- int grid_size = EditorSettings::get_singleton()->get("editors/3d/grid_size");
- int primary_grid_steps = EditorSettings::get_singleton()->get("editors/3d/primary_grid_steps");
+ Color primary_grid_color = EDITOR_GET("editors/3d/primary_grid_color");
+ Color secondary_grid_color = EDITOR_GET("editors/3d/secondary_grid_color");
+ int grid_size = EDITOR_GET("editors/3d/grid_size");
+ int primary_grid_steps = EDITOR_GET("editors/3d/primary_grid_steps");
// Which grid planes are enabled? Which should we generate?
- grid_enable[0] = grid_visible[0] = EditorSettings::get_singleton()->get("editors/3d/grid_xy_plane");
- grid_enable[1] = grid_visible[1] = EditorSettings::get_singleton()->get("editors/3d/grid_yz_plane");
- grid_enable[2] = grid_visible[2] = EditorSettings::get_singleton()->get("editors/3d/grid_xz_plane");
+ grid_enable[0] = grid_visible[0] = EDITOR_GET("editors/3d/grid_xy_plane");
+ grid_enable[1] = grid_visible[1] = EDITOR_GET("editors/3d/grid_yz_plane");
+ grid_enable[2] = grid_visible[2] = EDITOR_GET("editors/3d/grid_xz_plane");
// Offsets division_level for bigger or smaller grids.
// Default value is -0.2. -1.0 gives Blender-like behavior, 0.5 gives huge grids.
- real_t division_level_bias = EditorSettings::get_singleton()->get("editors/3d/grid_division_level_bias");
+ real_t division_level_bias = EDITOR_GET("editors/3d/grid_division_level_bias");
// Default largest grid size is 8^2 when primary_grid_steps is 8 (64m apart, so primary grid lines are 512m apart).
- int division_level_max = EditorSettings::get_singleton()->get("editors/3d/grid_division_level_max");
+ int division_level_max = EDITOR_GET("editors/3d/grid_division_level_max");
// Default smallest grid size is 1cm, 10^-2 (default value is -2).
- int division_level_min = EditorSettings::get_singleton()->get("editors/3d/grid_division_level_min");
+ int division_level_min = EDITOR_GET("editors/3d/grid_division_level_min");
ERR_FAIL_COND_MSG(division_level_max < division_level_min, "The 3D grid's maximum division level cannot be lower than its minimum division level.");
if (primary_grid_steps != 10) { // Log10 of 10 is 1.
@@ -6755,8 +7036,8 @@ void Node3DEditor::_init_grid() {
// Don't draw lines over the origin if it's enabled.
if (!(origin_enabled && Math::is_zero_approx(position_a))) {
- Vector3 line_bgn = Vector3();
- Vector3 line_end = Vector3();
+ Vector3 line_bgn;
+ Vector3 line_end;
line_bgn[a] = position_a;
line_end[a] = position_a;
line_bgn[b] = bgn_b;
@@ -6771,8 +7052,8 @@ void Node3DEditor::_init_grid() {
}
if (!(origin_enabled && Math::is_zero_approx(position_b))) {
- Vector3 line_bgn = Vector3();
- Vector3 line_end = Vector3();
+ Vector3 line_bgn;
+ Vector3 line_end;
line_bgn[b] = position_b;
line_end[b] = position_b;
line_bgn[a] = bgn_a;
@@ -6930,14 +7211,18 @@ HashSet<RID> _get_physics_bodies_rid(Node *node) {
}
void Node3DEditor::snap_selected_nodes_to_floor() {
+ do_snap_selected_nodes_to_floor = true;
+}
+
+void Node3DEditor::_snap_selected_nodes_to_floor() {
const List<Node *> &selection = editor_selection->get_selected_node_list();
Dictionary snap_data;
for (Node *E : selection) {
Node3D *sp = Object::cast_to<Node3D>(E);
if (sp) {
- Vector3 from = Vector3();
- Vector3 position_offset = Vector3();
+ Vector3 from;
+ Vector3 position_offset;
// Priorities for snapping to floor are CollisionShapes, VisualInstances and then origin
HashSet<VisualInstance3D *> vi = _get_child_nodes<VisualInstance3D>(sp);
@@ -6967,9 +7252,10 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
}
}
if (!found_valid_shape && vi.size()) {
- AABB aabb = (*vi.begin())->get_transformed_aabb();
+ VisualInstance3D *begin = *vi.begin();
+ AABB aabb = begin->get_global_transform().xform(begin->get_aabb());
for (const VisualInstance3D *I : vi) {
- aabb.merge_with(I->get_transformed_aabb());
+ aabb.merge_with(I->get_global_transform().xform(I->get_aabb()));
}
Vector3 size = aabb.size * Vector3(0.5, 0.0, 0.5);
from = aabb.position + size;
@@ -7024,6 +7310,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
}
if (snapped_to_floor) {
+ 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
@@ -7093,6 +7380,7 @@ void Node3DEditor::_add_sun_to_scene(bool p_already_added_environment) {
ERR_FAIL_COND(!base);
Node *new_sun = preview_sun->duplicate();
+ 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
@@ -7126,6 +7414,7 @@ void Node3DEditor::_add_environment_to_scene(bool p_already_added_sun) {
new_env->set_camera_attributes(preview_environment->get_camera_attributes()->duplicate(true));
}
+ 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
@@ -7159,8 +7448,8 @@ void Node3DEditor::_update_theme() {
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT), get_theme_icon(SNAME("Panels3Alt"), SNAME("EditorIcons")));
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS), get_theme_icon(SNAME("Panels4"), SNAME("EditorIcons")));
- sun_button->set_icon(get_theme_icon(SNAME("DirectionalLight3D"), SNAME("EditorIcons")));
- environ_button->set_icon(get_theme_icon(SNAME("WorldEnvironment"), SNAME("EditorIcons")));
+ sun_button->set_icon(get_theme_icon(SNAME("PreviewSun"), SNAME("EditorIcons")));
+ environ_button->set_icon(get_theme_icon(SNAME("PreviewEnvironment"), SNAME("EditorIcons")));
sun_environ_settings->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
sun_title->add_theme_font_override("font", get_theme_font(SNAME("title_font"), SNAME("Window")));
@@ -7192,6 +7481,8 @@ void Node3DEditor::_notification(int p_what) {
sun_state->set_custom_minimum_size(sun_vb->get_combined_minimum_size());
environ_state->set_custom_minimum_size(environ_vb->get_combined_minimum_size());
+
+ EditorNode::get_singleton()->connect("project_settings_changed", callable_mp(this, &Node3DEditor::update_all_gizmos).bind(Variant()));
} break;
case NOTIFICATION_ENTER_TREE: {
@@ -7227,6 +7518,13 @@ void Node3DEditor::_notification(int p_what) {
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_pressed(false);
}
} break;
+
+ case NOTIFICATION_PHYSICS_PROCESS: {
+ if (do_snap_selected_nodes_to_floor) {
+ _snap_selected_nodes_to_floor();
+ do_snap_selected_nodes_to_floor = false;
+ }
+ }
}
}
@@ -7258,14 +7556,6 @@ Vector<int> Node3DEditor::get_subgizmo_selection() {
return ret;
}
-void Node3DEditor::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
-Ref<EditorUndoRedoManager> Node3DEditor::get_undo_redo() {
- return undo_redo;
-}
-
void Node3DEditor::add_control_to_menu_panel(Control *p_control) {
context_menu_hbox->add_child(p_control);
}
@@ -7353,6 +7643,13 @@ void Node3DEditor::_request_gizmo(Object *p_obj) {
}
}
+void Node3DEditor::_request_gizmo_for_id(ObjectID p_id) {
+ Node3D *node = Object::cast_to<Node3D>(ObjectDB::get_instance(p_id));
+ if (node) {
+ _request_gizmo(node);
+ }
+}
+
void Node3DEditor::_set_subgizmo_selection(Object *p_obj, Ref<Node3DGizmo> p_gizmo, int p_id, Transform3D p_transform) {
if (p_id == -1) {
_clear_subgizmo_selection(p_obj);
@@ -7533,6 +7830,7 @@ void Node3DEditor::_register_all_gizmos() {
void Node3DEditor::_bind_methods() {
ClassDB::bind_method("_get_editor_data", &Node3DEditor::_get_editor_data);
ClassDB::bind_method("_request_gizmo", &Node3DEditor::_request_gizmo);
+ ClassDB::bind_method("_request_gizmo_for_id", &Node3DEditor::_request_gizmo_for_id);
ClassDB::bind_method("_set_subgizmo_selection", &Node3DEditor::_set_subgizmo_selection);
ClassDB::bind_method("_clear_subgizmo_selection", &Node3DEditor::_clear_subgizmo_selection);
ClassDB::bind_method("_refresh_menu_icons", &Node3DEditor::_refresh_menu_icons);
@@ -7583,7 +7881,7 @@ void Node3DEditor::_preview_settings_changed() {
{ // preview sun
Transform3D t;
- t.basis = Basis(Vector3(sun_rotation.x, sun_rotation.y, 0));
+ t.basis = Basis::from_euler(Vector3(sun_rotation.x, sun_rotation.y, 0));
preview_sun->set_transform(t);
sun_direction->queue_redraw();
preview_sun->set_param(Light3D::PARAM_ENERGY, sun_energy->get_value());
@@ -7636,7 +7934,7 @@ void Node3DEditor::_load_default_preview_settings() {
}
void Node3DEditor::_update_preview_environment() {
- bool disable_light = directional_light_count > 0 || sun_button->is_pressed();
+ bool disable_light = directional_light_count > 0 || !sun_button->is_pressed();
sun_button->set_disabled(directional_light_count > 0);
@@ -7645,6 +7943,7 @@ void Node3DEditor::_update_preview_environment() {
preview_sun->get_parent()->remove_child(preview_sun);
sun_state->show();
sun_vb->hide();
+ preview_sun_dangling = true;
}
if (directional_light_count > 0) {
@@ -7658,13 +7957,14 @@ void Node3DEditor::_update_preview_environment() {
add_child(preview_sun, true);
sun_state->hide();
sun_vb->show();
+ preview_sun_dangling = false;
}
}
sun_angle_altitude->set_value(-Math::rad_to_deg(sun_rotation.x));
sun_angle_azimuth->set_value(180.0 - Math::rad_to_deg(sun_rotation.y));
- bool disable_env = world_env_count > 0 || environ_button->is_pressed();
+ bool disable_env = world_env_count > 0 || !environ_button->is_pressed();
environ_button->set_disabled(world_env_count > 0);
@@ -7673,6 +7973,7 @@ void Node3DEditor::_update_preview_environment() {
preview_environment->get_parent()->remove_child(preview_environment);
environ_state->show();
environ_vb->hide();
+ preview_env_dangling = true;
}
if (world_env_count > 0) {
environ_state->set_text(TTR("Scene contains\nWorldEnvironment.\nPreview disabled."));
@@ -7685,13 +7986,14 @@ void Node3DEditor::_update_preview_environment() {
add_child(preview_environment);
environ_state->hide();
environ_vb->show();
+ preview_env_dangling = false;
}
}
}
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);
@@ -7712,7 +8014,6 @@ Node3DEditor::Node3DEditor() {
gizmo.scale = 1.0;
viewport_environment = Ref<Environment>(memnew(Environment));
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
VBoxContainer *vbc = this;
custom_camera = nullptr;
@@ -7854,7 +8155,8 @@ Node3DEditor::Node3DEditor() {
sun_button->set_toggle_mode(true);
sun_button->set_flat(true);
sun_button->connect("pressed", callable_mp(this, &Node3DEditor::_update_preview_environment), CONNECT_DEFERRED);
- sun_button->set_disabled(true);
+ // Preview is enabled by default - ensure this applies on editor startup when there is no state yet.
+ sun_button->set_pressed(true);
main_menu_hbox->add_child(sun_button);
@@ -7863,7 +8165,8 @@ Node3DEditor::Node3DEditor() {
environ_button->set_toggle_mode(true);
environ_button->set_flat(true);
environ_button->connect("pressed", callable_mp(this, &Node3DEditor::_update_preview_environment), CONNECT_DEFERRED);
- environ_button->set_disabled(true);
+ // Preview is enabled by default - ensure this applies on editor startup when there is no state yet.
+ environ_button->set_pressed(true);
main_menu_hbox->add_child(environ_button);
@@ -8008,12 +8311,15 @@ Node3DEditor::Node3DEditor() {
snap_dialog->add_child(snap_dialog_vbc);
snap_translate = memnew(LineEdit);
+ snap_translate->set_select_all_on_focus(true);
snap_dialog_vbc->add_margin_child(TTR("Translate Snap:"), snap_translate);
snap_rotate = memnew(LineEdit);
+ snap_rotate->set_select_all_on_focus(true);
snap_dialog_vbc->add_margin_child(TTR("Rotate Snap (deg.):"), snap_rotate);
snap_scale = memnew(LineEdit);
+ snap_scale->set_select_all_on_focus(true);
snap_dialog_vbc->add_margin_child(TTR("Scale Snap (%):"), snap_scale);
_snap_update();
@@ -8032,6 +8338,7 @@ Node3DEditor::Node3DEditor() {
settings_fov->set_min(MIN_FOV);
settings_fov->set_step(0.1);
settings_fov->set_value(EDITOR_GET("editors/3d/default_fov"));
+ settings_fov->set_select_all_on_focus(true);
settings_vbc->add_margin_child(TTR("Perspective FOV (deg.):"), settings_fov);
settings_znear = memnew(SpinBox);
@@ -8039,6 +8346,7 @@ Node3DEditor::Node3DEditor() {
settings_znear->set_min(MIN_Z);
settings_znear->set_step(0.01);
settings_znear->set_value(EDITOR_GET("editors/3d/default_z_near"));
+ settings_znear->set_select_all_on_focus(true);
settings_vbc->add_margin_child(TTR("View Z-Near:"), settings_znear);
settings_zfar = memnew(SpinBox);
@@ -8046,6 +8354,7 @@ Node3DEditor::Node3DEditor() {
settings_zfar->set_min(MIN_Z);
settings_zfar->set_step(0.1);
settings_zfar->set_value(EDITOR_GET("editors/3d/default_z_far"));
+ settings_zfar->set_select_all_on_focus(true);
settings_vbc->add_margin_child(TTR("View Z-Far:"), settings_zfar);
for (uint32_t i = 0; i < VIEWPORTS_COUNT; ++i) {
@@ -8071,6 +8380,7 @@ Node3DEditor::Node3DEditor() {
for (int i = 0; i < 3; i++) {
xform_translate[i] = memnew(LineEdit);
xform_translate[i]->set_h_size_flags(SIZE_EXPAND_FILL);
+ xform_translate[i]->set_select_all_on_focus(true);
xform_hbc->add_child(xform_translate[i]);
}
@@ -8084,6 +8394,7 @@ Node3DEditor::Node3DEditor() {
for (int i = 0; i < 3; i++) {
xform_rotate[i] = memnew(LineEdit);
xform_rotate[i]->set_h_size_flags(SIZE_EXPAND_FILL);
+ xform_rotate[i]->set_select_all_on_focus(true);
xform_hbc->add_child(xform_rotate[i]);
}
@@ -8097,6 +8408,7 @@ Node3DEditor::Node3DEditor() {
for (int i = 0; i < 3; i++) {
xform_scale[i] = memnew(LineEdit);
xform_scale[i]->set_h_size_flags(SIZE_EXPAND_FILL);
+ xform_scale[i]->set_select_all_on_focus(true);
xform_hbc->add_child(xform_scale[i]);
}
@@ -8122,6 +8434,7 @@ Node3DEditor::Node3DEditor() {
EDITOR_DEF("editors/3d/manipulator_gizmo_opacity", 0.9);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01"));
EDITOR_DEF("editors/3d/navigation/show_viewport_rotation_gizmo", true);
+ EDITOR_DEF("editors/3d/navigation/show_viewport_navigation_gizmo", DisplayServer::get_singleton()->is_touchscreen_available());
current_hover_gizmo_handle = -1;
current_hover_gizmo_handle_secondary = false;
@@ -8329,16 +8642,24 @@ void fragment() {
}
Node3DEditor::~Node3DEditor() {
memdelete(preview_node);
+ if (preview_sun_dangling && preview_sun) {
+ memdelete(preview_sun);
+ }
+ if (preview_env_dangling && preview_environment) {
+ memdelete(preview_environment);
+ }
}
void Node3DEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
spatial_editor->show();
spatial_editor->set_process(true);
+ spatial_editor->set_physics_process(true);
} else {
spatial_editor->hide();
spatial_editor->set_process(false);
+ spatial_editor->set_physics_process(false);
}
}
@@ -8347,13 +8668,7 @@ void Node3DEditorPlugin::edit(Object *p_object) {
}
bool Node3DEditorPlugin::handles(Object *p_object) const {
- if (p_object->is_class("Node3D")) {
- return true;
- } else {
- // This ensures that gizmos are cleared when selecting a non-Node3D node.
- const_cast<Node3DEditorPlugin *>(this)->edit((Object *)nullptr);
- return false;
- }
+ return p_object->is_class("Node3D");
}
Dictionary Node3DEditorPlugin::get_state() const {
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index 580cb878ce..a1fd9757d0 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -1,59 +1,63 @@
-/*************************************************************************/
-/* node_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* node_3d_editor_plugin.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 NODE_3D_EDITOR_PLUGIN_H
#define NODE_3D_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
#include "editor/editor_scale.h"
-#include "editor/editor_spin_slider.h"
#include "editor/plugins/node_3d_editor_gizmos.h"
-#include "scene/3d/camera_3d.h"
-#include "scene/3d/light_3d.h"
-#include "scene/3d/visual_instance_3d.h"
-#include "scene/3d/world_environment.h"
-#include "scene/gui/color_picker.h"
-#include "scene/gui/panel_container.h"
+#include "scene/gui/box_container.h"
+#include "scene/gui/button.h"
#include "scene/gui/spin_box.h"
-#include "scene/gui/split_container.h"
-#include "scene/resources/environment.h"
-#include "scene/resources/fog_material.h"
-#include "scene/resources/sky_material.h"
+class AcceptDialog;
+class CheckBox;
+class ColorPickerButton;
+class ConfirmationDialog;
+class DirectionalLight3D;
class EditorData;
+class EditorSpinSlider;
+class HSplitContainer;
+class LineEdit;
+class MenuButton;
class Node3DEditor;
class Node3DEditorViewport;
+class OptionButton;
+class PanelContainer;
+class ProceduralSkyMaterial;
+class SubViewport;
class SubViewportContainer;
-class DirectionalLight3D;
+class VSplitContainer;
class WorldEnvironment;
-class EditorUndoRedoManager;
+class ViewportNavigationControl;
class ViewportRotationControl : public Control {
GDCLASS(ViewportRotationControl, Control);
@@ -74,7 +78,7 @@ class ViewportRotationControl : public Control {
Vector<Color> axis_colors;
Vector<int> axis_menu_options;
Vector2i orbiting_mouse_start;
- bool orbiting = false;
+ int orbiting_index = -1;
int focused_axis = -2;
const float AXIS_CIRCLE_RADIUS = 8.0f * EDSCALE;
@@ -87,6 +91,8 @@ protected:
void _get_sorted_axis(Vector<Axis2D> &r_axis);
void _update_focus();
void _on_mouse_exited();
+ void _process_click(int p_index, Vector2 p_position, bool p_pressed);
+ void _process_drag(Ref<InputEventWithModifiers> p_event, int p_index, Vector2 p_position, Vector2 p_relative_position);
public:
void set_viewport(Node3DEditorViewport *p_viewport);
@@ -95,6 +101,7 @@ public:
class Node3DEditorViewport : public Control {
GDCLASS(Node3DEditorViewport, Control);
friend class Node3DEditor;
+ friend class ViewportNavigationControl;
friend class ViewportRotationControl;
enum {
VIEW_TOP,
@@ -110,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,
@@ -193,6 +201,9 @@ private:
void _menu_option(int p_option);
void _set_auto_orthogonal();
Node3D *preview_node = nullptr;
+ bool update_preview_node = false;
+ Point2 preview_node_viewport_pos;
+ Vector3 preview_node_pos;
AABB *preview_bounds = nullptr;
Vector<String> selected_files;
AcceptDialog *accept = nullptr;
@@ -200,9 +211,7 @@ private:
Node *target_node = nullptr;
Point2 drop_pos;
- EditorData *editor_data = nullptr;
EditorSelection *editor_selection = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
CheckBox *preview_camera = nullptr;
SubViewportContainer *subviewport_container = nullptr;
@@ -232,6 +241,9 @@ private:
Label *preview_material_label_desc = nullptr;
VBoxContainer *top_right_vbox = nullptr;
+ VBoxContainer *bottom_center_vbox = nullptr;
+ ViewportNavigationControl *position_control = nullptr;
+ ViewportNavigationControl *look_control = nullptr;
ViewportRotationControl *rotation_control = nullptr;
Gradient *frame_time_gradient = nullptr;
Label *cpu_time_label = nullptr;
@@ -293,7 +305,8 @@ private:
NAVIGATION_PAN,
NAVIGATION_ZOOM,
NAVIGATION_ORBIT,
- NAVIGATION_LOOK
+ NAVIGATION_LOOK,
+ NAVIGATION_MOVE
};
enum TransformMode {
TRANSFORM_NONE,
@@ -372,6 +385,7 @@ private:
void _view_settings_confirmed(real_t p_interp_delta);
void _update_camera(real_t p_interp_delta);
+ void _update_navigation_controls_visibility();
Transform3D to_camera_transform(const Cursor &p_cursor) const;
void _draw();
@@ -387,6 +401,7 @@ private:
Camera3D *previewing = nullptr;
Camera3D *preview = nullptr;
+ bool previewing_camera;
bool previewing_cinema;
bool _is_node_locked(const Node *p_node);
void _preview_exited_scene();
@@ -413,7 +428,7 @@ private:
bool _create_instance(Node *parent, String &path, const Point2 &p_point);
void _perform_drop_data();
- bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
+ bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
void _project_settings_changed();
@@ -569,7 +584,7 @@ private:
bool grid_enabled = false;
bool grid_init_draw = false;
Camera3D::ProjectionType grid_camera_last_update_perspective = Camera3D::PROJECTION_PERSPECTIVE;
- Vector3 grid_camera_last_update_position = Vector3();
+ Vector3 grid_camera_last_update_position;
Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[4], scale_gizmo[3], scale_plane_gizmo[3], axis_gizmo[3];
Ref<StandardMaterial3D> gizmo_color[3];
@@ -683,7 +698,6 @@ private:
HBoxContainer *context_menu_hbox = nullptr;
void _generate_selection_boxes();
- Ref<EditorUndoRedoManager> undo_redo;
int camera_override_viewport_id;
@@ -705,6 +719,7 @@ private:
Node3D *selected = nullptr;
void _request_gizmo(Object *p_obj);
+ void _request_gizmo_for_id(ObjectID p_id);
void _set_subgizmo_selection(Object *p_obj, Ref<Node3DGizmo> p_gizmo, int p_id, Transform3D p_transform = Transform3D());
void _clear_subgizmo_selection(Object *p_obj = nullptr);
@@ -720,6 +735,9 @@ private:
void _selection_changed();
void _refresh_menu_icons();
+ bool do_snap_selected_nodes_to_floor = false;
+ void _snap_selected_nodes_to_floor();
+
// Preview Sun and Environment
uint32_t world_env_count = 0;
@@ -763,9 +781,11 @@ private:
Button *sun_environ_settings = nullptr;
DirectionalLight3D *preview_sun = nullptr;
+ bool preview_sun_dangling = false;
WorldEnvironment *preview_environment = nullptr;
+ bool preview_env_dangling = false;
Ref<Environment> environment;
- Ref<CameraAttributesPhysical> camera_attributes;
+ Ref<CameraAttributesPractical> camera_attributes;
Ref<ProceduralSkyMaterial> sky_material;
bool sun_environ_updating = false;
@@ -827,9 +847,6 @@ public:
Ref<Environment> get_viewport_environment() { return viewport_environment; }
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
- Ref<EditorUndoRedoManager> get_undo_redo();
-
void add_control_to_menu_panel(Control *p_control);
void remove_control_from_menu_panel(Control *p_control);
@@ -911,4 +928,31 @@ public:
~Node3DEditorPlugin();
};
+class ViewportNavigationControl : public Control {
+ GDCLASS(ViewportNavigationControl, Control);
+
+ Node3DEditorViewport *viewport = nullptr;
+ Vector2i focused_mouse_start;
+ Vector2 focused_pos;
+ bool hovered = false;
+ int focused_index = -1;
+ Node3DEditorViewport::NavigationMode nav_mode = Node3DEditorViewport::NavigationMode::NAVIGATION_NONE;
+
+ const float AXIS_CIRCLE_RADIUS = 30.0f * EDSCALE;
+
+protected:
+ void _notification(int p_what);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
+ void _draw();
+ void _on_mouse_entered();
+ void _on_mouse_exited();
+ void _process_click(int p_index, Vector2 p_position, bool p_pressed);
+ void _process_drag(int p_index, Vector2 p_position, Vector2 p_relative_position);
+ void _update_navigation();
+
+public:
+ void set_navigation_mode(Node3DEditorViewport::NavigationMode p_nav_mode);
+ void set_viewport(Node3DEditorViewport *p_viewport);
+};
+
#endif // NODE_3D_EDITOR_PLUGIN_H
diff --git a/editor/plugins/occluder_instance_3d_editor_plugin.cpp b/editor/plugins/occluder_instance_3d_editor_plugin.cpp
index 365f74d7a3..cfe95f1cfa 100644
--- a/editor/plugins/occluder_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/occluder_instance_3d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* occluder_instance_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* occluder_instance_3d_editor_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 "occluder_instance_3d_editor_plugin.h"
diff --git a/editor/plugins/occluder_instance_3d_editor_plugin.h b/editor/plugins/occluder_instance_3d_editor_plugin.h
index e8d98927f4..54ac95c9e1 100644
--- a/editor/plugins/occluder_instance_3d_editor_plugin.h
+++ b/editor/plugins/occluder_instance_3d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* occluder_instance_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* occluder_instance_3d_editor_plugin.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 OCCLUDER_INSTANCE_3D_EDITOR_PLUGIN_H
#define OCCLUDER_INSTANCE_3D_EDITOR_PLUGIN_H
diff --git a/editor/plugins/packed_scene_editor_plugin.cpp b/editor/plugins/packed_scene_editor_plugin.cpp
new file mode 100644
index 0000000000..3239375e1e
--- /dev/null
+++ b/editor/plugins/packed_scene_editor_plugin.cpp
@@ -0,0 +1,81 @@
+/**************************************************************************/
+/* packed_scene_editor_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 "packed_scene_editor_plugin.h"
+
+#include "editor/editor_node.h"
+#include "scene/gui/button.h"
+#include "scene/resources/packed_scene.h"
+#include "scene/scene_string_names.h"
+
+void PackedSceneEditor::_on_open_scene_pressed() {
+ // Using deferred call because changing scene updates the Inspector and thus destroys this plugin.
+ callable_mp(EditorNode::get_singleton(), &EditorNode::open_request).call_deferred(packed_scene->get_path());
+}
+
+void PackedSceneEditor::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE:
+ case NOTIFICATION_THEME_CHANGED: {
+ open_scene_button->set_icon(get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")));
+ } break;
+ }
+}
+
+PackedSceneEditor::PackedSceneEditor(Ref<PackedScene> &p_packed_scene) {
+ packed_scene = p_packed_scene;
+
+ open_scene_button = EditorInspector::create_inspector_action_button(TTR("Open Scene"));
+ open_scene_button->connect(SNAME("pressed"), callable_mp(this, &PackedSceneEditor::_on_open_scene_pressed));
+ open_scene_button->set_disabled(!packed_scene->get_path().get_file().is_valid_filename());
+ add_child(open_scene_button);
+
+ add_child(memnew(Control)); // Add padding before the regular properties.
+}
+
+///////////////////////
+
+bool EditorInspectorPluginPackedScene::can_handle(Object *p_object) {
+ return Object::cast_to<PackedScene>(p_object) != nullptr;
+}
+
+void EditorInspectorPluginPackedScene::parse_begin(Object *p_object) {
+ Ref<PackedScene> packed_scene(p_object);
+ PackedSceneEditor *editor = memnew(PackedSceneEditor(packed_scene));
+ add_custom_control(editor);
+}
+
+///////////////////////
+
+PackedSceneEditorPlugin::PackedSceneEditorPlugin() {
+ Ref<EditorInspectorPluginPackedScene> plugin;
+ plugin.instantiate();
+ add_inspector_plugin(plugin);
+}
diff --git a/editor/plugins/packed_scene_editor_plugin.h b/editor/plugins/packed_scene_editor_plugin.h
new file mode 100644
index 0000000000..308bcf1c05
--- /dev/null
+++ b/editor/plugins/packed_scene_editor_plugin.h
@@ -0,0 +1,68 @@
+/**************************************************************************/
+/* packed_scene_editor_plugin.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 PACKED_SCENE_EDITOR_PLUGIN_H
+#define PACKED_SCENE_EDITOR_PLUGIN_H
+
+#include "editor/editor_inspector.h"
+#include "editor/editor_plugin.h"
+#include "scene/gui/box_container.h"
+
+class PackedSceneEditor : public VBoxContainer {
+ GDCLASS(PackedSceneEditor, VBoxContainer);
+
+ Ref<PackedScene> packed_scene;
+ Button *open_scene_button;
+
+ void _on_open_scene_pressed();
+
+protected:
+ void _notification(int p_what);
+
+public:
+ PackedSceneEditor(Ref<PackedScene> &p_packed_scene);
+};
+
+class EditorInspectorPluginPackedScene : public EditorInspectorPlugin {
+ GDCLASS(EditorInspectorPluginPackedScene, EditorInspectorPlugin);
+
+public:
+ virtual bool can_handle(Object *p_object) override;
+ virtual void parse_begin(Object *p_object) override;
+};
+
+class PackedSceneEditorPlugin : public EditorPlugin {
+ GDCLASS(PackedSceneEditorPlugin, EditorPlugin);
+
+public:
+ PackedSceneEditorPlugin();
+};
+
+#endif // PACKED_SCENE_EDITOR_PLUGIN_H
diff --git a/editor/plugins/packed_scene_translation_parser_plugin.cpp b/editor/plugins/packed_scene_translation_parser_plugin.cpp
index 2f4ae734d1..83d7778196 100644
--- a/editor/plugins/packed_scene_translation_parser_plugin.cpp
+++ b/editor/plugins/packed_scene_translation_parser_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* packed_scene_translation_parser_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* packed_scene_translation_parser_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 "packed_scene_translation_parser_plugin.h"
diff --git a/editor/plugins/packed_scene_translation_parser_plugin.h b/editor/plugins/packed_scene_translation_parser_plugin.h
index 1bfb500933..d1a92ded32 100644
--- a/editor/plugins/packed_scene_translation_parser_plugin.h
+++ b/editor/plugins/packed_scene_translation_parser_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* packed_scene_translation_parser_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* packed_scene_translation_parser_plugin.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 PACKED_SCENE_TRANSLATION_PARSER_PLUGIN_H
#define PACKED_SCENE_TRANSLATION_PARSER_PLUGIN_H
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index c8bd4c1d05..63f6643ba3 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* path_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* path_2d_editor_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 "path_2d_editor_plugin.h"
@@ -37,6 +37,7 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
+#include "scene/gui/menu_button.h"
void Path2DEditor::_notification(int p_what) {
switch (p_what) {
@@ -119,6 +120,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
}
// Check for point deletion.
+ 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"));
@@ -153,6 +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();
+ 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());
@@ -188,6 +191,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
insertion_point = curve->get_point_count() - 2;
}
+ 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);
@@ -211,6 +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();
+ 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:
@@ -486,6 +491,7 @@ void Path2DEditor::_mode_selected(int p_mode) {
return;
}
+ 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());
@@ -519,7 +525,6 @@ void Path2DEditor::_handle_option_pressed(int p_option) {
Path2DEditor::Path2DEditor() {
canvas_item_editor = nullptr;
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
mirror_handle_angle = true;
mirror_handle_length = true;
on_edge = false;
diff --git a/editor/plugins/path_2d_editor_plugin.h b/editor/plugins/path_2d_editor_plugin.h
index 13eca79010..25af0bf616 100644
--- a/editor/plugins/path_2d_editor_plugin.h
+++ b/editor/plugins/path_2d_editor_plugin.h
@@ -1,48 +1,47 @@
-/*************************************************************************/
-/* path_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* path_2d_editor_plugin.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 PATH_2D_EDITOR_PLUGIN_H
#define PATH_2D_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
#include "scene/2d/path_2d.h"
+#include "scene/gui/box_container.h"
#include "scene/gui/separator.h"
class CanvasItemEditor;
-class EditorUndoRedoManager;
+class MenuButton;
class Path2DEditor : public HBoxContainer {
GDCLASS(Path2DEditor, HBoxContainer);
- Ref<EditorUndoRedoManager> undo_redo;
-
CanvasItemEditor *canvas_item_editor = nullptr;
Panel *panel = nullptr;
Path2D *node = nullptr;
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index adfaf11264..75cd04bee8 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* path_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* path_3d_editor_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 "path_3d_editor_plugin.h"
@@ -37,6 +37,7 @@
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "node_3d_editor_plugin.h"
+#include "scene/gui/menu_button.h"
#include "scene/resources/curve.h"
static bool _is_in_handle(int p_id, int p_num_points) {
@@ -173,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) {
@@ -239,70 +240,92 @@ void Path3DGizmo::redraw() {
return;
}
- Vector<Vector3> v3a = c->tessellate();
- //Vector<Vector3> v3a=c->get_baked_points();
+ real_t interval = 0.1;
+ const real_t length = c->get_baked_length();
- int v3s = v3a.size();
- if (v3s == 0) {
- return;
- }
- Vector<Vector3> v3p;
- const Vector3 *r = v3a.ptr();
-
- // BUG: the following won't work when v3s, avoid drawing as a temporary workaround.
- for (int i = 0; i < v3s - 1; i++) {
- v3p.push_back(r[i]);
- v3p.push_back(r[i + 1]);
- //v3p.push_back(r[i]);
- //v3p.push_back(r[i]+Vector3(0,0.2,0));
- }
+ // 1. Draw curve and bones.
+ if (length > CMP_EPSILON) {
+ const int sample_count = int(length / interval) + 2;
+ interval = length / (sample_count - 1); // Recalculate real interval length.
+
+ Vector<Transform3D> frames;
+ frames.resize(sample_count);
+
+ {
+ Transform3D *w = frames.ptrw();
+
+ for (int i = 0; i < sample_count; i++) {
+ w[i] = c->sample_baked_with_rotation(i * interval, true, true);
+ }
+ }
+
+ const Transform3D *r = frames.ptr();
+ Vector<Vector3> v3p;
+ for (int i = 0; i < sample_count - 1; i++) {
+ const Vector3 p1 = r[i].origin;
+ const Vector3 p2 = r[i + 1].origin;
+ const Vector3 side = r[i].basis.get_column(0);
+ const Vector3 up = r[i].basis.get_column(1);
+ const Vector3 forward = r[i].basis.get_column(2);
+
+ // Curve segment.
+ v3p.push_back(p1);
+ v3p.push_back(p2);
+
+ // Fish Bone.
+ v3p.push_back(p1);
+ v3p.push_back(p1 + (side - forward + up * 0.3) * 0.06);
+
+ v3p.push_back(p1);
+ v3p.push_back(p1 + (-side - forward + up * 0.3) * 0.06);
+ }
- if (v3p.size() > 1) {
add_lines(v3p, path_material);
add_collision_segments(v3p);
}
+ // 2. Draw handles.
if (Path3DEditorPlugin::singleton->get_edited_path() == path) {
- v3p.clear();
- Vector<Vector3> handles;
- Vector<Vector3> sec_handles;
+ Vector<Vector3> v3p;
+ Vector<Vector3> handle_points;
+ Vector<Vector3> sec_handle_points;
for (int i = 0; i < c->get_point_count(); i++) {
Vector3 p = c->get_point_position(i);
- handles.push_back(p);
- // push Out points first so they get selected if the In and Out points are on top of each other.
+ handle_points.push_back(p);
+ // Push out points first so they get selected if the In and Out points are on top of each other.
if (i < c->get_point_count() - 1) {
v3p.push_back(p);
v3p.push_back(p + c->get_point_out(i));
- sec_handles.push_back(p + c->get_point_out(i));
+ sec_handle_points.push_back(p + c->get_point_out(i));
}
if (i > 0) {
v3p.push_back(p);
v3p.push_back(p + c->get_point_in(i));
- sec_handles.push_back(p + c->get_point_in(i));
+ sec_handle_points.push_back(p + c->get_point_in(i));
}
}
if (v3p.size() > 1) {
add_lines(v3p, path_thin_material);
}
- if (handles.size()) {
- add_handles(handles, handles_material);
+ if (handle_points.size()) {
+ add_handles(handle_points, handles_material);
}
- if (sec_handles.size()) {
- add_handles(sec_handles, sec_handles_material, Vector<int>(), false, true);
+ if (sec_handle_points.size()) {
+ add_handles(sec_handle_points, sec_handles_material, Vector<int>(), false, true);
}
}
}
Path3DGizmo::Path3DGizmo(Path3D *p_path) {
path = p_path;
- set_spatial_node(p_path);
+ set_node_3d(p_path);
orig_in_length = 0;
orig_out_length = 0;
}
-EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
+EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
if (!path) {
return EditorPlugin::AFTER_GUI_INPUT_PASS;
}
@@ -386,7 +409,7 @@ EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_spatial_gui_input(Camera
}
}
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
if (closest_seg != -1) {
//subdivide
@@ -428,21 +451,21 @@ EditorPlugin::AfterGUIInput Path3DEditorPlugin::forward_spatial_gui_input(Camera
// 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));
@@ -521,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/path_3d_editor_plugin.h b/editor/plugins/path_3d_editor_plugin.h
index 53e4e2efa8..110a0be377 100644
--- a/editor/plugins/path_3d_editor_plugin.h
+++ b/editor/plugins/path_3d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* path_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* path_3d_editor_plugin.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 PATH_3D_EDITOR_PLUGIN_H
#define PATH_3D_EDITOR_PLUGIN_H
@@ -37,6 +37,8 @@
#include "scene/3d/path_3d.h"
#include "scene/gui/separator.h"
+class MenuButton;
+
class Path3DGizmo : public EditorNode3DGizmo {
GDCLASS(Path3DGizmo, EditorNode3DGizmo);
@@ -101,7 +103,7 @@ public:
Path3D *get_edited_path() { return path; }
static Path3DEditorPlugin *singleton;
- virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override;
+ virtual EditorPlugin::AfterGUIInput forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override;
virtual String get_name() const override { return "Path3D"; }
bool has_main_screen() const override { return false; }
diff --git a/editor/plugins/physical_bone_3d_editor_plugin.cpp b/editor/plugins/physical_bone_3d_editor_plugin.cpp
index 9dc89133c4..b716cee3ff 100644
--- a/editor/plugins/physical_bone_3d_editor_plugin.cpp
+++ b/editor/plugins/physical_bone_3d_editor_plugin.cpp
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* physical_bone_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* physical_bone_3d_editor_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 "physical_bone_3d_editor_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
+#include "scene/gui/separator.h"
void PhysicalBone3DEditor::_bind_methods() {
}
diff --git a/editor/plugins/physical_bone_3d_editor_plugin.h b/editor/plugins/physical_bone_3d_editor_plugin.h
index f15eab7991..c9799d3faa 100644
--- a/editor/plugins/physical_bone_3d_editor_plugin.h
+++ b/editor/plugins/physical_bone_3d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* physical_bone_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* physical_bone_3d_editor_plugin.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 PHYSICAL_BONE_3D_EDITOR_PLUGIN_H
#define PHYSICAL_BONE_3D_EDITOR_PLUGIN_H
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 58a3a07c43..05fc464226 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -1,45 +1,51 @@
-/*************************************************************************/
-/* polygon_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* polygon_2d_editor_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 "polygon_2d_editor_plugin.h"
#include "core/input/input_event.h"
#include "core/math/geometry_2d.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "scene/2d/skeleton_2d.h"
+#include "scene/gui/check_box.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/scroll_container.h"
#include "scene/gui/separator.h"
#include "scene/gui/slider.h"
+#include "scene/gui/spin_box.h"
+#include "scene/gui/split_container.h"
+#include "scene/gui/texture_rect.h"
#include "scene/gui/view_panner.h"
Node2D *Polygon2DEditor::_get_node() const {
@@ -67,7 +73,7 @@ void Polygon2DEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- uv_panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/sub_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
+ uv_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_READY: {
@@ -150,6 +156,7 @@ void Polygon2DEditor::_sync_bones() {
Array new_bones = node->call("_get_bones");
+ 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);
@@ -279,6 +286,7 @@ void Polygon2DEditor::_uv_edit_popup_hide() {
}
void Polygon2DEditor::_menu_option(int p_option) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (p_option) {
case MODE_EDIT_UV: {
if (node->get_texture().is_null()) {
@@ -299,7 +307,7 @@ void Polygon2DEditor::_menu_option(int p_option) {
}
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/uv_editor_bounds")) {
- uv_edit->popup(EditorSettings::get_singleton()->get("interface/dialogs/uv_editor_bounds"));
+ uv_edit->popup(EDITOR_GET("interface/dialogs/uv_editor_bounds"));
} else {
uv_edit->popup_centered_ratio(0.85);
}
@@ -391,6 +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.
+ 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");
@@ -458,8 +467,9 @@ 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<InputEventMouseButton> mb = p_input;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ Ref<InputEventMouseButton> mb = p_input;
if (mb.is_valid()) {
if (mb->get_button_index() == MouseButton::LEFT) {
if (mb->is_pressed()) {
diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h
index d878d3f9af..7246c08bea 100644
--- a/editor/plugins/polygon_2d_editor_plugin.h
+++ b/editor/plugins/polygon_2d_editor_plugin.h
@@ -1,43 +1,49 @@
-/*************************************************************************/
-/* polygon_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* polygon_2d_editor_plugin.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 POLYGON_2D_EDITOR_PLUGIN_H
#define POLYGON_2D_EDITOR_PLUGIN_H
#include "editor/plugins/abstract_polygon_2d_editor.h"
+class AcceptDialog;
+class ButtonGroup;
+class HScrollBar;
class HSlider;
+class MenuButton;
class Panel;
class ScrollContainer;
class SpinBox;
+class TextureRect;
class ViewPanner;
+class VScrollBar;
class Polygon2DEditor : public AbstractPolygon2DEditor {
GDCLASS(Polygon2DEditor, AbstractPolygon2DEditor);
diff --git a/editor/plugins/polygon_3d_editor_plugin.cpp b/editor/plugins/polygon_3d_editor_plugin.cpp
index 2b3a5c3e23..9defb4de9b 100644
--- a/editor/plugins/polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/polygon_3d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* polygon_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* polygon_3d_editor_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 "polygon_3d_editor_plugin.h"
@@ -41,6 +41,7 @@
#include "editor/editor_undo_redo_manager.h"
#include "node_3d_editor_plugin.h"
#include "scene/3d/camera_3d.h"
+#include "scene/gui/separator.h"
void Polygon3DEditor::_notification(int p_what) {
switch (p_what) {
@@ -95,6 +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.");
+ 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);
@@ -109,7 +111,7 @@ void Polygon3DEditor::_wip_close() {
undo_redo->commit_action();
}
-EditorPlugin::AfterGUIInput Polygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
+EditorPlugin::AfterGUIInput Polygon3DEditor::forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
if (!node) {
return EditorPlugin::AFTER_GUI_INPUT_PASS;
}
@@ -184,6 +186,7 @@ EditorPlugin::AfterGUIInput Polygon3DEditor::forward_spatial_gui_input(Camera3D
if (mb->is_pressed()) {
if (mb->is_ctrl_pressed()) {
if (poly.size() < 3) {
+ 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);
@@ -262,6 +265,7 @@ EditorPlugin::AfterGUIInput Polygon3DEditor::forward_spatial_gui_input(Camera3D
ERR_FAIL_INDEX_V(edited_point, poly.size(), EditorPlugin::AFTER_GUI_INPUT_PASS);
poly.write[edited_point] = edited_point_pos;
+ 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);
@@ -290,6 +294,7 @@ EditorPlugin::AfterGUIInput Polygon3DEditor::forward_spatial_gui_input(Camera3D
}
if (closest_idx >= 0) {
+ 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);
@@ -308,7 +313,7 @@ EditorPlugin::AfterGUIInput Polygon3DEditor::forward_spatial_gui_input(Camera3D
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);
@@ -527,7 +532,6 @@ void Polygon3DEditor::_bind_methods() {
Polygon3DEditor::Polygon3DEditor() {
node = nullptr;
- undo_redo = EditorNode::get_undo_redo();
add_child(memnew(VSeparator));
button_create = memnew(Button);
diff --git a/editor/plugins/polygon_3d_editor_plugin.h b/editor/plugins/polygon_3d_editor_plugin.h
index 0eb02a39e2..6cb9275dd6 100644
--- a/editor/plugins/polygon_3d_editor_plugin.h
+++ b/editor/plugins/polygon_3d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* polygon_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* polygon_3d_editor_plugin.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 POLYGON_3D_EDITOR_PLUGIN_H
#define POLYGON_3D_EDITOR_PLUGIN_H
@@ -34,15 +34,15 @@
#include "editor/editor_plugin.h"
#include "scene/3d/collision_polygon_3d.h"
#include "scene/3d/mesh_instance_3d.h"
+#include "scene/gui/box_container.h"
#include "scene/resources/immediate_mesh.h"
class CanvasItemEditor;
-class EditorUndoRedoManager;
+class MenuButton;
class Polygon3DEditor : public HBoxContainer {
GDCLASS(Polygon3DEditor, HBoxContainer);
- Ref<EditorUndoRedoManager> undo_redo;
enum Mode {
MODE_CREATE,
MODE_EDIT,
@@ -90,7 +90,7 @@ protected:
static void _bind_methods();
public:
- virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event);
+ virtual EditorPlugin::AfterGUIInput forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event);
void edit(Node *p_node);
Polygon3DEditor();
~Polygon3DEditor();
@@ -102,7 +102,7 @@ class Polygon3DEditorPlugin : public EditorPlugin {
Polygon3DEditor *polygon_editor = nullptr;
public:
- virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override { return polygon_editor->forward_spatial_gui_input(p_camera, p_event); }
+ virtual EditorPlugin::AfterGUIInput forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override { return polygon_editor->forward_3d_gui_input(p_camera, p_event); }
virtual String get_name() const override { return "Polygon3DEditor"; }
bool has_main_screen() const override { return false; }
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index 21647d1b69..dcbff2c756 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* resource_preloader_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_preloader_editor_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 "resource_preloader_editor_plugin.h"
@@ -36,6 +36,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
void ResourcePreloaderEditor::_notification(int p_what) {
switch (p_what) {
@@ -70,6 +71,7 @@ void ResourcePreloaderEditor::_files_load_request(const Vector<String> &p_paths)
name = basename + " " + itos(counter);
}
+ 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);
@@ -114,6 +116,7 @@ void ResourcePreloaderEditor::_item_edited() {
}
Ref<Resource> samp = preloader->get_resource(old_name);
+ 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);
@@ -126,6 +129,7 @@ void ResourcePreloaderEditor::_item_edited() {
}
void ResourcePreloaderEditor::_remove_resource(const String &p_to_remove) {
+ 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));
@@ -159,6 +163,7 @@ void ResourcePreloaderEditor::_paste_pressed() {
name = basename + " " + itos(counter);
}
+ 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);
@@ -234,10 +239,6 @@ void ResourcePreloaderEditor::_cell_button_pressed(Object *p_item, int p_column,
}
}
-void ResourcePreloaderEditor::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
-}
-
void ResourcePreloaderEditor::edit(ResourcePreloader *p_preloader) {
preloader = p_preloader;
@@ -321,6 +322,7 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2 &p_point, const Variant
name = basename + "_" + itos(counter);
}
+ 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);
@@ -340,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() {
@@ -377,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);
@@ -391,7 +389,6 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
}
void ResourcePreloaderEditorPlugin::edit(Object *p_object) {
- preloader_editor->set_undo_redo(EditorNode::get_undo_redo());
ResourcePreloader *s = Object::cast_to<ResourcePreloader>(p_object);
if (!s) {
return;
diff --git a/editor/plugins/resource_preloader_editor_plugin.h b/editor/plugins/resource_preloader_editor_plugin.h
index ef80283dae..7a4cabbb69 100644
--- a/editor/plugins/resource_preloader_editor_plugin.h
+++ b/editor/plugins/resource_preloader_editor_plugin.h
@@ -1,43 +1,43 @@
-/*************************************************************************/
-/* resource_preloader_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* resource_preloader_editor_plugin.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 RESOURCE_PRELOADER_EDITOR_PLUGIN_H
#define RESOURCE_PRELOADER_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
#include "scene/gui/dialogs.h"
+#include "scene/gui/panel_container.h"
#include "scene/gui/tree.h"
#include "scene/main/resource_preloader.h"
class EditorFileDialog;
-class EditorUndoRedoManager;
class ResourcePreloaderEditor : public PanelContainer {
GDCLASS(ResourcePreloaderEditor, PanelContainer);
@@ -67,8 +67,6 @@ class ResourcePreloaderEditor : public PanelContainer {
void _cell_button_pressed(Object *p_item, int p_column, int p_id, MouseButton p_button);
void _item_edited();
- Ref<EditorUndoRedoManager> undo_redo;
-
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
@@ -79,8 +77,6 @@ protected:
static void _bind_methods();
public:
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
-
void edit(ResourcePreloader *p_preloader);
ResourcePreloaderEditor();
};
diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp
index de30c4100d..d894ba4c4a 100644
--- a/editor/plugins/root_motion_editor_plugin.cpp
+++ b/editor/plugins/root_motion_editor_plugin.cpp
@@ -1,35 +1,38 @@
-/*************************************************************************/
-/* root_motion_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* root_motion_editor_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 "root_motion_editor_plugin.h"
#include "editor/editor_node.h"
+#include "scene/animation/animation_player.h"
+#include "scene/animation/animation_tree.h"
+#include "scene/gui/tree.h"
#include "scene/main/window.h"
void EditorPropertyRootMotion::_confirmed() {
@@ -45,8 +48,6 @@ void EditorPropertyRootMotion::_confirmed() {
}
void EditorPropertyRootMotion::_node_assign() {
- NodePath current = get_edited_object()->get(get_edited_property());
-
AnimationTree *atree = Object::cast_to<AnimationTree>(get_edited_object());
if (!atree->has_node(atree->get_animation_player())) {
EditorNode::get_singleton()->show_warning(TTR("AnimationTree has no path set to an AnimationPlayer"));
@@ -73,7 +74,10 @@ void EditorPropertyRootMotion::_node_assign() {
for (const StringName &E : animations) {
Ref<Animation> anim = player->get_animation(E);
for (int i = 0; i < anim->get_track_count(); i++) {
- paths.insert(anim->track_get_path(i));
+ String pathname = anim->track_get_path(i).get_concatenated_names();
+ if (!paths.has(pathname)) {
+ paths.insert(pathname);
+ }
}
}
}
@@ -122,66 +126,33 @@ void EditorPropertyRootMotion::_node_assign() {
continue; //no node, can't edit
}
- if (path.get_subname_count()) {
- String concat = path.get_concatenated_subnames();
-
- Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(node);
- if (skeleton && skeleton->find_bone(concat) != -1) {
- //path in skeleton
- const String &bone = concat;
- int idx = skeleton->find_bone(bone);
- List<String> bone_path;
- while (idx != -1) {
- bone_path.push_front(skeleton->get_bone_name(idx));
- idx = skeleton->get_bone_parent(idx);
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(node);
+ if (skeleton) {
+ HashMap<int, TreeItem *> items;
+ items.insert(-1, ti);
+ Ref<Texture> bone_icon = get_theme_icon(SNAME("BoneAttachment3D"), SNAME("EditorIcons"));
+ Vector<int> bones_to_process = skeleton->get_parentless_bones();
+ while (bones_to_process.size() > 0) {
+ int current_bone_idx = bones_to_process[0];
+ bones_to_process.erase(current_bone_idx);
+
+ Vector<int> current_bone_child_bones = skeleton->get_bone_children(current_bone_idx);
+ int child_bone_size = current_bone_child_bones.size();
+ for (int i = 0; i < child_bone_size; i++) {
+ bones_to_process.push_back(current_bone_child_bones[i]);
}
- accum += ":";
- for (List<String>::Element *F = bone_path.front(); F; F = F->next()) {
- if (F != bone_path.front()) {
- accum += "/";
- }
-
- accum += F->get();
- if (!parenthood.has(accum)) {
- ti = filters->create_item(ti);
- parenthood[accum] = ti;
- ti->set_text(0, F->get());
- ti->set_selectable(0, true);
- ti->set_editable(0, false);
- ti->set_icon(0, get_theme_icon(SNAME("BoneAttachment3D"), SNAME("EditorIcons")));
- ti->set_metadata(0, accum);
- } else {
- ti = parenthood[accum];
- }
- }
+ const int parent_idx = skeleton->get_bone_parent(current_bone_idx);
+ TreeItem *parent_item = items.find(parent_idx)->value;
- ti->set_selectable(0, true);
- ti->set_text(0, concat);
- ti->set_icon(0, get_theme_icon(SNAME("BoneAttachment3D"), SNAME("EditorIcons")));
- ti->set_metadata(0, path);
- if (path == current) {
- ti->select(0);
- }
+ TreeItem *joint_item = filters->create_item(parent_item);
+ items.insert(current_bone_idx, joint_item);
- } else {
- //just a property
- ti = filters->create_item(ti);
- ti->set_text(0, concat);
- ti->set_selectable(0, true);
- ti->set_metadata(0, path);
- if (path == current) {
- ti->select(0);
- }
- }
- } else {
- if (ti) {
- //just a node, likely call or animation track
- ti->set_selectable(0, true);
- ti->set_metadata(0, path);
- if (path == current) {
- ti->select(0);
- }
+ joint_item->set_text(0, skeleton->get_bone_name(current_bone_idx));
+ joint_item->set_icon(0, bone_icon);
+ joint_item->set_selectable(0, true);
+ joint_item->set_metadata(0, accum + ":" + skeleton->get_bone_name(current_bone_idx));
+ joint_item->set_collapsed(true);
}
}
}
@@ -197,7 +168,6 @@ void EditorPropertyRootMotion::_node_clear() {
void EditorPropertyRootMotion::update_property() {
NodePath p = get_edited_object()->get(get_edited_property());
-
assign->set_tooltip_text(p);
if (p == NodePath()) {
assign->set_icon(Ref<Texture2D>());
@@ -206,26 +176,8 @@ void EditorPropertyRootMotion::update_property() {
return;
}
- Node *base_node = nullptr;
- if (base_hint != NodePath()) {
- if (get_tree()->get_root()->has_node(base_hint)) {
- base_node = get_tree()->get_root()->get_node(base_hint);
- }
- } else {
- base_node = Object::cast_to<Node>(get_edited_object());
- }
-
- if (!base_node || !base_node->has_node(p)) {
- assign->set_icon(Ref<Texture2D>());
- assign->set_text(p);
- return;
- }
-
- Node *target_node = base_node->get_node(p);
- ERR_FAIL_COND(!target_node);
-
- assign->set_text(target_node->get_name());
- assign->set_icon(EditorNode::get_singleton()->get_object_icon(target_node, "Node"));
+ assign->set_icon(Ref<Texture2D>());
+ assign->set_text(p);
}
void EditorPropertyRootMotion::setup(const NodePath &p_base_hint) {
@@ -280,9 +232,6 @@ bool EditorInspectorRootMotionPlugin::can_handle(Object *p_object) {
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) {
if (p_path == "root_motion_track" && p_object->is_class("AnimationTree") && p_type == Variant::NODE_PATH) {
EditorPropertyRootMotion *editor = memnew(EditorPropertyRootMotion);
- if (p_hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && !p_hint_text.is_empty()) {
- editor->setup(p_hint_text);
- }
add_property_editor(p_path, editor);
return true;
}
diff --git a/editor/plugins/root_motion_editor_plugin.h b/editor/plugins/root_motion_editor_plugin.h
index 5b8c1d77b3..f9b1a9f478 100644
--- a/editor/plugins/root_motion_editor_plugin.h
+++ b/editor/plugins/root_motion_editor_plugin.h
@@ -1,40 +1,39 @@
-/*************************************************************************/
-/* root_motion_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* root_motion_editor_plugin.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 ROOT_MOTION_EDITOR_PLUGIN_H
#define ROOT_MOTION_EDITOR_PLUGIN_H
#include "editor/editor_inspector.h"
-#include "editor/editor_spin_slider.h"
-#include "editor/property_selector.h"
-#include "scene/animation/animation_tree.h"
+
+class Tree;
class EditorPropertyRootMotion : public EditorProperty {
GDCLASS(EditorPropertyRootMotion, EditorProperty);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 0a111aeb49..e515b46b1e 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* script_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* script_editor_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 "script_editor_plugin.h"
@@ -40,6 +40,7 @@
#include "editor/debugger/editor_debugger_node.h"
#include "editor/debugger/script_editor_debugger.h"
#include "editor/editor_file_dialog.h"
+#include "editor/editor_help_search.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "editor/editor_run_script.h"
@@ -47,8 +48,10 @@
#include "editor/editor_settings.h"
#include "editor/filesystem_dock.h"
#include "editor/find_in_files.h"
+#include "editor/inspector_dock.h"
#include "editor/node_dock.h"
#include "editor/plugins/shader_editor_plugin.h"
+#include "editor/plugins/text_shader_editor.h"
#include "scene/main/window.h"
#include "scene/scene_string_names.h"
#include "script_text_editor.h"
@@ -58,19 +61,15 @@
/*** SYNTAX HIGHLIGHTER ****/
String EditorSyntaxHighlighter::_get_name() const {
- String ret;
- if (GDVIRTUAL_CALL(_get_name, ret)) {
- return ret;
- }
- return "Unnamed";
+ String ret = "Unnamed";
+ GDVIRTUAL_CALL(_get_name, ret);
+ return ret;
}
PackedStringArray EditorSyntaxHighlighter::_get_supported_languages() const {
PackedStringArray ret;
- if (GDVIRTUAL_CALL(_get_supported_languages, ret)) {
- return ret;
- }
- return PackedStringArray();
+ GDVIRTUAL_CALL(_get_supported_languages, ret);
+ return ret;
}
Ref<EditorSyntaxHighlighter> EditorSyntaxHighlighter::_create() const {
@@ -127,12 +126,12 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
}
}
- const Ref<Script> script = _get_edited_resource();
- if (script.is_valid()) {
+ const Ref<Script> scr = _get_edited_resource();
+ if (scr.is_valid()) {
/* Core types. */
const Color basetype_color = EDITOR_GET("text_editor/theme/highlighting/base_type_color");
List<String> core_types;
- script->get_language()->get_core_type_words(&core_types);
+ scr->get_language()->get_core_type_words(&core_types);
for (const String &E : core_types) {
highlighter->add_keyword_color(E, basetype_color);
}
@@ -141,9 +140,9 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
const Color keyword_color = EDITOR_GET("text_editor/theme/highlighting/keyword_color");
const Color control_flow_keyword_color = EDITOR_GET("text_editor/theme/highlighting/control_flow_keyword_color");
List<String> keywords;
- script->get_language()->get_reserved_words(&keywords);
+ scr->get_language()->get_reserved_words(&keywords);
for (const String &E : keywords) {
- if (script->get_language()->is_control_flow_keyword(E)) {
+ if (scr->get_language()->is_control_flow_keyword(E)) {
highlighter->add_keyword_color(E, control_flow_keyword_color);
} else {
highlighter->add_keyword_color(E, keyword_color);
@@ -152,19 +151,19 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
/* Member types. */
const Color member_variable_color = EDITOR_GET("text_editor/theme/highlighting/member_variable_color");
- StringName instance_base = script->get_instance_base_type();
+ StringName instance_base = scr->get_instance_base_type();
if (instance_base != StringName()) {
List<PropertyInfo> plist;
ClassDB::get_property_list(instance_base, &plist);
for (const PropertyInfo &E : plist) {
- String name = E.name;
+ String prop_name = E.name;
if (E.usage & PROPERTY_USAGE_CATEGORY || E.usage & PROPERTY_USAGE_GROUP || E.usage & PROPERTY_USAGE_SUBGROUP) {
continue;
}
- if (name.contains("/")) {
+ if (prop_name.contains("/")) {
continue;
}
- highlighter->add_member_keyword_color(name, member_variable_color);
+ highlighter->add_member_keyword_color(prop_name, member_variable_color);
}
List<String> clist;
@@ -177,7 +176,7 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
/* Comments */
const Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
List<String> comments;
- script->get_language()->get_comment_delimiters(&comments);
+ scr->get_language()->get_comment_delimiters(&comments);
for (const String &comment : comments) {
String beg = comment.get_slice(" ", 0);
String end = comment.get_slice_count(" ") > 1 ? comment.get_slice(" ", 1) : String();
@@ -187,7 +186,7 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
/* Strings */
const Color string_color = EDITOR_GET("text_editor/theme/highlighting/string_color");
List<String> strings;
- script->get_language()->get_string_delimiters(&strings);
+ scr->get_language()->get_string_delimiters(&strings);
for (const String &string : strings) {
String beg = string.get_slice(" ", 0);
String end = string.get_slice_count(" ") > 1 ? string.get_slice(" ", 1) : String();
@@ -224,9 +223,9 @@ 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")));
}
class EditorScriptCodeCompletionCache : public ScriptCodeCompletionCache {
@@ -403,7 +402,7 @@ String ScriptEditor::_get_debug_tooltip(const String &p_text, Node *_se) {
}
void ScriptEditor::_breaked(bool p_breaked, bool p_can_debug) {
- if (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
+ if (bool(EDITOR_GET("text_editor/external/use_external_editor"))) {
return;
}
@@ -429,8 +428,8 @@ void ScriptEditor::_goto_script_line2(int p_line) {
}
void ScriptEditor::_goto_script_line(Ref<RefCounted> p_script, int p_line) {
- Ref<Script> script = Object::cast_to<Script>(*p_script);
- if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
+ Ref<Script> scr = Object::cast_to<Script>(*p_script);
+ if (scr.is_valid() && (scr->has_source_code() || scr->get_path().is_resource_file())) {
if (edit(p_script, p_line, 0)) {
EditorNode::get_singleton()->push_item(p_script.ptr());
@@ -440,20 +439,22 @@ void ScriptEditor::_goto_script_line(Ref<RefCounted> p_script, int p_line) {
} else if (current) {
current->goto_line(p_line, true);
}
+
+ _save_history();
}
}
}
void ScriptEditor::_set_execution(Ref<RefCounted> p_script, int p_line) {
- Ref<Script> script = Object::cast_to<Script>(*p_script);
- if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
+ Ref<Script> scr = Object::cast_to<Script>(*p_script);
+ if (scr.is_valid() && (scr->has_source_code() || scr->get_path().is_resource_file())) {
for (int i = 0; i < tab_container->get_tab_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
if (!se) {
continue;
}
- if ((script != nullptr && se->get_edited_resource() == p_script) || se->get_edited_resource()->get_path() == script->get_path()) {
+ if ((scr != nullptr && se->get_edited_resource() == p_script) || se->get_edited_resource()->get_path() == scr->get_path()) {
se->set_executing_line(p_line);
}
}
@@ -461,15 +462,15 @@ void ScriptEditor::_set_execution(Ref<RefCounted> p_script, int p_line) {
}
void ScriptEditor::_clear_execution(Ref<RefCounted> p_script) {
- Ref<Script> script = Object::cast_to<Script>(*p_script);
- if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
+ Ref<Script> scr = Object::cast_to<Script>(*p_script);
+ if (scr.is_valid() && (scr->has_source_code() || scr->get_path().is_resource_file())) {
for (int i = 0; i < tab_container->get_tab_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
if (!se) {
continue;
}
- if ((script != nullptr && se->get_edited_resource() == p_script) || se->get_edited_resource()->get_path() == script->get_path()) {
+ if ((scr != nullptr && se->get_edited_resource() == p_script) || se->get_edited_resource()->get_path() == scr->get_path()) {
se->clear_executing_line();
}
}
@@ -477,19 +478,19 @@ void ScriptEditor::_clear_execution(Ref<RefCounted> p_script) {
}
void ScriptEditor::_set_breakpoint(Ref<RefCounted> p_script, int p_line, bool p_enabled) {
- Ref<Script> script = Object::cast_to<Script>(*p_script);
- if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
+ Ref<Script> scr = Object::cast_to<Script>(*p_script);
+ if (scr.is_valid() && (scr->has_source_code() || scr->get_path().is_resource_file())) {
// Update if open.
for (int i = 0; i < tab_container->get_tab_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
- if (se && se->get_edited_resource()->get_path() == script->get_path()) {
+ if (se && se->get_edited_resource()->get_path() == scr->get_path()) {
se->set_breakpoint(p_line, p_enabled);
return;
}
}
// Handle closed.
- Dictionary state = script_editor_cache->get_value(script->get_path(), "state");
+ Dictionary state = script_editor_cache->get_value(scr->get_path(), "state");
Array breakpoints;
if (state.has("breakpoints")) {
breakpoints = state["breakpoints"];
@@ -503,8 +504,8 @@ void ScriptEditor::_set_breakpoint(Ref<RefCounted> p_script, int p_line, bool p_
breakpoints.push_back(p_line);
}
state["breakpoints"] = breakpoints;
- script_editor_cache->set_value(script->get_path(), "state", state);
- EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), p_line + 1, false);
+ script_editor_cache->set_value(scr->get_path(), "state", state);
+ EditorDebuggerNode::get_singleton()->set_breakpoint(scr->get_path(), p_line + 1, false);
}
}
@@ -564,7 +565,7 @@ void ScriptEditor::_save_history() {
Node *n = tab_container->get_current_tab_control();
if (Object::cast_to<ScriptEditorBase>(n)) {
- history.write[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_edit_state();
+ history.write[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_navigation_state();
}
if (Object::cast_to<EditorHelp>(n)) {
history.write[history_pos].state = Object::cast_to<EditorHelp>(n)->get_scroll();
@@ -599,7 +600,7 @@ void ScriptEditor::_go_to_tab(int p_idx) {
Node *n = tab_container->get_current_tab_control();
if (Object::cast_to<ScriptEditorBase>(n)) {
- history.write[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_edit_state();
+ history.write[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_navigation_state();
}
if (Object::cast_to<EditorHelp>(n)) {
history.write[history_pos].state = Object::cast_to<EditorHelp>(n)->get_scroll();
@@ -625,9 +626,9 @@ void ScriptEditor::_go_to_tab(int p_idx) {
Object::cast_to<ScriptEditorBase>(c)->ensure_focus();
}
- Ref<Script> script = Object::cast_to<ScriptEditorBase>(c)->get_edited_resource();
- if (script != nullptr) {
- notify_script_changed(script);
+ Ref<Script> scr = Object::cast_to<ScriptEditorBase>(c)->get_edited_resource();
+ if (scr != nullptr) {
+ notify_script_changed(scr);
}
Object::cast_to<ScriptEditorBase>(c)->validate();
@@ -703,9 +704,9 @@ void ScriptEditor::_open_recent_script(int p_idx) {
ResourceLoader::get_recognized_extensions_for_type("Script", &extensions);
if (extensions.find(path.get_extension())) {
- Ref<Script> script = ResourceLoader::load(path);
- if (script.is_valid()) {
- edit(script, true);
+ Ref<Script> scr = ResourceLoader::load(path);
+ if (scr.is_valid()) {
+ edit(scr, true);
return;
}
}
@@ -727,9 +728,9 @@ void ScriptEditor::_open_recent_script(int p_idx) {
} else {
EditorNode::get_singleton()->load_resource(res_path);
}
- Ref<Script> script = ResourceLoader::load(path);
- if (script.is_valid()) {
- edit(script, true);
+ Ref<Script> scr = ResourceLoader::load(path);
+ if (scr.is_valid()) {
+ edit(scr, true);
return;
}
} else if (!path.is_resource_file()) {
@@ -772,9 +773,9 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) {
previous_scripts.push_back(file->get_path());
}
- Ref<Script> script = file;
- if (script.is_valid()) {
- notify_script_close(script);
+ Ref<Script> scr = file;
+ if (scr.is_valid()) {
+ notify_script_close(scr);
}
}
}
@@ -849,8 +850,8 @@ void ScriptEditor::_close_docs_tab() {
void ScriptEditor::_copy_script_path() {
ScriptEditorBase *se = _get_current_editor();
if (se) {
- Ref<Resource> script = se->get_edited_resource();
- DisplayServer::get_singleton()->clipboard_set(script->get_path());
+ Ref<Resource> scr = se->get_edited_resource();
+ DisplayServer::get_singleton()->clipboard_set(scr->get_path());
}
}
@@ -906,9 +907,9 @@ void ScriptEditor::_resave_scripts(const String &p_str) {
continue;
}
- Ref<Resource> script = se->get_edited_resource();
+ Ref<Resource> scr = se->get_edited_resource();
- if (script->is_built_in()) {
+ if (scr->is_built_in()) {
continue; //internal script, who cares
}
@@ -926,13 +927,13 @@ void ScriptEditor::_resave_scripts(const String &p_str) {
}
}
- Ref<TextFile> text_file = script;
+ Ref<TextFile> text_file = scr;
if (text_file != nullptr) {
se->apply_code();
_save_text_file(text_file, text_file->get_path());
break;
} else {
- EditorNode::get_singleton()->save_resource(script);
+ EditorNode::get_singleton()->save_resource(scr);
}
se->tag_saved_version();
}
@@ -947,9 +948,9 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) {
continue;
}
- Ref<Resource> script = se->get_edited_resource();
+ Ref<Resource> scr = se->get_edited_resource();
- if (script == p_res) {
+ if (scr == p_res) {
se->tag_saved_version();
}
}
@@ -1104,8 +1105,8 @@ Ref<Script> ScriptEditor::_get_current_script() {
ScriptEditorBase *current = _get_current_editor();
if (current) {
- Ref<Script> script = current->get_edited_resource();
- return script != nullptr ? script : nullptr;
+ Ref<Script> scr = current->get_edited_resource();
+ return scr != nullptr ? scr : nullptr;
} else {
return nullptr;
}
@@ -1123,6 +1124,7 @@ TypedArray<Script> ScriptEditor::_get_open_scripts() const {
bool ScriptEditor::toggle_scripts_panel() {
list_split->set_visible(!list_split->is_visible());
+ EditorSettings::get_singleton()->set_project_metadata("scripts_panel", "show_scripts_panel", list_split->is_visible());
return list_split->is_visible();
}
@@ -1281,7 +1283,7 @@ void ScriptEditor::_menu_option(int p_option) {
Ref<Resource> resource = current->get_edited_resource();
Ref<TextFile> text_file = resource;
- Ref<Script> script = resource;
+ Ref<Script> scr = resource;
if (text_file != nullptr) {
file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
@@ -1298,26 +1300,15 @@ void ScriptEditor::_menu_option(int p_option) {
break;
}
- if (script != nullptr) {
- Vector<DocData::ClassDoc> documentations = script->get_documentation();
- for (int j = 0; j < documentations.size(); j++) {
- const DocData::ClassDoc &doc = documentations.get(j);
- if (EditorHelp::get_doc_data()->has_doc(doc.name)) {
- EditorHelp::get_doc_data()->remove_doc(doc.name);
- }
- }
+ if (scr.is_valid()) {
+ clear_docs_from_script(scr);
}
EditorNode::get_singleton()->push_item(resource.ptr());
EditorNode::get_singleton()->save_resource_as(resource);
- if (script != nullptr) {
- Vector<DocData::ClassDoc> documentations = script->get_documentation();
- for (int j = 0; j < documentations.size(); j++) {
- const DocData::ClassDoc &doc = documentations.get(j);
- EditorHelp::get_doc_data()->add_doc(doc);
- update_doc(doc.name);
- }
+ if (scr.is_valid()) {
+ update_docs_from_script(scr);
}
} break;
@@ -1375,18 +1366,18 @@ void ScriptEditor::_menu_option(int p_option) {
_copy_script_path();
} break;
case SHOW_IN_FILE_SYSTEM: {
- const Ref<Resource> script = current->get_edited_resource();
- String path = script->get_path();
+ const Ref<Resource> scr = current->get_edited_resource();
+ String path = scr->get_path();
if (!path.is_empty()) {
- if (script->is_built_in()) {
+ if (scr->is_built_in()) {
path = path.get_slice("::", 0); // Show the scene instead.
}
FileSystemDock *file_system_dock = FileSystemDock::get_singleton();
file_system_dock->navigate_to_path(path);
// Ensure that the FileSystem dock is visible.
- TabContainer *tab_container = (TabContainer *)file_system_dock->get_parent_control();
- tab_container->set_current_tab(tab_container->get_tab_idx_from_control(file_system_dock));
+ TabContainer *dock_tab_container = (TabContainer *)file_system_dock->get_parent_control();
+ dock_tab_container->set_current_tab(dock_tab_container->get_tab_idx_from_control(file_system_dock));
}
} break;
case CLOSE_DOCS: {
@@ -1496,7 +1487,7 @@ void ScriptEditor::_show_save_theme_as_dialog() {
file_dialog_option = THEME_SAVE_AS;
file_dialog->clear_filters();
file_dialog->add_filter("*.tet");
- file_dialog->set_current_path(EditorPaths::get_singleton()->get_text_editor_themes_dir().path_join(EditorSettings::get_singleton()->get("text_editor/theme/color_theme")));
+ file_dialog->set_current_path(EditorPaths::get_singleton()->get_text_editor_themes_dir().path_join(EDITOR_GET("text_editor/theme/color_theme")));
file_dialog->popup_file_dialog();
file_dialog->set_title(TTR("Save Theme As..."));
}
@@ -1610,7 +1601,7 @@ void ScriptEditor::_notification(int p_what) {
EditorNode::get_singleton()->disconnect("stop_pressed", callable_mp(this, &ScriptEditor::_editor_stop));
} break;
- case NOTIFICATION_WM_WINDOW_FOCUS_IN: {
+ case NOTIFICATION_APPLICATION_FOCUS_IN: {
_test_script_times_on_disk();
_update_modified_scripts_for_external_editor();
} break;
@@ -1643,12 +1634,12 @@ void ScriptEditor::close_builtin_scripts_from_scene(const String &p_scene) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
if (se) {
- Ref<Script> script = se->get_edited_resource();
- if (script == nullptr || !script.is_valid()) {
+ Ref<Script> scr = se->get_edited_resource();
+ if (scr == nullptr || !scr.is_valid()) {
continue;
}
- if (script->is_built_in() && script->get_path().begins_with(p_scene)) { //is an internal script and belongs to scene being closed
+ if (scr->is_built_in() && scr->get_path().begins_with(p_scene)) { //is an internal script and belongs to scene being closed
_close_tab(i, false);
i--;
}
@@ -1676,12 +1667,12 @@ void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) {
continue;
}
- Ref<Script> script = se->get_edited_resource();
- if (script == nullptr) {
+ Ref<Script> scr = se->get_edited_resource();
+ if (scr == nullptr) {
continue;
}
- String base = script->get_path();
+ String base = scr->get_path();
loaded_scripts.insert(base);
if (base.begins_with("local://") || base.is_empty()) {
continue;
@@ -1742,7 +1733,7 @@ void ScriptEditor::ensure_select_current() {
if (tab_container->get_tab_count() && tab_container->get_current_tab() >= 0) {
ScriptEditorBase *se = _get_current_editor();
if (se) {
- se->enable_editor();
+ se->enable_editor(this);
if (!grab_focus_block && is_visible_in_tree()) {
se->ensure_focus();
@@ -1831,7 +1822,7 @@ void ScriptEditor::_update_members_overview() {
}
Vector<String> functions = se->get_functions();
- if (EditorSettings::get_singleton()->get("text_editor/script_list/sort_members_outline_alphabetically")) {
+ if (EDITOR_GET("text_editor/script_list/sort_members_outline_alphabetically")) {
functions.sort();
}
@@ -1898,9 +1889,9 @@ void ScriptEditor::_update_help_overview() {
}
void ScriptEditor::_update_script_colors() {
- bool script_temperature_enabled = EditorSettings::get_singleton()->get("text_editor/script_list/script_temperature_enabled");
+ bool script_temperature_enabled = EDITOR_GET("text_editor/script_list/script_temperature_enabled");
- int hist_size = EditorSettings::get_singleton()->get("text_editor/script_list/script_temperature_history_size");
+ int hist_size = EDITOR_GET("text_editor/script_list/script_temperature_history_size");
Color hot_color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
hot_color.set_s(hot_color.get_s() * 0.9);
Color cold_color = get_theme_color(SNAME("font_color"), SNAME("Editor"));
@@ -1944,9 +1935,9 @@ void ScriptEditor::_update_script_names() {
}
script_list->clear();
- bool split_script_help = EditorSettings::get_singleton()->get("text_editor/script_list/group_help_pages");
- ScriptSortBy sort_by = (ScriptSortBy)(int)EditorSettings::get_singleton()->get("text_editor/script_list/sort_scripts_by");
- ScriptListName display_as = (ScriptListName)(int)EditorSettings::get_singleton()->get("text_editor/script_list/list_script_names_as");
+ bool split_script_help = EDITOR_GET("text_editor/script_list/group_help_pages");
+ ScriptSortBy sort_by = (ScriptSortBy)(int)EDITOR_GET("text_editor/script_list/sort_scripts_by");
+ ScriptListName display_as = (ScriptListName)(int)EDITOR_GET("text_editor/script_list/list_script_names_as");
Vector<_ScriptEditorItemData> sedata;
@@ -2014,7 +2005,7 @@ void ScriptEditor::_update_script_names() {
Vector<String> full_script_paths;
for (int j = 0; j < sedata.size(); j++) {
String name = sedata[j].name.replace("(*)", "");
- ScriptListName script_display = (ScriptListName)(int)EditorSettings::get_singleton()->get("text_editor/script_list/list_script_names_as");
+ ScriptListName script_display = (ScriptListName)(int)EDITOR_GET("text_editor/script_list/list_script_names_as");
switch (script_display) {
case DISPLAY_NAME: {
name = name.get_file();
@@ -2116,7 +2107,7 @@ void ScriptEditor::_update_script_names() {
ScriptEditorBase *se = _get_current_editor();
if (se) {
- se->enable_editor();
+ se->enable_editor(this);
_update_selected_editor_menu();
}
}
@@ -2133,16 +2124,6 @@ void ScriptEditor::_update_script_names() {
_update_script_colors();
}
-void ScriptEditor::_update_script_connections() {
- for (int i = 0; i < tab_container->get_tab_count(); i++) {
- ScriptTextEditor *ste = Object::cast_to<ScriptTextEditor>(tab_container->get_tab_control(i));
- if (!ste) {
- continue;
- }
- ste->_update_connected_methods();
- }
-}
-
Ref<TextFile> ScriptEditor::_load_text_file(const String &p_path, Error *r_error) const {
if (r_error) {
*r_error = ERR_FILE_CANT_OPEN;
@@ -2193,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;
}
@@ -2202,20 +2185,20 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
return false;
}
- Ref<Script> script = p_resource;
+ Ref<Script> scr = p_resource;
// Don't open dominant script if using an external editor.
bool use_external_editor =
- EditorSettings::get_singleton()->get("text_editor/external/use_external_editor") ||
- (script.is_valid() && script->get_language()->overrides_external_editor());
- use_external_editor = use_external_editor && !(script.is_valid() && script->is_built_in()); // Ignore external editor for built-in scripts.
- const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/behavior/files/open_dominant_script_on_scene_change");
+ EDITOR_GET("text_editor/external/use_external_editor") ||
+ (scr.is_valid() && scr->get_language()->overrides_external_editor());
+ use_external_editor = use_external_editor && !(scr.is_valid() && scr->is_built_in()); // Ignore external editor for built-in scripts.
+ const bool open_dominant = EDITOR_GET("text_editor/behavior/files/open_dominant_script_on_scene_change");
const bool should_open = (open_dominant && !use_external_editor) || !EditorNode::get_singleton()->is_changing_scene();
- if (script.is_valid() && script->get_language()->overrides_external_editor()) {
+ if (scr.is_valid() && scr->get_language()->overrides_external_editor()) {
if (should_open) {
- Error err = script->get_language()->open_in_external_editor(script, p_line >= 0 ? p_line : 0, p_col);
+ Error err = scr->get_language()->open_in_external_editor(scr, p_line >= 0 ? p_line : 0, p_col);
if (err != OK) {
ERR_PRINT("Couldn't open script in the overridden external text editor");
}
@@ -2225,10 +2208,9 @@ 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")) {
- String path = EditorSettings::get_singleton()->get("text_editor/external/exec_path");
- String flags = EditorSettings::get_singleton()->get("text_editor/external/exec_flags");
+ 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");
List<String> args;
bool has_file_flag = false;
@@ -2276,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++) {
@@ -2289,9 +2274,9 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
continue;
}
- if ((script != nullptr && se->get_edited_resource() == p_resource) || se->get_edited_resource()->get_path() == p_resource->get_path()) {
+ if ((scr != nullptr && se->get_edited_resource() == p_resource) || se->get_edited_resource()->get_path() == p_resource->get_path()) {
if (should_open) {
- se->enable_editor();
+ se->enable_editor(this);
if (tab_container->get_current_tab() != i) {
_go_to_tab(i);
@@ -2325,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 (script != nullptr && !highlighter_set) {
- PackedStringArray languages = highlighter->_get_supported_languages();
- if (languages.has(script->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;
}
}
}
@@ -2347,7 +2331,7 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
tab_container->add_child(se);
if (p_grab_focus) {
- se->enable_editor();
+ se->enable_editor(this);
}
// If we delete a script within the filesystem, the original resource path
@@ -2380,6 +2364,7 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
se->connect("request_save_history", callable_mp(this, &ScriptEditor::_save_history));
se->connect("search_in_files_requested", callable_mp(this, &ScriptEditor::_on_find_in_files_requested));
se->connect("replace_in_files_requested", callable_mp(this, &ScriptEditor::_on_replace_in_files_requested));
+ se->connect("go_to_method", callable_mp(this, &ScriptEditor::script_goto_method));
//test for modification, maybe the script was not edited but was loaded
@@ -2416,7 +2401,7 @@ void ScriptEditor::save_current_script() {
Ref<Resource> resource = current->get_edited_resource();
Ref<TextFile> text_file = resource;
- Ref<Script> script = resource;
+ Ref<Script> scr = resource;
if (text_file != nullptr) {
current->apply_code();
@@ -2424,14 +2409,8 @@ void ScriptEditor::save_current_script() {
return;
}
- if (script != nullptr) {
- Vector<DocData::ClassDoc> documentations = script->get_documentation();
- for (int j = 0; j < documentations.size(); j++) {
- const DocData::ClassDoc &doc = documentations.get(j);
- if (EditorHelp::get_doc_data()->has_doc(doc.name)) {
- EditorHelp::get_doc_data()->remove_doc(doc.name);
- }
- }
+ if (scr.is_valid()) {
+ clear_docs_from_script(scr);
}
if (resource->is_built_in()) {
@@ -2446,13 +2425,8 @@ void ScriptEditor::save_current_script() {
EditorNode::get_singleton()->save_resource(resource);
}
- if (script != nullptr) {
- Vector<DocData::ClassDoc> documentations = script->get_documentation();
- for (int j = 0; j < documentations.size(); j++) {
- const DocData::ClassDoc &doc = documentations.get(j);
- EditorHelp::get_doc_data()->add_doc(doc);
- update_doc(doc.name);
- }
+ if (scr.is_valid()) {
+ update_docs_from_script(scr);
}
}
@@ -2490,32 +2464,21 @@ void ScriptEditor::save_all_scripts() {
if (!edited_res->is_built_in()) {
Ref<TextFile> text_file = edited_res;
- Ref<Script> script = edited_res;
+ Ref<Script> scr = edited_res;
if (text_file != nullptr) {
_save_text_file(text_file, text_file->get_path());
continue;
}
- if (script != nullptr) {
- Vector<DocData::ClassDoc> documentations = script->get_documentation();
- for (int j = 0; j < documentations.size(); j++) {
- const DocData::ClassDoc &doc = documentations.get(j);
- if (EditorHelp::get_doc_data()->has_doc(doc.name)) {
- EditorHelp::get_doc_data()->remove_doc(doc.name);
- }
- }
+ if (scr.is_valid()) {
+ clear_docs_from_script(scr);
}
EditorNode::get_singleton()->save_resource(edited_res); //external script, save it
- if (script != nullptr) {
- Vector<DocData::ClassDoc> documentations = script->get_documentation();
- for (int j = 0; j < documentations.size(); j++) {
- const DocData::ClassDoc &doc = documentations.get(j);
- EditorHelp::get_doc_data()->add_doc(doc);
- update_doc(doc.name);
- }
+ if (scr.is_valid()) {
+ update_docs_from_script(scr);
}
} else {
// For built-in scripts, save their scenes instead.
@@ -2531,7 +2494,6 @@ void ScriptEditor::save_all_scripts() {
}
_update_script_names();
- EditorFileSystem::get_singleton()->update_script_classes();
}
void ScriptEditor::apply_scripts() const {
@@ -2544,7 +2506,7 @@ void ScriptEditor::apply_scripts() const {
}
}
-void ScriptEditor::reload_scripts() {
+void ScriptEditor::reload_scripts(bool p_refresh_only) {
for (int i = 0; i < tab_container->get_tab_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
if (!se) {
@@ -2557,30 +2519,33 @@ void ScriptEditor::reload_scripts() {
continue; //internal script, who cares
}
- uint64_t last_date = edited_res->get_last_modified_time();
- uint64_t date = FileAccess::get_modified_time(edited_res->get_path());
+ if (!p_refresh_only) {
+ uint64_t last_date = edited_res->get_last_modified_time();
+ uint64_t date = FileAccess::get_modified_time(edited_res->get_path());
- if (last_date == date) {
- continue;
- }
+ if (last_date == date) {
+ continue;
+ }
- Ref<Script> script = edited_res;
- if (script != nullptr) {
- Ref<Script> rel_script = ResourceLoader::load(script->get_path(), script->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
- ERR_CONTINUE(!rel_script.is_valid());
- script->set_source_code(rel_script->get_source_code());
- script->set_last_modified_time(rel_script->get_last_modified_time());
- script->reload(true);
- }
+ Ref<Script> scr = edited_res;
+ if (scr != nullptr) {
+ Ref<Script> rel_scr = ResourceLoader::load(scr->get_path(), scr->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
+ ERR_CONTINUE(!rel_scr.is_valid());
+ scr->set_source_code(rel_scr->get_source_code());
+ scr->set_last_modified_time(rel_scr->get_last_modified_time());
+ scr->reload(true);
+ }
- Ref<TextFile> text_file = edited_res;
- if (text_file != nullptr) {
- Error err;
- Ref<TextFile> rel_text_file = _load_text_file(text_file->get_path(), &err);
- ERR_CONTINUE(!rel_text_file.is_valid());
- text_file->set_text(rel_text_file->get_text());
- text_file->set_last_modified_time(rel_text_file->get_last_modified_time());
+ Ref<TextFile> text_file = edited_res;
+ if (text_file != nullptr) {
+ Error err;
+ Ref<TextFile> rel_text_file = _load_text_file(text_file->get_path(), &err);
+ ERR_CONTINUE(!rel_text_file.is_valid());
+ text_file->set_text(rel_text_file->get_text());
+ text_file->set_last_modified_time(rel_text_file->get_last_modified_time());
+ }
}
+
se->reload_text();
}
@@ -2594,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;
}
@@ -2641,17 +2606,17 @@ void ScriptEditor::_editor_stop() {
void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args) {
ERR_FAIL_COND(!p_obj);
- Ref<Script> script = p_obj->get_script();
- ERR_FAIL_COND(!script.is_valid());
+ Ref<Script> scr = p_obj->get_script();
+ ERR_FAIL_COND(!scr.is_valid());
- EditorNode::get_singleton()->push_item(script.ptr());
+ EditorNode::get_singleton()->push_item(scr.ptr());
for (int i = 0; i < tab_container->get_tab_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
if (!se) {
continue;
}
- if (se->get_edited_resource() != script) {
+ if (se->get_edited_resource() != scr) {
continue;
}
@@ -2662,7 +2627,7 @@ void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const
script_list->select(script_list->find_metadata(i));
// Save the current script so the changes can be picked up by an external editor.
- if (!script.ptr()->is_built_in()) { // But only if it's not built-in script.
+ if (!scr.ptr()->is_built_in()) { // But only if it's not built-in script.
save_current_script();
}
@@ -2694,26 +2659,26 @@ void ScriptEditor::_save_layout() {
void ScriptEditor::_editor_settings_changed() {
textfile_extensions.clear();
- const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false);
+ const Vector<String> textfile_ext = ((String)(EDITOR_GET("docks/filesystem/textfile_extensions"))).split(",", false);
for (const String &E : textfile_ext) {
textfile_extensions.insert(E);
}
- trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/behavior/files/trim_trailing_whitespace_on_save");
- convert_indent_on_save = EditorSettings::get_singleton()->get("text_editor/behavior/files/convert_indent_on_save");
- use_space_indentation = EditorSettings::get_singleton()->get("text_editor/behavior/indent/type");
+ trim_trailing_whitespace_on_save = EDITOR_GET("text_editor/behavior/files/trim_trailing_whitespace_on_save");
+ convert_indent_on_save = EDITOR_GET("text_editor/behavior/files/convert_indent_on_save");
+ use_space_indentation = EDITOR_GET("text_editor/behavior/indent/type");
- members_overview_enabled = EditorSettings::get_singleton()->get("text_editor/script_list/show_members_overview");
- help_overview_enabled = EditorSettings::get_singleton()->get("text_editor/help/show_help_index");
+ members_overview_enabled = EDITOR_GET("text_editor/script_list/show_members_overview");
+ help_overview_enabled = EDITOR_GET("text_editor/help/show_help_index");
_update_members_overview_visibility();
_update_help_overview_visibility();
_update_autosave_timer();
if (current_theme.is_empty()) {
- current_theme = EditorSettings::get_singleton()->get("text_editor/theme/color_theme");
- } else if (current_theme != String(EditorSettings::get_singleton()->get("text_editor/theme/color_theme"))) {
- current_theme = EditorSettings::get_singleton()->get("text_editor/theme/color_theme");
+ current_theme = EDITOR_GET("text_editor/theme/color_theme");
+ } else if (current_theme != String(EDITOR_GET("text_editor/theme/color_theme"))) {
+ current_theme = EDITOR_GET("text_editor/theme/color_theme");
EditorSettings::get_singleton()->load_text_editor_theme();
}
@@ -2796,7 +2761,7 @@ void ScriptEditor::_update_autosave_timer() {
return;
}
- float autosave_time = EditorSettings::get_singleton()->get("text_editor/behavior/files/autosave_interval_secs");
+ float autosave_time = EDITOR_GET("text_editor/behavior/files/autosave_interval_secs");
if (autosave_time > 0) {
autosave_timer->set_wait_time(autosave_time);
autosave_timer->start();
@@ -2812,7 +2777,6 @@ void ScriptEditor::_tree_changed() {
waiting_update_names = true;
call_deferred(SNAME("_update_script_names"));
- call_deferred(SNAME("_update_script_connections"));
}
void ScriptEditor::_split_dragged(float) {
@@ -2993,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();
}
}
@@ -3042,6 +3009,7 @@ void ScriptEditor::shortcut_input(const Ref<InputEvent> &p_event) {
_go_to_tab(script_list->get_item_metadata(next_tab));
_update_script_names();
}
+ accept_event();
}
if (ED_IS_SHORTCUT("script_editor/prev_script", p_event)) {
if (script_list->get_item_count() > 1) {
@@ -3050,35 +3018,27 @@ void ScriptEditor::shortcut_input(const Ref<InputEvent> &p_event) {
_go_to_tab(script_list->get_item_metadata(next_tab));
_update_script_names();
}
+ accept_event();
}
if (ED_IS_SHORTCUT("script_editor/window_move_up", p_event)) {
_menu_option(WINDOW_MOVE_UP);
+ accept_event();
}
if (ED_IS_SHORTCUT("script_editor/window_move_down", p_event)) {
_menu_option(WINDOW_MOVE_DOWN);
+ accept_event();
}
}
-void ScriptEditor::_script_list_gui_input(const Ref<InputEvent> &ev) {
- Ref<InputEventMouseButton> mb = ev;
- if (mb.is_valid() && mb->is_pressed()) {
- switch (mb->get_button_index()) {
- case MouseButton::MIDDLE: {
- // Right-click selects automatically; middle-click does not.
- int idx = script_list->get_item_at_position(mb->get_position(), true);
- if (idx >= 0) {
- script_list->select(idx);
- _script_selected(idx);
- _menu_option(FILE_CLOSE);
- }
- } break;
+void ScriptEditor::_script_list_clicked(int p_item, Vector2 p_local_mouse_pos, MouseButton p_mouse_button_index) {
+ if (p_mouse_button_index == MouseButton::MIDDLE) {
+ script_list->select(p_item);
+ _script_selected(p_item);
+ _menu_option(FILE_CLOSE);
+ }
- case MouseButton::RIGHT: {
- _make_script_list_context_menu();
- } break;
- default:
- break;
- }
+ if (p_mouse_button_index == MouseButton::RIGHT) {
+ _make_script_list_context_menu();
}
}
@@ -3346,6 +3306,29 @@ void ScriptEditor::update_doc(const String &p_name) {
}
}
+void ScriptEditor::clear_docs_from_script(const Ref<Script> &p_script) {
+ ERR_FAIL_COND(p_script.is_null());
+
+ Vector<DocData::ClassDoc> documentations = p_script->get_documentation();
+ for (int j = 0; j < documentations.size(); j++) {
+ const DocData::ClassDoc &doc = documentations.get(j);
+ if (EditorHelp::get_doc_data()->has_doc(doc.name)) {
+ EditorHelp::get_doc_data()->remove_doc(doc.name);
+ }
+ }
+}
+
+void ScriptEditor::update_docs_from_script(const Ref<Script> &p_script) {
+ ERR_FAIL_COND(p_script.is_null());
+
+ Vector<DocData::ClassDoc> documentations = p_script->get_documentation();
+ for (int j = 0; j < documentations.size(); j++) {
+ const DocData::ClassDoc &doc = documentations.get(j);
+ EditorHelp::get_doc_data()->add_doc(doc);
+ update_doc(doc.name);
+ }
+}
+
void ScriptEditor::_update_selected_editor_menu() {
for (int i = 0; i < tab_container->get_tab_count(); i++) {
bool current = tab_container->get_current_tab() == i;
@@ -3368,10 +3351,12 @@ void ScriptEditor::_update_selected_editor_menu() {
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_previous", TTR("Find Previous"), KeyModifierMask::SHIFT | Key::F3), HELP_SEARCH_FIND_PREVIOUS);
script_search_menu->get_popup()->add_separator();
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_in_files", TTR("Find in Files"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::F), SEARCH_IN_FILES);
+ script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/replace_in_files", TTR("Replace in Files"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::R), REPLACE_IN_FILES);
script_search_menu->show();
} else {
if (tab_container->get_tab_count() == 0) {
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_in_files", TTR("Find in Files"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::F), SEARCH_IN_FILES);
+ script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/replace_in_files", TTR("Replace in Files"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::R), REPLACE_IN_FILES);
script_search_menu->show();
} else {
script_search_menu->hide();
@@ -3383,7 +3368,7 @@ void ScriptEditor::_update_history_pos(int p_new_pos) {
Node *n = tab_container->get_current_tab_control();
if (Object::cast_to<ScriptEditorBase>(n)) {
- history.write[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_edit_state();
+ history.write[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_navigation_state();
}
if (Object::cast_to<EditorHelp>(n)) {
history.write[history_pos].state = Object::cast_to<EditorHelp>(n)->get_scroll();
@@ -3394,13 +3379,14 @@ void ScriptEditor::_update_history_pos(int p_new_pos) {
n = history[history_pos].control;
- if (Object::cast_to<ScriptEditorBase>(n)) {
- Object::cast_to<ScriptEditorBase>(n)->set_edit_state(history[history_pos].state);
- Object::cast_to<ScriptEditorBase>(n)->ensure_focus();
+ ScriptEditorBase *seb = Object::cast_to<ScriptEditorBase>(n);
+ if (seb) {
+ seb->set_edit_state(history[history_pos].state);
+ seb->ensure_focus();
- Ref<Script> script = Object::cast_to<ScriptEditorBase>(n)->get_edited_resource();
- if (script != nullptr) {
- notify_script_changed(script);
+ Ref<Script> scr = seb->get_edited_resource();
+ if (scr != nullptr) {
+ notify_script_changed(scr);
}
}
@@ -3436,9 +3422,9 @@ Vector<Ref<Script>> ScriptEditor::get_open_scripts() const {
continue;
}
- Ref<Script> script = se->get_edited_resource();
- if (script != nullptr) {
- out_scripts.push_back(script);
+ Ref<Script> scr = se->get_edited_resource();
+ if (scr != nullptr) {
+ out_scripts.push_back(scr);
}
}
@@ -3460,10 +3446,10 @@ TypedArray<ScriptEditorBase> ScriptEditor::_get_open_script_editors() const {
void ScriptEditor::set_scene_root_script(Ref<Script> p_script) {
// Don't open dominant script if using an external editor.
bool use_external_editor =
- EditorSettings::get_singleton()->get("text_editor/external/use_external_editor") ||
+ EDITOR_GET("text_editor/external/use_external_editor") ||
(p_script.is_valid() && p_script->get_language()->overrides_external_editor());
use_external_editor = use_external_editor && !(p_script.is_valid() && p_script->is_built_in()); // Ignore external editor for built-in scripts.
- const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/behavior/files/open_dominant_script_on_scene_change");
+ const bool open_dominant = EDITOR_GET("text_editor/behavior/files/open_dominant_script_on_scene_change");
if (open_dominant && !use_external_editor && p_script.is_valid()) {
edit(p_script);
@@ -3489,9 +3475,9 @@ void ScriptEditor::_help_search(String p_text) {
}
void ScriptEditor::_open_script_request(const String &p_path) {
- Ref<Script> script = ResourceLoader::load(p_path);
- if (script.is_valid()) {
- script_editor->edit(script, false);
+ Ref<Script> scr = ResourceLoader::load(p_path);
+ if (scr.is_valid()) {
+ script_editor->edit(scr, false);
return;
}
@@ -3556,9 +3542,9 @@ void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_numb
EditorNode::get_singleton()->load_scene(fpath);
return;
} else {
- Ref<Script> script = res;
- if (script.is_valid()) {
- edit(script);
+ Ref<Script> scr = res;
+ if (scr.is_valid()) {
+ edit(scr);
ScriptTextEditor *ste = Object::cast_to<ScriptTextEditor>(_get_current_editor());
if (ste) {
@@ -3618,7 +3604,6 @@ void ScriptEditor::_bind_methods() {
ClassDB::bind_method("_goto_script_line2", &ScriptEditor::_goto_script_line2);
ClassDB::bind_method("_copy_script_path", &ScriptEditor::_copy_script_path);
- ClassDB::bind_method("_update_script_connections", &ScriptEditor::_update_script_connections);
ClassDB::bind_method("_help_class_open", &ScriptEditor::_help_class_open);
ClassDB::bind_method("_help_tab_goto", &ScriptEditor::_help_tab_goto);
ClassDB::bind_method("_live_auto_reload_running_scripts", &ScriptEditor::_live_auto_reload_running_scripts);
@@ -3631,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);
@@ -3655,8 +3636,8 @@ ScriptEditor::ScriptEditor() {
waiting_update_names = false;
pending_auto_reload = false;
auto_reload_running_scripts = true;
- members_overview_enabled = EditorSettings::get_singleton()->get("text_editor/script_list/show_members_overview");
- help_overview_enabled = EditorSettings::get_singleton()->get("text_editor/help/show_help_index");
+ members_overview_enabled = EDITOR_GET("text_editor/script_list/show_members_overview");
+ help_overview_enabled = EDITOR_GET("text_editor/help/show_help_index");
VBoxContainer *main_container = memnew(VBoxContainer);
add_child(main_container);
@@ -3688,9 +3669,9 @@ ScriptEditor::ScriptEditor() {
script_list->set_v_size_flags(SIZE_EXPAND_FILL);
script_split->set_split_offset(70 * EDSCALE);
_sort_list_on_update = true;
- script_list->connect("gui_input", callable_mp(this, &ScriptEditor::_script_list_gui_input), CONNECT_DEFERRED);
+ 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);
@@ -3701,6 +3682,7 @@ ScriptEditor::ScriptEditor() {
overview_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
list_split->add_child(overview_vbox);
+ list_split->set_visible(EditorSettings::get_singleton()->get_project_metadata("scripts_panel", "show_scripts_panel", true));
buttons_hbox = memnew(HBoxContainer);
overview_vbox->add_child(buttons_hbox);
@@ -3714,7 +3696,7 @@ ScriptEditor::ScriptEditor() {
members_overview_alphabeta_sort_button->set_flat(true);
members_overview_alphabeta_sort_button->set_tooltip_text(TTR("Toggle alphabetical sorting of the method list."));
members_overview_alphabeta_sort_button->set_toggle_mode(true);
- members_overview_alphabeta_sort_button->set_pressed(EditorSettings::get_singleton()->get("text_editor/script_list/sort_members_outline_alphabetically"));
+ members_overview_alphabeta_sort_button->set_pressed(EDITOR_GET("text_editor/script_list/sort_members_outline_alphabetically"));
members_overview_alphabeta_sort_button->connect("toggled", callable_mp(this, &ScriptEditor::_toggle_members_overview_alpha_sort));
buttons_hbox->add_child(members_overview_alphabeta_sort_button);
@@ -3828,12 +3810,12 @@ ScriptEditor::ScriptEditor() {
script_search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option));
menu_hb->add_child(script_search_menu);
- MenuButton *debug_menu = memnew(MenuButton);
- menu_hb->add_child(debug_menu);
- debug_menu->hide(); // Handled by EditorDebuggerNode below.
+ MenuButton *debug_menu_btn = memnew(MenuButton);
+ menu_hb->add_child(debug_menu_btn);
+ debug_menu_btn->hide(); // Handled by EditorDebuggerNode below.
EditorDebuggerNode *debugger = EditorDebuggerNode::get_singleton();
- debugger->set_script_debug_button(debug_menu);
+ debugger->set_script_debug_button(debug_menu_btn);
debugger->connect("goto_script_line", callable_mp(this, &ScriptEditor::_goto_script_line));
debugger->connect("set_execution", callable_mp(this, &ScriptEditor::_set_execution));
debugger->connect("clear_execution", callable_mp(this, &ScriptEditor::_clear_execution));
@@ -3918,7 +3900,7 @@ ScriptEditor::ScriptEditor() {
vbc->add_child(disk_changed_list);
disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL);
- disk_changed->connect("confirmed", callable_mp(this, &ScriptEditor::reload_scripts));
+ disk_changed->connect("confirmed", callable_mp(this, &ScriptEditor::reload_scripts).bind(false));
disk_changed->set_ok_button_text(TTR("Reload"));
disk_changed->add_button(TTR("Resave"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");
@@ -3956,9 +3938,9 @@ ScriptEditor::ScriptEditor() {
history_pos = -1;
edit_pass = 0;
- trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/behavior/files/trim_trailing_whitespace_on_save");
- convert_indent_on_save = EditorSettings::get_singleton()->get("text_editor/behavior/files/convert_indent_on_save");
- use_space_indentation = EditorSettings::get_singleton()->get("text_editor/behavior/indent/type");
+ trim_trailing_whitespace_on_save = EDITOR_GET("text_editor/behavior/files/trim_trailing_whitespace_on_save");
+ convert_indent_on_save = EDITOR_GET("text_editor/behavior/files/convert_indent_on_save");
+ use_space_indentation = EDITOR_GET("text_editor/behavior/indent/type");
ScriptServer::edit_request_func = _open_script_request;
@@ -4025,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 a8e6cc6868..988d07621c 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -1,53 +1,52 @@
-/*************************************************************************/
-/* script_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* script_editor_plugin.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 SCRIPT_EDITOR_PLUGIN_H
#define SCRIPT_EDITOR_PLUGIN_H
-#include "core/object/script_language.h"
-#include "editor/code_editor.h"
-#include "editor/editor_help.h"
-#include "editor/editor_help_search.h"
#include "editor/editor_plugin.h"
-#include "editor/script_create_dialog.h"
-#include "scene/gui/item_list.h"
-#include "scene/gui/line_edit.h"
-#include "scene/gui/menu_button.h"
-#include "scene/gui/split_container.h"
-#include "scene/gui/tab_container.h"
-#include "scene/gui/text_edit.h"
-#include "scene/gui/tree.h"
-#include "scene/main/timer.h"
+#include "scene/gui/dialogs.h"
+#include "scene/gui/panel_container.h"
+#include "scene/resources/syntax_highlighter.h"
#include "scene/resources/text_file.h"
class EditorFileDialog;
+class EditorHelpSearch;
+class FindReplaceBar;
+class HSplitContainer;
+class ItemList;
+class MenuButton;
+class TabContainer;
+class TextureRect;
+class Tree;
+class VSplitContainer;
class EditorSyntaxHighlighter : public SyntaxHighlighter {
GDCLASS(EditorSyntaxHighlighter, SyntaxHighlighter)
@@ -139,13 +138,14 @@ public:
virtual Ref<Resource> get_edited_resource() const = 0;
virtual Vector<String> get_functions() = 0;
virtual void set_edited_resource(const Ref<Resource> &p_res) = 0;
- virtual void enable_editor() = 0;
+ virtual void enable_editor(Control *p_shortcut_context = nullptr) = 0;
virtual void reload_text() = 0;
virtual String get_name() = 0;
virtual Ref<Texture2D> get_theme_icon() = 0;
virtual bool is_unsaved() = 0;
virtual Variant get_edit_state() = 0;
virtual void set_edit_state(const Variant &p_state) = 0;
+ virtual Variant get_navigation_state() = 0;
virtual void goto_line(int p_line, bool p_with_error = false) = 0;
virtual void set_executing_line(int p_line) = 0;
virtual void clear_executing_line() = 0;
@@ -403,7 +403,6 @@ class ScriptEditor : public PanelContainer {
void _filter_scripts_text_changed(const String &p_newtext);
void _filter_methods_text_changed(const String &p_newtext);
void _update_script_names();
- void _update_script_connections();
bool _sort_list_on_update;
void _members_overview_selected(int p_idx);
@@ -426,7 +425,7 @@ class ScriptEditor : public PanelContainer {
virtual void input(const Ref<InputEvent> &p_event) override;
virtual void shortcut_input(const Ref<InputEvent> &p_event) override;
- void _script_list_gui_input(const Ref<InputEvent> &ev);
+ void _script_list_clicked(int p_item, Vector2 p_local_mouse_pos, MouseButton p_mouse_button_index);
void _make_script_list_context_menu();
void _help_search(String p_text);
@@ -477,7 +476,7 @@ public:
bool toggle_scripts_panel();
bool is_scripts_panel_toggled();
void apply_scripts() const;
- void reload_scripts();
+ void reload_scripts(bool p_refresh_only = false);
void open_script_create_dialog(const String &p_base_name, const String &p_base_path);
void open_text_file_create_dialog(const String &p_base_path, const String &p_base_name = "");
Ref<Resource> open_file(const String &p_file);
@@ -509,6 +508,8 @@ public:
void goto_help(const String &p_desc) { _help_class_goto(p_desc); }
void update_doc(const String &p_name);
+ void clear_docs_from_script(const Ref<Script> &p_script);
+ void update_docs_from_script(const Ref<Script> &p_script);
bool can_take_away_focus() const;
@@ -541,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 42dcfb8b1f..6bb725f7a0 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* script_text_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* script_text_editor.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 "script_text_editor.h"
@@ -38,6 +38,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "scene/gui/split_container.h"
void ConnectionInfoDialog::ok_pressed() {
}
@@ -151,7 +152,7 @@ void ScriptTextEditor::set_edited_resource(const Ref<Resource> &p_res) {
code_editor->update_line_and_column();
}
-void ScriptTextEditor::enable_editor() {
+void ScriptTextEditor::enable_editor(Control *p_shortcut_context) {
if (editor_enabled) {
return;
}
@@ -161,6 +162,15 @@ void ScriptTextEditor::enable_editor() {
_enable_code_editor();
_validate_script();
+
+ if (p_shortcut_context) {
+ for (int i = 0; i < edit_hb->get_child_count(); ++i) {
+ Control *c = cast_to<Control>(edit_hb->get_child(i));
+ if (c) {
+ c->set_shortcut_context(p_shortcut_context);
+ }
+ }
+ }
}
void ScriptTextEditor::_load_theme_settings() {
@@ -267,6 +277,7 @@ void ScriptTextEditor::_warning_clicked(Variant p_line) {
void ScriptTextEditor::_error_clicked(Variant p_line) {
if (p_line.get_type() == Variant::INT) {
+ code_editor->get_text_editor()->remove_secondary_carets();
code_editor->get_text_editor()->set_caret_line(p_line.operator int64_t());
}
}
@@ -289,11 +300,13 @@ void ScriptTextEditor::reload_text() {
te->tag_saved_version();
code_editor->update_line_and_column();
+ _validate_script();
}
void ScriptTextEditor::add_callback(const String &p_function, PackedStringArray p_args) {
String code = code_editor->get_text_editor()->get_text();
int pos = script->get_language()->find_function(p_function, code);
+ code_editor->get_text_editor()->remove_secondary_carets();
if (pos == -1) {
//does not exist
code_editor->get_text_editor()->deselect();
@@ -313,7 +326,7 @@ bool ScriptTextEditor::show_members_overview() {
}
void ScriptTextEditor::update_settings() {
- code_editor->get_text_editor()->set_gutter_draw(connection_gutter, EditorSettings::get_singleton()->get("text_editor/appearance/gutters/show_info_gutter"));
+ code_editor->get_text_editor()->set_gutter_draw(connection_gutter, EDITOR_GET("text_editor/appearance/gutters/show_info_gutter"));
code_editor->update_editor_settings();
}
@@ -346,6 +359,10 @@ void ScriptTextEditor::set_edit_state(const Variant &p_state) {
}
}
+Variant ScriptTextEditor::get_navigation_state() {
+ return code_editor->get_navigation_state();
+}
+
void ScriptTextEditor::_convert_case(CodeTextEditor::CaseStyle p_case) {
code_editor->convert_case(p_case);
}
@@ -682,7 +699,7 @@ static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_curr
}
void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_for_script) {
- if (!bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
+ if (!bool(EDITOR_GET("text_editor/external/use_external_editor"))) {
return;
}
@@ -696,25 +713,25 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo
}
for (const Ref<Script> &E : scripts) {
- Ref<Script> script = E;
+ Ref<Script> scr = E;
- if (p_for_script.is_valid() && p_for_script != script) {
+ if (p_for_script.is_valid() && p_for_script != scr) {
continue;
}
- if (script->is_built_in()) {
+ if (scr->is_built_in()) {
continue; //internal script, who cares, though weird
}
- uint64_t last_date = script->get_last_modified_time();
- uint64_t date = FileAccess::get_modified_time(script->get_path());
+ uint64_t last_date = scr->get_last_modified_time();
+ uint64_t date = FileAccess::get_modified_time(scr->get_path());
if (last_date != date) {
- Ref<Script> rel_script = ResourceLoader::load(script->get_path(), script->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
- ERR_CONTINUE(!rel_script.is_valid());
- script->set_source_code(rel_script->get_source_code());
- script->set_last_modified_time(rel_script->get_last_modified_time());
- script->update_exports();
+ Ref<Script> rel_scr = ResourceLoader::load(scr->get_path(), scr->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
+ ERR_CONTINUE(!rel_scr.is_valid());
+ scr->set_source_code(rel_scr->get_source_code());
+ scr->set_last_modified_time(rel_scr->get_last_modified_time());
+ scr->update_exports();
_trigger_live_script_reload();
}
@@ -956,10 +973,7 @@ void ScriptTextEditor::_update_connected_methods() {
CodeEdit *text_edit = code_editor->get_text_editor();
text_edit->set_gutter_width(connection_gutter, text_edit->get_line_height());
for (int i = 0; i < text_edit->get_line_count(); i++) {
- if (text_edit->get_line_gutter_metadata(i, connection_gutter) == "") {
- continue;
- }
- text_edit->set_line_gutter_metadata(i, connection_gutter, "");
+ text_edit->set_line_gutter_metadata(i, connection_gutter, Dictionary());
text_edit->set_line_gutter_icon(i, connection_gutter, nullptr);
text_edit->set_line_gutter_clickable(i, connection_gutter, false);
}
@@ -974,13 +988,14 @@ void ScriptTextEditor::_update_connected_methods() {
return;
}
+ // Add connection icons to methods.
Vector<Node *> nodes = _find_all_node_for_script(base, base, script);
HashSet<StringName> methods_found;
for (int i = 0; i < nodes.size(); i++) {
- List<Connection> connections;
- nodes[i]->get_signals_connected_to_this(&connections);
+ List<Connection> signal_connections;
+ nodes[i]->get_signals_connected_to_this(&signal_connections);
- for (const Connection &connection : connections) {
+ for (const Connection &connection : signal_connections) {
if (!(connection.flags & CONNECT_PERSIST)) {
continue;
}
@@ -1002,8 +1017,11 @@ void ScriptTextEditor::_update_connected_methods() {
for (int j = 0; j < functions.size(); j++) {
String name = functions[j].get_slice(":", 0);
if (name == method) {
+ Dictionary line_meta;
+ line_meta["type"] = "connection";
+ line_meta["method"] = method;
line = functions[j].get_slice(":", 1).to_int() - 1;
- text_edit->set_line_gutter_metadata(line, connection_gutter, method);
+ text_edit->set_line_gutter_metadata(line, connection_gutter, line_meta);
text_edit->set_line_gutter_icon(line, connection_gutter, get_parent_control()->get_theme_icon(SNAME("Slot"), SNAME("EditorIcons")));
text_edit->set_line_gutter_clickable(line, connection_gutter, true);
methods_found.insert(method);
@@ -1033,6 +1051,66 @@ void ScriptTextEditor::_update_connected_methods() {
}
}
}
+
+ // Add override icons to methods.
+ methods_found.clear();
+ for (int i = 0; i < functions.size(); i++) {
+ StringName name = StringName(functions[i].get_slice(":", 0));
+ if (methods_found.has(name)) {
+ continue;
+ }
+
+ String found_base_class;
+ StringName base_class = script->get_instance_base_type();
+ Ref<Script> inherited_script = script->get_base_script();
+ while (!inherited_script.is_null()) {
+ if (inherited_script->has_method(name)) {
+ found_base_class = "script:" + inherited_script->get_path();
+ break;
+ }
+
+ base_class = inherited_script->get_instance_base_type();
+ inherited_script = inherited_script->get_base_script();
+ }
+
+ if (found_base_class.is_empty()) {
+ while (base_class) {
+ List<MethodInfo> methods;
+ ClassDB::get_method_list(base_class, &methods, true);
+ for (int j = 0; j < methods.size(); j++) {
+ if (methods[j].name == name) {
+ found_base_class = "builtin:" + base_class;
+ break;
+ }
+ }
+
+ ClassDB::ClassInfo *base_class_ptr = ClassDB::classes.getptr(base_class)->inherits_ptr;
+ if (base_class_ptr == nullptr) {
+ break;
+ }
+ base_class = base_class_ptr->name;
+ }
+ }
+
+ if (!found_base_class.is_empty()) {
+ int line = functions[i].get_slice(":", 1).to_int() - 1;
+
+ Dictionary line_meta = text_edit->get_line_gutter_metadata(line, connection_gutter);
+ if (line_meta.is_empty()) {
+ // Add override icon to gutter.
+ line_meta["type"] = "inherits";
+ line_meta["method"] = name;
+ line_meta["base_class"] = found_base_class;
+ text_edit->set_line_gutter_icon(line, connection_gutter, get_parent_control()->get_theme_icon(SNAME("MethodOverride"), SNAME("EditorIcons")));
+ text_edit->set_line_gutter_clickable(line, connection_gutter, true);
+ } else {
+ // If method is also connected to signal, then merge icons and keep the click behavior of the slot.
+ text_edit->set_line_gutter_icon(line, connection_gutter, get_parent_control()->get_theme_icon(SNAME("MethodOverrideAndSlot"), SNAME("EditorIcons")));
+ }
+
+ methods_found.insert(name);
+ }
+ }
}
void ScriptTextEditor::_update_gutter_indexes() {
@@ -1054,18 +1132,40 @@ void ScriptTextEditor::_gutter_clicked(int p_line, int p_gutter) {
return;
}
- String method = code_editor->get_text_editor()->get_line_gutter_metadata(p_line, p_gutter);
- if (method.is_empty()) {
+ Dictionary meta = code_editor->get_text_editor()->get_line_gutter_metadata(p_line, p_gutter);
+ String type = meta.get("type", "");
+ if (type.is_empty()) {
return;
}
- Node *base = get_tree()->get_edited_scene_root();
- if (!base) {
+ // All types currently need a method name.
+ String method = meta.get("method", "");
+ if (method.is_empty()) {
return;
}
- Vector<Node *> nodes = _find_all_node_for_script(base, base, script);
- connection_info_dialog->popup_connections(method, nodes);
+ if (type == "connection") {
+ Node *base = get_tree()->get_edited_scene_root();
+ if (!base) {
+ return;
+ }
+
+ Vector<Node *> nodes = _find_all_node_for_script(base, base, script);
+ connection_info_dialog->popup_connections(method, nodes);
+ } else if (type == "inherits") {
+ String base_class_raw = meta["base_class"];
+ PackedStringArray base_class_split = base_class_raw.split(":", true, 1);
+
+ if (base_class_split[0] == "script") {
+ // Go to function declaration.
+ Ref<Script> base_script = ResourceLoader::load(base_class_split[1]);
+ ERR_FAIL_COND(!base_script.is_valid());
+ emit_signal(SNAME("go_to_method"), base_script, method);
+ } else if (base_class_split[0] == "builtin") {
+ // Open method documentation.
+ emit_signal(SNAME("go_to_help"), "class_method:" + base_class_split[1] + ":" + method);
+ }
+ }
}
void ScriptTextEditor::_edit_option(int p_op) {
@@ -1102,21 +1202,19 @@ void ScriptTextEditor::_edit_option(int p_op) {
case EDIT_MOVE_LINE_DOWN: {
code_editor->move_lines_down();
} break;
- case EDIT_INDENT_LEFT: {
+ case EDIT_INDENT: {
Ref<Script> scr = script;
if (scr.is_null()) {
return;
}
-
- tx->unindent_lines();
+ tx->indent_lines();
} break;
- case EDIT_INDENT_RIGHT: {
+ case EDIT_UNINDENT: {
Ref<Script> scr = script;
if (scr.is_null()) {
return;
}
-
- tx->indent_lines();
+ tx->unindent_lines();
} break;
case EDIT_DELETE_LINE: {
code_editor->delete_lines();
@@ -1125,7 +1223,9 @@ void ScriptTextEditor::_edit_option(int p_op) {
code_editor->duplicate_selection();
} break;
case EDIT_TOGGLE_FOLD_LINE: {
- tx->toggle_foldable_line(tx->get_caret_line());
+ for (int caret_idx = 0; caret_idx < tx->get_caret_count(); caret_idx++) {
+ tx->toggle_foldable_line(tx->get_caret_line(caret_idx));
+ }
tx->queue_redraw();
} break;
case EDIT_FOLD_ALL_LINES: {
@@ -1193,28 +1293,28 @@ void ScriptTextEditor::_edit_option(int p_op) {
} break;
case EDIT_EVALUATE: {
Expression expression;
- Vector<String> lines = code_editor->get_text_editor()->get_selected_text().split("\n");
- PackedStringArray results;
-
- for (int i = 0; i < lines.size(); i++) {
- String line = lines[i];
- String whitespace = line.substr(0, line.size() - line.strip_edges(true, false).size()); //extract the whitespace at the beginning
-
- if (expression.parse(line) == OK) {
- Variant result = expression.execute(Array(), Variant(), false, true);
- if (expression.get_error_text().is_empty()) {
- results.push_back(whitespace + result.get_construct_string());
+ tx->begin_complex_operation();
+ for (int caret_idx = 0; caret_idx < tx->get_caret_count(); caret_idx++) {
+ Vector<String> lines = tx->get_selected_text(caret_idx).split("\n");
+ PackedStringArray results;
+
+ for (int i = 0; i < lines.size(); i++) {
+ String line = lines[i];
+ String whitespace = line.substr(0, line.size() - line.strip_edges(true, false).size()); // Extract the whitespace at the beginning.
+ if (expression.parse(line) == OK) {
+ Variant result = expression.execute(Array(), Variant(), false, true);
+ if (expression.get_error_text().is_empty()) {
+ results.push_back(whitespace + result.get_construct_string());
+ } else {
+ results.push_back(line);
+ }
} else {
results.push_back(line);
}
- } else {
- results.push_back(line);
}
+ tx->insert_text_at_caret(String("\n").join(results), caret_idx);
}
-
- code_editor->get_text_editor()->begin_complex_operation(); //prevents creating a two-step undo
- code_editor->get_text_editor()->insert_text_at_caret(String("\n").join(results));
- code_editor->get_text_editor()->end_complex_operation();
+ tx->end_complex_operation();
} break;
case SEARCH_FIND: {
code_editor->get_find_replace_bar()->popup_search();
@@ -1229,14 +1329,14 @@ void ScriptTextEditor::_edit_option(int p_op) {
code_editor->get_find_replace_bar()->popup_replace();
} break;
case SEARCH_IN_FILES: {
- String selected_text = code_editor->get_text_editor()->get_selected_text();
+ String selected_text = tx->get_selected_text();
// Yep, because it doesn't make sense to instance this dialog for every single script open...
// So this will be delegated to the ScriptEditor.
emit_signal(SNAME("search_in_files_requested"), selected_text);
} break;
case REPLACE_IN_FILES: {
- String selected_text = code_editor->get_text_editor()->get_selected_text();
+ String selected_text = tx->get_selected_text();
emit_signal(SNAME("replace_in_files_requested"), selected_text);
} break;
@@ -1260,10 +1360,12 @@ void ScriptTextEditor::_edit_option(int p_op) {
code_editor->remove_all_bookmarks();
} break;
case DEBUG_TOGGLE_BREAKPOINT: {
- int line = tx->get_caret_line();
- bool dobreak = !tx->is_line_breakpointed(line);
- tx->set_line_as_breakpoint(line, dobreak);
- EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), line + 1, dobreak);
+ for (int caret_idx = 0; caret_idx < tx->get_caret_count(); caret_idx++) {
+ int line = tx->get_caret_line(caret_idx);
+ bool dobreak = !tx->is_line_breakpointed(line);
+ tx->set_line_as_breakpoint(line, dobreak);
+ EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), line + 1, dobreak);
+ }
} break;
case DEBUG_REMOVE_ALL_BREAKPOINTS: {
PackedInt32Array bpoints = tx->get_breakpointed_lines();
@@ -1281,25 +1383,14 @@ void ScriptTextEditor::_edit_option(int p_op) {
return;
}
- int line = tx->get_caret_line();
-
- // wrap around
- if (line >= (int)bpoints[bpoints.size() - 1]) {
- tx->unfold_line(bpoints[0]);
- tx->set_caret_line(bpoints[0]);
- tx->center_viewport_to_caret();
- } else {
- for (int i = 0; i < bpoints.size(); i++) {
- int bline = bpoints[i];
- if (bline > line) {
- tx->unfold_line(bline);
- tx->set_caret_line(bline);
- tx->center_viewport_to_caret();
- return;
- }
+ int current_line = tx->get_caret_line();
+ int bpoint_idx = 0;
+ if (current_line < (int)bpoints[bpoints.size() - 1]) {
+ while (bpoint_idx < bpoints.size() && bpoints[bpoint_idx] <= current_line) {
+ bpoint_idx++;
}
}
-
+ code_editor->goto_line_centered(bpoints[bpoint_idx]);
} break;
case DEBUG_GOTO_PREV_BREAKPOINT: {
PackedInt32Array bpoints = tx->get_breakpointed_lines();
@@ -1307,41 +1398,31 @@ void ScriptTextEditor::_edit_option(int p_op) {
return;
}
- int line = tx->get_caret_line();
- // wrap around
- if (line <= (int)bpoints[0]) {
- tx->unfold_line(bpoints[bpoints.size() - 1]);
- tx->set_caret_line(bpoints[bpoints.size() - 1]);
- tx->center_viewport_to_caret();
- } else {
- for (int i = bpoints.size() - 1; i >= 0; i--) {
- int bline = bpoints[i];
- if (bline < line) {
- tx->unfold_line(bline);
- tx->set_caret_line(bline);
- tx->center_viewport_to_caret();
- return;
- }
+ int current_line = tx->get_caret_line();
+ int bpoint_idx = bpoints.size() - 1;
+ if (current_line > (int)bpoints[0]) {
+ while (bpoint_idx >= 0 && bpoints[bpoint_idx] >= current_line) {
+ bpoint_idx--;
}
}
-
+ code_editor->goto_line_centered(bpoints[bpoint_idx]);
} break;
case HELP_CONTEXTUAL: {
- String text = tx->get_selected_text();
+ String text = tx->get_selected_text(0);
if (text.is_empty()) {
- text = tx->get_word_under_caret();
+ text = tx->get_word_under_caret(0);
}
if (!text.is_empty()) {
emit_signal(SNAME("request_help"), text);
}
} break;
case LOOKUP_SYMBOL: {
- String text = tx->get_word_under_caret();
+ String text = tx->get_word_under_caret(0);
if (text.is_empty()) {
- text = tx->get_selected_text();
+ text = tx->get_selected_text(0);
}
if (!text.is_empty()) {
- _lookup_symbol(text, tx->get_caret_line(), tx->get_caret_column());
+ _lookup_symbol(text, tx->get_caret_line(0), tx->get_caret_column(0));
}
} break;
}
@@ -1409,14 +1490,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;
}
@@ -1487,16 +1560,17 @@ bool ScriptTextEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_
}
static Node *_find_script_node(Node *p_edited_scene, Node *p_current_node, const Ref<Script> &script) {
- if (p_edited_scene != p_current_node && p_current_node->get_owner() != p_edited_scene) {
- return nullptr;
- }
-
- Ref<Script> scr = p_current_node->get_script();
-
- if (scr.is_valid() && scr == script) {
- return p_current_node;
+ // Check scripts only for the nodes belonging to the edited scene.
+ if (p_current_node == p_edited_scene || p_current_node->get_owner() == p_edited_scene) {
+ Ref<Script> scr = p_current_node->get_script();
+ if (scr.is_valid() && scr == script) {
+ return p_current_node;
+ }
}
+ // Traverse all children, even the ones not owned by the edited scene as they
+ // can still have child nodes added within the edited scene and thus owned by
+ // it (e.g. nodes added to subscene's root or to its editable children).
for (int i = 0; i < p_current_node->get_child_count(); i++) {
Node *n = _find_script_node(p_edited_scene, p_current_node->get_child(i), script);
if (n) {
@@ -1507,9 +1581,24 @@ static Node *_find_script_node(Node *p_edited_scene, Node *p_current_node, const
return nullptr;
}
-void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
- const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
+static String _quote_drop_data(const String &str) {
+ // This function prepares a string for being "dropped" into the script editor.
+ // The string can be a resource path, node path or property name.
+
+ const bool using_single_quotes = EDITOR_GET("text_editor/completion/use_single_quotes");
+
+ String escaped = str.c_escape();
+
+ // If string is double quoted, there is no need to escape single quotes.
+ // We can revert the extra escaping added in c_escape().
+ if (!using_single_quotes) {
+ escaped = escaped.replace("\\'", "\'");
+ }
+
+ return escaped.quote(using_single_quotes ? "'" : "\"");
+}
+void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
Dictionary d = p_data;
CodeEdit *te = code_editor->get_text_editor();
@@ -1518,6 +1607,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
int col = pos.x;
if (d.has("type") && String(d["type"]) == "resource") {
+ te->remove_secondary_carets();
Ref<Resource> res = d["resource"];
if (!res.is_valid()) {
return;
@@ -1535,6 +1625,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (d.has("type") && (String(d["type"]) == "files" || String(d["type"]) == "files_and_dirs")) {
+ te->remove_secondary_carets();
Array files = d["files"];
String text_to_drop;
@@ -1545,9 +1636,9 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (preload) {
- text_to_drop += "preload(" + String(files[i]).c_escape().quote(quote_style) + ")";
+ text_to_drop += "preload(" + _quote_drop_data(String(files[i])) + ")";
} else {
- text_to_drop += String(files[i]).c_escape().quote(quote_style);
+ text_to_drop += _quote_drop_data(String(files[i]));
}
}
@@ -1558,8 +1649,14 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (d.has("type") && String(d["type"]) == "nodes") {
- Node *sn = _find_script_node(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root(), script);
+ te->remove_secondary_carets();
+ Node *scene_root = get_tree()->get_edited_scene_root();
+ if (!scene_root) {
+ EditorNode::get_singleton()->show_warning(TTR("Can't drop nodes without an open scene."));
+ return;
+ }
+ Node *sn = _find_script_node(scene_root, scene_root, script);
if (!sn) {
EditorNode::get_singleton()->show_warning(vformat(TTR("Can't drop nodes because script '%s' is not used in this scene."), get_name()));
return;
@@ -1587,7 +1684,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
for (const String &segment : path.split("/")) {
if (!segment.is_valid_identifier()) {
- path = path.c_escape().quote(quote_style);
+ path = _quote_drop_data(path);
break;
}
}
@@ -1622,7 +1719,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
for (const String &segment : path.split("/")) {
if (!segment.is_valid_identifier()) {
- path = path.c_escape().quote(quote_style);
+ path = _quote_drop_data(path);
break;
}
}
@@ -1637,7 +1734,10 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (d.has("type") && String(d["type"]) == "obj_property") {
- const String text_to_drop = String(d["property"]).c_escape().quote(quote_style);
+ te->remove_secondary_carets();
+ // It is unclear whether properties may contain single or double quotes.
+ // Assume here that double-quotes may not exist. We are escaping single-quotes if necessary.
+ const String text_to_drop = _quote_drop_data(String(d["property"]));
te->set_caret_line(row);
te->set_caret_column(col);
@@ -1657,8 +1757,8 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
local_pos = mb->get_global_position() - tx->get_global_position();
create_menu = true;
} else if (k.is_valid() && k->is_action("ui_menu", true)) {
- tx->adjust_viewport_to_caret();
- local_pos = tx->get_caret_draw_pos();
+ tx->adjust_viewport_to_caret(0);
+ local_pos = tx->get_caret_draw_pos(0);
create_menu = true;
}
@@ -1667,8 +1767,9 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
int row = pos.y;
int col = pos.x;
- tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/move_caret_on_right_click"));
+ tx->set_move_caret_on_right_click_enabled(EDITOR_GET("text_editor/behavior/navigation/move_caret_on_right_click"));
if (tx->is_move_caret_on_right_click_enabled()) {
+ tx->remove_secondary_carets();
if (tx->has_selection()) {
int from_line = tx->get_selection_from_line();
int to_line = tx->get_selection_to_line();
@@ -1688,10 +1789,10 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
String word_at_pos = tx->get_word_at_pos(local_pos);
if (word_at_pos.is_empty()) {
- word_at_pos = tx->get_word_under_caret();
+ word_at_pos = tx->get_word_under_caret(0);
}
if (word_at_pos.is_empty()) {
- word_at_pos = tx->get_selected_text();
+ word_at_pos = tx->get_selected_text(0);
}
bool has_color = (word_at_pos == "Color");
@@ -1707,7 +1808,7 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
base = _find_node_for_script(base, base, script);
}
ScriptLanguage::LookupResult result;
- if (script->get_language()->lookup_code(code_editor->get_text_editor()->get_text_for_symbol_lookup(), word_at_pos, script->get_path(), base, result) == OK) {
+ if (script->get_language()->lookup_code(tx->get_text_for_symbol_lookup(), word_at_pos, script->get_path(), base, result) == OK) {
open_docs = true;
}
}
@@ -1733,7 +1834,7 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
if (valid) {
color_args = line.substr(begin, end - begin);
String stripped = color_args.replace(" ", "").replace("(", "").replace(")", "");
- Vector<float> color = stripped.split_floats(",");
+ PackedFloat64Array color = stripped.split_floats(",");
if (color.size() > 2) {
float alpha = color.size() > 3 ? color[3] : 1.0f;
color_picker->set_pick_color(Color(color[0], color[1], color[2], alpha));
@@ -1786,8 +1887,8 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p
context_menu->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
context_menu->add_separator();
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent"), EDIT_INDENT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unindent"), EDIT_UNINDENT);
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE);
@@ -1877,17 +1978,6 @@ void ScriptTextEditor::_enable_code_editor() {
add_child(connection_info_dialog);
- edit_hb->add_child(search_menu);
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_previous"), SEARCH_FIND_PREV);
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE);
- search_menu->get_popup()->add_separator();
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_in_files"), SEARCH_IN_FILES);
- search_menu->get_popup()->add_separator();
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL);
- search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
-
edit_hb->add_child(edit_menu);
edit_menu->connect("about_to_popup", callable_mp(this, &ScriptTextEditor::_prepare_edit_menu));
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
@@ -1898,41 +1988,75 @@ void ScriptTextEditor::_enable_code_editor() {
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/duplicate_selection"), EDIT_DUPLICATE_SELECTION);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/evaluate_selection"), EDIT_EVALUATE);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_up"), EDIT_MOVE_LINE_UP);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_down"), EDIT_MOVE_LINE_DOWN);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/delete_line"), EDIT_DELETE_LINE);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_fold_line"), EDIT_TOGGLE_FOLD_LINE);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
+ {
+ PopupMenu *sub_menu = memnew(PopupMenu);
+ sub_menu->set_name("line_menu");
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_up"), EDIT_MOVE_LINE_UP);
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_down"), EDIT_MOVE_LINE_DOWN);
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent"), EDIT_INDENT);
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unindent"), EDIT_UNINDENT);
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/delete_line"), EDIT_DELETE_LINE);
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
+ sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ edit_menu->get_popup()->add_child(sub_menu);
+ edit_menu->get_popup()->add_submenu_item(TTR("Line"), "line_menu");
+ }
+ {
+ PopupMenu *sub_menu = memnew(PopupMenu);
+ sub_menu->set_name("folding_menu");
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_fold_line"), EDIT_TOGGLE_FOLD_LINE);
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
+ sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ edit_menu->get_popup()->add_child(sub_menu);
+ edit_menu->get_popup()->add_submenu_item(TTR("Folding"), "folding_menu");
+ }
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/duplicate_selection"), EDIT_DUPLICATE_SELECTION);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_completion_query"), EDIT_COMPLETE);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/evaluate_selection"), EDIT_EVALUATE);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/trim_trailing_whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT);
+ {
+ PopupMenu *sub_menu = memnew(PopupMenu);
+ sub_menu->set_name("indent_menu");
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS);
+ sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT);
+ sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ edit_menu->get_popup()->add_child(sub_menu);
+ edit_menu->get_popup()->add_submenu_item(TTR("Indentation"), "indent_menu");
+ }
edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_separator();
-
- edit_menu->get_popup()->add_child(convert_case);
- edit_menu->get_popup()->add_submenu_item(TTR("Convert Case"), "convert_case");
- convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase"), KeyModifierMask::SHIFT | Key::F4), EDIT_TO_UPPERCASE);
- convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase"), KeyModifierMask::SHIFT | Key::F5), EDIT_TO_LOWERCASE);
- convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KeyModifierMask::SHIFT | Key::F6), EDIT_CAPITALIZE);
- convert_case->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
-
+ {
+ PopupMenu *sub_menu = memnew(PopupMenu);
+ sub_menu->set_name("convert_case");
+ sub_menu->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase"), KeyModifierMask::SHIFT | Key::F4), EDIT_TO_UPPERCASE);
+ sub_menu->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase"), KeyModifierMask::SHIFT | Key::F5), EDIT_TO_LOWERCASE);
+ sub_menu->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KeyModifierMask::SHIFT | Key::F6), EDIT_CAPITALIZE);
+ sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ edit_menu->get_popup()->add_child(sub_menu);
+ edit_menu->get_popup()->add_submenu_item(TTR("Convert Case"), "convert_case");
+ }
edit_menu->get_popup()->add_child(highlighter_menu);
edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "highlighter_menu");
highlighter_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_change_syntax_highlighter));
+ edit_hb->add_child(search_menu);
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_previous"), SEARCH_FIND_PREV);
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE);
+ search_menu->get_popup()->add_separator();
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_in_files"), SEARCH_IN_FILES);
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace_in_files"), REPLACE_IN_FILES);
+ search_menu->get_popup()->add_separator();
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL);
+ search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+
_load_theme_settings();
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace_in_files"), REPLACE_IN_FILES);
edit_hb->add_child(goto_menu);
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_function"), SEARCH_LOCATE_FUNCTION);
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
@@ -1989,7 +2113,7 @@ ScriptTextEditor::ScriptTextEditor() {
update_settings();
- code_editor->get_text_editor()->set_code_hint_draw_below(EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"));
+ code_editor->get_text_editor()->set_code_hint_draw_below(EDITOR_GET("text_editor/completion/put_callhint_tooltip_below_current_line"));
code_editor->get_text_editor()->set_symbol_lookup_on_click_enabled(true);
code_editor->get_text_editor()->set_context_menu_enabled(false);
@@ -2005,9 +2129,6 @@ ScriptTextEditor::ScriptTextEditor() {
edit_menu->set_switch_on_hover(true);
edit_menu->set_shortcut_context(this);
- convert_case = memnew(PopupMenu);
- convert_case->set_name("convert_case");
-
highlighter_menu = memnew(PopupMenu);
highlighter_menu->set_name("highlighter_menu");
@@ -2038,7 +2159,7 @@ ScriptTextEditor::ScriptTextEditor() {
connection_info_dialog = memnew(ConnectionInfoDialog);
- code_editor->get_text_editor()->set_drag_forwarding(this);
+ SET_DRAG_FORWARDING_GCD(code_editor, ScriptTextEditor);
}
ScriptTextEditor::~ScriptTextEditor() {
@@ -2052,7 +2173,6 @@ ScriptTextEditor::~ScriptTextEditor() {
memdelete(color_panel);
memdelete(edit_hb);
memdelete(edit_menu);
- memdelete(convert_case);
memdelete(highlighter_menu);
memdelete(search_menu);
memdelete(goto_menu);
@@ -2077,8 +2197,8 @@ void ScriptTextEditor::register_editor() {
// Leave these at zero, same can be accomplished with tab/shift-tab, including selection.
// The next/previous in history shortcut in this case makes a lot more sense.
- ED_SHORTCUT("script_text_editor/indent_left", TTR("Indent Left"), Key::NONE);
- ED_SHORTCUT("script_text_editor/indent_right", TTR("Indent Right"), Key::NONE);
+ ED_SHORTCUT("script_text_editor/indent", TTR("Indent"), Key::NONE);
+ ED_SHORTCUT("script_text_editor/unindent", TTR("Unindent"), KeyModifierMask::SHIFT | Key::TAB);
ED_SHORTCUT("script_text_editor/toggle_comment", TTR("Toggle Comment"), KeyModifierMask::CMD_OR_CTRL | Key::K);
ED_SHORTCUT("script_text_editor/toggle_fold_line", TTR("Fold/Unfold Line"), KeyModifierMask::ALT | Key::F);
ED_SHORTCUT("script_text_editor/fold_all_lines", TTR("Fold All Lines"), Key::NONE);
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 8d2fb98721..1d96376748 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -1,40 +1,44 @@
-/*************************************************************************/
-/* script_text_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* script_text_editor.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 SCRIPT_TEXT_EDITOR_H
#define SCRIPT_TEXT_EDITOR_H
+#include "script_editor_plugin.h"
+
+#include "editor/code_editor.h"
#include "scene/gui/color_picker.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/tree.h"
-#include "script_editor_plugin.h"
+
+class RichTextLabel;
class ConnectionInfoDialog : public AcceptDialog {
GDCLASS(ConnectionInfoDialog, AcceptDialog);
@@ -79,7 +83,6 @@ class ScriptTextEditor : public ScriptEditorBase {
PopupMenu *breakpoints_menu = nullptr;
PopupMenu *highlighter_menu = nullptr;
PopupMenu *context_menu = nullptr;
- PopupMenu *convert_case = nullptr;
GotoLineDialog *goto_line_dialog = nullptr;
ScriptEditorQuickOpen *quick_open = nullptr;
@@ -117,8 +120,8 @@ class ScriptTextEditor : public ScriptEditorBase {
EDIT_TOGGLE_COMMENT,
EDIT_MOVE_LINE_UP,
EDIT_MOVE_LINE_DOWN,
- EDIT_INDENT_RIGHT,
- EDIT_INDENT_LEFT,
+ EDIT_INDENT,
+ EDIT_UNINDENT,
EDIT_DELETE_LINE,
EDIT_DUPLICATE_SELECTION,
EDIT_PICK_COLOR,
@@ -173,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);
@@ -207,7 +209,7 @@ public:
virtual void apply_code() override;
virtual Ref<Resource> get_edited_resource() const override;
virtual void set_edited_resource(const Ref<Resource> &p_res) override;
- virtual void enable_editor() override;
+ virtual void enable_editor(Control *p_shortcut_context = nullptr) override;
virtual Vector<String> get_functions() override;
virtual void reload_text() override;
virtual String get_name() override;
@@ -215,6 +217,7 @@ public:
virtual bool is_unsaved() override;
virtual Variant get_edit_state() override;
virtual void set_edit_state(const Variant &p_state) override;
+ virtual Variant get_navigation_state() override;
virtual void ensure_focus() override;
virtual void trim_trailing_whitespace() override;
virtual void insert_final_newline() override;
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 246bc4b183..87d602ccf1 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -1,1197 +1,45 @@
-/*************************************************************************/
-/* shader_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* shader_editor_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 "shader_editor_plugin.h"
-#include "core/io/resource_loader.h"
-#include "core/io/resource_saver.h"
-#include "core/os/keyboard.h"
-#include "core/os/os.h"
-#include "core/version_generated.gen.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
-#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
#include "editor/filesystem_dock.h"
+#include "editor/inspector_dock.h"
+#include "editor/plugins/text_shader_editor.h"
#include "editor/plugins/visual_shader_editor_plugin.h"
-#include "editor/project_settings_editor.h"
#include "editor/shader_create_dialog.h"
-#include "scene/gui/split_container.h"
-#include "servers/display_server.h"
-#include "servers/rendering/shader_preprocessor.h"
-#include "servers/rendering/shader_types.h"
-
-/*** SHADER SYNTAX HIGHLIGHTER ****/
-
-Dictionary GDShaderSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_line) {
- Dictionary color_map;
-
- for (const Point2i &region : disabled_branch_regions) {
- if (p_line >= region.x && p_line <= region.y) {
- Dictionary highlighter_info;
- highlighter_info["color"] = disabled_branch_color;
-
- color_map[0] = highlighter_info;
- return color_map;
- }
- }
-
- return CodeHighlighter::_get_line_syntax_highlighting_impl(p_line);
-}
-
-void GDShaderSyntaxHighlighter::add_disabled_branch_region(const Point2i &p_region) {
- ERR_FAIL_COND(p_region.x < 0);
- ERR_FAIL_COND(p_region.y < 0);
-
- for (int i = 0; i < disabled_branch_regions.size(); i++) {
- ERR_FAIL_COND_MSG(disabled_branch_regions[i].x == p_region.x, "Branch region with a start line '" + itos(p_region.x) + "' already exists.");
- }
-
- Point2i disabled_branch_region;
- disabled_branch_region.x = p_region.x;
- disabled_branch_region.y = p_region.y;
- disabled_branch_regions.push_back(disabled_branch_region);
-
- clear_highlighting_cache();
-}
-
-void GDShaderSyntaxHighlighter::clear_disabled_branch_regions() {
- disabled_branch_regions.clear();
- clear_highlighting_cache();
-}
-
-void GDShaderSyntaxHighlighter::set_disabled_branch_color(const Color &p_color) {
- disabled_branch_color = p_color;
- clear_highlighting_cache();
-}
-
-/*** SHADER SCRIPT EDITOR ****/
-
-static bool saved_warnings_enabled = false;
-static bool saved_treat_warning_as_errors = false;
-static HashMap<ShaderWarning::Code, bool> saved_warnings;
-static uint32_t saved_warning_flags = 0U;
-
-void ShaderTextEditor::_notification(int p_what) {
- switch (p_what) {
- case NOTIFICATION_THEME_CHANGED: {
- if (is_visible_in_tree()) {
- _load_theme_settings();
- if (warnings.size() > 0 && last_compile_result == OK) {
- warnings_panel->clear();
- _update_warning_panel();
- }
- }
- } break;
- }
-}
-
-Ref<Shader> ShaderTextEditor::get_edited_shader() const {
- return shader;
-}
-
-Ref<ShaderInclude> ShaderTextEditor::get_edited_shader_include() const {
- return shader_inc;
-}
-
-void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader) {
- set_edited_shader(p_shader, p_shader->get_code());
-}
-
-void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader, const String &p_code) {
- if (shader == p_shader) {
- return;
- }
- if (shader.is_valid()) {
- shader->disconnect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed));
- }
- shader = p_shader;
- shader_inc = Ref<ShaderInclude>();
-
- set_edited_code(p_code);
-
- if (shader.is_valid()) {
- shader->connect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed));
- }
-}
-
-void ShaderTextEditor::set_edited_shader_include(const Ref<ShaderInclude> &p_shader_inc) {
- set_edited_shader_include(p_shader_inc, p_shader_inc->get_code());
-}
-
-void ShaderTextEditor::_shader_changed() {
- // This function is used for dependencies (include changing changes main shader and forces it to revalidate)
- if (block_shader_changed) {
- return;
- }
- dependencies_version++;
- _validate_script();
-}
-
-void ShaderTextEditor::set_edited_shader_include(const Ref<ShaderInclude> &p_shader_inc, const String &p_code) {
- if (shader_inc == p_shader_inc) {
- return;
- }
- if (shader_inc.is_valid()) {
- shader_inc->disconnect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed));
- }
- shader_inc = p_shader_inc;
- shader = Ref<Shader>();
-
- set_edited_code(p_code);
-
- if (shader_inc.is_valid()) {
- shader_inc->connect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed));
- }
-}
-
-void ShaderTextEditor::set_edited_code(const String &p_code) {
- _load_theme_settings();
-
- get_text_editor()->set_text(p_code);
- get_text_editor()->clear_undo_history();
- get_text_editor()->call_deferred(SNAME("set_h_scroll"), 0);
- get_text_editor()->call_deferred(SNAME("set_v_scroll"), 0);
- get_text_editor()->tag_saved_version();
-
- _validate_script();
- _line_col_changed();
-}
-
-void ShaderTextEditor::reload_text() {
- ERR_FAIL_COND(shader.is_null());
-
- CodeEdit *te = get_text_editor();
- int column = te->get_caret_column();
- int row = te->get_caret_line();
- int h = te->get_h_scroll();
- int v = te->get_v_scroll();
-
- te->set_text(shader->get_code());
- te->set_caret_line(row);
- te->set_caret_column(column);
- te->set_h_scroll(h);
- te->set_v_scroll(v);
-
- te->tag_saved_version();
-
- update_line_and_column();
-}
-
-void ShaderTextEditor::set_warnings_panel(RichTextLabel *p_warnings_panel) {
- warnings_panel = p_warnings_panel;
-}
-
-void ShaderTextEditor::_load_theme_settings() {
- CodeEdit *text_editor = get_text_editor();
- Color updated_marked_line_color = EDITOR_GET("text_editor/theme/highlighting/mark_color");
- if (updated_marked_line_color != marked_line_color) {
- for (int i = 0; i < text_editor->get_line_count(); i++) {
- if (text_editor->get_line_background_color(i) == marked_line_color) {
- text_editor->set_line_background_color(i, updated_marked_line_color);
- }
- }
- marked_line_color = updated_marked_line_color;
- }
-
- syntax_highlighter->set_number_color(EDITOR_GET("text_editor/theme/highlighting/number_color"));
- syntax_highlighter->set_symbol_color(EDITOR_GET("text_editor/theme/highlighting/symbol_color"));
- syntax_highlighter->set_function_color(EDITOR_GET("text_editor/theme/highlighting/function_color"));
- syntax_highlighter->set_member_variable_color(EDITOR_GET("text_editor/theme/highlighting/member_variable_color"));
-
- syntax_highlighter->clear_keyword_colors();
-
- const Color keyword_color = EDITOR_GET("text_editor/theme/highlighting/keyword_color");
- const Color control_flow_keyword_color = EDITOR_GET("text_editor/theme/highlighting/control_flow_keyword_color");
-
- List<String> keywords;
- ShaderLanguage::get_keyword_list(&keywords);
-
- for (const String &E : keywords) {
- if (ShaderLanguage::is_control_flow_keyword(E)) {
- syntax_highlighter->add_keyword_color(E, control_flow_keyword_color);
- } else {
- syntax_highlighter->add_keyword_color(E, keyword_color);
- }
- }
-
- List<String> pp_keywords;
- ShaderPreprocessor::get_keyword_list(&pp_keywords, false);
-
- for (const String &E : pp_keywords) {
- syntax_highlighter->add_keyword_color(E, keyword_color);
- }
-
- // Colorize built-ins like `COLOR` differently to make them easier
- // to distinguish from keywords at a quick glance.
-
- List<String> built_ins;
-
- if (shader_inc.is_valid()) {
- for (int i = 0; i < RenderingServer::SHADER_MAX; i++) {
- for (const KeyValue<StringName, ShaderLanguage::FunctionInfo> &E : ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(i))) {
- for (const KeyValue<StringName, ShaderLanguage::BuiltInInfo> &F : E.value.built_ins) {
- built_ins.push_back(F.key);
- }
- }
-
- const Vector<ShaderLanguage::ModeInfo> &modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(i));
-
- for (int j = 0; j < modes.size(); j++) {
- const ShaderLanguage::ModeInfo &info = modes[j];
-
- if (!info.options.is_empty()) {
- for (int k = 0; k < info.options.size(); k++) {
- built_ins.push_back(String(info.name) + "_" + String(info.options[k]));
- }
- } else {
- built_ins.push_back(String(info.name));
- }
- }
- }
- } else if (shader.is_valid()) {
- for (const KeyValue<StringName, ShaderLanguage::FunctionInfo> &E : ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode()))) {
- for (const KeyValue<StringName, ShaderLanguage::BuiltInInfo> &F : E.value.built_ins) {
- built_ins.push_back(F.key);
- }
- }
-
- const Vector<ShaderLanguage::ModeInfo> &modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader->get_mode()));
-
- for (int i = 0; i < modes.size(); i++) {
- const ShaderLanguage::ModeInfo &info = modes[i];
-
- if (!info.options.is_empty()) {
- for (int j = 0; j < info.options.size(); j++) {
- built_ins.push_back(String(info.name) + "_" + String(info.options[j]));
- }
- } else {
- built_ins.push_back(String(info.name));
- }
- }
- }
-
- const Color user_type_color = EDITOR_GET("text_editor/theme/highlighting/user_type_color");
-
- for (const String &E : built_ins) {
- syntax_highlighter->add_keyword_color(E, user_type_color);
- }
-
- // Colorize comments.
- const Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
- 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);
-
- text_editor->clear_comment_delimiters();
- text_editor->add_comment_delimiter("/*", "*/", false);
- text_editor->add_comment_delimiter("//", "", true);
-
- if (!text_editor->has_auto_brace_completion_open_key("/*")) {
- text_editor->add_auto_brace_completion_pair("/*", "*/");
- }
-
- // Colorize preprocessor include strings.
- const Color string_color = EDITOR_GET("text_editor/theme/highlighting/string_color");
- syntax_highlighter->add_color_region("\"", "\"", string_color, false);
-
- if (warnings_panel) {
- // Warnings panel.
- warnings_panel->add_theme_font_override("normal_font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("main"), SNAME("EditorFonts")));
- warnings_panel->add_theme_font_size_override("normal_font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("main_size"), SNAME("EditorFonts")));
- }
-}
-
-void ShaderTextEditor::_check_shader_mode() {
- String type = ShaderLanguage::get_shader_type(get_text_editor()->get_text());
-
- Shader::Mode mode;
-
- if (type == "canvas_item") {
- mode = Shader::MODE_CANVAS_ITEM;
- } else if (type == "particles") {
- mode = Shader::MODE_PARTICLES;
- } else if (type == "sky") {
- mode = Shader::MODE_SKY;
- } else if (type == "fog") {
- mode = Shader::MODE_FOG;
- } else {
- mode = Shader::MODE_SPATIAL;
- }
-
- if (shader->get_mode() != mode) {
- set_block_shader_changed(true);
- shader->set_code(get_text_editor()->get_text());
- set_block_shader_changed(false);
- _load_theme_settings();
- }
-}
-
-static ShaderLanguage::DataType _get_global_shader_uniform_type(const StringName &p_variable) {
- RS::GlobalShaderParameterType gvt = RS::get_singleton()->global_shader_parameter_get_type(p_variable);
- return (ShaderLanguage::DataType)RS::global_shader_uniform_type_get_shader_datatype(gvt);
-}
-
-static String complete_from_path;
-
-static void _complete_include_paths_search(EditorFileSystemDirectory *p_efsd, List<ScriptLanguage::CodeCompletionOption> *r_options) {
- if (!p_efsd) {
- return;
- }
- for (int i = 0; i < p_efsd->get_file_count(); i++) {
- if (p_efsd->get_file_type(i) == SNAME("ShaderInclude")) {
- String path = p_efsd->get_file_path(i);
- if (path.begins_with(complete_from_path)) {
- path = path.replace_first(complete_from_path, "");
- }
- r_options->push_back(ScriptLanguage::CodeCompletionOption(path, ScriptLanguage::CODE_COMPLETION_KIND_FILE_PATH));
- }
- }
- for (int j = 0; j < p_efsd->get_subdir_count(); j++) {
- _complete_include_paths_search(p_efsd->get_subdir(j), r_options);
- }
-}
-
-static void _complete_include_paths(List<ScriptLanguage::CodeCompletionOption> *r_options) {
- _complete_include_paths_search(EditorFileSystem::get_singleton()->get_filesystem(), r_options);
-}
-
-void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptLanguage::CodeCompletionOption> *r_options) {
- List<ScriptLanguage::CodeCompletionOption> pp_options;
- ShaderPreprocessor preprocessor;
- String code;
- complete_from_path = (shader.is_valid() ? shader->get_path() : shader_inc->get_path()).get_base_dir();
- if (!complete_from_path.ends_with("/")) {
- complete_from_path += "/";
- }
- preprocessor.preprocess(p_code, "", code, nullptr, nullptr, nullptr, nullptr, &pp_options, _complete_include_paths);
- complete_from_path = String();
- if (pp_options.size()) {
- for (const ScriptLanguage::CodeCompletionOption &E : pp_options) {
- r_options->push_back(E);
- }
- return;
- }
-
- ShaderLanguage sl;
- String calltip;
- ShaderLanguage::ShaderCompileInfo info;
- info.global_shader_uniform_type_func = _get_global_shader_uniform_type;
-
- if (shader.is_null()) {
- info.is_include = true;
-
- sl.complete(code, info, r_options, calltip);
- get_text_editor()->set_code_hint(calltip);
- return;
- }
- _check_shader_mode();
- info.functions = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode()));
- info.render_modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader->get_mode()));
- info.shader_types = ShaderTypes::get_singleton()->get_types();
-
- sl.complete(code, info, r_options, calltip);
- get_text_editor()->set_code_hint(calltip);
-}
-
-void ShaderTextEditor::_validate_script() {
- emit_signal(SNAME("script_changed")); // Ensure to notify that it changed, so it is applied
-
- String code;
-
- if (shader.is_valid()) {
- _check_shader_mode();
- code = shader->get_code();
- } else {
- code = shader_inc->get_code();
- }
-
- ShaderPreprocessor preprocessor;
- String code_pp;
- String error_pp;
- List<ShaderPreprocessor::FilePosition> err_positions;
- List<ShaderPreprocessor::Region> regions;
- String filename;
- if (shader.is_valid()) {
- filename = shader->get_path();
- } else if (shader_inc.is_valid()) {
- filename = shader_inc->get_path();
- }
- last_compile_result = preprocessor.preprocess(code, filename, code_pp, &error_pp, &err_positions, &regions);
-
- for (int i = 0; i < get_text_editor()->get_line_count(); i++) {
- get_text_editor()->set_line_background_color(i, Color(0, 0, 0, 0));
- }
-
- syntax_highlighter->clear_disabled_branch_regions();
- for (const ShaderPreprocessor::Region &region : regions) {
- if (!region.enabled) {
- if (filename != region.file) {
- continue;
- }
- syntax_highlighter->add_disabled_branch_region(Point2i(region.from_line, region.to_line));
- }
- }
-
- set_error("");
- set_error_count(0);
-
- if (last_compile_result != OK) {
- //preprocessor error
- ERR_FAIL_COND(err_positions.size() == 0);
-
- String error_text = error_pp;
- int error_line = err_positions.front()->get().line;
- if (err_positions.size() == 1) {
- // Error in main file
- error_text = "error(" + itos(error_line) + "): " + error_text;
- } else {
- error_text = "error(" + itos(error_line) + ") in include " + err_positions.back()->get().file.get_file() + ":" + itos(err_positions.back()->get().line) + ": " + error_text;
- set_error_count(err_positions.size() - 1);
- }
-
- set_error(error_text);
- set_error_pos(error_line - 1, 0);
- for (int i = 0; i < get_text_editor()->get_line_count(); i++) {
- get_text_editor()->set_line_background_color(i, Color(0, 0, 0, 0));
- }
- get_text_editor()->set_line_background_color(error_line - 1, marked_line_color);
-
- set_warning_count(0);
-
- } else {
- ShaderLanguage sl;
-
- sl.enable_warning_checking(saved_warnings_enabled);
- uint32_t flags = saved_warning_flags;
- if (shader.is_null()) {
- if (flags & ShaderWarning::UNUSED_CONSTANT) {
- flags &= ~(ShaderWarning::UNUSED_CONSTANT);
- }
- if (flags & ShaderWarning::UNUSED_FUNCTION) {
- flags &= ~(ShaderWarning::UNUSED_FUNCTION);
- }
- if (flags & ShaderWarning::UNUSED_STRUCT) {
- flags &= ~(ShaderWarning::UNUSED_STRUCT);
- }
- if (flags & ShaderWarning::UNUSED_UNIFORM) {
- flags &= ~(ShaderWarning::UNUSED_UNIFORM);
- }
- if (flags & ShaderWarning::UNUSED_VARYING) {
- flags &= ~(ShaderWarning::UNUSED_VARYING);
- }
- }
- sl.set_warning_flags(flags);
-
- ShaderLanguage::ShaderCompileInfo info;
- info.global_shader_uniform_type_func = _get_global_shader_uniform_type;
-
- if (shader.is_null()) {
- info.is_include = true;
- } else {
- Shader::Mode mode = shader->get_mode();
- info.functions = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(mode));
- info.render_modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(mode));
- info.shader_types = ShaderTypes::get_singleton()->get_types();
- }
-
- code = code_pp;
- //compiler error
- last_compile_result = sl.compile(code, info);
-
- if (last_compile_result != OK) {
- String error_text;
- int error_line;
- Vector<ShaderLanguage::FilePosition> include_positions = sl.get_include_positions();
- if (include_positions.size() > 1) {
- //error is in an include
- error_line = include_positions[0].line;
- error_text = "error(" + itos(error_line) + ") in include " + include_positions[include_positions.size() - 1].file + ":" + itos(include_positions[include_positions.size() - 1].line) + ": " + sl.get_error_text();
- set_error_count(include_positions.size() - 1);
- } else {
- error_line = sl.get_error_line();
- error_text = "error(" + itos(error_line) + "): " + sl.get_error_text();
- set_error_count(0);
- }
- set_error(error_text);
- set_error_pos(error_line - 1, 0);
- get_text_editor()->set_line_background_color(error_line - 1, marked_line_color);
- } else {
- set_error("");
- }
-
- if (warnings.size() > 0 || last_compile_result != OK) {
- warnings_panel->clear();
- }
- warnings.clear();
- for (List<ShaderWarning>::Element *E = sl.get_warnings_ptr(); E; E = E->next()) {
- warnings.push_back(E->get());
- }
- if (warnings.size() > 0 && last_compile_result == OK) {
- warnings.sort_custom<WarningsComparator>();
- _update_warning_panel();
- } else {
- set_warning_count(0);
- }
- }
-
- emit_signal(SNAME("script_validated"), last_compile_result == OK); // Notify that validation finished, to update the list of scripts
-}
-
-void ShaderTextEditor::_update_warning_panel() {
- int warning_count = 0;
-
- warnings_panel->push_table(2);
- for (int i = 0; i < warnings.size(); i++) {
- ShaderWarning &w = warnings[i];
-
- if (warning_count == 0) {
- if (saved_treat_warning_as_errors) {
- String error_text = "error(" + itos(w.get_line()) + "): " + w.get_message() + " " + TTR("Warnings should be fixed to prevent errors.");
- set_error_pos(w.get_line() - 1, 0);
- set_error(error_text);
- get_text_editor()->set_line_background_color(w.get_line() - 1, marked_line_color);
- }
- }
-
- warning_count++;
- int line = w.get_line();
-
- // First cell.
- warnings_panel->push_cell();
- warnings_panel->push_color(warnings_panel->get_theme_color(SNAME("warning_color"), SNAME("Editor")));
- if (line != -1) {
- warnings_panel->push_meta(line - 1);
- warnings_panel->add_text(TTR("Line") + " " + itos(line));
- warnings_panel->add_text(" (" + w.get_name() + "):");
- warnings_panel->pop(); // Meta goto.
- } else {
- warnings_panel->add_text(w.get_name() + ":");
- }
- warnings_panel->pop(); // Color.
- warnings_panel->pop(); // Cell.
-
- // Second cell.
- warnings_panel->push_cell();
- warnings_panel->add_text(w.get_message());
- warnings_panel->pop(); // Cell.
- }
- warnings_panel->pop(); // Table.
-
- set_warning_count(warning_count);
-}
-
-void ShaderTextEditor::_bind_methods() {
- ADD_SIGNAL(MethodInfo("script_validated", PropertyInfo(Variant::BOOL, "valid")));
-}
-
-ShaderTextEditor::ShaderTextEditor() {
- syntax_highlighter.instantiate();
- get_text_editor()->set_syntax_highlighter(syntax_highlighter);
-}
-
-/*** SCRIPT EDITOR ******/
-
-void ShaderEditor::_menu_option(int p_option) {
- switch (p_option) {
- case EDIT_UNDO: {
- shader_editor->get_text_editor()->undo();
- } break;
- case EDIT_REDO: {
- shader_editor->get_text_editor()->redo();
- } break;
- case EDIT_CUT: {
- shader_editor->get_text_editor()->cut();
- } break;
- case EDIT_COPY: {
- shader_editor->get_text_editor()->copy();
- } break;
- case EDIT_PASTE: {
- shader_editor->get_text_editor()->paste();
- } break;
- case EDIT_SELECT_ALL: {
- shader_editor->get_text_editor()->select_all();
- } break;
- case EDIT_MOVE_LINE_UP: {
- shader_editor->move_lines_up();
- } break;
- case EDIT_MOVE_LINE_DOWN: {
- shader_editor->move_lines_down();
- } break;
- case EDIT_INDENT_LEFT: {
- if (shader.is_null()) {
- return;
- }
- shader_editor->get_text_editor()->unindent_lines();
- } break;
- case EDIT_INDENT_RIGHT: {
- if (shader.is_null()) {
- return;
- }
- shader_editor->get_text_editor()->indent_lines();
- } break;
- case EDIT_DELETE_LINE: {
- shader_editor->delete_lines();
- } break;
- case EDIT_DUPLICATE_SELECTION: {
- shader_editor->duplicate_selection();
- } break;
- case EDIT_TOGGLE_COMMENT: {
- if (shader.is_null()) {
- return;
- }
-
- shader_editor->toggle_inline_comment("//");
-
- } break;
- case EDIT_COMPLETE: {
- shader_editor->get_text_editor()->request_code_completion();
- } break;
- case SEARCH_FIND: {
- shader_editor->get_find_replace_bar()->popup_search();
- } break;
- case SEARCH_FIND_NEXT: {
- shader_editor->get_find_replace_bar()->search_next();
- } break;
- case SEARCH_FIND_PREV: {
- shader_editor->get_find_replace_bar()->search_prev();
- } break;
- case SEARCH_REPLACE: {
- shader_editor->get_find_replace_bar()->popup_replace();
- } break;
- case SEARCH_GOTO_LINE: {
- goto_line_dialog->popup_find_line(shader_editor->get_text_editor());
- } break;
- case BOOKMARK_TOGGLE: {
- shader_editor->toggle_bookmark();
- } break;
- case BOOKMARK_GOTO_NEXT: {
- shader_editor->goto_next_bookmark();
- } break;
- case BOOKMARK_GOTO_PREV: {
- shader_editor->goto_prev_bookmark();
- } break;
- case BOOKMARK_REMOVE_ALL: {
- shader_editor->remove_all_bookmarks();
- } break;
- case HELP_DOCS: {
- OS::get_singleton()->shell_open(vformat("%s/tutorials/shaders/shader_reference/index.html", VERSION_DOCS_URL));
- } break;
- }
- if (p_option != SEARCH_FIND && p_option != SEARCH_REPLACE && p_option != SEARCH_GOTO_LINE) {
- shader_editor->get_text_editor()->call_deferred(SNAME("grab_focus"));
- }
-}
-
-void ShaderEditor::_notification(int p_what) {
- switch (p_what) {
- case NOTIFICATION_ENTER_TREE:
- case NOTIFICATION_THEME_CHANGED: {
- PopupMenu *popup = help_menu->get_popup();
- popup->set_item_icon(popup->get_item_index(HELP_DOCS), get_theme_icon(SNAME("ExternalLink"), SNAME("EditorIcons")));
- } break;
-
- case NOTIFICATION_WM_WINDOW_FOCUS_IN: {
- _check_for_external_edit();
- } break;
- }
-}
-
-void ShaderEditor::_editor_settings_changed() {
- shader_editor->update_editor_settings();
-
- shader_editor->get_text_editor()->add_theme_constant_override("line_spacing", EditorSettings::get_singleton()->get("text_editor/appearance/whitespace/line_spacing"));
- shader_editor->get_text_editor()->set_draw_breakpoints_gutter(false);
- shader_editor->get_text_editor()->set_draw_executing_lines_gutter(false);
-}
-
-void ShaderEditor::_show_warnings_panel(bool p_show) {
- warnings_panel->set_visible(p_show);
-}
-
-void ShaderEditor::_warning_clicked(Variant p_line) {
- if (p_line.get_type() == Variant::INT) {
- shader_editor->get_text_editor()->set_caret_line(p_line.operator int64_t());
- }
-}
-
-void ShaderEditor::_bind_methods() {
- ClassDB::bind_method("_show_warnings_panel", &ShaderEditor::_show_warnings_panel);
- ClassDB::bind_method("_warning_clicked", &ShaderEditor::_warning_clicked);
-
- ADD_SIGNAL(MethodInfo("validation_changed"));
-}
-
-void ShaderEditor::ensure_select_current() {
-}
-
-void ShaderEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
- shader_editor->goto_line_selection(p_line, p_begin, p_end);
-}
-
-void ShaderEditor::_project_settings_changed() {
- _update_warnings(true);
-}
-
-void ShaderEditor::_update_warnings(bool p_validate) {
- bool changed = false;
-
- bool warnings_enabled = GLOBAL_GET("debug/shader_language/warnings/enable").booleanize();
- if (warnings_enabled != saved_warnings_enabled) {
- saved_warnings_enabled = warnings_enabled;
- changed = true;
- }
-
- bool treat_warning_as_errors = GLOBAL_GET("debug/shader_language/warnings/treat_warnings_as_errors").booleanize();
- if (treat_warning_as_errors != saved_treat_warning_as_errors) {
- saved_treat_warning_as_errors = treat_warning_as_errors;
- changed = true;
- }
-
- bool update_flags = false;
-
- for (int i = 0; i < ShaderWarning::WARNING_MAX; i++) {
- ShaderWarning::Code code = (ShaderWarning::Code)i;
- bool value = GLOBAL_GET("debug/shader_language/warnings/" + ShaderWarning::get_name_from_code(code).to_lower());
-
- if (saved_warnings[code] != value) {
- saved_warnings[code] = value;
- update_flags = true;
- changed = true;
- }
- }
-
- if (update_flags) {
- saved_warning_flags = (uint32_t)ShaderWarning::get_flags_from_codemap(saved_warnings);
- }
-
- if (p_validate && changed && shader_editor && shader_editor->get_edited_shader().is_valid()) {
- shader_editor->validate_script();
- }
-}
-
-void ShaderEditor::_check_for_external_edit() {
- bool use_autoreload = bool(EDITOR_GET("text_editor/behavior/files/auto_reload_scripts_on_external_change"));
-
- if (shader_inc.is_valid()) {
- if (shader_inc->get_last_modified_time() != FileAccess::get_modified_time(shader_inc->get_path())) {
- if (use_autoreload) {
- _reload_shader_include_from_disk();
- } else {
- disk_changed->call_deferred(SNAME("popup_centered"));
- }
- }
- return;
- }
-
- if (shader.is_null() || shader->is_built_in()) {
- return;
- }
-
- if (shader->get_last_modified_time() != FileAccess::get_modified_time(shader->get_path())) {
- if (use_autoreload) {
- _reload_shader_from_disk();
- } else {
- disk_changed->call_deferred(SNAME("popup_centered"));
- }
- }
-}
-
-void ShaderEditor::_reload_shader_from_disk() {
- Ref<Shader> rel_shader = ResourceLoader::load(shader->get_path(), shader->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
- ERR_FAIL_COND(!rel_shader.is_valid());
-
- shader_editor->set_block_shader_changed(true);
- shader->set_code(rel_shader->get_code());
- shader_editor->set_block_shader_changed(false);
- shader->set_last_modified_time(rel_shader->get_last_modified_time());
- shader_editor->reload_text();
-}
-
-void ShaderEditor::_reload_shader_include_from_disk() {
- Ref<ShaderInclude> rel_shader_include = ResourceLoader::load(shader_inc->get_path(), shader_inc->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
- ERR_FAIL_COND(!rel_shader_include.is_valid());
-
- shader_editor->set_block_shader_changed(true);
- shader_inc->set_code(rel_shader_include->get_code());
- shader_editor->set_block_shader_changed(false);
- shader_inc->set_last_modified_time(rel_shader_include->get_last_modified_time());
- shader_editor->reload_text();
-}
-
-void ShaderEditor::_reload() {
- if (shader.is_valid()) {
- _reload_shader_from_disk();
- } else if (shader_inc.is_valid()) {
- _reload_shader_include_from_disk();
- }
-}
-
-void ShaderEditor::edit(const Ref<Shader> &p_shader) {
- if (p_shader.is_null() || !p_shader->is_text_shader()) {
- return;
- }
-
- if (shader == p_shader) {
- return;
- }
-
- shader = p_shader;
- shader_inc = Ref<ShaderInclude>();
-
- shader_editor->set_edited_shader(shader);
-}
-
-void ShaderEditor::edit(const Ref<ShaderInclude> &p_shader_inc) {
- if (p_shader_inc.is_null()) {
- return;
- }
-
- if (shader_inc == p_shader_inc) {
- return;
- }
-
- shader_inc = p_shader_inc;
- shader = Ref<Shader>();
-
- shader_editor->set_edited_shader_include(p_shader_inc);
-}
-
-void ShaderEditor::save_external_data(const String &p_str) {
- if (shader.is_null() && shader_inc.is_null()) {
- disk_changed->hide();
- return;
- }
-
- apply_shaders();
-
- Ref<Shader> edited_shader = shader_editor->get_edited_shader();
- if (edited_shader.is_valid()) {
- ResourceSaver::save(edited_shader);
- }
- if (shader.is_valid() && shader != edited_shader) {
- ResourceSaver::save(shader);
- }
-
- Ref<ShaderInclude> edited_shader_inc = shader_editor->get_edited_shader_include();
- if (edited_shader_inc.is_valid()) {
- ResourceSaver::save(edited_shader_inc);
- }
- if (shader_inc.is_valid() && shader_inc != edited_shader_inc) {
- ResourceSaver::save(shader_inc);
- }
- shader_editor->get_text_editor()->tag_saved_version();
-
- disk_changed->hide();
-}
-
-void ShaderEditor::validate_script() {
- shader_editor->_validate_script();
-}
-
-bool ShaderEditor::is_unsaved() const {
- return shader_editor->get_text_editor()->get_saved_version() != shader_editor->get_text_editor()->get_version();
-}
-
-void ShaderEditor::apply_shaders() {
- String editor_code = shader_editor->get_text_editor()->get_text();
- if (shader.is_valid()) {
- String shader_code = shader->get_code();
- if (shader_code != editor_code || dependencies_version != shader_editor->get_dependencies_version()) {
- shader_editor->set_block_shader_changed(true);
- shader->set_code(editor_code);
- shader_editor->set_block_shader_changed(false);
- shader->set_edited(true);
- }
- }
- if (shader_inc.is_valid()) {
- String shader_inc_code = shader_inc->get_code();
- if (shader_inc_code != editor_code || dependencies_version != shader_editor->get_dependencies_version()) {
- shader_editor->set_block_shader_changed(true);
- shader_inc->set_code(editor_code);
- shader_editor->set_block_shader_changed(false);
- shader_inc->set_edited(true);
- }
- }
-
- dependencies_version = shader_editor->get_dependencies_version();
-}
-
-void ShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
- Ref<InputEventMouseButton> mb = ev;
-
- if (mb.is_valid()) {
- if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) {
- CodeEdit *tx = shader_editor->get_text_editor();
-
- Point2i pos = tx->get_line_column_at_pos(mb->get_global_position() - tx->get_global_position());
- int row = pos.y;
- int col = pos.x;
- tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/move_caret_on_right_click"));
-
- if (tx->is_move_caret_on_right_click_enabled()) {
- if (tx->has_selection()) {
- int from_line = tx->get_selection_from_line();
- int to_line = tx->get_selection_to_line();
- int from_column = tx->get_selection_from_column();
- int to_column = tx->get_selection_to_column();
-
- if (row < from_line || row > to_line || (row == from_line && col < from_column) || (row == to_line && col > to_column)) {
- // Right click is outside the selected text
- tx->deselect();
- }
- }
- if (!tx->has_selection()) {
- tx->set_caret_line(row, true, false);
- tx->set_caret_column(col);
- }
- }
- _make_context_menu(tx->has_selection(), get_local_mouse_position());
- }
- }
-
- Ref<InputEventKey> k = ev;
- if (k.is_valid() && k->is_pressed() && k->is_action("ui_menu", true)) {
- CodeEdit *tx = shader_editor->get_text_editor();
- tx->adjust_viewport_to_caret();
- _make_context_menu(tx->has_selection(), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->get_caret_draw_pos()));
- context_menu->grab_focus();
- }
-}
-
-void ShaderEditor::_update_bookmark_list() {
- bookmarks_menu->clear();
-
- bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE);
- bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_bookmarks"), BOOKMARK_REMOVE_ALL);
- bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_next_bookmark"), BOOKMARK_GOTO_NEXT);
- bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_previous_bookmark"), BOOKMARK_GOTO_PREV);
-
- PackedInt32Array bookmark_list = shader_editor->get_text_editor()->get_bookmarked_lines();
- if (bookmark_list.size() == 0) {
- return;
- }
-
- bookmarks_menu->add_separator();
-
- for (int i = 0; i < bookmark_list.size(); i++) {
- String line = shader_editor->get_text_editor()->get_line(bookmark_list[i]).strip_edges();
- // Limit the size of the line if too big.
- if (line.length() > 50) {
- line = line.substr(0, 50);
- }
-
- bookmarks_menu->add_item(String::num((int)bookmark_list[i] + 1) + " - \"" + line + "\"");
- bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
- }
-}
-
-void ShaderEditor::_bookmark_item_pressed(int p_idx) {
- if (p_idx < 4) { // Any item before the separator.
- _menu_option(bookmarks_menu->get_item_id(p_idx));
- } else {
- shader_editor->goto_line(bookmarks_menu->get_item_metadata(p_idx));
- }
-}
-
-void ShaderEditor::_make_context_menu(bool p_selection, Vector2 p_position) {
- context_menu->clear();
- if (p_selection) {
- context_menu->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
- context_menu->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
- }
-
- context_menu->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
- context_menu->add_separator();
- context_menu->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
- context_menu->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
- context_menu->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
-
- context_menu->add_separator();
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE);
-
- context_menu->set_position(get_screen_position() + p_position);
- context_menu->reset_size();
- context_menu->popup();
-}
-
-ShaderEditor::ShaderEditor() {
- GLOBAL_DEF("debug/shader_language/warnings/enable", true);
- GLOBAL_DEF("debug/shader_language/warnings/treat_warnings_as_errors", false);
- for (int i = 0; i < (int)ShaderWarning::WARNING_MAX; i++) {
- GLOBAL_DEF("debug/shader_language/warnings/" + ShaderWarning::get_name_from_code((ShaderWarning::Code)i).to_lower(), true);
- }
- _update_warnings(false);
-
- shader_editor = memnew(ShaderTextEditor);
-
- shader_editor->connect("script_validated", callable_mp(this, &ShaderEditor::_script_validated));
-
- shader_editor->set_v_size_flags(SIZE_EXPAND_FILL);
- shader_editor->add_theme_constant_override("separation", 0);
- shader_editor->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
-
- shader_editor->connect("show_warnings_panel", callable_mp(this, &ShaderEditor::_show_warnings_panel));
- shader_editor->connect("script_changed", callable_mp(this, &ShaderEditor::apply_shaders));
- EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &ShaderEditor::_editor_settings_changed));
- ProjectSettingsEditor::get_singleton()->connect("confirmed", callable_mp(this, &ShaderEditor::_project_settings_changed));
-
- shader_editor->get_text_editor()->set_code_hint_draw_below(EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"));
-
- shader_editor->get_text_editor()->set_symbol_lookup_on_click_enabled(true);
- shader_editor->get_text_editor()->set_context_menu_enabled(false);
- shader_editor->get_text_editor()->connect("gui_input", callable_mp(this, &ShaderEditor::_text_edit_gui_input));
-
- shader_editor->update_editor_settings();
-
- context_menu = memnew(PopupMenu);
- add_child(context_menu);
- context_menu->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
-
- VBoxContainer *main_container = memnew(VBoxContainer);
- HBoxContainer *hbc = memnew(HBoxContainer);
-
- edit_menu = memnew(MenuButton);
- edit_menu->set_shortcut_context(this);
- edit_menu->set_text(TTR("Edit"));
- edit_menu->set_switch_on_hover(true);
-
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
- edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
- edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
- edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_up"), EDIT_MOVE_LINE_UP);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_down"), EDIT_MOVE_LINE_DOWN);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/delete_line"), EDIT_DELETE_LINE);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/duplicate_selection"), EDIT_DUPLICATE_SELECTION);
- edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_completion_query"), EDIT_COMPLETE);
- edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
-
- search_menu = memnew(MenuButton);
- search_menu->set_shortcut_context(this);
- search_menu->set_text(TTR("Search"));
- search_menu->set_switch_on_hover(true);
-
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_previous"), SEARCH_FIND_PREV);
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE);
- search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
-
- MenuButton *goto_menu = memnew(MenuButton);
- goto_menu->set_shortcut_context(this);
- goto_menu->set_text(TTR("Go To"));
- goto_menu->set_switch_on_hover(true);
- goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
-
- goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
- goto_menu->get_popup()->add_separator();
-
- bookmarks_menu = memnew(PopupMenu);
- bookmarks_menu->set_name("Bookmarks");
- goto_menu->get_popup()->add_child(bookmarks_menu);
- goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
- _update_bookmark_list();
- bookmarks_menu->connect("about_to_popup", callable_mp(this, &ShaderEditor::_update_bookmark_list));
- bookmarks_menu->connect("index_pressed", callable_mp(this, &ShaderEditor::_bookmark_item_pressed));
-
- help_menu = memnew(MenuButton);
- help_menu->set_text(TTR("Help"));
- help_menu->set_switch_on_hover(true);
- help_menu->get_popup()->add_item(TTR("Online Docs"), HELP_DOCS);
- help_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
-
- add_child(main_container);
- main_container->add_child(hbc);
- hbc->add_child(search_menu);
- hbc->add_child(edit_menu);
- hbc->add_child(goto_menu);
- hbc->add_child(help_menu);
- hbc->add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditorPanel"), SNAME("EditorStyles")));
-
- VSplitContainer *editor_box = memnew(VSplitContainer);
- main_container->add_child(editor_box);
- editor_box->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
- editor_box->set_v_size_flags(SIZE_EXPAND_FILL);
- editor_box->add_child(shader_editor);
-
- FindReplaceBar *bar = memnew(FindReplaceBar);
- main_container->add_child(bar);
- bar->hide();
- shader_editor->set_find_replace_bar(bar);
-
- warnings_panel = memnew(RichTextLabel);
- warnings_panel->set_custom_minimum_size(Size2(0, 100 * EDSCALE));
- warnings_panel->set_h_size_flags(SIZE_EXPAND_FILL);
- warnings_panel->set_meta_underline(true);
- warnings_panel->set_selection_enabled(true);
- warnings_panel->set_focus_mode(FOCUS_CLICK);
- warnings_panel->hide();
- warnings_panel->connect("meta_clicked", callable_mp(this, &ShaderEditor::_warning_clicked));
- editor_box->add_child(warnings_panel);
- shader_editor->set_warnings_panel(warnings_panel);
-
- goto_line_dialog = memnew(GotoLineDialog);
- add_child(goto_line_dialog);
-
- disk_changed = memnew(ConfirmationDialog);
-
- VBoxContainer *vbc = memnew(VBoxContainer);
- disk_changed->add_child(vbc);
-
- Label *dl = memnew(Label);
- dl->set_text(TTR("This shader has been modified on disk.\nWhat action should be taken?"));
- vbc->add_child(dl);
-
- disk_changed->connect("confirmed", callable_mp(this, &ShaderEditor::_reload));
- disk_changed->set_ok_button_text(TTR("Reload"));
-
- disk_changed->add_button(TTR("Resave"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");
- disk_changed->connect("custom_action", callable_mp(this, &ShaderEditor::save_external_data));
-
- add_child(disk_changed);
-
- _editor_settings_changed();
-}
+#include "scene/gui/item_list.h"
+#include "scene/gui/texture_rect.h"
void ShaderEditorPlugin::_update_shader_list() {
shader_list->clear();
@@ -1237,7 +85,7 @@ void ShaderEditorPlugin::_update_shader_list() {
shader_list->select(shader_tabs->get_current_tab());
}
- for (int i = 1; i < FILE_MAX; i++) {
+ 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);
}
@@ -1246,7 +94,7 @@ void ShaderEditorPlugin::_update_shader_list() {
void ShaderEditorPlugin::_update_shader_list_status() {
for (int i = 0; i < shader_list->get_item_count(); i++) {
- ShaderEditor *se = Object::cast_to<ShaderEditor>(shader_tabs->get_tab_control(i));
+ TextShaderEditor *se = Object::cast_to<TextShaderEditor>(shader_tabs->get_tab_control(i));
if (se) {
if (se->was_compilation_successful()) {
shader_list->set_item_tag_icon(i, Ref<Texture2D>());
@@ -1281,7 +129,7 @@ void ShaderEditorPlugin::edit(Object *p_object) {
}
}
es.shader_inc = Ref<ShaderInclude>(si);
- es.shader_editor = memnew(ShaderEditor);
+ es.shader_editor = memnew(TextShaderEditor);
es.shader_editor->edit(si);
shader_tabs->add_child(es.shader_editor);
es.shader_editor->connect("validation_changed", callable_mp(this, &ShaderEditorPlugin::_update_shader_list));
@@ -1301,7 +149,7 @@ void ShaderEditorPlugin::edit(Object *p_object) {
shader_tabs->add_child(es.visual_shader_editor);
es.visual_shader_editor->edit(vs.ptr());
} else {
- es.shader_editor = memnew(ShaderEditor);
+ es.shader_editor = memnew(TextShaderEditor);
shader_tabs->add_child(es.shader_editor);
es.shader_editor->edit(s);
es.shader_editor->connect("validation_changed", callable_mp(this, &ShaderEditorPlugin::_update_shader_list));
@@ -1326,7 +174,7 @@ void ShaderEditorPlugin::make_visible(bool p_visible) {
void ShaderEditorPlugin::selected_notify() {
}
-ShaderEditor *ShaderEditorPlugin::get_shader_editor(const Ref<Shader> &p_for_shader) {
+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;
@@ -1366,6 +214,7 @@ void ShaderEditorPlugin::_shader_selected(int p_index) {
edited_shaders[p_index].shader_editor->validate_script();
}
shader_tabs->set_current_tab(p_index);
+ shader_list->select(p_index);
}
void ShaderEditorPlugin::_shader_list_clicked(int p_item, Vector2 p_local_mouse_pos, MouseButton p_mouse_button_index) {
@@ -1375,13 +224,12 @@ void ShaderEditorPlugin::_shader_list_clicked(int p_item, Vector2 p_local_mouse_
}
void ShaderEditorPlugin::_close_shader(int p_index) {
- int index = shader_tabs->get_current_tab();
- ERR_FAIL_INDEX(index, shader_tabs->get_tab_count());
- Control *c = shader_tabs->get_tab_control(index);
+ ERR_FAIL_INDEX(p_index, shader_tabs->get_tab_count());
+ Control *c = shader_tabs->get_tab_control(p_index);
memdelete(c);
- edited_shaders.remove_at(index);
+ edited_shaders.remove_at(p_index);
_update_shader_list();
- EditorNode::get_singleton()->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) {
@@ -1420,6 +268,9 @@ void ShaderEditorPlugin::_menu_item_pressed(int p_index) {
} else {
EditorNode::get_singleton()->save_resource(edited_shaders[index].shader_inc);
}
+ if (edited_shaders[index].shader_editor) {
+ edited_shaders[index].shader_editor->tag_saved_version();
+ }
} break;
case FILE_SAVE_AS: {
int index = shader_tabs->get_current_tab();
@@ -1438,6 +289,9 @@ void ShaderEditorPlugin::_menu_item_pressed(int p_index) {
}
EditorNode::get_singleton()->save_resource_as(edited_shaders[index].shader_inc, path);
}
+ if (edited_shaders[index].shader_editor) {
+ edited_shaders[index].shader_editor->tag_saved_version();
+ }
} break;
case FILE_INSPECT: {
int index = shader_tabs->get_current_tab();
@@ -1559,12 +413,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);
@@ -1588,7 +436,7 @@ ShaderEditorPlugin::ShaderEditorPlugin() {
file_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditorPlugin::_menu_item_pressed));
file_hb->add_child(file_menu);
- for (int i = 2; i < FILE_MAX; i++) {
+ for (int i = FILE_SAVE; i < FILE_MAX; i++) {
file_menu->get_popup()->set_item_disabled(file_menu->get_popup()->get_item_index(i), true);
}
@@ -1597,7 +445,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 afd38ef71a..408d08ade0 100644
--- a/editor/plugins/shader_editor_plugin.h
+++ b/editor/plugins/shader_editor_plugin.h
@@ -1,211 +1,45 @@
-/*************************************************************************/
-/* shader_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* shader_editor_plugin.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 SHADER_EDITOR_PLUGIN_H
#define SHADER_EDITOR_PLUGIN_H
-#include "editor/code_editor.h"
#include "editor/editor_plugin.h"
-#include "scene/gui/menu_button.h"
-#include "scene/gui/panel_container.h"
-#include "scene/gui/rich_text_label.h"
-#include "scene/gui/tab_container.h"
-#include "scene/gui/text_edit.h"
-#include "scene/main/timer.h"
-#include "scene/resources/shader.h"
-#include "scene/resources/shader_include.h"
-#include "servers/rendering/shader_warnings.h"
-class ItemList;
-class VisualShaderEditor;
class HSplitContainer;
+class ItemList;
+class MenuButton;
class ShaderCreateDialog;
-
-class GDShaderSyntaxHighlighter : public CodeHighlighter {
- GDCLASS(GDShaderSyntaxHighlighter, CodeHighlighter)
-
-private:
- Vector<Point2i> disabled_branch_regions;
- Color disabled_branch_color;
-
-public:
- virtual Dictionary _get_line_syntax_highlighting_impl(int p_line) override;
-
- void add_disabled_branch_region(const Point2i &p_region);
- void clear_disabled_branch_regions();
- void set_disabled_branch_color(const Color &p_color);
-};
-
-class ShaderTextEditor : public CodeTextEditor {
- GDCLASS(ShaderTextEditor, CodeTextEditor);
-
- Color marked_line_color = Color(1, 1, 1);
-
- struct WarningsComparator {
- _ALWAYS_INLINE_ bool operator()(const ShaderWarning &p_a, const ShaderWarning &p_b) const { return (p_a.get_line() < p_b.get_line()); }
- };
-
- Ref<GDShaderSyntaxHighlighter> syntax_highlighter;
- RichTextLabel *warnings_panel = nullptr;
- Ref<Shader> shader;
- Ref<ShaderInclude> shader_inc;
- List<ShaderWarning> warnings;
- Error last_compile_result = Error::OK;
-
- void _check_shader_mode();
- void _update_warning_panel();
-
- bool block_shader_changed = false;
- void _shader_changed();
-
- uint32_t dependencies_version = 0; // Incremented if deps changed
-
-protected:
- void _notification(int p_what);
- static void _bind_methods();
- virtual void _load_theme_settings() override;
-
- virtual void _code_complete_script(const String &p_code, List<ScriptLanguage::CodeCompletionOption> *r_options) override;
-
-public:
- void set_block_shader_changed(bool p_block) { block_shader_changed = p_block; }
- uint32_t get_dependencies_version() const { return dependencies_version; }
-
- virtual void _validate_script() override;
-
- void reload_text();
- void set_warnings_panel(RichTextLabel *p_warnings_panel);
-
- Ref<Shader> get_edited_shader() const;
- Ref<ShaderInclude> get_edited_shader_include() const;
-
- void set_edited_shader(const Ref<Shader> &p_shader);
- void set_edited_shader(const Ref<Shader> &p_shader, const String &p_code);
- void set_edited_shader_include(const Ref<ShaderInclude> &p_include);
- void set_edited_shader_include(const Ref<ShaderInclude> &p_include, const String &p_code);
- void set_edited_code(const String &p_code);
-
- ShaderTextEditor();
-};
-
-class ShaderEditor : public PanelContainer {
- GDCLASS(ShaderEditor, PanelContainer);
-
- enum {
- EDIT_UNDO,
- EDIT_REDO,
- EDIT_CUT,
- EDIT_COPY,
- EDIT_PASTE,
- EDIT_SELECT_ALL,
- EDIT_MOVE_LINE_UP,
- EDIT_MOVE_LINE_DOWN,
- EDIT_INDENT_LEFT,
- EDIT_INDENT_RIGHT,
- EDIT_DELETE_LINE,
- EDIT_DUPLICATE_SELECTION,
- EDIT_TOGGLE_COMMENT,
- EDIT_COMPLETE,
- SEARCH_FIND,
- SEARCH_FIND_NEXT,
- SEARCH_FIND_PREV,
- SEARCH_REPLACE,
- SEARCH_GOTO_LINE,
- BOOKMARK_TOGGLE,
- BOOKMARK_GOTO_NEXT,
- BOOKMARK_GOTO_PREV,
- BOOKMARK_REMOVE_ALL,
- HELP_DOCS,
- };
-
- MenuButton *edit_menu = nullptr;
- MenuButton *search_menu = nullptr;
- PopupMenu *bookmarks_menu = nullptr;
- MenuButton *help_menu = nullptr;
- PopupMenu *context_menu = nullptr;
- RichTextLabel *warnings_panel = nullptr;
- uint64_t idle = 0;
-
- GotoLineDialog *goto_line_dialog = nullptr;
- ConfirmationDialog *erase_tab_confirm = nullptr;
- ConfirmationDialog *disk_changed = nullptr;
-
- ShaderTextEditor *shader_editor = nullptr;
- bool compilation_success = true;
-
- void _menu_option(int p_option);
- mutable Ref<Shader> shader;
- mutable Ref<ShaderInclude> shader_inc;
-
- void _editor_settings_changed();
- void _project_settings_changed();
-
- void _check_for_external_edit();
- void _reload_shader_from_disk();
- void _reload_shader_include_from_disk();
- void _reload();
- void _show_warnings_panel(bool p_show);
- void _warning_clicked(Variant p_line);
- void _update_warnings(bool p_validate);
-
- void _script_validated(bool p_valid) {
- compilation_success = p_valid;
- emit_signal(SNAME("validation_changed"));
- }
-
- uint32_t dependencies_version = 0xFFFFFFFF;
-
-protected:
- void _notification(int p_what);
- static void _bind_methods();
- void _make_context_menu(bool p_selection, Vector2 p_position);
- void _text_edit_gui_input(const Ref<InputEvent> &p_ev);
-
- void _update_bookmark_list();
- void _bookmark_item_pressed(int p_idx);
-
-public:
- bool was_compilation_successful() const { return compilation_success; }
- void apply_shaders();
- void ensure_select_current();
- void edit(const Ref<Shader> &p_shader);
- void edit(const Ref<ShaderInclude> &p_shader_inc);
- void goto_line_selection(int p_line, int p_begin, int p_end);
- void save_external_data(const String &p_str = "");
- void validate_script();
- bool is_unsaved() const;
-
- virtual Size2 get_minimum_size() const override { return Size2(0, 200); }
-
- ShaderEditor();
-};
+class TabContainer;
+class TextShaderEditor;
+class VisualShaderEditor;
class ShaderEditorPlugin : public EditorPlugin {
GDCLASS(ShaderEditorPlugin, EditorPlugin);
@@ -213,12 +47,14 @@ class ShaderEditorPlugin : public EditorPlugin {
struct EditedShader {
Ref<Shader> shader;
Ref<ShaderInclude> shader_inc;
- ShaderEditor *shader_editor = nullptr;
+ TextShaderEditor *shader_editor = nullptr;
VisualShaderEditor *visual_shader_editor = nullptr;
};
LocalVector<EditedShader> edited_shaders;
+ // Always valid operations come first in the enum, file-specific ones
+ // should go after FILE_SAVE which is used to build the menu accordingly.
enum {
FILE_NEW,
FILE_NEW_INCLUDE,
@@ -256,16 +92,14 @@ 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;
virtual bool handles(Object *p_object) const override;
virtual void make_visible(bool p_visible) override;
virtual void selected_notify() override;
- ShaderEditor *get_shader_editor(const Ref<Shader> &p_for_shader);
+ TextShaderEditor *get_shader_editor(const Ref<Shader> &p_for_shader);
VisualShaderEditor *get_visual_shader_editor(const Ref<Shader> &p_for_shader);
virtual void save_external_data() override;
diff --git a/editor/plugins/shader_file_editor_plugin.cpp b/editor/plugins/shader_file_editor_plugin.cpp
index 4874944d33..a83a48da1f 100644
--- a/editor/plugins/shader_file_editor_plugin.cpp
+++ b/editor/plugins/shader_file_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* shader_file_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* shader_file_editor_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 "shader_file_editor_plugin.h"
@@ -37,6 +37,8 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "scene/gui/item_list.h"
+#include "scene/gui/split_container.h"
#include "servers/display_server.h"
#include "servers/rendering/shader_types.h"
@@ -286,6 +288,7 @@ ShaderFileEditor::ShaderFileEditor() {
error_text = memnew(RichTextLabel);
error_text->set_v_size_flags(SIZE_EXPAND_FILL);
+ error_text->set_selection_enabled(true);
main_vb->add_child(error_text);
}
diff --git a/editor/plugins/shader_file_editor_plugin.h b/editor/plugins/shader_file_editor_plugin.h
index 1ebd644282..989668e37d 100644
--- a/editor/plugins/shader_file_editor_plugin.h
+++ b/editor/plugins/shader_file_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* shader_file_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* shader_file_editor_plugin.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 SHADER_FILE_EDITOR_PLUGIN_H
#define SHADER_FILE_EDITOR_PLUGIN_H
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index dbad81d743..06db696330 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* skeleton_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* skeleton_2d_editor_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 "skeleton_2d_editor_plugin.h"
@@ -35,6 +35,7 @@
#include "editor/editor_undo_redo_manager.h"
#include "scene/2d/mesh_instance_2d.h"
#include "scene/gui/box_container.h"
+#include "scene/gui/menu_button.h"
#include "thirdparty/misc/clipper.hpp"
void Skeleton2DEditor::_node_removed(Node *p_node) {
@@ -60,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);
@@ -76,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_2d_editor_plugin.h b/editor/plugins/skeleton_2d_editor_plugin.h
index 295725b751..e4551593f3 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.h
+++ b/editor/plugins/skeleton_2d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* skeleton_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* skeleton_2d_editor_plugin.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 SKELETON_2D_EDITOR_PLUGIN_H
#define SKELETON_2D_EDITOR_PLUGIN_H
@@ -35,6 +35,9 @@
#include "scene/2d/skeleton_2d.h"
#include "scene/gui/spin_box.h"
+class AcceptDialog;
+class MenuButton;
+
class Skeleton2DEditor : public Control {
GDCLASS(Skeleton2DEditor, Control);
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index 2478ac9514..3ee9823f3a 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* skeleton_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* skeleton_3d_editor_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 "skeleton_3d_editor_plugin.h"
@@ -34,6 +34,7 @@
#include "editor/editor_node.h"
#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "node_3d_editor_plugin.h"
@@ -41,10 +42,12 @@
#include "scene/3d/joint_3d.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/3d/physics_body_3d.h"
+#include "scene/gui/separator.h"
#include "scene/resources/capsule_shape_3d.h"
#include "scene/resources/skeleton_profile.h"
#include "scene/resources/sphere_shape_3d.h"
#include "scene/resources/surface_tool.h"
+#include "scene/scene_string_names.h"
void BoneTransformEditor::create_editors() {
const Color section_color = get_theme_color(SNAME("prop_subsection"), SNAME("Editor"));
@@ -113,6 +116,7 @@ void BoneTransformEditor::_value_changed(const String &p_property, Variant p_val
return;
}
if (skeleton) {
+ 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);
@@ -122,7 +126,6 @@ void BoneTransformEditor::_value_changed(const String &p_property, Variant p_val
BoneTransformEditor::BoneTransformEditor(Skeleton3D *p_skeleton) :
skeleton(p_skeleton) {
- undo_redo = EditorNode::get_undo_redo();
}
void BoneTransformEditor::set_keyable(const bool p_keyable) {
@@ -150,9 +153,10 @@ void BoneTransformEditor::set_target(const String &p_prop) {
void BoneTransformEditor::_property_keyed(const String &p_path, bool p_advance) {
AnimationTrackEditor *te = AnimationPlayerEditor::get_singleton()->get_track_editor();
- if (!te->has_keying()) {
+ if (!te || !te->has_keying()) {
return;
}
+ te->_clear_selection();
PackedStringArray split = p_path.split("/");
if (split.size() == 3 && split[0] == "bones") {
int bone_idx = split[1].to_int();
@@ -267,7 +271,7 @@ void Skeleton3DEditor::reset_pose(const bool p_all_bones) {
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++) {
@@ -334,7 +338,7 @@ void Skeleton3DEditor::pose_to_rest(const bool p_all_bones) {
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++) {
@@ -354,7 +358,7 @@ 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();
@@ -397,8 +401,8 @@ void Skeleton3DEditor::create_physical_skeleton() {
ur->add_do_method(physical_bone, "set_joint_type", PhysicalBone3D::JOINT_TYPE_PIN);
}
- ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", physical_bone);
- ur->add_do_method(Node3DEditor::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);
@@ -587,25 +591,25 @@ void Skeleton3DEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
void Skeleton3DEditor::move_skeleton_bone(NodePath p_skeleton_path, int32_t p_selected_boneidx, int32_t p_target_boneidx) {
Node *node = get_node_or_null(p_skeleton_path);
- Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(node);
- ERR_FAIL_NULL(skeleton);
- Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
+ Skeleton3D *skeleton_node = Object::cast_to<Skeleton3D>(node);
+ ERR_FAIL_NULL(skeleton_node);
+ 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->is_bone_parent_of(p_target_boneidx, p_selected_boneidx)) {
- const BoneId parent_idx = skeleton->get_bone_parent(p_selected_boneidx);
- const int bone_count = skeleton->get_bone_count();
+ if (skeleton_node->is_bone_parent_of(p_target_boneidx, p_selected_boneidx)) {
+ const BoneId parent_idx = skeleton_node->get_bone_parent(p_selected_boneidx);
+ const int bone_count = skeleton_node->get_bone_count();
for (BoneId i = 0; i < bone_count; ++i) {
- if (skeleton->get_bone_parent(i) == p_selected_boneidx) {
- ur->add_undo_method(skeleton, "set_bone_parent", i, skeleton->get_bone_parent(i));
- ur->add_do_method(skeleton, "set_bone_parent", i, parent_idx);
- skeleton->set_bone_parent(i, parent_idx);
+ if (skeleton_node->get_bone_parent(i) == p_selected_boneidx) {
+ ur->add_undo_method(skeleton_node, "set_bone_parent", i, skeleton_node->get_bone_parent(i));
+ ur->add_do_method(skeleton_node, "set_bone_parent", i, parent_idx);
+ skeleton_node->set_bone_parent(i, parent_idx);
}
}
}
- ur->add_undo_method(skeleton, "set_bone_parent", p_selected_boneidx, skeleton->get_bone_parent(p_selected_boneidx));
- ur->add_do_method(skeleton, "set_bone_parent", p_selected_boneidx, p_target_boneidx);
- skeleton->set_bone_parent(p_selected_boneidx, p_target_boneidx);
+ ur->add_undo_method(skeleton_node, "set_bone_parent", p_selected_boneidx, skeleton_node->get_bone_parent(p_selected_boneidx));
+ ur->add_do_method(skeleton_node, "set_bone_parent", p_selected_boneidx, p_target_boneidx);
+ skeleton_node->set_bone_parent(p_selected_boneidx, p_target_boneidx);
update_joint_tree();
ur->commit_action();
@@ -714,12 +718,12 @@ void Skeleton3DEditor::create_editors() {
// Skeleton options.
PopupMenu *p = skeleton_options->get_popup();
- p->add_shortcut(ED_SHORTCUT("skeleton_3d_editor/reset_all_poses", TTR("Reset all bone Poses")), SKELETON_OPTION_RESET_ALL_POSES);
- p->add_shortcut(ED_SHORTCUT("skeleton_3d_editor/reset_selected_poses", TTR("Reset selected Poses")), SKELETON_OPTION_RESET_SELECTED_POSES);
- p->add_shortcut(ED_SHORTCUT("skeleton_3d_editor/all_poses_to_rests", TTR("Apply all poses to rests")), SKELETON_OPTION_ALL_POSES_TO_RESTS);
- p->add_shortcut(ED_SHORTCUT("skeleton_3d_editor/selected_poses_to_rests", TTR("Apply selected poses to rests")), SKELETON_OPTION_SELECTED_POSES_TO_RESTS);
- p->add_item(TTR("Create physical skeleton"), SKELETON_OPTION_CREATE_PHYSICAL_SKELETON);
- p->add_item(TTR("Export skeleton profile"), SKELETON_OPTION_EXPORT_SKELETON_PROFILE);
+ p->add_shortcut(ED_SHORTCUT("skeleton_3d_editor/reset_all_poses", TTR("Reset All Bone Poses")), SKELETON_OPTION_RESET_ALL_POSES);
+ p->add_shortcut(ED_SHORTCUT("skeleton_3d_editor/reset_selected_poses", TTR("Reset Selected Poses")), SKELETON_OPTION_RESET_SELECTED_POSES);
+ p->add_shortcut(ED_SHORTCUT("skeleton_3d_editor/all_poses_to_rests", TTR("Apply All Poses to Rests")), SKELETON_OPTION_ALL_POSES_TO_RESTS);
+ p->add_shortcut(ED_SHORTCUT("skeleton_3d_editor/selected_poses_to_rests", TTR("Apply Selected Poses to Rests")), SKELETON_OPTION_SELECTED_POSES_TO_RESTS);
+ p->add_item(TTR("Create Physical Skeleton"), SKELETON_OPTION_CREATE_PHYSICAL_SKELETON);
+ p->add_item(TTR("Export Skeleton Profile"), SKELETON_OPTION_EXPORT_SKELETON_PROFILE);
p->connect("id_pressed", callable_mp(this, &Skeleton3DEditor::_on_click_skeleton_option));
set_bone_options_enabled(false);
@@ -809,7 +813,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));
@@ -885,10 +889,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);
@@ -1082,7 +1082,7 @@ void Skeleton3DEditor::select_bone(int p_idx) {
Skeleton3DEditor::~Skeleton3DEditor() {
singleton = nullptr;
- handles_mesh_instance->queue_delete();
+ handles_mesh_instance->queue_free();
Node3DEditor *ne = Node3DEditor::get_singleton();
@@ -1128,7 +1128,7 @@ Skeleton3DEditorPlugin::Skeleton3DEditorPlugin() {
Node3DEditor::get_singleton()->add_gizmo_plugin(gizmo_plugin);
}
-EditorPlugin::AfterGUIInput Skeleton3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
+EditorPlugin::AfterGUIInput Skeleton3DEditorPlugin::forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
Skeleton3DEditor *se = Skeleton3DEditor::get_singleton();
Node3DEditor *ne = Node3DEditor::get_singleton();
if (se && se->is_edit_mode()) {
@@ -1234,12 +1234,12 @@ int Skeleton3DGizmoPlugin::get_priority() const {
}
int Skeleton3DGizmoPlugin::subgizmos_intersect_ray(const EditorNode3DGizmo *p_gizmo, Camera3D *p_camera, const Vector2 &p_point) const {
- Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node());
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_node_3d());
ERR_FAIL_COND_V(!skeleton, -1);
Skeleton3DEditor *se = Skeleton3DEditor::get_singleton();
- if (!se->is_edit_mode()) {
+ if (!se || !se->is_edit_mode()) {
return -1;
}
@@ -1277,18 +1277,18 @@ int Skeleton3DGizmoPlugin::subgizmos_intersect_ray(const EditorNode3DGizmo *p_gi
}
Transform3D Skeleton3DGizmoPlugin::get_subgizmo_transform(const EditorNode3DGizmo *p_gizmo, int p_id) const {
- Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node());
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_node_3d());
ERR_FAIL_COND_V(!skeleton, Transform3D());
return skeleton->get_bone_global_pose(p_id);
}
void Skeleton3DGizmoPlugin::set_subgizmo_transform(const EditorNode3DGizmo *p_gizmo, int p_id, Transform3D p_transform) {
- Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node());
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_node_3d());
ERR_FAIL_COND(!skeleton);
// Prepare for global to local.
- Transform3D original_to_local = Transform3D();
+ Transform3D original_to_local;
int parent_idx = skeleton->get_bone_parent(p_id);
if (parent_idx >= 0) {
original_to_local = original_to_local * skeleton->get_bone_global_pose(parent_idx);
@@ -1296,7 +1296,7 @@ void Skeleton3DGizmoPlugin::set_subgizmo_transform(const EditorNode3DGizmo *p_gi
Basis to_local = original_to_local.get_basis().inverse();
// Prepare transform.
- Transform3D t = Transform3D();
+ Transform3D t;
// Basis.
t.basis = to_local * p_transform.get_basis();
@@ -1313,13 +1313,13 @@ void Skeleton3DGizmoPlugin::set_subgizmo_transform(const EditorNode3DGizmo *p_gi
}
void Skeleton3DGizmoPlugin::commit_subgizmos(const EditorNode3DGizmo *p_gizmo, const Vector<int> &p_ids, const Vector<Transform3D> &p_restore, bool p_cancel) {
- Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node());
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_node_3d());
ERR_FAIL_COND(!skeleton);
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++) {
@@ -1346,7 +1346,7 @@ void Skeleton3DGizmoPlugin::commit_subgizmos(const EditorNode3DGizmo *p_gizmo, c
}
void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_spatial_node());
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_gizmo->get_node_3d());
p_gizmo->clear();
int selected = -1;
@@ -1355,10 +1355,10 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
selected = se->get_selected_bone();
}
- Color bone_color = EditorSettings::get_singleton()->get("editors/3d_gizmos/gizmo_colors/skeleton");
- Color selected_bone_color = EditorSettings::get_singleton()->get("editors/3d_gizmos/gizmo_colors/selected_bone");
- real_t bone_axis_length = EditorSettings::get_singleton()->get("editors/3d_gizmos/gizmo_settings/bone_axis_length");
- int bone_shape = EditorSettings::get_singleton()->get("editors/3d_gizmos/gizmo_settings/bone_shape");
+ Color bone_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/skeleton");
+ Color selected_bone_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/selected_bone");
+ real_t bone_axis_length = EDITOR_GET("editors/3d_gizmos/gizmo_settings/bone_axis_length");
+ int bone_shape = EDITOR_GET("editors/3d_gizmos/gizmo_settings/bone_shape");
LocalVector<Color> axis_colors;
axis_colors.push_back(Node3DEditor::get_singleton()->get_theme_color(SNAME("axis_x_color"), SNAME("Editor")));
diff --git a/editor/plugins/skeleton_3d_editor_plugin.h b/editor/plugins/skeleton_3d_editor_plugin.h
index 9747ed8374..3eb840cfa9 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.h
+++ b/editor/plugins/skeleton_3d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* skeleton_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* skeleton_3d_editor_plugin.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 SKELETON_3D_EDITOR_PLUGIN_H
#define SKELETON_3D_EDITOR_PLUGIN_H
@@ -41,11 +41,13 @@
#include "scene/resources/immediate_mesh.h"
class EditorInspectorPluginSkeleton;
-class EditorUndoRedoManager;
class Joint;
class PhysicalBone3D;
class Skeleton3DEditorPlugin;
class Button;
+class Tree;
+class TreeItem;
+class VSeparator;
class BoneTransformEditor : public VBoxContainer {
GDCLASS(BoneTransformEditor, VBoxContainer);
@@ -65,8 +67,6 @@ class BoneTransformEditor : public VBoxContainer {
Skeleton3D *skeleton = nullptr;
// String property;
- Ref<EditorUndoRedoManager> undo_redo;
-
bool toggle_enabled = false;
bool updating = false;
@@ -238,7 +238,7 @@ class Skeleton3DEditorPlugin : public EditorPlugin {
EditorInspectorPluginSkeleton *skeleton_plugin = nullptr;
public:
- virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override;
+ virtual EditorPlugin::AfterGUIInput forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override;
bool has_main_screen() const override { return false; }
virtual bool handles(Object *p_object) const override;
diff --git a/editor/plugins/skeleton_ik_3d_editor_plugin.cpp b/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
index 7dc34a0874..1b78293a87 100644
--- a/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* skeleton_ik_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* skeleton_ik_3d_editor_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 "skeleton_ik_3d_editor_plugin.h"
diff --git a/editor/plugins/skeleton_ik_3d_editor_plugin.h b/editor/plugins/skeleton_ik_3d_editor_plugin.h
index 26aead6d67..86d883f9fe 100644
--- a/editor/plugins/skeleton_ik_3d_editor_plugin.h
+++ b/editor/plugins/skeleton_ik_3d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* skeleton_ik_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* skeleton_ik_3d_editor_plugin.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 SKELETON_IK_3D_EDITOR_PLUGIN_H
#define SKELETON_IK_3D_EDITOR_PLUGIN_H
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index b78b70cd5c..0d00bfa8fd 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* sprite_2d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* sprite_2d_editor_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 "sprite_2d_editor_plugin.h"
@@ -41,6 +41,7 @@
#include "scene/2d/mesh_instance_2d.h"
#include "scene/2d/polygon_2d.h"
#include "scene/gui/box_container.h"
+#include "scene/gui/menu_button.h"
#include "thirdparty/misc/clipper.hpp"
void Sprite2DEditor::_node_removed(Node *p_node) {
@@ -343,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);
@@ -401,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);
@@ -423,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);
@@ -456,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_2d_editor_plugin.h b/editor/plugins/sprite_2d_editor_plugin.h
index b87f108bd2..4d351e2183 100644
--- a/editor/plugins/sprite_2d_editor_plugin.h
+++ b/editor/plugins/sprite_2d_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* sprite_2d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* sprite_2d_editor_plugin.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 SPRITE_2D_EDITOR_PLUGIN_H
#define SPRITE_2D_EDITOR_PLUGIN_H
@@ -35,6 +35,10 @@
#include "scene/2d/sprite_2d.h"
#include "scene/gui/spin_box.h"
+class AcceptDialog;
+class ConfirmationDialog;
+class MenuButton;
+
class Sprite2DEditor : public Control {
GDCLASS(Sprite2DEditor, Control);
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index ae21aad337..74c9286325 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* sprite_frames_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* sprite_frames_editor_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 "sprite_frames_editor_plugin.h"
@@ -34,6 +34,7 @@
#include "core/io/resource_loader.h"
#include "core/os/keyboard.h"
#include "editor/editor_file_dialog.h"
+#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
@@ -43,6 +44,7 @@
#include "scene/gui/center_container.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/panel_container.h"
+#include "scene/gui/separator.h"
static void _draw_shadowed_line(Control *p_control, const Point2 &p_from, const Size2 &p_size, const Size2 &p_shadow_offset, Color p_color, Color p_shadow_color) {
p_control->draw_line(p_from, p_from + p_size, p_color);
@@ -67,14 +69,18 @@ int SpriteFramesEditor::_sheet_preview_position_to_frame_index(const Point2 &p_p
const Size2i block_size = frame_size + separation;
const Point2i position = p_position / sheet_zoom - offset;
- if (position.x % block_size.x > frame_size.x || position.y % block_size.y > frame_size.y) {
+ if (position.x < 0 || position.y < 0) {
+ return -1; // Out of bounds.
+ }
+
+ if (position.x % block_size.x >= frame_size.x || position.y % block_size.y >= frame_size.y) {
return -1; // Gap between frames.
}
const Point2i frame = position / block_size;
const Size2i frame_count = _get_frame_count();
- if (frame.x < 0 || frame.y < 0 || frame.x >= frame_count.x || frame.y >= frame_count.y) {
- return -1; // Out of bound.
+ if (frame.x >= frame_count.x || frame.y >= frame_count.y) {
+ return -1; // Out of bounds.
}
return frame_count.x * frame.y + frame.x;
@@ -191,7 +197,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());
@@ -232,7 +238,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);
@@ -245,6 +251,7 @@ void SpriteFramesEditor::_sheet_add_frames() {
const Size2i offset = _get_offset();
const Size2i separation = _get_separation();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Frame"));
int fc = frames->get_frame_count(edited_anim);
@@ -258,7 +265,7 @@ 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);
+ 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);
}
@@ -368,9 +375,9 @@ void SpriteFramesEditor::_sheet_spin_changed(double p_value, int p_dominant_para
void SpriteFramesEditor::_prepare_sprite_sheet(const String &p_file) {
Ref<Texture2D> texture = ResourceLoader::load(p_file);
- if (!texture.is_valid()) {
+ if (texture.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("Unable to load images"));
- ERR_FAIL_COND(!texture.is_valid());
+ ERR_FAIL_COND(texture.is_null());
}
frames_selected.clear();
last_frame_selected = -1;
@@ -414,16 +421,16 @@ void SpriteFramesEditor::_notification(int p_what) {
load_sheet->set_icon(get_theme_icon(SNAME("SpriteSheet"), SNAME("EditorIcons")));
copy->set_icon(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons")));
paste->set_icon(get_theme_icon(SNAME("ActionPaste"), SNAME("EditorIcons")));
- empty->set_icon(get_theme_icon(SNAME("InsertBefore"), SNAME("EditorIcons")));
- empty2->set_icon(get_theme_icon(SNAME("InsertAfter"), SNAME("EditorIcons")));
+ empty_before->set_icon(get_theme_icon(SNAME("InsertBefore"), SNAME("EditorIcons")));
+ empty_after->set_icon(get_theme_icon(SNAME("InsertAfter"), SNAME("EditorIcons")));
move_up->set_icon(get_theme_icon(SNAME("MoveLeft"), SNAME("EditorIcons")));
move_down->set_icon(get_theme_icon(SNAME("MoveRight"), SNAME("EditorIcons")));
- _delete->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
+ delete_frame->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
zoom_out->set_icon(get_theme_icon(SNAME("ZoomLess"), SNAME("EditorIcons")));
zoom_reset->set_icon(get_theme_icon(SNAME("ZoomReset"), SNAME("EditorIcons")));
zoom_in->set_icon(get_theme_icon(SNAME("ZoomMore"), SNAME("EditorIcons")));
- new_anim->set_icon(get_theme_icon(SNAME("New"), SNAME("EditorIcons")));
- remove_anim->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
+ add_anim->set_icon(get_theme_icon(SNAME("New"), SNAME("EditorIcons")));
+ delete_anim->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
anim_search_box->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
split_sheet_zoom_out->set_icon(get_theme_icon(SNAME("ZoomLess"), SNAME("EditorIcons")));
split_sheet_zoom_reset->set_icon(get_theme_icon(SNAME("ZoomReset"), SNAME("EditorIcons")));
@@ -463,13 +470,14 @@ void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Frame"));
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, p_at_pos == -1 ? -1 : p_at_pos + count);
+ 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);
count++;
}
@@ -513,8 +521,18 @@ void SpriteFramesEditor::_load_pressed() {
void SpriteFramesEditor::_paste_pressed() {
ERR_FAIL_COND(!frames->has_animation(edited_anim));
- Ref<Texture2D> r = EditorSettings::get_singleton()->get_resource_clipboard();
- if (!r.is_valid()) {
+ Ref<Texture2D> texture;
+ float duration = 1.0;
+
+ Ref<EditorSpriteFramesFrame> frame = EditorSettings::get_singleton()->get_resource_clipboard();
+ if (frame.is_valid()) {
+ texture = frame->texture;
+ duration = frame->duration;
+ } else {
+ texture = EditorSettings::get_singleton()->get_resource_clipboard();
+ }
+
+ if (texture.is_null()) {
dialog->set_text(TTR("Resource clipboard is empty or not a texture!"));
dialog->set_title(TTR("Error!"));
//dialog->get_cancel()->set_text("Close");
@@ -523,8 +541,9 @@ void SpriteFramesEditor::_paste_pressed() {
return; ///beh should show an error i guess
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Paste Frame"));
- undo_redo->add_do_method(frames, "add_frame", edited_anim, r);
+ 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));
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
@@ -534,15 +553,20 @@ void SpriteFramesEditor::_paste_pressed() {
void SpriteFramesEditor::_copy_pressed() {
ERR_FAIL_COND(!frames->has_animation(edited_anim));
- if (tree->get_current() < 0) {
+ if (frame_list->get_current() < 0) {
return;
}
- Ref<Texture2D> r = frames->get_frame(edited_anim, tree->get_current());
- if (!r.is_valid()) {
+
+ Ref<Texture2D> texture = frames->get_frame_texture(edited_anim, frame_list->get_current());
+ if (texture.is_null()) {
return;
}
- EditorSettings::get_singleton()->set_resource_clipboard(r);
+ Ref<EditorSpriteFramesFrame> frame = memnew(EditorSpriteFramesFrame);
+ frame->texture = texture;
+ frame->duration = frames->get_frame_duration(edited_anim, frame_list->get_current());
+
+ EditorSettings::get_singleton()->set_resource_clipboard(frame);
}
void SpriteFramesEditor::_empty_pressed() {
@@ -550,18 +574,19 @@ void SpriteFramesEditor::_empty_pressed() {
int from = -1;
- if (tree->get_current() >= 0) {
- from = tree->get_current();
+ if (frame_list->get_current() >= 0) {
+ from = frame_list->get_current();
sel = from;
} else {
from = frames->get_frame_count(edited_anim);
}
- Ref<Texture2D> r;
+ Ref<Texture2D> texture;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Empty"));
- undo_redo->add_do_method(frames, "add_frame", edited_anim, r, from);
+ 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);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
@@ -573,18 +598,19 @@ void SpriteFramesEditor::_empty2_pressed() {
int from = -1;
- if (tree->get_current() >= 0) {
- from = tree->get_current();
+ if (frame_list->get_current() >= 0) {
+ from = frame_list->get_current();
sel = from;
} else {
from = frames->get_frame_count(edited_anim);
}
- Ref<Texture2D> r;
+ Ref<Texture2D> texture;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add Empty"));
- undo_redo->add_do_method(frames, "add_frame", edited_anim, r, from + 1);
+ 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);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
@@ -594,11 +620,11 @@ void SpriteFramesEditor::_empty2_pressed() {
void SpriteFramesEditor::_up_pressed() {
ERR_FAIL_COND(!frames->has_animation(edited_anim));
- if (tree->get_current() < 0) {
+ if (frame_list->get_current() < 0) {
return;
}
- int to_move = tree->get_current();
+ int to_move = frame_list->get_current();
if (to_move < 1) {
return;
}
@@ -606,11 +632,12 @@ void SpriteFramesEditor::_up_pressed() {
sel = to_move;
sel -= 1;
- undo_redo->create_action(TTR("Delete Resource"));
- undo_redo->add_do_method(frames, "set_frame", edited_anim, to_move, frames->get_frame(edited_anim, to_move - 1));
- undo_redo->add_do_method(frames, "set_frame", edited_anim, to_move - 1, frames->get_frame(edited_anim, to_move));
- undo_redo->add_undo_method(frames, "set_frame", edited_anim, to_move, frames->get_frame(edited_anim, to_move));
- undo_redo->add_undo_method(frames, "set_frame", edited_anim, to_move - 1, frames->get_frame(edited_anim, to_move - 1));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ 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));
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
@@ -619,11 +646,11 @@ void SpriteFramesEditor::_up_pressed() {
void SpriteFramesEditor::_down_pressed() {
ERR_FAIL_COND(!frames->has_animation(edited_anim));
- if (tree->get_current() < 0) {
+ if (frame_list->get_current() < 0) {
return;
}
- int to_move = tree->get_current();
+ int to_move = frame_list->get_current();
if (to_move < 0 || to_move >= frames->get_frame_count(edited_anim) - 1) {
return;
}
@@ -631,11 +658,12 @@ void SpriteFramesEditor::_down_pressed() {
sel = to_move;
sel += 1;
- undo_redo->create_action(TTR("Delete Resource"));
- undo_redo->add_do_method(frames, "set_frame", edited_anim, to_move, frames->get_frame(edited_anim, to_move + 1));
- undo_redo->add_do_method(frames, "set_frame", edited_anim, to_move + 1, frames->get_frame(edited_anim, to_move));
- undo_redo->add_undo_method(frames, "set_frame", edited_anim, to_move, frames->get_frame(edited_anim, to_move));
- undo_redo->add_undo_method(frames, "set_frame", edited_anim, to_move + 1, frames->get_frame(edited_anim, to_move + 1));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ 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));
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
@@ -644,18 +672,19 @@ void SpriteFramesEditor::_down_pressed() {
void SpriteFramesEditor::_delete_pressed() {
ERR_FAIL_COND(!frames->has_animation(edited_anim));
- if (tree->get_current() < 0) {
+ if (frame_list->get_current() < 0) {
return;
}
- int to_delete = tree->get_current();
+ int to_delete = frame_list->get_current();
if (to_delete < 0 || to_delete >= frames->get_frame_count(edited_anim)) {
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
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(edited_anim, to_delete), 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);
undo_redo->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
undo_redo->commit_action();
@@ -669,7 +698,7 @@ void SpriteFramesEditor::_animation_select() {
if (frames->has_animation(edited_anim)) {
double value = anim_speed->get_line_edit()->get_text().to_float();
if (!Math::is_equal_approx(value, (double)frames->get_animation_speed(edited_anim))) {
- _animation_fps_changed(value);
+ _animation_speed_changed(value);
}
}
@@ -739,6 +768,7 @@ void SpriteFramesEditor::_animation_name_edited() {
List<Node *> nodes;
_find_anim_sprites(EditorNode::get_singleton()->get_edited_scene(), &nodes, Ref<SpriteFrames>(frames));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
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);
@@ -758,16 +788,17 @@ void SpriteFramesEditor::_animation_name_edited() {
}
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));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
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);
@@ -800,6 +831,7 @@ void SpriteFramesEditor::_animation_remove() {
}
void SpriteFramesEditor::_animation_remove_confirmed() {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
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);
@@ -807,8 +839,9 @@ void SpriteFramesEditor::_animation_remove_confirmed() {
undo_redo->add_undo_method(frames, "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> frame = frames->get_frame(edited_anim, i);
- undo_redo->add_undo_method(frames, "add_frame", edited_anim, frame);
+ 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_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
@@ -827,6 +860,7 @@ void SpriteFramesEditor::_animation_loop_changed() {
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
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));
@@ -835,21 +869,21 @@ void SpriteFramesEditor::_animation_loop_changed() {
undo_redo->commit_action();
}
-void SpriteFramesEditor::_animation_fps_changed(double p_value) {
+void SpriteFramesEditor::_animation_speed_changed(double p_value) {
if (updating) {
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
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));
undo_redo->add_do_method(this, "_update_library", true);
undo_redo->add_undo_method(this, "_update_library", true);
-
undo_redo->commit_action();
}
-void SpriteFramesEditor::_tree_input(const Ref<InputEvent> &p_event) {
+void SpriteFramesEditor::_frame_list_gui_input(const Ref<InputEvent> &p_event) {
const Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
@@ -865,6 +899,42 @@ void SpriteFramesEditor::_tree_input(const Ref<InputEvent> &p_event) {
}
}
+void SpriteFramesEditor::_frame_list_item_selected(int p_index) {
+ if (updating) {
+ return;
+ }
+
+ sel = p_index;
+
+ updating = true;
+ frame_duration->set_value(frames->get_frame_duration(edited_anim, p_index));
+ updating = false;
+}
+
+void SpriteFramesEditor::_frame_duration_changed(double p_value) {
+ if (updating) {
+ return;
+ }
+
+ int index = frame_list->get_current();
+ if (index < 0) {
+ return;
+ }
+
+ sel = index;
+
+ Ref<Texture2D> texture = frames->get_frame_texture(edited_anim, index);
+ float old_duration = frames->get_frame_duration(edited_anim, index);
+
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ 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);
+ undo_redo->add_do_method(this, "_update_library");
+ undo_redo->add_undo_method(this, "_update_library");
+ undo_redo->commit_action();
+}
+
void SpriteFramesEditor::_zoom_in() {
// Do not zoom in or out with no visible frames
if (frames->get_frame_count(edited_anim) <= 0) {
@@ -873,8 +943,8 @@ void SpriteFramesEditor::_zoom_in() {
if (thumbnail_zoom < max_thumbnail_zoom) {
thumbnail_zoom *= scale_ratio;
int thumbnail_size = (int)(thumbnail_default_size * thumbnail_zoom);
- tree->set_fixed_column_width(thumbnail_size * 3 / 2);
- tree->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size));
+ frame_list->set_fixed_column_width(thumbnail_size * 3 / 2);
+ frame_list->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size));
}
}
@@ -886,20 +956,22 @@ void SpriteFramesEditor::_zoom_out() {
if (thumbnail_zoom > min_thumbnail_zoom) {
thumbnail_zoom /= scale_ratio;
int thumbnail_size = (int)(thumbnail_default_size * thumbnail_zoom);
- tree->set_fixed_column_width(thumbnail_size * 3 / 2);
- tree->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size));
+ frame_list->set_fixed_column_width(thumbnail_size * 3 / 2);
+ frame_list->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size));
}
}
void SpriteFramesEditor::_zoom_reset() {
thumbnail_zoom = MAX(1.0f, EDSCALE);
- tree->set_fixed_column_width(thumbnail_default_size * 3 / 2);
- tree->set_fixed_icon_size(Size2(thumbnail_default_size, thumbnail_default_size));
+ frame_list->set_fixed_column_width(thumbnail_default_size * 3 / 2);
+ frame_list->set_fixed_icon_size(Size2(thumbnail_default_size, thumbnail_default_size));
}
void SpriteFramesEditor::_update_library(bool p_skip_selector) {
updating = true;
+ frame_duration->set_value(1.0); // Default.
+
if (!p_skip_selector) {
animations->clear();
@@ -932,7 +1004,7 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
}
}
- tree->clear();
+ frame_list->clear();
if (!frames->has_animation(edited_anim)) {
updating = false;
@@ -947,33 +1019,39 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
for (int i = 0; i < frames->get_frame_count(edited_anim); i++) {
String name;
- Ref<Texture2D> frame = frames->get_frame(edited_anim, 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 (frame.is_null()) {
- name = itos(i) + ": " + TTR("(empty)");
+ if (texture.is_null()) {
+ name = itos(i) + ": " + TTR("(empty)") + duration_string;
} else {
- name = itos(i) + ": " + frame->get_name();
+ name = itos(i) + ": " + texture->get_name() + duration_string;
}
- tree->add_item(name, frame);
- if (frame.is_valid()) {
- String tooltip = frame->get_path();
+ frame_list->add_item(name, texture);
+ if (texture.is_valid()) {
+ String tooltip = texture->get_path();
// Frame is often saved as an AtlasTexture subresource within a scene/resource file,
// thus its path might be not what the user is looking for. So we're also showing
// subsequent source texture paths.
String prefix = String::utf8("┖╴");
- Ref<AtlasTexture> at = frame;
+ Ref<AtlasTexture> at = texture;
while (at.is_valid() && at->get_atlas().is_valid()) {
tooltip += "\n" + prefix + at->get_atlas()->get_path();
prefix = " " + prefix;
at = at->get_atlas();
}
- tree->set_item_tooltip(-1, tooltip);
+ frame_list->set_item_tooltip(-1, tooltip);
}
if (sel == i) {
- tree->select(tree->get_item_count() - 1);
+ frame_list->select(frame_list->get_item_count() - 1);
+ frame_duration->set_value(frames->get_frame_duration(edited_anim, i));
}
}
@@ -984,11 +1062,17 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
}
void SpriteFramesEditor::edit(SpriteFrames *p_frames) {
- if (frames == p_frames) {
+ bool new_read_only_state = false;
+ if (p_frames) {
+ new_read_only_state = EditorNode::get_singleton()->is_resource_read_only(p_frames);
+ }
+
+ if (frames == p_frames && new_read_only_state == read_only) {
return;
}
frames = p_frames;
+ read_only = new_read_only_state;
if (p_frames) {
if (!p_frames->has_animation(edited_anim)) {
@@ -1009,24 +1093,38 @@ void SpriteFramesEditor::edit(SpriteFrames *p_frames) {
} else {
hide();
}
-}
-void SpriteFramesEditor::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
+ add_anim->set_disabled(read_only);
+ delete_anim->set_disabled(read_only);
+ anim_speed->set_editable(!read_only);
+ anim_loop->set_disabled(read_only);
+ load->set_disabled(read_only);
+ load_sheet->set_disabled(read_only);
+ copy->set_disabled(read_only);
+ paste->set_disabled(read_only);
+ empty_before->set_disabled(read_only);
+ empty_after->set_disabled(read_only);
+ move_up->set_disabled(read_only);
+ move_down->set_disabled(read_only);
+ delete_frame->set_disabled(read_only);
}
Variant SpriteFramesEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
+ if (read_only) {
+ return false;
+ }
+
if (!frames->has_animation(edited_anim)) {
return false;
}
- int idx = tree->get_item_at_position(p_point, true);
+ int idx = frame_list->get_item_at_position(p_point, true);
if (idx < 0 || idx >= frames->get_frame_count(edited_anim)) {
return Variant();
}
- Ref<Resource> frame = frames->get_frame(edited_anim, idx);
+ Ref<Resource> frame = frames->get_frame_texture(edited_anim, idx);
if (frame.is_null()) {
return Variant();
@@ -1038,6 +1136,10 @@ Variant SpriteFramesEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
}
bool SpriteFramesEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
+ if (read_only) {
+ return false;
+ }
+
Dictionary d = p_data;
if (!d.has("type")) {
@@ -1045,7 +1147,7 @@ bool SpriteFramesEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
}
// reordering frames
- if (d.has("from") && (Object *)(d["from"]) == tree) {
+ if (d.has("from") && (Object *)(d["from"]) == frame_list) {
return true;
}
@@ -1067,8 +1169,8 @@ bool SpriteFramesEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
}
for (int i = 0; i < files.size(); i++) {
- String file = files[i];
- String ftype = EditorFileSystem::get_singleton()->get_file_type(file);
+ String f = files[i];
+ String ftype = EditorFileSystem::get_singleton()->get_file_type(f);
if (!ClassDB::is_parent_class(ftype, "Texture2D")) {
return false;
@@ -1091,7 +1193,7 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
return;
}
- int at_pos = tree->get_item_at_position(p_point, true);
+ int at_pos = frame_list->get_item_at_position(p_point, true);
if (String(d["type"]) == "resource" && d.has("resource")) {
Ref<Resource> r = d["resource"];
@@ -1100,27 +1202,30 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
if (texture.is_valid()) {
bool reorder = false;
- if (d.has("from") && (Object *)(d["from"]) == tree) {
+ if (d.has("from") && (Object *)(d["from"]) == frame_list) {
reorder = true;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (reorder) { //drop is from reordering frames
int from_frame = -1;
+ float duration = 1.0;
if (d.has("frame")) {
from_frame = d["frame"];
+ 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, at_pos == -1 ? -1 : at_pos);
+ 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, from_frame);
+ undo_redo->add_undo_method(frames, "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, at_pos == -1 ? -1 : at_pos);
+ 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->add_do_method(this, "_update_library");
undo_redo->add_undo_method(this, "_update_library");
@@ -1142,9 +1247,6 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
void SpriteFramesEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_library", "skipsel"), &SpriteFramesEditor::_update_library, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &SpriteFramesEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &SpriteFramesEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &SpriteFramesEditor::drop_data_fw);
}
SpriteFramesEditor::SpriteFramesEditor() {
@@ -1159,17 +1261,16 @@ SpriteFramesEditor::SpriteFramesEditor() {
HBoxContainer *hbc_animlist = memnew(HBoxContainer);
sub_vb->add_child(hbc_animlist);
- new_anim = memnew(Button);
- new_anim->set_flat(true);
- new_anim->set_tooltip_text(TTR("New Animation"));
- hbc_animlist->add_child(new_anim);
- new_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_add));
+ add_anim = memnew(Button);
+ add_anim->set_flat(true);
+ hbc_animlist->add_child(add_anim);
+ add_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_add));
- remove_anim = memnew(Button);
- remove_anim->set_flat(true);
- remove_anim->set_tooltip_text(TTR("Remove Animation"));
- hbc_animlist->add_child(remove_anim);
- remove_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_remove));
+ delete_anim = memnew(Button);
+ delete_anim->set_flat(true);
+ hbc_animlist->add_child(delete_anim);
+ delete_anim->set_disabled(true);
+ delete_anim->connect("pressed", callable_mp(this, &SpriteFramesEditor::_animation_remove));
anim_search_box = memnew(LineEdit);
hbc_animlist->add_child(anim_search_box);
@@ -1186,17 +1287,22 @@ SpriteFramesEditor::SpriteFramesEditor() {
animations->connect("item_edited", callable_mp(this, &SpriteFramesEditor::_animation_name_edited));
animations->set_allow_reselect(true);
+ add_anim->set_shortcut_context(animations);
+ add_anim->set_shortcut(ED_SHORTCUT("sprite_frames/new_animation", TTR("Add Animation"), KeyModifierMask::CMD_OR_CTRL | Key::N));
+ 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(100);
+ 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_fps_changed));
+ anim_speed->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_animation_speed_changed));
anim_loop = memnew(CheckButton);
anim_loop->set_text(TTR("Loop"));
@@ -1215,54 +1321,59 @@ SpriteFramesEditor::SpriteFramesEditor() {
load = memnew(Button);
load->set_flat(true);
- load->set_tooltip_text(TTR("Add a Texture from File"));
hbc->add_child(load);
load_sheet = memnew(Button);
load_sheet->set_flat(true);
- load_sheet->set_tooltip_text(TTR("Add Frames from a Sprite Sheet"));
hbc->add_child(load_sheet);
hbc->add_child(memnew(VSeparator));
copy = memnew(Button);
copy->set_flat(true);
- copy->set_tooltip_text(TTR("Copy"));
hbc->add_child(copy);
paste = memnew(Button);
paste->set_flat(true);
- paste->set_tooltip_text(TTR("Paste"));
hbc->add_child(paste);
hbc->add_child(memnew(VSeparator));
- empty = memnew(Button);
- empty->set_flat(true);
- empty->set_tooltip_text(TTR("Insert Empty (Before)"));
- hbc->add_child(empty);
+ empty_before = memnew(Button);
+ empty_before->set_flat(true);
+ hbc->add_child(empty_before);
- empty2 = memnew(Button);
- empty2->set_flat(true);
- empty2->set_tooltip_text(TTR("Insert Empty (After)"));
- hbc->add_child(empty2);
+ empty_after = memnew(Button);
+ empty_after->set_flat(true);
+ hbc->add_child(empty_after);
hbc->add_child(memnew(VSeparator));
move_up = memnew(Button);
move_up->set_flat(true);
- move_up->set_tooltip_text(TTR("Move (Before)"));
hbc->add_child(move_up);
move_down = memnew(Button);
move_down->set_flat(true);
- move_down->set_tooltip_text(TTR("Move (After)"));
hbc->add_child(move_down);
- _delete = memnew(Button);
- _delete->set_flat(true);
- _delete->set_tooltip_text(TTR("Delete"));
- hbc->add_child(_delete);
+ delete_frame = memnew(Button);
+ delete_frame->set_flat(true);
+ hbc->add_child(delete_frame);
+
+ hbc->add_child(memnew(VSeparator));
+
+ Label *label = memnew(Label);
+ label->set_text(TTR("Frame Duration:"));
+ hbc->add_child(label);
+
+ frame_duration = memnew(SpinBox);
+ frame_duration->set_prefix(String::utf8("×"));
+ frame_duration->set_min(0);
+ frame_duration->set_max(10);
+ frame_duration->set_step(0.01);
+ frame_duration->set_allow_greater(true);
+ hbc->add_child(frame_duration);
hbc->add_spacer();
@@ -1287,31 +1398,60 @@ SpriteFramesEditor::SpriteFramesEditor() {
file = memnew(EditorFileDialog);
add_child(file);
- tree = memnew(ItemList);
- tree->set_v_size_flags(SIZE_EXPAND_FILL);
- tree->set_icon_mode(ItemList::ICON_MODE_TOP);
+ frame_list = memnew(ItemList);
+ frame_list->set_v_size_flags(SIZE_EXPAND_FILL);
+ frame_list->set_icon_mode(ItemList::ICON_MODE_TOP);
- tree->set_max_columns(0);
- tree->set_icon_mode(ItemList::ICON_MODE_TOP);
- tree->set_max_text_lines(2);
- tree->set_drag_forwarding(this);
- tree->connect("gui_input", callable_mp(this, &SpriteFramesEditor::_tree_input));
+ frame_list->set_max_columns(0);
+ frame_list->set_icon_mode(ItemList::ICON_MODE_TOP);
+ frame_list->set_max_text_lines(2);
+ 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));
- sub_vb->add_child(tree);
+ sub_vb->add_child(frame_list);
dialog = memnew(AcceptDialog);
add_child(dialog);
load->connect("pressed", callable_mp(this, &SpriteFramesEditor::_load_pressed));
load_sheet->connect("pressed", callable_mp(this, &SpriteFramesEditor::_open_sprite_sheet));
- _delete->connect("pressed", callable_mp(this, &SpriteFramesEditor::_delete_pressed));
+ delete_frame->connect("pressed", callable_mp(this, &SpriteFramesEditor::_delete_pressed));
copy->connect("pressed", callable_mp(this, &SpriteFramesEditor::_copy_pressed));
paste->connect("pressed", callable_mp(this, &SpriteFramesEditor::_paste_pressed));
- empty->connect("pressed", callable_mp(this, &SpriteFramesEditor::_empty_pressed));
- empty2->connect("pressed", callable_mp(this, &SpriteFramesEditor::_empty2_pressed));
+ empty_before->connect("pressed", callable_mp(this, &SpriteFramesEditor::_empty_pressed));
+ empty_after->connect("pressed", callable_mp(this, &SpriteFramesEditor::_empty2_pressed));
move_up->connect("pressed", callable_mp(this, &SpriteFramesEditor::_up_pressed));
move_down->connect("pressed", callable_mp(this, &SpriteFramesEditor::_down_pressed));
+
+ load->set_shortcut_context(frame_list);
+ load->set_shortcut(ED_SHORTCUT("sprite_frames/load_from_file", TTR("Add frame from file"), KeyModifierMask::CMD_OR_CTRL | Key::O));
+ load_sheet->set_shortcut_context(frame_list);
+ load_sheet->set_shortcut(ED_SHORTCUT("sprite_frames/load_from_sheet", TTR("Add frames from sprite sheet"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::O));
+ delete_frame->set_shortcut_context(frame_list);
+ delete_frame->set_shortcut(ED_SHORTCUT("sprite_frames/delete", TTR("Delete Frame"), Key::KEY_DELETE));
+ copy->set_shortcut_context(frame_list);
+ copy->set_shortcut(ED_SHORTCUT("sprite_frames/copy", TTR("Copy Frame"), KeyModifierMask::CMD_OR_CTRL | Key::C));
+ paste->set_shortcut_context(frame_list);
+ paste->set_shortcut(ED_SHORTCUT("sprite_frames/paste", TTR("Paste Frame"), KeyModifierMask::CMD_OR_CTRL | Key::V));
+ empty_before->set_shortcut_context(frame_list);
+ empty_before->set_shortcut(ED_SHORTCUT("sprite_frames/empty_before", TTR("Insert Empty (Before Selected)"), KeyModifierMask::ALT | Key::LEFT));
+ empty_after->set_shortcut_context(frame_list);
+ empty_after->set_shortcut(ED_SHORTCUT("sprite_frames/empty_after", TTR("Insert Empty (After Selected)"), KeyModifierMask::ALT | Key::RIGHT));
+ move_up->set_shortcut_context(frame_list);
+ move_up->set_shortcut(ED_SHORTCUT("sprite_frames/move_left", TTR("Move Frame Left"), KeyModifierMask::CMD_OR_CTRL | Key::LEFT));
+ move_down->set_shortcut_context(frame_list);
+ move_down->set_shortcut(ED_SHORTCUT("sprite_frames/move_right", TTR("Move Frame Right"), KeyModifierMask::CMD_OR_CTRL | Key::RIGHT));
+
+ zoom_out->set_shortcut_context(frame_list);
+ zoom_out->set_shortcut(ED_SHORTCUT_ARRAY("sprite_frames/zoom_out", TTR("Zoom Out"),
+ { int32_t(KeyModifierMask::CMD_OR_CTRL | Key::MINUS), int32_t(KeyModifierMask::CMD_OR_CTRL | Key::KP_SUBTRACT) }));
+ zoom_in->set_shortcut_context(frame_list);
+ zoom_in->set_shortcut(ED_SHORTCUT_ARRAY("sprite_frames/zoom_in", TTR("Zoom In"),
+ { int32_t(KeyModifierMask::CMD_OR_CTRL | Key::EQUAL), int32_t(KeyModifierMask::CMD_OR_CTRL | Key::KP_ADD) }));
+
file->connect("files_selected", callable_mp(this, &SpriteFramesEditor::_file_load_request).bind(-1));
+ frame_duration->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_frame_duration_changed));
loading_scene = false;
sel = -1;
@@ -1408,7 +1548,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));
@@ -1471,13 +1611,11 @@ SpriteFramesEditor::SpriteFramesEditor() {
_zoom_reset();
// Ensure the anim search box is wide enough by default.
- // Not by setting its minimum size so it can still be shrinked if desired.
+ // Not by setting its minimum size so it can still be shrunk if desired.
set_split_offset(56 * EDSCALE);
}
void SpriteFramesEditorPlugin::edit(Object *p_object) {
- frames_editor->set_undo_redo(get_undo_redo());
-
SpriteFrames *s;
AnimatedSprite2D *animated_sprite = Object::cast_to<AnimatedSprite2D>(p_object);
if (animated_sprite) {
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index f2530b732f..a5e0e54fb8 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* sprite_frames_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* sprite_frames_editor_plugin.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 SPRITE_FRAMES_EDITOR_PLUGIN_H
#define SPRITE_FRAMES_EDITOR_PLUGIN_H
@@ -45,7 +45,14 @@
#include "scene/gui/tree.h"
class EditorFileDialog;
-class EditorUndoRedoManager;
+
+class EditorSpriteFramesFrame : public Resource {
+ GDCLASS(EditorSpriteFramesFrame, Resource);
+
+public:
+ Ref<Texture2D> texture;
+ float duration;
+};
class SpriteFramesEditor : public HSplitContainer {
GDCLASS(SpriteFramesEditor, HSplitContainer);
@@ -57,24 +64,27 @@ class SpriteFramesEditor : public HSplitContainer {
};
int dominant_param = PARAM_FRAME_COUNT;
+ bool read_only = false;
+
Button *load = nullptr;
Button *load_sheet = nullptr;
- Button *_delete = nullptr;
+ Button *delete_frame = nullptr;
Button *copy = nullptr;
Button *paste = nullptr;
- Button *empty = nullptr;
- Button *empty2 = nullptr;
+ Button *empty_before = nullptr;
+ Button *empty_after = nullptr;
Button *move_up = nullptr;
Button *move_down = nullptr;
Button *zoom_out = nullptr;
Button *zoom_reset = nullptr;
Button *zoom_in = nullptr;
- ItemList *tree = nullptr;
+ SpinBox *frame_duration = nullptr;
+ ItemList *frame_list = nullptr;
bool loading_scene;
int sel;
- Button *new_anim = nullptr;
- Button *remove_anim = nullptr;
+ Button *add_anim = nullptr;
+ Button *delete_anim = nullptr;
LineEdit *anim_search_box = nullptr;
Tree *animations = nullptr;
@@ -133,6 +143,7 @@ class SpriteFramesEditor : public HSplitContainer {
void _delete_pressed();
void _up_pressed();
void _down_pressed();
+ void _frame_duration_changed(double p_value);
void _update_library(bool p_skip_selector = false);
void _animation_select();
@@ -142,9 +153,11 @@ class SpriteFramesEditor : public HSplitContainer {
void _animation_remove_confirmed();
void _animation_search_text_changed(const String &p_text);
void _animation_loop_changed();
- void _animation_fps_changed(double p_value);
+ void _animation_speed_changed(double p_value);
+
+ void _frame_list_gui_input(const Ref<InputEvent> &p_event);
+ void _frame_list_item_selected(int p_index);
- void _tree_input(const Ref<InputEvent> &p_event);
void _zoom_in();
void _zoom_out();
void _zoom_reset();
@@ -152,8 +165,6 @@ class SpriteFramesEditor : public HSplitContainer {
bool updating;
bool updating_split_settings = false; // Skip SpinBox/Range callback when setting value by code.
- Ref<EditorUndoRedoManager> undo_redo;
-
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
@@ -177,8 +188,6 @@ protected:
static void _bind_methods();
public:
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
-
void edit(SpriteFrames *p_frames);
SpriteFramesEditor();
};
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index fffcce6d9a..37fec97c37 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* style_box_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* style_box_editor_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 "style_box_editor_plugin.h"
#include "editor/editor_scale.h"
+#include "scene/gui/texture_button.h"
bool StyleBoxPreview::grid_preview_enabled = true;
@@ -80,9 +81,9 @@ void StyleBoxPreview::_notification(int p_what) {
// See https://github.com/godotengine/godot/issues/50743.
break;
}
- grid_preview->set_normal_texture(get_theme_icon(SNAME("StyleBoxGridInvisible"), SNAME("EditorIcons")));
- grid_preview->set_pressed_texture(get_theme_icon(SNAME("StyleBoxGridVisible"), SNAME("EditorIcons")));
- grid_preview->set_hover_texture(get_theme_icon(SNAME("StyleBoxGridVisible"), SNAME("EditorIcons")));
+ grid_preview->set_texture_normal(get_theme_icon(SNAME("StyleBoxGridInvisible"), SNAME("EditorIcons")));
+ grid_preview->set_texture_pressed(get_theme_icon(SNAME("StyleBoxGridVisible"), SNAME("EditorIcons")));
+ grid_preview->set_texture_hover(get_theme_icon(SNAME("StyleBoxGridVisible"), SNAME("EditorIcons")));
checkerboard->set_texture(get_theme_icon(SNAME("Checkerboard"), SNAME("EditorIcons")));
} break;
}
diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h
index a072745d8f..d589bd9fe2 100644
--- a/editor/plugins/style_box_editor_plugin.h
+++ b/editor/plugins/style_box_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* style_box_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* style_box_editor_plugin.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 STYLE_BOX_EDITOR_PLUGIN_H
#define STYLE_BOX_EDITOR_PLUGIN_H
@@ -37,6 +37,8 @@
#include "scene/gui/texture_rect.h"
#include "scene/resources/style_box.h"
+class TextureButton;
+
class StyleBoxPreview : public VBoxContainer {
GDCLASS(StyleBoxPreview, VBoxContainer);
diff --git a/editor/plugins/sub_viewport_preview_editor_plugin.cpp b/editor/plugins/sub_viewport_preview_editor_plugin.cpp
index 074a9708b7..abf4ababe9 100644
--- a/editor/plugins/sub_viewport_preview_editor_plugin.cpp
+++ b/editor/plugins/sub_viewport_preview_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* sub_viewport_preview_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* sub_viewport_preview_editor_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 "sub_viewport_preview_editor_plugin.h"
diff --git a/editor/plugins/sub_viewport_preview_editor_plugin.h b/editor/plugins/sub_viewport_preview_editor_plugin.h
index 269553ffb1..999d7d8b43 100644
--- a/editor/plugins/sub_viewport_preview_editor_plugin.h
+++ b/editor/plugins/sub_viewport_preview_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* sub_viewport_preview_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* sub_viewport_preview_editor_plugin.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 SUB_VIEWPORT_PREVIEW_EDITOR_PLUGIN_H
#define SUB_VIEWPORT_PREVIEW_EDITOR_PLUGIN_H
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 76332b2d10..a376699e54 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -1,38 +1,39 @@
-/*************************************************************************/
-/* text_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* text_editor.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 "text_editor.h"
#include "core/os/keyboard.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
+#include "scene/gui/menu_button.h"
void TextEditor::add_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) {
ERR_FAIL_COND(p_highlighter.is_null());
@@ -108,7 +109,7 @@ void TextEditor::set_edited_resource(const Ref<Resource> &p_res) {
code_editor->update_line_and_column();
}
-void TextEditor::enable_editor() {
+void TextEditor::enable_editor(Control *p_shortcut_context) {
if (editor_enabled) {
return;
}
@@ -116,6 +117,15 @@ void TextEditor::enable_editor() {
editor_enabled = true;
_load_theme_settings();
+
+ if (p_shortcut_context) {
+ for (int i = 0; i < edit_hb->get_child_count(); ++i) {
+ Control *c = cast_to<Control>(edit_hb->get_child(i));
+ if (c) {
+ c->set_shortcut_context(p_shortcut_context);
+ }
+ }
+ }
}
void TextEditor::add_callback(const String &p_function, PackedStringArray p_args) {
@@ -150,6 +160,7 @@ void TextEditor::reload_text() {
te->tag_saved_version();
code_editor->update_line_and_column();
+ _validate_script();
}
void TextEditor::_validate_script() {
@@ -221,6 +232,10 @@ void TextEditor::set_edit_state(const Variant &p_state) {
ensure_focus();
}
+Variant TextEditor::get_navigation_state() {
+ return code_editor->get_navigation_state();
+}
+
void TextEditor::trim_trailing_whitespace() {
code_editor->trim_trailing_whitespace();
}
@@ -325,12 +340,12 @@ void TextEditor::_edit_option(int p_op) {
case EDIT_MOVE_LINE_DOWN: {
code_editor->move_lines_down();
} break;
- case EDIT_INDENT_LEFT: {
- tx->unindent_lines();
- } break;
- case EDIT_INDENT_RIGHT: {
+ case EDIT_INDENT: {
tx->indent_lines();
} break;
+ case EDIT_UNINDENT: {
+ tx->unindent_lines();
+ } break;
case EDIT_DELETE_LINE: {
code_editor->delete_lines();
} break;
@@ -338,7 +353,9 @@ void TextEditor::_edit_option(int p_op) {
code_editor->duplicate_selection();
} break;
case EDIT_TOGGLE_FOLD_LINE: {
- tx->toggle_foldable_line(tx->get_caret_line());
+ for (int caret_idx = 0; caret_idx < tx->get_caret_count(); caret_idx++) {
+ tx->toggle_foldable_line(tx->get_caret_line(caret_idx));
+ }
tx->queue_redraw();
} break;
case EDIT_FOLD_ALL_LINES: {
@@ -435,11 +452,12 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
int row = pos.y;
int col = pos.x;
- tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/move_caret_on_right_click"));
+ tx->set_move_caret_on_right_click_enabled(EDITOR_GET("text_editor/behavior/navigation/move_caret_on_right_click"));
bool can_fold = tx->can_fold_line(row);
bool is_folded = tx->is_line_folded(row);
if (tx->is_move_caret_on_right_click_enabled()) {
+ tx->remove_secondary_carets();
if (tx->has_selection()) {
int from_line = tx->get_selection_from_line();
int to_line = tx->get_selection_to_line();
@@ -466,9 +484,9 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
Ref<InputEventKey> k = ev;
if (k.is_valid() && k->is_pressed() && k->is_action("ui_menu", true)) {
CodeEdit *tx = code_editor->get_text_editor();
- int line = tx->get_caret_line();
- tx->adjust_viewport_to_caret();
- _make_context_menu(tx->has_selection(), tx->can_fold_line(line), tx->is_line_folded(line), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->get_caret_draw_pos()));
+ int line = tx->get_caret_line(0);
+ tx->adjust_viewport_to_caret(0);
+ _make_context_menu(tx->has_selection(0), tx->can_fold_line(line), tx->is_line_folded(line), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->get_caret_draw_pos(0)));
context_menu->grab_focus();
}
}
@@ -493,8 +511,8 @@ void TextEditor::_make_context_menu(bool p_selection, bool p_can_fold, bool p_is
context_menu->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
context_menu->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
context_menu->add_separator();
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent"), EDIT_INDENT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unindent"), EDIT_UNINDENT);
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE);
if (p_selection) {
@@ -574,8 +592,8 @@ TextEditor::TextEditor() {
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_up"), EDIT_MOVE_LINE_UP);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_down"), EDIT_MOVE_LINE_DOWN);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent"), EDIT_INDENT);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unindent"), EDIT_UNINDENT);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/delete_line"), EDIT_DELETE_LINE);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_fold_line"), EDIT_TOGGLE_FOLD_LINE);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
@@ -631,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_editor.h b/editor/plugins/text_editor.h
index 15f7c45653..6db81508b3 100644
--- a/editor/plugins/text_editor.h
+++ b/editor/plugins/text_editor.h
@@ -1,38 +1,40 @@
-/*************************************************************************/
-/* text_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* text_editor.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 TEXT_EDITOR_H
#define TEXT_EDITOR_H
#include "script_editor_plugin.h"
+#include "editor/code_editor.h"
+
class TextEditor : public ScriptEditorBase {
GDCLASS(TextEditor, ScriptEditorBase);
@@ -63,8 +65,8 @@ private:
EDIT_CONVERT_INDENT_TO_TABS,
EDIT_MOVE_LINE_UP,
EDIT_MOVE_LINE_DOWN,
- EDIT_INDENT_RIGHT,
- EDIT_INDENT_LEFT,
+ EDIT_INDENT,
+ EDIT_UNINDENT,
EDIT_DELETE_LINE,
EDIT_DUPLICATE_SELECTION,
EDIT_TO_UPPERCASE,
@@ -111,12 +113,13 @@ public:
virtual Ref<Texture2D> get_theme_icon() override;
virtual Ref<Resource> get_edited_resource() const override;
virtual void set_edited_resource(const Ref<Resource> &p_res) override;
- virtual void enable_editor() override;
+ virtual void enable_editor(Control *p_shortcut_context = nullptr) override;
virtual void reload_text() override;
virtual void apply_code() override;
virtual bool is_unsaved() override;
virtual Variant get_edit_state() override;
virtual void set_edit_state(const Variant &p_state) override;
+ virtual Variant get_navigation_state() override;
virtual Vector<String> get_functions() override;
virtual PackedInt32Array get_breakpoints() override;
virtual void set_breakpoint(int p_line, bool p_enabled) override{};
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp
new file mode 100644
index 0000000000..1b29999796
--- /dev/null
+++ b/editor/plugins/text_shader_editor.cpp
@@ -0,0 +1,1198 @@
+/**************************************************************************/
+/* text_shader_editor.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 "text_shader_editor.h"
+
+#include "core/version_generated.gen.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "editor/filesystem_dock.h"
+#include "editor/project_settings_editor.h"
+#include "scene/gui/split_container.h"
+#include "servers/rendering/shader_preprocessor.h"
+#include "servers/rendering/shader_types.h"
+
+/*** SHADER SYNTAX HIGHLIGHTER ****/
+
+Dictionary GDShaderSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_line) {
+ Dictionary color_map;
+
+ for (const Point2i &region : disabled_branch_regions) {
+ if (p_line >= region.x && p_line <= region.y) {
+ Dictionary highlighter_info;
+ highlighter_info["color"] = disabled_branch_color;
+
+ color_map[0] = highlighter_info;
+ return color_map;
+ }
+ }
+
+ return CodeHighlighter::_get_line_syntax_highlighting_impl(p_line);
+}
+
+void GDShaderSyntaxHighlighter::add_disabled_branch_region(const Point2i &p_region) {
+ ERR_FAIL_COND(p_region.x < 0);
+ ERR_FAIL_COND(p_region.y < 0);
+
+ for (int i = 0; i < disabled_branch_regions.size(); i++) {
+ ERR_FAIL_COND_MSG(disabled_branch_regions[i].x == p_region.x, "Branch region with a start line '" + itos(p_region.x) + "' already exists.");
+ }
+
+ Point2i disabled_branch_region;
+ disabled_branch_region.x = p_region.x;
+ disabled_branch_region.y = p_region.y;
+ disabled_branch_regions.push_back(disabled_branch_region);
+
+ clear_highlighting_cache();
+}
+
+void GDShaderSyntaxHighlighter::clear_disabled_branch_regions() {
+ disabled_branch_regions.clear();
+ clear_highlighting_cache();
+}
+
+void GDShaderSyntaxHighlighter::set_disabled_branch_color(const Color &p_color) {
+ disabled_branch_color = p_color;
+ clear_highlighting_cache();
+}
+
+/*** SHADER SCRIPT EDITOR ****/
+
+static bool saved_warnings_enabled = false;
+static bool saved_treat_warning_as_errors = false;
+static HashMap<ShaderWarning::Code, bool> saved_warnings;
+static uint32_t saved_warning_flags = 0U;
+
+void ShaderTextEditor::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_THEME_CHANGED: {
+ if (is_visible_in_tree()) {
+ _load_theme_settings();
+ if (warnings.size() > 0 && last_compile_result == OK) {
+ warnings_panel->clear();
+ _update_warning_panel();
+ }
+ }
+ } break;
+ }
+}
+
+Ref<Shader> ShaderTextEditor::get_edited_shader() const {
+ return shader;
+}
+
+Ref<ShaderInclude> ShaderTextEditor::get_edited_shader_include() const {
+ return shader_inc;
+}
+
+void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader) {
+ set_edited_shader(p_shader, p_shader->get_code());
+}
+
+void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader, const String &p_code) {
+ if (shader == p_shader) {
+ return;
+ }
+ if (shader.is_valid()) {
+ shader->disconnect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed));
+ }
+ shader = p_shader;
+ shader_inc = Ref<ShaderInclude>();
+
+ set_edited_code(p_code);
+
+ if (shader.is_valid()) {
+ shader->connect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed));
+ }
+}
+
+void ShaderTextEditor::set_edited_shader_include(const Ref<ShaderInclude> &p_shader_inc) {
+ set_edited_shader_include(p_shader_inc, p_shader_inc->get_code());
+}
+
+void ShaderTextEditor::_shader_changed() {
+ // This function is used for dependencies (include changing changes main shader and forces it to revalidate)
+ if (block_shader_changed) {
+ return;
+ }
+ dependencies_version++;
+ _validate_script();
+}
+
+void ShaderTextEditor::set_edited_shader_include(const Ref<ShaderInclude> &p_shader_inc, const String &p_code) {
+ if (shader_inc == p_shader_inc) {
+ return;
+ }
+ if (shader_inc.is_valid()) {
+ shader_inc->disconnect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed));
+ }
+ shader_inc = p_shader_inc;
+ shader = Ref<Shader>();
+
+ set_edited_code(p_code);
+
+ if (shader_inc.is_valid()) {
+ shader_inc->connect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed));
+ }
+}
+
+void ShaderTextEditor::set_edited_code(const String &p_code) {
+ _load_theme_settings();
+
+ get_text_editor()->set_text(p_code);
+ get_text_editor()->clear_undo_history();
+ get_text_editor()->call_deferred(SNAME("set_h_scroll"), 0);
+ get_text_editor()->call_deferred(SNAME("set_v_scroll"), 0);
+ get_text_editor()->tag_saved_version();
+
+ _validate_script();
+ _line_col_changed();
+}
+
+void ShaderTextEditor::reload_text() {
+ ERR_FAIL_COND(shader.is_null());
+
+ CodeEdit *te = get_text_editor();
+ int column = te->get_caret_column();
+ int row = te->get_caret_line();
+ int h = te->get_h_scroll();
+ int v = te->get_v_scroll();
+
+ te->set_text(shader->get_code());
+ te->set_caret_line(row);
+ te->set_caret_column(column);
+ te->set_h_scroll(h);
+ te->set_v_scroll(v);
+
+ te->tag_saved_version();
+
+ update_line_and_column();
+}
+
+void ShaderTextEditor::set_warnings_panel(RichTextLabel *p_warnings_panel) {
+ warnings_panel = p_warnings_panel;
+}
+
+void ShaderTextEditor::_load_theme_settings() {
+ CodeEdit *te = get_text_editor();
+ Color updated_marked_line_color = EDITOR_GET("text_editor/theme/highlighting/mark_color");
+ if (updated_marked_line_color != marked_line_color) {
+ for (int i = 0; i < te->get_line_count(); i++) {
+ if (te->get_line_background_color(i) == marked_line_color) {
+ te->set_line_background_color(i, updated_marked_line_color);
+ }
+ }
+ marked_line_color = updated_marked_line_color;
+ }
+
+ syntax_highlighter->set_number_color(EDITOR_GET("text_editor/theme/highlighting/number_color"));
+ syntax_highlighter->set_symbol_color(EDITOR_GET("text_editor/theme/highlighting/symbol_color"));
+ syntax_highlighter->set_function_color(EDITOR_GET("text_editor/theme/highlighting/function_color"));
+ syntax_highlighter->set_member_variable_color(EDITOR_GET("text_editor/theme/highlighting/member_variable_color"));
+
+ syntax_highlighter->clear_keyword_colors();
+
+ const Color keyword_color = EDITOR_GET("text_editor/theme/highlighting/keyword_color");
+ const Color control_flow_keyword_color = EDITOR_GET("text_editor/theme/highlighting/control_flow_keyword_color");
+
+ List<String> keywords;
+ ShaderLanguage::get_keyword_list(&keywords);
+
+ for (const String &E : keywords) {
+ if (ShaderLanguage::is_control_flow_keyword(E)) {
+ syntax_highlighter->add_keyword_color(E, control_flow_keyword_color);
+ } else {
+ syntax_highlighter->add_keyword_color(E, keyword_color);
+ }
+ }
+
+ List<String> pp_keywords;
+ ShaderPreprocessor::get_keyword_list(&pp_keywords, false);
+
+ for (const String &E : pp_keywords) {
+ syntax_highlighter->add_keyword_color(E, keyword_color);
+ }
+
+ // Colorize built-ins like `COLOR` differently to make them easier
+ // to distinguish from keywords at a quick glance.
+
+ List<String> built_ins;
+
+ if (shader_inc.is_valid()) {
+ for (int i = 0; i < RenderingServer::SHADER_MAX; i++) {
+ for (const KeyValue<StringName, ShaderLanguage::FunctionInfo> &E : ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(i))) {
+ for (const KeyValue<StringName, ShaderLanguage::BuiltInInfo> &F : E.value.built_ins) {
+ built_ins.push_back(F.key);
+ }
+ }
+
+ const Vector<ShaderLanguage::ModeInfo> &modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(i));
+
+ for (int j = 0; j < modes.size(); j++) {
+ const ShaderLanguage::ModeInfo &mode_info = modes[j];
+
+ if (!mode_info.options.is_empty()) {
+ for (int k = 0; k < mode_info.options.size(); k++) {
+ built_ins.push_back(String(mode_info.name) + "_" + String(mode_info.options[k]));
+ }
+ } else {
+ built_ins.push_back(String(mode_info.name));
+ }
+ }
+ }
+ } else if (shader.is_valid()) {
+ for (const KeyValue<StringName, ShaderLanguage::FunctionInfo> &E : ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode()))) {
+ for (const KeyValue<StringName, ShaderLanguage::BuiltInInfo> &F : E.value.built_ins) {
+ built_ins.push_back(F.key);
+ }
+ }
+
+ const Vector<ShaderLanguage::ModeInfo> &modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader->get_mode()));
+
+ for (int i = 0; i < modes.size(); i++) {
+ const ShaderLanguage::ModeInfo &mode_info = modes[i];
+
+ if (!mode_info.options.is_empty()) {
+ for (int j = 0; j < mode_info.options.size(); j++) {
+ built_ins.push_back(String(mode_info.name) + "_" + String(mode_info.options[j]));
+ }
+ } else {
+ built_ins.push_back(String(mode_info.name));
+ }
+ }
+ }
+
+ const Color user_type_color = EDITOR_GET("text_editor/theme/highlighting/user_type_color");
+
+ for (const String &E : built_ins) {
+ syntax_highlighter->add_keyword_color(E, user_type_color);
+ }
+
+ // Colorize comments.
+ const Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
+ syntax_highlighter->clear_color_regions();
+ syntax_highlighter->add_color_region("/*", "*/", comment_color, false);
+ syntax_highlighter->add_color_region("//", "", comment_color, true);
+
+ // 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);
+ te->add_comment_delimiter("//", "", true);
+
+ if (!te->has_auto_brace_completion_open_key("/*")) {
+ te->add_auto_brace_completion_pair("/*", "*/");
+ }
+
+ // Colorize preprocessor include strings.
+ const Color string_color = EDITOR_GET("text_editor/theme/highlighting/string_color");
+ syntax_highlighter->add_color_region("\"", "\"", string_color, false);
+
+ if (warnings_panel) {
+ // Warnings panel.
+ warnings_panel->add_theme_font_override("normal_font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("main"), SNAME("EditorFonts")));
+ warnings_panel->add_theme_font_size_override("normal_font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("main_size"), SNAME("EditorFonts")));
+ }
+}
+
+void ShaderTextEditor::_check_shader_mode() {
+ String type = ShaderLanguage::get_shader_type(get_text_editor()->get_text());
+
+ Shader::Mode mode;
+
+ if (type == "canvas_item") {
+ mode = Shader::MODE_CANVAS_ITEM;
+ } else if (type == "particles") {
+ mode = Shader::MODE_PARTICLES;
+ } else if (type == "sky") {
+ mode = Shader::MODE_SKY;
+ } else if (type == "fog") {
+ mode = Shader::MODE_FOG;
+ } else {
+ mode = Shader::MODE_SPATIAL;
+ }
+
+ if (shader->get_mode() != mode) {
+ set_block_shader_changed(true);
+ shader->set_code(get_text_editor()->get_text());
+ set_block_shader_changed(false);
+ _load_theme_settings();
+ }
+}
+
+static ShaderLanguage::DataType _get_global_shader_uniform_type(const StringName &p_variable) {
+ RS::GlobalShaderParameterType gvt = RS::get_singleton()->global_shader_parameter_get_type(p_variable);
+ return (ShaderLanguage::DataType)RS::global_shader_uniform_type_get_shader_datatype(gvt);
+}
+
+static String complete_from_path;
+
+static void _complete_include_paths_search(EditorFileSystemDirectory *p_efsd, List<ScriptLanguage::CodeCompletionOption> *r_options) {
+ if (!p_efsd) {
+ return;
+ }
+ for (int i = 0; i < p_efsd->get_file_count(); i++) {
+ if (p_efsd->get_file_type(i) == SNAME("ShaderInclude")) {
+ String path = p_efsd->get_file_path(i);
+ if (path.begins_with(complete_from_path)) {
+ path = path.replace_first(complete_from_path, "");
+ }
+ r_options->push_back(ScriptLanguage::CodeCompletionOption(path, ScriptLanguage::CODE_COMPLETION_KIND_FILE_PATH));
+ }
+ }
+ for (int j = 0; j < p_efsd->get_subdir_count(); j++) {
+ _complete_include_paths_search(p_efsd->get_subdir(j), r_options);
+ }
+}
+
+static void _complete_include_paths(List<ScriptLanguage::CodeCompletionOption> *r_options) {
+ _complete_include_paths_search(EditorFileSystem::get_singleton()->get_filesystem(), r_options);
+}
+
+void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptLanguage::CodeCompletionOption> *r_options) {
+ List<ScriptLanguage::CodeCompletionOption> pp_options;
+ 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();
+ 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);
+ complete_from_path = String();
+ if (pp_options.size()) {
+ for (const ScriptLanguage::CodeCompletionOption &E : pp_options) {
+ r_options->push_back(E);
+ }
+ return;
+ }
+ for (const ScriptLanguage::CodeCompletionOption &E : pp_defines) {
+ r_options->push_back(E);
+ }
+
+ ShaderLanguage sl;
+ String calltip;
+ ShaderLanguage::ShaderCompileInfo comp_info;
+ comp_info.global_shader_uniform_type_func = _get_global_shader_uniform_type;
+
+ if (shader.is_null()) {
+ comp_info.is_include = true;
+
+ sl.complete(code, comp_info, r_options, calltip);
+ get_text_editor()->set_code_hint(calltip);
+ return;
+ }
+ _check_shader_mode();
+ comp_info.functions = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode()));
+ comp_info.render_modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader->get_mode()));
+ comp_info.shader_types = ShaderTypes::get_singleton()->get_types();
+
+ sl.complete(code, comp_info, r_options, calltip);
+ get_text_editor()->set_code_hint(calltip);
+}
+
+void ShaderTextEditor::_validate_script() {
+ emit_signal(SNAME("script_changed")); // Ensure to notify that it changed, so it is applied
+
+ String code;
+
+ if (shader.is_valid()) {
+ _check_shader_mode();
+ code = shader->get_code();
+ } else {
+ code = shader_inc->get_code();
+ }
+
+ ShaderPreprocessor preprocessor;
+ String code_pp;
+ String error_pp;
+ List<ShaderPreprocessor::FilePosition> err_positions;
+ List<ShaderPreprocessor::Region> regions;
+ String filename;
+ if (shader.is_valid()) {
+ filename = shader->get_path();
+ } else if (shader_inc.is_valid()) {
+ filename = shader_inc->get_path();
+ }
+ last_compile_result = preprocessor.preprocess(code, filename, code_pp, &error_pp, &err_positions, &regions);
+
+ for (int i = 0; i < get_text_editor()->get_line_count(); i++) {
+ get_text_editor()->set_line_background_color(i, Color(0, 0, 0, 0));
+ }
+
+ syntax_highlighter->clear_disabled_branch_regions();
+ for (const ShaderPreprocessor::Region &region : regions) {
+ if (!region.enabled) {
+ if (filename != region.file) {
+ continue;
+ }
+ syntax_highlighter->add_disabled_branch_region(Point2i(region.from_line, region.to_line));
+ }
+ }
+
+ set_error("");
+ set_error_count(0);
+
+ if (last_compile_result != OK) {
+ //preprocessor error
+ ERR_FAIL_COND(err_positions.size() == 0);
+
+ String err_text = error_pp;
+ int err_line = err_positions.front()->get().line;
+ if (err_positions.size() == 1) {
+ // Error in main file
+ err_text = "error(" + itos(err_line) + "): " + err_text;
+ } else {
+ err_text = "error(" + itos(err_line) + ") in include " + err_positions.back()->get().file.get_file() + ":" + itos(err_positions.back()->get().line) + ": " + err_text;
+ set_error_count(err_positions.size() - 1);
+ }
+
+ set_error(err_text);
+ set_error_pos(err_line - 1, 0);
+ for (int i = 0; i < get_text_editor()->get_line_count(); i++) {
+ get_text_editor()->set_line_background_color(i, Color(0, 0, 0, 0));
+ }
+ get_text_editor()->set_line_background_color(err_line - 1, marked_line_color);
+
+ set_warning_count(0);
+
+ } else {
+ ShaderLanguage sl;
+
+ sl.enable_warning_checking(saved_warnings_enabled);
+ uint32_t flags = saved_warning_flags;
+ if (shader.is_null()) {
+ if (flags & ShaderWarning::UNUSED_CONSTANT) {
+ flags &= ~(ShaderWarning::UNUSED_CONSTANT);
+ }
+ if (flags & ShaderWarning::UNUSED_FUNCTION) {
+ flags &= ~(ShaderWarning::UNUSED_FUNCTION);
+ }
+ if (flags & ShaderWarning::UNUSED_STRUCT) {
+ flags &= ~(ShaderWarning::UNUSED_STRUCT);
+ }
+ if (flags & ShaderWarning::UNUSED_UNIFORM) {
+ flags &= ~(ShaderWarning::UNUSED_UNIFORM);
+ }
+ if (flags & ShaderWarning::UNUSED_VARYING) {
+ flags &= ~(ShaderWarning::UNUSED_VARYING);
+ }
+ }
+ sl.set_warning_flags(flags);
+
+ ShaderLanguage::ShaderCompileInfo comp_info;
+ comp_info.global_shader_uniform_type_func = _get_global_shader_uniform_type;
+
+ if (shader.is_null()) {
+ comp_info.is_include = true;
+ } else {
+ Shader::Mode mode = shader->get_mode();
+ comp_info.functions = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(mode));
+ comp_info.render_modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(mode));
+ comp_info.shader_types = ShaderTypes::get_singleton()->get_types();
+ }
+
+ code = code_pp;
+ //compiler error
+ last_compile_result = sl.compile(code, comp_info);
+
+ if (last_compile_result != OK) {
+ String err_text;
+ int err_line;
+ Vector<ShaderLanguage::FilePosition> include_positions = sl.get_include_positions();
+ if (include_positions.size() > 1) {
+ //error is in an include
+ err_line = include_positions[0].line;
+ err_text = "error(" + itos(err_line) + ") in include " + include_positions[include_positions.size() - 1].file + ":" + itos(include_positions[include_positions.size() - 1].line) + ": " + sl.get_error_text();
+ set_error_count(include_positions.size() - 1);
+ } else {
+ err_line = sl.get_error_line();
+ err_text = "error(" + itos(err_line) + "): " + sl.get_error_text();
+ set_error_count(0);
+ }
+ set_error(err_text);
+ set_error_pos(err_line - 1, 0);
+ get_text_editor()->set_line_background_color(err_line - 1, marked_line_color);
+ } else {
+ set_error("");
+ }
+
+ if (warnings.size() > 0 || last_compile_result != OK) {
+ warnings_panel->clear();
+ }
+ warnings.clear();
+ for (List<ShaderWarning>::Element *E = sl.get_warnings_ptr(); E; E = E->next()) {
+ warnings.push_back(E->get());
+ }
+ if (warnings.size() > 0 && last_compile_result == OK) {
+ warnings.sort_custom<WarningsComparator>();
+ _update_warning_panel();
+ } else {
+ set_warning_count(0);
+ }
+ }
+
+ emit_signal(SNAME("script_validated"), last_compile_result == OK); // Notify that validation finished, to update the list of scripts
+}
+
+void ShaderTextEditor::_update_warning_panel() {
+ int warning_count = 0;
+
+ warnings_panel->push_table(2);
+ for (int i = 0; i < warnings.size(); i++) {
+ ShaderWarning &w = warnings[i];
+
+ if (warning_count == 0) {
+ if (saved_treat_warning_as_errors) {
+ String error_text = "error(" + itos(w.get_line()) + "): " + w.get_message() + " " + TTR("Warnings should be fixed to prevent errors.");
+ set_error_pos(w.get_line() - 1, 0);
+ set_error(error_text);
+ get_text_editor()->set_line_background_color(w.get_line() - 1, marked_line_color);
+ }
+ }
+
+ warning_count++;
+ int line = w.get_line();
+
+ // First cell.
+ warnings_panel->push_cell();
+ warnings_panel->push_color(warnings_panel->get_theme_color(SNAME("warning_color"), SNAME("Editor")));
+ if (line != -1) {
+ warnings_panel->push_meta(line - 1);
+ warnings_panel->add_text(TTR("Line") + " " + itos(line));
+ warnings_panel->add_text(" (" + w.get_name() + "):");
+ warnings_panel->pop(); // Meta goto.
+ } else {
+ warnings_panel->add_text(w.get_name() + ":");
+ }
+ warnings_panel->pop(); // Color.
+ warnings_panel->pop(); // Cell.
+
+ // Second cell.
+ warnings_panel->push_cell();
+ warnings_panel->add_text(w.get_message());
+ warnings_panel->pop(); // Cell.
+ }
+ warnings_panel->pop(); // Table.
+
+ set_warning_count(warning_count);
+}
+
+void ShaderTextEditor::_bind_methods() {
+ ADD_SIGNAL(MethodInfo("script_validated", PropertyInfo(Variant::BOOL, "valid")));
+}
+
+ShaderTextEditor::ShaderTextEditor() {
+ syntax_highlighter.instantiate();
+ get_text_editor()->set_syntax_highlighter(syntax_highlighter);
+}
+
+/*** SCRIPT EDITOR ******/
+
+void TextShaderEditor::_menu_option(int p_option) {
+ switch (p_option) {
+ case EDIT_UNDO: {
+ shader_editor->get_text_editor()->undo();
+ } break;
+ case EDIT_REDO: {
+ shader_editor->get_text_editor()->redo();
+ } break;
+ case EDIT_CUT: {
+ shader_editor->get_text_editor()->cut();
+ } break;
+ case EDIT_COPY: {
+ shader_editor->get_text_editor()->copy();
+ } break;
+ case EDIT_PASTE: {
+ shader_editor->get_text_editor()->paste();
+ } break;
+ case EDIT_SELECT_ALL: {
+ shader_editor->get_text_editor()->select_all();
+ } break;
+ case EDIT_MOVE_LINE_UP: {
+ shader_editor->move_lines_up();
+ } break;
+ case EDIT_MOVE_LINE_DOWN: {
+ shader_editor->move_lines_down();
+ } break;
+ case EDIT_INDENT: {
+ if (shader.is_null()) {
+ return;
+ }
+ shader_editor->get_text_editor()->indent_lines();
+ } break;
+ case EDIT_UNINDENT: {
+ if (shader.is_null()) {
+ return;
+ }
+ shader_editor->get_text_editor()->unindent_lines();
+ } break;
+ case EDIT_DELETE_LINE: {
+ shader_editor->delete_lines();
+ } break;
+ case EDIT_DUPLICATE_SELECTION: {
+ shader_editor->duplicate_selection();
+ } break;
+ case EDIT_TOGGLE_COMMENT: {
+ if (shader.is_null()) {
+ return;
+ }
+
+ shader_editor->toggle_inline_comment("//");
+
+ } break;
+ case EDIT_COMPLETE: {
+ shader_editor->get_text_editor()->request_code_completion();
+ } break;
+ case SEARCH_FIND: {
+ shader_editor->get_find_replace_bar()->popup_search();
+ } break;
+ case SEARCH_FIND_NEXT: {
+ shader_editor->get_find_replace_bar()->search_next();
+ } break;
+ case SEARCH_FIND_PREV: {
+ shader_editor->get_find_replace_bar()->search_prev();
+ } break;
+ case SEARCH_REPLACE: {
+ shader_editor->get_find_replace_bar()->popup_replace();
+ } break;
+ case SEARCH_GOTO_LINE: {
+ goto_line_dialog->popup_find_line(shader_editor->get_text_editor());
+ } break;
+ case BOOKMARK_TOGGLE: {
+ shader_editor->toggle_bookmark();
+ } break;
+ case BOOKMARK_GOTO_NEXT: {
+ shader_editor->goto_next_bookmark();
+ } break;
+ case BOOKMARK_GOTO_PREV: {
+ shader_editor->goto_prev_bookmark();
+ } break;
+ case BOOKMARK_REMOVE_ALL: {
+ shader_editor->remove_all_bookmarks();
+ } break;
+ case HELP_DOCS: {
+ OS::get_singleton()->shell_open(vformat("%s/tutorials/shaders/shader_reference/index.html", VERSION_DOCS_URL));
+ } break;
+ }
+ if (p_option != SEARCH_FIND && p_option != SEARCH_REPLACE && p_option != SEARCH_GOTO_LINE) {
+ shader_editor->get_text_editor()->call_deferred(SNAME("grab_focus"));
+ }
+}
+
+void TextShaderEditor::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE:
+ case NOTIFICATION_THEME_CHANGED: {
+ PopupMenu *popup = help_menu->get_popup();
+ popup->set_item_icon(popup->get_item_index(HELP_DOCS), get_theme_icon(SNAME("ExternalLink"), SNAME("EditorIcons")));
+ } break;
+
+ case NOTIFICATION_APPLICATION_FOCUS_IN: {
+ _check_for_external_edit();
+ } break;
+ }
+}
+
+void TextShaderEditor::_editor_settings_changed() {
+ shader_editor->update_editor_settings();
+
+ shader_editor->get_text_editor()->add_theme_constant_override("line_spacing", EDITOR_GET("text_editor/appearance/whitespace/line_spacing"));
+ shader_editor->get_text_editor()->set_draw_breakpoints_gutter(false);
+ shader_editor->get_text_editor()->set_draw_executing_lines_gutter(false);
+}
+
+void TextShaderEditor::_show_warnings_panel(bool p_show) {
+ warnings_panel->set_visible(p_show);
+}
+
+void TextShaderEditor::_warning_clicked(Variant p_line) {
+ if (p_line.get_type() == Variant::INT) {
+ shader_editor->get_text_editor()->set_caret_line(p_line.operator int64_t());
+ }
+}
+
+void TextShaderEditor::_bind_methods() {
+ ClassDB::bind_method("_show_warnings_panel", &TextShaderEditor::_show_warnings_panel);
+ ClassDB::bind_method("_warning_clicked", &TextShaderEditor::_warning_clicked);
+
+ ADD_SIGNAL(MethodInfo("validation_changed"));
+}
+
+void TextShaderEditor::ensure_select_current() {
+}
+
+void TextShaderEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
+ shader_editor->goto_line_selection(p_line, p_begin, p_end);
+}
+
+void TextShaderEditor::_project_settings_changed() {
+ _update_warnings(true);
+}
+
+void TextShaderEditor::_update_warnings(bool p_validate) {
+ bool changed = false;
+
+ bool warnings_enabled = GLOBAL_GET("debug/shader_language/warnings/enable").booleanize();
+ if (warnings_enabled != saved_warnings_enabled) {
+ saved_warnings_enabled = warnings_enabled;
+ changed = true;
+ }
+
+ bool treat_warning_as_errors = GLOBAL_GET("debug/shader_language/warnings/treat_warnings_as_errors").booleanize();
+ if (treat_warning_as_errors != saved_treat_warning_as_errors) {
+ saved_treat_warning_as_errors = treat_warning_as_errors;
+ changed = true;
+ }
+
+ bool update_flags = false;
+
+ for (int i = 0; i < ShaderWarning::WARNING_MAX; i++) {
+ ShaderWarning::Code code = (ShaderWarning::Code)i;
+ bool value = GLOBAL_GET("debug/shader_language/warnings/" + ShaderWarning::get_name_from_code(code).to_lower());
+
+ if (saved_warnings[code] != value) {
+ saved_warnings[code] = value;
+ update_flags = true;
+ changed = true;
+ }
+ }
+
+ if (update_flags) {
+ saved_warning_flags = (uint32_t)ShaderWarning::get_flags_from_codemap(saved_warnings);
+ }
+
+ if (p_validate && changed && shader_editor && shader_editor->get_edited_shader().is_valid()) {
+ shader_editor->validate_script();
+ }
+}
+
+void TextShaderEditor::_check_for_external_edit() {
+ bool use_autoreload = bool(EDITOR_GET("text_editor/behavior/files/auto_reload_scripts_on_external_change"));
+
+ if (shader_inc.is_valid()) {
+ if (shader_inc->get_last_modified_time() != FileAccess::get_modified_time(shader_inc->get_path())) {
+ if (use_autoreload) {
+ _reload_shader_include_from_disk();
+ } else {
+ disk_changed->call_deferred(SNAME("popup_centered"));
+ }
+ }
+ return;
+ }
+
+ if (shader.is_null() || shader->is_built_in()) {
+ return;
+ }
+
+ if (shader->get_last_modified_time() != FileAccess::get_modified_time(shader->get_path())) {
+ if (use_autoreload) {
+ _reload_shader_from_disk();
+ } else {
+ disk_changed->call_deferred(SNAME("popup_centered"));
+ }
+ }
+}
+
+void TextShaderEditor::_reload_shader_from_disk() {
+ Ref<Shader> rel_shader = ResourceLoader::load(shader->get_path(), shader->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
+ ERR_FAIL_COND(!rel_shader.is_valid());
+
+ shader_editor->set_block_shader_changed(true);
+ shader->set_code(rel_shader->get_code());
+ shader_editor->set_block_shader_changed(false);
+ shader->set_last_modified_time(rel_shader->get_last_modified_time());
+ shader_editor->reload_text();
+}
+
+void TextShaderEditor::_reload_shader_include_from_disk() {
+ Ref<ShaderInclude> rel_shader_include = ResourceLoader::load(shader_inc->get_path(), shader_inc->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
+ ERR_FAIL_COND(!rel_shader_include.is_valid());
+
+ shader_editor->set_block_shader_changed(true);
+ shader_inc->set_code(rel_shader_include->get_code());
+ shader_editor->set_block_shader_changed(false);
+ shader_inc->set_last_modified_time(rel_shader_include->get_last_modified_time());
+ shader_editor->reload_text();
+}
+
+void TextShaderEditor::_reload() {
+ if (shader.is_valid()) {
+ _reload_shader_from_disk();
+ } else if (shader_inc.is_valid()) {
+ _reload_shader_include_from_disk();
+ }
+}
+
+void TextShaderEditor::edit(const Ref<Shader> &p_shader) {
+ if (p_shader.is_null() || !p_shader->is_text_shader()) {
+ return;
+ }
+
+ if (shader == p_shader) {
+ return;
+ }
+
+ shader = p_shader;
+ shader_inc = Ref<ShaderInclude>();
+
+ shader_editor->set_edited_shader(shader);
+}
+
+void TextShaderEditor::edit(const Ref<ShaderInclude> &p_shader_inc) {
+ if (p_shader_inc.is_null()) {
+ return;
+ }
+
+ if (shader_inc == p_shader_inc) {
+ return;
+ }
+
+ shader_inc = p_shader_inc;
+ shader = Ref<Shader>();
+
+ shader_editor->set_edited_shader_include(p_shader_inc);
+}
+
+void TextShaderEditor::save_external_data(const String &p_str) {
+ if (shader.is_null() && shader_inc.is_null()) {
+ disk_changed->hide();
+ return;
+ }
+
+ apply_shaders();
+
+ Ref<Shader> edited_shader = shader_editor->get_edited_shader();
+ if (edited_shader.is_valid()) {
+ ResourceSaver::save(edited_shader);
+ }
+ if (shader.is_valid() && shader != edited_shader) {
+ ResourceSaver::save(shader);
+ }
+
+ Ref<ShaderInclude> edited_shader_inc = shader_editor->get_edited_shader_include();
+ if (edited_shader_inc.is_valid()) {
+ ResourceSaver::save(edited_shader_inc);
+ }
+ if (shader_inc.is_valid() && shader_inc != edited_shader_inc) {
+ ResourceSaver::save(shader_inc);
+ }
+ shader_editor->get_text_editor()->tag_saved_version();
+
+ disk_changed->hide();
+}
+
+void TextShaderEditor::validate_script() {
+ shader_editor->_validate_script();
+}
+
+bool TextShaderEditor::is_unsaved() const {
+ return shader_editor->get_text_editor()->get_saved_version() != shader_editor->get_text_editor()->get_version();
+}
+
+void TextShaderEditor::tag_saved_version() {
+ shader_editor->get_text_editor()->tag_saved_version();
+}
+
+void TextShaderEditor::apply_shaders() {
+ String editor_code = shader_editor->get_text_editor()->get_text();
+ if (shader.is_valid()) {
+ String shader_code = shader->get_code();
+ if (shader_code != editor_code || dependencies_version != shader_editor->get_dependencies_version()) {
+ shader_editor->set_block_shader_changed(true);
+ shader->set_code(editor_code);
+ shader_editor->set_block_shader_changed(false);
+ shader->set_edited(true);
+ }
+ }
+ if (shader_inc.is_valid()) {
+ String shader_inc_code = shader_inc->get_code();
+ if (shader_inc_code != editor_code || dependencies_version != shader_editor->get_dependencies_version()) {
+ shader_editor->set_block_shader_changed(true);
+ shader_inc->set_code(editor_code);
+ shader_editor->set_block_shader_changed(false);
+ shader_inc->set_edited(true);
+ }
+ }
+
+ dependencies_version = shader_editor->get_dependencies_version();
+}
+
+void TextShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
+ Ref<InputEventMouseButton> mb = ev;
+
+ if (mb.is_valid()) {
+ if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) {
+ CodeEdit *tx = shader_editor->get_text_editor();
+
+ Point2i pos = tx->get_line_column_at_pos(mb->get_global_position() - tx->get_global_position());
+ int row = pos.y;
+ int col = pos.x;
+ tx->set_move_caret_on_right_click_enabled(EDITOR_GET("text_editor/behavior/navigation/move_caret_on_right_click"));
+
+ if (tx->is_move_caret_on_right_click_enabled()) {
+ tx->remove_secondary_carets();
+ if (tx->has_selection()) {
+ int from_line = tx->get_selection_from_line();
+ int to_line = tx->get_selection_to_line();
+ int from_column = tx->get_selection_from_column();
+ int to_column = tx->get_selection_to_column();
+
+ if (row < from_line || row > to_line || (row == from_line && col < from_column) || (row == to_line && col > to_column)) {
+ // Right click is outside the selected text
+ tx->deselect();
+ }
+ }
+ if (!tx->has_selection()) {
+ tx->set_caret_line(row, true, false);
+ tx->set_caret_column(col);
+ }
+ }
+ _make_context_menu(tx->has_selection(), get_local_mouse_position());
+ }
+ }
+
+ Ref<InputEventKey> k = ev;
+ if (k.is_valid() && k->is_pressed() && k->is_action("ui_menu", true)) {
+ CodeEdit *tx = shader_editor->get_text_editor();
+ tx->adjust_viewport_to_caret();
+ _make_context_menu(tx->has_selection(), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->get_caret_draw_pos()));
+ context_menu->grab_focus();
+ }
+}
+
+void TextShaderEditor::_update_bookmark_list() {
+ bookmarks_menu->clear();
+
+ bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE);
+ bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_bookmarks"), BOOKMARK_REMOVE_ALL);
+ bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_next_bookmark"), BOOKMARK_GOTO_NEXT);
+ bookmarks_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_previous_bookmark"), BOOKMARK_GOTO_PREV);
+
+ PackedInt32Array bookmark_list = shader_editor->get_text_editor()->get_bookmarked_lines();
+ if (bookmark_list.size() == 0) {
+ return;
+ }
+
+ bookmarks_menu->add_separator();
+
+ for (int i = 0; i < bookmark_list.size(); i++) {
+ String line = shader_editor->get_text_editor()->get_line(bookmark_list[i]).strip_edges();
+ // Limit the size of the line if too big.
+ if (line.length() > 50) {
+ line = line.substr(0, 50);
+ }
+
+ bookmarks_menu->add_item(String::num((int)bookmark_list[i] + 1) + " - \"" + line + "\"");
+ bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
+ }
+}
+
+void TextShaderEditor::_bookmark_item_pressed(int p_idx) {
+ if (p_idx < 4) { // Any item before the separator.
+ _menu_option(bookmarks_menu->get_item_id(p_idx));
+ } else {
+ shader_editor->goto_line(bookmarks_menu->get_item_metadata(p_idx));
+ }
+}
+
+void TextShaderEditor::_make_context_menu(bool p_selection, Vector2 p_position) {
+ context_menu->clear();
+ if (p_selection) {
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
+ }
+
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
+ context_menu->add_separator();
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
+
+ context_menu->add_separator();
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent"), EDIT_INDENT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unindent"), EDIT_UNINDENT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE);
+
+ context_menu->set_position(get_screen_position() + p_position);
+ context_menu->reset_size();
+ context_menu->popup();
+}
+
+TextShaderEditor::TextShaderEditor() {
+ GLOBAL_DEF("debug/shader_language/warnings/enable", true);
+ GLOBAL_DEF("debug/shader_language/warnings/treat_warnings_as_errors", false);
+ for (int i = 0; i < (int)ShaderWarning::WARNING_MAX; i++) {
+ GLOBAL_DEF("debug/shader_language/warnings/" + ShaderWarning::get_name_from_code((ShaderWarning::Code)i).to_lower(), true);
+ }
+ _update_warnings(false);
+
+ shader_editor = memnew(ShaderTextEditor);
+
+ shader_editor->connect("script_validated", callable_mp(this, &TextShaderEditor::_script_validated));
+
+ shader_editor->set_v_size_flags(SIZE_EXPAND_FILL);
+ shader_editor->add_theme_constant_override("separation", 0);
+ shader_editor->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
+
+ shader_editor->connect("show_warnings_panel", callable_mp(this, &TextShaderEditor::_show_warnings_panel));
+ shader_editor->connect("script_changed", callable_mp(this, &TextShaderEditor::apply_shaders));
+ EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &TextShaderEditor::_editor_settings_changed));
+ ProjectSettingsEditor::get_singleton()->connect("confirmed", callable_mp(this, &TextShaderEditor::_project_settings_changed));
+
+ shader_editor->get_text_editor()->set_code_hint_draw_below(EDITOR_GET("text_editor/completion/put_callhint_tooltip_below_current_line"));
+
+ shader_editor->get_text_editor()->set_symbol_lookup_on_click_enabled(true);
+ shader_editor->get_text_editor()->set_context_menu_enabled(false);
+ shader_editor->get_text_editor()->connect("gui_input", callable_mp(this, &TextShaderEditor::_text_edit_gui_input));
+
+ shader_editor->update_editor_settings();
+
+ context_menu = memnew(PopupMenu);
+ add_child(context_menu);
+ context_menu->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
+
+ VBoxContainer *main_container = memnew(VBoxContainer);
+ HBoxContainer *hbc = memnew(HBoxContainer);
+
+ edit_menu = memnew(MenuButton);
+ edit_menu->set_shortcut_context(this);
+ edit_menu->set_text(TTR("Edit"));
+ edit_menu->set_switch_on_hover(true);
+
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
+ edit_menu->get_popup()->add_separator();
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
+ edit_menu->get_popup()->add_separator();
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
+ edit_menu->get_popup()->add_separator();
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_up"), EDIT_MOVE_LINE_UP);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_down"), EDIT_MOVE_LINE_DOWN);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent"), EDIT_INDENT);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unindent"), EDIT_UNINDENT);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/delete_line"), EDIT_DELETE_LINE);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/duplicate_selection"), EDIT_DUPLICATE_SELECTION);
+ edit_menu->get_popup()->add_separator();
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_completion_query"), EDIT_COMPLETE);
+ edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
+
+ search_menu = memnew(MenuButton);
+ search_menu->set_shortcut_context(this);
+ search_menu->set_text(TTR("Search"));
+ search_menu->set_switch_on_hover(true);
+
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_previous"), SEARCH_FIND_PREV);
+ search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE);
+ search_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
+
+ MenuButton *goto_menu = memnew(MenuButton);
+ goto_menu->set_shortcut_context(this);
+ goto_menu->set_text(TTR("Go To"));
+ goto_menu->set_switch_on_hover(true);
+ goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
+
+ goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
+ goto_menu->get_popup()->add_separator();
+
+ bookmarks_menu = memnew(PopupMenu);
+ bookmarks_menu->set_name("Bookmarks");
+ goto_menu->get_popup()->add_child(bookmarks_menu);
+ goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
+ _update_bookmark_list();
+ bookmarks_menu->connect("about_to_popup", callable_mp(this, &TextShaderEditor::_update_bookmark_list));
+ bookmarks_menu->connect("index_pressed", callable_mp(this, &TextShaderEditor::_bookmark_item_pressed));
+
+ help_menu = memnew(MenuButton);
+ help_menu->set_text(TTR("Help"));
+ help_menu->set_switch_on_hover(true);
+ help_menu->get_popup()->add_item(TTR("Online Docs"), HELP_DOCS);
+ help_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
+
+ add_child(main_container);
+ main_container->add_child(hbc);
+ hbc->add_child(search_menu);
+ hbc->add_child(edit_menu);
+ hbc->add_child(goto_menu);
+ hbc->add_child(help_menu);
+ hbc->add_theme_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("ScriptEditorPanel"), SNAME("EditorStyles")));
+
+ VSplitContainer *editor_box = memnew(VSplitContainer);
+ main_container->add_child(editor_box);
+ editor_box->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
+ editor_box->set_v_size_flags(SIZE_EXPAND_FILL);
+ editor_box->add_child(shader_editor);
+
+ FindReplaceBar *bar = memnew(FindReplaceBar);
+ main_container->add_child(bar);
+ bar->hide();
+ shader_editor->set_find_replace_bar(bar);
+
+ warnings_panel = memnew(RichTextLabel);
+ warnings_panel->set_custom_minimum_size(Size2(0, 100 * EDSCALE));
+ warnings_panel->set_h_size_flags(SIZE_EXPAND_FILL);
+ warnings_panel->set_meta_underline(true);
+ warnings_panel->set_selection_enabled(true);
+ warnings_panel->set_focus_mode(FOCUS_CLICK);
+ warnings_panel->hide();
+ warnings_panel->connect("meta_clicked", callable_mp(this, &TextShaderEditor::_warning_clicked));
+ editor_box->add_child(warnings_panel);
+ shader_editor->set_warnings_panel(warnings_panel);
+
+ goto_line_dialog = memnew(GotoLineDialog);
+ add_child(goto_line_dialog);
+
+ disk_changed = memnew(ConfirmationDialog);
+
+ VBoxContainer *vbc = memnew(VBoxContainer);
+ disk_changed->add_child(vbc);
+
+ Label *dl = memnew(Label);
+ dl->set_text(TTR("This shader has been modified on disk.\nWhat action should be taken?"));
+ vbc->add_child(dl);
+
+ disk_changed->connect("confirmed", callable_mp(this, &TextShaderEditor::_reload));
+ disk_changed->set_ok_button_text(TTR("Reload"));
+
+ disk_changed->add_button(TTR("Resave"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");
+ disk_changed->connect("custom_action", callable_mp(this, &TextShaderEditor::save_external_data));
+
+ add_child(disk_changed);
+
+ _editor_settings_changed();
+}
diff --git a/editor/plugins/text_shader_editor.h b/editor/plugins/text_shader_editor.h
new file mode 100644
index 0000000000..edf92d8a7b
--- /dev/null
+++ b/editor/plugins/text_shader_editor.h
@@ -0,0 +1,200 @@
+/**************************************************************************/
+/* text_shader_editor.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 TEXT_SHADER_EDITOR_H
+#define TEXT_SHADER_EDITOR_H
+
+#include "editor/code_editor.h"
+#include "scene/gui/menu_button.h"
+#include "scene/gui/panel_container.h"
+#include "scene/gui/rich_text_label.h"
+#include "servers/rendering/shader_warnings.h"
+
+class GDShaderSyntaxHighlighter : public CodeHighlighter {
+ GDCLASS(GDShaderSyntaxHighlighter, CodeHighlighter)
+
+private:
+ Vector<Point2i> disabled_branch_regions;
+ Color disabled_branch_color;
+
+public:
+ virtual Dictionary _get_line_syntax_highlighting_impl(int p_line) override;
+
+ void add_disabled_branch_region(const Point2i &p_region);
+ void clear_disabled_branch_regions();
+ void set_disabled_branch_color(const Color &p_color);
+};
+
+class ShaderTextEditor : public CodeTextEditor {
+ GDCLASS(ShaderTextEditor, CodeTextEditor);
+
+ Color marked_line_color = Color(1, 1, 1);
+
+ struct WarningsComparator {
+ _ALWAYS_INLINE_ bool operator()(const ShaderWarning &p_a, const ShaderWarning &p_b) const { return (p_a.get_line() < p_b.get_line()); }
+ };
+
+ Ref<GDShaderSyntaxHighlighter> syntax_highlighter;
+ RichTextLabel *warnings_panel = nullptr;
+ Ref<Shader> shader;
+ Ref<ShaderInclude> shader_inc;
+ List<ShaderWarning> warnings;
+ Error last_compile_result = Error::OK;
+
+ void _check_shader_mode();
+ void _update_warning_panel();
+
+ bool block_shader_changed = false;
+ void _shader_changed();
+
+ uint32_t dependencies_version = 0; // Incremented if deps changed
+
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
+ virtual void _load_theme_settings() override;
+
+ virtual void _code_complete_script(const String &p_code, List<ScriptLanguage::CodeCompletionOption> *r_options) override;
+
+public:
+ void set_block_shader_changed(bool p_block) { block_shader_changed = p_block; }
+ uint32_t get_dependencies_version() const { return dependencies_version; }
+
+ virtual void _validate_script() override;
+
+ void reload_text();
+ void set_warnings_panel(RichTextLabel *p_warnings_panel);
+
+ Ref<Shader> get_edited_shader() const;
+ Ref<ShaderInclude> get_edited_shader_include() const;
+
+ void set_edited_shader(const Ref<Shader> &p_shader);
+ void set_edited_shader(const Ref<Shader> &p_shader, const String &p_code);
+ void set_edited_shader_include(const Ref<ShaderInclude> &p_include);
+ void set_edited_shader_include(const Ref<ShaderInclude> &p_include, const String &p_code);
+ void set_edited_code(const String &p_code);
+
+ ShaderTextEditor();
+};
+
+class TextShaderEditor : public MarginContainer {
+ GDCLASS(TextShaderEditor, MarginContainer);
+
+ enum {
+ EDIT_UNDO,
+ EDIT_REDO,
+ EDIT_CUT,
+ EDIT_COPY,
+ EDIT_PASTE,
+ EDIT_SELECT_ALL,
+ EDIT_MOVE_LINE_UP,
+ EDIT_MOVE_LINE_DOWN,
+ EDIT_INDENT,
+ EDIT_UNINDENT,
+ EDIT_DELETE_LINE,
+ EDIT_DUPLICATE_SELECTION,
+ EDIT_TOGGLE_COMMENT,
+ EDIT_COMPLETE,
+ SEARCH_FIND,
+ SEARCH_FIND_NEXT,
+ SEARCH_FIND_PREV,
+ SEARCH_REPLACE,
+ SEARCH_GOTO_LINE,
+ BOOKMARK_TOGGLE,
+ BOOKMARK_GOTO_NEXT,
+ BOOKMARK_GOTO_PREV,
+ BOOKMARK_REMOVE_ALL,
+ HELP_DOCS,
+ };
+
+ MenuButton *edit_menu = nullptr;
+ MenuButton *search_menu = nullptr;
+ PopupMenu *bookmarks_menu = nullptr;
+ MenuButton *help_menu = nullptr;
+ PopupMenu *context_menu = nullptr;
+ RichTextLabel *warnings_panel = nullptr;
+ uint64_t idle = 0;
+
+ GotoLineDialog *goto_line_dialog = nullptr;
+ ConfirmationDialog *erase_tab_confirm = nullptr;
+ ConfirmationDialog *disk_changed = nullptr;
+
+ ShaderTextEditor *shader_editor = nullptr;
+ bool compilation_success = true;
+
+ void _menu_option(int p_option);
+ mutable Ref<Shader> shader;
+ mutable Ref<ShaderInclude> shader_inc;
+
+ void _editor_settings_changed();
+ void _project_settings_changed();
+
+ void _check_for_external_edit();
+ void _reload_shader_from_disk();
+ void _reload_shader_include_from_disk();
+ void _reload();
+ void _show_warnings_panel(bool p_show);
+ void _warning_clicked(Variant p_line);
+ void _update_warnings(bool p_validate);
+
+ void _script_validated(bool p_valid) {
+ compilation_success = p_valid;
+ emit_signal(SNAME("validation_changed"));
+ }
+
+ uint32_t dependencies_version = 0xFFFFFFFF;
+
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
+ void _make_context_menu(bool p_selection, Vector2 p_position);
+ void _text_edit_gui_input(const Ref<InputEvent> &p_ev);
+
+ void _update_bookmark_list();
+ void _bookmark_item_pressed(int p_idx);
+
+public:
+ bool was_compilation_successful() const { return compilation_success; }
+ void apply_shaders();
+ void ensure_select_current();
+ void edit(const Ref<Shader> &p_shader);
+ void edit(const Ref<ShaderInclude> &p_shader_inc);
+ void goto_line_selection(int p_line, int p_begin, int p_end);
+ void save_external_data(const String &p_str = "");
+ void validate_script();
+ bool is_unsaved() const;
+ void tag_saved_version();
+
+ virtual Size2 get_minimum_size() const override { return Size2(0, 200); }
+
+ TextShaderEditor();
+};
+
+#endif // TEXT_SHADER_EDITOR_H
diff --git a/editor/plugins/texture_3d_editor_plugin.cpp b/editor/plugins/texture_3d_editor_plugin.cpp
index 3ea62184c6..9904b888f2 100644
--- a/editor/plugins/texture_3d_editor_plugin.cpp
+++ b/editor/plugins/texture_3d_editor_plugin.cpp
@@ -1,35 +1,37 @@
-/*************************************************************************/
-/* texture_3d_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* texture_3d_editor_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 "texture_3d_editor_plugin.h"
+#include "scene/gui/label.h"
+
void Texture3DEditor::_texture_rect_draw() {
texture_rect->draw_rect(Rect2(Point2(), texture_rect->get_size()), Color(1, 1, 1, 1));
}
@@ -138,10 +140,6 @@ void Texture3DEditor::edit(Ref<Texture3D> p_texture) {
}
}
-void Texture3DEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_layer_changed"), &Texture3DEditor::_layer_changed);
-}
-
Texture3DEditor::Texture3DEditor() {
set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
set_custom_minimum_size(Size2(1, 150));
@@ -173,7 +171,7 @@ Texture3DEditor::Texture3DEditor() {
info->add_theme_constant_override("shadow_offset_y", 2);
setting = false;
- layer->connect("value_changed", Callable(this, "_layer_changed"));
+ layer->connect("value_changed", callable_mp(this, &Texture3DEditor::_layer_changed));
}
Texture3DEditor::~Texture3DEditor() {
diff --git a/editor/plugins/texture_3d_editor_plugin.h b/editor/plugins/texture_3d_editor_plugin.h
index 357bdb0845..bec3305289 100644
--- a/editor/plugins/texture_3d_editor_plugin.h
+++ b/editor/plugins/texture_3d_editor_plugin.h
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* texture_3d_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* texture_3d_editor_plugin.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 TEXTURE_3D_EDITOR_PLUGIN_H
#define TEXTURE_3D_EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "scene/gui/spin_box.h"
#include "scene/resources/shader.h"
@@ -66,8 +67,6 @@ class Texture3DEditor : public Control {
protected:
void _notification(int p_what);
- static void _bind_methods();
-
public:
void edit(Ref<Texture3D> p_texture);
Texture3DEditor();
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index be382759f5..2fb624b713 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* texture_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* texture_editor_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 "texture_editor_plugin.h"
-
#include "editor/editor_scale.h"
+#include "scene/gui/label.h"
+#include "scene/gui/texture_rect.h"
TextureRect *TexturePreview::get_texture_display() {
return texture_display;
@@ -123,10 +124,11 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) {
add_child(checkerboard);
texture_display = memnew(TextureRect);
+ texture_display->set_texture_filter(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS);
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_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index 9beada556c..f045e7b1b0 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -1,39 +1,43 @@
-/*************************************************************************/
-/* texture_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* texture_editor_plugin.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 TEXTURE_EDITOR_PLUGIN_H
#define TEXTURE_EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
+#include "scene/gui/margin_container.h"
#include "scene/resources/texture.h"
+class TextureRect;
+
class TexturePreview : public MarginContainer {
GDCLASS(TexturePreview, MarginContainer);
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index dd8633360e..816d081617 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -1,40 +1,42 @@
-/*************************************************************************/
-/* texture_layered_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* texture_layered_editor_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 "texture_layered_editor_plugin.h"
+#include "scene/gui/label.h"
+
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();
@@ -214,10 +216,6 @@ void TextureLayeredEditor::edit(Ref<TextureLayered> p_texture) {
}
}
-void TextureLayeredEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_layer_changed"), &TextureLayeredEditor::_layer_changed);
-}
-
TextureLayeredEditor::TextureLayeredEditor() {
set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
set_custom_minimum_size(Size2(1, 150));
@@ -249,7 +247,7 @@ TextureLayeredEditor::TextureLayeredEditor() {
info->add_theme_constant_override("shadow_offset_y", 2);
setting = false;
- layer->connect("value_changed", Callable(this, "_layer_changed"));
+ layer->connect("value_changed", callable_mp(this, &TextureLayeredEditor::_layer_changed));
}
TextureLayeredEditor::~TextureLayeredEditor() {
diff --git a/editor/plugins/texture_layered_editor_plugin.h b/editor/plugins/texture_layered_editor_plugin.h
index f49aa83eb2..39cbb32d16 100644
--- a/editor/plugins/texture_layered_editor_plugin.h
+++ b/editor/plugins/texture_layered_editor_plugin.h
@@ -1,36 +1,37 @@
-/*************************************************************************/
-/* texture_layered_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* texture_layered_editor_plugin.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 TEXTURE_LAYERED_EDITOR_PLUGIN_H
#define TEXTURE_LAYERED_EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "scene/gui/spin_box.h"
#include "scene/resources/shader.h"
@@ -68,7 +69,6 @@ class TextureLayeredEditor : public Control {
protected:
void _notification(int p_what);
virtual void gui_input(const Ref<InputEvent> &p_event) override;
- static void _bind_methods();
public:
void edit(Ref<TextureLayered> p_texture);
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 8e04391a94..9bad2f2fbf 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* texture_region_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* texture_region_editor_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 "texture_region_editor_plugin.h"
@@ -38,7 +38,9 @@
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "scene/gui/check_box.h"
+#include "scene/gui/option_button.h"
#include "scene/gui/separator.h"
+#include "scene/gui/spin_box.h"
#include "scene/gui/view_panner.h"
#include "scene/resources/texture.h"
@@ -86,8 +88,8 @@ void TextureRegionEditor::_region_draw() {
mtx.scale_basis(Vector2(draw_zoom, draw_zoom));
RS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(), mtx);
- edit_draw->draw_rect(Rect2(Point2(), base_tex->get_size()), Color(0.5, 0.5, 0.5, 0.5), false);
- edit_draw->draw_texture(base_tex, Point2());
+ edit_draw->draw_rect(Rect2(Point2(), preview_tex->get_size()), Color(0.5, 0.5, 0.5, 0.5), false);
+ edit_draw->draw_texture(preview_tex, Point2());
RS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(), Transform2D());
const Color color = get_theme_color(SNAME("mono_color"), SNAME("Editor"));
@@ -242,7 +244,7 @@ void TextureRegionEditor::_region_draw() {
hscroll->set_value((hscroll->get_min() + hscroll->get_max() - hscroll->get_page()) / 2);
vscroll->set_value((vscroll->get_min() + vscroll->get_max() - vscroll->get_page()) / 2);
// This ensures that the view is updated correctly.
- callable_mp(this, &TextureRegionEditor::_pan_callback).bind(Vector2(1, 0)).call_deferredp(nullptr, 0);
+ callable_mp(this, &TextureRegionEditor::_pan_callback).bind(Vector2(1, 0)).call_deferred();
request_center = false;
}
@@ -298,6 +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)
};
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
Ref<InputEventMouseButton> mb = p_input;
if (mb.is_valid()) {
if (mb->get_button_index() == MouseButton::LEFT) {
@@ -346,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();
@@ -821,10 +824,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")));
@@ -835,13 +846,15 @@ void TextureRegionEditor::_notification(int p_what) {
[[fallthrough]];
}
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(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
+ 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.
@@ -864,7 +877,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);
}
@@ -905,6 +917,13 @@ void TextureRegionEditor::edit(Object *p_obj) {
if (atlas_tex.is_valid()) {
atlas_tex->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
}
+
+ node_sprite_2d = nullptr;
+ node_sprite_3d = nullptr;
+ node_ninepatch = nullptr;
+ obj_styleBox = Ref<StyleBoxTexture>(nullptr);
+ atlas_tex = Ref<AtlasTexture>(nullptr);
+
if (p_obj) {
node_sprite_2d = Object::cast_to<Sprite2D>(p_obj);
node_sprite_3d = Object::cast_to<Sprite3D>(p_obj);
@@ -926,13 +945,8 @@ void TextureRegionEditor::edit(Object *p_obj) {
p_obj->connect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
}
_edit_region();
- } else {
- node_sprite_2d = nullptr;
- node_sprite_3d = nullptr;
- node_ninepatch = nullptr;
- obj_styleBox = Ref<StyleBoxTexture>(nullptr);
- atlas_tex = Ref<AtlasTexture>(nullptr);
}
+
edit_draw->queue_redraw();
popup_centered_ratio(0.5);
request_center = true;
@@ -946,20 +960,80 @@ void TextureRegionEditor::_texture_changed() {
}
void TextureRegionEditor::_edit_region() {
+ CanvasItem::TextureFilter filter = CanvasItem::TEXTURE_FILTER_NEAREST_WITH_MIPMAPS;
+
Ref<Texture2D> texture = nullptr;
if (atlas_tex.is_valid()) {
texture = atlas_tex->get_atlas();
} else if (node_sprite_2d) {
texture = node_sprite_2d->get_texture();
+ filter = node_sprite_2d->get_texture_filter_in_tree();
} else if (node_sprite_3d) {
texture = node_sprite_3d->get_texture();
+
+ StandardMaterial3D::TextureFilter filter_3d = node_sprite_3d->get_texture_filter();
+
+ switch (filter_3d) {
+ case StandardMaterial3D::TEXTURE_FILTER_NEAREST:
+ filter = CanvasItem::TEXTURE_FILTER_NEAREST;
+ break;
+ case StandardMaterial3D::TEXTURE_FILTER_LINEAR:
+ filter = CanvasItem::TEXTURE_FILTER_LINEAR;
+ break;
+ case StandardMaterial3D::TEXTURE_FILTER_NEAREST_WITH_MIPMAPS:
+ filter = CanvasItem::TEXTURE_FILTER_NEAREST_WITH_MIPMAPS;
+ break;
+ case StandardMaterial3D::TEXTURE_FILTER_LINEAR_WITH_MIPMAPS:
+ filter = CanvasItem::TEXTURE_FILTER_LINEAR_WITH_MIPMAPS;
+ break;
+ case StandardMaterial3D::TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC:
+ filter = CanvasItem::TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC;
+ break;
+ case StandardMaterial3D::TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC:
+ filter = CanvasItem::TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC;
+ break;
+ default:
+ // fallback to project default
+ filter = CanvasItem::TEXTURE_FILTER_PARENT_NODE;
+ break;
+ }
} else if (node_ninepatch) {
texture = node_ninepatch->get_texture();
+ filter = node_ninepatch->get_texture_filter_in_tree();
} else if (obj_styleBox.is_valid()) {
texture = obj_styleBox->get_texture();
}
+ // occurs when get_texture_filter_in_tree reaches the scene root
+ if (filter == CanvasItem::TEXTURE_FILTER_PARENT_NODE) {
+ SubViewport *root = EditorNode::get_singleton()->get_scene_root();
+
+ if (root != nullptr) {
+ Viewport::DefaultCanvasItemTextureFilter filter_default = root->get_default_canvas_item_texture_filter();
+
+ // depending on default filter, set filter to match, otherwise fall back on nearest w/ mipmaps
+ switch (filter_default) {
+ case DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST:
+ filter = CanvasItem::TEXTURE_FILTER_NEAREST;
+ break;
+ case DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR:
+ filter = CanvasItem::TEXTURE_FILTER_LINEAR;
+ break;
+ case DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS:
+ filter = CanvasItem::TEXTURE_FILTER_LINEAR_WITH_MIPMAPS;
+ break;
+ case DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS:
+ default:
+ filter = CanvasItem::TEXTURE_FILTER_NEAREST_WITH_MIPMAPS;
+ break;
+ }
+ } else {
+ filter = CanvasItem::TEXTURE_FILTER_NEAREST_WITH_MIPMAPS;
+ }
+ }
+
if (texture.is_null()) {
+ preview_tex->set_diffuse_texture(nullptr);
_zoom_reset();
hscroll->hide();
vscroll->hide();
@@ -967,6 +1041,9 @@ void TextureRegionEditor::_edit_region() {
return;
}
+ preview_tex->set_texture_filter(filter);
+ preview_tex->set_diffuse_texture(texture);
+
if (cache_map.has(texture->get_rid())) {
autoslice_cache = cache_map[texture->get_rid()];
autoslice_is_dirty = false;
@@ -1000,7 +1077,8 @@ TextureRegionEditor::TextureRegionEditor() {
node_ninepatch = nullptr;
obj_styleBox = Ref<StyleBoxTexture>(nullptr);
atlas_tex = Ref<AtlasTexture>(nullptr);
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
+
+ preview_tex = Ref<CanvasTexture>(memnew(CanvasTexture));
snap_step = Vector2(10, 10);
snap_separation = Vector2(0, 0);
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index e3bbaf49fc..0325700d25 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -1,46 +1,48 @@
-/*************************************************************************/
-/* texture_region_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* texture_region_editor_plugin.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 TEXTURE_REGION_EDITOR_PLUGIN_H
#define TEXTURE_REGION_EDITOR_PLUGIN_H
#include "canvas_item_editor_plugin.h"
+#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "scene/2d/sprite_2d.h"
#include "scene/3d/sprite_3d.h"
+#include "scene/gui/dialogs.h"
#include "scene/gui/nine_patch_rect.h"
#include "scene/resources/style_box.h"
#include "scene/resources/texture.h"
class ViewPanner;
-class EditorUndoRedoManager;
+class OptionButton;
class TextureRegionEditor : public AcceptDialog {
GDCLASS(TextureRegionEditor, AcceptDialog);
@@ -69,8 +71,6 @@ class TextureRegionEditor : public AcceptDialog {
VScrollBar *vscroll = nullptr;
HScrollBar *hscroll = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
-
Vector2 draw_ofs;
float draw_zoom = 0.0;
bool updating_scroll = false;
@@ -86,6 +86,8 @@ class TextureRegionEditor : public AcceptDialog {
Ref<StyleBoxTexture> obj_styleBox;
Ref<AtlasTexture> atlas_tex;
+ Ref<CanvasTexture> preview_tex;
+
Rect2 rect;
Rect2 rect_prev;
float prev_margin = 0.0f;
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 1fb9b42449..40aac77a99 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* theme_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* theme_editor_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 "theme_editor_plugin.h"
@@ -38,6 +38,8 @@
#include "editor/editor_undo_redo_manager.h"
#include "editor/progress_dialog.h"
#include "scene/gui/color_picker.h"
+#include "scene/gui/panel_container.h"
+#include "scene/gui/split_container.h"
#include "scene/theme/theme_db.h"
void ThemeItemImportTree::_update_items_tree() {
@@ -134,7 +136,7 @@ void ThemeItemImportTree::_update_items_tree() {
data_type_node->set_checked(IMPORT_ITEM_DATA, false);
data_type_node->set_editable(IMPORT_ITEM_DATA, true);
- List<TreeItem *> *item_list;
+ List<TreeItem *> *item_list = nullptr;
switch (dt) {
case Theme::DATA_TYPE_COLOR:
@@ -398,7 +400,7 @@ void ThemeItemImportTree::_restore_selected_item(TreeItem *p_tree_item) {
void ThemeItemImportTree::_update_total_selected(Theme::DataType p_data_type) {
ERR_FAIL_INDEX_MSG(p_data_type, Theme::DATA_TYPE_MAX, "Theme item data type is out of bounds.");
- Label *total_selected_items_label;
+ Label *total_selected_items_label = nullptr;
switch (p_data_type) {
case Theme::DATA_TYPE_COLOR:
total_selected_items_label = total_selected_colors_label;
@@ -562,7 +564,7 @@ void ThemeItemImportTree::_select_all_data_type_pressed(int p_data_type) {
}
Theme::DataType data_type = (Theme::DataType)p_data_type;
- List<TreeItem *> *item_list;
+ List<TreeItem *> *item_list = nullptr;
switch (data_type) {
case Theme::DATA_TYPE_COLOR:
@@ -617,7 +619,7 @@ void ThemeItemImportTree::_select_full_data_type_pressed(int p_data_type) {
}
Theme::DataType data_type = (Theme::DataType)p_data_type;
- List<TreeItem *> *item_list;
+ List<TreeItem *> *item_list = nullptr;
switch (data_type) {
case Theme::DATA_TYPE_COLOR:
@@ -674,7 +676,7 @@ void ThemeItemImportTree::_deselect_all_data_type_pressed(int p_data_type) {
}
Theme::DataType data_type = (Theme::DataType)p_data_type;
- List<TreeItem *> *item_list;
+ List<TreeItem *> *item_list = nullptr;
switch (data_type) {
case Theme::DATA_TYPE_COLOR:
@@ -798,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");
@@ -982,17 +984,17 @@ ThemeItemImportTree::ThemeItemImportTree() {
for (int i = 0; i < Theme::DATA_TYPE_MAX; i++) {
Theme::DataType dt = (Theme::DataType)i;
- TextureRect *select_items_icon;
- Label *select_items_label;
- Button *deselect_all_items_button;
- Button *select_all_items_button;
- Button *select_full_items_button;
- Label *total_selected_items_label;
+ TextureRect *select_items_icon = nullptr;
+ Label *select_items_label = nullptr;
+ Button *deselect_all_items_button = nullptr;
+ Button *select_all_items_button = nullptr;
+ Button *select_full_items_button = nullptr;
+ Label *total_selected_items_label = nullptr;
- String items_title = "";
- String select_all_items_tooltip = "";
- String select_full_items_tooltip = "";
- String deselect_all_items_tooltip = "";
+ String items_title;
+ String select_all_items_tooltip;
+ String select_full_items_tooltip;
+ String deselect_all_items_tooltip;
switch (dt) {
case Theme::DATA_TYPE_COLOR:
@@ -1496,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));
@@ -1515,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);
@@ -1527,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) {
@@ -1572,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);
@@ -1595,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);
@@ -1624,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++) {
@@ -1660,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++) {
@@ -1696,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++) {
@@ -1800,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);
@@ -2481,7 +2483,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = color_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = color_items_list->get_child(i);
- node->queue_delete();
+ node->queue_free();
color_items_list->remove_child(node);
}
@@ -2510,7 +2512,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = constant_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = constant_items_list->get_child(i);
- node->queue_delete();
+ node->queue_free();
constant_items_list->remove_child(node);
}
@@ -2543,7 +2545,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = font_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = font_items_list->get_child(i);
- node->queue_delete();
+ node->queue_free();
font_items_list->remove_child(node);
}
@@ -2581,7 +2583,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = font_size_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = font_size_items_list->get_child(i);
- node->queue_delete();
+ node->queue_free();
font_size_items_list->remove_child(node);
}
@@ -2614,7 +2616,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = icon_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = icon_items_list->get_child(i);
- node->queue_delete();
+ node->queue_free();
icon_items_list->remove_child(node);
}
@@ -2652,7 +2654,7 @@ void ThemeTypeEditor::_update_type_items() {
{
for (int i = stylebox_items_list->get_child_count() - 1; i >= 0; i--) {
Node *node = stylebox_items_list->get_child(i);
- node->queue_delete();
+ node->queue_free();
stylebox_items_list->remove_child(node);
}
@@ -2826,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);
@@ -2846,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) {
@@ -2891,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) {
@@ -2930,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) {
@@ -3004,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) {
@@ -3060,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));
@@ -3068,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));
@@ -3076,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));
@@ -3088,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>());
@@ -3105,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>());
@@ -3122,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>());
@@ -3165,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);
@@ -3198,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);
@@ -3267,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()) {
diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h
index 9f89a047cb..c8c944118c 100644
--- a/editor/plugins/theme_editor_plugin.h
+++ b/editor/plugins/theme_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* theme_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* theme_editor_plugin.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 THEME_EDITOR_PLUGIN_H
#define THEME_EDITOR_PLUGIN_H
@@ -45,6 +45,8 @@
#include "scene/resources/theme.h"
class EditorFileDialog;
+class PanelContainer;
+class TabContainer;
class ThemeItemImportTree : public VBoxContainer {
GDCLASS(ThemeItemImportTree, VBoxContainer);
diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp
index 8cc96201e7..5218ef67c5 100644
--- a/editor/plugins/theme_editor_preview.cpp
+++ b/editor/plugins/theme_editor_preview.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* theme_editor_preview.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* theme_editor_preview.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 "theme_editor_preview.h"
@@ -36,9 +36,12 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/gui/button.h"
+#include "scene/gui/check_box.h"
#include "scene/gui/check_button.h"
#include "scene/gui/color_picker.h"
#include "scene/gui/progress_bar.h"
+#include "scene/gui/text_edit.h"
+#include "scene/gui/tree.h"
#include "scene/resources/packed_scene.h"
#include "scene/theme/theme_db.h"
@@ -459,7 +462,7 @@ void SceneThemeEditorPreview::_reload_scene() {
for (int i = preview_content->get_child_count() - 1; i >= 0; i--) {
Node *node = preview_content->get_child(i);
- node->queue_delete();
+ node->queue_free();
preview_content->remove_child(node);
}
diff --git a/editor/plugins/theme_editor_preview.h b/editor/plugins/theme_editor_preview.h
index 4d209ac788..640a931c99 100644
--- a/editor/plugins/theme_editor_preview.h
+++ b/editor/plugins/theme_editor_preview.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* theme_editor_preview.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* theme_editor_preview.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 THEME_EDITOR_PREVIEW_H
#define THEME_EDITOR_PREVIEW_H
diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp
index d7e08db954..eaf72d36ba 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.cpp
+++ b/editor/plugins/tiles/atlas_merging_dialog.cpp
@@ -1,37 +1,36 @@
-/*************************************************************************/
-/* atlas_merging_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* atlas_merging_dialog.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 "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"
@@ -47,9 +46,7 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla
merged_mapping.clear();
if (p_atlas_sources.size() >= 2) {
- Ref<Image> output_image;
- output_image.instantiate();
- output_image->create(1, 1, false, Image::FORMAT_RGBA8);
+ Ref<Image> output_image = Image::create_empty(1, 1, false, Image::FORMAT_RGBA8);
// Compute the new texture region size.
Vector2i new_texture_region_size;
@@ -58,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++) {
@@ -74,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);
@@ -105,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.
@@ -117,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);
}
}
@@ -153,9 +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);
+ 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);
@@ -195,6 +211,7 @@ void AtlasMergingDialog::ok_pressed() {
}
void AtlasMergingDialog::cancel_pressed() {
+ 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;
@@ -236,7 +261,7 @@ void AtlasMergingDialog::update_tile_set(Ref<TileSet> p_tile_set) {
if (atlas_source.is_valid()) {
Ref<Texture2D> texture = atlas_source->get_texture();
if (texture.is_valid()) {
- String item_text = vformat("%s (id:%d)", texture->get_path().get_file(), source_id);
+ String item_text = vformat(TTR("%s (ID: %d)"), texture->get_path().get_file(), source_id);
atlas_merging_atlases_list->add_item(item_text, texture);
atlas_merging_atlases_list->set_item_metadata(-1, source_id);
}
@@ -250,8 +275,6 @@ void AtlasMergingDialog::update_tile_set(Ref<TileSet> p_tile_set) {
}
AtlasMergingDialog::AtlasMergingDialog() {
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
-
// Atlas merging window.
set_title(TTR("Atlas Merging"));
set_hide_on_ok(false);
@@ -302,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 c7e4635d16..bf1b56894f 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.h
+++ b/editor/plugins/tiles/atlas_merging_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* atlas_merging_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* atlas_merging_dialog.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 ATLAS_MERGING_DIALOG_H
#define ATLAS_MERGING_DIALOG_H
@@ -38,7 +38,6 @@
#include "scene/resources/tile_set.h"
class EditorFileDialog;
-class EditorUndoRedoManager;
class AtlasMergingDialog : public ConfirmationDialog {
GDCLASS(AtlasMergingDialog, ConfirmationDialog);
@@ -50,8 +49,6 @@ private:
LocalVector<HashMap<Vector2i, Vector2i>> merged_mapping;
Ref<TileSet> tile_set;
- Ref<EditorUndoRedoManager> undo_redo;
-
// Settings.
int next_line_after_column = 30;
@@ -78,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 d9291503cb..0ac375407c 100644
--- a/editor/plugins/tiles/tile_atlas_view.cpp
+++ b/editor/plugins/tiles/tile_atlas_view.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_atlas_view.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_atlas_view.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 "tile_atlas_view.h"
@@ -53,14 +53,14 @@ void TileAtlasView::_scroll_callback(Vector2 p_scroll_vec, bool p_alt) {
void TileAtlasView::_pan_callback(Vector2 p_scroll_vec) {
panning += p_scroll_vec;
- emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning);
_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);
- emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning);
_update_zoom_and_panning(true);
+ emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning);
}
Size2i TileAtlasView::_compute_base_tiles_control_size() {
@@ -192,6 +192,19 @@ void TileAtlasView::_draw_base_tiles() {
rect = rect.intersection(Rect2i(Vector2(), texture->get_size()));
if (rect.size.x > 0 && rect.size.y > 0) {
base_tiles_draw->draw_texture_rect_region(texture, rect, rect);
+ }
+ }
+ }
+ }
+
+ // Draw dark overlay after for performance reasons.
+ for (int x = 0; x < grid_size.x; x++) {
+ for (int y = 0; y < grid_size.y; y++) {
+ Vector2i coords = Vector2i(x, y);
+ if (tile_set_atlas_source->get_tile_at_coords(coords) == TileSetSource::INVALID_ATLAS_COORDS) {
+ Rect2i rect = Rect2i((texture_region_size + separation) * coords + margins, texture_region_size + separation);
+ rect = rect.intersection(Rect2i(Vector2(), texture->get_size()));
+ if (rect.size.x > 0 && rect.size.y > 0) {
base_tiles_draw->draw_rect(rect, Color(0.0, 0.0, 0.0, 0.5));
}
}
@@ -242,23 +255,34 @@ void TileAtlasView::_draw_base_tiles() {
// Draw the tile.
TileMap::draw_tile(base_tiles_draw->get_canvas_item(), offset_pos, tile_set, source_id, atlas_coords, 0, frame);
+ }
+ }
- // Draw, the texture in the separation areas
- if (separation.x > 0) {
- Rect2i right_sep_rect = Rect2i(base_frame_rect.get_position() + Vector2i(base_frame_rect.size.x, 0), Vector2i(separation.x, base_frame_rect.size.y));
- right_sep_rect = right_sep_rect.intersection(Rect2i(Vector2(), texture->get_size()));
- if (right_sep_rect.size.x > 0 && right_sep_rect.size.y > 0) {
- base_tiles_draw->draw_texture_rect_region(texture, right_sep_rect, right_sep_rect);
- base_tiles_draw->draw_rect(right_sep_rect, Color(0.0, 0.0, 0.0, 0.5));
+ // Draw Dark overlay on separation in its own pass.
+ if (separation.x > 0 || separation.y > 0) {
+ for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) {
+ Vector2i atlas_coords = tile_set_atlas_source->get_tile_id(i);
+
+ 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);
+
+ if (separation.x > 0) {
+ Rect2i right_sep_rect = Rect2i(base_frame_rect.get_position() + Vector2i(base_frame_rect.size.x, 0), Vector2i(separation.x, base_frame_rect.size.y));
+ right_sep_rect = right_sep_rect.intersection(Rect2i(Vector2(), texture->get_size()));
+ if (right_sep_rect.size.x > 0 && right_sep_rect.size.y > 0) {
+ //base_tiles_draw->draw_texture_rect_region(texture, right_sep_rect, right_sep_rect);
+ base_tiles_draw->draw_rect(right_sep_rect, Color(0.0, 0.0, 0.0, 0.5));
+ }
}
- }
- if (separation.y > 0) {
- Rect2i bottom_sep_rect = Rect2i(base_frame_rect.get_position() + Vector2i(0, base_frame_rect.size.y), Vector2i(base_frame_rect.size.x + separation.x, separation.y));
- bottom_sep_rect = bottom_sep_rect.intersection(Rect2i(Vector2(), texture->get_size()));
- if (bottom_sep_rect.size.x > 0 && bottom_sep_rect.size.y > 0) {
- base_tiles_draw->draw_texture_rect_region(texture, bottom_sep_rect, bottom_sep_rect);
- base_tiles_draw->draw_rect(bottom_sep_rect, Color(0.0, 0.0, 0.0, 0.5));
+ if (separation.y > 0) {
+ Rect2i bottom_sep_rect = Rect2i(base_frame_rect.get_position() + Vector2i(0, base_frame_rect.size.y), Vector2i(base_frame_rect.size.x + separation.x, separation.y));
+ bottom_sep_rect = bottom_sep_rect.intersection(Rect2i(Vector2(), texture->get_size()));
+ if (bottom_sep_rect.size.x > 0 && bottom_sep_rect.size.y > 0) {
+ //base_tiles_draw->draw_texture_rect_region(texture, bottom_sep_rect, bottom_sep_rect);
+ base_tiles_draw->draw_rect(bottom_sep_rect, Color(0.0, 0.0, 0.0, 0.5));
+ }
}
}
}
@@ -298,7 +322,7 @@ void TileAtlasView::_draw_base_tiles_texture_grid() {
void TileAtlasView::_draw_base_tiles_shape_grid() {
// Draw the shapes.
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ Color grid_color = EDITOR_GET("editors/tiles_editor/grid_color");
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);
@@ -403,6 +427,9 @@ void TileAtlasView::set_atlas_source(TileSet *p_tile_set, TileSetAtlasSource *p_
// Update everything.
_update_zoom_and_panning();
+ base_tiles_drawing_root->set_size(_compute_base_tiles_control_size());
+ alternative_tiles_drawing_root->set_size(_compute_alternative_tiles_control_size());
+
// Update.
base_tiles_draw->queue_redraw();
base_tiles_texture_grid->queue_redraw();
@@ -427,21 +454,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;
+ }
+
+ 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();
- // Compute index in atlas
- Vector2 pos = p_pos - margins;
- Vector2i ret = (pos / (texture_region_size + separation)).floor();
+ // Compute index in atlas
+ Vector2 pos = p_pos - margins;
+ Vector2i ret = (pos / (texture_region_size + separation)).floor();
- return ret;
+ // 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() {
@@ -506,7 +543,7 @@ void TileAtlasView::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
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(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
+ 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_READY: {
@@ -530,11 +567,11 @@ TileAtlasView::TileAtlasView() {
panel->set_v_size_flags(SIZE_EXPAND_FILL);
add_child(panel);
- // Scrollingsc
zoom_widget = memnew(EditorZoomWidget);
add_child(zoom_widget);
zoom_widget->set_anchors_and_offsets_preset(Control::PRESET_TOP_LEFT, Control::PRESET_MODE_MINSIZE, 2 * EDSCALE);
zoom_widget->connect("zoom_changed", callable_mp(this, &TileAtlasView::_zoom_widget_changed).unbind(1));
+ zoom_widget->set_shortcut_context(this);
button_center_view = memnew(Button);
button_center_view->set_icon(get_theme_icon(SNAME("CenterView"), SNAME("EditorIcons")));
@@ -601,7 +638,6 @@ TileAtlasView::TileAtlasView() {
base_tiles_drawing_root = memnew(Control);
base_tiles_drawing_root->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
- base_tiles_drawing_root->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
base_tiles_drawing_root->set_texture_filter(TEXTURE_FILTER_NEAREST);
base_tiles_root_control->add_child(base_tiles_drawing_root);
@@ -645,7 +681,6 @@ TileAtlasView::TileAtlasView() {
alternative_tiles_drawing_root = memnew(Control);
alternative_tiles_drawing_root->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
- alternative_tiles_drawing_root->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
alternative_tiles_drawing_root->set_texture_filter(TEXTURE_FILTER_NEAREST);
alternative_tiles_root_control->add_child(alternative_tiles_drawing_root);
diff --git a/editor/plugins/tiles/tile_atlas_view.h b/editor/plugins/tiles/tile_atlas_view.h
index c710eac107..f719bee704 100644
--- a/editor/plugins/tiles/tile_atlas_view.h
+++ b/editor/plugins/tiles/tile_atlas_view.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_atlas_view.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_atlas_view.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 TILE_ATLAS_VIEW_H
#define TILE_ATLAS_VIEW_H
@@ -128,7 +128,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 4d54001b94..81aa9bf272 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_data_editors.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_data_editors.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 "tile_data_editors.h"
@@ -38,8 +38,13 @@
#include "editor/editor_node.h"
#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
+#include "scene/gui/menu_button.h"
+#include "scene/gui/option_button.h"
+#include "scene/gui/separator.h"
+
#ifdef DEBUG_ENABLED
#include "servers/navigation_server_3d.h"
#endif // DEBUG_ENABLED
@@ -128,7 +133,7 @@ void GenericTilePolygonEditor::_base_control_draw() {
real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ Color grid_color = EDITOR_GET("editors/tiles_editor/grid_color");
const Ref<Texture2D> handle = get_theme_icon(SNAME("EditorPathSharpHandle"), SNAME("EditorIcons"));
const Ref<Texture2D> add_handle = get_theme_icon(SNAME("EditorHandleAdd"), SNAME("EditorIcons"));
const Ref<StyleBox> focus_stylebox = get_theme_stylebox(SNAME("Focus"), SNAME("EditorStyles"));
@@ -153,7 +158,14 @@ void GenericTilePolygonEditor::_base_control_draw() {
// Draw the background.
if (background_texture.is_valid()) {
- base_control->draw_texture_rect_region(background_texture, Rect2(-background_region.size / 2 - background_offset, background_region.size), background_region, background_modulate, background_transpose);
+ Size2 region_size = background_region.size;
+ if (background_h_flip) {
+ region_size.x = -region_size.x;
+ }
+ if (background_v_flip) {
+ region_size.y = -region_size.y;
+ }
+ base_control->draw_texture_rect_region(background_texture, Rect2(-background_region.size / 2 - background_offset, region_size), background_region, background_modulate, background_transpose);
}
// Draw the polygons.
@@ -212,8 +224,8 @@ void GenericTilePolygonEditor::_base_control_draw() {
for (int i = 0; i < (int)polygons.size(); i++) {
const Vector<Vector2> &polygon = polygons[i];
for (int j = 0; j < polygon.size(); j++) {
- const Color modulate = (tinted_polygon_index == i && tinted_point_index == j) ? Color(0.5, 1, 2) : Color(1, 1, 1);
- base_control->draw_texture(handle, xform.xform(polygon[j]) - handle->get_size() / 2, modulate);
+ const Color poly_modulate = (tinted_polygon_index == i && tinted_point_index == j) ? Color(0.5, 1, 2) : Color(1, 1, 1);
+ base_control->draw_texture(handle, xform.xform(polygon[j]) - handle->get_size() / 2, poly_modulate);
}
}
}
@@ -253,12 +265,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 = editor_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) {
@@ -297,7 +309,22 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
case ROTATE_LEFT:
case FLIP_HORIZONTALLY:
case FLIP_VERTICALLY: {
- undo_redo->create_action(TTR("Rotate Polygons Left"));
+ switch (p_item_pressed) {
+ case ROTATE_RIGHT: {
+ undo_redo->create_action(TTR("Rotate Polygons Right"));
+ } break;
+ case ROTATE_LEFT: {
+ undo_redo->create_action(TTR("Rotate Polygons Left"));
+ } break;
+ case FLIP_HORIZONTALLY: {
+ undo_redo->create_action(TTR("Flip Polygons Horizontally"));
+ } break;
+ case FLIP_VERTICALLY: {
+ undo_redo->create_action(TTR("Flip Polygons Vertically"));
+ } break;
+ default:
+ break;
+ }
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++) {
@@ -334,6 +361,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) {
@@ -418,12 +449,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 = editor_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");
@@ -466,11 +497,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();
@@ -616,6 +647,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) {
@@ -756,8 +791,6 @@ void GenericTilePolygonEditor::_bind_methods() {
}
GenericTilePolygonEditor::GenericTilePolygonEditor() {
- editor_undo_redo = EditorNode::get_undo_redo();
-
toolbar = memnew(HBoxContainer);
add_child(toolbar);
@@ -831,6 +864,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
editor_zoom_widget = memnew(EditorZoomWidget);
editor_zoom_widget->set_position(Vector2(5, 5));
editor_zoom_widget->connect("zoom_changed", callable_mp(this, &GenericTilePolygonEditor::_zoom_changed).unbind(1));
+ editor_zoom_widget->set_shortcut_context(this);
root->add_child(editor_zoom_widget);
button_center_view = memnew(Button);
@@ -845,6 +879,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
void TileDataDefaultEditor::_property_value_changed(StringName p_property, Variant p_value, StringName p_field) {
ERR_FAIL_COND(!dummy_object);
dummy_object->set(p_property, p_value);
+ emit_signal(SNAME("needs_redraw"));
}
Variant TileDataDefaultEditor::_get_painted_value() {
@@ -875,6 +910,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) {
+ 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);
@@ -884,14 +920,14 @@ void TileDataDefaultEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_s
void TileDataDefaultEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_set_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) {
if (drag_type == DRAG_TYPE_PAINT_RECT) {
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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);
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;
@@ -925,7 +961,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) {
@@ -943,18 +979,19 @@ void TileDataDefaultEditor::forward_painting_atlas_gui_input(TileAtlasView *p_ti
}
}
+ 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();
@@ -963,7 +1000,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;
@@ -978,8 +1015,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();
@@ -1066,6 +1103,7 @@ void TileDataDefaultEditor::forward_painting_alternatives_gui_input(TileAtlasVie
drag_last_pos = mb->get_position();
}
} else {
+ 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);
@@ -1116,7 +1154,7 @@ void TileDataDefaultEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2
Color color = Color(1, 1, 1);
if (p_selected) {
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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);
selection_color.set_v(0.9);
color = selection_color;
@@ -1137,10 +1175,11 @@ void TileDataDefaultEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2
void TileDataDefaultEditor::setup_property_editor(Variant::Type p_type, String p_property, String p_label, Variant p_default_value) {
ERR_FAIL_COND_MSG(!property.is_empty(), "Cannot setup TileDataDefaultEditor twice");
property = p_property;
+ property_type = p_type;
// Update everything.
if (property_editor) {
- property_editor->queue_delete();
+ property_editor->queue_free();
}
// Update the dummy object.
@@ -1181,16 +1220,16 @@ void TileDataDefaultEditor::_notification(int p_what) {
}
}
-TileDataDefaultEditor::TileDataDefaultEditor() {
- undo_redo = EditorNode::get_undo_redo();
+Variant::Type TileDataDefaultEditor::get_property_type() {
+ return property_type;
+}
+TileDataDefaultEditor::TileDataDefaultEditor() {
label = memnew(Label);
label->set_text(TTR("Painting:"));
label->set_theme_type_variation("HeaderSmall");
add_child(label);
- toolbar->add_child(memnew(VSeparator));
-
picker_button = memnew(Button);
picker_button->set_flat(true);
picker_button->set_toggle_mode(true);
@@ -1199,7 +1238,7 @@ TileDataDefaultEditor::TileDataDefaultEditor() {
}
TileDataDefaultEditor::~TileDataDefaultEditor() {
- toolbar->queue_delete();
+ toolbar->queue_free();
memdelete(dummy_object);
}
@@ -1210,7 +1249,7 @@ void TileDataTextureOffsetEditor::draw_over_tile(CanvasItem *p_canvas_item, Tran
Vector2i tile_set_tile_size = tile_set->get_tile_size();
Color color = Color(1.0, 0.0, 0.0);
if (p_selected) {
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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;
}
@@ -1232,7 +1271,7 @@ void TileDataPositionEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform
Color color = Color(1.0, 1.0, 1.0);
if (p_selected) {
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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;
}
@@ -1246,7 +1285,7 @@ void TileDataYSortEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2D
Color color = Color(1.0, 1.0, 1.0);
if (p_selected) {
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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;
}
@@ -1258,7 +1297,7 @@ void TileDataOcclusionShapeEditor::draw_over_tile(CanvasItem *p_canvas_item, Tra
TileData *tile_data = _get_tile_data(p_cell);
ERR_FAIL_COND(!tile_data);
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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 color = grid_color.darkened(0.2);
if (p_selected) {
@@ -1314,6 +1353,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) {
+ 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);
@@ -1334,8 +1374,6 @@ void TileDataOcclusionShapeEditor::_notification(int p_what) {
}
TileDataOcclusionShapeEditor::TileDataOcclusionShapeEditor() {
- undo_redo = EditorNode::get_undo_redo();
-
polygon_editor = memnew(GenericTilePolygonEditor);
add_child(polygon_editor);
}
@@ -1402,11 +1440,11 @@ void TileDataCollisionEditor::_polygons_changed() {
dummy_object->remove_dummy_property(vformat("polygon_%d_one_way_margin", i));
}
for (int i = polygon_editor->get_polygon_count(); property_editors.has(vformat("polygon_%d_one_way", i)); i++) {
- property_editors[vformat("polygon_%d_one_way", i)]->queue_delete();
+ property_editors[vformat("polygon_%d_one_way", i)]->queue_free();
property_editors.erase(vformat("polygon_%d_one_way", i));
}
for (int i = polygon_editor->get_polygon_count(); property_editors.has(vformat("polygon_%d_one_way_margin", i)); i++) {
- property_editors[vformat("polygon_%d_one_way_margin", i)]->queue_delete();
+ property_editors[vformat("polygon_%d_one_way_margin", i)]->queue_free();
property_editors.erase(vformat("polygon_%d_one_way_margin", i));
}
}
@@ -1494,25 +1532,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;
+ 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"]);
}
}
}
@@ -1531,8 +1576,6 @@ void TileDataCollisionEditor::_notification(int p_what) {
}
TileDataCollisionEditor::TileDataCollisionEditor() {
- undo_redo = EditorNode::get_undo_redo();
-
polygon_editor = memnew(GenericTilePolygonEditor);
polygon_editor->set_multiple_polygon_mode(true);
polygon_editor->connect("polygons_changed", callable_mp(this, &TileDataCollisionEditor::_polygons_changed));
@@ -1577,7 +1620,7 @@ void TileDataCollisionEditor::draw_over_tile(CanvasItem *p_canvas_item, Transfor
// Draw all shapes.
Vector<Color> color;
if (p_selected) {
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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);
selection_color.a = 0.7;
color.push_back(selection_color);
@@ -1587,12 +1630,31 @@ void TileDataCollisionEditor::draw_over_tile(CanvasItem *p_canvas_item, Transfor
}
RenderingServer::get_singleton()->canvas_item_add_set_transform(p_canvas_item->get_canvas_item(), p_transform);
+
+ Ref<Texture2D> one_way_icon = get_theme_icon(SNAME("OneWayTile"), SNAME("EditorIcons"));
for (int i = 0; i < tile_data->get_collision_polygons_count(physics_layer); i++) {
Vector<Vector2> polygon = tile_data->get_collision_polygon_points(physics_layer, i);
- if (polygon.size() >= 3) {
- p_canvas_item->draw_polygon(polygon, color);
+ if (polygon.size() < 3) {
+ continue;
+ }
+
+ p_canvas_item->draw_polygon(polygon, color);
+
+ if (tile_data->is_collision_polygon_one_way(physics_layer, i)) {
+ PackedVector2Array uvs;
+ uvs.resize(polygon.size());
+ Vector2 size_1 = Vector2(1, 1) / tile_set->get_tile_size();
+
+ for (int j = 0; j < polygon.size(); j++) {
+ uvs.write[j] = polygon[j] * size_1 + Vector2(0.5, 0.5);
+ }
+
+ Vector<Color> color2;
+ color2.push_back(Color(1, 1, 1, 0.4));
+ p_canvas_item->draw_polygon(polygon, color2, uvs, one_way_icon);
}
}
+
RenderingServer::get_singleton()->canvas_item_add_set_transform(p_canvas_item->get_canvas_item(), Transform2D());
}
@@ -1750,14 +1812,14 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas
if (drag_type == DRAG_TYPE_PAINT_TERRAIN_SET_RECT) {
// Draw selection rectangle.
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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);
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;
@@ -1786,8 +1848,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;
@@ -1947,7 +2009,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) {
@@ -1977,10 +2039,11 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
}
}
drag_last_pos = mm->get_position();
+ accept_event();
} 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) {
@@ -2026,14 +2089,15 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
}
}
drag_last_pos = mm->get_position();
+ accept_event();
}
}
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
- if (mb->get_button_index() == MouseButton::LEFT) {
+ if (mb->get_button_index() == MouseButton::LEFT || mb->get_button_index() == MouseButton::RIGHT) {
if (mb->is_pressed()) {
- if (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) {
@@ -2060,6 +2124,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
terrain_set_property_editor->update_property();
_update_terrain_selector();
picker_button->set_pressed(false);
+ accept_event();
}
} else {
Vector2i coords = p_tile_atlas_view->get_atlas_tile_coords_at_pos(mb->get_position());
@@ -2071,7 +2136,11 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
int terrain_set = int(dummy_object->get("terrain_set"));
int terrain = int(dummy_object->get("terrain"));
if (terrain_set == -1 || !tile_data || tile_data->get_terrain_set() != terrain_set) {
- if (mb->is_ctrl_pressed()) {
+ // Paint terrain sets.
+ if (mb->get_button_index() == MouseButton::RIGHT) {
+ terrain_set = -1;
+ }
+ 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();
@@ -2106,9 +2175,14 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
}
drag_last_pos = mb->get_position();
}
+ accept_event();
} else if (tile_data->get_terrain_set() == terrain_set) {
- if (mb->is_ctrl_pressed()) {
- // Paint terrain set with rect.
+ // Paint terrain bits.
+ if (mb->get_button_index() == MouseButton::RIGHT) {
+ terrain = -1;
+ }
+ 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();
Dictionary painted_dict;
@@ -2163,13 +2237,15 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
}
drag_last_pos = mb->get_position();
}
+ accept_event();
}
}
} else {
+ 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;
@@ -2190,18 +2266,21 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
for (const TileMapCell &E : edited) {
Vector2i coords = E.get_atlas_coords();
TileData *tile_data = p_tile_set_atlas_source->get_tile_data(coords, 0);
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.alternative_tile), tile_data->get_terrain_set());
undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.alternative_tile), drag_painted_value);
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain", coords.x, coords.y, E.alternative_tile), tile_data->get_terrain());
- for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
- TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
- if (tile_data->is_valid_terrain_peering_bit(bit)) {
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.alternative_tile), tile_data->get_terrain_peering_bit(bit));
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.alternative_tile), tile_data->get_terrain_set());
+ if (tile_data->get_terrain_set() >= 0) {
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain", coords.x, coords.y, E.alternative_tile), tile_data->get_terrain());
+ for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
+ TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
+ if (tile_data->is_valid_terrain_peering_bit(bit)) {
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.alternative_tile), tile_data->get_terrain_peering_bit(bit));
+ }
}
}
}
undo_redo->commit_action(true);
drag_type = DRAG_TYPE_NONE;
+ accept_event();
} else if (drag_type == DRAG_TYPE_PAINT_TERRAIN_SET) {
undo_redo->create_action(TTR("Painting Terrain Set"));
for (KeyValue<TileMapCell, Variant> &E : drag_modified) {
@@ -2209,17 +2288,20 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
Vector2i coords = E.key.get_atlas_coords();
undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.key.alternative_tile), drag_painted_value);
undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.key.alternative_tile), dict["terrain_set"]);
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain", coords.x, coords.y, E.key.alternative_tile), dict["terrain"]);
- Array array = dict["terrain_peering_bits"];
- for (int i = 0; i < array.size(); i++) {
- TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
- if (tile_set->is_valid_terrain_peering_bit(dict["terrain_set"], bit)) {
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.key.alternative_tile), array[i]);
+ if (int(dict["terrain_set"]) >= 0) {
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain", coords.x, coords.y, E.key.alternative_tile), dict["terrain"]);
+ Array array = dict["terrain_peering_bits"];
+ for (int i = 0; i < array.size(); i++) {
+ TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
+ if (tile_set->is_valid_terrain_peering_bit(dict["terrain_set"], bit)) {
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.key.alternative_tile), array[i]);
+ }
}
}
}
undo_redo->commit_action(false);
drag_type = DRAG_TYPE_NONE;
+ accept_event();
} else if (drag_type == DRAG_TYPE_PAINT_TERRAIN_BITS) {
Dictionary painted = Dictionary(drag_painted_value);
int terrain_set = int(painted["terrain_set"]);
@@ -2243,14 +2325,15 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
}
undo_redo->commit_action(false);
drag_type = DRAG_TYPE_NONE;
+ accept_event();
} else if (drag_type == DRAG_TYPE_PAINT_TERRAIN_BITS_RECT) {
Dictionary painted = Dictionary(drag_painted_value);
int terrain_set = int(painted["terrain_set"]);
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;
@@ -2312,6 +2395,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
}
undo_redo->commit_action(true);
drag_type = DRAG_TYPE_NONE;
+ accept_event();
}
}
}
@@ -2348,6 +2432,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
}
drag_last_pos = mm->get_position();
+ accept_event();
} else if (drag_type == DRAG_TYPE_PAINT_TERRAIN_BITS) {
Dictionary painted = Dictionary(drag_painted_value);
int terrain_set = int(painted["terrain_set"]);
@@ -2400,14 +2485,15 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
}
}
drag_last_pos = mm->get_position();
+ accept_event();
}
}
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
- if (mb->get_button_index() == MouseButton::LEFT) {
+ if (mb->get_button_index() == MouseButton::LEFT || mb->get_button_index() == MouseButton::RIGHT) {
if (mb->is_pressed()) {
- if (picker_button->is_pressed()) {
+ if (mb->get_button_index() == MouseButton::LEFT && picker_button->is_pressed()) {
Vector3i tile = p_tile_atlas_view->get_alternative_tile_at_pos(mb->get_position());
Vector2i coords = Vector2i(tile.x, tile.y);
int alternative_tile = tile.z;
@@ -2437,6 +2523,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
terrain_set_property_editor->update_property();
_update_terrain_selector();
picker_button->set_pressed(false);
+ accept_event();
}
} else {
int terrain_set = int(dummy_object->get("terrain_set"));
@@ -2446,93 +2533,106 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
Vector2i coords = Vector2i(tile.x, tile.y);
int alternative_tile = tile.z;
- TileData *tile_data = p_tile_set_atlas_source->get_tile_data(coords, alternative_tile);
+ if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
+ TileData *tile_data = p_tile_set_atlas_source->get_tile_data(coords, alternative_tile);
- if (terrain_set == -1 || !tile_data || tile_data->get_terrain_set() != terrain_set) {
- drag_type = DRAG_TYPE_PAINT_TERRAIN_SET;
- drag_modified.clear();
- drag_painted_value = int(dummy_object->get("terrain_set"));
- if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
- TileMapCell cell;
- cell.source_id = 0;
- cell.set_atlas_coords(coords);
- cell.alternative_tile = alternative_tile;
- Dictionary dict;
- dict["terrain_set"] = tile_data->get_terrain_set();
- Array array;
- for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
- TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
- array.push_back(tile_data->is_valid_terrain_peering_bit(bit) ? tile_data->get_terrain_peering_bit(bit) : -1);
+ if (terrain_set == -1 || !tile_data || tile_data->get_terrain_set() != terrain_set) {
+ // Paint terrain sets.
+ drag_type = DRAG_TYPE_PAINT_TERRAIN_SET;
+ drag_modified.clear();
+ drag_painted_value = int(dummy_object->get("terrain_set"));
+ if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
+ TileMapCell cell;
+ cell.source_id = 0;
+ cell.set_atlas_coords(coords);
+ cell.alternative_tile = alternative_tile;
+ Dictionary dict;
+ dict["terrain_set"] = tile_data->get_terrain_set();
+ Array array;
+ for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
+ TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
+ array.push_back(tile_data->is_valid_terrain_peering_bit(bit) ? tile_data->get_terrain_peering_bit(bit) : -1);
+ }
+ dict["terrain_peering_bits"] = array;
+ drag_modified[cell] = dict;
+ tile_data->set_terrain_set(drag_painted_value);
}
- dict["terrain_peering_bits"] = array;
- drag_modified[cell] = dict;
- tile_data->set_terrain_set(drag_painted_value);
- }
- drag_last_pos = mb->get_position();
- } else if (tile_data->get_terrain_set() == terrain_set) {
- // Paint terrain bits.
- drag_type = DRAG_TYPE_PAINT_TERRAIN_BITS;
- drag_modified.clear();
- Dictionary painted_dict;
- painted_dict["terrain_set"] = terrain_set;
- painted_dict["terrain"] = terrain;
- drag_painted_value = painted_dict;
-
- if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
- TileMapCell cell;
- cell.source_id = 0;
- cell.set_atlas_coords(coords);
- cell.alternative_tile = alternative_tile;
-
- // Save the old terrain_set and terrains bits.
- Dictionary dict;
- dict["terrain_set"] = tile_data->get_terrain_set();
- dict["terrain"] = tile_data->get_terrain();
- Array array;
- for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
- TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
- array.push_back(tile_data->is_valid_terrain_peering_bit(bit) ? tile_data->get_terrain_peering_bit(bit) : -1);
+ drag_last_pos = mb->get_position();
+ accept_event();
+ } else if (tile_data->get_terrain_set() == terrain_set) {
+ // Paint terrain bits.
+ if (mb->get_button_index() == MouseButton::RIGHT) {
+ terrain = -1;
}
- dict["terrain_peering_bits"] = array;
- drag_modified[cell] = dict;
+ // Paint terrain bits.
+ drag_type = DRAG_TYPE_PAINT_TERRAIN_BITS;
+ drag_modified.clear();
+ Dictionary painted_dict;
+ painted_dict["terrain_set"] = terrain_set;
+ painted_dict["terrain"] = terrain;
+ drag_painted_value = painted_dict;
- // 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);
+ if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
+ TileMapCell cell;
+ cell.source_id = 0;
+ cell.set_atlas_coords(coords);
+ cell.alternative_tile = alternative_tile;
- Vector<Vector2> polygon = tile_set->get_terrain_polygon(terrain_set);
- if (Geometry2D::is_point_in_polygon(mb->get_position() - position, polygon)) {
- tile_data->set_terrain(terrain);
- }
- for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
- TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
- if (tile_set->is_valid_terrain_peering_bit(terrain_set, bit)) {
- polygon = tile_set->get_terrain_peering_bit_polygon(terrain_set, bit);
- if (Geometry2D::is_point_in_polygon(mb->get_position() - position, polygon)) {
- tile_data->set_terrain_peering_bit(bit, terrain);
+ // Save the old terrain_set and terrains bits.
+ Dictionary dict;
+ dict["terrain_set"] = tile_data->get_terrain_set();
+ dict["terrain"] = tile_data->get_terrain();
+ Array array;
+ for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
+ TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
+ array.push_back(tile_data->is_valid_terrain_peering_bit(bit) ? tile_data->get_terrain_peering_bit(bit) : -1);
+ }
+ dict["terrain_peering_bits"] = array;
+ drag_modified[cell] = dict;
+
+ // 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);
+
+ Vector<Vector2> polygon = tile_set->get_terrain_polygon(terrain_set);
+ if (Geometry2D::is_point_in_polygon(mb->get_position() - position, polygon)) {
+ tile_data->set_terrain(terrain);
+ }
+ for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
+ TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
+ if (tile_set->is_valid_terrain_peering_bit(terrain_set, bit)) {
+ polygon = tile_set->get_terrain_peering_bit_polygon(terrain_set, bit);
+ if (Geometry2D::is_point_in_polygon(mb->get_position() - position, polygon)) {
+ tile_data->set_terrain_peering_bit(bit, terrain);
+ }
}
}
}
+ drag_last_pos = mb->get_position();
+ accept_event();
}
- drag_last_pos = mb->get_position();
}
}
} else {
+ 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) {
Dictionary dict = E.value;
Vector2i coords = E.key.get_atlas_coords();
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.key.alternative_tile), dict["terrain_set"]);
undo_redo->add_do_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.key.alternative_tile), drag_painted_value);
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain", coords.x, coords.y, E.key.alternative_tile), dict["terrain"]);
- Array array = dict["terrain_peering_bits"];
- for (int i = 0; i < array.size(); i++) {
- undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.key.alternative_tile), array[i]);
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain_set", coords.x, coords.y, E.key.alternative_tile), dict["terrain_set"]);
+ if (int(dict["terrain_set"]) >= 0) {
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrain", coords.x, coords.y, E.key.alternative_tile), dict["terrain"]);
+ Array array = dict["terrain_peering_bits"];
+ for (int i = 0; i < array.size(); i++) {
+ undo_redo->add_undo_property(p_tile_set_atlas_source, vformat("%d:%d/%d/terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[i]), coords.x, coords.y, E.key.alternative_tile), array[i]);
+ }
}
}
undo_redo->commit_action(false);
drag_type = DRAG_TYPE_NONE;
+ accept_event();
} else if (drag_type == DRAG_TYPE_PAINT_TERRAIN_BITS) {
Dictionary painted = Dictionary(drag_painted_value);
int terrain_set = int(painted["terrain_set"]);
@@ -2556,6 +2656,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
}
undo_redo->commit_action(false);
drag_type = DRAG_TYPE_NONE;
+ accept_event();
}
}
}
@@ -2579,16 +2680,12 @@ void TileDataTerrainsEditor::_notification(int p_what) {
}
TileDataTerrainsEditor::TileDataTerrainsEditor() {
- undo_redo = EditorNode::get_undo_redo();
-
label = memnew(Label);
label->set_text(TTR("Painting:"));
label->set_theme_type_variation("HeaderSmall");
add_child(label);
// Toolbar
- toolbar->add_child(memnew(VSeparator));
-
picker_button = memnew(Button);
picker_button->set_flat(true);
picker_button->set_toggle_mode(true);
@@ -2617,32 +2714,32 @@ TileDataTerrainsEditor::TileDataTerrainsEditor() {
}
TileDataTerrainsEditor::~TileDataTerrainsEditor() {
- toolbar->queue_delete();
+ toolbar->queue_free();
memdelete(dummy_object);
}
Variant TileDataNavigationEditor::_get_painted_value() {
- Ref<NavigationPolygon> navigation_polygon;
- navigation_polygon.instantiate();
+ Ref<NavigationPolygon> nav_polygon;
+ nav_polygon.instantiate();
for (int i = 0; i < polygon_editor->get_polygon_count(); i++) {
Vector<Vector2> polygon = polygon_editor->get_polygon(i);
- navigation_polygon->add_outline(polygon);
+ nav_polygon->add_outline(polygon);
}
- navigation_polygon->make_polygons_from_outlines();
- return navigation_polygon;
+ nav_polygon->make_polygons_from_outlines();
+ return nav_polygon;
}
void TileDataNavigationEditor::_set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) {
TileData *tile_data = p_tile_set_atlas_source->get_tile_data(p_coords, p_alternative_tile);
ERR_FAIL_COND(!tile_data);
- Ref<NavigationPolygon> navigation_polygon = tile_data->get_navigation_polygon(navigation_layer);
+ Ref<NavigationPolygon> nav_polygon = tile_data->get_navigation_polygon(navigation_layer);
polygon_editor->clear_polygons();
- if (navigation_polygon.is_valid()) {
- for (int i = 0; i < navigation_polygon->get_outline_count(); i++) {
- polygon_editor->add_polygon(navigation_polygon->get_outline(i));
+ if (nav_polygon.is_valid()) {
+ for (int i = 0; i < nav_polygon->get_outline_count(); i++) {
+ 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());
@@ -2651,8 +2748,8 @@ void TileDataNavigationEditor::_set_painted_value(TileSetAtlasSource *p_tile_set
void TileDataNavigationEditor::_set_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile, Variant p_value) {
TileData *tile_data = p_tile_set_atlas_source->get_tile_data(p_coords, p_alternative_tile);
ERR_FAIL_COND(!tile_data);
- Ref<NavigationPolygon> navigation_polygon = p_value;
- tile_data->set_navigation_polygon(navigation_layer, navigation_polygon);
+ 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());
}
@@ -2664,6 +2761,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) {
+ 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);
@@ -2686,8 +2784,6 @@ void TileDataNavigationEditor::_notification(int p_what) {
}
TileDataNavigationEditor::TileDataNavigationEditor() {
- undo_redo = EditorNode::get_undo_redo();
-
polygon_editor = memnew(GenericTilePolygonEditor);
polygon_editor->set_multiple_polygon_mode(true);
add_child(polygon_editor);
@@ -2700,9 +2796,9 @@ void TileDataNavigationEditor::draw_over_tile(CanvasItem *p_canvas_item, Transfo
// Draw all shapes.
RenderingServer::get_singleton()->canvas_item_add_set_transform(p_canvas_item->get_canvas_item(), p_transform);
- Ref<NavigationPolygon> navigation_polygon = tile_data->get_navigation_polygon(navigation_layer);
- if (navigation_polygon.is_valid()) {
- Vector<Vector2> verts = navigation_polygon->get_vertices();
+ Ref<NavigationPolygon> nav_polygon = tile_data->get_navigation_polygon(navigation_layer);
+ if (nav_polygon.is_valid()) {
+ Vector<Vector2> verts = nav_polygon->get_vertices();
if (verts.size() < 3) {
return;
}
@@ -2712,16 +2808,16 @@ void TileDataNavigationEditor::draw_over_tile(CanvasItem *p_canvas_item, Transfo
color = NavigationServer3D::get_singleton()->get_debug_navigation_geometry_face_color();
#endif // DEBUG_ENABLED
if (p_selected) {
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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);
selection_color.a = 0.7;
color = selection_color;
}
RandomPCG rand;
- for (int i = 0; i < navigation_polygon->get_polygon_count(); i++) {
+ for (int i = 0; i < nav_polygon->get_polygon_count(); i++) {
// An array of vertices for this polygon.
- Vector<int> polygon = navigation_polygon->get_polygon(i);
+ Vector<int> polygon = nav_polygon->get_polygon(i);
Vector<Vector2> vertices;
vertices.resize(polygon.size());
for (int j = 0; j < polygon.size(); j++) {
diff --git a/editor/plugins/tiles/tile_data_editors.h b/editor/plugins/tiles/tile_data_editors.h
index c1560138b2..02d4584428 100644
--- a/editor/plugins/tiles/tile_data_editors.h
+++ b/editor/plugins/tiles/tile_data_editors.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_data_editors.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_data_editors.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 TILE_DATA_EDITORS_H
#define TILE_DATA_EDITORS_H
@@ -39,6 +39,7 @@
#include "scene/gui/control.h"
#include "scene/gui/label.h"
+class MenuButton;
class EditorUndoRedoManager;
class TileDataEditor : public VBoxContainer {
@@ -95,7 +96,6 @@ private:
bool multiple_polygon_mode = false;
bool use_undo_redo = true;
- Ref<EditorUndoRedoManager> editor_undo_redo;
// UI
int hovered_polygon_index = -1;
@@ -216,10 +216,9 @@ private:
protected:
DummyObject *dummy_object = memnew(DummyObject);
- Ref<EditorUndoRedoManager> undo_redo;
-
StringName type;
String property;
+ Variant::Type property_type;
void _notification(int p_what);
virtual Variant _get_painted_value();
@@ -237,6 +236,7 @@ public:
virtual void draw_over_tile(CanvasItem *p_canvas_item, Transform2D p_transform, TileMapCell p_cell, bool p_selected = false) override;
void setup_property_editor(Variant::Type p_type, String p_property, String p_label = "", Variant p_default_value = Variant());
+ Variant::Type get_property_type();
TileDataDefaultEditor();
~TileDataDefaultEditor();
@@ -281,8 +281,6 @@ private:
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override;
protected:
- Ref<EditorUndoRedoManager> undo_redo;
-
virtual void _tile_set_changed() override;
void _notification(int p_what);
@@ -316,8 +314,6 @@ class TileDataCollisionEditor : public TileDataDefaultEditor {
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override;
protected:
- Ref<EditorUndoRedoManager> undo_redo;
-
virtual void _tile_set_changed() override;
void _notification(int p_what);
@@ -368,8 +364,6 @@ protected:
void _notification(int p_what);
- Ref<EditorUndoRedoManager> undo_redo;
-
public:
virtual Control *get_toolbar() override { return toolbar; };
virtual void forward_draw_over_atlas(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) override;
@@ -401,8 +395,6 @@ private:
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, HashMap<TileMapCell, Variant, TileMapCell> p_previous_values, Variant p_new_value) override;
protected:
- Ref<EditorUndoRedoManager> undo_redo;
-
virtual void _tile_set_changed() override;
void _notification(int p_what);
diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp
index a91f22ccd0..885d41b8da 100644
--- a/editor/plugins/tiles/tile_map_editor.cpp
+++ b/editor/plugins/tiles/tile_map_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_map_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_map_editor.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 "tile_map_editor.h"
@@ -35,6 +35,7 @@
#include "editor/editor_node.h"
#include "editor/editor_resource_preview.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
@@ -54,7 +55,7 @@ void TileMapEditorTilesPlugin::tile_set_changed() {
}
void TileMapEditorTilesPlugin::_on_random_tile_checkbox_toggled(bool p_pressed) {
- scatter_spinbox->set_editable(p_pressed);
+ scatter_controls_container->set_visible(p_pressed);
}
void TileMapEditorTilesPlugin::_on_scattering_spinbox_changed(double p_value) {
@@ -155,7 +156,7 @@ void TileMapEditorTilesPlugin::_update_tile_set_sources_list() {
// Common to all type of sources.
if (!source->get_name().is_empty()) {
- item_text = vformat(TTR("%s (id:%d)"), source->get_name(), source_id);
+ item_text = vformat(TTR("%s (ID: %d)"), source->get_name(), source_id);
}
// Atlas source.
@@ -164,7 +165,7 @@ void TileMapEditorTilesPlugin::_update_tile_set_sources_list() {
texture = atlas_source->get_texture();
if (item_text.is_empty()) {
if (texture.is_valid()) {
- item_text = vformat("%s (ID: %d)", texture->get_path().get_file(), source_id);
+ item_text = vformat(TTR("%s (ID: %d)"), texture->get_path().get_file(), source_id);
} else {
item_text = vformat(TTR("No Texture Atlas Source (ID: %d)"), source_id);
}
@@ -272,6 +273,7 @@ void TileMapEditorTilesPlugin::_patterns_item_list_gui_input(const Ref<InputEven
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();
+ 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);
@@ -281,6 +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();
+ 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];
@@ -396,7 +399,7 @@ void TileMapEditorTilesPlugin::_update_scenes_collection_view() {
}
// Icon size update.
- int int_size = int(EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size")) * EDSCALE;
+ int int_size = int(EDITOR_GET("filesystem/file_dialog/thumbnail_size")) * EDSCALE;
scene_tiles_list->set_fixed_icon_size(Vector2(int_size, int_size));
}
@@ -460,7 +463,7 @@ void TileMapEditorTilesPlugin::_update_theme() {
source_sort_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("Sort"), SNAME("EditorIcons")));
select_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("ToolSelect"), SNAME("EditorIcons")));
paint_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
- line_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("CurveLinear"), SNAME("EditorIcons")));
+ line_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("Line"), SNAME("EditorIcons")));
rect_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("Rectangle"), SNAME("EditorIcons")));
bucket_tool_button->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("Bucket"), SNAME("EditorIcons")));
@@ -469,6 +472,7 @@ void TileMapEditorTilesPlugin::_update_theme() {
random_tile_toggle->set_icon(tiles_bottom_panel->get_theme_icon(SNAME("RandomNumberGenerator"), SNAME("EditorIcons")));
missing_atlas_texture_icon = tiles_bottom_panel->get_theme_icon(SNAME("TileSet"), SNAME("EditorIcons"));
+ _update_tile_set_sources_list();
}
bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
@@ -511,6 +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()) {
+ 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);
@@ -542,6 +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()) {
+ 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);
@@ -640,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();
@@ -661,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();
@@ -736,10 +742,10 @@ 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 = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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);
tile_map->draw_cells_outline(p_overlay, tile_map_selection, selection_color, xform);
}
@@ -806,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.
@@ -844,9 +850,9 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
const int fading = 5;
// Draw the lines of the grid behind the preview.
- bool display_grid = EditorSettings::get_singleton()->get("editors/tiles_editor/display_grid");
+ bool display_grid = EDITOR_GET("editors/tiles_editor/display_grid");
if (display_grid) {
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ Color grid_color = EDITOR_GET("editors/tiles_editor/grid_color");
if (drawn_grid_rect.size.x > 0 && drawn_grid_rect.size.y > 0) {
drawn_grid_rect = drawn_grid_rect.grow(fading);
for (int x = drawn_grid_rect.position.x; x < (drawn_grid_rect.position.x + drawn_grid_rect.size.x); x++) {
@@ -918,6 +924,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
Color modulate = tile_data->get_modulate();
Color self_modulate = tile_map->get_self_modulate();
modulate *= self_modulate;
+ modulate *= tile_map->get_layer_modulate(tile_map_layer);
// Draw the tile.
p_overlay->draw_texture_rect_region(atlas_source->get_texture(), dest_rect, source_rect, modulate * Color(1.0, 1.0, 1.0, 0.5), transpose, tile_set->is_uv_clipping());
@@ -1159,7 +1166,7 @@ HashMap<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vecto
}
// Get surrounding tiles (handles different tile shapes).
- TypedArray<Vector2i> around = tile_map->get_surrounding_tiles(coords);
+ TypedArray<Vector2i> around = tile_map->get_surrounding_cells(coords);
for (int i = 0; i < around.size(); i++) {
to_check.push_back(around[i]);
}
@@ -1233,19 +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());
+ 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);
}
@@ -1480,13 +1488,15 @@ void TileMapEditorTilesPlugin::_update_fix_selected_and_hovered() {
}
// Selection if needed.
- for (RBSet<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) {
+ for (RBSet<TileMapCell>::Element *E = tile_set_selection.front(); E;) {
+ RBSet<TileMapCell>::Element *N = E->next();
const TileMapCell *selected = &(E->get());
if (!tile_set->has_source(selected->source_id) ||
!tile_set->get_source(selected->source_id)->has_tile(selected->get_atlas_coords()) ||
!tile_set->get_source(selected->source_id)->has_alternative_tile(selected->get_atlas_coords(), selected->alternative_tile)) {
tile_set_selection.erase(E);
}
+ E = N;
}
if (!tile_map_selection.is_empty()) {
@@ -1682,7 +1692,7 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() {
}
// Draw the selection.
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ 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);
for (const TileMapCell &E : tile_set_selection) {
if (E.source_id == source_id && E.alternative_tile == 0) {
@@ -1691,7 +1701,7 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() {
if (frame > 0) {
color.a *= 0.3;
}
- tile_atlas_control->draw_rect(atlas->get_tile_texture_region(E.get_atlas_coords(), frame), color, false);
+ TilesEditorPlugin::draw_selection_rect(tile_atlas_control, atlas->get_tile_texture_region(E.get_atlas_coords(), frame), color);
}
}
}
@@ -1699,18 +1709,15 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() {
// Draw the hovered tile.
if (hovered_tile.get_atlas_coords() != TileSetSource::INVALID_ATLAS_COORDS && hovered_tile.alternative_tile == 0 && !tile_set_dragging_selection) {
for (int frame = 0; frame < atlas->get_tile_animation_frames_count(hovered_tile.get_atlas_coords()); frame++) {
- Color color = Color(1.0, 1.0, 1.0);
- if (frame > 0) {
- color.a *= 0.3;
- }
- tile_atlas_control->draw_rect(atlas->get_tile_texture_region(hovered_tile.get_atlas_coords(), frame), color, false);
+ Color color = Color(1.0, 0.8, 0.0, frame == 0 ? 0.6 : 0.3);
+ TilesEditorPlugin::draw_selection_rect(tile_atlas_control, atlas->get_tile_texture_region(hovered_tile.get_atlas_coords(), frame), color);
}
}
// 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);
@@ -1724,9 +1731,8 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() {
}
}
}
- Color selection_rect_color = selection_color.lightened(0.2);
for (const Vector2i &E : to_draw) {
- tile_atlas_control->draw_rect(atlas->get_tile_texture_region(E), selection_rect_color, false);
+ TilesEditorPlugin::draw_selection_rect(tile_atlas_control, atlas->get_tile_texture_region(E));
}
}
}
@@ -1735,7 +1741,6 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_mouse_exited() {
hovered_tile.source_id = TileSet::INVALID_SOURCE;
hovered_tile.set_atlas_coords(TileSetSource::INVALID_ATLAS_COORDS);
hovered_tile.alternative_tile = TileSetSource::INVALID_TILE_ALTERNATIVE;
- tile_set_dragging_selection = false;
tile_atlas_control->queue_redraw();
}
@@ -1807,8 +1812,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);
@@ -1876,7 +1881,7 @@ void TileMapEditorTilesPlugin::_tile_alternatives_control_draw() {
if (E.source_id == source_id && E.get_atlas_coords() != TileSetSource::INVALID_ATLAS_COORDS && E.alternative_tile > 0) {
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E.get_atlas_coords(), E.alternative_tile);
if (rect != Rect2i()) {
- alternative_tiles_control->draw_rect(rect, Color(0.2, 0.2, 1.0), false);
+ TilesEditorPlugin::draw_selection_rect(alternative_tiles_control, rect);
}
}
}
@@ -1885,7 +1890,7 @@ void TileMapEditorTilesPlugin::_tile_alternatives_control_draw() {
if (hovered_tile.get_atlas_coords() != TileSetSource::INVALID_ATLAS_COORDS && hovered_tile.alternative_tile > 0) {
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(hovered_tile.get_atlas_coords(), hovered_tile.alternative_tile);
if (rect != Rect2i()) {
- alternative_tiles_control->draw_rect(rect, Color(1.0, 1.0, 1.0), false);
+ TilesEditorPlugin::draw_selection_rect(alternative_tiles_control, rect, Color(1.0, 0.8, 0.0, 0.5));
}
}
}
@@ -1894,7 +1899,6 @@ void TileMapEditorTilesPlugin::_tile_alternatives_control_mouse_exited() {
hovered_tile.source_id = TileSet::INVALID_SOURCE;
hovered_tile.set_atlas_coords(TileSetSource::INVALID_ATLAS_COORDS);
hovered_tile.alternative_tile = TileSetSource::INVALID_TILE_ALTERNATIVE;
- tile_set_dragging_selection = false;
alternative_tiles_control->queue_redraw();
}
@@ -2004,6 +2008,7 @@ void TileMapEditorTilesPlugin::_set_source_sort(int p_sort) {
}
TilesEditorPlugin::get_singleton()->set_sorting_option(p_sort);
_update_tile_set_sources_list();
+ EditorSettings::get_singleton()->set_project_metadata("editor_metadata", "tile_source_sort", p_sort);
}
void TileMapEditorTilesPlugin::_bind_methods() {
@@ -2013,8 +2018,6 @@ void TileMapEditorTilesPlugin::_bind_methods() {
}
TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
- undo_redo = EditorNode::get_undo_redo();
-
CanvasItemEditor::get_singleton()
->get_viewport_control()
->connect("mouse_exited", callable_mp(this, &TileMapEditorTilesPlugin::_mouse_exited_viewport));
@@ -2124,10 +2127,12 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
tools_settings->add_child(random_tile_toggle);
// Random tile scattering.
+ scatter_controls_container = memnew(HBoxContainer);
+
scatter_label = memnew(Label);
scatter_label->set_tooltip_text(TTR("Defines the probability of painting nothing instead of a randomly selected tile."));
scatter_label->set_text(TTR("Scattering:"));
- tools_settings->add_child(scatter_label);
+ scatter_controls_container->add_child(scatter_label);
scatter_spinbox = memnew(SpinBox);
scatter_spinbox->set_min(0.0);
@@ -2136,7 +2141,8 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
scatter_spinbox->set_tooltip_text(TTR("Defines the probability of painting nothing instead of a randomly selected tile."));
scatter_spinbox->get_line_edit()->add_theme_constant_override("minimum_character_width", 4);
scatter_spinbox->connect("value_changed", callable_mp(this, &TileMapEditorTilesPlugin::_on_scattering_spinbox_changed));
- tools_settings->add_child(scatter_spinbox);
+ scatter_controls_container->add_child(scatter_spinbox);
+ tools_settings->add_child(scatter_controls_container);
_on_random_tile_checkbox_toggled(false);
@@ -2230,7 +2236,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));
@@ -2262,12 +2267,13 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
patterns_item_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
patterns_item_list->connect("gui_input", callable_mp(this, &TileMapEditorTilesPlugin::_patterns_item_list_gui_input));
patterns_item_list->connect("item_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection).unbind(1));
- patterns_item_list->connect("item_activated", callable_mp(this, &TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection));
+ patterns_item_list->connect("item_activated", callable_mp(this, &TileMapEditorTilesPlugin::_update_selection_pattern_from_tileset_pattern_selection).unbind(1));
patterns_item_list->connect("empty_clicked", callable_mp(this, &TileMapEditorTilesPlugin::patterns_item_list_empty_clicked));
patterns_bottom_panel->add_child(patterns_item_list);
patterns_help_label = memnew(Label);
patterns_help_label->set_text(TTR("Drag and drop or paste a TileMap selection here to store a pattern."));
+ patterns_help_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
patterns_help_label->set_anchors_and_offsets_preset(Control::PRESET_CENTER);
patterns_item_list->add_child(patterns_help_label);
@@ -2349,27 +2355,27 @@ HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrain_path_o
}
HashMap<Vector2i, TileMapCell> output;
- for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E : terrain_fill_output) {
- if (painted_set.has(E.key)) {
+ for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &kv : terrain_fill_output) {
+ if (painted_set.has(kv.key)) {
// Paint a random tile with the correct terrain for the painted path.
- output[E.key] = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, E.value);
+ output[kv.key] = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, kv.value);
} else {
// Avoids updating the painted path from the output if the new pattern is the same as before.
- bool keep_old = false;
- TileMapCell cell = tile_map->get_cell(tile_map_layer, E.key);
+ TileSet::TerrainsPattern in_map_terrain_pattern = TileSet::TerrainsPattern(*tile_set, p_terrain_set);
+ TileMapCell cell = tile_map->get_cell(tile_map_layer, kv.key);
if (cell.source_id != TileSet::INVALID_SOURCE) {
TileSetSource *source = *tile_set->get_source(cell.source_id);
TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source);
if (atlas_source) {
// Get tile data.
TileData *tile_data = atlas_source->get_tile_data(cell.get_atlas_coords(), cell.alternative_tile);
- if (tile_data && tile_data->get_terrains_pattern() == E.value) {
- keep_old = true;
+ if (tile_data && tile_data->get_terrain_set() == p_terrain_set) {
+ in_map_terrain_pattern = tile_data->get_terrains_pattern();
}
}
}
- if (!keep_old) {
- output[E.key] = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, E.value);
+ if (in_map_terrain_pattern != kv.value) {
+ output[kv.key] = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, kv.value);
}
}
}
@@ -2396,24 +2402,28 @@ HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_terrain_patter
}
HashMap<Vector2i, TileMapCell> output;
- for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &E : terrain_fill_output) {
- if (painted_set.has(E.key)) {
+ for (const KeyValue<Vector2i, TileSet::TerrainsPattern> &kv : terrain_fill_output) {
+ if (painted_set.has(kv.key)) {
// Paint a random tile with the correct terrain for the painted path.
- output[E.key] = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, E.value);
+ output[kv.key] = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, kv.value);
} else {
// Avoids updating the painted path from the output if the new pattern is the same as before.
- TileMapCell cell = tile_map->get_cell(tile_map_layer, E.key);
+ TileSet::TerrainsPattern in_map_terrain_pattern = TileSet::TerrainsPattern(*tile_set, p_terrain_set);
+ TileMapCell cell = tile_map->get_cell(tile_map_layer, kv.key);
if (cell.source_id != TileSet::INVALID_SOURCE) {
TileSetSource *source = *tile_set->get_source(cell.source_id);
TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source);
if (atlas_source) {
// Get tile data.
TileData *tile_data = atlas_source->get_tile_data(cell.get_atlas_coords(), cell.alternative_tile);
- if (tile_data && !(tile_data->get_terrains_pattern() == E.value)) {
- output[E.key] = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, E.value);
+ if (tile_data && tile_data->get_terrain_set() == p_terrain_set) {
+ in_map_terrain_pattern = tile_data->get_terrains_pattern();
}
}
}
+ if (in_map_terrain_pattern != kv.value) {
+ output[kv.key] = tile_set->get_random_tile_from_terrains_pattern(p_terrain_set, kv.value);
+ }
}
}
return output;
@@ -2430,20 +2440,16 @@ HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_line(Vector2i
return HashMap<Vector2i, TileMapCell>();
}
- if (selected_type == SELECTED_TYPE_CONNECT) {
- return _draw_terrain_path_or_connect(TileMapEditor::get_line(tile_map, p_start_cell, p_end_cell), selected_terrain_set, selected_terrain, true);
- } else if (selected_type == SELECTED_TYPE_PATH) {
- return _draw_terrain_path_or_connect(TileMapEditor::get_line(tile_map, p_start_cell, p_end_cell), selected_terrain_set, selected_terrain, false);
- } else { // SELECTED_TYPE_PATTERN
- TileSet::TerrainsPattern terrains_pattern;
- if (p_erase) {
- terrains_pattern = TileSet::TerrainsPattern(*tile_set, selected_terrain_set);
- } else {
- terrains_pattern = selected_terrains_pattern;
+ if (p_erase) {
+ return _draw_terrain_pattern(TileMapEditor::get_line(tile_map, p_start_cell, p_end_cell), selected_terrain_set, TileSet::TerrainsPattern(*tile_set, selected_terrain_set));
+ } else {
+ if (selected_type == SELECTED_TYPE_CONNECT) {
+ return _draw_terrain_path_or_connect(TileMapEditor::get_line(tile_map, p_start_cell, p_end_cell), selected_terrain_set, selected_terrain, true);
+ } else if (selected_type == SELECTED_TYPE_PATH) {
+ return _draw_terrain_path_or_connect(TileMapEditor::get_line(tile_map, p_start_cell, p_end_cell), selected_terrain_set, selected_terrain, false);
+ } else { // SELECTED_TYPE_PATTERN
+ return _draw_terrain_pattern(TileMapEditor::get_line(tile_map, p_start_cell, p_end_cell), selected_terrain_set, selected_terrains_pattern);
}
-
- Vector<Vector2i> line = TileMapEditor::get_line(tile_map, p_start_cell, p_end_cell);
- return _draw_terrain_pattern(line, selected_terrain_set, terrains_pattern);
}
}
@@ -2470,16 +2476,14 @@ HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_rect(Vector2i
}
}
- if (selected_type == SELECTED_TYPE_CONNECT || selected_type == SELECTED_TYPE_PATH) {
- return _draw_terrain_path_or_connect(to_draw, selected_terrain_set, selected_terrain, true);
- } else { // SELECTED_TYPE_PATTERN
- TileSet::TerrainsPattern terrains_pattern;
- if (p_erase) {
- terrains_pattern = TileSet::TerrainsPattern(*tile_set, selected_terrain_set);
- } else {
- terrains_pattern = selected_terrains_pattern;
+ if (p_erase) {
+ return _draw_terrain_pattern(to_draw, selected_terrain_set, TileSet::TerrainsPattern(*tile_set, selected_terrain_set));
+ } else {
+ if (selected_type == SELECTED_TYPE_CONNECT || selected_type == SELECTED_TYPE_PATH) {
+ return _draw_terrain_path_or_connect(to_draw, selected_terrain_set, selected_terrain, true);
+ } else { // SELECTED_TYPE_PATTERN
+ return _draw_terrain_pattern(to_draw, selected_terrain_set, selected_terrains_pattern);
}
- return _draw_terrain_pattern(to_draw, selected_terrain_set, terrains_pattern);
}
}
@@ -2545,7 +2549,7 @@ RBSet<Vector2i> TileMapEditorTerrainsPlugin::_get_cells_for_bucket_fill(Vector2i
output.insert(coords);
// Get surrounding tiles (handles different tile shapes).
- TypedArray<Vector2i> around = tile_map->get_surrounding_tiles(coords);
+ TypedArray<Vector2i> around = tile_map->get_surrounding_cells(coords);
for (int i = 0; i < around.size(); i++) {
to_check.push_back(around[i]);
}
@@ -2611,16 +2615,14 @@ HashMap<Vector2i, TileMapCell> TileMapEditorTerrainsPlugin::_draw_bucket_fill(Ve
cells_to_draw_as_vector.append(cell);
}
- if (selected_type == SELECTED_TYPE_CONNECT || selected_type == SELECTED_TYPE_PATH) {
- return _draw_terrain_path_or_connect(cells_to_draw_as_vector, selected_terrain_set, selected_terrain, true);
- } else { // SELECTED_TYPE_PATTERN
- TileSet::TerrainsPattern terrains_pattern;
- if (p_erase) {
- terrains_pattern = TileSet::TerrainsPattern(*tile_set, selected_terrain_set);
- } else {
- terrains_pattern = selected_terrains_pattern;
+ if (p_erase) {
+ return _draw_terrain_pattern(cells_to_draw_as_vector, selected_terrain_set, TileSet::TerrainsPattern(*tile_set, selected_terrain_set));
+ } else {
+ if (selected_type == SELECTED_TYPE_CONNECT || selected_type == SELECTED_TYPE_PATH) {
+ return _draw_terrain_path_or_connect(cells_to_draw_as_vector, selected_terrain_set, selected_terrain, true);
+ } else { // SELECTED_TYPE_PATTERN
+ return _draw_terrain_pattern(cells_to_draw_as_vector, selected_terrain_set, selected_terrains_pattern);
}
- return _draw_terrain_pattern(cells_to_draw_as_vector, selected_terrain_set, terrains_pattern);
}
}
@@ -2638,6 +2640,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());
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (drag_type) {
case DRAG_TYPE_PICK: {
Vector2i coords = tile_map->local_to_map(mpos);
@@ -2871,7 +2874,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;
}
@@ -2886,14 +2889,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;
}
@@ -2978,7 +2981,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.
@@ -3028,9 +3031,9 @@ void TileMapEditorTerrainsPlugin::forward_canvas_draw_over_viewport(Control *p_o
const int fading = 5;
// Draw the lines of the grid behind the preview.
- bool display_grid = EditorSettings::get_singleton()->get("editors/tiles_editor/display_grid");
+ bool display_grid = EDITOR_GET("editors/tiles_editor/display_grid");
if (display_grid) {
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ Color grid_color = EDITOR_GET("editors/tiles_editor/grid_color");
if (drawn_grid_rect.size.x > 0 && drawn_grid_rect.size.y > 0) {
drawn_grid_rect = drawn_grid_rect.grow(fading);
for (int x = drawn_grid_rect.position.x; x < (drawn_grid_rect.position.x + drawn_grid_rect.size.x); x++) {
@@ -3200,10 +3203,10 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() {
TreeItem *selected_tree_item = terrains_tree->get_selected();
if (selected_tree_item && selected_tree_item->get_metadata(0)) {
Dictionary metadata_dict = selected_tree_item->get_metadata(0);
- int selected_terrain_set = metadata_dict["terrain_set"];
- int selected_terrain_id = metadata_dict["terrain_id"];
- ERR_FAIL_INDEX(selected_terrain_set, tile_set->get_terrain_sets_count());
- ERR_FAIL_INDEX(selected_terrain_id, tile_set->get_terrains_count(selected_terrain_set));
+ int sel_terrain_set = metadata_dict["terrain_set"];
+ int sel_terrain_id = metadata_dict["terrain_id"];
+ ERR_FAIL_INDEX(sel_terrain_set, tile_set->get_terrain_sets_count());
+ ERR_FAIL_INDEX(sel_terrain_id, tile_set->get_terrains_count(sel_terrain_set));
// Add the two first generic modes
int item_index = terrains_tile_list->add_icon_item(main_vbox_container->get_theme_icon(SNAME("TerrainConnect"), SNAME("EditorIcons")));
@@ -3221,13 +3224,13 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() {
// Sort the items in a map by the number of corresponding terrains.
RBMap<int, RBSet<TileSet::TerrainsPattern>> sorted;
- for (const TileSet::TerrainsPattern &E : per_terrain_terrains_patterns[selected_terrain_set][selected_terrain_id]) {
+ for (const TileSet::TerrainsPattern &E : per_terrain_terrains_patterns[sel_terrain_set][sel_terrain_id]) {
// Count the number of matching sides/terrains.
int count = 0;
for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
- if (tile_set->is_valid_terrain_peering_bit(selected_terrain_set, bit) && E.get_terrain_peering_bit(bit) == selected_terrain_id) {
+ if (tile_set->is_valid_terrain_peering_bit(sel_terrain_set, bit) && E.get_terrain_peering_bit(bit) == sel_terrain_id) {
count++;
}
}
@@ -3244,7 +3247,7 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() {
bool transpose = false;
double max_probability = -1.0;
- for (const TileMapCell &cell : tile_set->get_tiles_for_terrains_pattern(selected_terrain_set, terrains_pattern)) {
+ for (const TileMapCell &cell : tile_set->get_tiles_for_terrains_pattern(sel_terrain_set, terrains_pattern)) {
Ref<TileSetSource> source = tile_set->get_source(cell.source_id);
Ref<TileSetAtlasSource> atlas_source = source;
@@ -3286,7 +3289,7 @@ void TileMapEditorTerrainsPlugin::_update_tiles_list() {
void TileMapEditorTerrainsPlugin::_update_theme() {
paint_tool_button->set_icon(main_vbox_container->get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
- line_tool_button->set_icon(main_vbox_container->get_theme_icon(SNAME("CurveLinear"), SNAME("EditorIcons")));
+ line_tool_button->set_icon(main_vbox_container->get_theme_icon(SNAME("Line"), SNAME("EditorIcons")));
rect_tool_button->set_icon(main_vbox_container->get_theme_icon(SNAME("Rectangle"), SNAME("EditorIcons")));
bucket_tool_button->set_icon(main_vbox_container->get_theme_icon(SNAME("Bucket"), SNAME("EditorIcons")));
@@ -3299,17 +3302,19 @@ 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() {
- undo_redo = EditorNode::get_undo_redo();
-
main_vbox_container = memnew(VBoxContainer);
main_vbox_container->connect("tree_entered", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_theme));
main_vbox_container->connect("theme_changed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_theme));
@@ -3425,7 +3430,7 @@ void TileMapEditor::_notification(int p_what) {
warning_pattern_texture = get_theme_icon(SNAME("WarningPattern"), SNAME("EditorIcons"));
advanced_menu_button->set_icon(get_theme_icon(SNAME("Tools"), SNAME("EditorIcons")));
toggle_grid_button->set_icon(get_theme_icon(SNAME("Grid"), SNAME("EditorIcons")));
- toggle_grid_button->set_pressed(EditorSettings::get_singleton()->get("editors/tiles_editor/display_grid"));
+ toggle_grid_button->set_pressed(EDITOR_GET("editors/tiles_editor/display_grid"));
toggle_highlight_selected_layer_button->set_icon(get_theme_icon(SNAME("TileMapHighlightSelected"), SNAME("EditorIcons")));
} break;
@@ -3440,7 +3445,7 @@ void TileMapEditor::_notification(int p_what) {
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- toggle_grid_button->set_pressed(EditorSettings::get_singleton()->get("editors/tiles_editor/display_grid"));
+ toggle_grid_button->set_pressed(EDITOR_GET("editors/tiles_editor/display_grid"));
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
@@ -3483,6 +3488,7 @@ void TileMapEditor::_advanced_menu_button_id_pressed(int p_id) {
}
if (p_id == 0) { // Replace Tile Proxies
+ 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);
@@ -3677,6 +3683,7 @@ void TileMapEditor::_update_layers_selection() {
tile_map_layer = -1;
}
tile_map->set_selected_layer(toggle_highlight_selected_layer_button->is_pressed() ? tile_map_layer : -1);
+ tileset_changed_needs_update = false; // Update is not needed here and actually causes problems.
layers_selection_button->clear();
if (tile_map->get_layers_count() > 0) {
@@ -3698,8 +3705,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 = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
- ERR_FAIL_COND(undo_redo.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) {
@@ -3730,12 +3737,12 @@ void TileMapEditor::_move_tile_map_array_element(Object *p_undo_redo, Object *p_
end = MIN(MAX(p_from_index, p_to_pos) + 1, end);
}
-#define ADD_UNDO(obj, property) undo_redo->add_undo_property(obj, property, obj->get(property));
+#define ADD_UNDO(obj, property) undo_redo_man->add_undo_property(obj, property, obj->get(property));
// Save layers' properties.
if (p_from_index < 0) {
- undo_redo->add_undo_method(tile_map, "remove_layer", p_to_pos < 0 ? tile_map->get_layers_count() : p_to_pos);
+ undo_redo_man->add_undo_method(tile_map, "remove_layer", p_to_pos < 0 ? tile_map->get_layers_count() : p_to_pos);
} else if (p_to_pos < 0) {
- undo_redo->add_undo_method(tile_map, "add_layer", p_from_index);
+ undo_redo_man->add_undo_method(tile_map, "add_layer", p_from_index);
}
List<PropertyInfo> properties;
@@ -3761,11 +3768,11 @@ void TileMapEditor::_move_tile_map_array_element(Object *p_undo_redo, Object *p_
#undef ADD_UNDO
if (p_from_index < 0) {
- undo_redo->add_do_method(tile_map, "add_layer", p_to_pos);
+ undo_redo_man->add_do_method(tile_map, "add_layer", p_to_pos);
} else if (p_to_pos < 0) {
- undo_redo->add_do_method(tile_map, "remove_layer", p_from_index);
+ undo_redo_man->add_do_method(tile_map, "remove_layer", p_from_index);
} else {
- undo_redo->add_do_method(tile_map, "move_layer", p_from_index, p_to_pos);
+ undo_redo_man->add_do_method(tile_map, "move_layer", p_from_index, p_to_pos);
}
}
@@ -3882,9 +3889,9 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
}
// Draw the grid.
- bool display_grid = EditorSettings::get_singleton()->get("editors/tiles_editor/display_grid");
+ bool display_grid = EDITOR_GET("editors/tiles_editor/display_grid");
if (display_grid) {
- Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
+ Color grid_color = EDITOR_GET("editors/tiles_editor/grid_color");
for (int x = displayed_rect.position.x; x < (displayed_rect.position.x + displayed_rect.size.x); x++) {
for (int y = displayed_rect.position.y; y < (displayed_rect.position.y + displayed_rect.size.y); y++) {
Vector2i pos_in_rect = Vector2i(x, y) - displayed_rect.position;
@@ -3955,8 +3962,6 @@ void TileMapEditor::edit(TileMap *p_tile_map) {
}
TileMapEditor::TileMapEditor() {
- undo_redo = EditorNode::get_undo_redo();
-
set_process_internal(true);
// Shortcuts.
diff --git a/editor/plugins/tiles/tile_map_editor.h b/editor/plugins/tiles/tile_map_editor.h
index 9a47d8bbc4..fb9c2f3689 100644
--- a/editor/plugins/tiles/tile_map_editor.h
+++ b/editor/plugins/tiles/tile_map_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_map_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_map_editor.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 TILE_MAP_EDITOR_H
#define TILE_MAP_EDITOR_H
@@ -47,8 +47,6 @@
#include "scene/gui/tab_bar.h"
#include "scene/gui/tree.h"
-class EditorUndoRedoManager;
-
class TileMapEditorPlugin : public Object {
public:
struct TabData {
@@ -70,7 +68,6 @@ class TileMapEditorTilesPlugin : public TileMapEditorPlugin {
GDCLASS(TileMapEditorTilesPlugin, TileMapEditorPlugin);
private:
- Ref<EditorUndoRedoManager> undo_redo;
ObjectID tile_map_id;
int tile_map_layer = -1;
virtual void edit(ObjectID p_tile_map_id, int p_tile_map_layer) override;
@@ -94,6 +91,8 @@ private:
VSeparator *tools_settings_vsep_2 = nullptr;
CheckBox *bucket_contiguous_checkbox = nullptr;
Button *random_tile_toggle = nullptr;
+
+ HBoxContainer *scatter_controls_container = nullptr;
float scattering = 0.0;
Label *scatter_label = nullptr;
SpinBox *scatter_spinbox = nullptr;
@@ -223,7 +222,6 @@ class TileMapEditorTerrainsPlugin : public TileMapEditorPlugin {
GDCLASS(TileMapEditorTerrainsPlugin, TileMapEditorPlugin);
private:
- Ref<EditorUndoRedoManager> undo_redo;
ObjectID tile_map_id;
int tile_map_layer = -1;
virtual void edit(ObjectID p_tile_map_id, int p_tile_map_layer) override;
@@ -317,7 +315,6 @@ class TileMapEditor : public VBoxContainer {
GDCLASS(TileMapEditor, VBoxContainer);
private:
- Ref<EditorUndoRedoManager> undo_redo;
bool tileset_changed_needs_update = false;
ObjectID tile_map_id;
int tile_map_layer = -1;
diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
index 9e4c29fa79..f6aeffa13f 100644
--- a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
+++ b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
@@ -1,40 +1,43 @@
-/*************************************************************************/
-/* tile_proxies_manager_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_proxies_manager_dialog.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 "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, Object *p_item_list, MouseButton p_mouse_button_index) {
+void TileProxiesManagerDialog::_right_clicked(int p_item, Vector2 p_local_mouse_pos, MouseButton p_mouse_button_index, Object *p_item_list) {
if (p_mouse_button_index != MouseButton::RIGHT) {
return;
}
@@ -53,6 +56,7 @@ void TileProxiesManagerDialog::_menu_id_pressed(int p_id) {
}
void TileProxiesManagerDialog::_delete_selected_bindings() {
+ 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();
@@ -74,7 +78,7 @@ void TileProxiesManagerDialog::_delete_selected_bindings() {
Vector<int> alternative_level_selected = alternative_level_list->get_selected_items();
for (int i = 0; i < alternative_level_selected.size(); i++) {
Array key = alternative_level_list->get_item_metadata(alternative_level_selected[i]);
- Array val = tile_set->get_coords_level_tile_proxy(key[0], key[1]);
+ Array val = tile_set->get_alternative_level_tile_proxy(key[0], key[1], key[2]);
undo_redo->add_do_method(*tile_set, "remove_alternative_level_tile_proxy", key[0], key[1], key[2]);
undo_redo->add_undo_method(*tile_set, "set_alternative_level_tile_proxy", key[0], key[1], key[2], val[0], val[1], val[2]);
}
@@ -152,6 +156,7 @@ void TileProxiesManagerDialog::_property_changed(const String &p_path, const Var
}
void TileProxiesManagerDialog::_add_button_pressed() {
+ 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();
@@ -192,6 +197,7 @@ void TileProxiesManagerDialog::_add_button_pressed() {
}
void TileProxiesManagerDialog::_clear_invalid_button_pressed() {
+ 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");
@@ -219,6 +225,7 @@ void TileProxiesManagerDialog::_clear_invalid_button_pressed() {
}
void TileProxiesManagerDialog::_clear_all_button_pressed() {
+ 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");
@@ -299,6 +306,7 @@ void TileProxiesManagerDialog::_unhandled_key_input(Ref<InputEvent> p_event) {
}
void TileProxiesManagerDialog::cancel_pressed() {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (int i = 0; i < commited_actions_count; i++) {
undo_redo->undo();
}
@@ -318,8 +326,6 @@ void TileProxiesManagerDialog::update_tile_set(Ref<TileSet> p_tile_set) {
}
TileProxiesManagerDialog::TileProxiesManagerDialog() {
- undo_redo = EditorNode::get_singleton()->get_undo_redo();
-
// Tile proxy management window.
set_title(TTR("Tile Proxies Management"));
set_process_unhandled_key_input(true);
@@ -393,7 +399,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
source_from_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
source_from_property_editor->set_selectable(false);
source_from_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- source_from_property_editor->setup(-1, 99999, 1, true, false);
+ source_from_property_editor->setup(-1, 99999, 1, false, true, false);
vboxcontainer_from->add_child(source_from_property_editor);
coords_from_property_editor = memnew(EditorPropertyVector2i);
@@ -412,7 +418,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
alternative_from_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
alternative_from_property_editor->set_selectable(false);
alternative_from_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- alternative_from_property_editor->setup(-1, 99999, 1, true, false);
+ alternative_from_property_editor->setup(-1, 99999, 1, false, true, false);
alternative_from_property_editor->hide();
vboxcontainer_from->add_child(alternative_from_property_editor);
@@ -427,7 +433,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
source_to_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
source_to_property_editor->set_selectable(false);
source_to_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- source_to_property_editor->setup(-1, 99999, 1, true, false);
+ source_to_property_editor->setup(-1, 99999, 1, false, true, false);
vboxcontainer_to->add_child(source_to_property_editor);
coords_to_property_editor = memnew(EditorPropertyVector2i);
@@ -446,7 +452,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
alternative_to_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
alternative_to_property_editor->set_selectable(false);
alternative_to_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- alternative_to_property_editor->setup(-1, 99999, 1, true, false);
+ alternative_to_property_editor->setup(-1, 99999, 1, false, true, false);
alternative_to_property_editor->hide();
vboxcontainer_to->add_child(alternative_to_property_editor);
diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.h b/editor/plugins/tiles/tile_proxies_manager_dialog.h
index 511e442a10..9fcdea8db9 100644
--- a/editor/plugins/tiles/tile_proxies_manager_dialog.h
+++ b/editor/plugins/tiles/tile_proxies_manager_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_proxies_manager_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_proxies_manager_dialog.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 TILE_PROXIES_MANAGER_DIALOG_H
#define TILE_PROXIES_MANAGER_DIALOG_H
@@ -36,6 +36,8 @@
#include "scene/gui/dialogs.h"
#include "scene/gui/item_list.h"
+class EditorUndoRedoManager;
+
class TileProxiesManagerDialog : public ConfirmationDialog {
GDCLASS(TileProxiesManagerDialog, ConfirmationDialog);
@@ -43,8 +45,6 @@ private:
int commited_actions_count = 0;
Ref<TileSet> tile_set;
- Ref<EditorUndoRedoManager> undo_redo;
-
TileMapCell from;
TileMapCell to;
@@ -61,7 +61,7 @@ private:
EditorPropertyInteger *alternative_to_property_editor = nullptr;
PopupMenu *popup_menu = nullptr;
- void _right_clicked(int p_item, Vector2 p_local_mouse_pos, Object *p_item_list, MouseButton p_mouse_button_index);
+ void _right_clicked(int p_item, Vector2 p_local_mouse_pos, MouseButton p_mouse_button_index, Object *p_item_list);
void _menu_id_pressed(int p_id);
void _delete_selected_bindings();
void _update_lists();
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index 228e475083..32421daa92 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -1,42 +1,44 @@
-/*************************************************************************/
-/* tile_set_atlas_source_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_set_atlas_source_editor.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 "tile_set_atlas_source_editor.h"
#include "tiles_editor_plugin.h"
#include "editor/editor_inspector.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
#include "editor/progress_dialog.h"
-#include "editor/editor_node.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/control.h"
@@ -62,11 +64,15 @@ void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::set_id(int p_id) {
emit_signal(SNAME("changed"), "id");
}
-int TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::get_id() {
+int TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::get_id() const {
return source_id;
}
bool TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_set(const StringName &p_name, const Variant &p_value) {
+ if (p_name == "id") {
+ set_id(p_value);
+ return true;
+ }
String name = p_name;
if (name == "name") {
// Use the resource_name property to store the source's name.
@@ -84,6 +90,10 @@ bool TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get(const StringN
if (!tile_set_atlas_source) {
return false;
}
+ if (p_name == "id") {
+ r_ret = get_id();
+ return true;
+ }
String name = p_name;
if (name == "name") {
// Use the resource_name property to store the source's name.
@@ -95,21 +105,17 @@ bool TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get(const StringN
}
void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get_property_list(List<PropertyInfo> *p_list) const {
+ p_list->push_back(PropertyInfo(Variant::NIL, TTR("Atlas"), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY));
+ p_list->push_back(PropertyInfo(Variant::INT, "id", PROPERTY_HINT_RANGE, "0," + itos(INT_MAX) + ",1"));
p_list->push_back(PropertyInfo(Variant::STRING, "name", PROPERTY_HINT_NONE, ""));
p_list->push_back(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"));
p_list->push_back(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, "suffix:px"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, "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, ""));
}
void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_bind_methods() {
- // -- Shape and layout --
- ClassDB::bind_method(D_METHOD("set_id", "id"), &TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::set_id);
- ClassDB::bind_method(D_METHOD("get_id"), &TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::get_id);
-
- ADD_PROPERTY(PropertyInfo(Variant::INT, "id", PROPERTY_HINT_RANGE, "0," + itos(INT_MAX) + ",1"), "set_id", "get_id");
-
ADD_SIGNAL(MethodInfo("changed", PropertyInfo(Variant::STRING, "what")));
}
@@ -150,7 +156,7 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
// ID and size related properties.
if (tiles.size() == 1) {
- const Vector2i &coords = tiles.front()->get().tile;
+ const Vector2i coords = tiles.front()->get().tile;
const int &alternative = tiles.front()->get().alternative;
if (alternative == 0) {
@@ -158,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();
@@ -217,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);
}
@@ -228,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);
}
@@ -243,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();
@@ -381,11 +392,15 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro
// ID and size related properties.
if (tiles.size() == 1) {
if (tiles.front()->get().alternative == 0) {
- p_list->push_back(PropertyInfo(Variant::VECTOR2I, "atlas_coords", PROPERTY_HINT_NONE, ""));
- p_list->push_back(PropertyInfo(Variant::VECTOR2I, "size_in_atlas", PROPERTY_HINT_NONE, ""));
+ p_list->push_back(PropertyInfo(Variant::NIL, TTR("Base Tile"), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "atlas_coords"));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "size_in_atlas"));
} else {
- p_list->push_back(PropertyInfo(Variant::INT, "alternative_id", PROPERTY_HINT_NONE, ""));
+ p_list->push_back(PropertyInfo(Variant::NIL, TTR("Alternative Tile"), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY));
+ p_list->push_back(PropertyInfo(Variant::INT, "alternative_id"));
}
+ } else {
+ p_list->push_back(PropertyInfo(Variant::NIL, TTR("Tiles"), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY));
}
// Animation.
@@ -401,7 +416,7 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro
if (all_alternatve_id_zero) {
p_list->push_back(PropertyInfo(Variant::NIL, "Animation", PROPERTY_HINT_NONE, "animation_", PROPERTY_USAGE_GROUP));
p_list->push_back(PropertyInfo(Variant::INT, "animation_columns", PROPERTY_HINT_NONE, ""));
- p_list->push_back(PropertyInfo(Variant::VECTOR2I, "animation_separation", PROPERTY_HINT_NONE, "suffix:px"));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "animation_separation", PROPERTY_HINT_NONE, ""));
p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_speed", PROPERTY_HINT_NONE, ""));
p_list->push_back(PropertyInfo(Variant::INT, "animation_frames_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, "Frames,animation_frame_"));
// Not optimal, but returns value for the first tile. This is similar to what MultiNodeEdit does.
@@ -441,6 +456,11 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro
HashMap<String, int> counts; // Counts the number of time a property appears (useful for groups that may appear more than once)
for (List<PropertyInfo>::Element *E_property = list.front(); E_property; E_property = E_property->next()) {
+ // Don't show category for TileData.
+ if (E_property->get().usage & PROPERTY_USAGE_CATEGORY) {
+ continue;
+ }
+
const String &property_string = E_property->get().name;
if (!tile_data->is_allowing_transform() && (property_string == "flip_h" || property_string == "flip_v" || property_string == "transpose")) {
continue;
@@ -541,11 +561,13 @@ void TileSetAtlasSourceEditor::_update_source_inspector() {
void TileSetAtlasSourceEditor::_update_fix_selected_and_hovered_tiles() {
// Fix selected.
- for (RBSet<TileSelection>::Element *E = selection.front(); E; E = E->next()) {
+ for (RBSet<TileSelection>::Element *E = selection.front(); E;) {
+ RBSet<TileSelection>::Element *N = E->next();
TileSelection selected = E->get();
if (!tile_set_atlas_source->has_tile(selected.tile) || !tile_set_atlas_source->has_alternative_tile(selected.tile, selected.alternative)) {
selection.erase(E);
}
+ E = N;
}
// Fix hovered.
@@ -561,9 +583,8 @@ void TileSetAtlasSourceEditor::_update_fix_selected_and_hovered_tiles() {
void TileSetAtlasSourceEditor::_update_atlas_source_inspector() {
// Update visibility.
- bool visible = tools_button_group->get_pressed_button() == tool_setup_atlas_source_button;
- atlas_source_inspector_label->set_visible(visible);
- atlas_source_inspector->set_visible(visible);
+ bool inspector_visible = tools_button_group->get_pressed_button() == tool_setup_atlas_source_button;
+ atlas_source_inspector->set_visible(inspector_visible);
}
void TileSetAtlasSourceEditor::_update_tile_inspector() {
@@ -572,11 +593,9 @@ void TileSetAtlasSourceEditor::_update_tile_inspector() {
if (!selection.is_empty()) {
tile_proxy_object->edit(tile_set_atlas_source, selection);
}
- tile_inspector_label->show();
tile_inspector->set_visible(!selection.is_empty());
tile_inspector_no_tile_selected_label->set_visible(selection.is_empty());
} else {
- tile_inspector_label->hide();
tile_inspector->hide();
tile_inspector_no_tile_selected_label->hide();
}
@@ -671,7 +690,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
}
}
for (int i = tile_set->get_occlusion_layers_count(); tile_data_editors.has(vformat("occlusion_layer_%d", i)); i++) {
- tile_data_editors[vformat("occlusion_layer_%d", i)]->queue_delete();
+ tile_data_editors[vformat("occlusion_layer_%d", i)]->queue_free();
tile_data_editors.erase(vformat("occlusion_layer_%d", i));
}
@@ -710,7 +729,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
}
}
for (int i = tile_set->get_physics_layers_count(); tile_data_editors.has(vformat("physics_layer_%d", i)); i++) {
- tile_data_editors[vformat("physics_layer_%d", i)]->queue_delete();
+ tile_data_editors[vformat("physics_layer_%d", i)]->queue_free();
tile_data_editors.erase(vformat("physics_layer_%d", i));
}
@@ -728,29 +747,40 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
}
}
for (int i = tile_set->get_navigation_layers_count(); tile_data_editors.has(vformat("navigation_layer_%d", i)); i++) {
- tile_data_editors[vformat("navigation_layer_%d", i)]->queue_delete();
+ tile_data_editors[vformat("navigation_layer_%d", i)]->queue_free();
tile_data_editors.erase(vformat("navigation_layer_%d", i));
}
// --- Custom Data ---
ADD_TILE_DATA_EDITOR_GROUP("Custom Data");
for (int i = 0; i < tile_set->get_custom_data_layers_count(); i++) {
- if (tile_set->get_custom_data_layer_name(i).is_empty()) {
- ADD_TILE_DATA_EDITOR(group, vformat("Custom Data %d", i), vformat("custom_data_%d", i));
+ String editor_name = vformat("custom_data_%d", i);
+ String prop_name = tile_set->get_custom_data_layer_name(i);
+ Variant::Type prop_type = tile_set->get_custom_data_layer_type(i);
+
+ if (prop_name.is_empty()) {
+ ADD_TILE_DATA_EDITOR(group, vformat("Custom Data %d", i), editor_name);
} else {
- ADD_TILE_DATA_EDITOR(group, tile_set->get_custom_data_layer_name(i), vformat("custom_data_%d", i));
+ ADD_TILE_DATA_EDITOR(group, prop_name, editor_name);
}
- if (!tile_data_editors.has(vformat("custom_data_%d", i))) {
+
+ // If the type of the edited property has been changed, delete the
+ // editor and create a new one.
+ if (tile_data_editors.has(editor_name) && ((TileDataDefaultEditor *)tile_data_editors[editor_name])->get_property_type() != prop_type) {
+ tile_data_editors[vformat("custom_data_%d", i)]->queue_free();
+ tile_data_editors.erase(vformat("custom_data_%d", i));
+ }
+ if (!tile_data_editors.has(editor_name)) {
TileDataDefaultEditor *tile_data_custom_data_editor = memnew(TileDataDefaultEditor());
tile_data_custom_data_editor->hide();
- tile_data_custom_data_editor->setup_property_editor(tile_set->get_custom_data_layer_type(i), vformat("custom_data_%d", i), tile_set->get_custom_data_layer_name(i));
+ tile_data_custom_data_editor->setup_property_editor(prop_type, editor_name, prop_name);
tile_data_custom_data_editor->connect("needs_redraw", callable_mp((CanvasItem *)tile_atlas_control_unscaled, &Control::queue_redraw));
tile_data_custom_data_editor->connect("needs_redraw", callable_mp((CanvasItem *)alternative_tiles_control_unscaled, &Control::queue_redraw));
- tile_data_editors[vformat("custom_data_%d", i)] = tile_data_custom_data_editor;
+ tile_data_editors[editor_name] = tile_data_custom_data_editor;
}
}
for (int i = tile_set->get_custom_data_layers_count(); tile_data_editors.has(vformat("custom_data_%d", i)); i++) {
- tile_data_editors[vformat("custom_data_%d", i)]->queue_delete();
+ tile_data_editors[vformat("custom_data_%d", i)]->queue_free();
tile_data_editors.erase(vformat("custom_data_%d", i));
}
@@ -782,7 +812,7 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
} else {
tile_data_editor_dropdown_button->set_text(TTR("Select a property editor"));
}
- tile_data_editors_label->set_visible(is_visible);
+ tile_data_editors_scroll->set_visible(is_visible);
}
void TileSetAtlasSourceEditor::_update_current_tile_data_editor() {
@@ -884,7 +914,7 @@ void TileSetAtlasSourceEditor::_update_atlas_view() {
// Create a bunch of buttons to add alternative tiles.
for (int i = 0; i < alternative_tiles_control->get_child_count(); i++) {
- alternative_tiles_control->get_child(i)->queue_delete();
+ alternative_tiles_control->get_child(i)->queue_free();
}
Vector2i pos;
@@ -939,21 +969,18 @@ void TileSetAtlasSourceEditor::_update_toolbar() {
if (current_tile_data_editor_toolbar) {
current_tile_data_editor_toolbar->hide();
}
- tool_settings_vsep->show();
tools_settings_erase_button->show();
tool_advanced_menu_buttom->show();
} else if (tools_button_group->get_pressed_button() == tool_select_button) {
if (current_tile_data_editor_toolbar) {
current_tile_data_editor_toolbar->hide();
}
- tool_settings_vsep->hide();
tools_settings_erase_button->hide();
tool_advanced_menu_buttom->hide();
} else if (tools_button_group->get_pressed_button() == tool_paint_button) {
if (current_tile_data_editor_toolbar) {
current_tile_data_editor_toolbar->show();
}
- tool_settings_vsep->hide();
tools_settings_erase_button->hide();
tool_advanced_menu_buttom->hide();
}
@@ -993,44 +1020,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));
@@ -1075,7 +1071,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();
@@ -1221,7 +1216,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);
@@ -1235,7 +1229,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)) {
@@ -1244,10 +1237,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);
}
}
@@ -1270,7 +1261,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;
@@ -1310,6 +1300,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
}
void TileSetAtlasSourceEditor::_end_dragging() {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
switch (drag_type) {
case DRAG_TYPE_CREATE_TILES:
undo_redo->create_action(TTR("Create tiles"));
@@ -1347,8 +1338,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"));
@@ -1364,8 +1355,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;
@@ -1415,8 +1406,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);
@@ -1486,12 +1477,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:
@@ -1520,7 +1511,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) {
@@ -1540,6 +1591,8 @@ HashMap<Vector2i, List<const PropertyInfo *>> TileSetAtlasSourceEditor::_group_p
}
void TileSetAtlasSourceEditor::_menu_option(int p_option) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+
switch (p_option) {
case TILE_DELETE: {
List<PropertyInfo> list;
@@ -1666,10 +1719,6 @@ Array TileSetAtlasSourceEditor::_get_selection_as_array() {
}
void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
- // Colors.
- Color grid_color = EditorSettings::get_singleton()->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);
-
// Draw the selected tile.
if (tools_button_group->get_pressed_button() == tool_select_button) {
for (const TileSelection &E : selection) {
@@ -1677,12 +1726,9 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
if (selected.alternative == 0) {
// Draw the rect.
for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(selected.tile); frame++) {
- Color color = selection_color;
- if (frame > 0) {
- color.a *= 0.3;
- }
+ Color color = Color(0.0, 1.0, 0.0, frame == 0 ? 1.0 : 0.3);
Rect2 region = tile_set_atlas_source->get_tile_texture_region(selected.tile, frame);
- tile_atlas_control->draw_rect(region, color, false);
+ TilesEditorPlugin::draw_selection_rect(tile_atlas_control, region, color);
}
}
}
@@ -1724,19 +1770,19 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
// Draw the tiles to be removed.
for (const Vector2i &E : drag_modified_tiles) {
for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(E); frame++) {
- tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(E, frame), Color(0.0, 0.0, 0.0), false);
+ TilesEditorPlugin::draw_selection_rect(tile_atlas_control, tile_set_atlas_source->get_tile_texture_region(E, frame), Color(0.0, 0.0, 0.0));
}
}
} 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()));
Color color = Color(0.0, 0.0, 0.0);
if (drag_type == DRAG_TYPE_RECT_SELECT) {
- color = selection_color.lightened(0.2);
+ color = Color(1.0, 1.0, 0.0);
}
RBSet<Vector2i> to_paint;
@@ -1751,7 +1797,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
for (const Vector2i &E : to_paint) {
Vector2i coords = E;
- tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(coords), color, false);
+ TilesEditorPlugin::draw_selection_rect(tile_atlas_control, tile_set_atlas_source->get_tile_texture_region(coords), color);
}
} else if (drag_type == DRAG_TYPE_CREATE_TILES_USING_RECT) {
// Draw tiles to be created.
@@ -1759,8 +1805,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++) {
@@ -1768,7 +1814,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
Vector2i coords = Vector2i(x, y);
if (tile_set_atlas_source->get_tile_at_coords(coords) == TileSetSource::INVALID_ATLAS_COORDS) {
Vector2i origin = margins + (coords * (tile_size + separation));
- tile_atlas_control->draw_rect(Rect2i(origin, tile_size), Color(1.0, 1.0, 1.0), false);
+ TilesEditorPlugin::draw_selection_rect(tile_atlas_control, Rect2i(origin, tile_size));
}
}
}
@@ -1777,15 +1823,15 @@ 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();
Vector2i separation = tile_set_atlas_source->get_separation();
Vector2i tile_size = tile_set_atlas_source->get_texture_region_size();
Vector2i origin = margins + (area.position * (tile_size + separation));
- tile_atlas_control->draw_rect(Rect2i(origin, area.size * tile_size), Color(1.0, 1.0, 1.0), false);
+ TilesEditorPlugin::draw_selection_rect(tile_atlas_control, Rect2i(origin, area.size * tile_size));
} else {
Vector2i grid_size = tile_set_atlas_source->get_atlas_grid_size();
if (hovered_base_tile_coords.x >= 0 && hovered_base_tile_coords.y >= 0 && hovered_base_tile_coords.x < grid_size.x && hovered_base_tile_coords.y < grid_size.y) {
@@ -1793,11 +1839,8 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
if (hovered_tile != TileSetSource::INVALID_ATLAS_COORDS) {
// Draw existing hovered tile.
for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(hovered_tile); frame++) {
- Color color = Color(1.0, 1.0, 1.0);
- if (frame > 0) {
- color.a *= 0.3;
- }
- tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(hovered_tile, frame), color, false);
+ Color color = Color(1.0, 0.8, 0.0, frame == 0 ? 0.6 : 0.3);
+ TilesEditorPlugin::draw_selection_rect(tile_atlas_control, tile_set_atlas_source->get_tile_texture_region(hovered_tile, frame), color);
}
} else {
// Draw empty tile, only in add/remove tiles mode.
@@ -1806,7 +1849,7 @@ 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 origin = margins + (hovered_base_tile_coords * (tile_size + separation));
- tile_atlas_control->draw_rect(Rect2i(origin, tile_size), Color(1.0, 1.0, 1.0), false);
+ TilesEditorPlugin::draw_selection_rect(tile_atlas_control, Rect2i(origin, tile_size));
}
}
}
@@ -1935,7 +1978,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()));
}
}
@@ -1958,9 +2001,6 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_mouse_exited() {
}
void TileSetAtlasSourceEditor::_tile_alternatives_control_draw() {
- Color grid_color = EditorSettings::get_singleton()->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);
-
// Update the hovered alternative tile.
if (tools_button_group->get_pressed_button() == tool_select_button) {
// Draw hovered tile.
@@ -1968,7 +2008,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_draw() {
if (coords != TileSetSource::INVALID_ATLAS_COORDS) {
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(coords, hovered_alternative_tile_coords.z);
if (rect != Rect2i()) {
- alternative_tiles_control->draw_rect(rect, Color(1.0, 1.0, 1.0), false);
+ TilesEditorPlugin::draw_selection_rect(alternative_tiles_control, rect, Color(1.0, 0.8, 0.0, 0.5));
}
}
@@ -1978,7 +2018,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_draw() {
if (selected.alternative >= 1) {
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(selected.tile, selected.alternative);
if (rect != Rect2i()) {
- alternative_tiles_control->draw_rect(rect, selection_color, false);
+ TilesEditorPlugin::draw_selection_rect(alternative_tiles_control, rect);
}
}
}
@@ -1997,7 +2037,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();
+ Vector2 position = rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
xform.translate_local(position);
@@ -2021,7 +2061,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();
+ Vector2 position = rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(E.tile, E.alternative);
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
xform.translate_local(position);
@@ -2043,6 +2083,13 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
}
void TileSetAtlasSourceEditor::_tile_set_changed() {
+ if (tile_set->get_source_count() == 0) {
+ // No sources, so nothing to do here anymore.
+ tile_set->disconnect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_set_changed));
+ tile_set = Ref<TileSet>();
+ return;
+ }
+
tile_set_changed_needs_update = true;
}
@@ -2060,14 +2107,14 @@ 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 = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
- ERR_FAIL_COND(!undo_redo.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->add_undo_property(obj, property, obj->get(property));
+#define ADD_UNDO(obj, property) undo_redo_man->add_undo_property(obj, property, obj->get(property));
AtlasTileProxyObject *tile_data_proxy = Object::cast_to<AtlasTileProxyObject>(p_edited);
if (tile_data_proxy) {
- UndoRedo *internal_undo_redo = undo_redo->get_history_for_object(tile_data_proxy).undo_redo;
+ UndoRedo *internal_undo_redo = undo_redo_man->get_history_for_object(tile_data_proxy).undo_redo;
internal_undo_redo->start_force_keep_in_merge_ends();
Vector<String> components = String(p_property).split("/", true, 2);
@@ -2100,7 +2147,7 @@ void TileSetAtlasSourceEditor::_undo_redo_inspector_callback(Object *p_undo_redo
TileSetAtlasSource *atlas_source = atlas_source_proxy->get_edited();
ERR_FAIL_COND(!atlas_source);
- UndoRedo *internal_undo_redo = undo_redo->get_history_for_object(atlas_source).undo_redo;
+ UndoRedo *internal_undo_redo = undo_redo_man->get_history_for_object(atlas_source).undo_redo;
internal_undo_redo->start_force_keep_in_merge_ends();
PackedVector2Array arr;
@@ -2191,6 +2238,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();
+ 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++) {
@@ -2236,6 +2284,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();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove tiles in fully transparent texture regions"));
List<PropertyInfo> list;
@@ -2318,6 +2367,15 @@ void TileSetAtlasSourceEditor::_notification(int p_what) {
tile_set_changed_needs_update = false;
}
} break;
+
+ case NOTIFICATION_EXIT_TREE: {
+ for (KeyValue<String, TileDataEditor *> &E : tile_data_editors) {
+ Control *toolbar = E.value->get_toolbar();
+ if (toolbar->get_parent() == tool_settings_tile_data_toolbar_container) {
+ tool_settings_tile_data_toolbar_container->remove_child(toolbar);
+ }
+ }
+ } break;
}
}
@@ -2329,60 +2387,93 @@ void TileSetAtlasSourceEditor::_bind_methods() {
}
TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
- undo_redo = EditorNode::get_undo_redo();
-
set_process_unhandled_key_input(true);
set_process_internal(true);
- // -- Right side --
- HSplitContainer *split_container_right_side = memnew(HSplitContainer);
- split_container_right_side->set_h_size_flags(SIZE_EXPAND_FILL);
- add_child(split_container_right_side);
-
// Middle panel.
- ScrollContainer *middle_panel = memnew(ScrollContainer);
- middle_panel->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
- middle_panel->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
- split_container_right_side->add_child(middle_panel);
-
VBoxContainer *middle_vbox_container = memnew(VBoxContainer);
- middle_vbox_container->set_h_size_flags(SIZE_EXPAND_FILL);
- middle_panel->add_child(middle_vbox_container);
+ middle_vbox_container->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
+ add_child(middle_vbox_container);
- // Tile inspector.
- tile_inspector_label = memnew(Label);
- tile_inspector_label->set_text(TTR("Tile Properties:"));
- tile_inspector_label->set_theme_type_variation("HeaderSmall");
- middle_vbox_container->add_child(tile_inspector_label);
+ // -- Toolbox --
+ tools_button_group.instantiate();
+ tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_fix_selected_and_hovered_tiles).unbind(1));
+ tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_tile_id_label).unbind(1));
+ tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_atlas_source_inspector).unbind(1));
+ tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_tile_inspector).unbind(1));
+ tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_tile_data_editors).unbind(1));
+ tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_current_tile_data_editor).unbind(1));
+ tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_atlas_view).unbind(1));
+ tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_toolbar).unbind(1));
+
+ HBoxContainer *toolbox = memnew(HBoxContainer);
+ middle_vbox_container->add_child(toolbox);
+
+ tool_setup_atlas_source_button = memnew(Button);
+ tool_setup_atlas_source_button->set_text(TTR("Setup"));
+ tool_setup_atlas_source_button->set_flat(true);
+ tool_setup_atlas_source_button->set_toggle_mode(true);
+ tool_setup_atlas_source_button->set_pressed(true);
+ tool_setup_atlas_source_button->set_button_group(tools_button_group);
+ tool_setup_atlas_source_button->set_tooltip_text(TTR("Atlas setup. Add/Remove tiles tool (use the shift key to create big tiles, control for rectangle editing)."));
+ toolbox->add_child(tool_setup_atlas_source_button);
+
+ tool_select_button = memnew(Button);
+ tool_select_button->set_text(TTR("Select"));
+ tool_select_button->set_flat(true);
+ tool_select_button->set_toggle_mode(true);
+ tool_select_button->set_pressed(false);
+ tool_select_button->set_button_group(tools_button_group);
+ tool_select_button->set_tooltip_text(TTR("Select tiles."));
+ toolbox->add_child(tool_select_button);
+ tool_paint_button = memnew(Button);
+ tool_paint_button->set_text(TTR("Paint"));
+ tool_paint_button->set_flat(true);
+ tool_paint_button->set_toggle_mode(true);
+ tool_paint_button->set_button_group(tools_button_group);
+ tool_paint_button->set_tooltip_text(TTR("Paint properties."));
+ toolbox->add_child(tool_paint_button);
+
+ // Tile inspector.
tile_proxy_object = memnew(AtlasTileProxyObject(this));
tile_proxy_object->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_proxy_object_changed));
tile_inspector = memnew(EditorInspector);
- tile_inspector->set_undo_redo(undo_redo);
- tile_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
+ tile_inspector->set_v_size_flags(SIZE_EXPAND_FILL);
+ tile_inspector->set_show_categories(true);
tile_inspector->edit(tile_proxy_object);
tile_inspector->set_use_folding(true);
tile_inspector->connect("property_selected", callable_mp(this, &TileSetAtlasSourceEditor::_inspector_property_selected));
middle_vbox_container->add_child(tile_inspector);
tile_inspector_no_tile_selected_label = memnew(Label);
+ tile_inspector_no_tile_selected_label->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
tile_inspector_no_tile_selected_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
tile_inspector_no_tile_selected_label->set_text(TTR("No tiles selected."));
middle_vbox_container->add_child(tile_inspector_no_tile_selected_label);
// Property values palette.
+ tile_data_editors_scroll = memnew(ScrollContainer);
+ tile_data_editors_scroll->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
+ tile_data_editors_scroll->set_v_size_flags(SIZE_EXPAND_FILL);
+ middle_vbox_container->add_child(tile_data_editors_scroll);
+
+ VBoxContainer *tile_data_editors_vbox = memnew(VBoxContainer);
+ tile_data_editors_vbox->set_h_size_flags(SIZE_EXPAND_FILL);
+ tile_data_editors_scroll->add_child(tile_data_editors_vbox);
+
tile_data_editors_popup = memnew(Popup);
tile_data_editors_label = memnew(Label);
tile_data_editors_label->set_text(TTR("Paint Properties:"));
tile_data_editors_label->set_theme_type_variation("HeaderSmall");
- middle_vbox_container->add_child(tile_data_editors_label);
+ tile_data_editors_vbox->add_child(tile_data_editors_label);
tile_data_editor_dropdown_button = memnew(Button);
tile_data_editor_dropdown_button->connect("draw", callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editor_dropdown_button_draw));
tile_data_editor_dropdown_button->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_data_editor_dropdown_button_pressed));
- middle_vbox_container->add_child(tile_data_editor_dropdown_button);
+ tile_data_editors_vbox->add_child(tile_data_editor_dropdown_button);
tile_data_editor_dropdown_button->add_child(tile_data_editors_popup);
tile_data_editors_tree = memnew(Tree);
@@ -2395,81 +2486,25 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
tile_data_painting_editor_container = memnew(VBoxContainer);
tile_data_painting_editor_container->set_h_size_flags(SIZE_EXPAND_FILL);
- middle_vbox_container->add_child(tile_data_painting_editor_container);
+ tile_data_editors_vbox->add_child(tile_data_painting_editor_container);
// Atlas source inspector.
- atlas_source_inspector_label = memnew(Label);
- atlas_source_inspector_label->set_text(TTR("Atlas Properties:"));
- atlas_source_inspector_label->set_theme_type_variation("HeaderSmall");
- middle_vbox_container->add_child(atlas_source_inspector_label);
-
atlas_source_proxy_object = memnew(TileSetAtlasSourceProxyObject());
atlas_source_proxy_object->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_atlas_source_proxy_object_changed));
atlas_source_inspector = memnew(EditorInspector);
- atlas_source_inspector->set_undo_redo(undo_redo);
- atlas_source_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
+ atlas_source_inspector->set_v_size_flags(SIZE_EXPAND_FILL);
+ atlas_source_inspector->set_show_categories(true);
atlas_source_inspector->edit(atlas_source_proxy_object);
middle_vbox_container->add_child(atlas_source_inspector);
- // Right panel.
- VBoxContainer *right_panel = memnew(VBoxContainer);
- right_panel->set_h_size_flags(SIZE_EXPAND_FILL);
- right_panel->set_v_size_flags(SIZE_EXPAND_FILL);
- split_container_right_side->add_child(right_panel);
-
- // -- Dialogs --
- confirm_auto_create_tiles = memnew(AcceptDialog);
- confirm_auto_create_tiles->set_title(TTR("Auto Create Tiles in Non-Transparent Texture Regions?"));
- confirm_auto_create_tiles->set_text(TTR("The atlas's texture was modified.\nWould you like to automatically create tiles in the atlas?"));
- confirm_auto_create_tiles->set_ok_button_text(TTR("Yes"));
- confirm_auto_create_tiles->add_cancel_button()->set_text(TTR("No"));
- confirm_auto_create_tiles->connect("confirmed", callable_mp(this, &TileSetAtlasSourceEditor::_auto_create_tiles));
- add_child(confirm_auto_create_tiles);
-
- // -- Toolbox --
- tools_button_group.instantiate();
- tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_fix_selected_and_hovered_tiles).unbind(1));
- tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_tile_id_label).unbind(1));
- tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_atlas_source_inspector).unbind(1));
- tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_tile_inspector).unbind(1));
- tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_tile_data_editors).unbind(1));
- tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_current_tile_data_editor).unbind(1));
- tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_atlas_view).unbind(1));
- tools_button_group->connect("pressed", callable_mp(this, &TileSetAtlasSourceEditor::_update_toolbar).unbind(1));
-
- toolbox = memnew(HBoxContainer);
- right_panel->add_child(toolbox);
-
- tool_setup_atlas_source_button = memnew(Button);
- tool_setup_atlas_source_button->set_flat(true);
- tool_setup_atlas_source_button->set_toggle_mode(true);
- tool_setup_atlas_source_button->set_pressed(true);
- tool_setup_atlas_source_button->set_button_group(tools_button_group);
- tool_setup_atlas_source_button->set_tooltip_text(TTR("Atlas setup. Add/Remove tiles tool (use the shift key to create big tiles, control for rectangle editing)."));
- toolbox->add_child(tool_setup_atlas_source_button);
-
- tool_select_button = memnew(Button);
- tool_select_button->set_flat(true);
- tool_select_button->set_toggle_mode(true);
- tool_select_button->set_pressed(false);
- tool_select_button->set_button_group(tools_button_group);
- tool_select_button->set_tooltip_text(TTR("Select tiles."));
- toolbox->add_child(tool_select_button);
-
- tool_paint_button = memnew(Button);
- tool_paint_button->set_flat(true);
- tool_paint_button->set_toggle_mode(true);
- tool_paint_button->set_button_group(tools_button_group);
- tool_paint_button->set_tooltip_text(TTR("Paint properties."));
- toolbox->add_child(tool_paint_button);
+ // -- Right side --
+ VBoxContainer *right_vbox_container = memnew(VBoxContainer);
+ add_child(right_vbox_container);
// Tool settings.
tool_settings = memnew(HBoxContainer);
- toolbox->add_child(tool_settings);
-
- tool_settings_vsep = memnew(VSeparator);
- tool_settings->add_child(tool_settings_vsep);
+ right_vbox_container->add_child(tool_settings);
tool_settings_tile_data_toolbar_container = memnew(HBoxContainer);
tool_settings->add_child(tool_settings_tile_data_toolbar_container);
@@ -2486,24 +2521,31 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
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));
- toolbox->add_child(tool_advanced_menu_buttom);
+ tool_settings->add_child(tool_advanced_menu_buttom);
_update_toolbar();
// Right side of toolbar.
Control *middle_space = memnew(Control);
middle_space->set_h_size_flags(SIZE_EXPAND_FILL);
- toolbox->add_child(middle_space);
+ tool_settings->add_child(middle_space);
tool_tile_id_label = memnew(Label);
tool_tile_id_label->set_mouse_filter(Control::MOUSE_FILTER_STOP);
- toolbox->add_child(tool_tile_id_label);
+ tool_settings->add_child(tool_tile_id_label);
_update_tile_id_label();
+ // Right panel.
+ VBoxContainer *right_panel = memnew(VBoxContainer);
+ right_panel->set_h_size_flags(SIZE_EXPAND_FILL);
+ right_panel->set_v_size_flags(SIZE_EXPAND_FILL);
+ right_vbox_container->add_child(right_panel);
+
// Tile atlas view.
tile_atlas_view = memnew(TileAtlasView);
tile_atlas_view->set_h_size_flags(SIZE_EXPAND_FILL);
tile_atlas_view->set_v_size_flags(SIZE_EXPAND_FILL);
+ tile_atlas_view->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
tile_atlas_view->connect("transform_changed", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::set_atlas_view_transform));
tile_atlas_view->connect("transform_changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_atlas_view_transform_changed).unbind(2));
right_panel->add_child(tile_atlas_view);
@@ -2546,17 +2588,17 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
tile_atlas_view->add_control_over_alternative_tiles(alternative_tiles_control_unscaled, false);
alternative_tiles_control_unscaled->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
- tile_atlas_view_missing_source_label = memnew(Label);
- tile_atlas_view_missing_source_label->set_text(TTR("Add or select an atlas texture to the left panel."));
- tile_atlas_view_missing_source_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
- tile_atlas_view_missing_source_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
- tile_atlas_view_missing_source_label->set_h_size_flags(SIZE_EXPAND_FILL);
- tile_atlas_view_missing_source_label->set_v_size_flags(SIZE_EXPAND_FILL);
- tile_atlas_view_missing_source_label->hide();
- right_panel->add_child(tile_atlas_view_missing_source_label);
-
EditorNode::get_singleton()->get_editor_data().add_undo_redo_inspector_hook_callback(callable_mp(this, &TileSetAtlasSourceEditor::_undo_redo_inspector_callback));
+ // -- Dialogs --
+ confirm_auto_create_tiles = memnew(AcceptDialog);
+ confirm_auto_create_tiles->set_title(TTR("Auto Create Tiles in Non-Transparent Texture Regions?"));
+ confirm_auto_create_tiles->set_text(TTR("The atlas's texture was modified.\nWould you like to automatically create tiles in the atlas?"));
+ confirm_auto_create_tiles->set_ok_button_text(TTR("Yes"));
+ confirm_auto_create_tiles->add_cancel_button()->set_text(TTR("No"));
+ confirm_auto_create_tiles->connect("confirmed", callable_mp(this, &TileSetAtlasSourceEditor::_auto_create_tiles));
+ add_child(confirm_auto_create_tiles);
+
// Inspector plugin.
Ref<EditorInspectorPluginTileData> tile_data_inspector_plugin;
tile_data_inspector_plugin.instantiate();
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.h b/editor/plugins/tiles/tile_set_atlas_source_editor.h
index badb702e29..bcab1296ad 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.h
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_set_atlas_source_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_set_atlas_source_editor.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 TILE_SET_ATLAS_SOURCE_EDITOR_H
#define TILE_SET_ATLAS_SOURCE_EDITOR_H
@@ -37,10 +37,13 @@
#include "scene/gui/split_container.h"
#include "scene/resources/tile_set.h"
+class Popup;
class TileSet;
+class Tree;
+class VSeparator;
-class TileSetAtlasSourceEditor : public HBoxContainer {
- GDCLASS(TileSetAtlasSourceEditor, HBoxContainer);
+class TileSetAtlasSourceEditor : public HSplitContainer {
+ GDCLASS(TileSetAtlasSourceEditor, HSplitContainer);
public:
// A class to store which tiles are selected.
@@ -74,7 +77,7 @@ public:
public:
void set_id(int p_id);
- int get_id();
+ int get_id() const;
void edit(Ref<TileSet> p_tile_set, TileSetAtlasSource *p_tile_set_atlas_source, int p_source_id);
TileSetAtlasSource *get_edited() { return tile_set_atlas_source; };
@@ -114,11 +117,10 @@ private:
TileSetAtlasSource *tile_set_atlas_source = nullptr;
int tile_set_atlas_source_id = TileSet::INVALID_SOURCE;
- Ref<EditorUndoRedoManager> undo_redo;
-
bool tile_set_changed_needs_update = false;
// -- Properties painting --
+ ScrollContainer *tile_data_editors_scroll = nullptr;
VBoxContainer *tile_data_painting_editor_container = nullptr;
Label *tile_data_editors_label = nullptr;
Button *tile_data_editor_dropdown_button = nullptr;
@@ -136,19 +138,15 @@ private:
// -- Inspector --
AtlasTileProxyObject *tile_proxy_object = nullptr;
- Label *tile_inspector_label = nullptr;
EditorInspector *tile_inspector = nullptr;
Label *tile_inspector_no_tile_selected_label = nullptr;
String selected_property;
void _inspector_property_selected(String p_property);
TileSetAtlasSourceProxyObject *atlas_source_proxy_object = nullptr;
- Label *atlas_source_inspector_label = nullptr;
EditorInspector *atlas_source_inspector = nullptr;
// -- Atlas view --
- HBoxContainer *toolbox = nullptr;
- Label *tile_atlas_view_missing_source_label = nullptr;
TileAtlasView *tile_atlas_view = nullptr;
// Dragging
@@ -209,7 +207,6 @@ private:
// Tool settings.
HBoxContainer *tool_settings = nullptr;
- VSeparator *tool_settings_vsep = nullptr;
HBoxContainer *tool_settings_tile_data_toolbar_container = nullptr;
Button *tools_settings_erase_button = nullptr;
MenuButton *tool_advanced_menu_buttom = nullptr;
@@ -280,6 +277,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();
};
diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp
index 80a8318bbb..53c2d4de51 100644
--- a/editor/plugins/tiles/tile_set_editor.cpp
+++ b/editor/plugins/tiles/tile_set_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_set_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_set_editor.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 "tile_set_editor.h"
@@ -36,6 +36,7 @@
#include "editor/editor_file_system.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/box_container.h"
@@ -66,6 +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);
+ 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());
@@ -118,7 +120,9 @@ bool TileSetEditor::_can_drop_data_fw(const Point2 &p_point, const Variant &p_da
}
void TileSetEditor::_update_sources_list(int force_selected_id) {
- ERR_FAIL_COND(!tile_set.is_valid());
+ if (tile_set.is_null()) {
+ return;
+ }
// Get the previously selected id.
int old_selected = TileSet::INVALID_SOURCE;
@@ -149,7 +153,7 @@ void TileSetEditor::_update_sources_list(int force_selected_id) {
// Common to all type of sources.
if (!source->get_name().is_empty()) {
- item_text = vformat(TTR("%s (id:%d)"), source->get_name(), source_id);
+ item_text = vformat(TTR("%s (ID: %d)"), source->get_name(), source_id);
}
// Atlas source.
@@ -158,7 +162,7 @@ void TileSetEditor::_update_sources_list(int force_selected_id) {
texture = atlas_source->get_texture();
if (item_text.is_empty()) {
if (texture.is_valid()) {
- item_text = vformat("%s (ID: %d)", texture->get_path().get_file(), source_id);
+ item_text = vformat(TTR("%s (ID: %d)"), texture->get_path().get_file(), source_id);
} else {
item_text = vformat(TTR("No Texture Atlas Source (ID: %d)"), source_id);
}
@@ -256,6 +260,7 @@ void TileSetEditor::_source_delete_pressed() {
Ref<TileSetSource> source = tile_set->get_source(to_delete);
// Remove the source.
+ 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);
@@ -274,6 +279,7 @@ void TileSetEditor::_source_add_id_pressed(int p_id_pressed) {
Ref<TileSetAtlasSource> atlas_source = memnew(TileSetAtlasSource);
// Add a new source.
+ 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());
@@ -288,6 +294,7 @@ void TileSetEditor::_source_add_id_pressed(int p_id_pressed) {
Ref<TileSetScenesCollectionSource> scene_collection_source = memnew(TileSetScenesCollectionSource);
// Add a new source.
+ 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);
@@ -329,6 +336,7 @@ void TileSetEditor::_set_source_sort(int p_sort) {
}
}
_update_sources_list(old_selected);
+ EditorSettings::get_singleton()->set_project_metadata("editor_metadata", "tile_source_sort", p_sort);
}
void TileSetEditor::_notification(int p_what) {
@@ -340,6 +348,7 @@ void TileSetEditor::_notification(int p_what) {
source_sort_button->set_icon(get_theme_icon(SNAME("Sort"), SNAME("EditorIcons")));
sources_advanced_menu_button->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
missing_texture_texture = get_theme_icon(SNAME("TileSet"), SNAME("EditorIcons"));
+ _update_sources_list();
} break;
case NOTIFICATION_INTERNAL_PROCESS: {
@@ -360,6 +369,7 @@ void TileSetEditor::_patterns_item_list_gui_input(const Ref<InputEvent> &p_event
if (ED_IS_SHORTCUT("tiles_editor/delete", p_event) && p_event->is_pressed() && !p_event->is_echo()) {
Vector<int> selected = patterns_item_list->get_selected_items();
+ 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];
@@ -406,11 +416,11 @@ 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 = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
- ERR_FAIL_COND(undo_redo.is_null());
+ EditorUndoRedoManager *undo_redo_man = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
+ ERR_FAIL_NULL(undo_redo_man);
- TileSet *tile_set = Object::cast_to<TileSet>(p_edited);
- if (!tile_set) {
+ TileSet *ed_tile_set = Object::cast_to<TileSet>(p_edited);
+ if (!ed_tile_set) {
return;
}
@@ -420,18 +430,18 @@ void TileSetEditor::_move_tile_set_array_element(Object *p_undo_redo, Object *p_
int begin = 0;
int end;
if (p_array_prefix == "occlusion_layer_") {
- end = tile_set->get_occlusion_layers_count();
+ end = ed_tile_set->get_occlusion_layers_count();
} else if (p_array_prefix == "physics_layer_") {
- end = tile_set->get_physics_layers_count();
+ end = ed_tile_set->get_physics_layers_count();
} else if (p_array_prefix == "terrain_set_") {
- end = tile_set->get_terrain_sets_count();
+ end = ed_tile_set->get_terrain_sets_count();
} 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();
- end = tile_set->get_terrains_count(terrain_set);
+ end = ed_tile_set->get_terrains_count(terrain_set);
} else if (p_array_prefix == "navigation_layer_") {
- end = tile_set->get_navigation_layers_count();
+ end = ed_tile_set->get_navigation_layers_count();
} else if (p_array_prefix == "custom_data_layer_") {
- end = tile_set->get_custom_data_layers_count();
+ end = ed_tile_set->get_custom_data_layers_count();
} else {
ERR_FAIL_MSG("Invalid array prefix for TileSet.");
}
@@ -451,10 +461,39 @@ void TileSetEditor::_move_tile_set_array_element(Object *p_undo_redo, Object *p_
end = MIN(MAX(p_from_index, p_to_pos) + 1, end);
}
-#define ADD_UNDO(obj, property) undo_redo->add_undo_property(obj, property, obj->get(property));
+#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;
- tile_set->get_property_list(&properties);
+ ed_tile_set->get_property_list(&properties);
for (PropertyInfo pi : properties) {
if (pi.name.begins_with(p_array_prefix)) {
String str = pi.name.trim_prefix(p_array_prefix);
@@ -468,17 +507,17 @@ void TileSetEditor::_move_tile_set_array_element(Object *p_undo_redo, Object *p_
if (to_char_index > 0) {
int array_index = str.left(to_char_index).to_int();
if (array_index >= begin && array_index < end) {
- ADD_UNDO(tile_set, pi.name);
+ ADD_UNDO(ed_tile_set, pi.name);
}
}
}
}
// Save properties for TileSetAtlasSources tile data
- for (int i = 0; i < tile_set->get_source_count(); i++) {
- int source_id = tile_set->get_source_id(i);
+ for (int i = 0; i < ed_tile_set->get_source_count(); i++) {
+ int source_id = ed_tile_set->get_source_id(i);
- Ref<TileSetAtlasSource> tas = tile_set->get_source(source_id);
+ Ref<TileSetAtlasSource> tas = ed_tile_set->get_source(source_id);
if (tas.is_valid()) {
for (int j = 0; j < tas->get_tiles_count(); j++) {
Vector2i tile_id = tas->get_tile_id(j);
@@ -533,71 +572,71 @@ 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->add_do_method(tile_set, "add_occlusion_layer", p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "add_occlusion_layer", p_to_pos);
} else if (p_to_pos < 0) {
- undo_redo->add_do_method(tile_set, "remove_occlusion_layer", p_from_index);
+ undo_redo_man->add_do_method(ed_tile_set, "remove_occlusion_layer", p_from_index);
} else {
- undo_redo->add_do_method(tile_set, "move_occlusion_layer", p_from_index, p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "move_occlusion_layer", p_from_index, p_to_pos);
}
} else if (p_array_prefix == "physics_layer_") {
if (p_from_index < 0) {
- undo_redo->add_do_method(tile_set, "add_physics_layer", p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "add_physics_layer", p_to_pos);
} else if (p_to_pos < 0) {
- undo_redo->add_do_method(tile_set, "remove_physics_layer", p_from_index);
+ undo_redo_man->add_do_method(ed_tile_set, "remove_physics_layer", p_from_index);
} else {
- undo_redo->add_do_method(tile_set, "move_physics_layer", p_from_index, p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "move_physics_layer", p_from_index, p_to_pos);
}
} else if (p_array_prefix == "terrain_set_") {
if (p_from_index < 0) {
- undo_redo->add_do_method(tile_set, "add_terrain_set", p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "add_terrain_set", p_to_pos);
} else if (p_to_pos < 0) {
- undo_redo->add_do_method(tile_set, "remove_terrain_set", p_from_index);
+ undo_redo_man->add_do_method(ed_tile_set, "remove_terrain_set", p_from_index);
} else {
- undo_redo->add_do_method(tile_set, "move_terrain_set", p_from_index, p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "move_terrain_set", p_from_index, 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->add_do_method(tile_set, "add_terrain", terrain_set, p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "add_terrain", terrain_set, p_to_pos);
} else if (p_to_pos < 0) {
- undo_redo->add_do_method(tile_set, "remove_terrain", terrain_set, p_from_index);
+ undo_redo_man->add_do_method(ed_tile_set, "remove_terrain", terrain_set, p_from_index);
} else {
- undo_redo->add_do_method(tile_set, "move_terrain", terrain_set, p_from_index, p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "move_terrain", terrain_set, p_from_index, p_to_pos);
}
} else if (p_array_prefix == "navigation_layer_") {
if (p_from_index < 0) {
- undo_redo->add_do_method(tile_set, "add_navigation_layer", p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "add_navigation_layer", p_to_pos);
} else if (p_to_pos < 0) {
- undo_redo->add_do_method(tile_set, "remove_navigation_layer", p_from_index);
+ undo_redo_man->add_do_method(ed_tile_set, "remove_navigation_layer", p_from_index);
} else {
- undo_redo->add_do_method(tile_set, "move_navigation_layer", p_from_index, p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "move_navigation_layer", p_from_index, p_to_pos);
}
} else if (p_array_prefix == "custom_data_layer_") {
if (p_from_index < 0) {
- undo_redo->add_do_method(tile_set, "add_custom_data_layer", p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "add_custom_data_layer", p_to_pos);
} else if (p_to_pos < 0) {
- undo_redo->add_do_method(tile_set, "remove_custom_data_layer", p_from_index);
+ undo_redo_man->add_do_method(ed_tile_set, "remove_custom_data_layer", p_from_index);
} else {
- undo_redo->add_do_method(tile_set, "move_custom_data_layer", p_from_index, p_to_pos);
+ undo_redo_man->add_do_method(ed_tile_set, "move_custom_data_layer", p_from_index, p_to_pos);
}
}
}
void TileSetEditor::_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_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->add_undo_property(obj, property, obj->get(property));
- TileSet *tile_set = Object::cast_to<TileSet>(p_edited);
- if (tile_set) {
+#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);
+ if (ed_tile_set) {
Vector<String> components = p_property.split("/", true, 3);
- for (int i = 0; i < tile_set->get_source_count(); i++) {
- int source_id = tile_set->get_source_id(i);
+ for (int i = 0; i < ed_tile_set->get_source_count(); i++) {
+ int source_id = ed_tile_set->get_source_id(i);
- Ref<TileSetAtlasSource> tas = tile_set->get_source(source_id);
+ Ref<TileSetAtlasSource> tas = ed_tile_set->get_source(source_id);
if (tas.is_valid()) {
for (int j = 0; j < tas->get_tiles_count(); j++) {
Vector2i tile_id = tas->get_tile_id(j);
@@ -627,11 +666,6 @@ 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) {
return;
@@ -648,7 +682,12 @@ void TileSetEditor::edit(Ref<TileSet> p_tile_set) {
// Add the listener again.
if (tile_set.is_valid()) {
tile_set->connect("changed", callable_mp(this, &TileSetEditor::_tile_set_changed));
- _update_sources_list();
+ if (first_edit) {
+ first_edit = false;
+ _set_source_sort(EditorSettings::get_singleton()->get_project_metadata("editor_metadata", "tile_source_sort", 0));
+ } else {
+ _update_sources_list();
+ }
_update_patterns_list();
}
@@ -660,8 +699,6 @@ void TileSetEditor::edit(Ref<TileSet> p_tile_set) {
TileSetEditor::TileSetEditor() {
singleton = this;
- undo_redo = EditorNode::get_undo_redo();
-
set_process_internal(true);
// TabBar.
@@ -695,7 +732,7 @@ TileSetEditor::TileSetEditor() {
source_sort_button = memnew(MenuButton);
source_sort_button->set_flat(true);
- source_sort_button->set_tooltip_text(TTR("Sort sources"));
+ source_sort_button->set_tooltip_text(TTR("Sort Sources"));
PopupMenu *p = source_sort_button->get_popup();
p->connect("id_pressed", callable_mp(this, &TileSetEditor::_set_source_sort));
@@ -715,7 +752,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);
@@ -795,6 +832,7 @@ TileSetEditor::TileSetEditor() {
patterns_help_label = memnew(Label);
patterns_help_label->set_text(TTR("Add new patterns in the TileMap editing mode."));
+ patterns_help_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
patterns_help_label->set_anchors_and_offsets_preset(Control::PRESET_CENTER);
patterns_item_list->add_child(patterns_help_label);
@@ -802,9 +840,3 @@ TileSetEditor::TileSetEditor() {
EditorNode::get_singleton()->get_editor_data().add_move_array_element_function(SNAME("TileSet"), callable_mp(this, &TileSetEditor::_move_tile_set_array_element));
EditorNode::get_singleton()->get_editor_data().add_undo_redo_inspector_hook_callback(callable_mp(this, &TileSetEditor::_undo_redo_inspector_callback));
}
-
-TileSetEditor::~TileSetEditor() {
- if (tile_set.is_valid()) {
- tile_set->disconnect("changed", callable_mp(this, &TileSetEditor::_tile_set_changed));
- }
-}
diff --git a/editor/plugins/tiles/tile_set_editor.h b/editor/plugins/tiles/tile_set_editor.h
index 3b9b80dac4..e3dff11277 100644
--- a/editor/plugins/tiles/tile_set_editor.h
+++ b/editor/plugins/tiles/tile_set_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_set_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_set_editor.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 TILE_SET_EDITOR_H
#define TILE_SET_EDITOR_H
@@ -39,8 +39,6 @@
#include "tile_set_atlas_source_editor.h"
#include "tile_set_scenes_collection_source_editor.h"
-class EditorUndoRedoManager;
-
class TileSetEditor : public VBoxContainer {
GDCLASS(TileSetEditor, VBoxContainer);
@@ -60,8 +58,6 @@ private:
TileSetAtlasSourceEditor *tile_set_atlas_source_editor = nullptr;
TileSetScenesCollectionSourceEditor *tile_set_scenes_collection_source_editor = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
-
void _drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
bool _can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
@@ -83,6 +79,8 @@ private:
AtlasMergingDialog *atlas_merging_dialog = nullptr;
TileProxiesManagerDialog *tile_proxies_manager_dialog = nullptr;
+ bool first_edit = true;
+
// Patterns.
ItemList *patterns_item_list = nullptr;
Label *patterns_help_label = nullptr;
@@ -99,7 +97,6 @@ private:
protected:
void _notification(int p_what);
- static void _bind_methods();
public:
_FORCE_INLINE_ static TileSetEditor *get_singleton() { return singleton; }
@@ -107,7 +104,6 @@ public:
void edit(Ref<TileSet> p_tile_set);
TileSetEditor();
- ~TileSetEditor();
};
#endif // TILE_SET_EDITOR_H
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 f7622e68ab..6251cd18f7 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_set_scenes_collection_source_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_set_scenes_collection_source_editor.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 "tile_set_scenes_collection_source_editor.h"
@@ -35,8 +35,10 @@
#include "editor/editor_resource_preview.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
#include "scene/gui/item_list.h"
+#include "scene/gui/split_container.h"
#include "core/core_string_names.h"
@@ -235,6 +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();
+ 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);
@@ -249,6 +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]);
+ 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);
@@ -323,7 +327,7 @@ void TileSetScenesCollectionSourceEditor::_update_scenes_list() {
}
// Icon size update.
- int int_size = int(EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size")) * EDSCALE;
+ int int_size = int(EDITOR_GET("filesystem/file_dialog/thumbnail_size")) * EDSCALE;
scene_tiles_list->set_fixed_icon_size(Vector2(int_size, int_size));
}
@@ -400,6 +404,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();
+ 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);
@@ -448,13 +453,9 @@ 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() {
- undo_redo = EditorNode::get_undo_redo();
-
// -- Right side --
HSplitContainer *split_container_right_side = memnew(HSplitContainer);
split_container_right_side->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -479,7 +480,6 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
scenes_collection_source_proxy_object->connect("changed", callable_mp(this, &TileSetScenesCollectionSourceEditor::_scenes_collection_source_proxy_object_changed));
scenes_collection_source_inspector = memnew(EditorInspector);
- scenes_collection_source_inspector->set_undo_redo(undo_redo);
scenes_collection_source_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
scenes_collection_source_inspector->edit(scenes_collection_source_proxy_object);
middle_vbox_container->add_child(scenes_collection_source_inspector);
@@ -495,7 +495,6 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
tile_proxy_object->connect("changed", callable_mp(this, &TileSetScenesCollectionSourceEditor::_update_action_buttons).unbind(1));
tile_inspector = memnew(EditorInspector);
- tile_inspector->set_undo_redo(undo_redo);
tile_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
tile_inspector->edit(tile_proxy_object);
tile_inspector->set_use_folding(true);
@@ -508,7 +507,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 0284b45c0f..0901205a29 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tile_set_scenes_collection_source_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tile_set_scenes_collection_source_editor.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 TILE_SET_SCENES_COLLECTION_SOURCE_EDITOR_H
#define TILE_SET_SCENES_COLLECTION_SOURCE_EDITOR_H
@@ -37,8 +37,6 @@
#include "scene/gui/item_list.h"
#include "scene/resources/tile_set.h"
-class UndoRedo;
-
class TileSetScenesCollectionSourceEditor : public HBoxContainer {
GDCLASS(TileSetScenesCollectionSourceEditor, HBoxContainer);
@@ -97,8 +95,6 @@ private:
TileSetScenesCollectionSource *tile_set_scenes_collection_source = nullptr;
int tile_set_source_id = -1;
- Ref<EditorUndoRedoManager> undo_redo;
-
bool tile_set_scenes_collection_source_changed_needs_update = false;
// Source inspector.
diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp
index 17115519e2..19ee0ae98d 100644
--- a/editor/plugins/tiles/tiles_editor_plugin.cpp
+++ b/editor/plugins/tiles/tiles_editor_plugin.cpp
@@ -1,39 +1,42 @@
-/*************************************************************************/
-/* tiles_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tiles_editor_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 "tiles_editor_plugin.h"
+#include "tile_set_editor.h"
+
#include "core/os/mutex.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "scene/2d/tile_map.h"
@@ -43,8 +46,6 @@
#include "scene/gui/separator.h"
#include "scene/resources/tile_set.h"
-#include "tile_set_editor.h"
-
TilesEditorPlugin *TilesEditorPlugin::singleton = nullptr;
void TilesEditorPlugin::_preview_frame_started() {
@@ -66,12 +67,14 @@ void TilesEditorPlugin::_thread() {
pattern_preview_sem.wait();
pattern_preview_mutex.lock();
- if (pattern_preview_queue.size()) {
+ if (pattern_preview_queue.size() == 0) {
+ pattern_preview_mutex.unlock();
+ } else {
QueueItem item = pattern_preview_queue.front()->get();
pattern_preview_queue.pop_front();
pattern_preview_mutex.unlock();
- int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
+ int thumbnail_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
thumbnail_size *= EDSCALE;
Vector2 thumbnail_size2 = Vector2(thumbnail_size, thumbnail_size);
@@ -90,7 +93,7 @@ void TilesEditorPlugin::_thread() {
TypedArray<Vector2i> used_cells = tile_map->get_used_cells(0);
- Rect2 encompassing_rect = Rect2();
+ Rect2 encompassing_rect;
encompassing_rect.set_position(tile_map->map_to_local(used_cells[0]));
for (int i = 0; i < used_cells.size(); i++) {
Vector2i cell = used_cells[i];
@@ -129,9 +132,7 @@ void TilesEditorPlugin::_thread() {
Callable::CallError error;
item.callback.callp(args_ptr, 2, r, error);
- viewport->queue_delete();
- } else {
- pattern_preview_mutex.unlock();
+ viewport->queue_free();
}
}
}
@@ -184,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());
@@ -264,12 +273,12 @@ void TilesEditorPlugin::set_sorting_option(int p_option) {
source_sort = p_option;
}
-List<int> TilesEditorPlugin::get_sorted_sources(const Ref<TileSet> tile_set) const {
- SourceNameComparator::tile_set = tile_set;
+List<int> TilesEditorPlugin::get_sorted_sources(const Ref<TileSet> p_tile_set) const {
+ SourceNameComparator::tile_set = p_tile_set;
List<int> source_ids;
- for (int i = 0; i < tile_set->get_source_count(); i++) {
- source_ids.push_back(tile_set->get_source_id(i));
+ for (int i = 0; i < p_tile_set->get_source_count(); i++) {
+ source_ids.push_back(p_tile_set->get_source_id(i));
}
switch (source_sort) {
@@ -361,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));
@@ -384,6 +398,15 @@ bool TilesEditorPlugin::handles(Object *p_object) const {
return p_object->is_class("TileMap") || p_object->is_class("TileSet");
}
+void TilesEditorPlugin::draw_selection_rect(CanvasItem *p_ci, const Rect2 &p_rect, const Color &p_color) {
+ real_t scale = p_ci->get_global_transform().get_scale().x * 0.5;
+ p_ci->draw_set_transform(p_rect.position, 0, Vector2(1, 1) / scale);
+ RS::get_singleton()->canvas_item_add_nine_patch(
+ p_ci->get_canvas_item(), Rect2(Vector2(), p_rect.size * scale), Rect2(), EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("TileSelection"), SNAME("EditorIcons"))->get_rid(),
+ Vector2(2, 2), Vector2(2, 2), RS::NINE_PATCH_STRETCH, RS::NINE_PATCH_STRETCH, false, p_color);
+ p_ci->draw_set_transform_matrix(Transform2D());
+}
+
TilesEditorPlugin::TilesEditorPlugin() {
set_process_internal(true);
diff --git a/editor/plugins/tiles/tiles_editor_plugin.h b/editor/plugins/tiles/tiles_editor_plugin.h
index b1fe6f8df6..50073e59c6 100644
--- a/editor/plugins/tiles/tiles_editor_plugin.h
+++ b/editor/plugins/tiles/tiles_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* tiles_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* tiles_editor_plugin.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 TILES_EDITOR_PLUGIN_H
#define TILES_EDITOR_PLUGIN_H
@@ -71,7 +71,7 @@ private:
// For synchronization.
int atlas_sources_lists_current = 0;
float atlas_view_zoom = 1.0;
- Vector2 atlas_view_scroll = Vector2();
+ Vector2 atlas_view_scroll;
void _tile_map_changed();
@@ -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);
@@ -122,12 +124,14 @@ public:
// Sorting.
void set_sorting_option(int p_option);
- List<int> get_sorted_sources(const Ref<TileSet> tile_set) const;
+ List<int> get_sorted_sources(const Ref<TileSet> p_tile_set) const;
virtual void edit(Object *p_object) override;
virtual bool handles(Object *p_object) const override;
virtual void make_visible(bool p_visible) override;
+ static void draw_selection_rect(CanvasItem *p_ci, const Rect2 &p_rect, const Color &p_color = Color(1.0, 1.0, 1.0));
+
TilesEditorPlugin();
~TilesEditorPlugin();
};
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index 761140b2d5..c404e12d39 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* version_control_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* version_control_editor_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 "version_control_editor_plugin.h"
@@ -38,6 +38,7 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/filesystem_dock.h"
+#include "editor/plugins/script_editor_plugin.h"
#include "scene/gui/separator.h"
#define CHECK_PLUGIN_INITIALIZED() \
@@ -46,43 +47,7 @@
VersionControlEditorPlugin *VersionControlEditorPlugin::singleton = nullptr;
void VersionControlEditorPlugin::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_initialize_vcs"), &VersionControlEditorPlugin::_initialize_vcs);
- ClassDB::bind_method(D_METHOD("_set_credentials"), &VersionControlEditorPlugin::_set_credentials);
- ClassDB::bind_method(D_METHOD("_update_set_up_warning"), &VersionControlEditorPlugin::_update_set_up_warning);
- ClassDB::bind_method(D_METHOD("_commit"), &VersionControlEditorPlugin::_commit);
- ClassDB::bind_method(D_METHOD("_refresh_stage_area"), &VersionControlEditorPlugin::_refresh_stage_area);
- ClassDB::bind_method(D_METHOD("_move_all"), &VersionControlEditorPlugin::_move_all);
- ClassDB::bind_method(D_METHOD("_load_diff"), &VersionControlEditorPlugin::_load_diff);
- ClassDB::bind_method(D_METHOD("_display_diff"), &VersionControlEditorPlugin::_display_diff);
- ClassDB::bind_method(D_METHOD("_item_activated"), &VersionControlEditorPlugin::_item_activated);
- ClassDB::bind_method(D_METHOD("_update_branch_create_button"), &VersionControlEditorPlugin::_update_branch_create_button);
- ClassDB::bind_method(D_METHOD("_update_remote_create_button"), &VersionControlEditorPlugin::_update_remote_create_button);
- ClassDB::bind_method(D_METHOD("_update_commit_button"), &VersionControlEditorPlugin::_update_commit_button);
- ClassDB::bind_method(D_METHOD("_refresh_branch_list"), &VersionControlEditorPlugin::_refresh_branch_list);
- ClassDB::bind_method(D_METHOD("_set_commit_list_size"), &VersionControlEditorPlugin::_set_commit_list_size);
- ClassDB::bind_method(D_METHOD("_refresh_commit_list"), &VersionControlEditorPlugin::_refresh_commit_list);
- ClassDB::bind_method(D_METHOD("_refresh_remote_list"), &VersionControlEditorPlugin::_refresh_remote_list);
- ClassDB::bind_method(D_METHOD("_ssh_public_key_selected"), &VersionControlEditorPlugin::_ssh_public_key_selected);
- ClassDB::bind_method(D_METHOD("_ssh_private_key_selected"), &VersionControlEditorPlugin::_ssh_private_key_selected);
- ClassDB::bind_method(D_METHOD("_commit_message_gui_input"), &VersionControlEditorPlugin::_commit_message_gui_input);
- ClassDB::bind_method(D_METHOD("_cell_button_pressed"), &VersionControlEditorPlugin::_cell_button_pressed);
- ClassDB::bind_method(D_METHOD("_discard_all"), &VersionControlEditorPlugin::_discard_all);
- ClassDB::bind_method(D_METHOD("_create_branch"), &VersionControlEditorPlugin::_create_branch);
- ClassDB::bind_method(D_METHOD("_create_remote"), &VersionControlEditorPlugin::_create_remote);
- ClassDB::bind_method(D_METHOD("_remove_branch"), &VersionControlEditorPlugin::_remove_branch);
- ClassDB::bind_method(D_METHOD("_remove_remote"), &VersionControlEditorPlugin::_remove_remote);
- ClassDB::bind_method(D_METHOD("_branch_item_selected"), &VersionControlEditorPlugin::_branch_item_selected);
- ClassDB::bind_method(D_METHOD("_remote_selected"), &VersionControlEditorPlugin::_remote_selected);
- ClassDB::bind_method(D_METHOD("_fetch"), &VersionControlEditorPlugin::_fetch);
- ClassDB::bind_method(D_METHOD("_pull"), &VersionControlEditorPlugin::_pull);
- ClassDB::bind_method(D_METHOD("_push"), &VersionControlEditorPlugin::_push);
- ClassDB::bind_method(D_METHOD("_extra_option_selected"), &VersionControlEditorPlugin::_extra_option_selected);
- ClassDB::bind_method(D_METHOD("_update_extra_options"), &VersionControlEditorPlugin::_update_extra_options);
- ClassDB::bind_method(D_METHOD("_popup_branch_remove_confirm"), &VersionControlEditorPlugin::_popup_branch_remove_confirm);
- ClassDB::bind_method(D_METHOD("_popup_remote_remove_confirm"), &VersionControlEditorPlugin::_popup_remote_remove_confirm);
- ClassDB::bind_method(D_METHOD("_popup_file_dialog"), &VersionControlEditorPlugin::_popup_file_dialog);
-
- ClassDB::bind_method(D_METHOD("popup_vcs_set_up_dialog"), &VersionControlEditorPlugin::popup_vcs_set_up_dialog);
+ // No binds required so far.
}
void VersionControlEditorPlugin::_create_vcs_metadata_files() {
@@ -93,12 +58,10 @@ void VersionControlEditorPlugin::_create_vcs_metadata_files() {
void VersionControlEditorPlugin::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
String installed_plugin = GLOBAL_DEF("editor/version_control/plugin_name", "");
- String project_path = GLOBAL_DEF("editor/version_control/project_path", OS::get_singleton()->get_resource_dir());
- project_path_input->set_text(project_path);
bool has_autoload_enable = GLOBAL_DEF("editor/version_control/autoload_on_startup", false);
if (installed_plugin != "" && has_autoload_enable) {
- if (_load_plugin(installed_plugin, project_path)) {
+ if (_load_plugin(installed_plugin)) {
_set_credentials();
}
}
@@ -143,18 +106,15 @@ void VersionControlEditorPlugin::_initialize_vcs() {
const int id = set_up_choice->get_selected_id();
String selected_plugin = set_up_choice->get_item_text(id);
- if (_load_plugin(selected_plugin, project_path_input->get_text())) {
+ if (_load_plugin(selected_plugin)) {
ProjectSettings::get_singleton()->set("editor/version_control/autoload_on_startup", true);
ProjectSettings::get_singleton()->set("editor/version_control/plugin_name", selected_plugin);
- ProjectSettings::get_singleton()->set("editor/version_control/project_path", project_path_input->get_text());
ProjectSettings::get_singleton()->save();
}
}
void VersionControlEditorPlugin::_set_vcs_ui_state(bool p_enabled) {
- select_project_path_button->set_disabled(p_enabled);
set_up_dialog->get_ok_button()->set_disabled(!p_enabled);
- project_path_input->set_editable(!p_enabled);
set_up_choice->set_disabled(p_enabled);
toggle_vcs_choice->set_pressed_no_signal(p_enabled);
}
@@ -180,14 +140,14 @@ void VersionControlEditorPlugin::_set_credentials() {
EditorSettings::get_singleton()->set_setting("version_control/ssh_private_key_path", ssh_private_key);
}
-bool VersionControlEditorPlugin::_load_plugin(String p_name, String p_project_path) {
+bool VersionControlEditorPlugin::_load_plugin(String p_name) {
Object *extension_instance = ClassDB::instantiate(p_name);
ERR_FAIL_NULL_V_MSG(extension_instance, false, "Received a nullptr VCS extension instance during construction.");
EditorVCSInterface *vcs_plugin = Object::cast_to<EditorVCSInterface>(extension_instance);
ERR_FAIL_NULL_V_MSG(vcs_plugin, false, vformat("Could not cast VCS extension instance to %s.", EditorVCSInterface::get_class_static()));
- String res_dir = project_path_input->get_text();
+ String res_dir = OS::get_singleton()->get_resource_dir();
ERR_FAIL_COND_V_MSG(!vcs_plugin->initialize(res_dir), false, "Could not initialize " + p_name);
@@ -430,10 +390,14 @@ void VersionControlEditorPlugin::_discard_file(String p_file_path, EditorVCSInte
CHECK_PLUGIN_INITIALIZED();
EditorVCSInterface::get_singleton()->discard_file(p_file_path);
}
- // FIXIT: The project.godot file shows weird behaviour
+ // FIXIT: The project.godot file shows weird behavior
EditorFileSystem::get_singleton()->update_file(p_file_path);
}
+void VersionControlEditorPlugin::_confirm_discard_all() {
+ discard_all_confirm->popup_centered();
+}
+
void VersionControlEditorPlugin::_discard_all() {
TreeItem *file_entry = unstaged_files->get_root()->get_first_child();
while (file_entry) {
@@ -630,7 +594,6 @@ void VersionControlEditorPlugin::_display_diff(int p_idx) {
diff->pop();
diff->pop();
- diff->add_newline();
diff->push_font(EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
for (int j = 0; j < diff_file.diff_hunks.size(); j++) {
EditorVCSInterface::DiffHunk hunk = diff_file.diff_hunks[j];
@@ -640,6 +603,7 @@ void VersionControlEditorPlugin::_display_diff(int p_idx) {
String old_lines = String::num_int64(hunk.old_lines);
String new_lines = String::num_int64(hunk.new_lines);
+ diff->add_newline();
diff->append_text("[center]@@ " + old_start + "," + old_lines + " " + new_start + "," + new_lines + " @@[/center]");
diff->add_newline();
@@ -652,7 +616,6 @@ void VersionControlEditorPlugin::_display_diff(int p_idx) {
break;
}
diff->add_newline();
- diff->add_newline();
}
diff->pop();
@@ -720,12 +683,10 @@ void VersionControlEditorPlugin::_display_diff_split_view(List<EditorVCSInterfac
if (diff_line.old_line_no >= 0) {
diff->push_cell();
- diff->push_indent(1);
diff->push_color(has_change ? red : white);
diff->add_text(String::num_int64(diff_line.old_line_no));
diff->pop();
diff->pop();
- diff->pop();
diff->push_cell();
diff->push_color(has_change ? red : white);
@@ -752,12 +713,10 @@ void VersionControlEditorPlugin::_display_diff_split_view(List<EditorVCSInterfac
if (diff_line.new_line_no >= 0) {
diff->push_cell();
- diff->push_indent(1);
diff->push_color(has_change ? green : white);
diff->add_text(String::num_int64(diff_line.new_line_no));
diff->pop();
diff->pop();
- diff->pop();
diff->push_cell();
diff->push_color(has_change ? green : white);
@@ -942,10 +901,6 @@ void VersionControlEditorPlugin::_toggle_vcs_integration(bool p_toggled) {
}
}
-void VersionControlEditorPlugin::_project_path_selected(String p_project_path) {
- project_path_input->set_text(p_project_path);
-}
-
void VersionControlEditorPlugin::fetch_available_vcs_plugin_names() {
available_plugins.clear();
ClassDB::get_direct_inheriters_from_class(EditorVCSInterface::get_class_static(), &available_plugins);
@@ -987,7 +942,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
metadata_dialog->set_title(TTR("Create Version Control Metadata"));
metadata_dialog->set_min_size(Size2(200, 40));
metadata_dialog->get_ok_button()->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_create_vcs_metadata_files));
- version_control_actions->add_child(metadata_dialog);
+ add_child(metadata_dialog);
VBoxContainer *metadata_vb = memnew(VBoxContainer);
metadata_dialog->add_child(metadata_vb);
@@ -1016,7 +971,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_dialog->set_min_size(Size2(600, 100));
set_up_dialog->add_cancel_button("Cancel");
set_up_dialog->set_hide_on_ok(true);
- version_control_actions->add_child(set_up_dialog);
+ add_child(set_up_dialog);
Button *set_up_apply_button = set_up_dialog->get_ok_button();
set_up_apply_button->set_text(TTR("Apply"));
@@ -1039,34 +994,6 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_choice->set_h_size_flags(Control::SIZE_EXPAND_FILL);
set_up_hbc->add_child(set_up_choice);
- HBoxContainer *project_path_hbc = memnew(HBoxContainer);
- project_path_hbc->set_h_size_flags(Control::SIZE_FILL);
- set_up_vbc->add_child(project_path_hbc);
-
- Label *project_path_label = memnew(Label);
- project_path_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- project_path_label->set_text(TTR("VCS Project Path"));
- project_path_hbc->add_child(project_path_label);
-
- project_path_input = memnew(LineEdit);
- project_path_input->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- project_path_input->set_text(OS::get_singleton()->get_resource_dir());
- project_path_hbc->add_child(project_path_input);
-
- FileDialog *select_project_path_file_dialog = memnew(FileDialog);
- select_project_path_file_dialog->set_access(FileDialog::ACCESS_FILESYSTEM);
- select_project_path_file_dialog->set_file_mode(FileDialog::FILE_MODE_OPEN_DIR);
- select_project_path_file_dialog->set_show_hidden_files(true);
- select_project_path_file_dialog->set_current_dir(OS::get_singleton()->get_resource_dir());
- select_project_path_file_dialog->connect(SNAME("dir_selected"), callable_mp(this, &VersionControlEditorPlugin::_project_path_selected));
- project_path_hbc->add_child(select_project_path_file_dialog);
-
- select_project_path_button = memnew(Button);
- select_project_path_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("Folder", "EditorIcons"));
- select_project_path_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_popup_file_dialog).bind(select_project_path_file_dialog));
- select_project_path_button->set_tooltip_text(TTR("Select VCS project path"));
- project_path_hbc->add_child(select_project_path_button);
-
HBoxContainer *toggle_vcs_hbc = memnew(HBoxContainer);
toggle_vcs_hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
set_up_vbc->add_child(toggle_vcs_hbc);
@@ -1124,6 +1051,8 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_password->connect(SNAME("text_changed"), callable_mp(this, &VersionControlEditorPlugin::_update_set_up_warning));
set_up_password_input->add_child(set_up_password);
+ const String home_dir = OS::get_singleton()->has_environment("HOME") ? OS::get_singleton()->get_environment("HOME") : OS::get_singleton()->get_system_dir(OS::SYSTEM_DIR_DOCUMENTS);
+
HBoxContainer *set_up_ssh_public_key_input = memnew(HBoxContainer);
set_up_ssh_public_key_input->set_h_size_flags(Control::SIZE_EXPAND_FILL);
set_up_settings_vbc->add_child(set_up_ssh_public_key_input);
@@ -1147,10 +1076,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_ssh_public_key_file_dialog->set_access(FileDialog::ACCESS_FILESYSTEM);
set_up_ssh_public_key_file_dialog->set_file_mode(FileDialog::FILE_MODE_OPEN_FILE);
set_up_ssh_public_key_file_dialog->set_show_hidden_files(true);
- // TODO: Make this start at the user's home folder
- Ref<DirAccess> d = DirAccess::open(OS::get_singleton()->get_system_dir(OS::SYSTEM_DIR_DOCUMENTS));
- d->change_dir("../");
- set_up_ssh_public_key_file_dialog->set_current_dir(d->get_current_dir());
+ set_up_ssh_public_key_file_dialog->set_current_dir(home_dir);
set_up_ssh_public_key_file_dialog->connect(SNAME("file_selected"), callable_mp(this, &VersionControlEditorPlugin::_ssh_public_key_selected));
set_up_ssh_public_key_input_hbc->add_child(set_up_ssh_public_key_file_dialog);
@@ -1183,8 +1109,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_ssh_private_key_file_dialog->set_access(FileDialog::ACCESS_FILESYSTEM);
set_up_ssh_private_key_file_dialog->set_file_mode(FileDialog::FILE_MODE_OPEN_FILE);
set_up_ssh_private_key_file_dialog->set_show_hidden_files(true);
- // TODO: Make this start at the user's home folder
- set_up_ssh_private_key_file_dialog->set_current_dir(d->get_current_dir());
+ set_up_ssh_private_key_file_dialog->set_current_dir(home_dir);
set_up_ssh_private_key_file_dialog->connect("file_selected", callable_mp(this, &VersionControlEditorPlugin::_ssh_private_key_selected));
set_up_ssh_private_key_input_hbc->add_child(set_up_ssh_private_key_file_dialog);
@@ -1241,10 +1166,21 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
refresh_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_refresh_remote_list));
unstage_title->add_child(refresh_button);
+ discard_all_confirm = memnew(AcceptDialog);
+ discard_all_confirm->set_title(TTR("Discard all changes"));
+ discard_all_confirm->set_min_size(Size2i(400, 50));
+ discard_all_confirm->set_text(TTR("This operation is IRREVERSIBLE. Your changes will be deleted FOREVER."));
+ discard_all_confirm->set_hide_on_ok(true);
+ discard_all_confirm->set_ok_button_text(TTR("Permanentally delete my changes"));
+ discard_all_confirm->add_cancel_button();
+ version_commit_dock->add_child(discard_all_confirm);
+
+ discard_all_confirm->get_ok_button()->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_discard_all));
+
discard_all_button = memnew(Button);
discard_all_button->set_tooltip_text(TTR("Discard all changes"));
discard_all_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
- discard_all_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_discard_all));
+ discard_all_button->connect(SNAME("pressed"), callable_mp(this, &VersionControlEditorPlugin::_confirm_discard_all));
discard_all_button->set_flat(true);
unstage_title->add_child(discard_all_button);
diff --git a/editor/plugins/version_control_editor_plugin.h b/editor/plugins/version_control_editor_plugin.h
index 3340384a92..ca55b86578 100644
--- a/editor/plugins/version_control_editor_plugin.h
+++ b/editor/plugins/version_control_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* version_control_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* version_control_editor_plugin.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 VERSION_CONTROL_EDITOR_PLUGIN_H
#define VERSION_CONTROL_EDITOR_PLUGIN_H
@@ -73,8 +73,6 @@ private:
AcceptDialog *set_up_dialog = nullptr;
CheckButton *toggle_vcs_choice = nullptr;
OptionButton *set_up_choice = nullptr;
- LineEdit *project_path_input = nullptr;
- Button *select_project_path_button = nullptr;
VBoxContainer *set_up_vbc = nullptr;
VBoxContainer *set_up_settings_vbc = nullptr;
LineEdit *set_up_username = nullptr;
@@ -86,6 +84,8 @@ private:
FileDialog *set_up_ssh_private_key_file_dialog = nullptr;
Label *set_up_warning_text = nullptr;
+ AcceptDialog *discard_all_confirm = nullptr;
+
OptionButton *commit_list_size_button = nullptr;
AcceptDialog *branch_create_confirm = nullptr;
@@ -150,13 +150,14 @@ private:
void _update_opened_tabs();
void _update_extra_options();
- bool _load_plugin(String p_name, String p_project_path);
+ bool _load_plugin(String p_name);
void _pull();
void _push();
void _force_push();
void _fetch();
void _commit();
+ void _confirm_discard_all();
void _discard_all();
void _refresh_stage_area();
void _refresh_branch_list();
@@ -193,7 +194,6 @@ private:
void _create_vcs_metadata_files();
void _popup_file_dialog(Variant p_file_dialog_variant);
void _toggle_vcs_integration(bool p_toggled);
- void _project_path_selected(String p_project_path);
friend class EditorVCSInterface;
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 2af8da02a3..96b1ad7ee0 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -1,62 +1,62 @@
-/*************************************************************************/
-/* visual_shader_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* visual_shader_editor_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 "visual_shader_editor_plugin.h"
#include "core/config/project_settings.h"
#include "core/core_string_names.h"
-#include "core/input/input.h"
#include "core/io/resource_loader.h"
#include "core/math/math_defs.h"
#include "core/os/keyboard.h"
-#include "editor/editor_log.h"
#include "editor/editor_node.h"
#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
+#include "editor/inspector_dock.h"
#include "editor/plugins/curve_editor_plugin.h"
#include "editor/plugins/shader_editor_plugin.h"
-#include "scene/animation/animation_player.h"
#include "scene/gui/button.h"
+#include "scene/gui/check_box.h"
#include "scene/gui/code_edit.h"
#include "scene/gui/graph_edit.h"
#include "scene/gui/menu_button.h"
-#include "scene/gui/panel.h"
+#include "scene/gui/option_button.h"
#include "scene/gui/popup.h"
#include "scene/gui/rich_text_label.h"
+#include "scene/gui/separator.h"
#include "scene/gui/tree.h"
#include "scene/gui/view_panner.h"
#include "scene/main/window.h"
#include "scene/resources/visual_shader_nodes.h"
#include "scene/resources/visual_shader_particle_nodes.h"
-#include "scene/resources/visual_shader_sdf_nodes.h"
#include "servers/display_server.h"
#include "servers/rendering/shader_types.h"
@@ -86,11 +86,9 @@ void VisualShaderNodePlugin::set_editor(VisualShaderEditor *p_editor) {
}
Control *VisualShaderNodePlugin::create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node) {
- Object *ret;
- if (GDVIRTUAL_CALL(_create_editor, p_parent_resource, p_node, ret)) {
- return Object::cast_to<Control>(ret);
- }
- return nullptr;
+ Object *ret = nullptr;
+ GDVIRTUAL_CALL(_create_editor, p_parent_resource, p_node, ret);
+ return Object::cast_to<Control>(ret);
}
void VisualShaderNodePlugin::_bind_methods() {
@@ -131,30 +129,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));
@@ -164,9 +164,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);
}
}
}
@@ -179,8 +179,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) {
@@ -271,6 +271,19 @@ void VisualShaderGraphPlugin::set_expression(VisualShader::Type p_type, int p_no
links[p_node_id].expression_edit->set_text(p_expression);
}
+Ref<Script> VisualShaderGraphPlugin::get_node_script(int p_node_id) const {
+ if (!links.has(p_node_id)) {
+ return Ref<Script>();
+ }
+
+ Ref<VisualShaderNodeCustom> custom = Ref<VisualShaderNodeCustom>(links[p_node_id].visual_node);
+ if (custom.is_valid()) {
+ return custom->get_script();
+ }
+
+ return Ref<Script>();
+}
+
void VisualShaderGraphPlugin::update_node_size(int p_node_id) {
if (!links.has(p_node_id)) {
return;
@@ -294,8 +307,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);
}
}
}
@@ -318,14 +331,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 } });
}
@@ -345,7 +350,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;
}
@@ -364,6 +369,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
static const Color type_color[] = {
Color(0.38, 0.85, 0.96), // scalar (float)
Color(0.49, 0.78, 0.94), // scalar (int)
+ Color(0.20, 0.88, 0.67), // scalar (uint)
Color(0.74, 0.57, 0.95), // vector2
Color(0.84, 0.49, 0.93), // vector3
Color(1.0, 0.125, 0.95), // vector4
@@ -412,7 +418,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();
@@ -734,6 +751,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
hb->add_child(type_box);
type_box->add_item(TTR("Float"));
type_box->add_item(TTR("Int"));
+ type_box->add_item(TTR("UInt"));
type_box->add_item(TTR("Vector2"));
type_box->add_item(TTR("Vector3"));
type_box->add_item(TTR("Vector4"));
@@ -797,6 +815,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
hb->add_child(type_box);
type_box->add_item(TTR("Float"));
type_box->add_item(TTR("Int"));
+ type_box->add_item(TTR("UInt"));
type_box->add_item(TTR("Vector2"));
type_box->add_item(TTR("Vector3"));
type_box->add_item(TTR("Vector4"));
@@ -818,8 +837,8 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
if (vsnode->is_output_port_expandable(i)) {
TextureButton *expand = memnew(TextureButton);
expand->set_toggle_mode(true);
- expand->set_normal_texture(editor->get_theme_icon(SNAME("GuiTreeArrowDown"), SNAME("EditorIcons")));
- expand->set_pressed_texture(editor->get_theme_icon(SNAME("GuiTreeArrowRight"), SNAME("EditorIcons")));
+ expand->set_texture_normal(editor->get_theme_icon(SNAME("GuiTreeArrowDown"), SNAME("EditorIcons")));
+ expand->set_texture_pressed(editor->get_theme_icon(SNAME("GuiTreeArrowRight"), SNAME("EditorIcons")));
expand->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
expand->set_pressed(vsnode->_is_output_port_expanded(i));
expand->connect("pressed", callable_mp(editor, &VisualShaderEditor::_expand_output_port).bind(p_id, i, !vsnode->_is_output_port_expanded(i)), CONNECT_DEFERRED);
@@ -828,8 +847,8 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
if (vsnode->has_output_port_preview(i) && port_right != VisualShaderNode::PORT_TYPE_TRANSFORM && port_right != VisualShaderNode::PORT_TYPE_SAMPLER) {
TextureButton *preview = memnew(TextureButton);
preview->set_toggle_mode(true);
- preview->set_normal_texture(editor->get_theme_icon(SNAME("GuiVisibilityHidden"), SNAME("EditorIcons")));
- preview->set_pressed_texture(editor->get_theme_icon(SNAME("GuiVisibilityVisible"), SNAME("EditorIcons")));
+ preview->set_texture_normal(editor->get_theme_icon(SNAME("GuiVisibilityHidden"), SNAME("EditorIcons")));
+ preview->set_texture_pressed(editor->get_theme_icon(SNAME("GuiVisibilityVisible"), SNAME("EditorIcons")));
preview->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
register_output_port(p_id, j, preview);
@@ -1024,11 +1043,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);
+ }
}
}
@@ -1115,6 +1136,8 @@ void VisualShaderEditor::edit(VisualShader *p_visual_shader) {
}
visual_shader->set_graph_offset(graph->get_scroll_ofs() / EDSCALE);
_set_mode(visual_shader->get_mode());
+
+ _update_nodes();
} else {
if (visual_shader.is_valid()) {
Callable ce = callable_mp(this, &VisualShaderEditor::_update_preview);
@@ -1137,10 +1160,6 @@ void VisualShaderEditor::edit(VisualShader *p_visual_shader) {
}
}
-void VisualShaderEditor::update_nodes() {
- _update_nodes();
-}
-
void VisualShaderEditor::add_plugin(const Ref<VisualShaderNodePlugin> &p_plugin) {
if (plugins.has(p_plugin)) {
return;
@@ -1202,6 +1221,228 @@ void VisualShaderEditor::add_custom_type(const String &p_name, const Ref<Script>
add_options.push_back(ao);
}
+Dictionary VisualShaderEditor::get_custom_node_data(Ref<VisualShaderNodeCustom> &p_custom_node) {
+ Dictionary dict;
+ dict["script"] = p_custom_node->get_script();
+
+ String name;
+ if (p_custom_node->has_method("_get_name")) {
+ name = (String)p_custom_node->call("_get_name");
+ } else {
+ name = "Unnamed";
+ }
+ dict["name"] = name;
+
+ String description = "";
+ if (p_custom_node->has_method("_get_description")) {
+ description = (String)p_custom_node->call("_get_description");
+ }
+ dict["description"] = description;
+
+ int return_icon_type = -1;
+ if (p_custom_node->has_method("_get_return_icon_type")) {
+ return_icon_type = (int)p_custom_node->call("_get_return_icon_type");
+ }
+ dict["return_icon_type"] = return_icon_type;
+
+ String category = "";
+ if (p_custom_node->has_method("_get_category")) {
+ category = (String)p_custom_node->call("_get_category");
+ }
+ category = category.rstrip("/");
+ category = category.lstrip("/");
+ category = "Addons/" + category;
+
+ String subcategory = "";
+ if (p_custom_node->has_method("_get_subcategory")) {
+ subcategory = (String)p_custom_node->call("_get_subcategory");
+ }
+ if (!subcategory.is_empty()) {
+ category += "/" + subcategory;
+ }
+ dict["category"] = category;
+
+ bool highend = false;
+ if (p_custom_node->has_method("_is_highend")) {
+ highend = (bool)p_custom_node->call("_is_highend");
+ }
+ dict["highend"] = highend;
+
+ 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") {
+ return;
+ }
+
+ Ref<VisualShaderNodeCustom> ref;
+ ref.instantiate();
+ ref->set_script(scr);
+ 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) {
+ add_options.remove_at(i);
+ _update_options_menu();
+ // TODO: Make indication for the existed custom nodes with that script on graph to be disabled.
+ break;
+ }
+ }
+ return;
+ }
+ Dictionary dict = get_custom_node_data(ref);
+
+ 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) {
+ found_type = true;
+
+ add_options.write[i].name = dict["name"];
+ add_options.write[i].return_type = dict["return_icon_type"];
+ add_options.write[i].description = dict["description"];
+ 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;
+
+ for (int t = type_offset; t < max_type; t++) {
+ VisualShader::Type type = (VisualShader::Type)t;
+ Vector<int> nodes = visual_shader->get_node_list(type);
+
+ List<VisualShader::Connection> node_connections;
+ visual_shader->get_node_connections(type, &node_connections);
+
+ 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 to = E.to_node;
+ int to_idx = 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 });
+ }
+ }
+
+ for (int j = 0; j < nodes.size(); j++) {
+ int node_id = nodes[j];
+
+ 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;
+ }
+ need_rebuild = true;
+
+ // Removes invalid connections.
+ {
+ int prev_input_port_count = custom_node->get_input_port_count();
+ int prev_output_port_count = custom_node->get_output_port_count();
+
+ custom_node->update_ports();
+
+ int input_port_count = custom_node->get_input_port_count();
+ int output_port_count = custom_node->get_output_port_count();
+
+ if (output_port_count != prev_output_port_count) {
+ for (const VisualShader::Connection &E : custom_node_output_connections) {
+ int from = E.from_node;
+ int from_idx = E.from_port;
+ int to = E.to_node;
+ int to_idx = E.to_port;
+
+ if (from_idx >= output_port_count) {
+ visual_shader->disconnect_nodes(type, from, from_idx, to, to_idx);
+ graph_plugin->disconnect_nodes(type, from, from_idx, to, to_idx);
+ }
+ }
+ }
+ if (input_port_count != prev_input_port_count) {
+ for (const VisualShader::Connection &E : custom_node_input_connections) {
+ int from = E.from_node;
+ int from_idx = E.from_port;
+ int to = E.to_node;
+ int to_idx = E.to_port;
+
+ if (to_idx >= input_port_count) {
+ visual_shader->disconnect_nodes(type, from, from_idx, to, to_idx);
+ graph_plugin->disconnect_nodes(type, from, from_idx, to, to_idx);
+ }
+ }
+ }
+ }
+
+ graph_plugin->update_node(type, node_id);
+ }
+ }
+ break;
+ }
+ }
+
+ if (!found_type) {
+ add_custom_type(dict["name"], dict["script"], dict["description"], dict["return_icon_type"], dict["category"], dict["highend"]);
+ }
+
+ // To prevent updating options multiple times when multiple scripts are saved.
+ if (!_block_update_options_menu) {
+ _block_update_options_menu = true;
+
+ call_deferred(SNAME("_update_options_menu_deferred"));
+ }
+
+ // To prevent rebuilding the shader multiple times when multiple scripts are saved.
+ if (need_rebuild && !_block_rebuild_shader) {
+ _block_rebuild_shader = true;
+
+ call_deferred(SNAME("_rebuild_shader_deferred"));
+ }
+}
+
+void VisualShaderEditor::_update_options_menu_deferred() {
+ _update_options_menu();
+
+ _block_update_options_menu = false;
+}
+
+void VisualShaderEditor::_rebuild_shader_deferred() {
+ if (visual_shader.is_valid()) {
+ visual_shader->rebuild();
+ }
+
+ _block_rebuild_shader = false;
+}
+
bool VisualShaderEditor::_is_available(int p_mode) {
int current_mode = edit_type->get_selected();
@@ -1235,65 +1476,18 @@ void VisualShaderEditor::_update_nodes() {
Ref<Resource> res = ResourceLoader::load(script_path);
ERR_FAIL_COND(res.is_null());
ERR_FAIL_COND(!res->is_class("Script"));
- Ref<Script> script = Ref<Script>(res);
+ Ref<Script> scr = Ref<Script>(res);
Ref<VisualShaderNodeCustom> ref;
ref.instantiate();
- ref->set_script(script);
+ ref->set_script(scr);
if (!ref->is_available(visual_shader->get_mode(), visual_shader->get_shader_type())) {
continue;
}
-
- String name;
- if (ref->has_method("_get_name")) {
- name = (String)ref->call("_get_name");
- } else {
- name = "Unnamed";
- }
-
- String description = "";
- if (ref->has_method("_get_description")) {
- description = (String)ref->call("_get_description");
- }
-
- int return_icon_type = -1;
- if (ref->has_method("_get_return_icon_type")) {
- return_icon_type = (int)ref->call("_get_return_icon_type");
- }
-
- String category = "";
- if (ref->has_method("_get_category")) {
- category = (String)ref->call("_get_category");
- }
-
- String subcategory = "";
- if (ref->has_method("_get_subcategory")) {
- subcategory = (String)ref->call("_get_subcategory");
- }
-
- bool highend = false;
- if (ref->has_method("_is_highend")) {
- highend = (bool)ref->call("_is_highend");
- }
-
- Dictionary dict;
- dict["name"] = name;
- dict["script"] = script;
- dict["description"] = description;
- dict["return_icon_type"] = return_icon_type;
-
- category = category.rstrip("/");
- category = category.lstrip("/");
- category = "Addons/" + category;
- if (!subcategory.is_empty()) {
- category += "/" + subcategory;
- }
-
- dict["category"] = category;
- dict["highend"] = highend;
+ Dictionary dict = get_custom_node_data(ref);
String key;
- key = category + "/" + name;
+ key = String(dict["category"]) + "/" + String(dict["name"]);
added[key] = dict;
}
@@ -1358,7 +1552,7 @@ void VisualShaderEditor::_update_options_menu() {
Color unsupported_color = get_theme_color(SNAME("error_color"), SNAME("Editor"));
Color supported_color = get_theme_color(SNAME("warning_color"), SNAME("Editor"));
- static bool low_driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "opengl3";
+ static bool low_driver = GLOBAL_GET("rendering/renderer/rendering_method") == "gl_compatibility";
HashMap<String, TreeItem *> folders;
@@ -1516,6 +1710,9 @@ void VisualShaderEditor::_update_options_menu() {
case VisualShaderNode::PORT_TYPE_SCALAR_INT:
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("int"), SNAME("EditorIcons")));
break;
+ case VisualShaderNode::PORT_TYPE_SCALAR_UINT:
+ item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("uint"), SNAME("EditorIcons")));
+ break;
case VisualShaderNode::PORT_TYPE_VECTOR_2D:
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Vector2"), SNAME("EditorIcons")));
break;
@@ -1624,6 +1821,7 @@ void VisualShaderEditor::_update_parameters(bool p_update_refs) {
if (parameter.is_valid()) {
Ref<VisualShaderNodeFloatParameter> float_parameter = vsnode;
Ref<VisualShaderNodeIntParameter> int_parameter = vsnode;
+ Ref<VisualShaderNodeUIntParameter> uint_parameter = vsnode;
Ref<VisualShaderNodeVec2Parameter> vec2_parameter = vsnode;
Ref<VisualShaderNodeVec3Parameter> vec3_parameter = vsnode;
Ref<VisualShaderNodeVec4Parameter> vec4_parameter = vsnode;
@@ -1636,6 +1834,8 @@ void VisualShaderEditor::_update_parameters(bool p_update_refs) {
parameter_type = VisualShaderNodeParameterRef::PARAMETER_TYPE_FLOAT;
} else if (int_parameter.is_valid()) {
parameter_type = VisualShaderNodeParameterRef::PARAMETER_TYPE_INT;
+ } else if (uint_parameter.is_valid()) {
+ parameter_type = VisualShaderNodeParameterRef::PARAMETER_TYPE_UINT;
} else if (boolean_parameter.is_valid()) {
parameter_type = VisualShaderNodeParameterRef::PARAMETER_TYPE_BOOLEAN;
} else if (vec2_parameter.is_valid()) {
@@ -1661,6 +1861,7 @@ void VisualShaderEditor::_update_parameters(bool p_update_refs) {
}
void VisualShaderEditor::_update_parameter_refs(HashSet<String> &p_deleted_names) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
for (int i = 0; i < VisualShader::TYPE_MAX; i++) {
VisualShader::Type type = VisualShader::Type(i);
@@ -1705,9 +1906,9 @@ void VisualShaderEditor::_update_graph() {
}
}
- List<VisualShader::Connection> connections;
- visual_shader->get_node_connections(type, &connections);
- graph_plugin->set_connections(connections);
+ List<VisualShader::Connection> node_connections;
+ visual_shader->get_node_connections(type, &node_connections);
+ graph_plugin->set_connections(node_connections);
Vector<int> nodes = visual_shader->get_node_list(type);
@@ -1715,16 +1916,13 @@ 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 : connections) {
+ for (const VisualShader::Connection &E : node_connections) {
int from = E.from_node;
int from_idx = E.from_port;
int to = E.to_node;
@@ -1733,9 +1931,9 @@ void VisualShaderEditor::_update_graph() {
graph->connect_node(itos(from), from_idx, itos(to), to_idx);
}
- float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
+ float graph_minimap_opacity = EDITOR_GET("editors/visual_editors/minimap_opacity");
graph->set_minimap_opacity(graph_minimap_opacity);
- float graph_lines_curvature = EditorSettings::get_singleton()->get("editors/visual_editors/lines_curvature");
+ float graph_lines_curvature = EDITOR_GET("editors/visual_editors/lines_curvature");
graph->set_connection_lines_curvature(graph_lines_curvature);
}
@@ -1760,6 +1958,7 @@ void VisualShaderEditor::_add_input_port(int p_node, int p_port, int p_port_type
return;
}
+ 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);
@@ -1775,6 +1974,7 @@ void VisualShaderEditor::_add_output_port(int p_node, int p_port, int p_port_typ
return;
}
+ 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);
@@ -1790,6 +1990,7 @@ void VisualShaderEditor::_change_input_port_type(int p_type, int p_node, int p_p
return;
}
+ 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));
@@ -1805,6 +2006,7 @@ void VisualShaderEditor::_change_output_port_type(int p_type, int p_node, int p_
return;
}
+ 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));
@@ -1833,6 +2035,7 @@ void VisualShaderEditor::_change_input_port_name(const String &p_text, Object *p
return;
}
+ 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));
@@ -1859,6 +2062,7 @@ void VisualShaderEditor::_change_output_port_name(const String &p_text, Object *
return;
}
+ 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);
@@ -1871,6 +2075,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());
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (p_expand) {
undo_redo->create_action(TTR("Expand Output Port"));
} else {
@@ -1899,45 +2104,45 @@ void VisualShaderEditor::_expand_output_port(int p_node, int p_port, bool p_expa
visual_shader->get_node_connections(type, &conns);
for (const VisualShader::Connection &E : conns) {
- int from_node = E.from_node;
- int from_port = E.from_port;
- int to_node = E.to_node;
- int to_port = E.to_port;
+ int cn_from_node = E.from_node;
+ int cn_from_port = E.from_port;
+ int cn_to_node = E.to_node;
+ int cn_to_port = E.to_port;
- if (from_node == p_node) {
+ if (cn_from_node == p_node) {
if (p_expand) {
- if (from_port > p_port) { // reconnect ports after expanded ports
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port);
+ if (cn_from_port > p_port) { // reconnect ports after expanded ports
+ undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port);
+ undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
- undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port + type_size, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port + type_size, to_node, to_port);
+ undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes_forced", type, cn_from_node, cn_from_port + type_size, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port + type_size, cn_to_node, cn_to_port);
- undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port + type_size, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port + type_size, to_node, to_port);
+ undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port + type_size, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port + type_size, cn_to_node, cn_to_port);
}
} else {
- if (from_port > p_port + type_size) { // reconnect ports after expanded ports
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port);
+ if (cn_from_port > p_port + type_size) { // reconnect ports after expanded ports
+ undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port);
+ undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
- undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes", type, from_node, from_port - type_size, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port - type_size, to_node, to_port);
+ undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes", type, cn_from_node, cn_from_port - type_size, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port - type_size, cn_to_node, cn_to_port);
- undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port - type_size, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port - type_size, to_node, to_port);
- } else if (from_port > p_port) { // disconnect component ports
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port);
+ undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port - type_size, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port - type_size, cn_to_node, cn_to_port);
+ } else if (cn_from_port > p_port) { // disconnect component ports
+ undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port);
+ undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
}
}
}
@@ -1968,35 +2173,36 @@ void VisualShaderEditor::_remove_input_port(int p_node, int p_port) {
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Input Port"));
List<VisualShader::Connection> conns;
visual_shader->get_node_connections(type, &conns);
for (const VisualShader::Connection &E : conns) {
- int from_node = E.from_node;
- int from_port = E.from_port;
- int to_node = E.to_node;
- int to_port = E.to_port;
-
- if (to_node == p_node) {
- if (to_port == p_port) {
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port);
-
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port);
- } else if (to_port > p_port) {
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port);
-
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port);
-
- undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port - 1);
- undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port - 1);
-
- undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port - 1);
- undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port - 1);
+ int cn_from_node = E.from_node;
+ int cn_from_port = E.from_port;
+ int cn_to_node = E.to_node;
+ int cn_to_port = E.to_port;
+
+ if (cn_to_node == p_node) {
+ if (cn_to_port == p_port) {
+ undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+
+ undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ } else if (cn_to_port > p_port) {
+ undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+
+ undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+
+ undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes_forced", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port - 1);
+ undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port - 1);
+
+ undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port - 1);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port - 1);
}
}
}
@@ -2017,35 +2223,36 @@ void VisualShaderEditor::_remove_output_port(int p_node, int p_port) {
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Output Port"));
List<VisualShader::Connection> conns;
visual_shader->get_node_connections(type, &conns);
for (const VisualShader::Connection &E : conns) {
- int from_node = E.from_node;
- int from_port = E.from_port;
- int to_node = E.to_node;
- int to_port = E.to_port;
-
- if (from_node == p_node) {
- if (from_port == p_port) {
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port);
-
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port);
- } else if (from_port > p_port) {
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port, to_node, to_port);
-
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port);
-
- undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes_forced", type, from_node, from_port - 1, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port - 1, to_node, to_port);
-
- undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port - 1, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port - 1, to_node, to_port);
+ int cn_from_node = E.from_node;
+ int cn_from_port = E.from_port;
+ int cn_to_node = E.to_node;
+ int cn_to_port = E.to_port;
+
+ if (cn_from_node == p_node) {
+ if (cn_from_port == p_port) {
+ undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+
+ undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ } else if (cn_from_port > p_port) {
+ undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes_forced", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+
+ undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+
+ undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes_forced", type, cn_from_node, cn_from_port - 1, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port - 1, cn_to_node, cn_to_port);
+
+ undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port - 1, cn_to_node, cn_to_port);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port - 1, cn_to_node, cn_to_port);
}
}
}
@@ -2083,6 +2290,7 @@ void VisualShaderEditor::_expression_focus_out(Object *code_edit, int p_node) {
return;
}
+ 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());
@@ -2146,6 +2354,7 @@ void VisualShaderEditor::_node_resized(const Vector2 &p_new_size, int p_type, in
return;
}
+ 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());
@@ -2162,6 +2371,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
}
+ 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);
@@ -2207,6 +2417,7 @@ void VisualShaderEditor::_comment_title_popup_hide() {
if (node->get_title() == comment_title_change_edit->get_text()) {
return; // nothing changed - ignored
}
+ 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());
@@ -2249,6 +2460,7 @@ void VisualShaderEditor::_comment_desc_popup_hide() {
if (node->get_description() == comment_desc_change_edit->get_text()) {
return; // nothing changed - ignored
}
+ 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());
@@ -2269,6 +2481,7 @@ void VisualShaderEditor::_parameter_line_edit_changed(const String &p_text, int
return;
}
+ 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());
@@ -2304,6 +2517,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());
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set Input Default Port"));
Ref<VisualShaderNodeCustom> custom = Object::cast_to<VisualShaderNodeCustom>(vsn.ptr());
@@ -2472,6 +2686,28 @@ void VisualShaderEditor::_setup_node(VisualShaderNode *p_node, const Vector<Vari
}
}
+ // UINT_OP
+ {
+ VisualShaderNodeUIntOp *uintOp = Object::cast_to<VisualShaderNodeUIntOp>(p_node);
+
+ if (uintOp) {
+ ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT);
+ uintOp->set_operator((VisualShaderNodeUIntOp::Operator)(int)p_ops[0]);
+ return;
+ }
+ }
+
+ // UINT_FUNC
+ {
+ VisualShaderNodeUIntFunc *uintFunc = Object::cast_to<VisualShaderNodeUIntFunc>(p_node);
+
+ if (uintFunc) {
+ ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT);
+ uintFunc->set_function((VisualShaderNodeUIntFunc::Function)(int)p_ops[0]);
+ return;
+ }
+ }
+
// TRANSFORM_OP
{
VisualShaderNodeTransformOp *matOp = Object::cast_to<VisualShaderNodeTransformOp>(p_node);
@@ -2727,6 +2963,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);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (p_resource_path.is_empty()) {
undo_redo->create_action(TTR("Add Node to Visual Shader"));
} else {
@@ -2734,12 +2971,12 @@ 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) {
- undo_redo->add_do_method(expr, "set_size", Size2(250 * EDSCALE, 150 * EDSCALE));
+ expr->set_size(Size2(250 * EDSCALE, 150 * EDSCALE));
}
bool created_expression_port = false;
@@ -2748,9 +2985,7 @@ void VisualShaderEditor::_add_node(int p_idx, const Vector<Variant> &p_ops, Stri
VisualShaderNode::PortType input_port_type = visual_shader->get_node(type, to_node)->get_input_port_type(to_slot);
if (expr && expr->is_editable() && input_port_type != VisualShaderNode::PORT_TYPE_SAMPLER) {
- undo_redo->add_do_method(expr, "add_output_port", 0, input_port_type, "output0");
- undo_redo->add_undo_method(expr, "remove_output_port", 0);
-
+ expr->add_output_port(0, input_port_type, "output0");
String initial_expression_code;
switch (input_port_type) {
@@ -2760,6 +2995,9 @@ void VisualShaderEditor::_add_node(int p_idx, const Vector<Variant> &p_ops, Stri
case VisualShaderNode::PORT_TYPE_SCALAR_INT:
initial_expression_code = "output0 = 1;";
break;
+ case VisualShaderNode::PORT_TYPE_SCALAR_UINT:
+ initial_expression_code = "output0 = 1u;";
+ break;
case VisualShaderNode::PORT_TYPE_VECTOR_2D:
initial_expression_code = "output0 = vec2(1.0, 1.0);";
break;
@@ -2779,9 +3017,8 @@ void VisualShaderEditor::_add_node(int p_idx, const Vector<Variant> &p_ops, Stri
break;
}
- undo_redo->add_do_method(expr, "set_expression", initial_expression_code);
- undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, id_to_use);
-
+ expr->set_expression(initial_expression_code);
+ expr->set_size(Size2(500 * EDSCALE, 200 * EDSCALE));
created_expression_port = true;
}
if (vsnode->get_output_port_count() > 0 || created_expression_port) {
@@ -2817,10 +3054,7 @@ void VisualShaderEditor::_add_node(int p_idx, const Vector<Variant> &p_ops, Stri
VisualShaderNode::PortType output_port_type = visual_shader->get_node(type, from_node)->get_output_port_type(from_slot);
if (expr && expr->is_editable()) {
- undo_redo->add_do_method(expr, "add_input_port", 0, output_port_type, "input0");
- undo_redo->add_undo_method(expr, "remove_input_port", 0);
- undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, id_to_use);
-
+ expr->add_input_port(0, output_port_type, "input0");
created_expression_port = true;
}
@@ -2896,6 +3130,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) {
+ 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);
@@ -2930,18 +3165,19 @@ void VisualShaderEditor::_add_varying(const String &p_name, VisualShader::Varyin
}
void VisualShaderEditor::_remove_varying(const String &p_name) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(vformat(TTR("Remove Varying from Visual Shader: %s"), p_name));
- VisualShader::VaryingMode mode = visual_shader->get_varying_mode(p_name);
+ VisualShader::VaryingMode var_mode = visual_shader->get_varying_mode(p_name);
undo_redo->add_do_method(visual_shader.ptr(), "remove_varying", p_name);
- undo_redo->add_undo_method(visual_shader.ptr(), "add_varying", p_name, mode, visual_shader->get_varying_type(p_name));
+ undo_redo->add_undo_method(visual_shader.ptr(), "add_varying", p_name, var_mode, visual_shader->get_varying_type(p_name));
undo_redo->add_do_method(this, "_update_varyings");
undo_redo->add_undo_method(this, "_update_varyings");
for (int i = 0; i <= VisualShader::TYPE_LIGHT; i++) {
- if (mode == VisualShader::VARYING_MODE_FRAG_TO_LIGHT && i == 0) {
+ if (var_mode == VisualShader::VARYING_MODE_FRAG_TO_LIGHT && i == 0) {
continue;
}
@@ -2967,10 +3203,10 @@ void VisualShaderEditor::_remove_varying(const String &p_name) {
}
}
- List<VisualShader::Connection> connections;
- visual_shader->get_node_connections(type, &connections);
+ List<VisualShader::Connection> node_connections;
+ visual_shader->get_node_connections(type, &node_connections);
- for (VisualShader::Connection &E : connections) {
+ for (VisualShader::Connection &E : node_connections) {
Ref<VisualShaderNodeVaryingGetter> var_getter = Object::cast_to<VisualShaderNodeVaryingGetter>(visual_shader->get_node(type, E.from_node).ptr());
if (var_getter.is_valid() && E.from_port > 0) {
undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
@@ -3017,6 +3253,7 @@ void VisualShaderEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_t
void VisualShaderEditor::_nodes_dragged() {
drag_dirty = false;
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Node(s) Moved"));
for (const DragOp &E : drag_buffer) {
@@ -3040,6 +3277,7 @@ void VisualShaderEditor::_connection_request(const String &p_from, int p_from_in
return;
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Nodes Connected"));
List<VisualShader::Connection> conns;
@@ -3071,6 +3309,7 @@ void VisualShaderEditor::_disconnection_request(const String &p_from, int p_from
int from = p_from.to_int();
int to = p_to.to_int();
+ 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);
@@ -3110,6 +3349,7 @@ void VisualShaderEditor::_delete_nodes(int p_type, const List<int> &p_nodes) {
List<VisualShader::Connection> conns;
visual_shader->get_node_connections(type, &conns);
+ 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) {
@@ -3125,21 +3365,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);
-
- // restore size, inputs and outputs if node is group
- VisualShaderNodeGroupBase *group = Object::cast_to<VisualShaderNodeGroupBase>(node.ptr());
- if (group) {
- undo_redo->add_undo_method(group, "set_size", group->get_size());
- undo_redo->add_undo_method(group, "set_inputs", group->get_inputs());
- undo_redo->add_undo_method(group, "set_outputs", group->get_outputs());
- }
-
- // restore expression text if node is expression
- VisualShaderNodeExpression *expression = Object::cast_to<VisualShaderNodeExpression>(node.ptr());
- if (expression) {
- undo_redo->add_undo_method(expression, "set_expression", expression->get_expression());
- }
+ undo_redo->add_undo_method(graph_plugin.ptr(), "add_node", type, F, false);
VisualShaderNodeParameter *parameter = Object::cast_to<VisualShaderNodeParameter>(node.ptr());
if (parameter) {
@@ -3169,7 +3395,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
@@ -3182,6 +3408,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) {
+ 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);
}
@@ -3216,6 +3443,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();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (!p_vice_versa) {
undo_redo->create_action(TTR("Convert Constant Node(s) To Parameter(s)"));
} else {
@@ -3414,6 +3642,7 @@ void VisualShaderEditor::_delete_node_request(int p_type, int p_node) {
List<int> to_erase;
to_erase.push_back(p_node);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete VisualShader Node"));
_delete_nodes(p_type, to_erase);
undo_redo->commit_action();
@@ -3442,6 +3671,7 @@ void VisualShaderEditor::_delete_nodes_request(const TypedArray<StringName> &p_n
return;
}
+ 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();
@@ -3625,12 +3855,6 @@ void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos, VisualShaderNod
node_filter->select_all();
}
-void VisualShaderEditor::_show_varying_menu() {
- varying_options->set_item_disabled(int(VaryingMenuOptions::REMOVE), visual_shader->get_varyings_count() == 0);
- varying_options->set_position(graph->get_screen_position() + varying_button->get_position() + Size2(0, varying_button->get_size().height));
- varying_options->popup();
-}
-
void VisualShaderEditor::_varying_menu_id_pressed(int p_idx) {
switch (VaryingMenuOptions(p_idx)) {
case VaryingMenuOptions::ADD: {
@@ -3679,10 +3903,10 @@ void VisualShaderEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
void VisualShaderEditor::_notification(int p_what) {
switch (p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- graph->get_panner()->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/sub_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
- graph->set_warped_panning(bool(EditorSettings::get_singleton()->get("editors/panning/warped_mouse_panning")));
- graph->set_minimap_opacity(EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity"));
- graph->set_connection_lines_curvature(EditorSettings::get_singleton()->get("editors/visual_editors/lines_curvature"));
+ graph->get_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")));
+ graph->set_warped_panning(bool(EDITOR_GET("editors/panning/warped_mouse_panning")));
+ graph->set_minimap_opacity(EDITOR_GET("editors/visual_editors/minimap_opacity"));
+ graph->set_connection_lines_curvature(EDITOR_GET("editors/visual_editors/lines_curvature"));
_update_graph();
} break;
@@ -3702,12 +3926,12 @@ void VisualShaderEditor::_notification(int p_what) {
category = category->get_next();
}
- graph->get_panner()->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/sub_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
- graph->set_warped_panning(bool(EditorSettings::get_singleton()->get("editors/panning/warped_mouse_panning")));
+ graph->get_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")));
+ graph->set_warped_panning(bool(EDITOR_GET("editors/panning/warped_mouse_panning")));
[[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
- highend_label->set_modulate(get_theme_color(SNAME("vulkan_color"), SNAME("Editor")));
+ highend_label->set_modulate(get_theme_color(SNAME("highend_color"), SNAME("Editor")));
node_filter->set_right_icon(Control::get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
@@ -3847,10 +4071,10 @@ void VisualShaderEditor::_dup_copy_nodes(int p_type, List<CopyItem> &r_items, Li
}
}
- List<VisualShader::Connection> connections;
- visual_shader->get_node_connections(type, &connections);
+ List<VisualShader::Connection> node_connections;
+ visual_shader->get_node_connections(type, &node_connections);
- for (const VisualShader::Connection &E : connections) {
+ for (const VisualShader::Connection &E : node_connections) {
if (nodes.has(E.from_node) && nodes.has(E.to_node)) {
r_connections.push_back(E);
}
@@ -3860,6 +4084,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) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (p_duplicate) {
undo_redo->create_action(TTR("Duplicate VisualShader Node(s)"));
} else {
@@ -3910,7 +4135,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++;
@@ -3932,7 +4157,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++;
}
@@ -3961,15 +4186,15 @@ void VisualShaderEditor::_duplicate_nodes() {
int type = get_current_shader_type();
List<CopyItem> items;
- List<VisualShader::Connection> connections;
+ List<VisualShader::Connection> node_connections;
- _dup_copy_nodes(type, items, connections);
+ _dup_copy_nodes(type, items, node_connections);
if (items.is_empty()) {
return;
}
- _dup_paste_nodes(type, items, connections, Vector2(10, 10) * EDSCALE, true);
+ _dup_paste_nodes(type, items, node_connections, Vector2(10, 10) * EDSCALE, true);
}
void VisualShaderEditor::_copy_nodes(bool p_cut) {
@@ -3978,6 +4203,7 @@ void VisualShaderEditor::_copy_nodes(bool p_cut) {
_dup_copy_nodes(get_current_shader_type(), copy_items_buffer, copy_connections_buffer);
if (p_cut) {
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Cut VisualShader Node(s)"));
List<int> ids;
@@ -4064,11 +4290,11 @@ void VisualShaderEditor::_input_select_item(Ref<VisualShaderNodeInput> p_input,
bool type_changed = next_input_type != prev_input_type;
- Ref<EditorUndoRedoManager> undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Visual Shader Input Type Changed"));
+ EditorUndoRedoManager *undo_redo_man = EditorUndoRedoManager::get_singleton();
+ undo_redo_man->create_action(TTR("Visual Shader Input Type Changed"));
- undo_redo->add_do_method(p_input.ptr(), "set_input_name", p_name);
- undo_redo->add_undo_method(p_input.ptr(), "set_input_name", prev_name);
+ undo_redo_man->add_do_method(p_input.ptr(), "set_input_name", p_name);
+ undo_redo_man->add_undo_method(p_input.ptr(), "set_input_name", prev_name);
if (type_changed) {
for (int type_id = 0; type_id < VisualShader::TYPE_MAX; type_id++) {
@@ -4098,30 +4324,30 @@ void VisualShaderEditor::_input_select_item(Ref<VisualShaderNodeInput> p_input,
List<VisualShader::Connection> conns;
visual_shader->get_node_connections(type, &conns);
for (const VisualShader::Connection &E : conns) {
- int from_node = E.from_node;
- int from_port = E.from_port;
- int to_node = E.to_node;
- int to_port = E.to_port;
-
- if (from_node == id) {
- bool is_incompatible_types = !visual_shader->is_port_types_compatible(p_input->get_input_type_by_name(p_name), visual_shader->get_node(type, to_node)->get_input_port_type(to_port));
-
- if (is_incompatible_types || from_port > type_size) {
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_port, to_node, to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_port, to_node, to_port);
+ int cn_from_node = E.from_node;
+ int cn_from_port = E.from_port;
+ int cn_to_node = E.to_node;
+ int cn_to_port = E.to_port;
+
+ if (cn_from_node == id) {
+ bool is_incompatible_types = !visual_shader->is_port_types_compatible(p_input->get_input_type_by_name(p_name), visual_shader->get_node(type, cn_to_node)->get_input_port_type(cn_to_port));
+
+ if (is_incompatible_types || cn_from_port > type_size) {
+ undo_redo_man->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo_man->add_undo_method(visual_shader.ptr(), "connect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo_man->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
+ undo_redo_man->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, cn_from_node, cn_from_port, cn_to_node, cn_to_port);
}
}
}
- undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type_id, id);
- undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type_id, id);
+ undo_redo_man->add_do_method(graph_plugin.ptr(), "update_node", type_id, id);
+ undo_redo_man->add_undo_method(graph_plugin.ptr(), "update_node", type_id, id);
}
}
}
- undo_redo->commit_action();
+ undo_redo_man->commit_action();
}
void VisualShaderEditor::_parameter_ref_select_item(Ref<VisualShaderNodeParameterRef> p_parameter_ref, String p_name) {
@@ -4133,11 +4359,11 @@ 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 = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("ParameterRef Name Changed"));
+ EditorUndoRedoManager *undo_redo_man = EditorUndoRedoManager::get_singleton();
+ undo_redo_man->create_action(TTR("ParameterRef Name Changed"));
- undo_redo->add_do_method(p_parameter_ref.ptr(), "set_parameter_name", p_name);
- undo_redo->add_undo_method(p_parameter_ref.ptr(), "set_parameter_name", prev_name);
+ undo_redo_man->add_do_method(p_parameter_ref.ptr(), "set_parameter_name", p_name);
+ undo_redo_man->add_undo_method(p_parameter_ref.ptr(), "set_parameter_name", prev_name);
// update output port
for (int type_id = 0; type_id < VisualShader::TYPE_MAX; type_id++) {
@@ -4152,20 +4378,20 @@ void VisualShaderEditor::_parameter_ref_select_item(Ref<VisualShaderNodeParamete
if (visual_shader->is_port_types_compatible(p_parameter_ref->get_parameter_type_by_name(p_name), visual_shader->get_node(type, E.to_node)->get_input_port_type(E.to_port))) {
continue;
}
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
}
}
}
- undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type_id, id);
- undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type_id, id);
+ undo_redo_man->add_do_method(graph_plugin.ptr(), "update_node", type_id, id);
+ undo_redo_man->add_undo_method(graph_plugin.ptr(), "update_node", type_id, id);
break;
}
}
- undo_redo->commit_action();
+ undo_redo_man->commit_action();
}
void VisualShaderEditor::_varying_select_item(Ref<VisualShaderNodeVarying> p_varying, String p_name) {
@@ -4177,11 +4403,11 @@ void VisualShaderEditor::_varying_select_item(Ref<VisualShaderNodeVarying> p_var
bool is_getter = Ref<VisualShaderNodeVaryingGetter>(p_varying.ptr()).is_valid();
- Ref<EditorUndoRedoManager> undo_redo = EditorNode::get_undo_redo();
- undo_redo->create_action(TTR("Varying Name Changed"));
+ EditorUndoRedoManager *undo_redo_man = EditorUndoRedoManager::get_singleton();
+ undo_redo_man->create_action(TTR("Varying Name Changed"));
- undo_redo->add_do_method(p_varying.ptr(), "set_varying_name", p_name);
- undo_redo->add_undo_method(p_varying.ptr(), "set_varying_name", prev_name);
+ undo_redo_man->add_do_method(p_varying.ptr(), "set_varying_name", p_name);
+ undo_redo_man->add_undo_method(p_varying.ptr(), "set_varying_name", prev_name);
VisualShader::VaryingType vtype = p_varying->get_varying_type_by_name(p_name);
VisualShader::VaryingType prev_vtype = p_varying->get_varying_type_by_name(prev_name);
@@ -4189,8 +4415,8 @@ void VisualShaderEditor::_varying_select_item(Ref<VisualShaderNodeVarying> p_var
bool type_changed = vtype != prev_vtype;
if (type_changed) {
- undo_redo->add_do_method(p_varying.ptr(), "set_varying_type", vtype);
- undo_redo->add_undo_method(p_varying.ptr(), "set_varying_type", prev_vtype);
+ undo_redo_man->add_do_method(p_varying.ptr(), "set_varying_type", vtype);
+ undo_redo_man->add_undo_method(p_varying.ptr(), "set_varying_type", prev_vtype);
}
// update ports
@@ -4209,32 +4435,32 @@ void VisualShaderEditor::_varying_select_item(Ref<VisualShaderNodeVarying> p_var
if (visual_shader->is_port_types_compatible(p_varying->get_varying_type_by_name(p_name), visual_shader->get_node(type, E.to_node)->get_input_port_type(E.to_port))) {
continue;
}
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
}
} else {
if (E.to_node == id) {
if (visual_shader->is_port_types_compatible(p_varying->get_varying_type_by_name(p_name), visual_shader->get_node(type, E.from_node)->get_output_port_type(E.from_port))) {
continue;
}
- undo_redo->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
- undo_redo->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
- undo_redo->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
- undo_redo->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_do_method(visual_shader.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_undo_method(visual_shader.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_do_method(graph_plugin.ptr(), "disconnect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
+ undo_redo_man->add_undo_method(graph_plugin.ptr(), "connect_nodes", type, E.from_node, E.from_port, E.to_node, E.to_port);
}
}
}
}
- undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type_id, id);
- undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type_id, id);
+ undo_redo_man->add_do_method(graph_plugin.ptr(), "update_node", type_id, id);
+ undo_redo_man->add_undo_method(graph_plugin.ptr(), "update_node", type_id, id);
break;
}
}
- undo_redo->commit_action();
+ undo_redo_man->commit_action();
}
void VisualShaderEditor::_float_constant_selected(int p_which) {
@@ -4248,6 +4474,7 @@ void VisualShaderEditor::_float_constant_selected(int p_which) {
return; // same
}
+ 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());
@@ -4315,6 +4542,9 @@ void VisualShaderEditor::_update_varying_tree() {
case VisualShader::VARYING_TYPE_INT:
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("int"), SNAME("EditorIcons")));
break;
+ case VisualShader::VARYING_TYPE_UINT:
+ item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("uint"), SNAME("EditorIcons")));
+ break;
case VisualShader::VARYING_TYPE_VECTOR_2D:
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Vector2"), SNAME("EditorIcons")));
break;
@@ -4336,7 +4566,7 @@ void VisualShaderEditor::_update_varying_tree() {
}
}
- varying_options->set_item_disabled(int(VaryingMenuOptions::REMOVE), count == 0);
+ varying_button->get_popup()->set_item_disabled(int(VaryingMenuOptions::REMOVE), count == 0);
}
void VisualShaderEditor::_varying_create() {
@@ -4508,6 +4738,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")) {
+ 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) {
@@ -4515,8 +4746,8 @@ void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
for (int i = 0; i < arr.size(); i++) {
String type = ResourceLoader::get_resource_type(arr[i]);
if (type == "GDScript") {
- Ref<Script> script = ResourceLoader::load(arr[i]);
- if (script->get_instance_base_type() == "VisualShaderNodeCustom") {
+ Ref<Script> scr = ResourceLoader::load(arr[i]);
+ if (scr->get_instance_base_type() == "VisualShaderNodeCustom") {
saved_node_pos = p_point + Vector2(0, i * 250 * EDSCALE);
saved_node_pos_dirty = true;
@@ -4668,16 +4899,15 @@ void VisualShaderEditor::_bind_methods() {
ClassDB::bind_method("_update_constant", &VisualShaderEditor::_update_constant);
ClassDB::bind_method("_update_parameter", &VisualShaderEditor::_update_parameter);
ClassDB::bind_method("_expand_output_port", &VisualShaderEditor::_expand_output_port);
-
- ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &VisualShaderEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &VisualShaderEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("_drop_data_fw"), &VisualShaderEditor::drop_data_fw);
+ ClassDB::bind_method("_update_options_menu_deferred", &VisualShaderEditor::_update_options_menu_deferred);
+ ClassDB::bind_method("_rebuild_shader_deferred", &VisualShaderEditor::_rebuild_shader_deferred);
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));
graph = memnew(GraphEdit);
graph->get_zoom_hbox()->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -4685,13 +4915,14 @@ VisualShaderEditor::VisualShaderEditor() {
graph->set_h_size_flags(SIZE_EXPAND_FILL);
graph->set_show_zoom_label(true);
add_child(graph);
- graph->set_drag_forwarding(this);
- float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
+ 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 = EditorSettings::get_singleton()->get("editors/visual_editors/lines_curvature");
+ float graph_lines_curvature = EDITOR_GET("editors/visual_editors/lines_curvature");
graph->set_connection_lines_curvature(graph_lines_curvature);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR_INT);
+ graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR_UINT);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_BOOLEAN);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_VECTOR_2D);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_VECTOR_3D);
@@ -4714,20 +4945,31 @@ VisualShaderEditor::VisualShaderEditor() {
graph->connect("visibility_changed", callable_mp(this, &VisualShaderEditor::_visibility_changed));
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR_INT);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR_UINT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_VECTOR_2D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_VECTOR_3D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_VECTOR_4D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_BOOLEAN);
- graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_SCALAR_INT);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_SCALAR_UINT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_VECTOR_2D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_VECTOR_3D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_VECTOR_4D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_BOOLEAN);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_UINT, VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_UINT, VisualShaderNode::PORT_TYPE_SCALAR_INT);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_UINT, VisualShaderNode::PORT_TYPE_SCALAR_UINT);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_UINT, VisualShaderNode::PORT_TYPE_VECTOR_2D);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_UINT, VisualShaderNode::PORT_TYPE_VECTOR_3D);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_UINT, VisualShaderNode::PORT_TYPE_VECTOR_4D);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_UINT, VisualShaderNode::PORT_TYPE_BOOLEAN);
+
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_2D, VisualShaderNode::PORT_TYPE_SCALAR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_2D, VisualShaderNode::PORT_TYPE_SCALAR_INT);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_2D, VisualShaderNode::PORT_TYPE_SCALAR_UINT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_2D, VisualShaderNode::PORT_TYPE_VECTOR_2D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_2D, VisualShaderNode::PORT_TYPE_VECTOR_3D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_2D, VisualShaderNode::PORT_TYPE_VECTOR_4D);
@@ -4735,6 +4977,7 @@ VisualShaderEditor::VisualShaderEditor() {
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_3D, VisualShaderNode::PORT_TYPE_SCALAR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_3D, VisualShaderNode::PORT_TYPE_SCALAR_INT);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_3D, VisualShaderNode::PORT_TYPE_SCALAR_UINT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_3D, VisualShaderNode::PORT_TYPE_VECTOR_2D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_3D, VisualShaderNode::PORT_TYPE_VECTOR_3D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_3D, VisualShaderNode::PORT_TYPE_VECTOR_4D);
@@ -4742,6 +4985,7 @@ VisualShaderEditor::VisualShaderEditor() {
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_4D, VisualShaderNode::PORT_TYPE_SCALAR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_4D, VisualShaderNode::PORT_TYPE_SCALAR_INT);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_4D, VisualShaderNode::PORT_TYPE_SCALAR_UINT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_4D, VisualShaderNode::PORT_TYPE_VECTOR_2D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_4D, VisualShaderNode::PORT_TYPE_VECTOR_3D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR_4D, VisualShaderNode::PORT_TYPE_VECTOR_4D);
@@ -4749,6 +4993,7 @@ VisualShaderEditor::VisualShaderEditor() {
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_SCALAR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_SCALAR_INT);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_SCALAR_UINT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_VECTOR_2D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_VECTOR_3D);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_VECTOR_4D);
@@ -4811,17 +5056,15 @@ VisualShaderEditor::VisualShaderEditor() {
graph->get_zoom_hbox()->move_child(add_node, 0);
add_node->connect("pressed", callable_mp(this, &VisualShaderEditor::_show_members_dialog).bind(false, VisualShaderNode::PORT_TYPE_MAX, VisualShaderNode::PORT_TYPE_MAX));
- varying_button = memnew(Button);
- varying_button->set_flat(true);
+ varying_button = memnew(MenuButton);
varying_button->set_text(TTR("Manage Varyings"));
+ varying_button->set_switch_on_hover(true);
graph->get_zoom_hbox()->add_child(varying_button);
- varying_button->connect("pressed", callable_mp(this, &VisualShaderEditor::_show_varying_menu));
- varying_options = memnew(PopupMenu);
- add_child(varying_options);
- varying_options->add_item(TTR("Add Varying"), int(VaryingMenuOptions::ADD));
- varying_options->add_item(TTR("Remove Varying"), int(VaryingMenuOptions::REMOVE));
- varying_options->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_varying_menu_id_pressed));
+ PopupMenu *varying_menu = varying_button->get_popup();
+ varying_menu->add_item(TTR("Add Varying"), int(VaryingMenuOptions::ADD));
+ varying_menu->add_item(TTR("Remove Varying"), int(VaryingMenuOptions::REMOVE));
+ varying_menu->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_varying_menu_id_pressed));
preview_shader = memnew(Button);
preview_shader->set_flat(true);
@@ -4903,7 +5146,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);
@@ -4967,6 +5210,7 @@ VisualShaderEditor::VisualShaderEditor() {
hb->add_child(varying_type);
varying_type->add_item("Float");
varying_type->add_item("Int");
+ varying_type->add_item("UInt");
varying_type->add_item("Vector2");
varying_type->add_item("Vector3");
varying_type->add_item("Vector4");
@@ -5087,23 +5331,24 @@ VisualShaderEditor::VisualShaderEditor() {
const String &compare_func_desc = TTR("Returns the boolean result of the %s comparison between two parameters.");
- add_options.push_back(AddOption("Equal", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Equal (==)")), { VisualShaderNodeCompare::FUNC_EQUAL }, VisualShaderNode::PORT_TYPE_BOOLEAN));
- add_options.push_back(AddOption("GreaterThan", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Greater Than (>)")), { VisualShaderNodeCompare::FUNC_GREATER_THAN }, VisualShaderNode::PORT_TYPE_BOOLEAN));
- add_options.push_back(AddOption("GreaterThanEqual", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Greater Than or Equal (>=)")), { VisualShaderNodeCompare::FUNC_GREATER_THAN_EQUAL }, VisualShaderNode::PORT_TYPE_BOOLEAN));
+ add_options.push_back(AddOption("Equal (==)", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Equal (==)")), { VisualShaderNodeCompare::FUNC_EQUAL }, VisualShaderNode::PORT_TYPE_BOOLEAN));
+ add_options.push_back(AddOption("GreaterThan (>)", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Greater Than (>)")), { VisualShaderNodeCompare::FUNC_GREATER_THAN }, VisualShaderNode::PORT_TYPE_BOOLEAN));
+ add_options.push_back(AddOption("GreaterThanEqual (>=)", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Greater Than or Equal (>=)")), { VisualShaderNodeCompare::FUNC_GREATER_THAN_EQUAL }, VisualShaderNode::PORT_TYPE_BOOLEAN));
add_options.push_back(AddOption("If", "Conditional/Functions", "VisualShaderNodeIf", TTR("Returns an associated vector if the provided scalars are equal, greater or less."), {}, VisualShaderNode::PORT_TYPE_VECTOR_3D));
add_options.push_back(AddOption("IsInf", "Conditional/Functions", "VisualShaderNodeIs", TTR("Returns the boolean result of the comparison between INF and a scalar parameter."), { VisualShaderNodeIs::FUNC_IS_INF }, VisualShaderNode::PORT_TYPE_BOOLEAN));
add_options.push_back(AddOption("IsNaN", "Conditional/Functions", "VisualShaderNodeIs", TTR("Returns the boolean result of the comparison between NaN and a scalar parameter."), { VisualShaderNodeIs::FUNC_IS_NAN }, VisualShaderNode::PORT_TYPE_BOOLEAN));
- add_options.push_back(AddOption("LessThan", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Less Than (<)")), { VisualShaderNodeCompare::FUNC_LESS_THAN }, VisualShaderNode::PORT_TYPE_BOOLEAN));
- add_options.push_back(AddOption("LessThanEqual", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Less Than or Equal (<=)")), { VisualShaderNodeCompare::FUNC_LESS_THAN_EQUAL }, VisualShaderNode::PORT_TYPE_BOOLEAN));
- add_options.push_back(AddOption("NotEqual", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Not Equal (!=)")), { VisualShaderNodeCompare::FUNC_NOT_EQUAL }, VisualShaderNode::PORT_TYPE_BOOLEAN));
- add_options.push_back(AddOption("Switch", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated 3D vector if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
- add_options.push_back(AddOption("Switch2D", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated 2D vector if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
- add_options.push_back(AddOption("SwitchBool", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated boolean if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_BOOLEAN }, VisualShaderNode::PORT_TYPE_BOOLEAN));
- add_options.push_back(AddOption("SwitchFloat", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated floating-point scalar if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_FLOAT }, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("SwitchInt", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated integer scalar if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_INT }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
- add_options.push_back(AddOption("SwitchTransform", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated transform if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_TRANSFORM }, VisualShaderNode::PORT_TYPE_TRANSFORM));
-
- add_options.push_back(AddOption("Compare", "Conditional/Common", "VisualShaderNodeCompare", TTR("Returns the boolean result of the comparison between two parameters."), {}, VisualShaderNode::PORT_TYPE_BOOLEAN));
+ add_options.push_back(AddOption("LessThan (<)", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Less Than (<)")), { VisualShaderNodeCompare::FUNC_LESS_THAN }, VisualShaderNode::PORT_TYPE_BOOLEAN));
+ add_options.push_back(AddOption("LessThanEqual (<=)", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Less Than or Equal (<=)")), { VisualShaderNodeCompare::FUNC_LESS_THAN_EQUAL }, VisualShaderNode::PORT_TYPE_BOOLEAN));
+ add_options.push_back(AddOption("NotEqual (!=)", "Conditional/Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Not Equal (!=)")), { VisualShaderNodeCompare::FUNC_NOT_EQUAL }, VisualShaderNode::PORT_TYPE_BOOLEAN));
+ add_options.push_back(AddOption("Switch (==)", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated 3D vector if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
+ add_options.push_back(AddOption("Switch2D (==)", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated 2D vector if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
+ add_options.push_back(AddOption("SwitchBool (==)", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated boolean if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_BOOLEAN }, VisualShaderNode::PORT_TYPE_BOOLEAN));
+ add_options.push_back(AddOption("SwitchFloat (==)", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated floating-point scalar if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_FLOAT }, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("SwitchInt (==)", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated integer scalar if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_INT }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("SwitchTransform (==)", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated transform if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_TRANSFORM }, VisualShaderNode::PORT_TYPE_TRANSFORM));
+ add_options.push_back(AddOption("SwitchUInt (==)", "Conditional/Functions", "VisualShaderNodeSwitch", TTR("Returns an associated unsigned integer scalar if the provided boolean value is true or false."), { VisualShaderNodeSwitch::OP_TYPE_UINT }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+
+ add_options.push_back(AddOption("Compare (==)", "Conditional/Common", "VisualShaderNodeCompare", TTR("Returns the boolean result of the comparison between two parameters."), {}, VisualShaderNode::PORT_TYPE_BOOLEAN));
add_options.push_back(AddOption("Is", "Conditional/Common", "VisualShaderNodeIs", TTR("Returns the boolean result of the comparison between INF (or NaN) and a scalar parameter."), {}, VisualShaderNode::PORT_TYPE_BOOLEAN));
add_options.push_back(AddOption("BooleanConstant", "Conditional/Variables", "VisualShaderNodeBooleanConstant", TTR("Boolean constant."), {}, VisualShaderNode::PORT_TYPE_BOOLEAN));
@@ -5143,8 +5388,10 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Custom", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "custom", "CUSTOM"), { "custom" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, -1, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("Delta", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "delta", "DELTA"), { "delta" }, VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("EmissionTransform", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "emission_transform", "EMISSION_TRANSFORM"), { "emission_transform" }, VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_PARTICLES));
- add_options.push_back(AddOption("Index", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "index", "INDEX"), { "index" }, VisualShaderNode::PORT_TYPE_SCALAR_INT, -1, Shader::MODE_PARTICLES));
+ add_options.push_back(AddOption("Index", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "index", "INDEX"), { "index" }, VisualShaderNode::PORT_TYPE_SCALAR_UINT, -1, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("LifeTime", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "lifetime", "LIFETIME"), { "lifetime" }, VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_PARTICLES));
+ add_options.push_back(AddOption("Number", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "number", "NUMBER"), { "number" }, VisualShaderNode::PORT_TYPE_SCALAR_UINT, -1, Shader::MODE_PARTICLES));
+ add_options.push_back(AddOption("RandomSeed", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "random_seed", "RANDOM_SEED"), { "random_seed" }, VisualShaderNode::PORT_TYPE_SCALAR_UINT, -1, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("Restart", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "restart", "RESTART"), { "restart" }, VisualShaderNode::PORT_TYPE_BOOLEAN, -1, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("Time", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "time", "TIME"), { "time" }, VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("Transform", "Input/All", "VisualShaderNodeInput", vformat(input_param_shader_modes, "transform", "TRANSFORM"), { "transform" }, VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_PARTICLES));
@@ -5172,6 +5419,10 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Binormal", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "binormal", "BINORMAL"), { "binormal" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("Color", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "color", "COLOR"), { "color" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
+ add_options.push_back(AddOption("Custom0", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "custom0", "CUSTOM0"), { "custom0" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
+ add_options.push_back(AddOption("Custom1", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "custom1", "CUSTOM1"), { "custom1" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
+ add_options.push_back(AddOption("Custom2", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "custom2", "CUSTOM2"), { "custom2" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
+ add_options.push_back(AddOption("Custom3", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "custom3", "CUSTOM3"), { "custom3" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("InstanceId", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "instance_id", "INSTANCE_ID"), { "instance_id" }, VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("InstanceCustom", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "instance_custom", "INSTANCE_CUSTOM"), { "instance_custom" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("ModelViewMatrix", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "modelview_matrix", "MODELVIEW_MATRIX"), { "modelview_matrix" }, VisualShaderNode::PORT_TYPE_TRANSFORM, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
@@ -5185,25 +5436,25 @@ VisualShaderEditor::VisualShaderEditor() {
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));
+ add_options.push_back(AddOption("CameraVisibleLayers", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_visible_layers", "CAMERA_VISIBLE_LAYERS"), { "camera_visible_layers" }, VisualShaderNode::PORT_TYPE_SCALAR_UINT, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("NodePositionView", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "node_position_view", "NODE_POSITION_VIEW"), { "node_position_view" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
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));
add_options.push_back(AddOption("View", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "view", "VIEW"), { "view" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
- 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_FRAGMENT, 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_FRAGMENT, 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_FRAGMENT, Shader::MODE_SPATIAL));
+ 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("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));
+ add_options.push_back(AddOption("CameraVisibleLayers", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_visible_layers", "CAMERA_VISIBLE_LAYERS"), { "camera_visible_layers" }, VisualShaderNode::PORT_TYPE_SCALAR_UINT, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("NodePositionView", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "node_position_view", "NODE_POSITION_VIEW"), { "node_position_view" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("Albedo", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "albedo", "ALBEDO"), { "albedo" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_LIGHT, Shader::MODE_SPATIAL));
@@ -5235,7 +5486,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));
@@ -5246,6 +5496,9 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Light", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light", "LIGHT"), { "light" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("LightColor", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_color", "LIGHT_COLOR"), { "light_color" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("LightPosition", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_position", "LIGHT_POSITION"), { "light_position" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_LIGHT, Shader::MODE_CANVAS_ITEM));
+ add_options.push_back(AddOption("LightDirection", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_direction", "LIGHT_DIRECTION"), { "light_direction" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_LIGHT, Shader::MODE_CANVAS_ITEM));
+ add_options.push_back(AddOption("LightIsDirectional", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_is_directional", "LIGHT_IS_DIRECTIONAL"), { "light_is_directional" }, VisualShaderNode::PORT_TYPE_BOOLEAN, TYPE_FLAGS_LIGHT, Shader::MODE_CANVAS_ITEM));
+ add_options.push_back(AddOption("LightEnergy", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "light_energy", "LIGHT_ENERGY"), { "light_energy" }, VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("LightVertex", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "light_vertex", "LIGHT_VERTEX"), { "light_vertex" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("Normal", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "normal", "NORMAL"), { "normal" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_LIGHT, Shader::MODE_CANVAS_ITEM));
add_options.push_back(AddOption("PointCoord", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "point_coord", "POINT_COORD"), { "point_coord" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_LIGHT, Shader::MODE_CANVAS_ITEM));
@@ -5305,7 +5558,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("EmitParticle", "Particles", "VisualShaderNodeParticleEmit", "", {}, -1, TYPE_FLAGS_PROCESS | TYPE_FLAGS_PROCESS_CUSTOM | TYPE_FLAGS_COLLIDE, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("ParticleAccelerator", "Particles", "VisualShaderNodeParticleAccelerator", "", {}, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_PROCESS, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("ParticleRandomness", "Particles", "VisualShaderNodeParticleRandomness", "", {}, VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_EMIT | TYPE_FLAGS_PROCESS | TYPE_FLAGS_COLLIDE, Shader::MODE_PARTICLES));
- add_options.push_back(AddOption("MultiplyByAxisAngle", "Particles/Transform", "VisualShaderNodeParticleMultiplyByAxisAngle", TTR("A node for help to multiply a position input vector by rotation using specific axis. Intended to work with emitters."), {}, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_EMIT | TYPE_FLAGS_PROCESS | TYPE_FLAGS_COLLIDE, Shader::MODE_PARTICLES));
+ add_options.push_back(AddOption("MultiplyByAxisAngle (*)", "Particles/Transform", "VisualShaderNodeParticleMultiplyByAxisAngle", TTR("A node for help to multiply a position input vector by rotation using specific axis. Intended to work with emitters."), {}, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_EMIT | TYPE_FLAGS_PROCESS | TYPE_FLAGS_COLLIDE, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("BoxEmitter", "Particles/Emitters", "VisualShaderNodeParticleBoxEmitter", "", {}, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("MeshEmitter", "Particles/Emitters", "VisualShaderNodeParticleMeshEmitter", "", {}, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_EMIT, Shader::MODE_PARTICLES));
@@ -5320,6 +5573,8 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("FloatOp", "Scalar/Common", "VisualShaderNodeFloatOp", TTR("Float operator."), {}, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("IntFunc", "Scalar/Common", "VisualShaderNodeIntFunc", TTR("Integer function."), {}, VisualShaderNode::PORT_TYPE_SCALAR_INT));
add_options.push_back(AddOption("IntOp", "Scalar/Common", "VisualShaderNodeIntOp", TTR("Integer operator."), {}, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("UIntFunc", "Scalar/Common", "VisualShaderNodeUIntFunc", TTR("Unsigned integer function."), {}, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+ add_options.push_back(AddOption("UIntOp", "Scalar/Common", "VisualShaderNodeUIntOp", TTR("Unsigned integer operator."), {}, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
// CONSTANTS
@@ -5338,9 +5593,11 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("ATan2", "Scalar/Functions", "VisualShaderNodeFloatOp", TTR("Returns the arc-tangent of the parameters."), { VisualShaderNodeFloatOp::OP_ATAN2 }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("ATanH", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), { VisualShaderNodeFloatFunc::FUNC_ATANH }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("BitwiseNOT", "Scalar/Functions", "VisualShaderNodeIntFunc", TTR("Returns the result of bitwise NOT (~a) operation on the integer."), { VisualShaderNodeIntFunc::FUNC_BITWISE_NOT }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("BitwiseNOT", "Scalar/Functions", "VisualShaderNodeUIntFunc", TTR("Returns the result of bitwise NOT (~a) operation on the unsigned integer."), { VisualShaderNodeUIntFunc::FUNC_BITWISE_NOT }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
add_options.push_back(AddOption("Ceil", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), { VisualShaderNodeFloatFunc::FUNC_CEIL }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Clamp", "Scalar/Functions", "VisualShaderNodeClamp", TTR("Constrains a value to lie between two further values."), { VisualShaderNodeClamp::OP_TYPE_FLOAT }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Clamp", "Scalar/Functions", "VisualShaderNodeClamp", TTR("Constrains a value to lie between two further values."), { VisualShaderNodeClamp::OP_TYPE_INT }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Clamp", "Scalar/Functions", "VisualShaderNodeClamp", TTR("Constrains a value to lie between two further values."), { VisualShaderNodeClamp::OP_TYPE_UINT }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
add_options.push_back(AddOption("Cos", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("Returns the cosine of the parameter."), { VisualShaderNodeFloatFunc::FUNC_COS }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("CosH", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic cosine of the parameter."), { VisualShaderNodeFloatFunc::FUNC_COSH }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Degrees", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("Converts a quantity in radians to degrees."), { VisualShaderNodeFloatFunc::FUNC_DEGREES }, VisualShaderNode::PORT_TYPE_SCALAR));
@@ -5356,10 +5613,11 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Max", "Scalar/Functions", "VisualShaderNodeFloatOp", TTR("Returns the greater of two values."), { VisualShaderNodeFloatOp::OP_MAX }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Min", "Scalar/Functions", "VisualShaderNodeFloatOp", TTR("Returns the lesser of two values."), { VisualShaderNodeFloatOp::OP_MIN }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Mix", "Scalar/Functions", "VisualShaderNodeMix", TTR("Linear interpolation between two scalars."), { VisualShaderNodeMix::OP_TYPE_SCALAR }, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("MultiplyAdd", "Scalar/Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on scalars."), { VisualShaderNodeMultiplyAdd::OP_TYPE_SCALAR }, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Negate", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeFloatFunc::FUNC_NEGATE }, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Negate", "Scalar/Functions", "VisualShaderNodeIntFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeIntFunc::FUNC_NEGATE }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
- add_options.push_back(AddOption("OneMinus", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("1.0 - scalar"), { VisualShaderNodeFloatFunc::FUNC_ONEMINUS }, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("MultiplyAdd (a * b + c)", "Scalar/Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on scalars."), { VisualShaderNodeMultiplyAdd::OP_TYPE_SCALAR }, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Negate (*-1)", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeFloatFunc::FUNC_NEGATE }, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Negate (*-1)", "Scalar/Functions", "VisualShaderNodeIntFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeIntFunc::FUNC_NEGATE }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Negate (*-1)", "Scalar/Functions", "VisualShaderNodeUIntFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeUIntFunc::FUNC_NEGATE }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+ add_options.push_back(AddOption("OneMinus (1-)", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("1.0 - scalar"), { VisualShaderNodeFloatFunc::FUNC_ONEMINUS }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Pow", "Scalar/Functions", "VisualShaderNodeFloatOp", TTR("Returns the value of the first parameter raised to the power of the second."), { VisualShaderNodeFloatOp::OP_POW }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Radians", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("Converts a quantity in degrees to radians."), { VisualShaderNodeFloatFunc::FUNC_RADIANS }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Reciprocal", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("1.0 / scalar"), { VisualShaderNodeFloatFunc::FUNC_RECIPROCAL }, VisualShaderNode::PORT_TYPE_SCALAR));
@@ -5378,26 +5636,38 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("TanH", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic tangent of the parameter."), { VisualShaderNodeFloatFunc::FUNC_TANH }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Trunc", "Scalar/Functions", "VisualShaderNodeFloatFunc", TTR("Finds the truncated value of the parameter."), { VisualShaderNodeFloatFunc::FUNC_TRUNC }, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Add", "Scalar/Operators", "VisualShaderNodeFloatOp", TTR("Sums two floating-point scalars."), { VisualShaderNodeFloatOp::OP_ADD }, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Add", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Sums two integer scalars."), { VisualShaderNodeIntOp::OP_ADD }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
- add_options.push_back(AddOption("BitwiseAND", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the result of bitwise AND (a & b) operation for two integers."), { VisualShaderNodeIntOp::OP_BITWISE_AND }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
- add_options.push_back(AddOption("BitwiseLeftShift", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the result of bitwise left shift (a << b) operation on the integer."), { VisualShaderNodeIntOp::OP_BITWISE_LEFT_SHIFT }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
- add_options.push_back(AddOption("BitwiseOR", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the result of bitwise OR (a | b) operation for two integers."), { VisualShaderNodeIntOp::OP_BITWISE_OR }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
- add_options.push_back(AddOption("BitwiseRightShift", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the result of bitwise right shift (a >> b) operation on the integer."), { VisualShaderNodeIntOp::OP_BITWISE_RIGHT_SHIFT }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
- add_options.push_back(AddOption("BitwiseXOR", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the result of bitwise XOR (a ^ b) operation on the integer."), { VisualShaderNodeIntOp::OP_BITWISE_XOR }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
- add_options.push_back(AddOption("Divide", "Scalar/Operators", "VisualShaderNodeFloatOp", TTR("Divides two floating-point scalars."), { VisualShaderNodeFloatOp::OP_DIV }, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Divide", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Divides two integer scalars."), { VisualShaderNodeIntOp::OP_DIV }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
- add_options.push_back(AddOption("Multiply", "Scalar/Operators", "VisualShaderNodeFloatOp", TTR("Multiplies two floating-point scalars."), { VisualShaderNodeFloatOp::OP_MUL }, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Multiply", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Multiplies two integer scalars."), { VisualShaderNodeIntOp::OP_MUL }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Add (+)", "Scalar/Operators", "VisualShaderNodeFloatOp", TTR("Sums two floating-point scalars."), { VisualShaderNodeFloatOp::OP_ADD }, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Add (+)", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Sums two integer scalars."), { VisualShaderNodeIntOp::OP_ADD }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Add (+)", "Scalar/Operators", "VisualShaderNodeUIntOp", TTR("Sums two unsigned integer scalars."), { VisualShaderNodeUIntOp::OP_ADD }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+ add_options.push_back(AddOption("BitwiseAND (&)", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the result of bitwise AND (a & b) operation for two integers."), { VisualShaderNodeIntOp::OP_BITWISE_AND }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("BitwiseAND (&)", "Scalar/Operators", "VisualShaderNodeUIntOp", TTR("Returns the result of bitwise AND (a & b) operation for two unsigned integers."), { VisualShaderNodeUIntOp::OP_BITWISE_AND }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+ add_options.push_back(AddOption("BitwiseLeftShift (<<)", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the result of bitwise left shift (a << b) operation on the integer."), { VisualShaderNodeIntOp::OP_BITWISE_LEFT_SHIFT }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("BitwiseLeftShift (<<)", "Scalar/Operators", "VisualShaderNodeUIntOp", TTR("Returns the result of bitwise left shift (a << b) operation on the unsigned integer."), { VisualShaderNodeUIntOp::OP_BITWISE_LEFT_SHIFT }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+ add_options.push_back(AddOption("BitwiseOR (|)", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the result of bitwise OR (a | b) operation for two integers."), { VisualShaderNodeIntOp::OP_BITWISE_OR }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("BitwiseOR (|)", "Scalar/Operators", "VisualShaderNodeUIntOp", TTR("Returns the result of bitwise OR (a | b) operation for two unsigned integers."), { VisualShaderNodeUIntOp::OP_BITWISE_OR }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+ add_options.push_back(AddOption("BitwiseRightShift (>>)", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the result of bitwise right shift (a >> b) operation on the integer."), { VisualShaderNodeIntOp::OP_BITWISE_RIGHT_SHIFT }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("BitwiseRightShift (>>)", "Scalar/Operators", "VisualShaderNodeUIntOp", TTR("Returns the result of bitwise right shift (a >> b) operation on the unsigned integer."), { VisualShaderNodeIntOp::OP_BITWISE_RIGHT_SHIFT }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+ add_options.push_back(AddOption("BitwiseXOR (^)", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the result of bitwise XOR (a ^ b) operation on the integer."), { VisualShaderNodeIntOp::OP_BITWISE_XOR }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("BitwiseXOR (^)", "Scalar/Operators", "VisualShaderNodeUIntOp", TTR("Returns the result of bitwise XOR (a ^ b) operation on the unsigned integer."), { VisualShaderNodeUIntOp::OP_BITWISE_XOR }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+ add_options.push_back(AddOption("Divide (/)", "Scalar/Operators", "VisualShaderNodeFloatOp", TTR("Divides two floating-point scalars."), { VisualShaderNodeFloatOp::OP_DIV }, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Divide (/)", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Divides two integer scalars."), { VisualShaderNodeIntOp::OP_DIV }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Divide (/)", "Scalar/Operators", "VisualShaderNodeUIntOp", TTR("Divides two unsigned integer scalars."), { VisualShaderNodeUIntOp::OP_DIV }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+ add_options.push_back(AddOption("Multiply (*)", "Scalar/Operators", "VisualShaderNodeFloatOp", TTR("Multiplies two floating-point scalars."), { VisualShaderNodeFloatOp::OP_MUL }, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Multiply (*)", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Multiplies two integer scalars."), { VisualShaderNodeIntOp::OP_MUL }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Multiply (*)", "Scalar/Operators", "VisualShaderNodeUIntOp", TTR("Multiplies two unsigned integer scalars."), { VisualShaderNodeUIntOp::OP_MUL }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
add_options.push_back(AddOption("Remainder", "Scalar/Operators", "VisualShaderNodeFloatOp", TTR("Returns the remainder of the two floating-point scalars."), { VisualShaderNodeFloatOp::OP_MOD }, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Remainder", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Returns the remainder of the two integer scalars."), { VisualShaderNodeIntOp::OP_MOD }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
- add_options.push_back(AddOption("Subtract", "Scalar/Operators", "VisualShaderNodeFloatOp", TTR("Subtracts two floating-point scalars."), { VisualShaderNodeFloatOp::OP_SUB }, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Subtract", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Subtracts two integer scalars."), { VisualShaderNodeIntOp::OP_SUB }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Remainder", "Scalar/Operators", "VisualShaderNodeUIntOp", TTR("Returns the remainder of the two unsigned integer scalars."), { VisualShaderNodeUIntOp::OP_MOD }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
+ add_options.push_back(AddOption("Subtract (-)", "Scalar/Operators", "VisualShaderNodeFloatOp", TTR("Subtracts two floating-point scalars."), { VisualShaderNodeFloatOp::OP_SUB }, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Subtract (-)", "Scalar/Operators", "VisualShaderNodeIntOp", TTR("Subtracts two integer scalars."), { VisualShaderNodeIntOp::OP_SUB }, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Subtract (-)", "Scalar/Operators", "VisualShaderNodeUIntOp", TTR("Subtracts two unsigned integer scalars."), { VisualShaderNodeUIntOp::OP_SUB }, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
add_options.push_back(AddOption("FloatConstant", "Scalar/Variables", "VisualShaderNodeFloatConstant", TTR("Scalar floating-point constant."), {}, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("IntConstant", "Scalar/Variables", "VisualShaderNodeIntConstant", TTR("Scalar integer constant."), {}, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("UIntConstant", "Scalar/Variables", "VisualShaderNodeUIntConstant", TTR("Scalar unsigned integer constant."), {}, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
add_options.push_back(AddOption("FloatParameter", "Scalar/Variables", "VisualShaderNodeFloatParameter", TTR("Scalar floating-point parameter."), {}, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("IntParameter", "Scalar/Variables", "VisualShaderNodeIntParameter", TTR("Scalar integer parameter."), {}, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("UIntParameter", "Scalar/Variables", "VisualShaderNodeUIntParameter", TTR("Scalar unsigned integer parameter."), {}, VisualShaderNode::PORT_TYPE_SCALAR_UINT));
// SDF
{
@@ -5419,7 +5689,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();
@@ -5449,12 +5719,12 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Inverse", "Transform/Functions", "VisualShaderNodeTransformFunc", TTR("Calculates the inverse of a transform."), { VisualShaderNodeTransformFunc::FUNC_INVERSE }, VisualShaderNode::PORT_TYPE_TRANSFORM));
add_options.push_back(AddOption("Transpose", "Transform/Functions", "VisualShaderNodeTransformFunc", TTR("Calculates the transpose of a transform."), { VisualShaderNodeTransformFunc::FUNC_TRANSPOSE }, VisualShaderNode::PORT_TYPE_TRANSFORM));
- add_options.push_back(AddOption("Add", "Transform/Operators", "VisualShaderNodeTransformOp", TTR("Sums two transforms."), { VisualShaderNodeTransformOp::OP_ADD }, VisualShaderNode::PORT_TYPE_TRANSFORM));
- add_options.push_back(AddOption("Divide", "Transform/Operators", "VisualShaderNodeTransformOp", TTR("Divides two transforms."), { VisualShaderNodeTransformOp::OP_A_DIV_B }, VisualShaderNode::PORT_TYPE_TRANSFORM));
- add_options.push_back(AddOption("Multiply", "Transform/Operators", "VisualShaderNodeTransformOp", TTR("Multiplies two transforms."), { VisualShaderNodeTransformOp::OP_AxB }, VisualShaderNode::PORT_TYPE_TRANSFORM));
- add_options.push_back(AddOption("MultiplyComp", "Transform/Operators", "VisualShaderNodeTransformOp", TTR("Performs per-component multiplication of two transforms."), { VisualShaderNodeTransformOp::OP_AxB_COMP }, VisualShaderNode::PORT_TYPE_TRANSFORM));
- add_options.push_back(AddOption("Subtract", "Transform/Operators", "VisualShaderNodeTransformOp", TTR("Subtracts two transforms."), { VisualShaderNodeTransformOp::OP_A_MINUS_B }, VisualShaderNode::PORT_TYPE_TRANSFORM));
- add_options.push_back(AddOption("TransformVectorMult", "Transform/Operators", "VisualShaderNodeTransformVecMult", TTR("Multiplies vector by transform."), {}, VisualShaderNode::PORT_TYPE_VECTOR_3D));
+ add_options.push_back(AddOption("Add (+)", "Transform/Operators", "VisualShaderNodeTransformOp", TTR("Sums two transforms."), { VisualShaderNodeTransformOp::OP_ADD }, VisualShaderNode::PORT_TYPE_TRANSFORM));
+ add_options.push_back(AddOption("Divide (/)", "Transform/Operators", "VisualShaderNodeTransformOp", TTR("Divides two transforms."), { VisualShaderNodeTransformOp::OP_A_DIV_B }, VisualShaderNode::PORT_TYPE_TRANSFORM));
+ add_options.push_back(AddOption("Multiply (*)", "Transform/Operators", "VisualShaderNodeTransformOp", TTR("Multiplies two transforms."), { VisualShaderNodeTransformOp::OP_AxB }, VisualShaderNode::PORT_TYPE_TRANSFORM));
+ add_options.push_back(AddOption("MultiplyComp (*)", "Transform/Operators", "VisualShaderNodeTransformOp", TTR("Performs per-component multiplication of two transforms."), { VisualShaderNodeTransformOp::OP_AxB_COMP }, VisualShaderNode::PORT_TYPE_TRANSFORM));
+ add_options.push_back(AddOption("Subtract (-)", "Transform/Operators", "VisualShaderNodeTransformOp", TTR("Subtracts two transforms."), { VisualShaderNodeTransformOp::OP_A_MINUS_B }, VisualShaderNode::PORT_TYPE_TRANSFORM));
+ add_options.push_back(AddOption("TransformVectorMult (*)", "Transform/Operators", "VisualShaderNodeTransformVecMult", TTR("Multiplies vector by transform."), {}, VisualShaderNode::PORT_TYPE_VECTOR_3D));
add_options.push_back(AddOption("TransformConstant", "Transform/Variables", "VisualShaderNodeTransformConstant", TTR("Transform constant."), {}, VisualShaderNode::PORT_TYPE_TRANSFORM));
add_options.push_back(AddOption("TransformParameter", "Transform/Variables", "VisualShaderNodeTransformParameter", TTR("Transform parameter."), {}, VisualShaderNode::PORT_TYPE_TRANSFORM));
@@ -5570,21 +5840,21 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("MixS", "Vector/Functions", "VisualShaderNodeMix", TTR("Linear interpolation between two vectors using scalar."), { VisualShaderNodeMix::OP_TYPE_VECTOR_2D_SCALAR }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
add_options.push_back(AddOption("MixS", "Vector/Functions", "VisualShaderNodeMix", TTR("Linear interpolation between two vectors using scalar."), { VisualShaderNodeMix::OP_TYPE_VECTOR_3D_SCALAR }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
add_options.push_back(AddOption("MixS", "Vector/Functions", "VisualShaderNodeMix", TTR("Linear interpolation between two vectors using scalar."), { VisualShaderNodeMix::OP_TYPE_VECTOR_4D_SCALAR }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
- add_options.push_back(AddOption("MultiplyAdd", "Vector/Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on vectors."), { VisualShaderNodeMultiplyAdd::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
- add_options.push_back(AddOption("MultiplyAdd", "Vector/Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on vectors."), { VisualShaderNodeMultiplyAdd::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
- add_options.push_back(AddOption("MultiplyAdd", "Vector/Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on vectors."), { VisualShaderNodeMultiplyAdd::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
- add_options.push_back(AddOption("Negate", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeVectorFunc::FUNC_NEGATE, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
- add_options.push_back(AddOption("Negate", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeVectorFunc::FUNC_NEGATE, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
- add_options.push_back(AddOption("Negate", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeVectorFunc::FUNC_NEGATE, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
+ add_options.push_back(AddOption("MultiplyAdd (a * b + c)", "Vector/Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on vectors."), { VisualShaderNodeMultiplyAdd::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
+ add_options.push_back(AddOption("MultiplyAdd (a * b + c)", "Vector/Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on vectors."), { VisualShaderNodeMultiplyAdd::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
+ add_options.push_back(AddOption("MultiplyAdd (a * b + c)", "Vector/Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on vectors."), { VisualShaderNodeMultiplyAdd::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
+ add_options.push_back(AddOption("Negate (*-1)", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeVectorFunc::FUNC_NEGATE, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
+ add_options.push_back(AddOption("Negate (*-1)", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeVectorFunc::FUNC_NEGATE, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
+ add_options.push_back(AddOption("Negate (*-1)", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the opposite value of the parameter."), { VisualShaderNodeVectorFunc::FUNC_NEGATE, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
add_options.push_back(AddOption("Normalize", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Calculates the normalize product of vector."), { VisualShaderNodeVectorFunc::FUNC_NORMALIZE, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
add_options.push_back(AddOption("Normalize", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Calculates the normalize product of vector."), { VisualShaderNodeVectorFunc::FUNC_NORMALIZE, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
add_options.push_back(AddOption("Normalize", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Calculates the normalize product of vector."), { VisualShaderNodeVectorFunc::FUNC_NORMALIZE, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
- add_options.push_back(AddOption("OneMinus", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("1.0 - vector"), { VisualShaderNodeVectorFunc::FUNC_ONEMINUS, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
- add_options.push_back(AddOption("OneMinus", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("1.0 - vector"), { VisualShaderNodeVectorFunc::FUNC_ONEMINUS, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
- add_options.push_back(AddOption("OneMinus", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("1.0 - vector"), { VisualShaderNodeVectorFunc::FUNC_ONEMINUS, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
- add_options.push_back(AddOption("Pow", "Vector/Functions", "VisualShaderNodeVectorOp", TTR("Returns the value of the first parameter raised to the power of the second."), { VisualShaderNodeVectorOp::OP_POW, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
- add_options.push_back(AddOption("Pow", "Vector/Functions", "VisualShaderNodeVectorOp", TTR("Returns the value of the first parameter raised to the power of the second."), { VisualShaderNodeVectorOp::OP_POW, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
- add_options.push_back(AddOption("Pow", "Vector/Functions", "VisualShaderNodeVectorOp", TTR("Returns the value of the first parameter raised to the power of the second."), { VisualShaderNodeVectorOp::OP_POW, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
+ add_options.push_back(AddOption("OneMinus (1-)", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("1.0 - vector"), { VisualShaderNodeVectorFunc::FUNC_ONEMINUS, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
+ add_options.push_back(AddOption("OneMinus (1-)", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("1.0 - vector"), { VisualShaderNodeVectorFunc::FUNC_ONEMINUS, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
+ add_options.push_back(AddOption("OneMinus (1-)", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("1.0 - vector"), { VisualShaderNodeVectorFunc::FUNC_ONEMINUS, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
+ add_options.push_back(AddOption("Pow (^)", "Vector/Functions", "VisualShaderNodeVectorOp", TTR("Returns the value of the first parameter raised to the power of the second."), { VisualShaderNodeVectorOp::OP_POW, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
+ add_options.push_back(AddOption("Pow (^)", "Vector/Functions", "VisualShaderNodeVectorOp", TTR("Returns the value of the first parameter raised to the power of the second."), { VisualShaderNodeVectorOp::OP_POW, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
+ add_options.push_back(AddOption("Pow (^)", "Vector/Functions", "VisualShaderNodeVectorOp", TTR("Returns the value of the first parameter raised to the power of the second."), { VisualShaderNodeVectorOp::OP_POW, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
add_options.push_back(AddOption("Radians", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Converts a quantity in degrees to radians."), { VisualShaderNodeVectorFunc::FUNC_RADIANS, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
add_options.push_back(AddOption("Radians", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Converts a quantity in degrees to radians."), { VisualShaderNodeVectorFunc::FUNC_RADIANS, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
add_options.push_back(AddOption("Radians", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Converts a quantity in degrees to radians."), { VisualShaderNodeVectorFunc::FUNC_RADIANS, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
@@ -5629,9 +5899,9 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("StepS", "Vector/Functions", "VisualShaderNodeStep", TTR("Step function( scalar(edge), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), { VisualShaderNodeStep::OP_TYPE_VECTOR_2D_SCALAR }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
add_options.push_back(AddOption("StepS", "Vector/Functions", "VisualShaderNodeStep", TTR("Step function( scalar(edge), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), { VisualShaderNodeStep::OP_TYPE_VECTOR_3D_SCALAR }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
add_options.push_back(AddOption("StepS", "Vector/Functions", "VisualShaderNodeStep", TTR("Step function( scalar(edge), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), { VisualShaderNodeStep::OP_TYPE_VECTOR_4D_SCALAR }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
- add_options.push_back(AddOption("Sum", "Vector/Functions", "VisualShaderNodeDerivativeFunc", TTR("(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and 'y'."), { VisualShaderNodeDerivativeFunc::FUNC_SUM, VisualShaderNodeDerivativeFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT | TYPE_FLAGS_LIGHT, -1, true));
- add_options.push_back(AddOption("Sum", "Vector/Functions", "VisualShaderNodeDerivativeFunc", TTR("(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and 'y'."), { VisualShaderNodeDerivativeFunc::FUNC_SUM, VisualShaderNodeDerivativeFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT | TYPE_FLAGS_LIGHT, -1, true));
- add_options.push_back(AddOption("Sum", "Vector/Functions", "VisualShaderNodeDerivativeFunc", TTR("(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and 'y'."), { VisualShaderNodeDerivativeFunc::FUNC_SUM, VisualShaderNodeDerivativeFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_FRAGMENT | TYPE_FLAGS_LIGHT, -1, true));
+ add_options.push_back(AddOption("Sum (+)", "Vector/Functions", "VisualShaderNodeDerivativeFunc", TTR("(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and 'y'."), { VisualShaderNodeDerivativeFunc::FUNC_SUM, VisualShaderNodeDerivativeFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT | TYPE_FLAGS_LIGHT, -1, true));
+ add_options.push_back(AddOption("Sum (+)", "Vector/Functions", "VisualShaderNodeDerivativeFunc", TTR("(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and 'y'."), { VisualShaderNodeDerivativeFunc::FUNC_SUM, VisualShaderNodeDerivativeFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT | TYPE_FLAGS_LIGHT, -1, true));
+ add_options.push_back(AddOption("Sum (+)", "Vector/Functions", "VisualShaderNodeDerivativeFunc", TTR("(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and 'y'."), { VisualShaderNodeDerivativeFunc::FUNC_SUM, VisualShaderNodeDerivativeFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_FRAGMENT | TYPE_FLAGS_LIGHT, -1, true));
add_options.push_back(AddOption("Tan", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the tangent of the parameter."), { VisualShaderNodeVectorFunc::FUNC_TAN, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
add_options.push_back(AddOption("Tan", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the tangent of the parameter."), { VisualShaderNodeVectorFunc::FUNC_TAN, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
add_options.push_back(AddOption("Tan", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the tangent of the parameter."), { VisualShaderNodeVectorFunc::FUNC_TAN, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
@@ -5642,21 +5912,21 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Trunc", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Finds the truncated value of the parameter."), { VisualShaderNodeVectorFunc::FUNC_TRUNC, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
add_options.push_back(AddOption("Trunc", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Finds the truncated value of the parameter."), { VisualShaderNodeVectorFunc::FUNC_TRUNC, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
- add_options.push_back(AddOption("Add", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Adds 2D vector to 2D vector."), { VisualShaderNodeVectorOp::OP_ADD, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
- add_options.push_back(AddOption("Add", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Adds 3D vector to 3D vector."), { VisualShaderNodeVectorOp::OP_ADD, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
- add_options.push_back(AddOption("Add", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Adds 4D vector to 4D vector."), { VisualShaderNodeVectorOp::OP_ADD, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
- add_options.push_back(AddOption("Divide", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Divides 2D vector by 2D vector."), { VisualShaderNodeVectorOp::OP_DIV, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
- add_options.push_back(AddOption("Divide", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Divides 3D vector by 3D vector."), { VisualShaderNodeVectorOp::OP_DIV, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
- add_options.push_back(AddOption("Divide", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Divides 4D vector by 4D vector."), { VisualShaderNodeVectorOp::OP_DIV, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
- add_options.push_back(AddOption("Multiply", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Multiplies 2D vector by 2D vector."), { VisualShaderNodeVectorOp::OP_MUL, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
- add_options.push_back(AddOption("Multiply", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Multiplies 3D vector by 3D vector."), { VisualShaderNodeVectorOp::OP_MUL, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
- add_options.push_back(AddOption("Multiply", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Multiplies 4D vector by 4D vector."), { VisualShaderNodeVectorOp::OP_MUL, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
+ add_options.push_back(AddOption("Add (+)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Adds 2D vector to 2D vector."), { VisualShaderNodeVectorOp::OP_ADD, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
+ add_options.push_back(AddOption("Add (+)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Adds 3D vector to 3D vector."), { VisualShaderNodeVectorOp::OP_ADD, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
+ add_options.push_back(AddOption("Add (+)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Adds 4D vector to 4D vector."), { VisualShaderNodeVectorOp::OP_ADD, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
+ add_options.push_back(AddOption("Divide (/)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Divides 2D vector by 2D vector."), { VisualShaderNodeVectorOp::OP_DIV, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
+ add_options.push_back(AddOption("Divide (/)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Divides 3D vector by 3D vector."), { VisualShaderNodeVectorOp::OP_DIV, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
+ add_options.push_back(AddOption("Divide (/)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Divides 4D vector by 4D vector."), { VisualShaderNodeVectorOp::OP_DIV, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
+ add_options.push_back(AddOption("Multiply (*)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Multiplies 2D vector by 2D vector."), { VisualShaderNodeVectorOp::OP_MUL, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
+ add_options.push_back(AddOption("Multiply (*)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Multiplies 3D vector by 3D vector."), { VisualShaderNodeVectorOp::OP_MUL, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
+ add_options.push_back(AddOption("Multiply (*)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Multiplies 4D vector by 4D vector."), { VisualShaderNodeVectorOp::OP_MUL, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
add_options.push_back(AddOption("Remainder", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Returns the remainder of the two 2D vectors."), { VisualShaderNodeVectorOp::OP_MOD, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
add_options.push_back(AddOption("Remainder", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Returns the remainder of the two 3D vectors."), { VisualShaderNodeVectorOp::OP_MOD, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
add_options.push_back(AddOption("Remainder", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Returns the remainder of the two 4D vectors."), { VisualShaderNodeVectorOp::OP_MOD, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
- add_options.push_back(AddOption("Subtract", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Subtracts 2D vector from 2D vector."), { VisualShaderNodeVectorOp::OP_SUB, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
- add_options.push_back(AddOption("Subtract", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Subtracts 3D vector from 3D vector."), { VisualShaderNodeVectorOp::OP_SUB, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
- add_options.push_back(AddOption("Subtract", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Subtracts 4D vector from 4D vector."), { VisualShaderNodeVectorOp::OP_SUB, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
+ add_options.push_back(AddOption("Subtract (-)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Subtracts 2D vector from 2D vector."), { VisualShaderNodeVectorOp::OP_SUB, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D));
+ add_options.push_back(AddOption("Subtract (-)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Subtracts 3D vector from 3D vector."), { VisualShaderNodeVectorOp::OP_SUB, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D));
+ add_options.push_back(AddOption("Subtract (-)", "Vector/Operators", "VisualShaderNodeVectorOp", TTR("Subtracts 4D vector from 4D vector."), { VisualShaderNodeVectorOp::OP_SUB, VisualShaderNodeVectorOp::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D));
add_options.push_back(AddOption("Vector2Constant", "Vector/Variables", "VisualShaderNodeVec2Constant", TTR("2D vector constant."), {}, VisualShaderNode::PORT_TYPE_VECTOR_2D));
add_options.push_back(AddOption("Vector2Parameter", "Vector/Variables", "VisualShaderNodeVec2Parameter", TTR("2D vector parameter."), {}, VisualShaderNode::PORT_TYPE_VECTOR_2D));
@@ -5682,8 +5952,6 @@ VisualShaderEditor::VisualShaderEditor() {
_update_options_menu();
- undo_redo = EditorNode::get_undo_redo();
-
Ref<VisualShaderNodePluginDefault> default_plugin;
default_plugin.instantiate();
default_plugin->set_editor(this);
@@ -5724,6 +5992,7 @@ public:
Ref<Texture2D> type_icon[] = {
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("float"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("int"), SNAME("EditorIcons")),
+ EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("uint"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Vector2"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Vector3"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Vector4"), SNAME("EditorIcons")),
@@ -5773,6 +6042,7 @@ public:
Ref<Texture2D> type_icon[] = {
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("float"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("int"), SNAME("EditorIcons")),
+ EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("uint"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Vector2"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Vector3"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Vector4"), SNAME("EditorIcons")),
@@ -5852,6 +6122,7 @@ public:
Ref<Texture2D> type_icon[] = {
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("float"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("int"), SNAME("EditorIcons")),
+ EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("uint"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("bool"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Vector2"), SNAME("EditorIcons")),
EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Vector3"), SNAME("EditorIcons")),
@@ -5891,7 +6162,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);
@@ -6093,7 +6364,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);
@@ -6226,9 +6497,9 @@ void VisualShaderNodePortPreview::_shader_changed() {
}
}
- Ref<ShaderMaterial> material;
- material.instantiate();
- material->set_shader(preview_shader);
+ Ref<ShaderMaterial> mat;
+ mat.instantiate();
+ mat->set_shader(preview_shader);
//find if a material is also being edited and copy parameters to this one
@@ -6249,12 +6520,12 @@ void VisualShaderNodePortPreview::_shader_changed() {
List<PropertyInfo> params;
src_mat->get_shader()->get_shader_uniform_list(&params);
for (const PropertyInfo &E : params) {
- material->set(E.name, src_mat->get(E.name));
+ mat->set(E.name, src_mat->get(E.name));
}
}
}
- set_material(material);
+ set_material(mat);
}
void VisualShaderNodePortPreview::setup(const Ref<VisualShader> &p_shader, VisualShader::Type p_type, int p_node, int p_port) {
@@ -6268,7 +6539,7 @@ void VisualShaderNodePortPreview::setup(const Ref<VisualShader> &p_shader, Visua
}
Size2 VisualShaderNodePortPreview::get_minimum_size() const {
- int port_preview_size = EditorSettings::get_singleton()->get("editors/visual_editors/visual_shader/port_preview_size");
+ int port_preview_size = EDITOR_GET("editors/visual_editors/visual_shader/port_preview_size");
return Size2(port_preview_size, port_preview_size) * EDSCALE;
}
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index f7e033d753..c4f6b4952c 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -1,54 +1,52 @@
-/*************************************************************************/
-/* visual_shader_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* visual_shader_editor_plugin.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 VISUAL_SHADER_EDITOR_PLUGIN_H
#define VISUAL_SHADER_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
+#include "editor/editor_properties.h"
#include "editor/plugins/editor_resource_conversion_plugin.h"
+#include "scene/resources/syntax_highlighter.h"
#include "scene/resources/visual_shader.h"
-class Button;
class CodeEdit;
-class CodeHighlighter;
class CurveEditor;
class GraphEdit;
class GraphNode;
-class PopupMenu;
+class MenuButton;
class PopupPanel;
class RichTextLabel;
-class TextEdit;
class Tree;
class VisualShaderEditor;
-class EditorUndoRedoManager;
class VisualShaderNodePlugin : public RefCounted {
GDCLASS(VisualShaderNodePlugin, RefCounted);
@@ -97,7 +95,6 @@ private:
Ref<VisualShader> visual_shader;
HashMap<int, Link> links;
List<VisualShader::Connection> connections;
- bool dirty = false;
Color vector_expanded_color[4];
@@ -117,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);
@@ -135,6 +130,7 @@ public:
void update_curve_xyz(int p_node_id);
void set_expression(VisualShader::Type p_type, int p_node_id, const String &p_expression);
int get_constant_index(float p_constant) const;
+ Ref<Script> get_node_script(int p_node_id) const;
void update_node_size(int p_node_id);
void update_theme();
VisualShader::Type get_shader_type() const;
@@ -172,8 +168,7 @@ class VisualShaderEditor : public VBoxContainer {
Ref<VisualShader> visual_shader;
GraphEdit *graph = nullptr;
Button *add_node = nullptr;
- Button *varying_button = nullptr;
- PopupMenu *varying_options = nullptr;
+ MenuButton *varying_button = nullptr;
Button *preview_shader = nullptr;
OptionButton *edit_type = nullptr;
@@ -193,7 +188,9 @@ class VisualShaderEditor : public VBoxContainer {
PanelContainer *error_panel = nullptr;
Label *error_label = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
+ bool _block_update_options_menu = false;
+ bool _block_rebuild_shader = false;
+
Point2 saved_node_pos;
bool saved_node_pos_dirty = false;
@@ -290,7 +287,6 @@ class VisualShaderEditor : public VBoxContainer {
void _tools_menu_option(int p_idx);
void _show_members_dialog(bool at_mouse_pos, VisualShaderNode::PortType p_input_port_type = VisualShaderNode::PORT_TYPE_MAX, VisualShaderNode::PortType p_output_port_type = VisualShaderNode::PORT_TYPE_MAX);
- void _show_varying_menu();
void _varying_menu_id_pressed(int p_idx);
void _show_add_varying_dialog();
void _show_remove_varying_dialog();
@@ -502,6 +498,9 @@ class VisualShaderEditor : public VBoxContainer {
void _update_parameter_refs(HashSet<String> &p_names);
void _update_varyings();
+ void _update_options_menu_deferred();
+ void _rebuild_shader_deferred();
+
void _visibility_changed();
protected:
@@ -509,7 +508,6 @@ protected:
static void _bind_methods();
public:
- void update_nodes();
void add_plugin(const Ref<VisualShaderNodePlugin> &p_plugin);
void remove_plugin(const Ref<VisualShaderNodePlugin> &p_plugin);
@@ -518,6 +516,9 @@ public:
void clear_custom_types();
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);
VisualShaderEditor();
diff --git a/editor/plugins/voxel_gi_editor_plugin.cpp b/editor/plugins/voxel_gi_editor_plugin.cpp
index 713c90c075..a3ccf392e6 100644
--- a/editor/plugins/voxel_gi_editor_plugin.cpp
+++ b/editor/plugins/voxel_gi_editor_plugin.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* voxel_gi_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* voxel_gi_editor_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 "voxel_gi_editor_plugin.h"
diff --git a/editor/plugins/voxel_gi_editor_plugin.h b/editor/plugins/voxel_gi_editor_plugin.h
index 43d6f71e26..ad68ff5d91 100644
--- a/editor/plugins/voxel_gi_editor_plugin.h
+++ b/editor/plugins/voxel_gi_editor_plugin.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* voxel_gi_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* voxel_gi_editor_plugin.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 VOXEL_GI_EDITOR_PLUGIN_H
#define VOXEL_GI_EDITOR_PLUGIN_H
@@ -37,6 +37,7 @@
class EditorFileDialog;
struct EditorProgress;
+class HBoxContainer;
class VoxelGIEditorPlugin : public EditorPlugin {
GDCLASS(VoxelGIEditorPlugin, EditorPlugin);
diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp
index a00df0ef40..f70a795683 100644
--- a/editor/pot_generator.cpp
+++ b/editor/pot_generator.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* pot_generator.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* pot_generator.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 "pot_generator.h"
@@ -63,7 +63,7 @@ void POTGenerator::generate_pot(const String &p_file) {
// Clear all_translation_strings of the previous round.
all_translation_strings.clear();
- Vector<String> files = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
+ Vector<String> files = GLOBAL_GET("internationalization/locale/translations_pot_files");
// Collect all translatable strings according to files order in "POT Generation" setting.
for (int i = 0; i < files.size(); i++) {
@@ -99,8 +99,8 @@ void POTGenerator::_write_to_pot(const String &p_file) {
return;
}
- String project_name = ProjectSettings::get_singleton()->get("application/config/name");
- Vector<String> files = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
+ String project_name = GLOBAL_GET("application/config/name");
+ Vector<String> files = GLOBAL_GET("internationalization/locale/translations_pot_files");
String extracted_files = "";
for (int i = 0; i < files.size(); i++) {
extracted_files += "# " + files[i] + "\n";
@@ -159,14 +159,15 @@ void POTGenerator::_write_to_pot(const String &p_file) {
void POTGenerator::_write_msgid(Ref<FileAccess> r_file, const String &p_id, bool p_plural) {
// Split \\n and \n.
- Vector<String> temp = p_id.split("\\n");
Vector<String> msg_lines;
+ Vector<String> temp = p_id.split("\\n");
for (int i = 0; i < temp.size(); i++) {
msg_lines.append_array(temp[i].split("\n"));
- if (i < temp.size() - 1) {
- // Add \n.
- msg_lines.set(msg_lines.size() - 1, msg_lines[msg_lines.size() - 1] + "\\n");
- }
+ }
+
+ // Add \n.
+ for (int i = 0; i < msg_lines.size() - 1; i++) {
+ msg_lines.set(i, msg_lines[i] + "\\n");
}
if (p_plural) {
@@ -175,6 +176,10 @@ void POTGenerator::_write_msgid(Ref<FileAccess> r_file, const String &p_id, bool
r_file->store_string("msgid ");
}
+ if (msg_lines.size() > 1) {
+ r_file->store_line("\"\"");
+ }
+
for (int i = 0; i < msg_lines.size(); i++) {
r_file->store_line("\"" + msg_lines[i] + "\"");
}
diff --git a/editor/pot_generator.h b/editor/pot_generator.h
index 7b14eb027e..8bcb2e5cac 100644
--- a/editor/pot_generator.h
+++ b/editor/pot_generator.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* pot_generator.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* pot_generator.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 POT_GENERATOR_H
#define POT_GENERATOR_H
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp
index 4cc60c4c3c..db11f80826 100644
--- a/editor/progress_dialog.cpp
+++ b/editor/progress_dialog.cpp
@@ -1,37 +1,38 @@
-/*************************************************************************/
-/* progress_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* progress_dialog.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 "progress_dialog.h"
#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) {
diff --git a/editor/progress_dialog.h b/editor/progress_dialog.h
index a29696cc0d..5346f01a9e 100644
--- a/editor/progress_dialog.h
+++ b/editor/progress_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* progress_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* progress_dialog.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 PROGRESS_DIALOG_H
#define PROGRESS_DIALOG_H
diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp
index 39b30b31fb..b5dca26c63 100644
--- a/editor/project_converter_3_to_4.cpp
+++ b/editor/project_converter_3_to_4.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* project_converter_3_to_4.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* project_converter_3_to_4.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 "project_converter_3_to_4.h"
@@ -38,6 +38,7 @@ const int ERROR_CODE = 77;
#include "modules/regex/regex.h"
+#include "core/io/dir_access.h"
#include "core/os/time.h"
#include "core/templates/hash_map.h"
#include "core/templates/list.h"
@@ -121,9 +122,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
@@ -212,10 +210,12 @@ 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
@@ -228,14 +228,16 @@ static const char *gdscript_function_renames[][2] = {
{ "add_force", "apply_force" }, //RigidBody2D
{ "add_icon_override", "add_theme_icon_override" }, // Control
{ "add_scene_import_plugin", "add_scene_format_importer_plugin" }, //EditorPlugin
+ { "add_spatial_gizmo_plugin", "add_node_3d_gizmo_plugin" }, // EditorPlugin
{ "add_stylebox_override", "add_theme_stylebox_override" }, // Control
{ "add_torque", "apply_torque" }, //RigidBody2D
+ { "agent_set_neighbor_dist", "agent_set_neighbor_distance" }, // NavigationServer2D, NavigationServer3D
{ "apply_changes", "_apply_changes" }, // EditorPlugin
{ "body_add_force", "body_apply_force" }, // PhysicsServer2D
{ "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
@@ -261,7 +263,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
@@ -280,7 +282,7 @@ static const char *gdscript_function_renames[][2] = {
{ "get_applied_torque", "get_constant_torque" }, //RigidBody2D
{ "get_audio_bus", "get_audio_bus_name" }, // Area3D
{ "get_bound_child_nodes_to_bone", "get_bone_children" }, // Skeleton3D
- { "get_camera", "get_camera_3d" }, // Viewport -> this is also convertable to get_camera_2d, broke GLTFNode
+ { "get_camera", "get_camera_3d" }, // Viewport -> this is also convertible to get_camera_2d, broke GLTFNode
{ "get_cancel", "get_cancel_button" }, // ConfirmationDialog
{ "get_caption", "_get_caption" }, // AnimationNode
{ "get_cast_to", "get_target_position" }, // RayCast2D, RayCast3D
@@ -298,14 +300,15 @@ static const char *gdscript_function_renames[][2] = {
{ "get_cull_mask_bit", "get_cull_mask_value" }, // Camera3D
{ "get_cursor_position", "get_caret_column" }, // LineEdit
{ "get_d", "get_distance" }, // LineShape2D
+ { "get_depth_bias_enable", "get_depth_bias_enabled" }, // RDPipelineRasterizationState
{ "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
{ "get_error_string", "get_error_message" }, // JSON
{ "get_filename", "get_scene_file_path" }, // Node, WARNING, this may be used in a lot of other places
{ "get_focus_neighbour", "get_focus_neighbor" }, // Control
+ { "get_follow_smoothing", "get_position_smoothing_speed" }, // Camera2D
{ "get_font_types", "get_font_type_list" }, // Theme
{ "get_frame_color", "get_color" }, // ColorRect
{ "get_global_rate_scale", "get_playback_speed_scale" }, // AudioServer
@@ -331,6 +334,7 @@ static const char *gdscript_function_renames[][2] = {
{ "get_metakey", "is_meta_pressed" }, // InputEventWithModifiers
{ "get_mid_height", "get_height" }, // CapsuleMesh
{ "get_motion_remainder", "get_remainder" }, // PhysicsTestMotionResult2D
+ { "get_neighbor_dist", "get_neighbor_distance" }, // NavigationAgent2D, NavigationAgent3D
{ "get_network_connected_peers", "get_peers" }, // Multiplayer API
{ "get_network_master", "get_multiplayer_authority" }, // Node
{ "get_network_peer", "get_multiplayer_peer" }, // Multiplayer API
@@ -353,16 +357,19 @@ static const char *gdscript_function_renames[][2] = {
{ "get_render_targetsize", "get_render_target_size" }, // XRInterface
{ "get_resource_type", "_get_resource_type" }, // ResourceFormatLoader
{ "get_result", "get_data" }, //JSON
+ { "get_reverb_bus", "set_reverb_bus_name" }, // Area3D
{ "get_rpc_sender_id", "get_remote_sender_id" }, // Multiplayer API
{ "get_save_extension", "_get_save_extension" }, // EditorImportPlugin
{ "get_scancode", "get_keycode" }, // InputEventKey
{ "get_scancode_string", "get_keycode_string" }, // OS
{ "get_scancode_with_modifiers", "get_keycode_with_modifiers" }, // InputEventKey
+ { "get_selected_path", "get_current_directory" }, // EditorInterface
{ "get_shift", "is_shift_pressed" }, // InputEventWithModifiers
{ "get_size_override", "get_size_2d_override" }, // SubViewport
{ "get_slide_count", "get_slide_collision_count" }, // CharacterBody2D, CharacterBody3D
{ "get_slips_on_slope", "get_slide_on_slope" }, // SeparationRayShape2D, SeparationRayShape3D
{ "get_space_override_mode", "get_gravity_space_override_mode" }, // Area2D
+ { "get_spatial_node", "get_node_3d" }, // EditorNode3DGizmo
{ "get_speed", "get_velocity" }, // InputEventMouseMotion
{ "get_stylebox_types", "get_stylebox_type_list" }, // Theme
{ "get_surface_material", "get_surface_override_material" }, // MeshInstance3D broke ImporterMesh
@@ -373,6 +380,7 @@ static const char *gdscript_function_renames[][2] = {
{ "get_theme_item_types", "get_theme_item_type_list" }, // Theme
{ "get_timer_process_mode", "get_timer_process_callback" }, // Timer
{ "get_translation", "get_position" }, // Node3D broke GLTFNode which is used rarely
+ { "get_unit_db", "get_volume_db" }, // AudioStreamPlayer3D
{ "get_unit_offset", "get_progress_ratio" }, // PathFollow2D, PathFollow3D
{ "get_use_in_baked_light", "is_baking_navigation" }, // GridMap
{ "get_used_cells_by_id", "get_used_cells" }, // TileMap
@@ -410,6 +418,7 @@ static const char *gdscript_function_renames[][2] = {
{ "is_commiting_action", "is_committing_action" }, // UndoRedo
{ "is_doubleclick", "is_double_click" }, // InputEventMouseButton
{ "is_draw_red", "is_draw_warning" }, // EditorProperty
+ { "is_follow_smoothing_enabled", "is_position_smoothing_enabled" }, // Camera2D
{ "is_h_drag_enabled", "is_drag_horizontal_enabled" }, // Camera2D
{ "is_handle_highlighted", "_is_handle_highlighted" }, // EditorNode3DGizmo, EditorNode3DGizmoPlugin
{ "is_inverting_faces", "get_flip_faces" }, // CSGPrimitive3D
@@ -418,6 +427,7 @@ static const char *gdscript_function_renames[][2] = {
{ "is_normalmap", "is_normal_map" }, // NoiseTexture
{ "is_refusing_new_network_connections", "is_refusing_new_connections" }, // Multiplayer API
{ "is_region", "is_region_enabled" }, // Sprite2D
+ { "is_rotating", "is_ignoring_rotation" }, // Camera2D
{ "is_scancode_unicode", "is_keycode_unicode" }, // OS
{ "is_selectable_when_hidden", "_is_selectable_when_hidden" }, // EditorNode3DGizmoPlugin
{ "is_set_as_toplevel", "is_set_as_top_level" }, // CanvasItem
@@ -452,6 +462,7 @@ static const char *gdscript_function_renames[][2] = {
{ "post_import", "_post_import" }, // EditorScenePostImport
{ "print_stray_nodes", "print_orphan_nodes" }, // Node
{ "property_list_changed_notify", "notify_property_list_changed" }, // Object
+ { "raise", "move_to_front" }, // CanvasItem
{ "recognize", "_recognize" }, // ResourceFormatLoader
{ "regen_normalmaps", "regen_normal_maps" }, // ArrayMesh
{ "remove", "remove_at" }, // Array, broke Directory
@@ -461,6 +472,7 @@ static const char *gdscript_function_renames[][2] = {
{ "remove_font_override", "remove_theme_font_override" }, // Control
{ "remove_icon_override", "remove_theme_icon_override" }, // Control
{ "remove_scene_import_plugin", "remove_scene_format_importer_plugin" }, //EditorPlugin
+ { "remove_spatial_gizmo_plugin", "remove_node_3d_gizmo_plugin" }, // EditorPlugin
{ "remove_stylebox_override", "remove_theme_stylebox_override" }, // Control
{ "rename_animation", "rename_animation_library" }, // AnimationPlayer
{ "rename_dependencies", "_rename_dependencies" }, // ResourceFormatLoader
@@ -486,13 +498,16 @@ static const char *gdscript_function_renames[][2] = {
{ "set_cull_mask_bit", "set_cull_mask_value" }, // Camera3D
{ "set_cursor_position", "set_caret_column" }, // LineEdit
{ "set_d", "set_distance" }, // WorldMarginShape2D
+ { "set_depth_bias_enable", "set_depth_bias_enabled" }, // RDPipelineRasterizationState
{ "set_doubleclick", "set_double_click" }, // InputEventMouseButton
{ "set_draw_red", "set_draw_warning" }, // EditorProperty
+ { "set_enable_follow_smoothing", "set_position_smoothing_enabled" }, // Camera2D
{ "set_enabled_focus_mode", "set_focus_mode" }, // BaseButton
{ "set_endian_swap", "set_big_endian" }, // File
{ "set_expand_to_text_length", "set_expand_to_text_length_enabled" }, // LineEdit
{ "set_filename", "set_scene_file_path" }, // Node, WARNING, this may be used in a lot of other places
{ "set_focus_neighbour", "set_focus_neighbor" }, // Control
+ { "set_follow_smoothing", "set_position_smoothing_speed" }, // Camera2D
{ "set_frame_color", "set_color" }, // ColorRect
{ "set_global_rate_scale", "set_playback_speed_scale" }, // AudioServer
{ "set_gravity_distance_scale", "set_gravity_point_distance_scale" }, // Area2D
@@ -510,14 +525,17 @@ static const char *gdscript_function_renames[][2] = {
{ "set_max_atlas_size", "set_max_texture_size" }, // LightmapGI
{ "set_metakey", "set_meta_pressed" }, // InputEventWithModifiers
{ "set_mid_height", "set_height" }, // CapsuleMesh
+ { "set_neighbor_dist", "set_neighbor_distance" }, // NavigationAgent2D, NavigationAgent3D
{ "set_network_master", "set_multiplayer_authority" }, // Node
{ "set_network_peer", "set_multiplayer_peer" }, // Multiplayer API
{ "set_oneshot", "set_one_shot" }, // AnimatedTexture
{ "set_pause_mode", "set_process_mode" }, // Node
{ "set_physical_scancode", "set_physical_keycode" }, // InputEventKey
+ { "set_proximity_fade", "set_proximity_fade_enabled" }, // Material
{ "set_refuse_new_network_connections", "set_refuse_new_connections" }, // Multiplayer API
{ "set_region", "set_region_enabled" }, // Sprite2D, Sprite broke AtlasTexture
{ "set_region_filter_clip", "set_region_filter_clip_enabled" }, // Sprite2D
+ { "set_reverb_bus", "set_reverb_bus_name" }, // Area3D
{ "set_rotate", "set_rotates" }, // PathFollow2D
{ "set_scancode", "set_keycode" }, // InputEventKey
{ "set_shift", "set_shift_pressed" }, // InputEventWithModifiers
@@ -526,6 +544,7 @@ static const char *gdscript_function_renames[][2] = {
{ "set_slips_on_slope", "set_slide_on_slope" }, // SeparationRayShape2D, SeparationRayShape3D
{ "set_sort_enabled", "set_y_sort_enabled" }, // Node2D
{ "set_space_override_mode", "set_gravity_space_override_mode" }, // Area2D
+ { "set_spatial_node", "set_node_3d" }, // EditorNode3DGizmo
{ "set_speed", "set_velocity" }, // InputEventMouseMotion
{ "set_ssao_edge_sharpness", "set_ssao_sharpness" }, // Environment
{ "set_surface_material", "set_surface_override_material" }, // MeshInstance3D broke ImporterMesh
@@ -534,6 +553,7 @@ static const char *gdscript_function_renames[][2] = {
{ "set_text_align", "set_text_alignment" }, // Button
{ "set_timer_process_mode", "set_timer_process_callback" }, // Timer
{ "set_translation", "set_position" }, // Node3D - this broke GLTFNode which is used rarely
+ { "set_unit_db", "set_volume_db" }, // AudioStreamPlayer3D
{ "set_unit_offset", "set_progress_ratio" }, // PathFollow2D, PathFollow3D
{ "set_uv2", "surface_set_uv2" }, // ImmediateMesh broke Surffacetool
{ "set_v_drag_enabled", "set_drag_vertical_enabled" }, // Camera2D
@@ -570,6 +590,7 @@ static const char *gdscript_function_renames[][2] = {
{ "is_abs_path", "is_absolute_path" }, // String
{ "is_valid_integer", "is_valid_int" }, // String
{ "linear_interpolate", "lerp" }, // Color
+ { "find_last", "rfind" }, // Array, String
{ "to_ascii", "to_ascii_buffer" }, // String
{ "to_utf8", "to_utf8_buffer" }, // String
{ "to_wchar", "to_utf32_buffer" }, // String // TODO - utf32 or utf16?
@@ -645,11 +666,14 @@ 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
{ "_GetConfigurationWarning", "_GetConfigurationWarnings" }, // Node
{ "_SetCurrent", "SetCurrent" }, // Camera2D
{ "_SetEditorDescription", "SetEditorDescription" }, // Node
+ { "_SetPlaying", "SetPlaying" }, // AnimatedSprite3D
{ "_ToplevelRaiseSelf", "_TopLevelRaiseSelf" }, // CanvasItem
{ "_UpdateWrapAt", "_UpdateWrapAtColumn" }, // TextEdit
{ "AddAnimation", "AddAnimationLibrary" }, // AnimationPlayer
@@ -664,9 +688,11 @@ static const char *csharp_function_renames[][2] = {
{ "AddSceneImportPlugin", "AddSceneFormatImporterPlugin" }, //EditorPlugin
{ "AddStyleboxOverride", "AddThemeStyleboxOverride" }, // Control
{ "AddTorque", "AddConstantTorque" }, //RigidBody2D
+ { "AgentSetNeighborDist", "AgentSetNeighborDistance" }, // NavigationServer2D, NavigationServer3D
{ "BindChildNodeToBone", "SetBoneChildren" }, // Skeleton3D
{ "BumpmapToNormalmap", "BumpMapToNormalMap" }, // Image
{ "CanBeHidden", "_CanBeHidden" }, // EditorNode3DGizmoPlugin
+ { "CanDropData", "_CanDropData" }, // Control
{ "CanDropDataFw", "_CanDropDataFw" }, // ScriptEditor
{ "CanGenerateSmallPreview", "_CanGenerateSmallPreview" }, // EditorResourcePreviewGenerator
{ "CanInstance", "CanInstantiate" }, // PackedScene, Script
@@ -690,6 +716,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
@@ -708,7 +735,7 @@ static const char *csharp_function_renames[][2] = {
{ "GetAppliedTorque", "GetConstantTorque" }, //RigidBody2D
{ "GetAudioBus", "GetAudioBusName" }, // Area3D
{ "GetBoundChildNodesToBone", "GetBoneChildren" }, // Skeleton3D
- { "GetCamera", "GetCamera3d" }, // Viewport -> this is also convertable to getCamera2d, broke GLTFNode
+ { "GetCamera", "GetCamera3d" }, // Viewport -> this is also convertible to getCamera2d, broke GLTFNode
{ "GetCancel", "GetCancelButton" }, // ConfirmationDialog
{ "GetCaption", "_GetCaption" }, // AnimationNode
{ "GetCastTo", "GetTargetPosition" }, // RayCast2D, RayCast3D
@@ -726,12 +753,14 @@ static const char *csharp_function_renames[][2] = {
{ "GetCullMaskBit", "GetCullMaskValue" }, // Camera3D
{ "GetCursorPosition", "GetCaretColumn" }, // LineEdit
{ "GetD", "GetDistance" }, // LineShape2D
+ { "GetDepthBiasEnable", "GetDepthBiasEnabled" }, // RDPipelineRasterizationState
{ "GetDragDataFw", "_GetDragDataFw" }, // ScriptEditor
{ "GetEditorViewport", "GetViewport" }, // EditorPlugin
{ "GetEnabledFocusMode", "GetFocusMode" }, // BaseButton
{ "GetEndianSwap", "IsBigEndian" }, // File
{ "GetErrorString", "GetErrorMessage" }, // JSON
{ "GetFocusNeighbour", "GetFocusNeighbor" }, // Control
+ { "GetFollowSmoothing", "GetFollowSmoothingSpeed" }, // Camera2D
{ "GetFontTypes", "GetFontTypeList" }, // Theme
{ "GetFrameColor", "GetColor" }, // ColorRect
{ "GetGlobalRateScale", "GetPlaybackSpeedScale" }, // AudioServer
@@ -757,6 +786,7 @@ static const char *csharp_function_renames[][2] = {
{ "GetMetakey", "IsMetaPressed" }, // InputEventWithModifiers
{ "GetMidHeight", "GetHeight" }, // CapsuleMesh
{ "GetMotionRemainder", "GetRemainder" }, // PhysicsTestMotionResult2D
+ { "GetNeighborDist", "GetNeighborDistance" }, // NavigationAgent2D, NavigationAgent3D
{ "GetNetworkConnectedPeers", "GetPeers" }, // Multiplayer API
{ "GetNetworkMaster", "GetMultiplayerAuthority" }, // Node
{ "GetNetworkPeer", "GetMultiplayerPeer" }, // Multiplayer API
@@ -778,6 +808,7 @@ static const char *csharp_function_renames[][2] = {
{ "GetRenderTargetsize", "GetRenderTargetSize" }, // XRInterface
{ "GetResourceType", "_GetResourceType" }, // ResourceFormatLoader
{ "GetResult", "GetData" }, //JSON
+ { "GetReverbBus", "GetReverbBusName" }, // Area3D
{ "GetRpcSenderId", "GetRemoteSenderId" }, // Multiplayer API
{ "GetSaveExtension", "_GetSaveExtension" }, // EditorImportPlugin
{ "GetScancode", "GetKeycode" }, // InputEventKey
@@ -787,6 +818,7 @@ static const char *csharp_function_renames[][2] = {
{ "GetSizeOverride", "GetSize2dOverride" }, // SubViewport
{ "GetSlipsOnSlope", "GetSlideOnSlope" }, // SeparationRayShape2D, SeparationRayShape3D
{ "GetSpaceOverrideMode", "GetGravitySpaceOverrideMode" }, // Area2D
+ { "GetSpatialNode", "GetNode3d" }, // EditorNode3DGizmo
{ "GetSpeed", "GetVelocity" }, // InputEventMouseMotion
{ "GetStyleboxTypes", "GetStyleboxTypeList" }, // Theme
{ "GetSurfaceMaterial", "GetSurfaceOverrideMaterial" }, // MeshInstance3D broke ImporterMesh
@@ -797,6 +829,7 @@ static const char *csharp_function_renames[][2] = {
{ "GetThemeItemTypes", "GetThemeItemTypeList" }, // Theme
{ "GetTimerProcessMode", "GetTimerProcessCallback" }, // Timer
{ "GetTranslation", "GetPosition" }, // Node3D broke GLTFNode which is used rarely
+ { "GetUnitDb", "GetVolumeDb" }, // AudioStreamPlayer3D
{ "GetUnitOffset", "GetProgressRatio" }, // PathFollow2D, PathFollow3D
{ "GetUseInBakedLight", "IsBakingNavigation" }, // GridMap
{ "GetUsedCellsById", "GetUsedCells" }, // TileMap
@@ -833,6 +866,7 @@ static const char *csharp_function_renames[][2] = {
{ "IsAParentOf", "IsAncestorOf" }, // Node
{ "IsCommitingAction", "IsCommittingAction" }, // UndoRedo
{ "IsDoubleclick", "IsDoubleClick" }, // InputEventMouseButton
+ { "IsFollowSmoothingEnabled", "IsPositionSmoothingEnabled" }, // Camera2D
{ "IsHDragEnabled", "IsDragHorizontalEnabled" }, // Camera2D
{ "IsHandleHighlighted", "_IsHandleHighlighted" }, // EditorNode3DGizmo, EditorNode3DGizmoPlugin
{ "IsNetworkMaster", "IsMultiplayerAuthority" }, // Node
@@ -840,6 +874,7 @@ static const char *csharp_function_renames[][2] = {
{ "IsNormalmap", "IsNormalMap" }, // NoiseTexture
{ "IsRefusingNewNetworkConnections", "IsRefusingNewConnections" }, // Multiplayer API
{ "IsRegion", "IsRegionEnabled" }, // Sprite2D
+ { "IsRotating", "IsIgnoringRotation" }, // Camera2D
{ "IsScancodeUnicode", "IsKeycodeUnicode" }, // OS
{ "IsSelectableWhenHidden", "_IsSelectableWhenHidden" }, // EditorNode3DGizmoPlugin
{ "IsSetAsToplevel", "IsSetAsTopLevel" }, // CanvasItem
@@ -880,6 +915,7 @@ static const char *csharp_function_renames[][2] = {
{ "RemoveConstantOverride", "RemoveThemeConstantOverride" }, // Control
{ "RemoveFontOverride", "RemoveThemeFontOverride" }, // Control
{ "RemoveSceneImportPlugin", "RemoveSceneFormatImporterPlugin" }, //EditorPlugin
+ { "RemoveSpatialGizmoPlugin", "RemoveNode3dGizmoPlugin" }, // EditorPlugin
{ "RemoveStyleboxOverride", "RemoveThemeStyleboxOverride" }, // Control
{ "RenameAnimation", "RenameAnimationLibrary" }, // AnimationPlayer
{ "RenameDependencies", "_RenameDependencies" }, // ResourceFormatLoader
@@ -905,11 +941,14 @@ static const char *csharp_function_renames[][2] = {
{ "SetCullMaskBit", "SetCullMaskValue" }, // Camera3D
{ "SetCursorPosition", "SetCaretColumn" }, // LineEdit
{ "SetD", "SetDistance" }, // WorldMarginShape2D
+ { "SetDepthBiasEnable", "SetDepthBiasEnabled" }, // RDPipelineRasterizationState
{ "SetDoubleclick", "SetDoubleClick" }, // InputEventMouseButton
+ { "SetEnableFollowSmoothing", "SetFollowSmoothingEnabled" }, // Camera2D
{ "SetEnabledFocusMode", "SetFocusMode" }, // BaseButton
{ "SetEndianSwap", "SetBigEndian" }, // File
{ "SetExpandToTextLength", "SetExpandToTextLengthEnabled" }, // LineEdit
{ "SetFocusNeighbour", "SetFocusNeighbor" }, // Control
+ { "SetFollowSmoothing", "SetFollowSmoothingSpeed" }, // Camera2D
{ "SetFrameColor", "SetColor" }, // ColorRect
{ "SetGlobalRateScale", "SetPlaybackSpeedScale" }, // AudioServer
{ "SetGravityDistanceScale", "SetGravityPointDistanceScale" }, // Area2D
@@ -926,13 +965,16 @@ static const char *csharp_function_renames[][2] = {
{ "SetMaxAtlasSize", "SetMaxTextureSize" }, // LightmapGI
{ "SetMetakey", "SetMetaPressed" }, // InputEventWithModifiers
{ "SetMidHeight", "SetHeight" }, // CapsuleMesh
+ { "SetNeighborDist", "SetNeighborDistance" }, // NavigationAgent2D, NavigationAgent3D
{ "SetNetworkMaster", "SetMultiplayerAuthority" }, // Node
{ "SetNetworkPeer", "SetMultiplayerPeer" }, // Multiplayer API
{ "SetOneshot", "SetOneShot" }, // AnimatedTexture
{ "SetPhysicalScancode", "SetPhysicalKeycode" }, // InputEventKey
+ { "SetProximityFade", "SetProximityFadeEnabled" }, // Material
{ "SetRefuseNewNetworkConnections", "SetRefuseNewConnections" }, // Multiplayer API
{ "SetRegion", "SetRegionEnabled" }, // Sprite2D, Sprite broke AtlasTexture
{ "SetRegionFilterClip", "SetRegionFilterClipEnabled" }, // Sprite2D
+ { "SetReverbBus", "SetReverbBusName" }, // Area3D
{ "SetRotate", "SetRotates" }, // PathFollow2D
{ "SetScancode", "SetKeycode" }, // InputEventKey
{ "SetShift", "SetShiftPressed" }, // InputEventWithModifiers
@@ -941,6 +983,7 @@ static const char *csharp_function_renames[][2] = {
{ "SetSlipsOnSlope", "SetSlideOnSlope" }, // SeparationRayShape2D, SeparationRayShape3D
{ "SetSortEnabled", "SetYSortEnabled" }, // Node2D
{ "SetSpaceOverrideMode", "SetGravitySpaceOverrideMode" }, // Area2D
+ { "SetSpatialNode", "SetNode3d" }, // EditorNode3DGizmo
{ "SetSpeed", "SetVelocity" }, // InputEventMouseMotion
{ "SetSsaoEdgeSharpness", "SetSsaoSharpness" }, // Environment
{ "SetSurfaceMaterial", "SetSurfaceOverrideMaterial" }, // MeshInstance3D broke ImporterMesh
@@ -950,6 +993,7 @@ static const char *csharp_function_renames[][2] = {
{ "SetTimerProcessMode", "SetTimerProcessCallback" }, // Timer
{ "SetTonemapAutoExposure", "SetTonemapAutoExposureEnabled" }, // Environment
{ "SetTranslation", "SetPosition" }, // Node3D - this broke GLTFNode which is used rarely
+ { "SetUnitDb", "SetVolumeDb" }, // AudioStreamPlayer3D
{ "SetUnitOffset", "SetProgressRatio" }, // PathFollow2D, PathFollow3D
{ "SetUv2", "SurfaceSetUv2" }, // ImmediateMesh broke Surffacetool
{ "SetVDragEnabled", "SetDragVerticalEnabled" }, // Camera2D
@@ -1036,6 +1080,7 @@ 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
@@ -1048,6 +1093,7 @@ static const char *gdscript_properties_renames[][2] = {
{ "close_v_ofs", "close_v_offset" }, // Theme
{ "commentfocus", "comment_focus" }, // Theme
{ "contacts_reported", "max_contacts_reported" }, // RigidBody
+ { "depth_bias_enable", "depth_bias_enabled" }, // RDPipelineRasterizationState
{ "drag_margin_bottom", "drag_bottom_margin" }, // Camera2D
{ "drag_margin_h_enabled", "drag_horizontal_enabled" }, // Camera2D
{ "drag_margin_left", "drag_left_margin" }, // Camera2D
@@ -1061,6 +1107,7 @@ static const char *gdscript_properties_renames[][2] = {
{ "focus_neighbour_left", "focus_neighbor_left" }, // Control
{ "focus_neighbour_right", "focus_neighbor_right" }, // Control
{ "focus_neighbour_top", "focus_neighbor_top" }, // Control
+ { "follow_viewport_enable", "follow_viewport_enabled" }, // CanvasItem
{ "file_icon_modulate", "file_icon_color" }, // Theme
{ "files_disabled", "file_disabled_color" }, // Theme
{ "folder_icon_modulate", "folder_icon_color" }, // Theme
@@ -1069,6 +1116,7 @@ static const char *gdscript_properties_renames[][2] = {
{ "gravity_vec", "gravity_direction" }, // Area2D
{ "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
@@ -1076,6 +1124,7 @@ static const char *gdscript_properties_renames[][2] = {
{ "margin_right", "offset_right" }, // Control broke NinePatchRect, StyleBox
{ "margin_top", "offset_top" }, // Control broke NinePatchRect, StyleBox
{ "mid_height", "height" }, // CapsuleMesh
+ { "neighbor_dist", "neighbor_distance" }, // NavigationAgent2D, NavigationAgent3D
{ "offset_h", "drag_horizontal_offset" }, // Camera2D
{ "offset_v", "drag_vertical_offset" }, // Camera2D
{ "off", "unchecked" }, // Theme
@@ -1088,19 +1137,23 @@ static const char *gdscript_properties_renames[][2] = {
{ "pause_mode", "process_mode" }, // Node
{ "physical_scancode", "physical_keycode" }, // InputEventKey
{ "popup_exclusive", "exclusive" }, // Window
+ { "proximity_fade_enable", "proximity_fade_enabled" }, // Material
{ "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
{ "rect_clip_content", "clip_contents" }, // Control
{ "refuse_new_network_connections", "refuse_new_connections" }, // MultiplayerAPI
{ "region_filter_clip", "region_filter_clip_enabled" }, // Sprite2D
+ { "reverb_bus_enable", "reverb_bus_enabled" }, // Area3D
{ "selectedframe", "selected_frame" }, // Theme
{ "size_override_stretch", "size_2d_override_stretch" }, // SubViewport
{ "slips_on_slope", "slide_on_slope" }, // SeparationRayShape2D
+ { "smoothing_enabled", "follow_smoothing_enabled" }, // Camera2D
+ { "smoothing_speed", "position_smoothing_speed" }, // Camera2D
{ "ss_reflections_depth_tolerance", "ssr_depth_tolerance" }, // Environment
{ "ss_reflections_enabled", "ssr_enabled" }, // Environment
{ "ss_reflections_fade_in", "ssr_fade_in" }, // Environment
@@ -1112,6 +1165,7 @@ static const char *gdscript_properties_renames[][2] = {
{ "table_hseparation", "table_h_separation" }, // Theme
{ "table_vseparation", "table_v_separation" }, // Theme
{ "translation", "position" }, // Node3D - broke GLTFNode
+ { "unit_db", "volume_db" }, // AudioStreamPlayer3D
{ "unit_offset", "progress_ratio" }, // PathFollow2D, PathFollow3D
{ "vseparation", "v_separation" }, // Theme
@@ -1142,6 +1196,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
@@ -1151,6 +1206,7 @@ static const char *csharp_properties_renames[][2] = {
{ "CloseHOfs", "CloseHOffset" }, // Theme
{ "CloseVOfs", "CloseVOffset" }, // Theme
{ "Commentfocus", "CommentFocus" }, // Theme
+ { "DepthBiasEnable", "DepthBiasEnabled" }, // RDPipelineRasterizationState
{ "DragMarginBottom", "DragBottomMargin" }, // Camera2D
{ "DragMarginHEnabled", "DragHorizontalEnabled" }, // Camera2D
{ "DragMarginLeft", "DragLeftMargin" }, // Camera2D
@@ -1164,11 +1220,13 @@ static const char *csharp_properties_renames[][2] = {
{ "FocusNeighbourLeft", "FocusNeighborLeft" }, // Control
{ "FocusNeighbourRight", "FocusNeighborRight" }, // Control
{ "FocusNeighbourTop", "FocusNeighborTop" }, // Control
+ { "FollowViewportEnable", "FollowViewportEnabled" }, // CanvasItem
{ "GlobalRateScale", "PlaybackSpeedScale" }, // AudioServer
{ "GravityDistanceScale", "GravityPointDistanceScale" }, // Area2D
{ "GravityVec", "GravityDirection" }, // Area2D
{ "HintTooltip", "TooltipText" }, // Control
{ "Hseparation", "HSeparation" }, // Theme
+ { "IconAlign", "IconAlignment" }, // Button
{ "IterationsPerSecond", "PhysicsTicksPerSecond" }, // Engine
{ "InvertEnable", "InvertEnabled" }, // Polygon2D
{ "MarginBottom", "OffsetBottom" }, // Control broke NinePatchRect, StyleBox
@@ -1176,6 +1234,7 @@ static const char *csharp_properties_renames[][2] = {
{ "MarginRight", "OffsetRight" }, // Control broke NinePatchRect, StyleBox
{ "MarginTop", "OffsetTop" }, // Control broke NinePatchRect, StyleBox
{ "MidHeight", "Height" }, // CapsuleMesh
+ { "NeighborDist", "NeighborDistance" }, // NavigationAgent2D, NavigationAgent3D
{ "OffsetH", "DragHorizontalOffset" }, // Camera2D
{ "OffsetV", "DragVerticalOffset" }, // Camera2D
{ "Ofs", "Offset" }, // Theme
@@ -1184,11 +1243,23 @@ static const char *csharp_properties_renames[][2] = {
{ "PauseMode", "ProcessMode" }, // Node
{ "PhysicalScancode", "PhysicalKeycode" }, // InputEventKey
{ "PopupExclusive", "Exclusive" }, // Window
+ { "ProximityFadeEnable", "ProximityFadeEnabled" }, // Material
+ { "RectPosition", "Position" }, // Control
+ { "RectGlobalPosition", "GlobalPosition" }, // Control
+ { "RectSize", "Size" }, // Control
+ { "RectMinSize", "CustomMinimumSize" }, // Control
+ { "RectRotation", "Rotation" }, // Control
+ { "RectScale", "Scale" }, // Control
+ { "RectPivotOffset", "PivotOffset" }, // Control
+ { "RectClipContent", "ClipContents" }, // Control
{ "RefuseNewNetworkConnections", "RefuseNewConnections" }, // MultiplayerAPI
{ "RegionFilterClip", "RegionFilterClipEnabled" }, // Sprite2D
+ { "ReverbBusEnable", "ReverbBusEnabled" }, // Area3D
{ "Selectedframe", "SelectedFrame" }, // Theme
{ "SizeOverrideStretch", "Size2dOverrideStretch" }, // SubViewport
{ "SlipsOnSlope", "SlideOnSlope" }, // SeparationRayShape2D
+ { "SmoothingEnabled", "FollowSmoothingEnabled" }, // Camera2D
+ { "SmoothingSpeed", "FollowSmoothingSpeed" }, // Camera2D
{ "SsReflectionsDepthTolerance", "SsrDepthTolerance" }, // Environment
{ "SsReflectionsEnabled", "SsrEnabled" }, // Environment
{ "SsReflectionsFadeIn", "SsrFadeIn" }, // Environment
@@ -1200,6 +1271,7 @@ static const char *csharp_properties_renames[][2] = {
{ "TableHseparation", "TableHSeparation" }, // Theme
{ "TableVseparation", "TableVSeparation" }, // Theme
{ "Translation", "Position" }, // Node3D - broke GLTFNode
+ { "UnitDb", "VolumeDb" }, // AudioStreamPlayer3D
{ "UnitOffset", "ProgressRatio" }, // PathFollow2D, PathFollow3D
{ "Vseparation", "VSeparation" }, // Theme
@@ -1297,6 +1369,18 @@ static const char *project_settings_renames[][2] = {
{ nullptr, nullptr },
};
+static const char *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 },
+};
+
static const char *builtin_types_renames[][2] = {
{ "PoolByteArray", "PackedByteArray" },
{ "PoolColorArray", "PackedColorArray" },
@@ -1338,7 +1422,7 @@ static const char *class_renames[][2] = {
// { "Physics2DDirectBodyStateSW", "GodotPhysicsDirectBodyState2D" }, // Class is not visible in ClassDB
// { "Physics2DShapeQueryResult", "PhysicsShapeQueryResult2D" }, // Class is not visible in ClassDB
// { "PhysicsShapeQueryResult", "PhysicsShapeQueryResult3D" }, // Class is not visible in ClassDB
- // { "NativeScript","NativeExtension"}, ??
+ // { "NativeScript","GDExtension"}, ??
{ "ARVRAnchor", "XRAnchor3D" },
{ "ARVRCamera", "XRCamera3D" },
{ "ARVRController", "XRController3D" },
@@ -1705,6 +1789,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.
@@ -1713,6 +1810,7 @@ public:
RegEx reg_json_to = RegEx("\\bto_json\\b");
RegEx reg_json_parse = RegEx("([\t ]{0,})([^\n]+)parse_json\\(([^\n]+)");
RegEx reg_json_non_new = RegEx("([\t ]{0,})([^\n]+)JSON\\.parse\\(([^\n]+)");
+ RegEx reg_json_print = RegEx("\\bJSON\\b\\.print\\(");
RegEx reg_export = RegEx("export\\(([a-zA-Z0-9_]+)\\)[ ]+var[ ]+([a-zA-Z0-9_]+)");
RegEx reg_export_advanced = RegEx("export\\(([^)^\n]+)\\)[ ]+var[ ]+([a-zA-Z0-9_]+)([^\n]+)");
RegEx reg_setget_setget = RegEx("var[ ]+([a-zA-Z0-9_]+)([^\n]+)setget[ \t]+([a-zA-Z0-9_]+)[ \t]*,[ \t]*([a-zA-Z0-9_]+)");
@@ -1721,8 +1819,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");
@@ -1769,6 +1896,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;
@@ -1792,6 +1920,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")));
@@ -1863,6 +1995,9 @@ public:
for (unsigned int i = 0; i < project_settings_regexes.size(); i++) {
memdelete(project_settings_regexes[i]);
}
+ for (unsigned int i = 0; i < input_map_regexes.size(); i++) {
+ memdelete(input_map_regexes[i]);
+ }
for (unsigned int i = 0; i < gdscript_properties_regexes.size(); i++) {
memdelete(gdscript_properties_regexes[i]);
}
@@ -2014,6 +2149,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 {
@@ -2112,7 +2248,7 @@ int ProjectConverter3To4::validate_conversion() {
lines.append(line);
}
}
- print_line(vformat("Checking for conversion - %d/%d file - \"%s\" with size - %d KB"), i + 1, collected_files.size(), file_name.trim_prefix("res://"), file_size / 1024);
+ print_line(vformat("Checking for conversion - %d/%d file - \"%s\" with size - %d KB", i + 1, collected_files.size(), file_name.trim_prefix("res://"), file_size / 1024));
Vector<String> changed_elements;
Vector<String> reason;
@@ -2179,6 +2315,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 {
@@ -2229,22 +2366,23 @@ Vector<String> ProjectConverter3To4::check_for_files() {
Vector<String> directories_to_check = Vector<String>();
directories_to_check.push_back("res://");
- core_bind::Directory dir = core_bind::Directory();
while (!directories_to_check.is_empty()) {
String path = directories_to_check.get(directories_to_check.size() - 1); // Is there any pop_back function?
- directories_to_check.resize(directories_to_check.size() - 1); // Remove last element.
- if (dir.open(path) == OK) {
- dir.set_include_hidden(true);
- dir.list_dir_begin();
- String current_dir = dir.get_current_dir();
- String file_name = dir.get_next();
+ directories_to_check.resize(directories_to_check.size() - 1); // Remove last element
+
+ Ref<DirAccess> dir = DirAccess::open(path);
+ if (dir.is_valid()) {
+ dir->set_include_hidden(true);
+ dir->list_dir_begin();
+ String current_dir = dir->get_current_dir();
+ String file_name = dir->_get_next();
while (file_name != "") {
if (file_name == ".git" || file_name == ".import" || file_name == ".godot") {
- file_name = dir.get_next();
+ file_name = dir->_get_next();
continue;
}
- if (dir.current_is_dir()) {
+ if (dir->current_is_dir()) {
directories_to_check.append(current_dir.path_join(file_name) + "/");
} else {
bool proper_extension = false;
@@ -2255,7 +2393,7 @@ Vector<String> ProjectConverter3To4::check_for_files() {
collected_files.append(current_dir.path_join(file_name));
}
}
- file_name = dir.get_next();
+ file_name = dir->_get_next();
}
} else {
print_verbose("Failed to open " + path);
@@ -2314,6 +2452,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.
@@ -2331,12 +2471,46 @@ 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", "ProjectSettings.set(\"display/window/size/fullscreen\", Settings.fullscreen)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
- valid = valid && test_conversion_gdscript_builtin("OS.window_fullscreen = Settings.fullscreen", "ProjectSettings.set(\\\"display/window/size/fullscreen\\\", Settings.fullscreen)", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, true);
- 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);
valid = valid && test_conversion_gdscript_builtin("\tvar aa = roman(r.move_and_slide_with_snap( a, g, b, c, d, e, f )) # Roman", "\tr.set_velocity(a)\n\t# TODOConverter40 looks that snap in Godot 4.0 is float, not vector like in Godot 3 - previous value `g`\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_with_snap( a, g, b, c, d, e, f ) # Roman", "\tset_velocity(a)\n\t# TODOConverter40 looks that snap in Godot 4.0 is float, not vector like in Godot 3 - previous value `g`\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);
valid = valid && test_conversion_gdscript_builtin("list_dir_begin( a , b )", "list_dir_begin() # TODOGODOT4 fill missing arguments https://github.com/godotengine/godot/pull/40547", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
valid = valid && test_conversion_gdscript_builtin("list_dir_begin( a )", "list_dir_begin() # TODOGODOT4 fill missing arguments https://github.com/godotengine/godot/pull/40547", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
@@ -2382,10 +2556,10 @@ bool ProjectConverter3To4::test_conversion(RegExContainer &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_gdscript_builtin("var size : Vector2 = Vector2() setget set_function , get_function", "var size : Vector2 = Vector2() :\n get:\n return size # TODOConverter40 Copy here content of get_function\n set(mod_value):\n mod_value # TODOConverter40 Copy here content of 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() :\n get:\n return size # TODOConverter40 Non existent get function \n set(mod_value):\n mod_value # TODOConverter40 Copy here content of 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() :\n get:\n return size # TODOConverter40 Non existent get function \n set(mod_value):\n mod_value # TODOConverter40 Copy here content of set_function", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
- valid = valid && test_conversion_gdscript_builtin("var size : Vector2 = Vector2() setget , get_function", "var size : Vector2 = Vector2() :\n get:\n return size # TODOConverter40 Copy here content of get_function \n set(mod_value):\n mod_value # TODOConverter40 Non existent set function", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
+ 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);
+ 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);
+ valid = valid && test_conversion_gdscript_builtin("var size : Vector2 = Vector2() setget , get_function", "var size : Vector2 = Vector2() : get = get_function", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
valid = valid && test_conversion_gdscript_builtin("get_node(@", "get_node(", &ProjectConverter3To4::rename_gdscript_functions, "custom rename", reg_container, false);
@@ -2617,7 +2791,7 @@ bool ProjectConverter3To4::test_array_names() {
// List of excluded functions from builtin types and global namespace, because currently it is not possible to get list of functions from them.
// This will be available when https://github.com/godotengine/godot/pull/49053 or similar will be included into Godot.
- static const char *builtin_types_excluded_functions[] = { "dict_to_inst", "inst_to_dict", "bytes_to_var", "bytes_to_var_with_objects", "db_to_linear", "deg_to_rad", "linear_to_db", "rad_to_deg", "randf_range", "snapped", "str_to_var", "var_to_str", "var_to_bytes", "var_to_bytes_with_objects", "move_toward", "uri_encode", "uri_decode", "remove_at", "get_rotation_quaternion", "clamp", "grow_side", "is_absolute_path", "is_valid_int", "lerp", "to_ascii_buffer", "to_utf8_buffer", "to_utf32_buffer", "snapped", "remap", nullptr };
+ static const char *builtin_types_excluded_functions[] = { "dict_to_inst", "inst_to_dict", "bytes_to_var", "bytes_to_var_with_objects", "db_to_linear", "deg_to_rad", "linear_to_db", "rad_to_deg", "randf_range", "snapped", "str_to_var", "var_to_str", "var_to_bytes", "var_to_bytes_with_objects", "move_toward", "uri_encode", "uri_decode", "remove_at", "get_rotation_quaternion", "clamp", "grow_side", "is_absolute_path", "is_valid_int", "lerp", "to_ascii_buffer", "to_utf8_buffer", "to_utf32_buffer", "snapped", "remap", "rfind", nullptr };
for (int current_index = 0; builtin_types_excluded_functions[current_index]; current_index++) {
all_functions.insert(builtin_types_excluded_functions[current_index]);
}
@@ -2664,10 +2838,11 @@ bool ProjectConverter3To4::test_array_names() {
valid = valid && test_single_array(gdscript_function_renames, true);
valid = valid && test_single_array(csharp_function_renames, true);
valid = valid && test_single_array(gdscript_properties_renames, true);
- valid = valid && test_single_array(csharp_properties_renames);
+ valid = valid && test_single_array(csharp_properties_renames, true);
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);
@@ -3043,7 +3218,7 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
// -- \t.func() -> \tsuper.func() Object
if (line.contains("(") && line.contains(".")) {
- line = reg_container.reg_super.sub(line, "$1super.$2", true); // TODO, not sure if possible, but for now this broke String text e.g. "Choosen .gitignore" -> "Choosen super.gitignore"
+ line = reg_container.reg_super.sub(line, "$1super.$2", true); // TODO, not sure if possible, but for now this broke String text e.g. "Chosen .gitignore" -> "Chosen super.gitignore"
}
// -- JSON.parse(a) -> JSON.new().parse(a) etc. JSON
@@ -3059,6 +3234,10 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
if (line.contains("parse_json")) {
line = reg_container.reg_json_parse.sub(line, "$1var test_json_conv = JSON.new()\n$1test_json_conv.parse($3\n$1$2test_json_conv.get_data()", true);
}
+ // -- JSON.print( -> JSON.stringify(
+ if (line.contains("JSON.print(")) {
+ line = reg_container.reg_json_print.sub(line, "JSON.stringify(", true);
+ }
// -- get_node(@ -> get_node( Node
if (line.contains("get_node")) {
@@ -3077,26 +3256,109 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
// Setget Setget
if (line.contains("setget")) {
- line = reg_container.reg_setget_setget.sub(line, "var $1$2:\n\tget:\n\t\treturn $1 # TODOConverter40 Copy here content of $4\n\tset(mod_value):\n\t\tmod_value # TODOConverter40 Copy here content of $3", true);
+ line = reg_container.reg_setget_setget.sub(line, "var $1$2: get = $4, set = $3", true);
}
// Setget set
if (line.contains("setget")) {
- line = reg_container.reg_setget_set.sub(line, "var $1$2:\n\tget:\n\t\treturn $1 # TODOConverter40 Non existent get function \n\tset(mod_value):\n\t\tmod_value # TODOConverter40 Copy here content of $3", true);
+ line = reg_container.reg_setget_set.sub(line, "var $1$2: set = $3", true);
}
// Setget get
if (line.contains("setget")) {
- line = reg_container.reg_setget_get.sub(line, "var $1$2:\n\tget:\n\t\treturn $1 # TODOConverter40 Copy here content of $3 \n\tset(mod_value):\n\t\tmod_value # TODOConverter40 Non existent set function", true);
+ line = reg_container.reg_setget_get.sub(line, "var $1$2: get = $3", true);
+ }
+
+ 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);
}
- // OS.window_fullscreen = true -> ProjectSettings.set("display/window/size/fullscreen",true)
if (line.contains("window_fullscreen")) {
- if (builtin) {
- line = reg_container.reg_os_fullscreen.sub(line, "ProjectSettings.set(\\\"display/window/size/fullscreen\\\", $1)", true);
- } else {
- line = reg_container.reg_os_fullscreen.sub(line, "ProjectSettings.set(\"display/window/size/fullscreen\", $1)", 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
@@ -3144,8 +3406,13 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
line_new += starting_space + "# TODOConverter40 infinite_inertia were removed in Godot 4.0 - previous value `" + parts[5] + "`\n";
}
- line_new += starting_space + base_obj + "move_and_slide()\n";
- line = line_new + line.substr(0, start) + "velocity" + line.substr(end + start);
+ line_new += starting_space + base_obj + "move_and_slide()";
+
+ if (!line.begins_with(starting_space + "move_and_slide")) {
+ line = line_new + "\n" + line.substr(0, start) + "velocity" + line.substr(end + start);
+ } else {
+ line = line_new + line.substr(end + start);
+ }
}
}
}
@@ -3195,8 +3462,13 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
line_new += starting_space + "# TODOConverter40 infinite_inertia were removed in Godot 4.0 - previous value `" + parts[6] + "`\n";
}
- line_new += starting_space + base_obj + "move_and_slide()\n";
- line = line_new + line.substr(0, start) + "velocity" + line.substr(end + start); // move_and_slide used to return velocity
+ line_new += starting_space + base_obj + "move_and_slide()";
+
+ if (!line.begins_with(starting_space + "move_and_slide_with_snap")) {
+ line = line_new + "\n" + line.substr(0, start) + "velocity" + line.substr(end + start);
+ } else {
+ line = line_new + line.substr(end + start);
+ }
}
}
}
@@ -3490,6 +3762,20 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
}
}
}
+
+ // set_rotating(true) -> set_ignore_rotation(false)
+ if (line.contains("set_rotating(")) {
+ int start = line.find("set_rotating(");
+ int end = get_end_parenthesis(line.substr(start)) + 1;
+ if (end > -1) {
+ Vector<String> parts = parse_arguments(line.substr(start, end));
+ if (parts.size() == 1) {
+ String opposite = parts[0] == "true" ? "false" : "true";
+ line = line.substr(0, start) + "set_ignore_rotation(" + opposite + ")";
+ }
+ }
+ }
+
// OS.get_window_safe_area() -> DisplayServer.get_display_safe_area()
if (line.contains("OS.get_window_safe_area(")) {
int start = line.find("OS.get_window_safe_area(");
@@ -3537,6 +3823,29 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
}
}
+ // rotating = true -> ignore_rotation = false # reversed "rotating" for Camera2D
+ if (line.contains("rotating")) {
+ int start = line.find("rotating");
+ bool foundNextEqual = false;
+ String line_to_check = line.substr(start + String("rotating").length());
+ String assigned_value;
+ for (int current_index = 0; line_to_check.length() > current_index; current_index++) {
+ char32_t chr = line_to_check.get(current_index);
+ if (chr == '\t' || chr == ' ') {
+ continue;
+ } else if (chr == '=') {
+ foundNextEqual = true;
+ assigned_value = line.right(current_index).strip_edges();
+ assigned_value = assigned_value == "true" ? "false" : "true";
+ } else {
+ break;
+ }
+ }
+ if (foundNextEqual) {
+ line = line.substr(0, start) + "ignore_rotation =" + assigned_value + " # reversed \"rotating\" for Camera2D";
+ }
+ }
+
// OS -> Time functions
if (line.contains("OS.get_ticks_msec")) {
line = line.replace("OS.get_ticks_msec", "Time.get_ticks_msec");
@@ -3547,11 +3856,88 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
if (line.contains("OS.get_unix_time")) {
line = line.replace("OS.get_unix_time", "Time.get_unix_time_from_system");
}
+ 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(");
@@ -3950,6 +4336,8 @@ String ProjectConverter3To4::collect_string_from_vector(Vector<String> &vector)
#else // No RegEx.
+ProjectConverter3To4::ProjectConverter3To4(int _p_maximum_file_size_kb, int _p_maximum_line_length) {}
+
int ProjectConverter3To4::convert() {
ERR_FAIL_V_MSG(ERROR_CODE, "Can't run converter for Godot 3.x projects, because RegEx module is disabled.");
}
diff --git a/editor/project_converter_3_to_4.h b/editor/project_converter_3_to_4.h
index 2cecb9da79..b3aa52f1e3 100644
--- a/editor/project_converter_3_to_4.h
+++ b/editor/project_converter_3_to_4.h
@@ -1,37 +1,36 @@
-/*************************************************************************/
-/* project_converter_3_to_4.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* project_converter_3_to_4.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 PROJECT_CONVERTER_3_TO_4_H
#define PROJECT_CONVERTER_3_TO_4_H
-#include "core/core_bind.h"
#include "core/io/file_access.h"
#include "core/object/ref_counted.h"
#include "core/string/ustring.h"
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 270e04050e..c4f5eb777e 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* project_manager.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* project_manager.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 "project_manager.h"
@@ -49,6 +49,7 @@
#include "editor/editor_vcs_interface.h"
#include "main/main.h"
#include "scene/gui/center_container.h"
+#include "scene/gui/check_box.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/panel_container.h"
@@ -59,6 +60,8 @@
#include "servers/navigation_server_3d.h"
#include "servers/physics_server_2d.h"
+constexpr int GODOT4_CONFIG_VERSION = 5;
+
class ProjectDialog : public ConfirmationDialog {
GDCLASS(ProjectDialog, ConfirmationDialog);
@@ -90,9 +93,10 @@ private:
Container *name_container;
Container *path_container;
Container *install_path_container;
- Container *rasterizer_container;
+ Container *renderer_container;
+ Label *renderer_info;
HBoxContainer *default_files_container;
- Ref<ButtonGroup> rasterizer_button_group;
+ Ref<ButtonGroup> renderer_button_group;
Label *msg;
LineEdit *project_path;
LineEdit *project_name;
@@ -141,7 +145,11 @@ private:
install_status_rect->set_texture(new_icon);
}
- set_size(Size2(500, 0) * EDSCALE);
+ Size2i window_size = get_size();
+ Size2 contents_min_size = get_contents_minimum_size();
+ if (window_size.x < contents_min_size.x || window_size.y < contents_min_size.y) {
+ set_size(window_size.max(contents_min_size));
+ }
}
String _test_path() {
@@ -419,6 +427,35 @@ private:
ok_pressed();
}
+ void _renderer_selected() {
+ String renderer_type = renderer_button_group->get_pressed_button()->get_meta(SNAME("rendering_method"));
+
+ if (renderer_type == "forward_plus") {
+ renderer_info->set_text(
+ String::utf8("• ") + TTR("Supports desktop platforms only.") +
+ String::utf8("\n• ") + TTR("Advanced 3D graphics available.") +
+ String::utf8("\n• ") + TTR("Can scale to large complex scenes.") +
+ String::utf8("\n• ") + TTR("Uses RenderingDevice backend.") +
+ String::utf8("\n• ") + TTR("Slower rendering of simple scenes."));
+ } else if (renderer_type == "mobile") {
+ renderer_info->set_text(
+ String::utf8("• ") + TTR("Supports desktop + mobile platforms.") +
+ String::utf8("\n• ") + TTR("Less advanced 3D graphics.") +
+ String::utf8("\n• ") + TTR("Less scalable for complex scenes.") +
+ String::utf8("\n• ") + TTR("Uses RenderingDevice backend.") +
+ String::utf8("\n• ") + TTR("Fast rendering of simple scenes."));
+ } else if (renderer_type == "gl_compatibility") {
+ renderer_info->set_text(
+ String::utf8("• ") + TTR("Supports desktop, mobile + web platforms.") +
+ String::utf8("\n• ") + TTR("Least advanced 3D graphics (currently work-in-progress).") +
+ String::utf8("\n• ") + TTR("Intended for low-end/older devices.") +
+ String::utf8("\n• ") + TTR("Uses OpenGL 3 backend (OpenGL 3.3/ES 3.0/WebGL2).") +
+ String::utf8("\n• ") + TTR("Fastest rendering of simple scenes."));
+ } else {
+ WARN_PRINT("Unknown renderer type. Please report this as a bug on GitHub.");
+ }
+ }
+
void ok_pressed() override {
String dir = project_path->get_text();
@@ -429,17 +466,17 @@ private:
return;
}
- ProjectSettings *current = memnew(ProjectSettings);
-
- int err = current->setup(dir2, "");
+ // Load project.godot as ConfigFile to set the new name.
+ ConfigFile cfg;
+ String project_godot = dir2.path_join("project.godot");
+ Error err = cfg.load(project_godot);
if (err != OK) {
- set_message(vformat(TTR("Couldn't load project.godot in project path (error %d). It may be missing or corrupted."), err), MESSAGE_ERROR);
+ set_message(vformat(TTR("Couldn't load project at '%s' (error %d). It may be missing or corrupted."), project_godot, err), MESSAGE_ERROR);
} else {
- ProjectSettings::CustomMap edited_settings;
- edited_settings["application/config/name"] = project_name->get_text().strip_edges();
-
- if (current->save_custom(dir2.path_join("project.godot"), edited_settings, Vector<String>(), true) != OK) {
- set_message(TTR("Couldn't edit project.godot in project path."), MESSAGE_ERROR);
+ cfg.set_value("application", "config/name", project_name->get_text().strip_edges());
+ err = cfg.save(project_godot);
+ if (err != OK) {
+ set_message(vformat(TTR("Couldn't save project at '%s' (error %d)."), project_godot, err), MESSAGE_ERROR);
}
}
@@ -471,16 +508,24 @@ private:
}
PackedStringArray project_features = ProjectSettings::get_required_features();
ProjectSettings::CustomMap initial_settings;
+
// Be sure to change this code if/when renderers are changed.
- int renderer_type = rasterizer_button_group->get_pressed_button()->get_meta(SNAME("driver_name"));
- initial_settings["rendering/vulkan/rendering/back_end"] = renderer_type;
- if (renderer_type == 0) {
- project_features.push_back("Vulkan Clustered");
- } else if (renderer_type == 1) {
- project_features.push_back("Vulkan Mobile");
+ String renderer_type = renderer_button_group->get_pressed_button()->get_meta(SNAME("rendering_method"));
+ initial_settings["rendering/renderer/rendering_method"] = renderer_type;
+
+ EditorSettings::get_singleton()->set("project_manager/default_renderer", renderer_type);
+ EditorSettings::get_singleton()->save();
+
+ if (renderer_type == "forward_plus") {
+ project_features.push_back("Forward Plus");
+ } else if (renderer_type == "mobile") {
+ project_features.push_back("Mobile");
+ } else if (renderer_type == "gl_compatibility") {
+ project_features.push_back("GL Compatibility");
} else {
WARN_PRINT("Unknown renderer type. Please report this as a bug on GitHub.");
}
+
project_features.sort();
initial_settings["application/config/features"] = project_features;
initial_settings["application/config/name"] = project_name->get_text().strip_edges();
@@ -537,7 +582,6 @@ private:
Vector<String> failed_files;
- int idx = 0;
while (ret == UNZ_OK) {
//get filename
unz_file_info info;
@@ -558,25 +602,24 @@ private:
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
da->make_dir(dir.path_join(rel_path));
} else {
- Vector<uint8_t> data;
- data.resize(info.uncompressed_size);
+ Vector<uint8_t> uncomp_data;
+ uncomp_data.resize(info.uncompressed_size);
String rel_path = path.substr(zip_root.length());
//read
unzOpenCurrentFile(pkg);
- ret = unzReadCurrentFile(pkg, data.ptrw(), data.size());
+ ret = unzReadCurrentFile(pkg, uncomp_data.ptrw(), uncomp_data.size());
ERR_BREAK_MSG(ret < 0, vformat("An error occurred while attempting to read from file: %s. This file will not be used.", rel_path));
unzCloseCurrentFile(pkg);
Ref<FileAccess> f = FileAccess::open(dir.path_join(rel_path), FileAccess::WRITE);
if (f.is_valid()) {
- f->store_buffer(data.ptr(), data.size());
+ f->store_buffer(uncomp_data.ptr(), uncomp_data.size());
} else {
failed_files.push_back(rel_path);
}
}
- idx++;
ret = unzGoToNextFile(pkg);
}
@@ -682,22 +725,23 @@ public:
msg->hide();
install_path_container->hide();
install_status_rect->hide();
- rasterizer_container->hide();
+ renderer_container->hide();
default_files_container->hide();
get_ok_button()->set_disabled(false);
- ProjectSettings *current = memnew(ProjectSettings);
-
- int err = current->setup(project_path->get_text(), "");
+ // Fetch current name from project.godot to prefill the text input.
+ ConfigFile cfg;
+ String project_godot = project_path->get_text().path_join("project.godot");
+ Error err = cfg.load(project_godot);
if (err != OK) {
- set_message(vformat(TTR("Couldn't load project.godot in project path (error %d). It may be missing or corrupted."), err), MESSAGE_ERROR);
+ set_message(vformat(TTR("Couldn't load project at '%s' (error %d). It may be missing or corrupted."), project_godot, err), MESSAGE_ERROR);
status_rect->show();
msg->show();
get_ok_button()->set_disabled(true);
- } else if (current->has_setting("application/config/name")) {
- String proj = current->get("application/config/name");
- project_name->set_text(proj);
- _text_changed(proj);
+ } else {
+ String cur_name = cfg.get_value("application", "config/name", "");
+ project_name->set_text(cur_name);
+ _text_changed(cur_name);
}
project_name->call_deferred(SNAME("grab_focus"));
@@ -705,7 +749,7 @@ public:
create_dir->hide();
} else {
- fav_dir = EditorSettings::get_singleton()->get("filesystem/directories/default_project_path");
+ fav_dir = EDITOR_GET("filesystem/directories/default_project_path");
if (!fav_dir.is_empty()) {
project_path->set_text(fav_dir);
fdialog->set_current_dir(fav_dir);
@@ -733,7 +777,7 @@ public:
set_ok_button_text(TTR("Import & Edit"));
name_container->hide();
install_path_container->hide();
- rasterizer_container->hide();
+ renderer_container->hide();
default_files_container->hide();
project_path->grab_focus();
@@ -742,7 +786,7 @@ public:
set_ok_button_text(TTR("Create & Edit"));
name_container->show();
install_path_container->hide();
- rasterizer_container->show();
+ renderer_container->show();
default_files_container->show();
project_name->call_deferred(SNAME("grab_focus"));
project_name->call_deferred(SNAME("select_all"));
@@ -753,7 +797,7 @@ public:
project_name->set_text(zip_title);
name_container->show();
install_path_container->hide();
- rasterizer_container->hide();
+ renderer_container->hide();
default_files_container->hide();
project_path->grab_focus();
}
@@ -841,52 +885,65 @@ public:
msg->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
vb->add_child(msg);
- // rasterizer selection
- rasterizer_container = memnew(VBoxContainer);
- vb->add_child(rasterizer_container);
+ // Renderer selection.
+ renderer_container = memnew(VBoxContainer);
+ vb->add_child(renderer_container);
l = memnew(Label);
l->set_text(TTR("Renderer:"));
- rasterizer_container->add_child(l);
- Container *rshb = memnew(HBoxContainer);
- rasterizer_container->add_child(rshb);
- rasterizer_button_group.instantiate();
+ renderer_container->add_child(l);
+ HBoxContainer *rshc = memnew(HBoxContainer);
+ renderer_container->add_child(rshc);
+ renderer_button_group.instantiate();
+ // Left hand side, used for checkboxes to select renderer.
Container *rvb = memnew(VBoxContainer);
- rvb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- rshb->add_child(rvb);
+ rshc->add_child(rvb);
+
+ String default_renderer_type = "forward_plus";
+ if (EditorSettings::get_singleton()->has_setting("project_manager/default_renderer")) {
+ default_renderer_type = EditorSettings::get_singleton()->get_setting("project_manager/default_renderer");
+ }
+
Button *rs_button = memnew(CheckBox);
- rs_button->set_button_group(rasterizer_button_group);
- rs_button->set_text(TTR("Vulkan Clustered"));
- rs_button->set_meta(SNAME("driver_name"), 0); // Vulkan backend "Forward Clustered"
- rs_button->set_pressed(true);
+ rs_button->set_button_group(renderer_button_group);
+ rs_button->set_text(TTR("Forward+"));
+ rs_button->set_meta(SNAME("rendering_method"), "forward_plus");
+ rs_button->connect("pressed", callable_mp(this, &ProjectDialog::_renderer_selected));
rvb->add_child(rs_button);
- l = memnew(Label);
- l->set_text(
- String::utf8("• ") + TTR("Supports desktop platforms only.") +
- String::utf8("\n• ") + TTR("Advanced 3D graphics available.") +
- String::utf8("\n• ") + TTR("Can scale to large complex scenes.") +
- String::utf8("\n• ") + TTR("Slower rendering of simple scenes."));
- l->set_modulate(Color(1, 1, 1, 0.7));
- rvb->add_child(l);
+ if (default_renderer_type == "forward_plus") {
+ rs_button->set_pressed(true);
+ }
- rshb->add_child(memnew(VSeparator));
+ rs_button = memnew(CheckBox);
+ rs_button->set_button_group(renderer_button_group);
+ rs_button->set_text(TTR("Mobile"));
+ rs_button->set_meta(SNAME("rendering_method"), "mobile");
+ rs_button->connect("pressed", callable_mp(this, &ProjectDialog::_renderer_selected));
+ rvb->add_child(rs_button);
+ if (default_renderer_type == "mobile") {
+ rs_button->set_pressed(true);
+ }
- rvb = memnew(VBoxContainer);
- rvb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- rshb->add_child(rvb);
rs_button = memnew(CheckBox);
- rs_button->set_button_group(rasterizer_button_group);
- rs_button->set_text(TTR("Vulkan Mobile"));
- rs_button->set_meta(SNAME("driver_name"), 1); // Vulkan backend "Forward Mobile"
+ rs_button->set_button_group(renderer_button_group);
+ rs_button->set_text(TTR("Compatibility"));
+ rs_button->set_meta(SNAME("rendering_method"), "gl_compatibility");
+ rs_button->connect("pressed", callable_mp(this, &ProjectDialog::_renderer_selected));
rvb->add_child(rs_button);
- l = memnew(Label);
- l->set_text(
- String::utf8("• ") + TTR("Supports desktop + mobile platforms.") +
- String::utf8("\n• ") + TTR("Less advanced 3D graphics.") +
- String::utf8("\n• ") + TTR("Less scalable for complex scenes.") +
- String::utf8("\n• ") + TTR("Faster rendering of simple scenes."));
- l->set_modulate(Color(1, 1, 1, 0.7));
- rvb->add_child(l);
+ if (default_renderer_type == "gl_compatibility") {
+ rs_button->set_pressed(true);
+ }
+
+ rshc->add_child(memnew(VSeparator));
+
+ // Right hand side, used for text explaining each choice.
+ rvb = memnew(VBoxContainer);
+ rvb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ rshc->add_child(rvb);
+ renderer_info = memnew(Label);
+ renderer_info->set_modulate(Color(1, 1, 1, 0.7));
+ rvb->add_child(renderer_info);
+ _renderer_selected();
l = memnew(Label);
l->set_text(TTR("The renderer can be changed later, but scenes may need to be adjusted."));
@@ -895,7 +952,7 @@ public:
l->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
l->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
l->set_modulate(Color(1, 1, 1, 0.7));
- rasterizer_container->add_child(l);
+ renderer_container->add_child(l);
default_files_container = memnew(HBoxContainer);
vb->add_child(default_files_container);
@@ -1065,6 +1122,7 @@ public:
int refresh_project(const String &dir_path);
void add_project(const String &dir_path, bool favorite);
void save_config();
+ void set_project_version(const String &p_project_path, int version);
private:
static void _bind_methods();
@@ -1175,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);
@@ -1215,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).
@@ -1243,7 +1301,6 @@ void ProjectList::migrate_config() {
if (FileAccess::exists(_config_path)) {
return;
}
- print_line("Migrating legacy project list");
List<PropertyInfo> properties;
EditorSettings::get_singleton()->get_property_list(&properties);
@@ -1255,7 +1312,9 @@ void ProjectList::migrate_config() {
continue;
}
- String path = EditorSettings::get_singleton()->get(property_key);
+ String path = EDITOR_GET(property_key);
+ print_line("Migrating legacy project '" + path + "'.");
+
String favoriteKey = "favorite_projects/" + property_key.get_slice("/", 1);
bool favorite = EditorSettings::get_singleton()->has_setting(favoriteKey);
add_project(path, favorite);
@@ -1368,7 +1427,7 @@ void ProjectList::create_project_item_control(int p_index) {
favorite_box->set_name("FavoriteBox");
TextureButton *favorite = memnew(TextureButton);
favorite->set_name("FavoriteButton");
- favorite->set_normal_texture(favorite_icon);
+ favorite->set_texture_normal(favorite_icon);
// This makes the project's "hover" style display correctly when hovering the favorite icon.
favorite->set_mouse_filter(MOUSE_FILTER_PASS);
favorite->connect("pressed", callable_mp(this, &ProjectList::_favorite_pressed).bind(hb));
@@ -1484,7 +1543,7 @@ void ProjectList::sort_projects() {
for (int i = 0; i < _projects.size(); ++i) {
Item &item = _projects.write[i];
- bool visible = true;
+ bool item_visible = true;
if (!_search_term.is_empty()) {
String search_path;
if (_search_term.contains("/")) {
@@ -1496,10 +1555,10 @@ void ProjectList::sort_projects() {
}
// When searching, display projects whose name or path contain the search term
- visible = item.project_name.findn(_search_term) != -1 || search_path.findn(_search_term) != -1;
+ item_visible = item.project_name.findn(_search_term) != -1 || search_path.findn(_search_term) != -1;
}
- item.control->set_visible(visible);
+ item.control->set_visible(item_visible);
}
for (int i = 0; i < _projects.size(); ++i) {
@@ -1673,6 +1732,15 @@ void ProjectList::save_config() {
_config.save(_config_path);
}
+void ProjectList::set_project_version(const String &p_project_path, int p_version) {
+ for (ProjectList::Item &E : _projects) {
+ if (E.path == p_project_path) {
+ E.version = p_version;
+ break;
+ }
+ }
+}
+
int ProjectList::get_project_count() const {
return _projects.size();
}
@@ -1897,7 +1965,7 @@ void ProjectManager::_notification(int p_what) {
} break;
case NOTIFICATION_READY: {
- int default_sorting = (int)EditorSettings::get_singleton()->get("project_manager/sorting_order");
+ int default_sorting = (int)EDITOR_GET("project_manager/sorting_order");
filter_option->select(default_sorting);
_project_list->set_order_option(default_sorting);
@@ -2152,9 +2220,11 @@ void ProjectManager::_open_selected_projects_ask() {
return;
}
+ const Size2i popup_min_width = Size2i(600.0 * EDSCALE, 0);
+
if (selected_list.size() > 1) {
- multi_open_ask->set_text(TTR("Are you sure to open more than one project?"));
- multi_open_ask->popup_centered();
+ multi_open_ask->set_text(vformat(TTR("You requested to open %d projects in parallel. Do you confirm?\nNote that usual checks for engine version compatibility will be bypassed."), selected_list.size()));
+ multi_open_ask->popup_centered(popup_min_width);
return;
}
@@ -2163,30 +2233,40 @@ void ProjectManager::_open_selected_projects_ask() {
return;
}
- // Update the project settings or don't open
- const String conf = project.path.path_join("project.godot");
+ // Update the project settings or don't open.
const int config_version = project.version;
PackedStringArray unsupported_features = project.unsupported_features;
Label *ask_update_label = ask_update_settings->get_label();
ask_update_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_LEFT); // Reset in case of previous center align.
+ full_convert_button->hide();
+
+ ask_update_settings->get_ok_button()->set_text("OK");
- // Check if the config_version property was empty or 0
+ // Check if the config_version property was empty or 0.
if (config_version == 0) {
- ask_update_settings->set_text(vformat(TTR("The following project settings file does not specify the version of Godot through which it was created.\n\n%s\n\nIf you proceed with opening it, it will be converted to Godot's current configuration file format.\nWarning: You won't be able to open the project with previous versions of the engine anymore."), conf));
- ask_update_settings->popup_centered();
+ ask_update_settings->set_text(vformat(TTR("The selected project \"%s\" does not specify its supported Godot version in its configuration file (\"project.godot\").\n\nProject path: %s\n\nIf you proceed with opening it, it will be converted to Godot's current configuration file format.\n\nWarning: You won't be able to open the project with previous versions of the engine anymore."), project.project_name, project.path));
+ ask_update_settings->popup_centered(popup_min_width);
return;
}
- // Check if we need to convert project settings from an earlier engine version
+ // Check if we need to convert project settings from an earlier engine version.
if (config_version < ProjectSettings::CONFIG_VERSION) {
- ask_update_settings->set_text(vformat(TTR("The following project settings file was generated by an older engine version, and needs to be converted for this version:\n\n%s\n\nDo you want to convert it?\nWarning: You won't be able to open the project with previous versions of the engine anymore."), conf));
- ask_update_settings->popup_centered();
+ if (config_version == GODOT4_CONFIG_VERSION - 1 && ProjectSettings::CONFIG_VERSION == GODOT4_CONFIG_VERSION) { // Conversion from Godot 3 to 4.
+ full_convert_button->show();
+ ask_update_settings->set_text(vformat(TTR("The selected project \"%s\" was generated by Godot 3.x, and needs to be converted for Godot 4.x.\n\nProject path: %s\n\nYou have three options:\n- Convert only the configuration file (\"project.godot\"). Use this to open the project without attempting to convert its scenes, resources and scripts.\n- Convert the entire project including its scenes, resources and scripts (recommended if you are upgrading).\n- Do nothing and go back.\n\nWarning: If you select a conversion option, you won't be able to open the project with previous versions of the engine anymore."), project.project_name, project.path));
+ ask_update_settings->get_ok_button()->set_text(TTR("Convert project.godot Only"));
+ } else {
+ ask_update_settings->set_text(vformat(TTR("The selected project \"%s\" was generated by an older engine version, and needs to be converted for this version.\n\nProject path: %s\n\nDo you want to convert it?\n\nWarning: You won't be able to open the project with previous versions of the engine anymore."), project.project_name, project.path));
+ ask_update_settings->get_ok_button()->set_text(TTR("Convert project.godot"));
+ }
+ ask_update_settings->popup_centered(popup_min_width);
+ ask_update_settings->get_cancel_button()->grab_focus(); // To prevent accidents.
return;
}
- // Check if the file was generated by a newer, incompatible engine version
+ // Check if the file was generated by a newer, incompatible engine version.
if (config_version > ProjectSettings::CONFIG_VERSION) {
- dialog_error->set_text(vformat(TTR("Can't open project at '%s'.") + "\n" + TTR("The project settings were created by a newer engine version, whose settings are not compatible with this version."), project.path));
- dialog_error->popup_centered();
+ dialog_error->set_text(vformat(TTR("Can't open project \"%s\" at the following path:\n\n%s\n\nThe project settings were created by a newer engine version, whose settings are not compatible with this version."), project.project_name, project.path));
+ dialog_error->popup_centered(popup_min_width);
return;
}
// Check if the project is using features not supported by this build of Godot.
@@ -2215,14 +2295,46 @@ void ProjectManager::_open_selected_projects_ask() {
warning_message += TTR("Open anyway? Project will be modified.");
ask_update_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
ask_update_settings->set_text(warning_message);
- ask_update_settings->popup_centered();
+ ask_update_settings->popup_centered(popup_min_width);
return;
}
- // Open if the project is up-to-date
+ // Open if the project is up-to-date.
_open_selected_projects();
}
+void ProjectManager::_full_convert_button_pressed() {
+ ask_update_settings->hide();
+ ask_full_convert_dialog->popup_centered(Size2i(600.0 * EDSCALE, 0));
+ ask_full_convert_dialog->get_cancel_button()->grab_focus();
+}
+
+void ProjectManager::_perform_full_project_conversion() {
+ Vector<ProjectList::Item> selected_list = _project_list->get_selected_projects();
+ if (selected_list.is_empty()) {
+ return;
+ }
+
+ const String &path = selected_list[0].path;
+
+ print_line("Converting project: " + path);
+
+ Ref<ConfigFile> cf;
+ cf.instantiate();
+ cf->load(path.path_join("project.godot"));
+ cf->set_value("", "config_version", GODOT4_CONFIG_VERSION);
+ cf->save(path.path_join("project.godot"));
+ _project_list->set_project_version(path, GODOT4_CONFIG_VERSION);
+
+ List<String> args;
+ args.push_back("--path");
+ args.push_back(path);
+ args.push_back("--convert-3to4");
+
+ Error err = OS::get_singleton()->create_instance(args);
+ ERR_FAIL_COND(err);
+}
+
void ProjectManager::_run_project_confirm() {
Vector<ProjectList::Item> selected_list = _project_list->get_selected_projects();
@@ -2498,7 +2610,7 @@ ProjectManager::ProjectManager() {
EditorSettings::get_singleton()->set_optimize_save(false); //just write settings as they came
{
- int display_scale = EditorSettings::get_singleton()->get("interface/editor/display_scale");
+ int display_scale = EDITOR_GET("interface/editor/display_scale");
switch (display_scale) {
case 0:
@@ -2524,7 +2636,7 @@ ProjectManager::ProjectManager() {
editor_set_scale(2.0);
break;
default:
- editor_set_scale(EditorSettings::get_singleton()->get("interface/editor/custom_display_scale"));
+ editor_set_scale(EDITOR_GET("interface/editor/custom_display_scale"));
break;
}
EditorFileDialog::get_icon_func = &ProjectManager::_file_dialog_get_icon;
@@ -2533,10 +2645,17 @@ ProjectManager::ProjectManager() {
// TRANSLATORS: This refers to the application where users manage their Godot projects.
DisplayServer::get_singleton()->window_set_title(VERSION_NAME + String(" - ") + TTR("Project Manager", "Application"));
- EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"));
+ EditorFileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files"));
- set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
- set_theme(create_custom_theme());
+ int swap_cancel_ok = EDITOR_GET("interface/editor/accept_dialog_cancel_ok_buttons");
+ if (swap_cancel_ok != 0) { // 0 is auto, set in register_scene based on DisplayServer.
+ // Swap on means OK first.
+ AcceptDialog::set_swap_cancel_ok(swap_cancel_ok == 2);
+ }
+
+ 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);
@@ -2724,9 +2843,10 @@ ProjectManager::ProjectManager() {
settings_hb->add_child(h_spacer);
language_btn = memnew(OptionButton);
- language_btn->set_flat(true);
language_btn->set_icon(get_theme_icon(SNAME("Environment"), SNAME("EditorIcons")));
language_btn->set_focus_mode(Control::FOCUS_NONE);
+ language_btn->set_fit_to_longest_item(false);
+ language_btn->set_flat(true);
language_btn->connect("item_selected", callable_mp(this, &ProjectManager::_language_selected));
#ifdef ANDROID_ENABLED
// The language selection dropdown doesn't work on Android (as the setting isn't saved), see GH-60353.
@@ -2745,7 +2865,7 @@ ProjectManager::ProjectManager() {
}
}
- String current_lang = EditorSettings::get_singleton()->get("interface/editor/editor_language");
+ String current_lang = EDITOR_GET("interface/editor/editor_language");
language_btn->set_text(current_lang);
for (int i = 0; i < editor_languages.size(); i++) {
@@ -2784,7 +2904,7 @@ ProjectManager::ProjectManager() {
scan_dir->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
scan_dir->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_DIR);
scan_dir->set_title(TTR("Select a Folder to Scan")); // must be after mode or it's overridden
- scan_dir->set_current_dir(EditorSettings::get_singleton()->get("filesystem/directories/default_project_path"));
+ scan_dir->set_current_dir(EDITOR_GET("filesystem/directories/default_project_path"));
add_child(scan_dir);
scan_dir->connect("dir_selected", callable_mp(this, &ProjectManager::_scan_begin));
@@ -2823,9 +2943,18 @@ ProjectManager::ProjectManager() {
add_child(multi_scan_ask);
ask_update_settings = memnew(ConfirmationDialog);
+ ask_update_settings->set_autowrap(true);
ask_update_settings->get_ok_button()->connect("pressed", callable_mp(this, &ProjectManager::_confirm_update_settings));
+ full_convert_button = ask_update_settings->add_button("Convert Full Project", !GLOBAL_GET("gui/common/swap_cancel_ok"));
+ full_convert_button->connect("pressed", callable_mp(this, &ProjectManager::_full_convert_button_pressed));
add_child(ask_update_settings);
+ ask_full_convert_dialog = memnew(ConfirmationDialog);
+ ask_full_convert_dialog->set_autowrap(true);
+ ask_full_convert_dialog->set_text(TTR("This option will perform full project conversion, updating scenes, resources and scripts from Godot 3.x to work in Godot 4.0.\n\nNote that this is a best-effort conversion, i.e. it makes upgrading the project easier, but it will not open out-of-the-box and will still require manual adjustments.\n\nIMPORTANT: Make sure to backup your project before converting, as this operation makes it impossible to open it in older versions of Godot."));
+ ask_full_convert_dialog->connect("confirmed", callable_mp(this, &ProjectManager::_perform_full_project_conversion));
+ add_child(ask_full_convert_dialog);
+
npdialog = memnew(ProjectDialog);
npdialog->connect("projects_updated", callable_mp(this, &ProjectManager::_on_projects_updated));
npdialog->connect("project_created", callable_mp(this, &ProjectManager::_on_project_created));
@@ -2857,7 +2986,7 @@ ProjectManager::ProjectManager() {
Ref<DirAccess> dir_access = DirAccess::create(DirAccess::AccessType::ACCESS_FILESYSTEM);
- String default_project_path = EditorSettings::get_singleton()->get("filesystem/directories/default_project_path");
+ String default_project_path = EDITOR_GET("filesystem/directories/default_project_path");
if (!dir_access->dir_exists(default_project_path)) {
Error error = dir_access->make_dir_recursive(default_project_path);
if (error != OK) {
@@ -2865,7 +2994,7 @@ ProjectManager::ProjectManager() {
}
}
- String autoscan_path = EditorSettings::get_singleton()->get("filesystem/directories/autoscan_project_path");
+ String autoscan_path = EDITOR_GET("filesystem/directories/autoscan_project_path");
if (!autoscan_path.is_empty()) {
if (dir_access->dir_exists(autoscan_path)) {
_scan_begin(autoscan_path);
@@ -2880,22 +3009,24 @@ 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);
if (scale_factor > 1.0) {
Vector2i window_size = DisplayServer::get_singleton()->window_get_size();
- Vector2i screen_size = DisplayServer::get_singleton()->screen_get_size();
- Vector2i screen_position = DisplayServer::get_singleton()->screen_get_position();
+ Rect2i screen_rect = DisplayServer::get_singleton()->screen_get_usable_rect(DisplayServer::get_singleton()->window_get_current_screen());
window_size *= scale_factor;
DisplayServer::get_singleton()->window_set_size(window_size);
- if (screen_size != Vector2i()) {
+ if (screen_rect.size != Vector2i()) {
Vector2i window_position;
- window_position.x = screen_position.x + (screen_size.x - window_size.x) / 2;
- window_position.y = screen_position.y + (screen_size.y - window_size.y) / 2;
+ window_position.x = screen_rect.position.x + (screen_rect.size.x - window_size.x) / 2;
+ window_position.y = screen_rect.position.y + (screen_rect.size.y - window_size.y) / 2;
DisplayServer::get_singleton()->window_set_position(window_position);
}
}
diff --git a/editor/project_manager.h b/editor/project_manager.h
index 10bf25c048..d96f5e2641 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* project_manager.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* project_manager.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 PROJECT_MANAGER_H
#define PROJECT_MANAGER_H
@@ -38,6 +38,7 @@
#include "scene/gui/scroll_container.h"
#include "scene/gui/tree.h"
+class CheckBox;
class ProjectDialog;
class ProjectList;
@@ -87,6 +88,7 @@ class ProjectManager : public Control {
ConfirmationDialog *multi_open_ask = nullptr;
ConfirmationDialog *multi_run_ask = nullptr;
ConfirmationDialog *multi_scan_ask = nullptr;
+ ConfirmationDialog *ask_full_convert_dialog = nullptr;
ConfirmationDialog *ask_update_settings = nullptr;
ConfirmationDialog *open_templates = nullptr;
EditorAbout *about = nullptr;
@@ -97,6 +99,7 @@ class ProjectManager : public Control {
AcceptDialog *dialog_error = nullptr;
ProjectDialog *npdialog = nullptr;
+ Button *full_convert_button = nullptr;
OptionButton *language_btn = nullptr;
LinkButton *version_btn = nullptr;
@@ -106,6 +109,8 @@ class ProjectManager : public Control {
void _run_project_confirm();
void _open_selected_projects();
void _open_selected_projects_ask();
+ void _full_convert_button_pressed();
+ void _perform_full_project_conversion();
void _import_project();
void _new_project();
void _rename_project();
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 2da49f11cc..560549d249 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* project_settings_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* project_settings_editor.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 "project_settings_editor.h"
@@ -36,6 +36,7 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
+#include "scene/gui/check_button.h"
#include "servers/movie_writer/movie_writer.h"
ProjectSettingsEditor *ProjectSettingsEditor::singleton = nullptr;
@@ -72,6 +73,11 @@ void ProjectSettingsEditor::set_plugins_page() {
tab_container->set_current_tab(tab_container->get_tab_idx_from_control(plugin_settings));
}
+void ProjectSettingsEditor::set_general_page(const String &p_category) {
+ tab_container->set_current_tab(tab_container->get_tab_idx_from_control(general_editor));
+ general_settings_inspector->set_current_section(p_category);
+}
+
void ProjectSettingsEditor::update_plugins() {
plugin_settings->update_plugins();
}
@@ -108,6 +114,7 @@ void ProjectSettingsEditor::_add_setting() {
Variant value;
Variant::construct(Variant::Type(type_box->get_selected_id()), value, nullptr, 0, ce);
+ 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());
@@ -127,6 +134,7 @@ void ProjectSettingsEditor::_delete_setting() {
Variant value = ps->get(setting);
int order = ps->get_order(setting);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Delete Item"));
undo_redo->add_do_method(ps, "clear", setting);
@@ -215,9 +223,9 @@ void ProjectSettingsEditor::_select_type(Variant::Type p_type) {
void ProjectSettingsEditor::shortcut_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
const Ref<InputEventKey> k = p_event;
-
if (k.is_valid() && k->is_pressed()) {
bool handled = false;
@@ -266,10 +274,14 @@ void ProjectSettingsEditor::_add_feature_overrides() {
presets.insert("s3tc");
presets.insert("etc");
presets.insert("etc2");
+ presets.insert("editor");
+ presets.insert("template_debug");
+ presets.insert("template_release");
presets.insert("debug");
presets.insert("release");
- presets.insert("editor");
- presets.insert("standalone");
+ presets.insert("template");
+ presets.insert("double");
+ presets.insert("single");
presets.insert("32");
presets.insert("64");
presets.insert("movie");
@@ -333,6 +345,7 @@ void ProjectSettingsEditor::_action_added(const String &p_name) {
action["events"] = Array();
action["deadzone"] = 0.5f;
+ 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);
@@ -346,8 +359,9 @@ void ProjectSettingsEditor::_action_added(const String &p_name) {
void ProjectSettingsEditor::_action_edited(const String &p_name, const Dictionary &p_action) {
const String property_name = "input/" + p_name;
- Dictionary old_val = ProjectSettings::get_singleton()->get(property_name);
+ Dictionary old_val = GLOBAL_GET(property_name);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (old_val["deadzone"] != p_action["deadzone"]) {
// Deadzone Changed
undo_redo->create_action(TTR("Change Action deadzone"));
@@ -356,12 +370,12 @@ void ProjectSettingsEditor::_action_edited(const String &p_name, const Dictionar
} else {
// Events changed
- int event_count = ((Array)p_action["events"]).size();
+ int act_event_count = ((Array)p_action["events"]).size();
int old_event_count = ((Array)old_val["events"]).size();
- if (event_count == old_event_count) {
+ if (act_event_count == old_event_count) {
undo_redo->create_action(TTR("Edit Input Action Event"));
- } else if (event_count > old_event_count) {
+ } 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"));
@@ -381,9 +395,10 @@ void ProjectSettingsEditor::_action_edited(const String &p_name, const Dictionar
void ProjectSettingsEditor::_action_removed(const String &p_name) {
const String property_name = "input/" + p_name;
- Dictionary old_val = ProjectSettings::get_singleton()->get(property_name);
+ Dictionary old_val = GLOBAL_GET(property_name);
int order = ProjectSettings::get_singleton()->get_order(property_name);
+ 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);
@@ -404,8 +419,9 @@ void ProjectSettingsEditor::_action_renamed(const String &p_old_name, const Stri
"An action with this name already exists.");
int order = ProjectSettings::get_singleton()->get_order(old_property_name);
- Dictionary action = ProjectSettings::get_singleton()->get(old_property_name);
+ Dictionary action = GLOBAL_GET(old_property_name);
+ 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);
@@ -435,6 +451,7 @@ void ProjectSettingsEditor::_action_reordered(const String &p_action_name, const
HashMap<String, Variant> action_values;
ProjectSettings::get_singleton()->get_property_list(&props);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Update Input Action Order"));
for (const PropertyInfo &prop : props) {
@@ -499,7 +516,7 @@ void ProjectSettingsEditor::_update_action_map_editor() {
// Strip the "input/" from the left.
String display_name = property_name.substr(String("input/").size() - 1);
- Dictionary action = ProjectSettings::get_singleton()->get(property_name);
+ Dictionary action = GLOBAL_GET(property_name);
ActionMapEditor::ActionInfo action_info;
action_info.action = action;
@@ -536,6 +553,14 @@ void ProjectSettingsEditor::_update_theme() {
}
}
+void ProjectSettingsEditor::_input_filter_focused() {
+ set_close_on_escape(false);
+}
+
+void ProjectSettingsEditor::_input_filter_unfocused() {
+ set_close_on_escape(true);
+}
+
void ProjectSettingsEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
@@ -567,7 +592,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
set_title(TTR("Project Settings (project.godot)"));
ps = ProjectSettings::get_singleton();
- undo_redo = p_data->get_undo_redo();
data = p_data;
tab_container = memnew(TabContainer);
@@ -575,7 +599,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
tab_container->set_theme_type_variation("TabContainerOdd");
add_child(tab_container);
- VBoxContainer *general_editor = memnew(VBoxContainer);
+ general_editor = memnew(VBoxContainer);
general_editor->set_name(TTR("General"));
general_editor->set_alignment(BoxContainer::ALIGNMENT_BEGIN);
general_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -626,7 +650,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
custom_properties->add_child(del_button);
general_settings_inspector = memnew(SectionedInspector);
- general_settings_inspector->get_inspector()->set_undo_redo(EditorNode::get_undo_redo());
general_settings_inspector->set_v_size_flags(Control::SIZE_EXPAND_FILL);
general_settings_inspector->register_search_box(search_box);
general_settings_inspector->get_inspector()->set_use_filter(true);
@@ -668,6 +691,8 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
action_map_editor->connect("action_removed", callable_mp(this, &ProjectSettingsEditor::_action_removed));
action_map_editor->connect("action_renamed", callable_mp(this, &ProjectSettingsEditor::_action_renamed));
action_map_editor->connect("action_reordered", callable_mp(this, &ProjectSettingsEditor::_action_reordered));
+ action_map_editor->connect(SNAME("filter_focused"), callable_mp(this, &ProjectSettingsEditor::_input_filter_focused));
+ action_map_editor->connect(SNAME("filter_unfocused"), callable_mp(this, &ProjectSettingsEditor::_input_filter_unfocused));
tab_container->add_child(action_map_editor);
localization_editor = memnew(LocalizationEditor);
diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h
index 040d992e40..31f644da74 100644
--- a/editor/project_settings_editor.h
+++ b/editor/project_settings_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* project_settings_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* project_settings_editor.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 PROJECT_SETTINGS_EDITOR_H
#define PROJECT_SETTINGS_EDITOR_H
@@ -42,7 +42,6 @@
#include "editor/shader_globals_editor.h"
#include "scene/gui/tab_container.h"
-class EditorUndoRedoManager;
class FileSystemDock;
class ProjectSettingsEditor : public AcceptDialog {
@@ -53,6 +52,7 @@ class ProjectSettingsEditor : public AcceptDialog {
Timer *timer = nullptr;
TabContainer *tab_container = nullptr;
+ VBoxContainer *general_editor = nullptr;
SectionedInspector *general_settings_inspector = nullptr;
ActionMapEditor *action_map_editor = nullptr;
LocalizationEditor *localization_editor = nullptr;
@@ -77,7 +77,6 @@ class ProjectSettingsEditor : public AcceptDialog {
ImportDefaultsEditor *import_defaults_editor = nullptr;
EditorData *data = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
void _advanced_toggled(bool p_button_pressed);
void _update_advanced(bool p_is_advanced);
@@ -108,6 +107,9 @@ class ProjectSettingsEditor : public AcceptDialog {
void _update_action_map_editor();
void _update_theme();
+ void _input_filter_focused();
+ void _input_filter_unfocused();
+
protected:
void _notification(int p_what);
static void _bind_methods();
@@ -116,6 +118,7 @@ public:
static ProjectSettingsEditor *get_singleton() { return singleton; }
void popup_project_settings();
void set_plugins_page();
+ void set_general_page(const String &p_category);
void update_plugins();
EditorAutoloadSettings *get_autoload_settings() { return autoload_settings; }
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 1b17a740dd..b756cdb8ed 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* property_selector.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* property_selector.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 "property_selector.h"
diff --git a/editor/property_selector.h b/editor/property_selector.h
index 9f1af576dd..b162ee6cfd 100644
--- a/editor/property_selector.h
+++ b/editor/property_selector.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* property_selector.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* property_selector.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 PROPERTY_SELECTOR_H
#define PROPERTY_SELECTOR_H
diff --git a/editor/register_editor_types.cpp b/editor/register_editor_types.cpp
new file mode 100644
index 0000000000..061baaff7e
--- /dev/null
+++ b/editor/register_editor_types.cpp
@@ -0,0 +1,222 @@
+/**************************************************************************/
+/* register_editor_types.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 "register_editor_types.h"
+
+#include "editor/animation_track_editor.h"
+#include "editor/debugger/debug_adapter/debug_adapter_server.h"
+#include "editor/editor_command_palette.h"
+#include "editor/editor_feature_profile.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_file_system.h"
+#include "editor/editor_node.h"
+#include "editor/editor_paths.h"
+#include "editor/editor_resource_picker.h"
+#include "editor/editor_resource_preview.h"
+#include "editor/editor_run_script.h"
+#include "editor/editor_settings.h"
+#include "editor/editor_translation_parser.h"
+#include "editor/editor_undo_redo_manager.h"
+#include "editor/filesystem_dock.h"
+#include "editor/import/editor_import_plugin.h"
+#include "editor/import/resource_importer_scene.h"
+#include "editor/plugins/animation_tree_editor_plugin.h"
+#include "editor/plugins/audio_stream_editor_plugin.h"
+#include "editor/plugins/audio_stream_randomizer_editor_plugin.h"
+#include "editor/plugins/bit_map_editor_plugin.h"
+#include "editor/plugins/bone_map_editor_plugin.h"
+#include "editor/plugins/camera_3d_editor_plugin.h"
+#include "editor/plugins/cast_2d_editor_plugin.h"
+#include "editor/plugins/collision_polygon_2d_editor_plugin.h"
+#include "editor/plugins/collision_shape_2d_editor_plugin.h"
+#include "editor/plugins/control_editor_plugin.h"
+#include "editor/plugins/cpu_particles_2d_editor_plugin.h"
+#include "editor/plugins/cpu_particles_3d_editor_plugin.h"
+#include "editor/plugins/curve_editor_plugin.h"
+#include "editor/plugins/editor_debugger_plugin.h"
+#include "editor/plugins/font_config_plugin.h"
+#include "editor/plugins/gpu_particles_2d_editor_plugin.h"
+#include "editor/plugins/gpu_particles_3d_editor_plugin.h"
+#include "editor/plugins/gpu_particles_collision_sdf_editor_plugin.h"
+#include "editor/plugins/gradient_editor_plugin.h"
+#include "editor/plugins/gradient_texture_2d_editor_plugin.h"
+#include "editor/plugins/input_event_editor_plugin.h"
+#include "editor/plugins/light_occluder_2d_editor_plugin.h"
+#include "editor/plugins/lightmap_gi_editor_plugin.h"
+#include "editor/plugins/line_2d_editor_plugin.h"
+#include "editor/plugins/material_editor_plugin.h"
+#include "editor/plugins/mesh_editor_plugin.h"
+#include "editor/plugins/mesh_instance_3d_editor_plugin.h"
+#include "editor/plugins/mesh_library_editor_plugin.h"
+#include "editor/plugins/multimesh_editor_plugin.h"
+#include "editor/plugins/navigation_link_2d_editor_plugin.h"
+#include "editor/plugins/navigation_polygon_editor_plugin.h"
+#include "editor/plugins/node_3d_editor_gizmos.h"
+#include "editor/plugins/occluder_instance_3d_editor_plugin.h"
+#include "editor/plugins/packed_scene_editor_plugin.h"
+#include "editor/plugins/path_2d_editor_plugin.h"
+#include "editor/plugins/path_3d_editor_plugin.h"
+#include "editor/plugins/physical_bone_3d_editor_plugin.h"
+#include "editor/plugins/polygon_2d_editor_plugin.h"
+#include "editor/plugins/polygon_3d_editor_plugin.h"
+#include "editor/plugins/resource_preloader_editor_plugin.h"
+#include "editor/plugins/script_editor_plugin.h"
+#include "editor/plugins/shader_editor_plugin.h"
+#include "editor/plugins/shader_file_editor_plugin.h"
+#include "editor/plugins/skeleton_2d_editor_plugin.h"
+#include "editor/plugins/skeleton_3d_editor_plugin.h"
+#include "editor/plugins/skeleton_ik_3d_editor_plugin.h"
+#include "editor/plugins/sprite_2d_editor_plugin.h"
+#include "editor/plugins/sprite_frames_editor_plugin.h"
+#include "editor/plugins/style_box_editor_plugin.h"
+#include "editor/plugins/sub_viewport_preview_editor_plugin.h"
+#include "editor/plugins/texture_3d_editor_plugin.h"
+#include "editor/plugins/texture_editor_plugin.h"
+#include "editor/plugins/texture_layered_editor_plugin.h"
+#include "editor/plugins/texture_region_editor_plugin.h"
+#include "editor/plugins/theme_editor_plugin.h"
+#include "editor/plugins/tiles/tiles_editor_plugin.h"
+#include "editor/plugins/version_control_editor_plugin.h"
+#include "editor/plugins/visual_shader_editor_plugin.h"
+#include "editor/plugins/voxel_gi_editor_plugin.h"
+
+void register_editor_types() {
+ ResourceLoader::set_timestamp_on_load(true);
+ ResourceSaver::set_timestamp_on_save(true);
+
+ GDREGISTER_CLASS(EditorPaths);
+ GDREGISTER_CLASS(EditorPlugin);
+ GDREGISTER_CLASS(EditorTranslationParserPlugin);
+ GDREGISTER_CLASS(EditorImportPlugin);
+ GDREGISTER_CLASS(EditorScript);
+ GDREGISTER_CLASS(EditorSelection);
+ GDREGISTER_CLASS(EditorFileDialog);
+ GDREGISTER_ABSTRACT_CLASS(EditorSettings);
+ GDREGISTER_CLASS(EditorNode3DGizmo);
+ GDREGISTER_CLASS(EditorNode3DGizmoPlugin);
+ GDREGISTER_ABSTRACT_CLASS(EditorResourcePreview);
+ GDREGISTER_CLASS(EditorResourcePreviewGenerator);
+ GDREGISTER_ABSTRACT_CLASS(EditorFileSystem);
+ GDREGISTER_CLASS(EditorFileSystemDirectory);
+ GDREGISTER_CLASS(EditorVCSInterface);
+ GDREGISTER_ABSTRACT_CLASS(ScriptEditor);
+ GDREGISTER_ABSTRACT_CLASS(ScriptEditorBase);
+ GDREGISTER_CLASS(EditorSyntaxHighlighter);
+ GDREGISTER_ABSTRACT_CLASS(EditorInterface);
+ GDREGISTER_CLASS(EditorExportPlugin);
+ GDREGISTER_ABSTRACT_CLASS(EditorExportPlatform);
+ GDREGISTER_CLASS(EditorResourceConversionPlugin);
+ GDREGISTER_CLASS(EditorSceneFormatImporter);
+ GDREGISTER_CLASS(EditorScenePostImportPlugin);
+ GDREGISTER_CLASS(EditorInspector);
+ GDREGISTER_CLASS(EditorInspectorPlugin);
+ GDREGISTER_CLASS(EditorProperty);
+ GDREGISTER_CLASS(AnimationTrackEditPlugin);
+ GDREGISTER_CLASS(ScriptCreateDialog);
+ GDREGISTER_CLASS(EditorFeatureProfile);
+ GDREGISTER_CLASS(EditorSpinSlider);
+ GDREGISTER_CLASS(EditorResourcePicker);
+ GDREGISTER_CLASS(EditorScriptPicker);
+ GDREGISTER_ABSTRACT_CLASS(EditorUndoRedoManager);
+
+ GDREGISTER_ABSTRACT_CLASS(FileSystemDock);
+ GDREGISTER_VIRTUAL_CLASS(EditorFileSystemImportFormatSupportQuery);
+
+ GDREGISTER_CLASS(EditorScenePostImport);
+ GDREGISTER_CLASS(EditorCommandPalette);
+ GDREGISTER_CLASS(EditorDebuggerPlugin);
+ GDREGISTER_ABSTRACT_CLASS(EditorDebuggerSession);
+
+ // This list is alphabetized, and plugins that depend on Node2D are in their own section below.
+ EditorPlugins::add_by_type<AnimationTreeEditorPlugin>();
+ EditorPlugins::add_by_type<AudioStreamEditorPlugin>();
+ EditorPlugins::add_by_type<AudioStreamRandomizerEditorPlugin>();
+ EditorPlugins::add_by_type<BitMapEditorPlugin>();
+ EditorPlugins::add_by_type<BoneMapEditorPlugin>();
+ EditorPlugins::add_by_type<Camera3DEditorPlugin>();
+ EditorPlugins::add_by_type<ControlEditorPlugin>();
+ EditorPlugins::add_by_type<CPUParticles3DEditorPlugin>();
+ EditorPlugins::add_by_type<CurveEditorPlugin>();
+ EditorPlugins::add_by_type<DebugAdapterServer>();
+ EditorPlugins::add_by_type<FontEditorPlugin>();
+ EditorPlugins::add_by_type<GPUParticles3DEditorPlugin>();
+ EditorPlugins::add_by_type<GPUParticlesCollisionSDF3DEditorPlugin>();
+ EditorPlugins::add_by_type<GradientEditorPlugin>();
+ EditorPlugins::add_by_type<GradientTexture2DEditorPlugin>();
+ EditorPlugins::add_by_type<InputEventEditorPlugin>();
+ EditorPlugins::add_by_type<LightmapGIEditorPlugin>();
+ EditorPlugins::add_by_type<MaterialEditorPlugin>();
+ EditorPlugins::add_by_type<MeshEditorPlugin>();
+ EditorPlugins::add_by_type<MeshInstance3DEditorPlugin>();
+ EditorPlugins::add_by_type<MeshLibraryEditorPlugin>();
+ EditorPlugins::add_by_type<MultiMeshEditorPlugin>();
+ EditorPlugins::add_by_type<OccluderInstance3DEditorPlugin>();
+ EditorPlugins::add_by_type<PackedSceneEditorPlugin>();
+ EditorPlugins::add_by_type<Path3DEditorPlugin>();
+ EditorPlugins::add_by_type<PhysicalBone3DEditorPlugin>();
+ EditorPlugins::add_by_type<Polygon3DEditorPlugin>();
+ EditorPlugins::add_by_type<ResourcePreloaderEditorPlugin>();
+ EditorPlugins::add_by_type<ShaderEditorPlugin>();
+ EditorPlugins::add_by_type<ShaderFileEditorPlugin>();
+ EditorPlugins::add_by_type<Skeleton3DEditorPlugin>();
+ EditorPlugins::add_by_type<SkeletonIK3DEditorPlugin>();
+ EditorPlugins::add_by_type<SpriteFramesEditorPlugin>();
+ EditorPlugins::add_by_type<StyleBoxEditorPlugin>();
+ EditorPlugins::add_by_type<SubViewportPreviewEditorPlugin>();
+ EditorPlugins::add_by_type<Texture3DEditorPlugin>();
+ EditorPlugins::add_by_type<TextureEditorPlugin>();
+ EditorPlugins::add_by_type<TextureLayeredEditorPlugin>();
+ EditorPlugins::add_by_type<TextureRegionEditorPlugin>();
+ EditorPlugins::add_by_type<ThemeEditorPlugin>();
+ EditorPlugins::add_by_type<VoxelGIEditorPlugin>();
+
+ // 2D
+ EditorPlugins::add_by_type<CollisionPolygon2DEditorPlugin>();
+ EditorPlugins::add_by_type<CollisionShape2DEditorPlugin>();
+ EditorPlugins::add_by_type<CPUParticles2DEditorPlugin>();
+ EditorPlugins::add_by_type<GPUParticles2DEditorPlugin>();
+ EditorPlugins::add_by_type<LightOccluder2DEditorPlugin>();
+ EditorPlugins::add_by_type<Line2DEditorPlugin>();
+ EditorPlugins::add_by_type<NavigationLink2DEditorPlugin>();
+ EditorPlugins::add_by_type<NavigationPolygonEditorPlugin>();
+ EditorPlugins::add_by_type<Path2DEditorPlugin>();
+ EditorPlugins::add_by_type<Polygon2DEditorPlugin>();
+ EditorPlugins::add_by_type<Cast2DEditorPlugin>();
+ EditorPlugins::add_by_type<Skeleton2DEditorPlugin>();
+ EditorPlugins::add_by_type<Sprite2DEditorPlugin>();
+ EditorPlugins::add_by_type<TilesEditorPlugin>();
+}
+
+void unregister_editor_types() {
+ EditorNode::cleanup();
+ if (EditorPaths::get_singleton()) {
+ EditorPaths::free();
+ }
+}
diff --git a/editor/register_editor_types.h b/editor/register_editor_types.h
new file mode 100644
index 0000000000..82d7483228
--- /dev/null
+++ b/editor/register_editor_types.h
@@ -0,0 +1,37 @@
+/**************************************************************************/
+/* register_editor_types.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 REGISTER_EDITOR_TYPES_H
+#define REGISTER_EDITOR_TYPES_H
+
+void register_editor_types();
+void unregister_editor_types();
+
+#endif // REGISTER_EDITOR_TYPES_H
diff --git a/editor/register_exporters.h b/editor/register_exporters.h
index 9aa98f509f..b210f72cce 100644
--- a/editor/register_exporters.h
+++ b/editor/register_exporters.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* register_exporters.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* register_exporters.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 REGISTER_EXPORTERS_H
#define REGISTER_EXPORTERS_H
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index 300a3d0f05..c3a99e96ef 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* rename_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* rename_dialog.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 "rename_dialog.h"
@@ -42,13 +42,13 @@
#include "modules/regex/regex.h"
#include "plugins/script_editor_plugin.h"
#include "scene/gui/control.h"
+#include "scene/gui/grid_container.h"
#include "scene/gui/label.h"
#include "scene/gui/separator.h"
#include "scene/gui/tab_container.h"
-RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, Ref<EditorUndoRedoManager> p_undo_redo) {
+RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor) {
scene_tree_editor = p_scene_tree_editor;
- undo_redo = p_undo_redo;
preview_node = nullptr;
set_title(TTR("Batch Rename"));
@@ -338,7 +338,7 @@ void RenameDialog::_bind_methods() {
}
void RenameDialog::_update_substitute() {
- LineEdit *focus_owner_line_edit = Object::cast_to<LineEdit>(scene_tree_editor->get_viewport()->gui_get_focus_owner());
+ LineEdit *focus_owner_line_edit = Object::cast_to<LineEdit>(get_viewport()->gui_get_focus_owner());
bool is_main_field = _is_main_field(focus_owner_line_edit);
but_insert_name->set_disabled(!is_main_field);
@@ -582,7 +582,8 @@ void RenameDialog::rename() {
// Forward recursive as opposed to the actual renaming.
_iterate_scene(root_node, selected_node_list, &global_count);
- if (undo_redo.is_valid() && !to_rename.is_empty()) {
+ if (!to_rename.is_empty()) {
+ 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.
@@ -635,7 +636,7 @@ bool RenameDialog::_is_main_field(LineEdit *line_edit) {
}
void RenameDialog::_insert_text(String text) {
- LineEdit *focus_owner = Object::cast_to<LineEdit>(scene_tree_editor->get_viewport()->gui_get_focus_owner());
+ LineEdit *focus_owner = Object::cast_to<LineEdit>(get_viewport()->gui_get_focus_owner());
if (_is_main_field(focus_owner)) {
focus_owner->selection_delete();
@@ -652,9 +653,9 @@ void RenameDialog::_features_toggled(bool pressed) {
}
// Adjust to minimum size in y
- Size2i size = get_size();
- size.y = 0;
- set_size(size);
+ Size2i new_size = get_size();
+ new_size.y = 0;
+ set_size(new_size);
}
#endif // MODULE_REGEX_ENABLED
diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h
index dac73b13b8..47ff51f52a 100644
--- a/editor/rename_dialog.h
+++ b/editor/rename_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* rename_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* rename_dialog.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 RENAME_DIALOG_H
#define RENAME_DIALOG_H
@@ -42,8 +42,6 @@
#include "scene/gui/spin_box.h"
#include "scene/gui/tab_container.h"
-class EditorUndoRedoManager;
-
class RenameDialog : public ConfirmationDialog {
GDCLASS(RenameDialog, ConfirmationDialog);
@@ -64,7 +62,6 @@ class RenameDialog : public ConfirmationDialog {
static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type);
SceneTreeEditor *scene_tree_editor = nullptr;
- Ref<EditorUndoRedoManager> undo_redo;
int global_count = 0;
LineEdit *lne_search = nullptr;
@@ -110,8 +107,7 @@ public:
void reset();
void rename();
- RenameDialog(SceneTreeEditor *p_scene_tree_editor, Ref<EditorUndoRedoManager> p_undo_redo = Ref<EditorUndoRedoManager>());
- ~RenameDialog() {}
+ RenameDialog(SceneTreeEditor *p_scene_tree_editor);
};
#endif // MODULE_REGEX_ENABLED
diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp
index 75098b25b1..9f61d63a80 100644
--- a/editor/reparent_dialog.cpp
+++ b/editor/reparent_dialog.cpp
@@ -1,38 +1,39 @@
-/*************************************************************************/
-/* reparent_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* reparent_dialog.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 "reparent_dialog.h"
#include "core/string/print_string.h"
#include "scene/gui/box_container.h"
#include "scene/gui/label.h"
+#include "scene/gui/tree.h"
void ReparentDialog::_notification(int p_what) {
switch (p_what) {
diff --git a/editor/reparent_dialog.h b/editor/reparent_dialog.h
index 49b00661a0..af26eada3d 100644
--- a/editor/reparent_dialog.h
+++ b/editor/reparent_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* reparent_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* reparent_dialog.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 REPARENT_DIALOG_H
#define REPARENT_DIALOG_H
diff --git a/editor/scene_create_dialog.cpp b/editor/scene_create_dialog.cpp
index 573e57ca04..c861fadcf0 100644
--- a/editor/scene_create_dialog.cpp
+++ b/editor/scene_create_dialog.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* scene_create_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* scene_create_dialog.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 "scene_create_dialog.h"
@@ -133,7 +133,7 @@ void SceneCreateDialog::update_dialog() {
root_name = scene_name.get_file().get_basename();
}
- if (!root_name.is_valid_identifier()) {
+ if (root_name.is_empty() || root_name.validate_node_name().size() != root_name.size()) {
update_error(node_error_label, MSG_ERROR, TTR("Invalid root node name."));
is_valid = false;
}
@@ -170,12 +170,14 @@ Node *SceneCreateDialog::create_scene_root() {
root = memnew(Node3D);
break;
case ROOT_USER_INTERFACE: {
- Control *gui = memnew(Control);
- gui->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
- root = gui;
+ 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:
- root = Object::cast_to<Node>(select_node_dialog->instance_selected());
+ root = Object::cast_to<Node>(select_node_dialog->instantiate_selected());
break;
}
diff --git a/editor/scene_create_dialog.h b/editor/scene_create_dialog.h
index 5ac9d89cd7..dd27b85af2 100644
--- a/editor/scene_create_dialog.h
+++ b/editor/scene_create_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* scene_create_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* scene_create_dialog.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 SCENE_CREATE_DIALOG_H
#define SCENE_CREATE_DIALOG_H
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index a437245c57..733f140a56 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -1,38 +1,39 @@
-/*************************************************************************/
-/* scene_tree_dock.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* scene_tree_dock.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 "scene_tree_dock.h"
#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/io/resource_saver.h"
+#include "core/object/class_db.h"
#include "core/object/message_queue.h"
#include "core/os/keyboard.h"
#include "editor/debugger/editor_debugger_node.h"
@@ -40,13 +41,17 @@
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
+#include "editor/editor_quick_open.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/editor_undo_redo_manager.h"
+#include "editor/inspector_dock.h"
#include "editor/multi_node_edit.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
+#include "editor/reparent_dialog.h"
#include "editor/shader_create_dialog.h"
#include "scene/main/window.h"
#include "scene/property_utils.h"
@@ -105,7 +110,7 @@ void SceneTreeDock::shortcut_input(const Ref<InputEvent> &p_event) {
#endif // MODULE_REGEX_ENABLED
} else if (ED_IS_SHORTCUT("scene_tree/add_child_node", p_event)) {
_tool_selected(TOOL_NEW);
- } else if (ED_IS_SHORTCUT("scene_tree/instance_scene", p_event)) {
+ } else if (ED_IS_SHORTCUT("scene_tree/instantiate_scene", p_event)) {
_tool_selected(TOOL_INSTANTIATE);
} else if (ED_IS_SHORTCUT("scene_tree/expand_collapse_all", p_event)) {
_tool_selected(TOOL_EXPAND_COLLAPSE);
@@ -129,12 +134,16 @@ void SceneTreeDock::shortcut_input(const Ref<InputEvent> &p_event) {
_tool_selected(TOOL_MOVE_DOWN);
} else if (ED_IS_SHORTCUT("scene_tree/reparent", p_event)) {
_tool_selected(TOOL_REPARENT);
+ } else if (ED_IS_SHORTCUT("scene_tree/reparent_to_new_node", p_event)) {
+ _tool_selected(TOOL_REPARENT_TO_NEW_NODE);
} else if (ED_IS_SHORTCUT("scene_tree/save_branch_as_scene", p_event)) {
_tool_selected(TOOL_NEW_SCENE_FROM);
} else if (ED_IS_SHORTCUT("scene_tree/delete_no_confirm", p_event)) {
_tool_selected(TOOL_ERASE, true);
} else if (ED_IS_SHORTCUT("scene_tree/copy_node_path", p_event)) {
_tool_selected(TOOL_COPY_NODE_PATH);
+ } else if (ED_IS_SHORTCUT("scene_tree/toggle_unique_name", p_event)) {
+ _tool_selected(TOOL_TOGGLE_SCENE_UNIQUE_NAME);
} else if (ED_IS_SHORTCUT("scene_tree/delete", p_event)) {
_tool_selected(TOOL_ERASE);
} else {
@@ -195,7 +204,7 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N
Node *instantiated_scene = sdata->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE);
if (!instantiated_scene) {
current_option = -1;
- accept->set_text(vformat(TTR("Error instancing scene from %s"), p_files[i]));
+ accept->set_text(vformat(TTR("Error instantiating scene from %s"), p_files[i]));
accept->popup_centered();
error = true;
break;
@@ -203,7 +212,7 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N
if (!edited_scene->get_scene_file_path().is_empty()) {
if (_cyclical_dependency_exists(edited_scene->get_scene_file_path(), instantiated_scene)) {
- accept->set_text(vformat(TTR("Cannot instance the scene '%s' because the current scene exists within one of its nodes."), p_files[i]));
+ accept->set_text(vformat(TTR("Cannot instantiate the scene '%s' because the current scene exists within one of its nodes."), p_files[i]));
accept->popup_centered();
error = true;
break;
@@ -222,28 +231,29 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N
return;
}
- editor_data->get_undo_redo()->create_action(TTR("Instance Scene(s)"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Instantiate Scene(s)"));
for (int i = 0; i < instances.size(); i++) {
Node *instantiated_scene = instances[i];
- editor_data->get_undo_redo()->add_do_method(parent, "add_child", instantiated_scene, true);
+ undo_redo->add_do_method(parent, "add_child", instantiated_scene, true);
if (p_pos >= 0) {
- editor_data->get_undo_redo()->add_do_method(parent, "move_child", instantiated_scene, p_pos + i);
+ undo_redo->add_do_method(parent, "move_child", instantiated_scene, p_pos + i);
}
- editor_data->get_undo_redo()->add_do_method(instantiated_scene, "set_owner", edited_scene);
- editor_data->get_undo_redo()->add_do_method(editor_selection, "clear");
- editor_data->get_undo_redo()->add_do_method(editor_selection, "add_node", instantiated_scene);
- editor_data->get_undo_redo()->add_do_reference(instantiated_scene);
- editor_data->get_undo_redo()->add_undo_method(parent, "remove_child", instantiated_scene);
+ undo_redo->add_do_method(instantiated_scene, "set_owner", edited_scene);
+ undo_redo->add_do_method(editor_selection, "clear");
+ undo_redo->add_do_method(editor_selection, "add_node", instantiated_scene);
+ undo_redo->add_do_reference(instantiated_scene);
+ undo_redo->add_undo_method(parent, "remove_child", instantiated_scene);
String new_name = parent->validate_child_name(instantiated_scene);
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
- editor_data->get_undo_redo()->add_do_method(ed, "live_debug_instance_node", edited_scene->get_path_to(parent), p_files[i], new_name);
- editor_data->get_undo_redo()->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).path_join(new_name)));
+ undo_redo->add_do_method(ed, "live_debug_instantiate_node", edited_scene->get_path_to(parent), p_files[i], new_name);
+ undo_redo->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).path_join(new_name)));
}
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->commit_action();
_push_item(instances[instances.size() - 1]);
for (int i = 0; i < instances.size(); i++) {
emit_signal(SNAME("node_created"), instances[i]);
@@ -260,12 +270,12 @@ void SceneTreeDock::_replace_with_branch_scene(const String &p_file, Node *base)
Node *instantiated_scene = sdata->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE);
if (!instantiated_scene) {
- accept->set_text(vformat(TTR("Error instancing scene from %s"), p_file));
+ accept->set_text(vformat(TTR("Error instantiating scene from %s"), p_file));
accept->popup_centered();
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();
@@ -328,9 +338,9 @@ bool SceneTreeDock::_track_inherit(const String &p_target_scene_path, Node *p_de
Ref<SceneState> ss = p->get_scene_inherited_state();
if (ss.is_valid()) {
String path = ss->get_path();
- Ref<PackedScene> data = ResourceLoader::load(path);
- if (data.is_valid()) {
- p = data->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE);
+ Ref<PackedScene> pack_data = ResourceLoader::load(path);
+ if (pack_data.is_valid()) {
+ p = pack_data->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE);
if (!p) {
continue;
}
@@ -439,8 +449,8 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
}
- bool collapsed = _is_collapsed_recursive(selected_item);
- _set_collapsed_recursive(selected_item, !collapsed);
+ bool collapsed = selected_item->is_any_collapsed();
+ selected_item->set_collapsed_recursive(!collapsed);
tree->ensure_cursor_is_visible();
@@ -530,23 +540,24 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
return;
}
- editor_data->get_undo_redo()->create_action(TTR("Detach Script"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene());
- editor_data->get_undo_redo()->add_do_method(EditorNode::get_singleton(), "push_item", (Script *)nullptr);
+ 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);
for (int i = 0; i < selection.size(); i++) {
Node *n = Object::cast_to<Node>(selection[i]);
Ref<Script> existing = n->get_script();
Ref<Script> empty = EditorNode::get_singleton()->get_object_custom_type_base(n);
if (existing != empty) {
- editor_data->get_undo_redo()->add_do_method(n, "set_script", empty);
- editor_data->get_undo_redo()->add_undo_method(n, "set_script", existing);
+ undo_redo->add_do_method(n, "set_script", empty);
+ undo_redo->add_undo_method(n, "set_script", existing);
}
}
- editor_data->get_undo_redo()->add_do_method(this, "_update_script_button");
- editor_data->get_undo_redo()->add_undo_method(this, "_update_script_button");
+ undo_redo->add_do_method(this, "_update_script_button");
+ undo_redo->add_undo_method(this, "_update_script_button");
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->commit_action();
} break;
case TOOL_MOVE_UP:
case TOOL_MOVE_DOWN: {
@@ -600,11 +611,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break; // one or more nodes can not be moved
}
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (selection.size() == 1) {
- editor_data->get_undo_redo()->create_action(TTR("Move Node In Parent"));
+ undo_redo->create_action(TTR("Move Node In Parent"));
}
if (selection.size() > 1) {
- editor_data->get_undo_redo()->create_action(TTR("Move Nodes In Parent"));
+ undo_redo->create_action(TTR("Move Nodes In Parent"));
}
for (int i = 0; i < selection.size(); i++) {
@@ -617,11 +629,11 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
int bottom_node_pos = bottom_node->get_index();
int top_node_pos_next = top_node->get_index() + (MOVING_DOWN ? 1 : -1);
- editor_data->get_undo_redo()->add_do_method(top_node->get_parent(), "move_child", top_node, top_node_pos_next);
- editor_data->get_undo_redo()->add_undo_method(bottom_node->get_parent(), "move_child", bottom_node, bottom_node_pos);
+ undo_redo->add_do_method(top_node->get_parent(), "move_child", top_node, top_node_pos_next);
+ undo_redo->add_undo_method(bottom_node->get_parent(), "move_child", bottom_node, bottom_node_pos);
}
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->commit_action();
} break;
case TOOL_DUPLICATE: {
@@ -649,8 +661,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break;
}
- editor_data->get_undo_redo()->create_action(TTR("Duplicate Node(s)"), UndoRedo::MERGE_DISABLE, selection.front()->get());
- editor_data->get_undo_redo()->add_do_method(editor_selection, "clear");
+ 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");
Node *dupsingle = nullptr;
@@ -675,28 +688,28 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
dup->set_name(parent->validate_child_name(dup));
- editor_data->get_undo_redo()->add_do_method(add_below_node, "add_sibling", dup, true);
+ undo_redo->add_do_method(add_below_node, "add_sibling", dup, true);
for (Node *F : owned) {
if (!duplimap.has(F)) {
continue;
}
Node *d = duplimap[F];
- editor_data->get_undo_redo()->add_do_method(d, "set_owner", node->get_owner());
+ undo_redo->add_do_method(d, "set_owner", node->get_owner());
}
- editor_data->get_undo_redo()->add_do_method(editor_selection, "add_node", dup);
- editor_data->get_undo_redo()->add_undo_method(parent, "remove_child", dup);
- editor_data->get_undo_redo()->add_do_reference(dup);
+ undo_redo->add_do_method(editor_selection, "add_node", dup);
+ undo_redo->add_undo_method(parent, "remove_child", dup);
+ undo_redo->add_do_reference(dup);
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
- editor_data->get_undo_redo()->add_do_method(ed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name());
- editor_data->get_undo_redo()->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).path_join(dup->get_name())));
+ undo_redo->add_do_method(ed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name());
+ undo_redo->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).path_join(dup->get_name())));
add_below_node = dup;
}
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->commit_action();
if (dupsingle) {
_push_item(dupsingle);
@@ -765,29 +778,30 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
return;
}
- editor_data->get_undo_redo()->create_action(TTR("Make node as Root"));
- editor_data->get_undo_redo()->add_do_method(node->get_parent(), "remove_child", node);
- editor_data->get_undo_redo()->add_do_method(EditorNode::get_singleton(), "set_edited_scene", node);
- editor_data->get_undo_redo()->add_do_method(node, "add_child", root, true);
- editor_data->get_undo_redo()->add_do_method(node, "set_scene_file_path", root->get_scene_file_path());
- editor_data->get_undo_redo()->add_do_method(root, "set_scene_file_path", String());
- editor_data->get_undo_redo()->add_do_method(node, "set_owner", (Object *)nullptr);
- editor_data->get_undo_redo()->add_do_method(root, "set_owner", node);
+ 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);
+ undo_redo->add_do_method(node, "add_child", root, true);
+ undo_redo->add_do_method(node, "set_scene_file_path", root->get_scene_file_path());
+ undo_redo->add_do_method(root, "set_scene_file_path", String());
+ undo_redo->add_do_method(node, "set_owner", (Object *)nullptr);
+ undo_redo->add_do_method(root, "set_owner", node);
_node_replace_owner(root, root, node, MODE_DO);
- editor_data->get_undo_redo()->add_undo_method(root, "set_scene_file_path", root->get_scene_file_path());
- editor_data->get_undo_redo()->add_undo_method(node, "set_scene_file_path", String());
- editor_data->get_undo_redo()->add_undo_method(node, "remove_child", root);
- editor_data->get_undo_redo()->add_undo_method(EditorNode::get_singleton(), "set_edited_scene", root);
- editor_data->get_undo_redo()->add_undo_method(node->get_parent(), "add_child", node, true);
- editor_data->get_undo_redo()->add_undo_method(node->get_parent(), "move_child", node, node->get_index());
- editor_data->get_undo_redo()->add_undo_method(root, "set_owner", (Object *)nullptr);
- editor_data->get_undo_redo()->add_undo_method(node, "set_owner", root);
+ undo_redo->add_undo_method(root, "set_scene_file_path", root->get_scene_file_path());
+ undo_redo->add_undo_method(node, "set_scene_file_path", String());
+ undo_redo->add_undo_method(node, "remove_child", root);
+ undo_redo->add_undo_method(EditorNode::get_singleton(), "set_edited_scene", root);
+ undo_redo->add_undo_method(node->get_parent(), "add_child", node, true);
+ undo_redo->add_undo_method(node->get_parent(), "move_child", node, node->get_index());
+ undo_redo->add_undo_method(root, "set_owner", (Object *)nullptr);
+ undo_redo->add_undo_method(node, "set_owner", root);
_node_replace_owner(root, root, root, MODE_UNDO);
- editor_data->get_undo_redo()->add_do_method(scene_tree, "update_tree");
- editor_data->get_undo_redo()->add_undo_method(scene_tree, "update_tree");
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->add_do_method(scene_tree, "update_tree");
+ undo_redo->add_undo_method(scene_tree, "update_tree");
+ undo_redo->commit_action();
} break;
case TOOL_MULTI_EDIT: {
if (!profile_allow_editing) {
@@ -916,6 +930,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
String existing;
if (extensions.size()) {
String root_name(tocopy->get_name());
+ root_name = EditorNode::adjust_scene_name_casing(root_name);
existing = root_name + "." + extensions.front()->get().to_lower();
}
new_scene_from_dialog->set_current_path(existing);
@@ -943,7 +958,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
} break;
case TOOL_AUTO_EXPAND: {
- scene_tree->set_auto_expand_selected(!EditorSettings::get_singleton()->get("docks/scene_tree/auto_expand_to_selected"), true);
+ scene_tree->set_auto_expand_selected(!EDITOR_GET("docks/scene_tree/auto_expand_to_selected"), true);
} break;
case TOOL_SCENE_EDITABLE_CHILDREN: {
if (!profile_allow_editing) {
@@ -1008,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 = editor_data->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (!root) {
break;
}
@@ -1073,10 +1088,18 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (first_selected == nullptr) {
return;
}
+ if (first_selected->get() == EditorNode::get_singleton()->get_edited_scene()) {
+ // Exclude Root Node. It should never be unique name in its own scene!
+ editor_selection->remove_node(first_selected->get());
+ first_selected = editor_selection->get_selected_node_list().front();
+ if (first_selected == nullptr) {
+ return;
+ }
+ }
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 = editor_data->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (enabling) {
Vector<Node *> new_unique_nodes;
@@ -1135,11 +1158,13 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (TOOL_CREATE_FAVORITE == p_tool) {
String name = selected_favorite_root.get_slicec(' ', 0);
if (ScriptServer::is_global_class(name)) {
- new_node = Object::cast_to<Node>(ClassDB::instantiate(ScriptServer::get_global_class_native_base(name)));
- Ref<Script> script = ResourceLoader::load(ScriptServer::get_global_class_path(name), "Script");
- if (new_node && script.is_valid()) {
- new_node->set_script(script);
- new_node->set_name(name);
+ Ref<Script> scr = ResourceLoader::load(ScriptServer::get_global_class_path(name), "Script");
+ if (scr.is_valid()) {
+ new_node = Object::cast_to<Node>(ClassDB::instantiate(scr->get_instance_base_type()));
+ if (new_node) {
+ new_node->set_script(scr);
+ new_node->set_name(name);
+ }
}
} else {
new_node = Object::cast_to<Node>(ClassDB::instantiate(selected_favorite_root));
@@ -1159,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;
@@ -1176,6 +1203,8 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
default: {
+ _filter_option_selected(p_tool);
+
if (p_tool >= EDIT_SUBRESOURCE_BASE) {
int idx = p_tool - EDIT_SUBRESOURCE_BASE;
@@ -1197,30 +1226,21 @@ void SceneTreeDock::_property_selected(int p_idx) {
}
void SceneTreeDock::_perform_property_drop(Node *p_node, String p_property, Ref<Resource> p_res) {
- editor_data->get_undo_redo()->create_action(vformat(TTR("Set %s"), p_property));
- editor_data->get_undo_redo()->add_do_property(p_node, p_property, p_res);
- editor_data->get_undo_redo()->add_undo_property(p_node, p_property, p_node->get(p_property));
- editor_data->get_undo_redo()->commit_action();
+ 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));
+ undo_redo->commit_action();
}
void SceneTreeDock::add_root_node(Node *p_node) {
- editor_data->get_undo_redo()->create_action_for_history(TTR("New Scene Root"), editor_data->get_current_edited_scene_history_id());
- editor_data->get_undo_redo()->add_do_method(EditorNode::get_singleton(), "set_edited_scene", p_node);
- editor_data->get_undo_redo()->add_do_method(scene_tree, "update_tree");
- editor_data->get_undo_redo()->add_do_reference(p_node);
- editor_data->get_undo_redo()->add_undo_method(EditorNode::get_singleton(), "set_edited_scene", (Object *)nullptr);
- editor_data->get_undo_redo()->commit_action();
-}
-
-void SceneTreeDock::_node_collapsed(Object *p_obj) {
- TreeItem *ti = Object::cast_to<TreeItem>(p_obj);
- if (!ti) {
- return;
- }
-
- if (Input::get_singleton()->is_key_pressed(Key::SHIFT)) {
- _set_collapsed_recursive(ti, ti->is_collapsed());
- }
+ 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");
+ undo_redo->add_do_reference(p_node);
+ undo_redo->add_undo_method(EditorNode::get_singleton(), "set_edited_scene", (Object *)nullptr);
+ undo_redo->commit_action();
}
void SceneTreeDock::_notification(int p_what) {
@@ -1235,14 +1255,14 @@ void SceneTreeDock::_notification(int p_what) {
CanvasItemEditorPlugin *canvas_item_plugin = Object::cast_to<CanvasItemEditorPlugin>(editor_data->get_editor("2D"));
if (canvas_item_plugin) {
- canvas_item_plugin->get_canvas_item_editor()->connect("item_lock_status_changed", Callable(scene_tree, "_update_tree"));
- canvas_item_plugin->get_canvas_item_editor()->connect("item_group_status_changed", Callable(scene_tree, "_update_tree"));
+ canvas_item_plugin->get_canvas_item_editor()->connect("item_lock_status_changed", callable_mp(scene_tree, &SceneTreeEditor::_update_tree).bind(false));
+ canvas_item_plugin->get_canvas_item_editor()->connect("item_group_status_changed", callable_mp(scene_tree, &SceneTreeEditor::_update_tree).bind(false));
scene_tree->connect("node_changed", callable_mp((CanvasItem *)canvas_item_plugin->get_canvas_item_editor()->get_viewport_control(), &CanvasItem::queue_redraw));
}
Node3DEditorPlugin *spatial_editor_plugin = Object::cast_to<Node3DEditorPlugin>(editor_data->get_editor("3D"));
- spatial_editor_plugin->get_spatial_editor()->connect("item_lock_status_changed", Callable(scene_tree, "_update_tree"));
- spatial_editor_plugin->get_spatial_editor()->connect("item_group_status_changed", Callable(scene_tree, "_update_tree"));
+ spatial_editor_plugin->get_spatial_editor()->connect("item_lock_status_changed", callable_mp(scene_tree, &SceneTreeEditor::_update_tree).bind(false));
+ spatial_editor_plugin->get_spatial_editor()->connect("item_group_status_changed", callable_mp(scene_tree, &SceneTreeEditor::_update_tree).bind(false));
button_add->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
button_instance->set_icon(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
@@ -1323,7 +1343,7 @@ void SceneTreeDock::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
clear_inherit_confirm->connect("confirmed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_SCENE_CLEAR_INHERITANCE_CONFIRM, false));
- scene_tree->set_auto_expand_selected(EditorSettings::get_singleton()->get("docks/scene_tree/auto_expand_to_selected"), false);
+ scene_tree->set_auto_expand_selected(EDITOR_GET("docks/scene_tree/auto_expand_to_selected"), false);
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -1331,7 +1351,7 @@ void SceneTreeDock::_notification(int p_what) {
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- scene_tree->set_auto_expand_selected(EditorSettings::get_singleton()->get("docks/scene_tree/auto_expand_to_selected"), false);
+ scene_tree->set_auto_expand_selected(EDITOR_GET("docks/scene_tree/auto_expand_to_selected"), false);
button_add->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
button_instance->set_icon(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
button_create_script->set_icon(get_theme_icon(SNAME("ScriptCreate"), SNAME("EditorIcons")));
@@ -1365,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 = editor_data->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;
@@ -1399,6 +1419,7 @@ void SceneTreeDock::_node_replace_owner(Node *p_base, Node *p_node, Node *p_root
void SceneTreeDock::_load_request(const String &p_path) {
EditorNode::get_singleton()->open_request(p_path);
+ _local_tree_selected();
}
void SceneTreeDock::_script_open_request(const Ref<Script> &p_script) {
@@ -1598,8 +1619,9 @@ 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)) {
- editor_data->get_undo_redo()->add_do_property(p_base, propertyname, updated_variant);
- editor_data->get_undo_redo()->add_undo_property(p_base, propertyname, old_variant);
+ 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);
}
}
@@ -1644,6 +1666,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath>
}
HashMap<Node *, NodePath>::Iterator found_path = p_renames->find(n);
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
if (found_path) {
if (found_path->value == NodePath()) {
//will be erased
@@ -1657,12 +1680,12 @@ void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath>
ERR_FAIL_COND(!EI); //another bug
}
- editor_data->get_undo_redo()->add_do_method(anim.ptr(), "remove_track", idx);
- editor_data->get_undo_redo()->add_undo_method(anim.ptr(), "add_track", anim->track_get_type(i), idx);
- editor_data->get_undo_redo()->add_undo_method(anim.ptr(), "track_set_path", idx, track_np);
- editor_data->get_undo_redo()->add_undo_method(anim.ptr(), "track_set_interpolation_type", idx, anim->track_get_interpolation_type(i));
+ undo_redo->add_do_method(anim.ptr(), "remove_track", idx);
+ undo_redo->add_undo_method(anim.ptr(), "add_track", anim->track_get_type(i), idx);
+ undo_redo->add_undo_method(anim.ptr(), "track_set_path", idx, track_np);
+ undo_redo->add_undo_method(anim.ptr(), "track_set_interpolation_type", idx, anim->track_get_interpolation_type(i));
for (int j = 0; j < anim->track_get_key_count(i); j++) {
- editor_data->get_undo_redo()->add_undo_method(anim.ptr(), "track_insert_key", idx, anim->track_get_key_time(i, j), anim->track_get_key_value(i, j), anim->track_get_key_transition(i, j));
+ undo_redo->add_undo_method(anim.ptr(), "track_insert_key", idx, anim->track_get_key_time(i, j), anim->track_get_key_value(i, j), anim->track_get_key_transition(i, j));
}
ran.erase(i); //byebye channel
@@ -1675,8 +1698,8 @@ void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath>
if (new_path == track_np) {
continue; //bleh
}
- editor_data->get_undo_redo()->add_do_method(anim.ptr(), "track_set_path", i, new_path);
- editor_data->get_undo_redo()->add_undo_method(anim.ptr(), "track_set_path", i, track_np);
+ undo_redo->add_do_method(anim.ptr(), "track_set_path", i, new_path);
+ undo_redo->add_undo_method(anim.ptr(), "track_set_path", i, track_np);
}
}
}
@@ -1810,7 +1833,8 @@ 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>();
- editor_data->get_undo_redo()->create_action(TTR("Reparent Node"));
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
+ undo_redo->create_action(TTR("Reparent Node"), UndoRedo::MERGE_DISABLE, p_nodes[0]);
HashMap<Node *, NodePath> path_renames;
Vector<StringName> former_names;
@@ -1831,15 +1855,18 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
owners.push_back(E);
}
- if (new_parent == node->get_parent() && node->get_index() < p_position_in_parent + ni) {
+ bool same_parent = new_parent == node->get_parent();
+ if (same_parent && node->get_index() < p_position_in_parent + ni) {
inc--; // If the child will generate a gap when moved, adjust.
}
- editor_data->get_undo_redo()->add_do_method(node->get_parent(), "remove_child", node);
- editor_data->get_undo_redo()->add_do_method(new_parent, "add_child", node, true);
+ if (!same_parent) {
+ undo_redo->add_do_method(node->get_parent(), "remove_child", node);
+ undo_redo->add_do_method(new_parent, "add_child", node, true);
+ }
- if (p_position_in_parent >= 0) {
- editor_data->get_undo_redo()->add_do_method(new_parent, "move_child", node, p_position_in_parent + inc);
+ if (p_position_in_parent >= 0 || same_parent) {
+ undo_redo->add_do_method(new_parent, "move_child", node, p_position_in_parent + inc);
}
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
@@ -1869,29 +1896,29 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
}
}
- editor_data->get_undo_redo()->add_do_method(ed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc);
- editor_data->get_undo_redo()->add_undo_method(ed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).path_join(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index());
+ undo_redo->add_do_method(ed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc);
+ undo_redo->add_undo_method(ed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).path_join(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index());
if (p_keep_global_xform) {
if (Object::cast_to<Node2D>(node)) {
- editor_data->get_undo_redo()->add_do_method(node, "set_global_transform", Object::cast_to<Node2D>(node)->get_global_transform());
+ undo_redo->add_do_method(node, "set_global_transform", Object::cast_to<Node2D>(node)->get_global_transform());
}
if (Object::cast_to<Node3D>(node)) {
- editor_data->get_undo_redo()->add_do_method(node, "set_global_transform", Object::cast_to<Node3D>(node)->get_global_transform());
+ undo_redo->add_do_method(node, "set_global_transform", Object::cast_to<Node3D>(node)->get_global_transform());
}
if (Object::cast_to<Control>(node)) {
- editor_data->get_undo_redo()->add_do_method(node, "set_global_position", Object::cast_to<Control>(node)->get_global_position());
+ undo_redo->add_do_method(node, "set_global_position", Object::cast_to<Control>(node)->get_global_position());
}
}
- editor_data->get_undo_redo()->add_do_method(this, "_set_owners", edited_scene, owners);
+ undo_redo->add_do_method(this, "_set_owners", edited_scene, owners);
if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == node) {
- editor_data->get_undo_redo()->add_do_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", node);
+ undo_redo->add_do_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", node);
}
- editor_data->get_undo_redo()->add_undo_method(new_parent, "remove_child", node);
- editor_data->get_undo_redo()->add_undo_method(node, "set_name", former_names[ni]);
+ undo_redo->add_undo_method(new_parent, "remove_child", node);
+ undo_redo->add_undo_method(node, "set_name", former_names[ni]);
inc++;
}
@@ -1909,71 +1936,29 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
int child_pos = node->get_index();
- editor_data->get_undo_redo()->add_undo_method(node->get_parent(), "add_child", node, true);
- editor_data->get_undo_redo()->add_undo_method(node->get_parent(), "move_child", node, child_pos);
- editor_data->get_undo_redo()->add_undo_method(this, "_set_owners", edited_scene, owners);
+ undo_redo->add_undo_method(node->get_parent(), "add_child", node, true);
+ undo_redo->add_undo_method(node->get_parent(), "move_child", node, child_pos);
+ undo_redo->add_undo_method(this, "_set_owners", edited_scene, owners);
if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == node) {
- editor_data->get_undo_redo()->add_undo_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", node);
+ undo_redo->add_undo_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", node);
}
if (p_keep_global_xform) {
if (Object::cast_to<Node2D>(node)) {
- editor_data->get_undo_redo()->add_undo_method(node, "set_transform", Object::cast_to<Node2D>(node)->get_transform());
+ undo_redo->add_undo_method(node, "set_transform", Object::cast_to<Node2D>(node)->get_transform());
}
if (Object::cast_to<Node3D>(node)) {
- editor_data->get_undo_redo()->add_undo_method(node, "set_transform", Object::cast_to<Node3D>(node)->get_transform());
+ undo_redo->add_undo_method(node, "set_transform", Object::cast_to<Node3D>(node)->get_transform());
}
if (Object::cast_to<Control>(node)) {
- editor_data->get_undo_redo()->add_undo_method(node, "set_position", Object::cast_to<Control>(node)->get_position());
+ undo_redo->add_undo_method(node, "set_position", Object::cast_to<Control>(node)->get_position());
}
}
}
perform_node_renames(nullptr, &path_renames);
- editor_data->get_undo_redo()->commit_action();
-}
-
-bool SceneTreeDock::_is_collapsed_recursive(TreeItem *p_item) const {
- bool is_branch_collapsed = false;
-
- List<TreeItem *> needs_check;
- needs_check.push_back(p_item);
-
- while (!needs_check.is_empty()) {
- TreeItem *item = needs_check.back()->get();
- needs_check.pop_back();
-
- TreeItem *child = item->get_first_child();
- is_branch_collapsed = item->is_collapsed() && child;
-
- if (is_branch_collapsed) {
- break;
- }
- while (child) {
- needs_check.push_back(child);
- child = child->get_next();
- }
- }
- return is_branch_collapsed;
-}
-
-void SceneTreeDock::_set_collapsed_recursive(TreeItem *p_item, bool p_collapsed) {
- List<TreeItem *> to_collapse;
- to_collapse.push_back(p_item);
-
- while (!to_collapse.is_empty()) {
- TreeItem *item = to_collapse.back()->get();
- to_collapse.pop_back();
-
- item->set_collapsed(p_collapsed);
-
- TreeItem *child = item->get_first_child();
- while (child) {
- to_collapse.push_back(child);
- child = child->get_next();
- }
- }
+ undo_redo->commit_action();
}
void SceneTreeDock::_script_created(Ref<Script> p_script) {
@@ -1983,37 +1968,22 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
return;
}
- if (selected.size() == 1) {
- Node *node = selected.front()->get();
- Ref<Script> existing = node->get_script();
-
- editor_data->get_undo_redo()->create_action(TTR("Attach Script"), UndoRedo::MERGE_DISABLE, node);
- editor_data->get_undo_redo()->add_do_method(InspectorDock::get_singleton(), "store_script_properties", node);
- editor_data->get_undo_redo()->add_undo_method(InspectorDock::get_singleton(), "store_script_properties", node);
- editor_data->get_undo_redo()->add_do_method(node, "set_script", p_script);
- editor_data->get_undo_redo()->add_undo_method(node, "set_script", existing);
- editor_data->get_undo_redo()->add_do_method(InspectorDock::get_singleton(), "apply_script_properties", node);
- editor_data->get_undo_redo()->add_undo_method(InspectorDock::get_singleton(), "apply_script_properties", node);
- editor_data->get_undo_redo()->add_do_method(this, "_update_script_button");
- editor_data->get_undo_redo()->add_undo_method(this, "_update_script_button");
- editor_data->get_undo_redo()->commit_action();
- } else {
- editor_data->get_undo_redo()->create_action(TTR("Attach Script"), UndoRedo::MERGE_DISABLE, selected.front()->get());
- for (Node *E : selected) {
- Ref<Script> existing = E->get_script();
- editor_data->get_undo_redo()->add_do_method(InspectorDock::get_singleton(), "store_script_properties", E);
- editor_data->get_undo_redo()->add_undo_method(InspectorDock::get_singleton(), "store_script_properties", E);
- editor_data->get_undo_redo()->add_do_method(E, "set_script", p_script);
- editor_data->get_undo_redo()->add_undo_method(E, "set_script", existing);
- editor_data->get_undo_redo()->add_do_method(InspectorDock::get_singleton(), "apply_script_properties", E);
- editor_data->get_undo_redo()->add_undo_method(InspectorDock::get_singleton(), "apply_script_properties", E);
- editor_data->get_undo_redo()->add_do_method(this, "_update_script_button");
- editor_data->get_undo_redo()->add_undo_method(this, "_update_script_button");
- }
- editor_data->get_undo_redo()->commit_action();
- }
-
- _push_item(p_script.operator->());
+ 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();
+ undo_redo->add_do_method(InspectorDock::get_singleton(), "store_script_properties", E);
+ undo_redo->add_undo_method(InspectorDock::get_singleton(), "store_script_properties", E);
+ undo_redo->add_do_method(E, "set_script", p_script);
+ undo_redo->add_undo_method(E, "set_script", existing);
+ undo_redo->add_do_method(InspectorDock::get_singleton(), "apply_script_properties", E);
+ undo_redo->add_undo_method(InspectorDock::get_singleton(), "apply_script_properties", E);
+ undo_redo->add_do_method(this, "_update_script_button");
+ undo_redo->add_undo_method(this, "_update_script_button");
+ }
+ undo_redo->commit_action();
+
+ _push_item(p_script.ptr());
_update_script_button();
}
@@ -2024,10 +1994,11 @@ void SceneTreeDock::_shader_created(Ref<Shader> p_shader) {
Ref<Shader> existing = selected_shader_material->get_shader();
- editor_data->get_undo_redo()->create_action(TTR("Set Shader"));
- editor_data->get_undo_redo()->add_do_method(selected_shader_material.ptr(), "set_shader", p_shader);
- editor_data->get_undo_redo()->add_undo_method(selected_shader_material.ptr(), "set_shader", existing);
- editor_data->get_undo_redo()->commit_action();
+ 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);
+ undo_redo->commit_action();
}
void SceneTreeDock::_script_creation_closed() {
@@ -2092,11 +2063,8 @@ void SceneTreeDock::_delete_confirm(bool p_cut) {
EditorNode::get_singleton()->get_editor_plugins_over()->make_visible(false);
- if (p_cut) {
- editor_data->get_undo_redo()->create_action(TTR("Cut Node(s)"), UndoRedo::MERGE_DISABLE, remove_list.front()->get());
- } else {
- editor_data->get_undo_redo()->create_action(TTR("Remove Node(s)"), UndoRedo::MERGE_DISABLE, remove_list.front()->get());
- }
+ 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;
@@ -2108,11 +2076,11 @@ void SceneTreeDock::_delete_confirm(bool p_cut) {
}
if (entire_scene) {
- editor_data->get_undo_redo()->add_do_method(EditorNode::get_singleton(), "set_edited_scene", (Object *)nullptr);
- editor_data->get_undo_redo()->add_undo_method(EditorNode::get_singleton(), "set_edited_scene", edited_scene);
- editor_data->get_undo_redo()->add_undo_method(edited_scene, "set_owner", edited_scene->get_owner());
- editor_data->get_undo_redo()->add_undo_method(scene_tree, "update_tree");
- editor_data->get_undo_redo()->add_undo_reference(edited_scene);
+ undo_redo->add_do_method(EditorNode::get_singleton(), "set_edited_scene", (Object *)nullptr);
+ undo_redo->add_undo_method(EditorNode::get_singleton(), "set_edited_scene", edited_scene);
+ undo_redo->add_undo_method(edited_scene, "set_owner", edited_scene->get_owner());
+ undo_redo->add_undo_method(scene_tree, "update_tree");
+ undo_redo->add_undo_reference(edited_scene);
} else {
remove_list.sort_custom<Node::Comparator>(); //sort nodes to keep positions
@@ -2141,21 +2109,21 @@ void SceneTreeDock::_delete_confirm(bool p_cut) {
owners.push_back(F);
}
- editor_data->get_undo_redo()->add_do_method(n->get_parent(), "remove_child", n);
- editor_data->get_undo_redo()->add_undo_method(n->get_parent(), "add_child", n, true);
- editor_data->get_undo_redo()->add_undo_method(n->get_parent(), "move_child", n, n->get_index());
+ undo_redo->add_do_method(n->get_parent(), "remove_child", n);
+ undo_redo->add_undo_method(n->get_parent(), "add_child", n, true);
+ undo_redo->add_undo_method(n->get_parent(), "move_child", n, n->get_index());
if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == n) {
- editor_data->get_undo_redo()->add_undo_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", n);
+ undo_redo->add_undo_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", n);
}
- editor_data->get_undo_redo()->add_undo_method(this, "_set_owners", edited_scene, owners);
- editor_data->get_undo_redo()->add_undo_reference(n);
+ undo_redo->add_undo_method(this, "_set_owners", edited_scene, owners);
+ undo_redo->add_undo_reference(n);
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
- editor_data->get_undo_redo()->add_do_method(ed, "live_debug_remove_and_keep_node", edited_scene->get_path_to(n), n->get_instance_id());
- editor_data->get_undo_redo()->add_undo_method(ed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index());
+ undo_redo->add_do_method(ed, "live_debug_remove_and_keep_node", edited_scene->get_path_to(n), n->get_instance_id());
+ undo_redo->add_undo_method(ed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index());
}
}
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->commit_action();
// hack, force 2d editor viewport to refresh after deletion
if (CanvasItemEditor *editor = CanvasItemEditor::get_singleton()) {
@@ -2215,35 +2183,39 @@ void SceneTreeDock::_selection_changed() {
}
void SceneTreeDock::_do_create(Node *p_parent) {
- Variant c = create_dialog->instance_selected();
-
- ERR_FAIL_COND(!c);
+ Variant c = create_dialog->instantiate_selected();
Node *child = Object::cast_to<Node>(c);
ERR_FAIL_COND(!child);
- editor_data->get_undo_redo()->create_action_for_history(TTR("Create Node"), editor_data->get_current_edited_scene_history_id());
+ String new_name = p_parent->validate_child_name(child);
+ if (GLOBAL_GET("editor/node_naming/name_casing").operator int() != NAME_CASING_PASCAL_CASE) {
+ new_name = adjust_name_casing(new_name);
+ }
+ child->set_name(new_name);
+
+ 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) {
- editor_data->get_undo_redo()->add_do_method(p_parent, "add_child", child, true);
- editor_data->get_undo_redo()->add_do_method(child, "set_owner", edited_scene);
- editor_data->get_undo_redo()->add_do_method(editor_selection, "clear");
- editor_data->get_undo_redo()->add_do_method(editor_selection, "add_node", child);
- editor_data->get_undo_redo()->add_do_reference(child);
- editor_data->get_undo_redo()->add_undo_method(p_parent, "remove_child", child);
-
- String new_name = p_parent->validate_child_name(child);
+ undo_redo->add_do_method(p_parent, "add_child", child, true);
+ undo_redo->add_do_method(child, "set_owner", edited_scene);
+ undo_redo->add_do_method(editor_selection, "clear");
+ undo_redo->add_do_method(editor_selection, "add_node", child);
+ undo_redo->add_do_reference(child);
+ undo_redo->add_undo_method(p_parent, "remove_child", child);
+
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
- editor_data->get_undo_redo()->add_do_method(ed, "live_debug_create_node", edited_scene->get_path_to(p_parent), child->get_class(), new_name);
- editor_data->get_undo_redo()->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(p_parent)).path_join(new_name)));
+ undo_redo->add_do_method(ed, "live_debug_create_node", edited_scene->get_path_to(p_parent), child->get_class(), new_name);
+ undo_redo->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(p_parent)).path_join(new_name)));
} else {
- editor_data->get_undo_redo()->add_do_method(EditorNode::get_singleton(), "set_edited_scene", child);
- editor_data->get_undo_redo()->add_do_method(scene_tree, "update_tree");
- editor_data->get_undo_redo()->add_do_reference(child);
- editor_data->get_undo_redo()->add_undo_method(EditorNode::get_singleton(), "set_edited_scene", (Object *)nullptr);
+ undo_redo->add_do_method(EditorNode::get_singleton(), "set_edited_scene", child);
+ undo_redo->add_do_method(scene_tree, "update_tree");
+ undo_redo->add_do_reference(child);
+ undo_redo->add_undo_method(EditorNode::get_singleton(), "set_edited_scene", (Object *)nullptr);
}
- editor_data->get_undo_redo()->commit_action();
+ undo_redo->commit_action();
_push_item(c);
editor_selection->clear();
editor_selection->add_node(child);
@@ -2290,13 +2262,13 @@ 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) {
ERR_FAIL_COND(!n);
- Variant c = create_dialog->instance_selected();
+ Variant c = create_dialog->instantiate_selected();
ERR_FAIL_COND(!c);
Node *newnode = Object::cast_to<Node>(c);
@@ -2424,7 +2396,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) {
- editor_data->get_undo_redo()->clear_history();
+ EditorUndoRedoManager::get_singleton()->clear_history();
}
newnode->set_name(newname);
@@ -2469,9 +2441,12 @@ void SceneTreeDock::_new_scene_from(String p_file) {
Node *copy = base->duplicate_from_editor(duplimap);
if (copy) {
+ // Handle Unique Nodes.
for (int i = 0; i < copy->get_child_count(false); i++) {
_set_node_owner_recursive(copy->get_child(i, false), copy);
}
+ // Root node cannot ever be unique name in its own Scene!
+ copy->set_unique_name_in_owner(false);
Ref<PackedScene> sdata = memnew(PackedScene);
Error err = sdata->pack(copy);
@@ -2484,7 +2459,7 @@ void SceneTreeDock::_new_scene_from(String p_file) {
}
int flg = 0;
- if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) {
+ if (EDITOR_GET("filesystem/on_save/compress_binary_resources")) {
flg |= ResourceSaver::FLAG_COMPRESS;
}
@@ -2637,17 +2612,50 @@ void SceneTreeDock::_files_dropped(Vector<String> p_files, NodePath p_to, int p_
void SceneTreeDock::_script_dropped(String p_file, NodePath p_to) {
Ref<Script> scr = ResourceLoader::load(p_file);
ERR_FAIL_COND(!scr.is_valid());
- if (Node *n = get_node(p_to)) {
- editor_data->get_undo_redo()->create_action(TTR("Attach Script"), UndoRedo::MERGE_DISABLE, n);
- editor_data->get_undo_redo()->add_do_method(InspectorDock::get_singleton(), "store_script_properties", n);
- editor_data->get_undo_redo()->add_undo_method(InspectorDock::get_singleton(), "store_script_properties", n);
- editor_data->get_undo_redo()->add_do_method(n, "set_script", scr);
- editor_data->get_undo_redo()->add_undo_method(n, "set_script", n->get_script());
- editor_data->get_undo_redo()->add_do_method(InspectorDock::get_singleton(), "apply_script_properties", n);
- editor_data->get_undo_redo()->add_undo_method(InspectorDock::get_singleton(), "apply_script_properties", n);
- editor_data->get_undo_redo()->add_do_method(this, "_update_script_button");
- editor_data->get_undo_redo()->add_undo_method(this, "_update_script_button");
- editor_data->get_undo_redo()->commit_action();
+ Node *n = get_node(p_to);
+
+ if (!n) {
+ return;
+ }
+
+ 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);
+
+ Node *new_node = Object::cast_to<Node>(obj);
+ if (!new_node) {
+ if (!obj->is_ref_counted()) {
+ memdelete(obj);
+ }
+ ERR_FAIL_MSG("Script does not extend Node-derived type.");
+ }
+ new_node->set_name(Node::adjust_name_casing(p_file.get_file().get_basename()));
+ new_node->set_script(scr);
+
+ undo_redo->create_action(TTR("Instantiate Script"));
+ undo_redo->add_do_method(n, "add_child", new_node, true);
+ undo_redo->add_do_method(new_node, "set_owner", edited_scene);
+ undo_redo->add_do_method(editor_selection, "clear");
+ undo_redo->add_do_method(editor_selection, "add_node", new_node);
+ undo_redo->add_do_reference(new_node);
+ undo_redo->add_undo_method(n, "remove_child", new_node);
+
+ EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
+ undo_redo->add_do_method(ed, "live_debug_create_node", edited_scene->get_path_to(n), new_node->get_class(), new_node->get_name());
+ undo_redo->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(n)).path_join(new_node->get_name())));
+ undo_redo->commit_action();
+ } else {
+ undo_redo->create_action(TTR("Attach Script"), UndoRedo::MERGE_DISABLE, n);
+ undo_redo->add_do_method(InspectorDock::get_singleton(), "store_script_properties", n);
+ undo_redo->add_undo_method(InspectorDock::get_singleton(), "store_script_properties", n);
+ undo_redo->add_do_method(n, "set_script", scr);
+ undo_redo->add_undo_method(n, "set_script", n->get_script());
+ undo_redo->add_do_method(InspectorDock::get_singleton(), "apply_script_properties", n);
+ undo_redo->add_undo_method(InspectorDock::get_singleton(), "apply_script_properties", n);
+ undo_redo->add_do_method(this, "_update_script_button");
+ undo_redo->add_undo_method(this, "_update_script_button");
+ undo_redo->commit_action();
}
}
@@ -2721,7 +2729,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->clear();
if (profile_allow_editing) {
menu->add_icon_shortcut(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/add_child_node"), TOOL_NEW);
- menu->add_icon_shortcut(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/instance_scene"), TOOL_INSTANTIATE);
+ menu->add_icon_shortcut(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/instantiate_scene"), TOOL_INSTANTIATE);
}
menu->reset_size();
@@ -2754,7 +2762,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
menu->add_icon_shortcut(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/add_child_node"), TOOL_NEW);
- menu->add_icon_shortcut(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/instance_scene"), TOOL_INSTANTIATE);
+ menu->add_icon_shortcut(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/instantiate_scene"), TOOL_INSTANTIATE);
}
menu->add_icon_shortcut(get_theme_icon(SNAME("Collapse"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/expand_collapse_all"), TOOL_EXPAND_COLLAPSE);
menu->add_separator();
@@ -2865,10 +2873,13 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
}
if (all_owned) {
- menu->add_separator();
- menu->add_icon_check_item(get_theme_icon(SNAME("SceneUniqueName"), SNAME("EditorIcons")), TTR("Access as Scene Unique Name"), TOOL_TOGGLE_SCENE_UNIQUE_NAME);
- // Checked based on `selection[0]` because `full_selection` has undesired ordering.
- menu->set_item_checked(menu->get_item_index(TOOL_TOGGLE_SCENE_UNIQUE_NAME), selection[0]->is_unique_name_in_owner());
+ // Group "toggle_unique_name" with "copy_node_path", if it is available.
+ if (menu->get_item_index(TOOL_COPY_NODE_PATH) == -1) {
+ menu->add_separator();
+ }
+ Node *node = full_selection[0];
+ menu->add_icon_shortcut(get_theme_icon(SNAME("SceneUniqueName"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/toggle_unique_name"), TOOL_TOGGLE_SCENE_UNIQUE_NAME);
+ menu->set_item_text(menu->get_item_index(TOOL_TOGGLE_SCENE_UNIQUE_NAME), node->is_unique_name_in_owner() ? TTR("Revoke Unique Name") : TTR("Access as Unique Name"));
}
}
@@ -2922,11 +2933,83 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
void SceneTreeDock::_update_tree_menu() {
PopupMenu *tree_menu = button_tree_menu->get_popup();
- tree_menu->set_item_checked(tree_menu->get_item_idx_from_text(TTR("Auto Expand to Selected")), EditorSettings::get_singleton()->get("docks/scene_tree/auto_expand_to_selected"));
+ tree_menu->clear();
+
+ _append_filter_options_to(tree_menu);
+
+ tree_menu->add_separator();
+ tree_menu->add_check_item(TTR("Auto Expand to Selected"), TOOL_AUTO_EXPAND);
+ tree_menu->set_item_checked(tree_menu->get_item_index(TOOL_AUTO_EXPAND), EDITOR_GET("docks/scene_tree/auto_expand_to_selected"));
+}
+
+void SceneTreeDock::_update_filter_menu() {
+ _append_filter_options_to(filter->get_menu());
}
void SceneTreeDock::_filter_changed(const String &p_filter) {
scene_tree->set_filter(p_filter);
+
+ String warning = scene_tree->get_filter_term_warning();
+ if (!warning.is_empty()) {
+ filter->add_theme_icon_override(SNAME("clear"), get_theme_icon(SNAME("NodeWarning"), SNAME("EditorIcons")));
+ filter->set_tooltip_text(warning);
+ } else {
+ filter->remove_theme_icon_override(SNAME("clear"));
+ filter->set_tooltip_text("");
+ }
+}
+
+void SceneTreeDock::_filter_gui_input(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_null()) {
+ return;
+ }
+
+ if (mb->is_pressed() && mb->get_button_index() == MouseButton::MIDDLE) {
+ filter_quick_menu->clear();
+
+ _append_filter_options_to(filter_quick_menu, false);
+ filter_quick_menu->set_position(get_screen_position() + get_local_mouse_position());
+ filter_quick_menu->reset_size();
+ filter_quick_menu->popup();
+ filter_quick_menu->grab_focus();
+ accept_event();
+ }
+}
+
+void SceneTreeDock::_filter_option_selected(int p_option) {
+ String filter_parameter;
+ switch (p_option) {
+ case FILTER_BY_TYPE: {
+ filter_parameter = "type";
+ } break;
+ case FILTER_BY_GROUP: {
+ filter_parameter = "group";
+ } break;
+ }
+
+ if (!filter_parameter.is_empty()) {
+ set_filter((get_filter() + " " + filter_parameter + ":").strip_edges());
+ filter->set_caret_column(filter->get_text().length());
+ filter->grab_focus();
+ }
+}
+
+void SceneTreeDock::_append_filter_options_to(PopupMenu *p_menu, bool p_include_separator) {
+ if (p_include_separator) {
+ p_menu->add_separator();
+
+ p_menu->set_item_text(-1, TTR("Filters"));
+ p_menu->set_item_icon(-1, get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
+ p_menu->set_item_indent(-1, -2);
+ }
+
+ p_menu->add_item(TTR("Filter by Type"), FILTER_BY_TYPE);
+ p_menu->add_item(TTR("Filter by Group"), FILTER_BY_GROUP);
+ p_menu->set_item_icon(p_menu->get_item_index(FILTER_BY_TYPE), get_theme_icon(SNAME("Node"), SNAME("EditorIcons")));
+ p_menu->set_item_icon(p_menu->get_item_index(FILTER_BY_GROUP), get_theme_icon(SNAME("Groups"), SNAME("EditorIcons")));
+ p_menu->set_item_tooltip(p_menu->get_item_index(FILTER_BY_TYPE), TTR("Selects all Nodes of the given type."));
+ p_menu->set_item_tooltip(p_menu->get_item_index(FILTER_BY_GROUP), TTR("Selects all Nodes belonging to the given group.\nIf empty, selects any Node belonging to any group."));
}
String SceneTreeDock::get_filter() {
@@ -3107,7 +3190,7 @@ List<Node *> SceneTreeDock::paste_nodes() {
owner = paste_parent;
}
- Ref<EditorUndoRedoManager> &ur = editor_data->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");
@@ -3138,6 +3221,7 @@ List<Node *> SceneTreeDock::paste_nodes() {
if (!paste_parent) {
paste_parent = dup;
owner = dup;
+ dup->set_scene_file_path(String()); // Make sure the scene path is empty, to avoid accidental references.
ur->add_do_method(EditorNode::get_singleton(), "set_edited_scene", dup);
} else {
ur->add_do_method(paste_parent, "add_child", dup, true);
@@ -3180,6 +3264,7 @@ void SceneTreeDock::add_remote_tree_editor(Control *p_remote) {
add_child(p_remote);
remote_tree = p_remote;
remote_tree->hide();
+ remote_tree->connect("open", callable_mp(this, &SceneTreeDock::_load_request));
}
void SceneTreeDock::show_remote_tree() {
@@ -3226,7 +3311,7 @@ void SceneTreeDock::_update_create_root_dialog() {
EditorSettings::get_singleton()->save();
if (node_shortcuts_toggle->is_pressed()) {
for (int i = 0; i < favorite_node_shortcuts->get_child_count(); i++) {
- favorite_node_shortcuts->get_child(i)->queue_delete();
+ favorite_node_shortcuts->get_child(i)->queue_free();
}
Ref<FileAccess> f = FileAccess::open(EditorPaths::get_singleton()->get_project_settings_dir().path_join("favorites.Node"), FileAccess::READ);
@@ -3404,7 +3489,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
ED_SHORTCUT_OVERRIDE("scene_tree/batch_rename", "macos", KeyModifierMask::SHIFT | Key::ENTER);
ED_SHORTCUT("scene_tree/add_child_node", TTR("Add Child Node"), KeyModifierMask::CMD_OR_CTRL | Key::A);
- ED_SHORTCUT("scene_tree/instance_scene", TTR("Instantiate Child Scene"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::A);
+ ED_SHORTCUT("scene_tree/instantiate_scene", TTR("Instantiate Child Scene"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::A);
ED_SHORTCUT("scene_tree/expand_collapse_all", TTR("Expand/Collapse Branch"));
ED_SHORTCUT("scene_tree/cut_node", TTR("Cut"), KeyModifierMask::CMD_OR_CTRL | Key::X);
ED_SHORTCUT("scene_tree/copy_node", TTR("Copy"), KeyModifierMask::CMD_OR_CTRL | Key::C);
@@ -3421,6 +3506,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
ED_SHORTCUT("scene_tree/make_root", TTR("Make Scene Root"));
ED_SHORTCUT("scene_tree/save_branch_as_scene", TTR("Save Branch as Scene"));
ED_SHORTCUT("scene_tree/copy_node_path", TTR("Copy Node Path"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::C);
+ ED_SHORTCUT("scene_tree/toggle_unique_name", TTR("Toggle Access as Unique Name"));
ED_SHORTCUT("scene_tree/delete_no_confirm", TTR("Delete (No Confirm)"), KeyModifierMask::SHIFT | Key::KEY_DELETE);
ED_SHORTCUT("scene_tree/delete", TTR("Delete"), Key::KEY_DELETE);
@@ -3435,16 +3521,24 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
button_instance->set_flat(true);
button_instance->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_INSTANTIATE, false));
button_instance->set_tooltip_text(TTR("Instantiate a scene file as a Node. Creates an inherited scene if no root node exists."));
- button_instance->set_shortcut(ED_GET_SHORTCUT("scene_tree/instance_scene"));
+ button_instance->set_shortcut(ED_GET_SHORTCUT("scene_tree/instantiate_scene"));
filter_hbc->add_child(button_instance);
-
vbc->add_child(filter_hbc);
+
+ // The "Filter Nodes" text input above the Scene Tree Editor.
filter = memnew(LineEdit);
filter->set_h_size_flags(SIZE_EXPAND_FILL);
filter->set_placeholder(TTR("Filter Nodes"));
filter_hbc->add_child(filter);
filter->add_theme_constant_override("minimum_character_width", 0);
filter->connect("text_changed", callable_mp(this, &SceneTreeDock::_filter_changed));
+ filter->connect("gui_input", callable_mp(this, &SceneTreeDock::_filter_gui_input));
+ filter->get_menu()->connect("about_to_popup", callable_mp(this, &SceneTreeDock::_update_filter_menu));
+ filter->get_menu()->connect("id_pressed", callable_mp(this, &SceneTreeDock::_filter_option_selected));
+
+ filter_quick_menu = memnew(PopupMenu);
+ filter_quick_menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_filter_option_selected));
+ filter->add_child(filter_quick_menu);
button_create_script = memnew(Button);
button_create_script->set_flat(true);
@@ -3464,11 +3558,11 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
button_tree_menu = memnew(MenuButton);
button_tree_menu->set_flat(true);
+ button_tree_menu->set_tooltip_text(TTR("Extra scene options."));
button_tree_menu->connect("about_to_popup", callable_mp(this, &SceneTreeDock::_update_tree_menu));
filter_hbc->add_child(button_tree_menu);
PopupMenu *tree_menu = button_tree_menu->get_popup();
- tree_menu->add_check_item(TTR("Auto Expand to Selected"), TOOL_AUTO_EXPAND);
tree_menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
button_hb = memnew(HBoxContainer);
@@ -3517,11 +3611,10 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
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_collapsed", callable_mp(this, &SceneTreeDock::_node_collapsed));
editor_selection->connect("selection_changed", callable_mp(this, &SceneTreeDock::_selection_changed));
- scene_tree->set_undo_redo(editor_data->get_undo_redo());
+ scene_tree->set_as_scene_tree_dock();
scene_tree->set_editor_selection(editor_selection);
create_dialog = memnew(CreateDialog);
@@ -3531,7 +3624,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
create_dialog->connect("favorites_updated", callable_mp(this, &SceneTreeDock::_update_create_root_dialog));
#ifdef MODULE_REGEX_ENABLED
- rename_dialog = memnew(RenameDialog(scene_tree, editor_data->get_undo_redo()));
+ rename_dialog = memnew(RenameDialog(scene_tree));
add_child(rename_dialog);
#endif // MODULE_REGEX_ENABLED
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index dc228e1c93..961ae06da5 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -1,58 +1,54 @@
-/*************************************************************************/
-/* scene_tree_dock.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* scene_tree_dock.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 SCENE_TREE_DOCK_H
#define SCENE_TREE_DOCK_H
-#include "editor/create_dialog.h"
+#include "scene_tree_editor.h"
+
#include "editor/editor_data.h"
-#include "editor/editor_quick_open.h"
-#include "editor/groups_editor.h"
-#include "editor/reparent_dialog.h"
#include "editor/script_create_dialog.h"
-#include "scene/animation/animation_player.h"
#include "scene/gui/box_container.h"
-#include "scene/gui/button.h"
-#include "scene/gui/control.h"
-#include "scene/gui/label.h"
-#include "scene/gui/popup_menu.h"
-#include "scene/gui/tree.h"
-#include "scene_tree_editor.h"
+#include "scene/resources/animation.h"
+
+class EditorQuickOpen;
+class MenuButton;
+class ReparentDialog;
+class ShaderCreateDialog;
+class TextureRect;
#include "modules/modules_enabled.gen.h" // For regex.
#ifdef MODULE_REGEX_ENABLED
class RenameDialog;
#endif // MODULE_REGEX_ENABLED
-class ShaderCreateDialog;
-
class SceneTreeDock : public VBoxContainer {
GDCLASS(SceneTreeDock, VBoxContainer);
@@ -137,7 +133,6 @@ class SceneTreeDock : public VBoxContainer {
HBoxContainer *tool_hbc = nullptr;
void _tool_selected(int p_tool, bool p_confirm_override = false);
void _property_selected(int p_idx);
- void _node_collapsed(Object *p_obj);
Node *property_drop_node = nullptr;
String resource_drop_path;
@@ -161,7 +156,13 @@ class SceneTreeDock : public VBoxContainer {
EditorQuickOpen *quick_open = nullptr;
EditorFileDialog *new_scene_from_dialog = nullptr;
+ enum FilterMenuItems {
+ FILTER_BY_TYPE = 64, // Used in the same menus as the Tool enum.
+ FILTER_BY_GROUP,
+ };
+
LineEdit *filter = nullptr;
+ PopupMenu *filter_quick_menu = nullptr;
TextureRect *filter_icon = nullptr;
PopupMenu *menu = nullptr;
@@ -188,9 +189,6 @@ class SceneTreeDock : public VBoxContainer {
void _node_reparent(NodePath p_path, bool p_keep_global_xform);
void _do_reparent(Node *p_new_parent, int p_position_in_parent, Vector<Node *> p_nodes, bool p_keep_global_xform);
- bool _is_collapsed_recursive(TreeItem *p_item) const;
- void _set_collapsed_recursive(TreeItem *p_item, bool p_collapsed);
-
void _set_owners(Node *p_owner, const Array &p_nodes);
enum ReplaceOwnerMode {
@@ -228,8 +226,6 @@ class SceneTreeDock : public VBoxContainer {
virtual void input(const Ref<InputEvent> &p_event) override;
virtual void shortcut_input(const Ref<InputEvent> &p_event) override;
- void _import_subscene();
-
void _new_scene_from(String p_file);
void _set_node_owner_recursive(Node *p_node, Node *p_owner);
@@ -249,8 +245,12 @@ class SceneTreeDock : public VBoxContainer {
void _tree_rmb(const Vector2 &p_menu_pos);
void _update_tree_menu();
+ void _update_filter_menu();
void _filter_changed(const String &p_filter);
+ void _filter_gui_input(const Ref<InputEvent> &p_event);
+ void _filter_option_selected(int option);
+ void _append_filter_options_to(PopupMenu *p_menu, bool p_include_separator = true);
void _perform_instantiate_scenes(const Vector<String> &p_files, Node *parent, int p_pos);
void _replace_with_branch_scene(const String &p_file, Node *base);
@@ -292,7 +292,6 @@ public:
void _focus_node();
- void import_subscene();
void add_root_node(Node *p_node);
void set_edited_scene(Node *p_scene);
void instantiate(const String &p_file);
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 137574640e..e0d748c478 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -1,40 +1,41 @@
-/*************************************************************************/
-/* scene_tree_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* scene_tree_editor.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 "scene_tree_editor.h"
+#include "core/config/project_settings.h"
#include "core/object/message_queue.h"
-#include "core/string/print_string.h"
#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/node_dock.h"
#include "editor/plugins/animation_player_editor_plugin.h"
@@ -67,6 +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);
+ 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()) {
@@ -130,8 +132,16 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
if (config_err.is_empty()) {
return;
}
- config_err = config_err.word_wrap(80);
- warning->set_text(config_err);
+
+ const PackedInt32Array boundaries = TS->string_get_word_breaks(config_err, "", 80);
+ PackedStringArray lines;
+ for (int i = 0; i < boundaries.size(); i += 2) {
+ const int start = boundaries[i];
+ const int end = boundaries[i + 1];
+ lines.append(config_err.substr(start, end - start + 1));
+ }
+
+ warning->set_text(String("\n").join(lines));
warning->popup_centered();
} else if (p_id == BUTTON_SIGNALS) {
@@ -166,6 +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"));
+ 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);
}
@@ -214,8 +225,8 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (connect_to_script_mode) {
Color accent = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
- Ref<Script> script = p_node->get_script();
- if (!script.is_null() && EditorNode::get_singleton()->get_object_custom_type_base(p_node) != script) {
+ Ref<Script> scr = p_node->get_script();
+ if (!scr.is_null() && EditorNode::get_singleton()->get_object_custom_type_base(p_node) != scr) {
//has script
item->add_button(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), BUTTON_SCRIPT);
} else {
@@ -223,7 +234,7 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
item->set_custom_color(0, get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
item->set_selectable(0, false);
- if (!script.is_null()) { // make sure to mark the script if a custom type
+ if (!scr.is_null()) { // make sure to mark the script if a custom type
item->add_button(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), BUTTON_SCRIPT);
item->set_button_disabled(0, item->get_button_count(0) - 1, true);
}
@@ -267,8 +278,8 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (can_rename) { //should be can edit..
- String warning = p_node->get_configuration_warnings_as_string();
- if (!warning.is_empty()) {
+ String conf_warning = p_node->get_configuration_warnings_as_string();
+ if (!conf_warning.is_empty()) {
const int num_warnings = p_node->get_configuration_warnings().size();
String warning_icon;
if (num_warnings == 1) {
@@ -283,15 +294,15 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
const String bullet_point = String::utf8("• ");
int next_newline = 0;
while (next_newline != -1) {
- next_newline = warning.find("\n", next_newline + 2);
- if (warning.substr(next_newline + 1, bullet_point.length()) != bullet_point) {
- warning = warning.insert(next_newline + 1, " ");
+ next_newline = conf_warning.find("\n", next_newline + 2);
+ if (conf_warning.substr(next_newline + 1, bullet_point.length()) != bullet_point) {
+ conf_warning = conf_warning.insert(next_newline + 1, " ");
}
}
String newline = (num_warnings == 1 ? "\n" : "\n\n");
- item->add_button(0, get_theme_icon(warning_icon, SNAME("EditorIcons")), BUTTON_WARNING, false, TTR("Node configuration warning:") + newline + warning);
+ item->add_button(0, get_theme_icon(warning_icon, SNAME("EditorIcons")), BUTTON_WARNING, false, TTR("Node configuration warning:") + newline + conf_warning);
}
if (p_node->is_unique_name_in_owner()) {
@@ -378,26 +389,25 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
item->set_tooltip_text(0, tooltip);
}
- if (can_open_instance && undo_redo.is_valid()) { //Show buttons only when necessary(SceneTreeDock) to avoid crashes
-
+ if (can_open_instance && is_scene_tree_dock) { // Show buttons only when necessary (SceneTreeDock) to avoid crashes.
if (!p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed))) {
p_node->connect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed).bind(p_node));
}
- Ref<Script> script = p_node->get_script();
- if (!script.is_null()) {
+ Ref<Script> scr = p_node->get_script();
+ if (!scr.is_null()) {
String additional_notes;
Color button_color = Color(1, 1, 1);
// Can't set tooltip after adding button, need to do it before.
- if (script->is_tool()) {
+ if (scr->is_tool()) {
additional_notes += "\n" + TTR("This script is currently running in the editor.");
button_color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
}
- if (EditorNode::get_singleton()->get_object_custom_type_base(p_node) == script) {
+ if (EditorNode::get_singleton()->get_object_custom_type_base(p_node) == scr) {
additional_notes += "\n" + TTR("This script is a custom type.");
button_color.a = 0.5;
}
- item->add_button(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), BUTTON_SCRIPT, false, TTR("Open Script:") + " " + script->get_path() + additional_notes);
+ item->add_button(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), BUTTON_SCRIPT, false, TTR("Open Script:") + " " + scr->get_path() + additional_notes);
item->set_button_color(0, item->get_button_count(0) - 1, button_color);
}
@@ -482,8 +492,9 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (valid_types.size()) {
bool valid = false;
- for (int i = 0; i < valid_types.size(); i++) {
- if (p_node->is_class(valid_types[i])) {
+ for (const StringName &E : valid_types) {
+ if (p_node->is_class(E) ||
+ EditorNode::get_singleton()->is_object_of_custom_type(p_node, E)) {
valid = true;
break;
}
@@ -510,16 +521,16 @@ void SceneTreeEditor::_node_visibility_changed(Node *p_node) {
int idx = item->get_button_by_id(0, BUTTON_VISIBILITY);
ERR_FAIL_COND(idx == -1);
- bool visible = false;
+ bool node_visible = false;
if (p_node->is_class("CanvasItem") || p_node->is_class("CanvasLayer") || p_node->is_class("Window")) {
- visible = p_node->call("is_visible");
+ node_visible = p_node->call("is_visible");
CanvasItemEditor::get_singleton()->get_viewport_control()->queue_redraw();
} else if (p_node->is_class("Node3D")) {
- visible = p_node->call("is_visible");
+ node_visible = p_node->call("is_visible");
}
- if (visible) {
+ if (node_visible) {
item->set_button(0, idx, get_theme_icon(SNAME("GuiVisibilityVisible"), SNAME("EditorIcons")));
} else {
item->set_button(0, idx, get_theme_icon(SNAME("GuiVisibilityHidden"), SNAME("EditorIcons")));
@@ -611,6 +622,7 @@ void SceneTreeEditor::_update_tree(bool p_scroll_to_selected) {
bool SceneTreeEditor::_update_filter(TreeItem *p_parent, bool p_scroll_to_selected) {
if (!p_parent) {
p_parent = tree->get_root();
+ filter_term_warning.clear();
}
if (!p_parent) {
@@ -672,27 +684,37 @@ bool SceneTreeEditor::_item_matches_all_terms(TreeItem *p_item, PackedStringArra
if (parameter == "type" || parameter == "t") {
// Filter by Type.
- String node_type = get_node(p_item->get_metadata(0))->get_class().to_lower();
+ String type = get_node(p_item->get_metadata(0))->get_class();
+ bool term_in_inherited_class = false;
+ // Every Node is is a Node, duh!
+ while (type != "Node") {
+ if (type.to_lower().contains(argument)) {
+ term_in_inherited_class = true;
+ break;
+ }
- if (!node_type.contains(argument)) {
+ type = ClassDB::get_parent_class(type);
+ }
+ if (!term_in_inherited_class) {
return false;
}
} else if (parameter == "group" || parameter == "g") {
// Filter by Group.
Node *node = get_node(p_item->get_metadata(0));
- List<Node::GroupInfo> group_info_list;
- node->get_groups(&group_info_list);
- if (group_info_list.is_empty()) {
- return false;
- }
- // When argument is empty, match all Nodes belonging to any group.
- if (!argument.is_empty()) {
+ if (argument.is_empty()) {
+ // When argument is empty, match all Nodes belonging to any exposed group.
+ if (node->get_persistent_group_count() == 0) {
+ return false;
+ }
+ } else {
+ List<Node::GroupInfo> group_info_list;
+ node->get_groups(&group_info_list);
+
bool term_in_groups = false;
for (int j = 0; j < group_info_list.size(); j++) {
- // Ignore private groups.
- if (String(group_info_list[j].name).begins_with("__")) {
- continue;
+ if (!group_info_list[j].persistent) {
+ continue; // Ignore internal groups.
}
if (String(group_info_list[j].name).to_lower().contains(argument)) {
term_in_groups = true;
@@ -703,8 +725,8 @@ bool SceneTreeEditor::_item_matches_all_terms(TreeItem *p_item, PackedStringArra
return false;
}
}
- } else {
- WARN_PRINT(vformat(TTR("Special Node filter \"%s\" is not recognised. Available filters include \"type\" and \"group\"."), parameter));
+ } else if (filter_term_warning.is_empty()) {
+ filter_term_warning = vformat(TTR("\"%s\" is not a known filter."), parameter);
continue;
}
} else {
@@ -803,6 +825,10 @@ void SceneTreeEditor::_cell_multi_selected(Object *p_object, int p_cell, bool p_
TreeItem *item = Object::cast_to<TreeItem>(p_object);
ERR_FAIL_COND(!item);
+ if (!item->is_visible()) {
+ return;
+ }
+
NodePath np = item->get_metadata(0);
Node *n = get_node(np);
@@ -835,7 +861,7 @@ void SceneTreeEditor::_notification(int p_what) {
get_tree()->connect("tree_process_mode_changed", callable_mp(this, &SceneTreeEditor::_tree_process_mode_changed));
get_tree()->connect("node_removed", callable_mp(this, &SceneTreeEditor::_node_removed));
get_tree()->connect("node_renamed", callable_mp(this, &SceneTreeEditor::_node_renamed));
- get_tree()->connect("node_configuration_warning_changed", callable_mp(this, &SceneTreeEditor::_warning_changed), CONNECT_DEFERRED);
+ get_tree()->connect("node_configuration_warning_changed", callable_mp(this, &SceneTreeEditor::_warning_changed));
tree->connect("item_collapsed", callable_mp(this, &SceneTreeEditor::_cell_collapsed));
@@ -942,14 +968,16 @@ void SceneTreeEditor::_renamed() {
Node *n = get_node(np);
ERR_FAIL_COND(!n);
- // Empty node names are not allowed, so resets it to previous text and show warning
- if (which->get_text(0).strip_edges().is_empty()) {
- which->set_text(0, n->get_name());
- EditorNode::get_singleton()->show_warning(TTR("No name provided."));
- return;
+ 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) {
+ raw_new_name = Node::adjust_name_casing(n->get_class());
+ } else {
+ raw_new_name = n->get_class();
+ }
}
- String raw_new_name = which->get_text(0);
String new_name = raw_new_name.validate_node_name();
if (new_name != raw_new_name) {
@@ -965,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;
}
@@ -978,11 +1010,12 @@ void SceneTreeEditor::_renamed() {
return;
}
- if (!undo_redo.is_valid()) {
+ if (!is_scene_tree_dock) {
n->set_name(new_name);
which->set_metadata(0, n->get_path());
emit_signal(SNAME("node_renamed"));
} else {
+ 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);
@@ -1022,8 +1055,12 @@ String SceneTreeEditor::get_filter() const {
return filter;
}
-void SceneTreeEditor::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
- undo_redo = p_undo_redo;
+String SceneTreeEditor::get_filter_term_warning() {
+ return filter_term_warning;
+}
+
+void SceneTreeEditor::set_as_scene_tree_dock() {
+ is_scene_tree_dock = true;
}
void SceneTreeEditor::set_display_foreign_nodes(bool p_display) {
@@ -1116,7 +1153,7 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
return Variant(); //dragging from button
}
- Vector<Node *> selected;
+ Vector<Node *> selected_nodes;
Vector<Ref<Texture2D>> icons;
TreeItem *next = tree->get_next_selected(nullptr);
while (next) {
@@ -1126,14 +1163,14 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
if (n) {
// Only allow selection if not part of an instantiated scene.
if (!n->get_owner() || n->get_owner() == get_scene_node() || n->get_owner()->get_scene_file_path().is_empty()) {
- selected.push_back(n);
+ selected_nodes.push_back(n);
icons.push_back(next->get_icon(0));
}
}
next = tree->get_next_selected(next);
}
- if (selected.is_empty()) {
+ if (selected_nodes.is_empty()) {
return Variant();
}
@@ -1142,20 +1179,20 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
int list_max = 10;
float opacity_step = 1.0f / list_max;
float opacity_item = 1.0f;
- for (int i = 0; i < selected.size(); i++) {
+ for (int i = 0; i < selected_nodes.size(); i++) {
if (i < list_max) {
HBoxContainer *hb = memnew(HBoxContainer);
TextureRect *tf = memnew(TextureRect);
tf->set_texture(icons[i]);
tf->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
hb->add_child(tf);
- Label *label = memnew(Label(selected[i]->get_name()));
+ Label *label = memnew(Label(selected_nodes[i]->get_name()));
hb->add_child(label);
vb->add_child(hb);
hb->set_modulate(Color(1, 1, 1, opacity_item));
opacity_item -= opacity_step;
}
- NodePath p = selected[i]->get_path();
+ NodePath p = selected_nodes[i]->get_path();
objs.push_back(p);
}
@@ -1332,14 +1369,10 @@ void SceneTreeEditor::set_connecting_signal(bool p_enable) {
}
void SceneTreeEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_update_tree"), &SceneTreeEditor::_update_tree, DEFVAL(false)); // Still used by some connect_compat.
+ ClassDB::bind_method(D_METHOD("_update_tree"), &SceneTreeEditor::_update_tree, DEFVAL(false)); // Still used by UndoRedo.
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"));
@@ -1382,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));
@@ -1434,6 +1467,9 @@ void SceneTreeDialog::_notification(int p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
if (is_visible()) {
tree->update_tree();
+
+ // Select the search bar by default.
+ filter->call_deferred(SNAME("grab_focus"));
}
} break;
diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h
index 28ffa4b11b..6a3213f8e4 100644
--- a/editor/scene_tree_editor.h
+++ b/editor/scene_tree_editor.h
@@ -1,44 +1,40 @@
-/*************************************************************************/
-/* scene_tree_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* scene_tree_editor.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 SCENE_TREE_EDITOR_H
#define SCENE_TREE_EDITOR_H
#include "editor/editor_data.h"
-#include "editor/editor_settings.h"
-#include "scene/gui/button.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/tree.h"
-class EditorUndoRedoManager;
-
class SceneTreeEditor : public Control {
GDCLASS(SceneTreeEditor, Control);
@@ -62,6 +58,7 @@ class SceneTreeEditor : public Control {
ObjectID instance_node;
String filter;
+ String filter_term_warning;
AcceptDialog *error = nullptr;
AcceptDialog *warning = nullptr;
@@ -76,7 +73,6 @@ class SceneTreeEditor : public Control {
void _add_nodes(Node *p_node, TreeItem *p_parent);
void _test_update_tree();
- void _update_tree(bool p_scroll_to_selected = false);
bool _update_filter(TreeItem *p_parent = nullptr, bool p_scroll_to_selected = false);
bool _item_matches_all_terms(TreeItem *p_item, PackedStringArray p_terms);
void _tree_changed();
@@ -98,9 +94,9 @@ class SceneTreeEditor : public Control {
bool can_open_instance;
bool updating_tree = false;
bool show_enabled_subscene = false;
+ bool is_scene_tree_dock = false;
void _renamed();
- Ref<EditorUndoRedoManager> undo_redo;
HashSet<Node *> marked;
bool marked_selectable = false;
@@ -138,10 +134,14 @@ class SceneTreeEditor : public Control {
Vector<StringName> valid_types;
public:
+ // Public for use with callable_mp.
+ void _update_tree(bool p_scroll_to_selected = false);
+
void set_filter(const String &p_filter);
String get_filter() const;
+ String get_filter_term_warning();
- void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
+ void set_as_scene_tree_dock();
void set_display_foreign_nodes(bool p_display);
void set_marked(const HashSet<Node *> &p_marked, bool p_selectable = false, bool p_children_selectable = true);
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index f57dfe4827..599f2ea6d2 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* script_create_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* script_create_dialog.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 "script_create_dialog.h"
@@ -107,7 +107,15 @@ static Vector<String> _get_hierarchy(String p_class_name) {
void ScriptCreateDialog::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_ENTER_TREE: {
+ case NOTIFICATION_ENTER_TREE:
+ case NOTIFICATION_THEME_CHANGED: {
+ for (int i = 0; i < ScriptServer::get_language_count(); i++) {
+ Ref<Texture2D> language_icon = get_theme_icon(ScriptServer::get_language(i)->get_type(), SNAME("EditorIcons"));
+ if (language_icon.is_valid()) {
+ language_menu->set_item_icon(i, language_icon);
+ }
+ }
+
String last_language = EditorSettings::get_singleton()->get_project_metadata("script_setup", "last_selected_language", "");
if (!last_language.is_empty()) {
for (int i = 0; i < language_menu->get_item_count(); i++) {
@@ -120,15 +128,9 @@ void ScriptCreateDialog::_notification(int p_what) {
} else {
language_menu->select(default_language);
}
-
- [[fallthrough]];
- }
- case NOTIFICATION_THEME_CHANGED: {
- for (int i = 0; i < ScriptServer::get_language_count(); i++) {
- Ref<Texture2D> language_icon = get_theme_icon(ScriptServer::get_language(i)->get_type(), SNAME("EditorIcons"));
- if (language_icon.is_valid()) {
- language_menu->set_item_icon(i, language_icon);
- }
+ if (EditorSettings::get_singleton()->has_meta("script_setup_use_script_templates")) {
+ is_using_templates = bool(EditorSettings::get_singleton()->get_meta("script_setup_use_script_templates"));
+ use_templates->set_pressed(is_using_templates);
}
path_button->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
@@ -275,7 +277,6 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
bool found = false;
bool match = false;
- int index = 0;
for (const String &E : extensions) {
if (E.nocasecmp_to(extension) == 0) {
found = true;
@@ -284,7 +285,6 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
}
break;
}
- index++;
}
if (!found) {
@@ -333,7 +333,12 @@ void ScriptCreateDialog::_template_changed(int p_template) {
EditorSettings::get_singleton()->set_project_metadata("script_setup", "templates_dictionary", dic_templates_project);
} else {
// Save template info to editor dictionary (not a project template).
- templates_dictionary[parent_name->get_text()] = sinfo.get_hash();
+ Dictionary dic_templates;
+ if (EditorSettings::get_singleton()->has_meta("script_setup_templates_dictionary")) {
+ dic_templates = (Dictionary)EditorSettings::get_singleton()->get_meta("script_setup_templates_dictionary");
+ }
+ dic_templates[parent_name->get_text()] = sinfo.get_hash();
+ EditorSettings::get_singleton()->set_meta("script_setup_templates_dictionary", dic_templates);
// Remove template from project dictionary as we last used an editor level template.
Dictionary dic_templates_project = EditorSettings::get_singleton()->get_project_metadata("script_setup", "templates_dictionary", Dictionary());
if (dic_templates_project.has(parent_name->get_text())) {
@@ -373,7 +378,7 @@ void ScriptCreateDialog::_create_new() {
const ScriptLanguage::ScriptTemplate sinfo = _get_current_template();
String parent_class = parent_name->get_text();
- if (!ClassDB::class_exists(parent_class) && !ScriptServer::is_global_class(parent_class)) {
+ if (!parent_name->get_text().is_quoted() && !ClassDB::class_exists(parent_class) && !ScriptServer::is_global_class(parent_class)) {
// If base is a custom type, replace with script path instead.
const EditorData::CustomType *type = EditorNode::get_editor_data().get_custom_type_by_name(parent_class);
ERR_FAIL_NULL(type);
@@ -482,6 +487,7 @@ void ScriptCreateDialog::_built_in_pressed() {
void ScriptCreateDialog::_use_template_pressed() {
is_using_templates = use_templates->is_pressed();
+ EditorSettings::get_singleton()->set_meta("script_setup_use_script_templates", is_using_templates);
_update_dialog();
}
@@ -599,6 +605,10 @@ void ScriptCreateDialog::_update_template_menu() {
if (is_language_using_templates) {
// Get the latest templates used for each type of node from project settings then global settings.
Dictionary last_local_templates = EditorSettings::get_singleton()->get_project_metadata("script_setup", "templates_dictionary", Dictionary());
+ Dictionary last_global_templates;
+ if (EditorSettings::get_singleton()->has_meta("script_setup_templates_dictionary")) {
+ last_global_templates = (Dictionary)EditorSettings::get_singleton()->get_meta("script_setup_templates_dictionary");
+ }
String inherits_base_type = parent_name->get_text();
// If it inherits from a script, get its parent class first.
@@ -653,7 +663,7 @@ void ScriptCreateDialog::_update_template_menu() {
// Check for last used template for this node in project settings then in global settings.
if (last_local_templates.has(parent_name->get_text()) && t.get_hash() == String(last_local_templates[parent_name->get_text()])) {
last_used_template = id;
- } else if (last_used_template == -1 && templates_dictionary.has(parent_name->get_text()) && t.get_hash() == String(templates_dictionary[parent_name->get_text()])) {
+ } else if (last_used_template == -1 && last_global_templates.has(parent_name->get_text()) && t.get_hash() == String(last_global_templates[parent_name->get_text()])) {
last_used_template = id;
}
t.id = id;
@@ -828,9 +838,9 @@ ScriptLanguage::ScriptTemplate ScriptCreateDialog::_get_current_template() const
return ScriptLanguage::ScriptTemplate();
}
-Vector<ScriptLanguage::ScriptTemplate> ScriptCreateDialog::_get_user_templates(const ScriptLanguage *language, const StringName &p_object, const String &p_dir, const ScriptLanguage::TemplateLocation &p_origin) const {
+Vector<ScriptLanguage::ScriptTemplate> ScriptCreateDialog::_get_user_templates(const ScriptLanguage *p_language, const StringName &p_object, const String &p_dir, const ScriptLanguage::TemplateLocation &p_origin) const {
Vector<ScriptLanguage::ScriptTemplate> user_templates;
- String extension = language->get_extension();
+ String extension = p_language->get_extension();
String dir_path = p_dir.path_join(p_object);
@@ -840,7 +850,7 @@ Vector<ScriptLanguage::ScriptTemplate> ScriptCreateDialog::_get_user_templates(c
String file = d->get_next();
while (file != String()) {
if (file.get_extension() == extension) {
- user_templates.append(_parse_template(language, dir_path, file, p_origin, p_object));
+ user_templates.append(_parse_template(p_language, dir_path, file, p_origin, p_object));
}
file = d->get_next();
}
@@ -849,15 +859,15 @@ Vector<ScriptLanguage::ScriptTemplate> ScriptCreateDialog::_get_user_templates(c
return user_templates;
}
-ScriptLanguage::ScriptTemplate ScriptCreateDialog::_parse_template(const ScriptLanguage *language, const String &p_path, const String &p_filename, const ScriptLanguage::TemplateLocation &p_origin, const String &p_inherits) const {
+ScriptLanguage::ScriptTemplate ScriptCreateDialog::_parse_template(const ScriptLanguage *p_language, const String &p_path, const String &p_filename, const ScriptLanguage::TemplateLocation &p_origin, const String &p_inherits) const {
ScriptLanguage::ScriptTemplate script_template = ScriptLanguage::ScriptTemplate();
script_template.origin = p_origin;
script_template.inherit = p_inherits;
String space_indent = " ";
// Get meta delimiter
- String meta_delimiter = String();
+ String meta_delimiter;
List<String> comment_delimiters;
- language->get_comment_delimiters(&comment_delimiters);
+ p_language->get_comment_delimiters(&comment_delimiters);
for (const String &script_delimiter : comment_delimiters) {
if (!script_delimiter.contains(" ")) {
meta_delimiter = script_delimiter;
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h
index c7d8cfc38a..fa42b96746 100644
--- a/editor/script_create_dialog.h
+++ b/editor/script_create_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* script_create_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* script_create_dialog.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 SCRIPT_CREATE_DIALOG_H
#define SCRIPT_CREATE_DIALOG_H
@@ -83,7 +83,6 @@ class ScriptCreateDialog : public ConfirmationDialog {
int current_language;
int default_language;
bool re_check_path = false;
- Dictionary templates_dictionary;
Control *path_controls[2];
Control *name_controls[2];
@@ -119,8 +118,8 @@ class ScriptCreateDialog : public ConfirmationDialog {
void _update_template_menu();
void _update_dialog();
ScriptLanguage::ScriptTemplate _get_current_template() const;
- Vector<ScriptLanguage::ScriptTemplate> _get_user_templates(const ScriptLanguage *language, const StringName &p_object, const String &p_dir, const ScriptLanguage::TemplateLocation &p_origin) const;
- ScriptLanguage::ScriptTemplate _parse_template(const ScriptLanguage *language, const String &p_path, const String &p_filename, const ScriptLanguage::TemplateLocation &p_origin, const String &p_inherits) const;
+ Vector<ScriptLanguage::ScriptTemplate> _get_user_templates(const ScriptLanguage *p_language, const StringName &p_object, const String &p_dir, const ScriptLanguage::TemplateLocation &p_origin) const;
+ ScriptLanguage::ScriptTemplate _parse_template(const ScriptLanguage *p_language, const String &p_path, const String &p_filename, const ScriptLanguage::TemplateLocation &p_origin, const String &p_inherits) const;
String _get_script_origin_label(const ScriptLanguage::TemplateLocation &p_origin) const;
protected:
diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp
index ae533b5b75..443237b448 100644
--- a/editor/shader_create_dialog.cpp
+++ b/editor/shader_create_dialog.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* shader_create_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* shader_create_dialog.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 "shader_create_dialog.h"
@@ -96,20 +96,20 @@ void ShaderCreateDialog::_update_language_info() {
type_data.clear();
for (int i = 0; i < SHADER_TYPE_MAX; i++) {
- ShaderTypeData data;
+ ShaderTypeData shader_type_data;
if (i == int(SHADER_TYPE_TEXT)) {
- data.use_templates = true;
- data.extensions.push_back("gdshader");
- data.default_extension = "gdshader";
+ shader_type_data.use_templates = true;
+ shader_type_data.extensions.push_back("gdshader");
+ shader_type_data.default_extension = "gdshader";
} else if (i == int(SHADER_TYPE_INC)) {
- data.extensions.push_back("gdshaderinc");
- data.default_extension = "gdshaderinc";
+ shader_type_data.extensions.push_back("gdshaderinc");
+ shader_type_data.default_extension = "gdshaderinc";
} else {
- data.default_extension = "tres";
+ shader_type_data.default_extension = "tres";
}
- data.extensions.push_back("res");
- data.extensions.push_back("tres");
- type_data.push_back(data);
+ shader_type_data.extensions.push_back("res");
+ shader_type_data.extensions.push_back("tres");
+ type_data.push_back(shader_type_data);
}
}
@@ -261,9 +261,9 @@ void ShaderCreateDialog::_load_exist() {
void ShaderCreateDialog::_type_changed(int p_language) {
current_type = p_language;
- ShaderTypeData data = type_data[p_language];
+ ShaderTypeData shader_type_data = type_data[p_language];
- String selected_ext = "." + data.default_extension;
+ String selected_ext = "." + shader_type_data.default_extension;
String path = file_path->get_text();
String extension = "";
@@ -284,10 +284,10 @@ void ShaderCreateDialog::_type_changed(int p_language) {
type_menu->set_item_disabled(int(SHADER_TYPE_INC), load_enabled);
mode_menu->set_disabled(p_language == SHADER_TYPE_INC);
- template_menu->set_disabled(!data.use_templates);
+ template_menu->set_disabled(!shader_type_data.use_templates);
template_menu->clear();
- if (data.use_templates) {
+ if (shader_type_data.use_templates) {
int last_template = EditorSettings::get_singleton()->get_project_metadata("shader_setup", "last_selected_template", 0);
template_menu->add_item(TTR("Default"));
@@ -437,8 +437,6 @@ String ShaderCreateDialog::_validate_path(const String &p_path) {
}
}
- ShaderTypeData data = type_data[type_menu->get_selected()];
-
bool found = false;
bool match = false;
diff --git a/editor/shader_create_dialog.h b/editor/shader_create_dialog.h
index 9ba655369b..729a7b5bd4 100644
--- a/editor/shader_create_dialog.h
+++ b/editor/shader_create_dialog.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* shader_create_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* shader_create_dialog.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 SHADER_CREATE_DIALOG_H
#define SHADER_CREATE_DIALOG_H
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index eef0f3eae1..800de431eb 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* shader_globals_editor.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* shader_globals_editor.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 "shader_globals_editor.h"
@@ -69,28 +69,12 @@ static const char *global_var_type_names[RS::GLOBAL_VAR_TYPE_MAX] = {
class ShaderGlobalsEditorInterface : public Object {
GDCLASS(ShaderGlobalsEditorInterface, Object)
- void _var_changed() {
- emit_signal(SNAME("var_changed"));
- }
-
-protected:
- static void _bind_methods() {
- ClassDB::bind_method("_var_changed", &ShaderGlobalsEditorInterface::_var_changed);
- ADD_SIGNAL(MethodInfo("var_changed"));
- }
-
- bool _set(const StringName &p_name, const Variant &p_value) {
- Variant existing = RS::get_singleton()->global_shader_parameter_get(p_name);
-
- if (existing.get_type() == Variant::NIL) {
- return false;
- }
-
- Ref<EditorUndoRedoManager> undo_redo = EditorNode::get_undo_redo();
+ void _set_var(const StringName &p_name, const Variant &p_value, const Variant &p_prev_value) {
+ 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);
- undo_redo->add_undo_method(RS::get_singleton(), "global_shader_parameter_set", p_name, existing);
+ undo_redo->add_undo_method(RS::get_singleton(), "global_shader_parameter_set", p_name, p_prev_value);
RS::GlobalShaderParameterType type = RS::get_singleton()->global_shader_parameter_get_type(p_name);
Dictionary gv;
gv["type"] = global_var_type_names[type];
@@ -107,12 +91,33 @@ protected:
String path = "shader_globals/" + String(p_name);
undo_redo->add_do_property(ProjectSettings::get_singleton(), path, gv);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), path, ProjectSettings::get_singleton()->get(path));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), path, GLOBAL_GET(path));
undo_redo->add_do_method(this, "_var_changed");
undo_redo->add_undo_method(this, "_var_changed");
block_update = true;
undo_redo->commit_action();
block_update = false;
+ }
+
+ void _var_changed() {
+ emit_signal(SNAME("var_changed"));
+ }
+
+protected:
+ static void _bind_methods() {
+ ClassDB::bind_method("_set_var", &ShaderGlobalsEditorInterface::_set_var);
+ ClassDB::bind_method("_var_changed", &ShaderGlobalsEditorInterface::_var_changed);
+ ADD_SIGNAL(MethodInfo("var_changed"));
+ }
+
+ bool _set(const StringName &p_name, const Variant &p_value) {
+ Variant existing = RS::get_singleton()->global_shader_parameter_get(p_name);
+
+ if (existing.get_type() == Variant::NIL) {
+ return false;
+ }
+
+ call_deferred("_set_var", p_name, p_value, existing);
return true;
}
@@ -394,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()));
@@ -413,14 +418,14 @@ 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);
undo_redo->add_undo_method(RS::get_singleton(), "global_shader_parameter_add", p_variable, RS::get_singleton()->global_shader_parameter_get_type(p_variable), RS::get_singleton()->global_shader_parameter_get(p_variable));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "shader_globals/" + p_variable, Variant());
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "shader_globals/" + p_variable, ProjectSettings::get_singleton()->get("shader_globals/" + p_variable));
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "shader_globals/" + p_variable, GLOBAL_GET("shader_globals/" + p_variable));
undo_redo->add_do_method(this, "_changed");
undo_redo->add_undo_method(this, "_changed");
undo_redo->commit_action();
@@ -483,7 +488,7 @@ ShaderGlobalsEditor::ShaderGlobalsEditor() {
inspector->connect("property_deleted", callable_mp(this, &ShaderGlobalsEditor::_variable_deleted), CONNECT_DEFERRED);
interface = memnew(ShaderGlobalsEditorInterface);
- interface->connect("var_changed", Callable(this, "_changed"));
+ interface->connect("var_changed", callable_mp(this, &ShaderGlobalsEditor::_changed));
}
ShaderGlobalsEditor::~ShaderGlobalsEditor() {
diff --git a/editor/shader_globals_editor.h b/editor/shader_globals_editor.h
index 1e2f1dd828..590da342d4 100644
--- a/editor/shader_globals_editor.h
+++ b/editor/shader_globals_editor.h
@@ -1,32 +1,32 @@
-/*************************************************************************/
-/* shader_globals_editor.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
+/**************************************************************************/
+/* shader_globals_editor.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 SHADER_GLOBALS_EDITOR_H
#define SHADER_GLOBALS_EDITOR_H
diff --git a/editor/translations/af.po b/editor/translations/af.po
index 8ada9c3379..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 ""
@@ -13115,9 +13115,10 @@ msgstr "EnkelHouer"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14517,13 +14518,13 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Kan nie '%s' oopmaak nie."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -23582,6 +23583,15 @@ msgstr "Fout terwyl laai:"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Skep Vouer"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index adaef249f8..327332ae18 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -69,13 +69,15 @@
# عبد الرحمن أبو سعدة ||Abd Alrahman abo saada <abdalrahmanabs2005@gmail.com>, 2022.
# 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-09-08 07:39+0000\n"
-"Last-Translator: أحمد النور <ahmed2699@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"
@@ -84,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.1-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -524,7 +526,7 @@ msgstr "السرعة"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: scene/3d/sprite_3d.cpp
msgid "Axis"
-msgstr "محاور"
+msgstr "محور"
#: core/os/input_event.cpp
msgid "Axis Value"
@@ -714,9 +716,8 @@ msgid "Version Control Autoload On Startup"
msgstr "التحميل التلقائي للتحكم في الإصدار عند بدء التشغيل"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Plugin Name"
-msgstr "إدارة الإصدارات (Version Control)"
+msgstr "اسم مدير اصدار الاضافة"
#: core/project_settings.cpp scene/2d/collision_object_2d.cpp
#: scene/3d/collision_object.cpp scene/gui/control.cpp
@@ -797,9 +798,8 @@ msgid "3D"
msgstr "ثلاثي الأبعاد 3D"
#: core/project_settings.cpp
-#, fuzzy
msgid "Smooth Trimesh Collision"
-msgstr "إنشاء متصادم تراميش قريب"
+msgstr "إنشاء متصادم ترام"
#: core/project_settings.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles2/rasterizer_scene_gles2.cpp
@@ -878,7 +878,7 @@ msgstr "مطابقة المسافات الطويلة"
#: core/project_settings.cpp
msgid "Compression Level"
-msgstr "ضغط المستوى"
+msgstr "مستوى الضغط"
#: core/project_settings.cpp
msgid "Window Log Size"
@@ -1194,7 +1194,7 @@ msgstr "توطين"
#: scene/3d/remote_transform.cpp scene/3d/spatial.cpp scene/gui/control.cpp
#, fuzzy
msgid "Rotation"
-msgstr "خطوة الدوران:"
+msgstr "خطوة الدوران"
#: editor/animation_track_editor.cpp editor/script_editor_debugger.cpp
#: modules/visual_script/visual_script_nodes.cpp scene/gui/range.cpp
@@ -1204,7 +1204,7 @@ msgstr "قيمة"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Arg Count"
-msgstr "الكمية:"
+msgstr "الكمية"
#: editor/animation_track_editor.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
@@ -1238,12 +1238,12 @@ msgstr "المجرى (Stream)"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Start Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "End Offset"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/import/resource_importer_scene.cpp
@@ -1373,7 +1373,7 @@ msgstr "الوقت(ثواني):"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Position:"
-msgstr "مكان الرصيف"
+msgstr "مكان الرصيف:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1397,27 +1397,27 @@ msgstr "نوع:"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "(Invalid, expected type: %s)"
-msgstr "إدارة قوالب التصدير:"
+msgstr "إدارة قوالب التصدير"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Easing:"
-msgstr "تسارع بعد بداية بطيئة"
+msgstr "تسارع بعد بداية بطيئة:"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "In-Handle:"
-msgstr "حدد المعامل"
+msgstr "حدد المعامل:"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Out-Handle:"
-msgstr "حدد المعامل"
+msgstr "حدد المعامل:"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Stream:"
-msgstr "عنصر خِيار"
+msgstr "عنصر خِيار:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -2613,7 +2613,7 @@ msgstr "لا يوجد ملف '%s'."
#: editor/editor_audio_buses.cpp
#, fuzzy
msgid "Layout:"
-msgstr "المخطط"
+msgstr "المخطط:"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -2821,7 +2821,7 @@ msgstr "تصدير المشروع لمنصة:"
#: editor/editor_export.cpp
#, fuzzy
msgid "Completed with warnings."
-msgstr "نسخ مسار العُقدة"
+msgstr "نسخ مسار العُقدة."
#: editor/editor_export.cpp
#, fuzzy
@@ -2831,7 +2831,7 @@ msgstr "اكتمل بنجاح."
#: editor/editor_export.cpp
#, fuzzy
msgid "Failed."
-msgstr "فشل:"
+msgstr "فشل."
#: editor/editor_export.cpp
msgid "Storing File:"
@@ -2858,12 +2858,12 @@ 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 "لا يمكن فتح الملف للكتابة."
#: editor/editor_export.cpp
#, fuzzy
@@ -2998,17 +2998,17 @@ 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 "ملف النموذج غير موجود: ."
#: editor/editor_export.cpp
#, fuzzy
msgid "Failed to copy export template."
-msgstr "إدارة قوالب التصدير:"
+msgstr "إدارة قوالب التصدير."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
@@ -3304,7 +3304,7 @@ msgstr "الوصول (للملف)"
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp
#, fuzzy
msgid "Display Mode"
-msgstr "وضع التشغيل:"
+msgstr "وضع التشغيل"
#: editor/editor_file_dialog.cpp
#: editor/import/resource_importer_layered_texture.cpp
@@ -3324,17 +3324,17 @@ msgstr "وضع السحب"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
msgid "Current Dir"
-msgstr "الحالي:"
+msgstr "الحالي"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
msgid "Current File"
-msgstr "الملف (النسخة) الحالية:"
+msgstr "الملف (النسخة) الحالية"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
msgid "Current Path"
-msgstr "الحالي:"
+msgstr "الحالي"
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp
#: scene/gui/file_dialog.cpp
@@ -3661,7 +3661,7 @@ msgstr "عنصر مُفعل"
#: editor/editor_inspector.cpp
#, fuzzy
msgid "Draw Red"
-msgstr "استدعاءات الرسم:"
+msgstr "استدعاءات الرسم"
#: editor/editor_inspector.cpp
#, fuzzy
@@ -4429,7 +4429,7 @@ msgstr "مُتفحص"
#: editor/editor_node.cpp
#, fuzzy
msgid "Default Property Name Style"
-msgstr "مسار المشروع:"
+msgstr "مسار المشروع"
#: editor/editor_node.cpp
msgid "Default Float Step"
@@ -5278,7 +5278,7 @@ msgstr "فتح الكود البرمجي"
#: editor/editor_resource_picker.cpp
#, fuzzy
msgid "Script Owner"
-msgstr "اسم النص البرمجي:"
+msgstr "اسم النص البرمجي"
#: editor/editor_run_native.cpp
msgid ""
@@ -5454,12 +5454,12 @@ msgstr "الاتجاهات"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Autoscan Project Path"
-msgstr "مسار المشروع:"
+msgstr "مسار المشروع"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Default Project Path"
-msgstr "مسار المشروع:"
+msgstr "مسار المشروع"
#: editor/editor_settings.cpp
msgid "On Save"
@@ -5482,7 +5482,7 @@ msgstr "نافذة XForm"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Thumbnail Size"
-msgstr "الصورة المصغرة..."
+msgstr "الصورة المصغرة"
#: editor/editor_settings.cpp
msgid "Docks"
@@ -5612,12 +5612,12 @@ msgstr "المظهر"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "Show Line Numbers"
-msgstr "اضهار رقم الخط"
+msgstr "اظهار رقم الخط"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Line Numbers Zero Padded"
-msgstr "رقم الخط:"
+msgstr "رقم الخط"
#: editor/editor_settings.cpp
msgid "Show Bookmark Gutter"
@@ -5837,12 +5837,12 @@ msgstr "شكل"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Primary Grid Steps"
-msgstr "خطوة الشبكة:"
+msgstr "خطوة الشبكة"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Grid Size"
-msgstr "خطوة الشبكة:"
+msgstr "خطوة الشبكة"
#: editor/editor_settings.cpp
msgid "Grid Division Level Max"
@@ -6027,7 +6027,7 @@ msgstr "إعادة تسمية عنصر اللون"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Bone Selected Color"
-msgstr "عدل على الحساب الحالي:"
+msgstr "عدل على الحساب الحالي"
#: editor/editor_settings.cpp
msgid "Bone IK Color"
@@ -6040,7 +6040,7 @@ msgstr "لون حدود العظام"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Bone Outline Size"
-msgstr "حجم الخطوط:"
+msgstr "حجم الخطوط"
#: editor/editor_settings.cpp
msgid "Viewport Border Color"
@@ -6061,7 +6061,7 @@ msgstr "التمرير للتحريك"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Pan Speed"
-msgstr "السرعة:"
+msgstr "السرعة"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
#, fuzzy
@@ -6136,7 +6136,7 @@ msgstr "الاقتطاع التلقائي"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Save Before Running"
-msgstr "احفظ المشهد قبل التشغيل..."
+msgstr "احفظ المشهد قبل التشغيل"
#: editor/editor_settings.cpp
#, fuzzy
@@ -6182,7 +6182,7 @@ msgstr "مدير المشروع"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Sorting Order"
-msgstr "إعادة تسمية مجلد:"
+msgstr "إعادة تسمية مجلد"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Symbol Color"
@@ -6216,19 +6216,19 @@ msgstr "لون التعليق"
#: editor/editor_settings.cpp
#, fuzzy
msgid "String Color"
-msgstr "تخزين الملف:"
+msgstr "تخزين الملف"
#: 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 "لون خلفية غير صالح."
+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
@@ -6255,12 +6255,12 @@ msgstr "الطابق التالي"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Line Number Color"
-msgstr "رقم الخط:"
+msgstr "رقم الخط"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Safe Line Number Color"
-msgstr "رقم الخط:"
+msgstr "رقم الخط"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Caret Color"
@@ -6269,7 +6269,7 @@ msgstr "لون علامة الإقحام"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Caret Background Color"
-msgstr "لون خلفية غير صالح."
+msgstr "لون خلفية غير صالح"
#: editor/editor_settings.cpp
#, fuzzy
@@ -7047,7 +7047,7 @@ msgstr "محدد"
#: editor/import/resource_importer_layered_texture.cpp
#, fuzzy
msgid "ColorCorrect"
-msgstr "الوظيفة البرمجية للون."
+msgstr "الوظيفة البرمجية للون"
#: editor/import/resource_importer_layered_texture.cpp
msgid "No BPTC If RGB"
@@ -7072,7 +7072,7 @@ msgstr "كرر"
#: scene/gui/control.cpp
#, fuzzy
msgid "Filter"
-msgstr "مرشحات:"
+msgstr "مرشحات"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
@@ -7101,7 +7101,7 @@ msgstr "الاقتطاع التلقائي"
#: scene/resources/style_box.cpp
#, fuzzy
msgid "Horizontal"
-msgstr "عَرضياً:"
+msgstr "عَرضياً"
#: editor/import/resource_importer_layered_texture.cpp
#: scene/gui/aspect_ratio_container.cpp scene/gui/control.cpp
@@ -7109,7 +7109,7 @@ msgstr "عَرضياً:"
#: scene/resources/style_box.cpp
#, fuzzy
msgid "Vertical"
-msgstr "شاقولياً:"
+msgstr "شاقولياً"
#: editor/import/resource_importer_obj.cpp
#, fuzzy
@@ -7124,7 +7124,7 @@ msgstr "وضع التحجيم"
#: editor/import/resource_importer_obj.cpp
#, fuzzy
msgid "Offset Mesh"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: editor/import/resource_importer_obj.cpp
#: editor/import/resource_importer_scene.cpp
@@ -7205,7 +7205,7 @@ msgstr "قص العُقد"
#: editor/import/resource_importer_scene.cpp scene/resources/texture.cpp
#, fuzzy
msgid "Storage"
-msgstr "تخزين الملف:"
+msgstr "تخزين الملف"
#: editor/import/resource_importer_scene.cpp
msgid "Use Legacy Names"
@@ -7214,7 +7214,7 @@ msgstr "استخدم الأسماء القديمة"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
#, fuzzy
msgid "Materials"
-msgstr "تغيرات المادة:"
+msgstr "تغيرات المادة"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
@@ -7294,12 +7294,12 @@ msgstr "تفعيل"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
msgid "Max Linear Error"
-msgstr "أقصي أخطاء خطية:"
+msgstr "أقصي أخطاء خطية"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
msgid "Max Angular Error"
-msgstr "أقصي أخطاء زواية:"
+msgstr "أقصي أخطاء زواية"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
@@ -7321,7 +7321,7 @@ msgstr "مقاطع الرسوم المتحركة"
#: scene/3d/particles.cpp scene/resources/environment.cpp
#, fuzzy
msgid "Amount"
-msgstr "الكمية:"
+msgstr "الكمية"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7435,7 +7435,7 @@ msgstr "رأس"
#: editor/import/resource_importer_texture.cpp
#, fuzzy
msgid "Normal Map Invert Y"
-msgstr "حجم عشوائي:"
+msgstr "حجم عشوائي"
#: editor/import/resource_importer_texture.cpp
msgid "Size Limit"
@@ -7461,12 +7461,12 @@ msgstr ""
#: editor/import/resource_importer_texture_atlas.cpp
#, fuzzy
msgid "Atlas File"
-msgstr "حجم الخطوط:"
+msgstr "حجم الخطوط"
#: editor/import/resource_importer_texture_atlas.cpp
#, fuzzy
msgid "Import Mode"
-msgstr "وضع التصدير:"
+msgstr "وضع التصدير"
#: editor/import/resource_importer_texture_atlas.cpp
#, fuzzy
@@ -7603,7 +7603,7 @@ msgstr "فشل تحميل المورد."
#: editor/inspector_dock.cpp
#, fuzzy
msgid "Property Name Style"
-msgstr "اسم المشروع:"
+msgstr "اسم المشروع"
#: editor/inspector_dock.cpp scene/gui/color_picker.cpp
msgid "Raw"
@@ -8627,7 +8627,7 @@ msgstr "خطأ في التحميل"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Available URLs"
-msgstr "الملفات المتوافرة:"
+msgstr "الملفات المتوافرة"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
@@ -8763,7 +8763,9 @@ msgstr "لا يمكن انشاء خرائط الضوء, تاكد من ان ال
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
-msgstr "فشل تحديد حجم الخريطة الضوئية. الحجم الأقصى للخريطة المضيئة صغير جدًا؟"
+msgstr ""
+"فشل تحديد حجم الخريطة الضوئية (lightmap). هل الحجم الأقصى للخريطة الضوئية "
+"صغير جدًا؟"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -9688,7 +9690,7 @@ msgstr "بطاقة تعريف"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Separator"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
@@ -10839,7 +10841,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Current Script Background Color"
-msgstr "لون خلفية غير صالح."
+msgstr "لون خلفية غير صالح"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
@@ -10854,7 +10856,7 @@ msgstr "إنشاء نص برمجي"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "List Script Names As"
-msgstr "اسم النص البرمجي:"
+msgstr "اسم النص البرمجي"
#: editor/plugins/script_editor_plugin.cpp
msgid "Exec Flags"
@@ -11176,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 " [البوابات مفعلة]"
@@ -13036,12 +13038,13 @@ msgstr "إعدادت المحاذاة"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: editor/plugins/tile_set_editor_plugin.cpp editor/rename_dialog.cpp
#: scene/gui/range.cpp scene/resources/animation.cpp
@@ -13054,7 +13057,7 @@ msgstr "الخطوة"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Separation"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -13075,14 +13078,14 @@ msgstr "نص"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Tex Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: editor/plugins/tile_set_editor_plugin.cpp modules/csg/csg_shape.cpp
#: scene/2d/canvas_item.cpp scene/2d/particles_2d.cpp
#: scene/3d/mesh_instance.cpp scene/resources/primitive_meshes.cpp
#, fuzzy
msgid "Material"
-msgstr "تغيرات المادة:"
+msgstr "تغيرات المادة"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/canvas_item.cpp
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/style_box.cpp
@@ -13103,7 +13106,7 @@ msgstr "وضع قناع-البِت"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Subtile Size"
-msgstr "حجم الخطوط:"
+msgstr "حجم الخطوط"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -13123,7 +13126,7 @@ msgstr "وضع التنقل"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Shape Offset"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -13242,7 +13245,7 @@ msgstr "أختر مسار المفتاح الخاص لSSH"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Passphrase"
-msgstr "كلمة مرور SSH"
+msgstr "كلمة المرور ل(SSH)"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Detect new changes"
@@ -14395,12 +14398,12 @@ msgstr "تحريك إلي..."
#: editor/project_export.cpp
#, fuzzy
msgid "Export PCK/Zip..."
-msgstr "تصدير PCK/ ملف مضغوط Zip"
+msgstr "تصدير PCK/ ملف مضغوط Zip..."
#: editor/project_export.cpp
#, fuzzy
msgid "Export Project..."
-msgstr "تصدير المشروع"
+msgstr "تصدير المشروع..."
#: editor/project_export.cpp
msgid "Export All"
@@ -14409,12 +14412,12 @@ msgstr "تصدير الكُل"
#: editor/project_export.cpp
#, fuzzy
msgid "Choose an export mode:"
-msgstr "من فضلك اختر مُجلداً فارغاً."
+msgstr "من فضلك اختر مُجلداً فارغاً:"
#: editor/project_export.cpp
#, fuzzy
msgid "Export All..."
-msgstr "تصدير الكُل"
+msgstr "تصدير الكُل..."
#: editor/project_export.cpp editor/project_manager.cpp
msgid "ZIP File"
@@ -14497,15 +14500,16 @@ msgid "Invalid project path (changed anything?)."
msgstr "مسار مشروع غير صالح (أعدلت شيء؟)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"لم يتم تحميل project.godot من مسار المشروع (خطأ %d). قد يكون مفقوداً أو تالفاً."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "لا قدرة على تحرير project.godot في مسار المشروع."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "لا يمكن فتح المشروع في '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15541,7 +15545,7 @@ msgstr "اجعله محلياً"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "إسم العقدة:"
+msgstr "إسم العقدة"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -15551,7 +15555,7 @@ msgstr "لقد تم استخدام هذا الاسم في وظيفة برمجي
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Disable Scene Unique Name(s)"
-msgstr "إسم العقدة:"
+msgstr "إسم العقدة"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -15752,7 +15756,7 @@ msgstr "مجموعة الأزرار"
#: editor/scene_tree_editor.cpp
#, fuzzy
msgid "Disable Scene Unique Name"
-msgstr "إسم العقدة:"
+msgstr "إسم العقدة"
#: editor/scene_tree_editor.cpp
msgid "(Connecting From)"
@@ -16634,7 +16638,7 @@ msgstr "الحجم الكامل"
#: main/main.cpp scene/resources/dynamic_font.cpp
#, fuzzy
msgid "Use Filter"
-msgstr "تصفية:"
+msgstr "تصفية"
#: main/main.cpp scene/resources/style_box.cpp
#, fuzzy
@@ -16683,7 +16687,7 @@ msgstr ""
#: main/main.cpp
#, fuzzy
msgid "Tooltip Position Offset"
-msgstr "مقدار إزاحة الدوران:"
+msgstr "مقدار إزاحة الدوران"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
#, fuzzy
@@ -16698,7 +16702,7 @@ msgstr "مُنقح الأخطاء"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
#, fuzzy
msgid "Wait Timeout"
-msgstr "انتهت المهلة."
+msgstr "انتهت المهلة"
#: main/main.cpp
msgid "Runtime"
@@ -16808,12 +16812,12 @@ msgstr "اقلب الوجوه"
#: scene/resources/sphere_shape.cpp
#, fuzzy
msgid "Radius"
-msgstr "نصف القطر:"
+msgstr "نصف القطر"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
#, fuzzy
msgid "Radial Segments"
-msgstr "معاملات المشهد الرئيس:"
+msgstr "معاملات المشهد الرئيس"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
msgid "Rings"
@@ -16878,7 +16882,7 @@ msgstr ""
#: modules/csg/csg_shape.cpp
#, fuzzy
msgid "Path Rotation"
-msgstr "دوران عشوائي:"
+msgstr "دوران عشوائي"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -16897,7 +16901,7 @@ msgstr "المسار المحلي"
#: modules/csg/csg_shape.cpp
#, fuzzy
msgid "Path Joined"
-msgstr "دوران عشوائي:"
+msgstr "دوران عشوائي"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "Compression Mode"
@@ -17020,12 +17024,12 @@ msgstr "مكتبات:"
#: modules/gdnative/nativescript/nativescript.cpp
#, fuzzy
msgid "Class Name"
-msgstr "اسم الفئة:"
+msgstr "اسم الفئة"
#: modules/gdnative/nativescript/nativescript.cpp
#, fuzzy
msgid "Script Class"
-msgstr "اسم النص البرمجي:"
+msgstr "اسم النص البرمجي"
#: modules/gdnative/nativescript/nativescript.cpp
msgid "Icon Path"
@@ -17134,7 +17138,7 @@ msgstr "الواجهة View الخلفية"
#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_buffer_view.cpp
#, fuzzy
msgid "Byte Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: modules/gltf/gltf_accessor.cpp
msgid "Component Type"
@@ -17147,7 +17151,7 @@ msgstr ""
#: modules/gltf/gltf_accessor.cpp
#, fuzzy
msgid "Count"
-msgstr "الكمية:"
+msgstr "الكمية"
#: modules/gltf/gltf_accessor.cpp scene/resources/visual_shader_nodes.cpp
msgid "Min"
@@ -17173,7 +17177,7 @@ msgstr ""
#: modules/gltf/gltf_accessor.cpp
#, fuzzy
msgid "Sparse Indices Component Type"
-msgstr "توزيع الأشكال الهندسية..."
+msgstr "توزيع الأشكال الهندسية"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Values Buffer View"
@@ -17252,7 +17256,7 @@ msgstr "طبخ (إعداد) خرائط الضوء"
#: modules/gltf/gltf_mesh.cpp
#, fuzzy
msgid "Instance Materials"
-msgstr "تغيرات المادة:"
+msgstr "تغيرات المادة"
#: modules/gltf/gltf_node.cpp scene/3d/skeleton.cpp
msgid "Parent"
@@ -17808,7 +17812,7 @@ msgstr "ضوضاء"
#: modules/opensimplex/noise_texture.cpp
#, fuzzy
msgid "Noise Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Octaves"
@@ -18363,7 +18367,7 @@ msgstr "اعادة التعيين للإفتراضيات"
#: modules/visual_script/visual_script_func_nodes.cpp
#, fuzzy
msgid "Validate"
-msgstr "الأحرف الصالحة:"
+msgstr "الأحرف الصالحة"
#: modules/visual_script/visual_script_func_nodes.cpp
#, fuzzy
@@ -18457,7 +18461,7 @@ msgstr "تغيير حجم المصفوفة"
#: scene/resources/visual_shader_nodes.cpp
#, fuzzy
msgid "Operator"
-msgstr "مُشغل التراكم."
+msgstr "مُشغل التراكم"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Invalid argument of type:"
@@ -18703,7 +18707,7 @@ msgstr "إخلاء سلسلة IK"
#: modules/websocket/websocket_server.cpp
#, fuzzy
msgid "Handshake Timeout"
-msgstr "انتهت المهلة."
+msgstr "انتهت المهلة"
#: modules/webxr/webxr_interface.cpp
#, fuzzy
@@ -18713,12 +18717,12 @@ msgstr "وضع الأقليم"
#: modules/webxr/webxr_interface.cpp
#, fuzzy
msgid "Required Features"
-msgstr "المزايا الرئيسية:"
+msgstr "المزايا الرئيسية"
#: modules/webxr/webxr_interface.cpp
#, fuzzy
msgid "Optional Features"
-msgstr "المزايا الرئيسية:"
+msgstr "المزايا الرئيسية"
#: modules/webxr/webxr_interface.cpp
msgid "Requested Reference Space Types"
@@ -18825,7 +18829,7 @@ msgstr "مسار التصدير"
#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Min SDK"
-msgstr "حجم الخطوط:"
+msgstr "حجم الخطوط"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18883,7 +18887,7 @@ msgstr "يَحزم\"ينتج الملف المضغوط\""
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
#, fuzzy
msgid "Unique Name"
-msgstr "إسم العقدة:"
+msgstr "إسم العقدة"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18893,7 +18897,7 @@ msgstr "الإشاراة"
#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Classify As Game"
-msgstr "اسم الفئة:"
+msgstr "اسم الفئة"
#: platform/android/export/export_plugin.cpp
msgid "Retain Data On Uninstall"
@@ -18907,7 +18911,7 @@ msgstr "حذف العُقد"
#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Graphics"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18979,7 +18983,7 @@ msgstr "المجتمع"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
#, fuzzy
msgid "Extra Args"
-msgstr "وسائط إستدعاء إضافية :"
+msgstr "وسائط إستدعاء إضافية"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -19283,7 +19287,7 @@ msgstr ""
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name."
msgstr ""
-"تعذرت كتابة overwrite ملفات res://android/build/res/*.xml مع اسم المشروع"
+"تعذرت كتابة overwrite ملفات res://android/build/res/*.xml مع اسم المشروع."
#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project."
@@ -19318,7 +19322,7 @@ msgstr "تعذر نسخ وإعادة تسمية الملف المصدر، تفق
#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: \"%s\"."
-msgstr "لم يتم إيجاد الرسم المتحرك: '%s'"
+msgstr "لم يتم إيجاد الرسم المتحرك: '%s'."
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -19347,7 +19351,7 @@ msgstr "إضافة %s..."
#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files."
-msgstr "لم نتمكن من تصدير ملفات المشروع"
+msgstr "لم نتمكن من تصدير ملفات المشروع."
#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
@@ -19445,7 +19449,7 @@ msgstr ""
#: platform/iphone/export/export.cpp
#, fuzzy
msgid "Export Method Release"
-msgstr "وضع التصدير:"
+msgstr "وضع التصدير"
#: platform/iphone/export/export.cpp
msgid "Targeted Device Family"
@@ -19458,7 +19462,7 @@ msgstr ""
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
msgid "Identifier"
-msgstr "مُحدد غير صالح:"
+msgstr "مُحدد غير صالح"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19488,7 +19492,7 @@ msgstr "الوصول للواي-فاي"
#: platform/iphone/export/export.cpp
#, fuzzy
msgid "Push Notifications"
-msgstr "دوران عشوائي:"
+msgstr "دوران عشوائي"
#: platform/iphone/export/export.cpp
#, fuzzy
@@ -19629,17 +19633,17 @@ msgstr "شغل ملف HTML المُصدر في المتصفح الإفتراضي
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not open template for export: \"%s\"."
-msgstr "لا يمكن فتح القالب من أجل التصدير:"
+msgstr "لا يمكن فتح القالب من أجل التصدير: ."
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Invalid export template: \"%s\"."
-msgstr "إدارة قوالب التصدير:"
+msgstr "إدارة قوالب التصدير: ."
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not write file: \"%s\"."
-msgstr "لا يمكن كتابة الملف:"
+msgstr "لا يمكن كتابة الملف: ."
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19649,7 +19653,7 @@ msgstr "تحديد الهامش"
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not read file: \"%s\"."
-msgstr "لا يمكن كتابة الملف:"
+msgstr "لا يمكن كتابة الملف: ."
#: platform/javascript/export/export.cpp
msgid "PWA"
@@ -19658,7 +19662,7 @@ msgstr ""
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Variant"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: platform/javascript/export/export.cpp
#, fuzzy
@@ -19732,17 +19736,17 @@ msgstr ""
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not read HTML shell: \"%s\"."
-msgstr "لا يمكن قراءة ملف HTML مخصص:"
+msgstr "لا يمكن قراءة ملف HTML مخصص: ."
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not create HTTP server directory: %s."
-msgstr "لا يمكن إنشاء مجلد خادم ال HTTP:"
+msgstr "لا يمكن إنشاء مجلد خادم ال HTTP: ."
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Error starting HTTP server: %d."
-msgstr "خطأ في بدء تشغيل خادم HTTP:"
+msgstr "خطأ في بدء تشغيل خادم HTTP: ."
#: platform/javascript/export/export.cpp
msgid "Web"
@@ -19848,7 +19852,7 @@ msgstr ""
#: platform/osx/export/export.cpp
#, fuzzy
msgid "App Category"
-msgstr "الفئة:"
+msgstr "الفئة"
#: platform/osx/export/export.cpp
msgid "High Res"
@@ -20044,7 +20048,7 @@ msgstr ""
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Could not open icon file \"%s\"."
-msgstr "لم نتمكن من تصدير ملفات المشروع"
+msgstr "لم نتمكن من تصدير ملفات المشروع."
#: platform/osx/export/export.cpp
msgid "Could not start xcrun executable."
@@ -20053,7 +20057,7 @@ msgstr "تعذر بدء تشغيل xcrun."
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Notarization failed."
-msgstr "توطين"
+msgstr "توطين."
#: platform/osx/export/export.cpp
msgid "Notarization request UUID: \"%s\""
@@ -20108,7 +20112,7 @@ msgstr "لم توجد ايقونات."
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Cannot sign file %s."
-msgstr "خطأ في تحميل الملف: %s"
+msgstr "خطأ في تحميل الملف %s."
#: platform/osx/export/export.cpp
msgid "Relative symlinks are not supported, exported \"%s\" might be broken!"
@@ -20139,12 +20143,12 @@ msgstr "ينشئ الصورة المصغرة"
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Could not find template app to export: \"%s\"."
-msgstr "لم يتم إيجاد قالب التطبيق (Template app) للتصدير:"
+msgstr "لم يتم إيجاد قالب التطبيق (Template app) للتصدير: ."
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Invalid export format."
-msgstr "إدارة قوالب التصدير:"
+msgstr "إدارة قوالب التصدير."
#: platform/osx/export/export.cpp
msgid ""
@@ -20331,7 +20335,7 @@ msgstr "إظهار الكل"
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Short Name"
-msgstr "اسم النص البرمجي:"
+msgstr "اسم النص البرمجي"
#: platform/uwp/export/export.cpp
msgid "Publisher"
@@ -20340,12 +20344,12 @@ 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
@@ -20360,7 +20364,7 @@ msgstr "الإشاراة"
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Certificate"
-msgstr "القمم:"
+msgstr "القمم"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20387,7 +20391,7 @@ msgstr "تحديد التعبير"
#: platform/uwp/export/export.cpp
msgid "Landscape"
-msgstr ""
+msgstr "بشكل افقي (Landscape)"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20430,7 +20434,7 @@ msgstr ""
#: platform/uwp/export/export.cpp
#, fuzzy
msgid "Splash Screen"
-msgstr "استدعاءات الرسم:"
+msgstr "استدعاءات الرسم"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20528,7 +20532,7 @@ msgstr "مُنقح الأخطاء"
#: platform/windows/export/export.cpp
#, fuzzy
msgid "Failed to rename temporary file \"%s\"."
-msgstr "لا يمكن حذف ملف مؤقت:"
+msgstr "لا يمكن حذف ملف مؤقت."
#: platform/windows/export/export.cpp
msgid "Identity Type"
@@ -20556,17 +20560,17 @@ msgstr "الإصدار"
#: platform/windows/export/export.cpp
#, fuzzy
msgid "Product Version"
-msgstr "مُعرف GUID (المُعرّف الفريد العالمي) للمنتج غير صالح:"
+msgstr "مُعرف GUID (المُعرّف الفريد العالمي) للمنتج غير صالح"
#: platform/windows/export/export.cpp
#, fuzzy
msgid "Company Name"
-msgstr "إسم العقدة:"
+msgstr "إسم العقدة"
#: platform/windows/export/export.cpp
#, fuzzy
msgid "Product Name"
-msgstr "اسم المشروع:"
+msgstr "اسم المشروع"
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20580,7 +20584,7 @@ msgstr ""
#: platform/windows/export/export.cpp
#, fuzzy
msgid "Resources Modification"
-msgstr "دوران عشوائي:"
+msgstr "دوران عشوائي"
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20617,7 +20621,7 @@ msgstr "لا يمكن العثور على مفتاح المتجر، لا يمك
#: platform/windows/export/export.cpp
#, fuzzy
msgid "Invalid identity type."
-msgstr "مُحدد غير صالح:"
+msgstr "مُحدد غير صالح."
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20639,7 +20643,7 @@ msgstr "صيغة غير صالحة."
#: platform/windows/export/export.cpp
#, fuzzy
msgid "Failed to remove temporary file \"%s\"."
-msgstr "لا يمكن حذف ملف مؤقت:"
+msgstr "لا يمكن حذف ملف مؤقت."
#: platform/windows/export/export.cpp
msgid ""
@@ -20690,8 +20694,9 @@ msgid "Osslsigncode"
msgstr ""
#: platform/windows/export/export.cpp
+#, fuzzy
msgid "Wine"
-msgstr ""
+msgstr "طبقة المعالجة Wine"
#: platform/x11/export/export.cpp
msgid "32-bit executables cannot have embedded data >= 4 GiB."
@@ -20828,7 +20833,7 @@ msgstr ""
#: scene/resources/material.cpp
#, fuzzy
msgid "Max Distance"
-msgstr "اختر المسافة:"
+msgstr "اختر المسافة"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/light.cpp
#, fuzzy
@@ -20858,13 +20863,13 @@ 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
#, fuzzy
msgid "Current"
-msgstr "الحالي:"
+msgstr "الحالي"
#: scene/2d/camera_2d.cpp scene/gui/graph_edit.cpp
#, fuzzy
@@ -20948,12 +20953,12 @@ 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
@@ -21150,7 +21155,7 @@ msgstr ""
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
#, fuzzy
msgid "Emitting"
-msgstr "الإعدادات:"
+msgstr "الإعدادات"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -21178,7 +21183,7 @@ msgstr ""
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
#, fuzzy
msgid "Randomness"
-msgstr "إعادة تشغيل عشوائية (ثواني):"
+msgstr "إعادة تشغيل عشوائية (ثواني)"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21351,7 +21356,7 @@ msgstr "إغلاق المنحنى"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#, fuzzy
msgid "Scale Amount"
-msgstr "الكمية:"
+msgstr "الكمية"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
msgid "Scale Amount Random"
@@ -21377,25 +21382,25 @@ msgstr ""
#: scene/resources/particles_material.cpp
#, fuzzy
msgid "Hue Variation"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
#, fuzzy
msgid "Variation"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
#, fuzzy
msgid "Variation Random"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
#, fuzzy
msgid "Variation Curve"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21413,7 +21418,7 @@ msgstr "تقسيم المنحنى"
#: scene/resources/particles_material.cpp
#, fuzzy
msgid "Offset Random"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21612,12 +21617,12 @@ msgstr "وضع الأقليم"
#: scene/2d/line_2d.cpp
#, fuzzy
msgid "End Cap Mode"
-msgstr "وضع المحاذاة:"
+msgstr "وضع المحاذاة"
#: scene/2d/line_2d.cpp scene/2d/polygon_2d.cpp scene/resources/style_box.cpp
#, fuzzy
msgid "Border"
-msgstr "إعادة تسمية مجلد:"
+msgstr "إعادة تسمية مجلد"
#: scene/2d/line_2d.cpp
msgid "Sharp Limit"
@@ -21646,7 +21651,7 @@ msgstr ""
#: scene/2d/navigation_2d.cpp scene/3d/navigation.cpp
#, fuzzy
msgid "Edge Connection Margin"
-msgstr "تعديل الإتصال:"
+msgstr "تعديل الإتصال"
#: scene/2d/navigation_2d.cpp
msgid ""
@@ -21663,7 +21668,7 @@ msgstr "الربط"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
#, fuzzy
msgid "Path Desired Distance"
-msgstr "اختر المسافة:"
+msgstr "اختر المسافة"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Target Desired Distance"
@@ -21672,7 +21677,7 @@ msgstr ""
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
#, fuzzy
msgid "Path Max Distance"
-msgstr "اختر المسافة:"
+msgstr "اختر المسافة"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
#, fuzzy
@@ -21700,7 +21705,7 @@ msgstr "القلب أفقياً"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
#, fuzzy
msgid "Max Speed"
-msgstr "السرعة:"
+msgstr "السرعة"
#: scene/2d/navigation_agent_2d.cpp
msgid ""
@@ -21744,7 +21749,7 @@ msgstr "السفر"
#: scene/main/canvas_layer.cpp
#, fuzzy
msgid "Rotation Degrees"
-msgstr "يُدير %s من الدرجات."
+msgstr "يُدير %s من الدرجات"
#: scene/2d/node_2d.cpp scene/3d/spatial.cpp
#, fuzzy
@@ -21754,12 +21759,12 @@ msgstr "ثابت"
#: scene/2d/node_2d.cpp
#, fuzzy
msgid "Global Rotation Degrees"
-msgstr "يُدير %s من الدرجات."
+msgstr "يُدير %s من الدرجات"
#: scene/2d/node_2d.cpp
#, fuzzy
msgid "Global Scale"
-msgstr "حجم عشوائي:"
+msgstr "حجم عشوائي"
#: scene/2d/node_2d.cpp scene/3d/spatial.cpp
#, fuzzy
@@ -21779,7 +21784,7 @@ msgstr ""
#: scene/2d/parallax_background.cpp
#, fuzzy
msgid "Base Offset"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: scene/2d/parallax_background.cpp
#, fuzzy
@@ -21878,17 +21883,17 @@ msgstr ""
#: scene/2d/path_2d.cpp scene/3d/path.cpp
#, fuzzy
msgid "Unit Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/2d/path_2d.cpp scene/3d/camera.cpp scene/3d/path.cpp
#, fuzzy
msgid "H Offset"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: scene/2d/path_2d.cpp scene/3d/camera.cpp scene/3d/path.cpp
#, fuzzy
msgid "V Offset"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: scene/2d/path_2d.cpp scene/3d/path.cpp
msgid "Cubic Interp"
@@ -21951,7 +21956,7 @@ msgstr ""
#: scene/2d/physics_body_2d.cpp
#, fuzzy
msgid "Inertia"
-msgstr "شاقولياً:"
+msgstr "شاقولياً"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -21990,7 +21995,7 @@ msgstr "المحاذاة الذكية"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
msgid "Can Sleep"
-msgstr "السرعة:"
+msgstr "السرعة"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Damp"
@@ -22037,7 +22042,7 @@ msgstr "البنية (اللاحقة)"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
msgid "Remainder"
-msgstr "مُحرك الإخراج البصري:"
+msgstr "مُحرك الإخراج البصري"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -22239,7 +22244,7 @@ msgstr "وضع الأولية"
#: scene/2d/tile_map.cpp
#, fuzzy
msgid "Centered Textures"
-msgstr "المزايا الرئيسية:"
+msgstr "المزايا الرئيسية"
#: scene/2d/tile_map.cpp
msgid "Cell Clip UV"
@@ -22371,7 +22376,7 @@ msgstr ""
#: scene/3d/arvr_nodes.cpp servers/arvr_server.cpp
#, fuzzy
msgid "World Scale"
-msgstr "حجم عشوائي:"
+msgstr "حجم عشوائي"
#: scene/3d/audio_stream_player_3d.cpp
#, fuzzy
@@ -22402,7 +22407,7 @@ msgstr "الوان الإنبعاث"
#: scene/3d/audio_stream_player_3d.cpp
#, fuzzy
msgid "Degrees"
-msgstr "يُدير %s من الدرجات."
+msgstr "يُدير %s من الدرجات"
#: scene/3d/audio_stream_player_3d.cpp
#, fuzzy
@@ -22489,7 +22494,7 @@ msgstr ""
#: scene/3d/baked_lightmap.cpp
#, fuzzy
msgid "Use Denoiser"
-msgstr "تصفية:"
+msgstr "تصفية"
#: scene/3d/baked_lightmap.cpp scene/resources/texture.cpp
msgid "Use HDR"
@@ -22518,7 +22523,7 @@ msgstr "عام"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
msgid "Max Size"
-msgstr "الحجم:"
+msgstr "الحجم"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -22528,7 +22533,7 @@ msgstr "قص العُقد"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
msgid "Custom Sky Rotation Degrees"
-msgstr "يُدير %s من الدرجات."
+msgstr "يُدير %s من الدرجات"
#: scene/3d/baked_lightmap.cpp scene/3d/ray_cast.cpp
#, fuzzy
@@ -22562,7 +22567,7 @@ msgstr "مع البيانات"
#: scene/3d/bone_attachment.cpp scene/3d/physics_body.cpp
#, fuzzy
msgid "Bone Name"
-msgstr "إسم العقدة:"
+msgstr "إسم العقدة"
#: scene/3d/camera.cpp
msgid "Keep Aspect"
@@ -22589,7 +22594,7 @@ msgstr ""
#: scene/3d/camera.cpp
#, fuzzy
msgid "Frustum Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/3d/camera.cpp
#, fuzzy
@@ -22853,7 +22858,7 @@ msgstr "الخطوط"
#: scene/3d/label_3d.cpp scene/resources/primitive_meshes.cpp
#, fuzzy
msgid "Horizontal Alignment"
-msgstr "عَرضياً:"
+msgstr "عَرضياً"
#: scene/3d/label_3d.cpp
#, fuzzy
@@ -22919,7 +22924,7 @@ msgstr "فصل المسار"
#: scene/3d/light.cpp
#, fuzzy
msgid "Blend Splits"
-msgstr "أوقات الدمج:"
+msgstr "أوقات الدمج"
#: scene/3d/light.cpp
#, fuzzy
@@ -22965,7 +22970,7 @@ msgstr ""
#: scene/3d/mesh_instance.cpp
#, fuzzy
msgid "Transform Normals"
-msgstr "أجهض التحول."
+msgstr "أجهض التحول"
#: scene/3d/navigation.cpp
msgid ""
@@ -23058,12 +23063,12 @@ msgstr "تشغيل/إطفاء الوضوحية Visibility"
#: scene/3d/particles.cpp
#, fuzzy
msgid "Draw Passes"
-msgstr "استدعاءات الرسم:"
+msgstr "استدعاءات الرسم"
#: scene/3d/particles.cpp
#, fuzzy
msgid "Passes"
-msgstr "استدعاءات الرسم:"
+msgstr "استدعاءات الرسم"
#: scene/3d/path.cpp
msgid "PathFollow only works when set as a child of a Path node."
@@ -23161,7 +23166,7 @@ msgstr ""
#: scene/3d/vehicle_body.cpp
#, fuzzy
msgid "Relaxation"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -23176,7 +23181,7 @@ msgstr "خطي"
#: scene/3d/physics_body.cpp
#, fuzzy
msgid "Angular Limit Lower"
-msgstr "أقصي أخطاء زواية:"
+msgstr "أقصي أخطاء زواية"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -23309,7 +23314,7 @@ msgstr ""
#: scene/3d/physics_body.cpp
#, fuzzy
msgid "Body Offset"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: scene/3d/physics_joint.cpp
msgid "Node A and Node B must be PhysicsBodies"
@@ -23342,7 +23347,7 @@ msgstr "استثناء العُقد"
#: scene/3d/physics_joint.cpp
#, fuzzy
msgid "Params"
-msgstr "لقد تم تغيير المَعلم:"
+msgstr "لقد تم تغيير المَعلم"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit"
@@ -23370,7 +23375,7 @@ msgstr "تحريك المسار لليمين"
#: scene/3d/physics_joint.cpp
#, fuzzy
msgid "Max Impulse"
-msgstr "السرعة:"
+msgstr "السرعة"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23380,12 +23385,12 @@ msgstr "خطي"
#: scene/3d/physics_joint.cpp
#, fuzzy
msgid "Upper Distance"
-msgstr "اختر المسافة:"
+msgstr "اختر المسافة"
#: scene/3d/physics_joint.cpp
#, fuzzy
msgid "Lower Distance"
-msgstr "اختر المسافة:"
+msgstr "اختر المسافة"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23418,7 +23423,7 @@ msgstr "رسوم متحركة"
#: scene/3d/physics_joint.cpp
#, fuzzy
msgid "Angular Ortho"
-msgstr "أقصي أخطاء زواية:"
+msgstr "أقصي أخطاء زواية"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23433,7 +23438,7 @@ msgstr "الشروع"
#: scene/3d/physics_joint.cpp
#, fuzzy
msgid "Force Limit"
-msgstr "استدعاءات الرسم:"
+msgstr "استدعاءات الرسم"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23533,7 +23538,7 @@ msgstr ""
#: scene/3d/portal.cpp
#, fuzzy
msgid "Linked Room"
-msgstr "جذر التعديل المباشر:"
+msgstr "جذر التعديل المباشر"
#: scene/3d/portal.cpp
#, fuzzy
@@ -23552,7 +23557,7 @@ msgstr ""
#: scene/3d/proximity_group.cpp
#, fuzzy
msgid "Grid Radius"
-msgstr "نصف القطر:"
+msgstr "نصف القطر"
#: scene/3d/ray_cast.cpp
#, fuzzy
@@ -23570,7 +23575,7 @@ msgstr "وضع التحديث"
#: scene/3d/reflection_probe.cpp
#, fuzzy
msgid "Origin Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/3d/reflection_probe.cpp
#, fuzzy
@@ -23823,12 +23828,12 @@ msgstr "إنشاء مُضلع التصادم"
#: scene/3d/soft_body.cpp
#, fuzzy
msgid "Simulation Precision"
-msgstr "شجرة التحريك غير صالحة."
+msgstr "شجرة التحريك غير صالحة"
#: scene/3d/soft_body.cpp
#, fuzzy
msgid "Total Mass"
-msgstr "المجموع الكلي:"
+msgstr "المجموع الكلي"
#: scene/3d/soft_body.cpp
msgid "Linear Stiffness"
@@ -23945,7 +23950,7 @@ msgstr ""
#: scene/3d/vehicle_body.cpp
#, fuzzy
msgid "Use As Traction"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/3d/vehicle_body.cpp
msgid "Use As Steering"
@@ -23978,6 +23983,16 @@ msgstr "خطأ"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "ترتيب"
+
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Use AABB Center"
+msgstr "استخدم Ambient"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -23991,7 +24006,7 @@ msgstr "يتجاوز"
#: scene/3d/visual_instance.cpp
#, fuzzy
msgid "Material Overlay"
-msgstr "تغيرات المادة:"
+msgstr "تغيرات المادة"
#: scene/3d/visual_instance.cpp
#, fuzzy
@@ -24001,7 +24016,7 @@ msgstr "إنشاء عُقدة تظليل"
#: scene/3d/visual_instance.cpp
#, fuzzy
msgid "Extra Cull Margin"
-msgstr "وسائط إستدعاء إضافية :"
+msgstr "وسائط إستدعاء إضافية"
#: scene/3d/visual_instance.cpp
#, fuzzy
@@ -24026,7 +24041,7 @@ msgstr ""
#: scene/resources/material.cpp
#, fuzzy
msgid "Min Distance"
-msgstr "اختر المسافة:"
+msgstr "اختر المسافة"
#: scene/3d/visual_instance.cpp
msgid "Min Hysteresis"
@@ -24075,12 +24090,12 @@ msgstr "عقدة الخلط"
#: scene/animation/animation_blend_tree.cpp
#, fuzzy
msgid "Fadein Time"
-msgstr "وقت التلاشي X (ثواني):"
+msgstr "وقت التلاشي X (ثواني)"
#: scene/animation/animation_blend_tree.cpp
#, fuzzy
msgid "Fadeout Time"
-msgstr "وقت التلاشي X (ثواني):"
+msgstr "وقت التلاشي X (ثواني)"
#: scene/animation/animation_blend_tree.cpp
msgid "Auto Restart"
@@ -24097,17 +24112,17 @@ msgstr ""
#: scene/animation/animation_blend_tree.cpp
#, fuzzy
msgid "Random Delay"
-msgstr "إمالة عشوائية:"
+msgstr "إمالة عشوائية"
#: scene/animation/animation_blend_tree.cpp
#, fuzzy
msgid "Add Amount"
-msgstr "الكمية:"
+msgstr "الكمية"
#: scene/animation/animation_blend_tree.cpp
#, fuzzy
msgid "Blend Amount"
-msgstr "الكمية:"
+msgstr "الكمية"
#: scene/animation/animation_blend_tree.cpp
#, fuzzy
@@ -24123,7 +24138,7 @@ msgstr "أضف منفذ أدخال"
#: scene/animation/animation_node_state_machine.cpp
#, fuzzy
msgid "Xfade Time"
-msgstr "وقت التلاشي X (ثواني):"
+msgstr "وقت التلاشي X (ثواني)"
#: scene/animation/animation_node_state_machine.cpp
#, fuzzy
@@ -24171,7 +24186,7 @@ msgstr "أضفة نقطة الرسوم المتحركة"
#: scene/animation/animation_player.cpp
#, fuzzy
msgid "Playback Options"
-msgstr "إعدادات الصف (Class):"
+msgstr "إعدادات الصف (Class)"
#: scene/animation/animation_player.cpp
#, fuzzy
@@ -24214,7 +24229,7 @@ msgstr "العُقدة الرئيسة لمُشغل الرسومات المتحر
#: scene/animation/animation_tree.cpp
#, fuzzy
msgid "Tree Root"
-msgstr "إنشاء العُقدة الرئيسة (الجذر):"
+msgstr "إنشاء العُقدة الرئيسة (الجذر)"
#: scene/animation/animation_tree.cpp
#, fuzzy
@@ -24475,12 +24490,12 @@ msgstr "الاتجاهات"
#: scene/gui/control.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Min Size"
-msgstr "حجم الخطوط:"
+msgstr "حجم الخطوط"
#: scene/gui/control.cpp
#, fuzzy
msgid "Pivot Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/gui/control.cpp
#, fuzzy
@@ -24533,7 +24548,7 @@ msgstr ""
#: scene/gui/control.cpp
#, fuzzy
msgid "Default Cursor Shape"
-msgstr "تحميل نسق المسار الإفتراضي."
+msgstr "تحميل نسق المسار الإفتراضي"
#: scene/gui/control.cpp
msgid "Pass On Modal Close Click"
@@ -24591,12 +24606,12 @@ msgstr "قطع الاتصال"
#: scene/gui/graph_edit.cpp
#, fuzzy
msgid "Scroll Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/gui/graph_edit.cpp
#, fuzzy
msgid "Snap Distance"
-msgstr "اختر المسافة:"
+msgstr "اختر المسافة"
#: scene/gui/graph_edit.cpp
#, fuzzy
@@ -24696,7 +24711,7 @@ msgstr ""
#: scene/gui/item_list.cpp
#, fuzzy
msgid "Icon Scale"
-msgstr "حجم عشوائي:"
+msgstr "حجم عشوائي"
#: scene/gui/item_list.cpp
#, fuzzy
@@ -24711,7 +24726,7 @@ msgstr "ألحق"
#: scene/gui/label.cpp scene/gui/rich_text_label.cpp
#, fuzzy
msgid "Visible Characters"
-msgstr "الأحرف الصالحة:"
+msgstr "الأحرف الصالحة"
#: scene/gui/label.cpp scene/gui/rich_text_label.cpp
#, fuzzy
@@ -24737,7 +24752,7 @@ msgstr ""
#: scene/gui/line_edit.cpp
#, fuzzy
msgid "Secret Character"
-msgstr "الأحرف الصالحة:"
+msgstr "الأحرف الصالحة"
#: scene/gui/line_edit.cpp
msgid "Expand To Text Length"
@@ -24803,7 +24818,7 @@ msgstr ""
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
#, fuzzy
msgid "Blink Speed"
-msgstr "السرعة:"
+msgstr "السرعة"
#: scene/gui/link_button.cpp
msgid "Underline"
@@ -24887,7 +24902,7 @@ msgstr "بحث"
#: scene/gui/progress_bar.cpp
#, fuzzy
msgid "Percent"
-msgstr "الحالي:"
+msgstr "الحالي"
#: scene/gui/range.cpp
msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."
@@ -24948,7 +24963,7 @@ msgstr "مسافة بادئة تلقائية"
#: scene/gui/rich_text_effect.cpp
#, fuzzy
msgid "Elapsed Time"
-msgstr "أوقات الدمج:"
+msgstr "أوقات الدمج"
#: scene/gui/rich_text_effect.cpp
#, fuzzy
@@ -24958,7 +24973,7 @@ msgstr "النهاية"
#: scene/gui/rich_text_effect.cpp
#, fuzzy
msgid "Character"
-msgstr "الأحرف الصالحة:"
+msgstr "الأحرف الصالحة"
#: scene/gui/rich_text_label.cpp
msgid "BBCode"
@@ -24971,7 +24986,7 @@ msgstr ""
#: scene/gui/rich_text_label.cpp
#, fuzzy
msgid "Tab Size"
-msgstr "الحجم:"
+msgstr "الحجم"
#: scene/gui/rich_text_label.cpp
#, fuzzy
@@ -24994,7 +25009,7 @@ msgstr "المحدد فقط"
#: scene/gui/rich_text_label.cpp scene/gui/text_edit.cpp
#, fuzzy
msgid "Override Selected Font Color"
-msgstr "عدل على الحساب الحالي:"
+msgstr "عدل على الحساب الحالي"
#: scene/gui/rich_text_label.cpp
#, fuzzy
@@ -25024,7 +25039,7 @@ msgstr "تزويد السطح"
#: scene/gui/scroll_container.cpp
#, fuzzy
msgid "Horizontal Enabled"
-msgstr "عَرضياً:"
+msgstr "عَرضياً"
#: scene/gui/scroll_container.cpp
#, fuzzy
@@ -25047,22 +25062,22 @@ msgstr "اختر لوناً"
#: scene/gui/slider.cpp
#, fuzzy
msgid "Ticks On Borders"
-msgstr "إعادة تسمية مجلد:"
+msgstr "إعادة تسمية مجلد"
#: scene/gui/spin_box.cpp
#, fuzzy
msgid "Prefix"
-msgstr "بادئة:"
+msgstr "بادئة"
#: scene/gui/spin_box.cpp
#, fuzzy
msgid "Suffix"
-msgstr "لاحقة:"
+msgstr "لاحقة"
#: scene/gui/split_container.cpp
#, fuzzy
msgid "Split Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/gui/split_container.cpp scene/gui/tree.cpp
#, fuzzy
@@ -25081,7 +25096,7 @@ msgstr ""
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
#, fuzzy
msgid "Current Tab"
-msgstr "الحالي:"
+msgstr "الحالي"
#: scene/gui/tab_container.cpp
#, fuzzy
@@ -25095,7 +25110,7 @@ msgstr ""
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
#, fuzzy
msgid "Drag To Rearrange Enabled"
-msgstr "إسحب وأسقط لإعادة الترتيب."
+msgstr "إسحب وأسقط لإعادة الترتيب"
#: scene/gui/tab_container.cpp
msgid "Use Hidden Tabs For Min Size"
@@ -25126,7 +25141,7 @@ msgstr "تخطي نقاط التكسّر"
#: scene/gui/text_edit.cpp
#, fuzzy
msgid "Fold Gutter"
-msgstr "مجلد:"
+msgstr "مجلد"
#: scene/gui/text_edit.cpp
#, fuzzy
@@ -25146,17 +25161,17 @@ msgstr "تفعيل"
#: scene/gui/text_edit.cpp
#, fuzzy
msgid "Scroll Vertical"
-msgstr "شاقولياً:"
+msgstr "شاقولياً"
#: scene/gui/text_edit.cpp
#, fuzzy
msgid "Scroll Horizontal"
-msgstr "عَرضياً:"
+msgstr "عَرضياً"
#: scene/gui/text_edit.cpp
#, fuzzy
msgid "Draw"
-msgstr "استدعاءات الرسم:"
+msgstr "استدعاءات الرسم"
#: scene/gui/text_edit.cpp
#, fuzzy
@@ -25216,7 +25231,7 @@ msgstr ""
#: scene/gui/texture_progress.cpp
#, fuzzy
msgid "Fill Mode"
-msgstr "وضع التشغيل:"
+msgstr "وضع التشغيل"
#: scene/gui/texture_progress.cpp scene/resources/material.cpp
msgid "Tint"
@@ -25234,7 +25249,7 @@ msgstr "الشروع"
#: scene/gui/texture_progress.cpp
#, fuzzy
msgid "Fill Degrees"
-msgstr "يُدير %s من الدرجات."
+msgstr "يُدير %s من الدرجات"
#: scene/gui/texture_progress.cpp scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -25287,7 +25302,7 @@ msgstr "زر معطّل"
#: scene/gui/tree.cpp
#, fuzzy
msgid "Hide Root"
-msgstr "إنشاء العُقدة الرئيسة (الجذر):"
+msgstr "إنشاء العُقدة الرئيسة (الجذر)"
#: scene/gui/tree.cpp
msgid "Drop Mode Flags"
@@ -25342,7 +25357,7 @@ msgstr ""
#: scene/main/http_request.cpp
#, fuzzy
msgid "Timeout"
-msgstr "انتهت المهلة."
+msgstr "انتهت المهلة"
#: scene/main/node.cpp
msgid ""
@@ -25387,17 +25402,17 @@ msgstr "إعادة التسمية"
#: scene/main/node.cpp
#, fuzzy
msgid "Owner"
-msgstr "ملاك:"
+msgstr "ملاك"
#: scene/main/node.cpp scene/main/scene_tree.cpp
#, fuzzy
msgid "Multiplayer"
-msgstr "تحديد التكرار:"
+msgstr "تحديد التكرار"
#: scene/main/node.cpp
#, fuzzy
msgid "Custom Multiplayer"
-msgstr "تحديد التكرار:"
+msgstr "تحديد التكرار"
#: scene/main/node.cpp
msgid "Process Priority"
@@ -25434,7 +25449,7 @@ msgstr ""
#: scene/main/scene_tree.cpp
#, fuzzy
msgid "Multiplayer Poll"
-msgstr "تحديد التكرار:"
+msgstr "تحديد التكرار"
#: scene/main/scene_tree.cpp scene/resources/mesh_library.cpp
#: scene/resources/shape_2d.cpp
@@ -25470,12 +25485,12 @@ msgstr "أنشئ الحد"
#: scene/main/scene_tree.cpp servers/visual_server.cpp
msgid "Reflections"
-msgstr "الانعكاسات"
+msgstr "انعكاسات"
#: scene/main/scene_tree.cpp
#, fuzzy
msgid "Atlas Size"
-msgstr "حجم الخطوط:"
+msgstr "حجم الخطوط"
#: scene/main/scene_tree.cpp
msgid "Atlas Subdiv"
@@ -25530,7 +25545,7 @@ msgstr ""
#: scene/main/timer.cpp
#, fuzzy
msgid "Autostart"
-msgstr "إعادة تشغيل تلقائية:"
+msgstr "إعادة تشغيل تلقائية"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25615,7 +25630,7 @@ msgstr "تصحيح الأخطاء"
#: scene/main/viewport.cpp
#, fuzzy
msgid "Render Target"
-msgstr "مُحرك الإخراج البصري:"
+msgstr "مُحرك الإخراج البصري"
#: scene/main/viewport.cpp
msgid "V Flip"
@@ -25736,7 +25751,7 @@ msgstr ""
#: scene/resources/concave_polygon_shape_2d.cpp
#, fuzzy
msgid "Segments"
-msgstr "معاملات المشهد الرئيس:"
+msgstr "معاملات المشهد الرئيس"
#: scene/resources/curve.cpp
#, fuzzy
@@ -25779,7 +25794,7 @@ msgstr "القص Clip مُعطّل"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "H Separation"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25849,7 +25864,7 @@ msgstr "عنصر معطّل"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Off"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25869,12 +25884,12 @@ msgstr "الاجبار على التعديل الابيض"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Shadow Offset X"
-msgstr "معادل الشبكة على المحور الأفقي X:"
+msgstr "معادل الشبكة على المحور الأفقي X"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Shadow Offset Y"
-msgstr "معادل الشبكة على المحور Y:"
+msgstr "معادل الشبكة على المحور Y"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25934,12 +25949,12 @@ msgstr "المشهد الرئيس"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Folded"
-msgstr "مجلد:"
+msgstr "مجلد"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Fold"
-msgstr "مجلد:"
+msgstr "مجلد"
#: scene/resources/default_theme/default_theme.cpp
msgid "Font Color Readonly"
@@ -26060,12 +26075,12 @@ msgstr "الاتجاهات"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Close H Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Close V Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26095,7 +26110,7 @@ msgstr "فاصل مُسمّى"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Font Separator"
-msgstr "مُشغّل اللون."
+msgstr "مُشغّل اللون"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26105,12 +26120,12 @@ msgstr "إعادة تسمية عنصر اللون"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Font Color Separator"
-msgstr "مُشغّل اللون."
+msgstr "مُشغّل اللون"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "V Separation"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26155,17 +26170,17 @@ msgstr "الألوان"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Title Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Close Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Port Offset"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26277,12 +26292,12 @@ msgstr "أظهر الموجهات"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Scroll Border"
-msgstr "شاقولياً:"
+msgstr "شاقولياً"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Scroll Speed"
-msgstr "مقدار إزاحة الشبكة:"
+msgstr "مقدار إزاحة الشبكة"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26292,7 +26307,7 @@ msgstr "تحديد الهامش"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Line Separation"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26354,7 +26369,7 @@ msgstr "الهدف"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Folder"
-msgstr "مجلد:"
+msgstr "مجلد"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26394,7 +26409,7 @@ msgstr "بالعرض يساراً"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Screen Picker"
-msgstr "مُشغل الشاشة."
+msgstr "مُشغل الشاشة"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26457,12 +26472,12 @@ msgstr "المشهد الرئيس"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Table H Separation"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Table V Separation"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26557,7 +26572,7 @@ msgstr "مسار التركيز"
#: scene/resources/dynamic_font.cpp
#, fuzzy
msgid "Outline Size"
-msgstr "حجم الخطوط:"
+msgstr "حجم الخطوط"
#: scene/resources/dynamic_font.cpp
#, fuzzy
@@ -26572,12 +26587,12 @@ msgstr "الإشارات"
#: scene/resources/dynamic_font.cpp
#, fuzzy
msgid "Extra Spacing"
-msgstr "خيارات إضافية:"
+msgstr "خيارات إضافية"
#: scene/resources/dynamic_font.cpp
#, fuzzy
msgid "Char"
-msgstr "الأحرف الصالحة:"
+msgstr "الأحرف الصالحة"
#: scene/resources/dynamic_font.cpp
#, fuzzy
@@ -26605,12 +26620,12 @@ msgstr "الوثائق الإلكترونية"
#: scene/resources/environment.cpp
#, fuzzy
msgid "Sky Rotation"
-msgstr "خطوة الدوران:"
+msgstr "خطوة الدوران"
#: scene/resources/environment.cpp
#, fuzzy
msgid "Sky Rotation Degrees"
-msgstr "يُدير %s من الدرجات."
+msgstr "يُدير %s من الدرجات"
#: scene/resources/environment.cpp
msgid "Canvas Max Layer"
@@ -26637,12 +26652,12 @@ msgstr ""
#: scene/resources/environment.cpp
#, fuzzy
msgid "Sun Color"
-msgstr "تخزين الملف:"
+msgstr "تخزين الملف"
#: scene/resources/environment.cpp
#, fuzzy
msgid "Sun Amount"
-msgstr "الكمية:"
+msgstr "الكمية"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26733,12 +26748,12 @@ msgstr "الخطوة"
#: scene/resources/environment.cpp
#, fuzzy
msgid "Fade In"
-msgstr "تلاشي في البداية (ثواني):"
+msgstr "تلاشي في البداية (ثواني)"
#: scene/resources/environment.cpp
#, fuzzy
msgid "Fade Out"
-msgstr "تلاشي من النهاية (ثواني):"
+msgstr "تلاشي من النهاية (ثواني)"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26756,7 +26771,7 @@ msgstr ""
#: scene/resources/environment.cpp
#, fuzzy
msgid "Radius 2"
-msgstr "نصف القطر:"
+msgstr "نصف القطر"
#: scene/resources/environment.cpp
msgid "Intensity 2"
@@ -26787,7 +26802,7 @@ msgstr ""
#: scene/resources/environment.cpp scene/resources/material.cpp
#, fuzzy
msgid "Distance"
-msgstr "اختر المسافة:"
+msgstr "اختر المسافة"
#: scene/resources/environment.cpp
msgid "Transition"
@@ -26871,17 +26886,17 @@ msgstr "ضوء"
#: scene/resources/environment.cpp
#, fuzzy
msgid "Saturation"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/resources/environment.cpp
#, fuzzy
msgid "Color Correction"
-msgstr "الوظيفة البرمجية للون."
+msgstr "الوظيفة البرمجية للون"
#: scene/resources/font.cpp
#, fuzzy
msgid "Ascent"
-msgstr "الحالي:"
+msgstr "الحالي"
#: scene/resources/font.cpp
#, fuzzy
@@ -26896,7 +26911,7 @@ msgstr "العمق"
#: scene/resources/gradient.cpp
#, fuzzy
msgid "Offsets"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: scene/resources/height_map_shape.cpp
msgid "Map Width"
@@ -26960,7 +26975,7 @@ msgstr "المسافة البادئة يميناً"
#: scene/resources/material.cpp
#, fuzzy
msgid "Ensure Correct Normals"
-msgstr "أجهض التحول."
+msgstr "أجهض التحول"
#: scene/resources/material.cpp
msgid "Albedo Tex MSDF"
@@ -26982,7 +26997,7 @@ msgstr ""
#: scene/resources/material.cpp servers/visual_server.cpp
#, fuzzy
msgid "Parameters"
-msgstr "لقد تم تغيير المَعلم:"
+msgstr "لقد تم تغيير المَعلم"
#: scene/resources/material.cpp
#, fuzzy
@@ -27026,7 +27041,7 @@ msgstr ""
#: scene/resources/material.cpp
#, fuzzy
msgid "Grow Amount"
-msgstr "الكمية:"
+msgstr "الكمية"
#: scene/resources/material.cpp
msgid "Use Alpha Scissor"
@@ -27133,7 +27148,7 @@ msgstr "الإنتقال"
#: scene/resources/material.cpp
#, fuzzy
msgid "Refraction"
-msgstr "التباعُدات:"
+msgstr "التباعُدات"
#: scene/resources/material.cpp
msgid "Detail"
@@ -27198,12 +27213,12 @@ msgstr "محو التَحَوّل"
#: scene/resources/multimesh.cpp
#, fuzzy
msgid "Color Format"
-msgstr "مُشغّل اللون."
+msgstr "مُشغّل اللون"
#: scene/resources/multimesh.cpp
#, fuzzy
msgid "Transform Format"
-msgstr "أجهض التحول."
+msgstr "أجهض التحول"
#: scene/resources/multimesh.cpp
msgid "Custom Data Format"
@@ -27221,7 +27236,7 @@ msgstr ""
#: scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Sampling"
-msgstr "تحجيم:"
+msgstr "تحجيم"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -27231,7 +27246,7 @@ msgstr "حدد نوع المتغير"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Parsed Geometry Type"
-msgstr "توزيع الأشكال الهندسية..."
+msgstr "توزيع الأشكال الهندسية"
#: scene/resources/navigation_mesh.cpp
msgid "Source Geometry Mode"
@@ -27249,7 +27264,7 @@ msgstr ""
#: scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Agents"
-msgstr "معاملات المشهد الرئيس:"
+msgstr "معاملات المشهد الرئيس"
#: scene/resources/navigation_mesh.cpp
msgid "Max Climb"
@@ -27290,7 +27305,7 @@ msgstr "أظهر الإفتراضي"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Sample Distance"
-msgstr "اختر المسافة:"
+msgstr "اختر المسافة"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -27317,7 +27332,7 @@ msgstr "توليد AABB"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Baking AABB Offset"
-msgstr "المُعادل:"
+msgstr "المُعادل"
#: scene/resources/occluder_shape.cpp
msgid "Spheres"
@@ -27362,7 +27377,7 @@ msgstr "مُعدّل تباطؤ الرؤية الحُرة"
#: scene/resources/particles_material.cpp
#, fuzzy
msgid "Point Texture"
-msgstr "نقاط الانبعاث:"
+msgstr "نقاط الانبعاث"
#: scene/resources/particles_material.cpp
msgid "Normal Texture"
@@ -27381,7 +27396,7 @@ msgstr "أضف منفذ أدخال"
#: scene/resources/particles_material.cpp
#, fuzzy
msgid "Scale Random"
-msgstr "نسبة التكبير:"
+msgstr "نسبة التكبير"
#: scene/resources/particles_material.cpp
#, fuzzy
@@ -27399,7 +27414,7 @@ msgstr ""
#: scene/resources/plane_shape.cpp
#, fuzzy
msgid "Plane"
-msgstr "التبويت:"
+msgstr "التبويت"
#: scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -27425,7 +27440,7 @@ msgstr ""
#: scene/resources/primitive_meshes.cpp
#, fuzzy
msgid "Top Radius"
-msgstr "نصف القطر:"
+msgstr "نصف القطر"
#: scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -27476,7 +27491,7 @@ msgstr "العظام"
#: scene/resources/sky.cpp
#, fuzzy
msgid "Radiance Size"
-msgstr "حجم الخطوط:"
+msgstr "حجم الخطوط"
#: scene/resources/sky.cpp
msgid "Panorama"
@@ -27490,7 +27505,7 @@ msgstr "الطابق التالي"
#: scene/resources/sky.cpp
#, fuzzy
msgid "Horizon Color"
-msgstr "تخزين الملف:"
+msgstr "تخزين الملف"
#: scene/resources/sky.cpp
#, fuzzy
@@ -27601,7 +27616,7 @@ msgstr "التقاط"
#: scene/resources/texture.cpp
#, fuzzy
msgid "From"
-msgstr "وضع التشغيل:"
+msgstr "وضع التشغيل"
#: scene/resources/texture.cpp
#, fuzzy
@@ -27769,7 +27784,7 @@ msgstr "أختبار"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
#, fuzzy
msgid "Default Edge Connection Margin"
-msgstr "تعديل الإتصال:"
+msgstr "تعديل الإتصال"
#: scene/resources/world_2d.cpp
msgid "Canvas"
@@ -27805,7 +27820,7 @@ msgstr "عنصر خِيار"
#: servers/audio/audio_stream.cpp
#, fuzzy
msgid "Random Pitch"
-msgstr "إمالة عشوائية:"
+msgstr "إمالة عشوائية"
#: servers/audio/effects/audio_effect_capture.cpp
#: servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -27857,7 +27872,7 @@ msgstr ""
#: servers/audio/effects/audio_effect_panner.cpp
#, fuzzy
msgid "Pan"
-msgstr "التبويت:"
+msgstr "التبويت"
#: servers/audio/effects/audio_effect_compressor.cpp
#: servers/audio/effects/audio_effect_filter.cpp
@@ -27955,7 +27970,7 @@ msgstr ""
#: servers/audio/effects/audio_effect_spectrum_analyzer.cpp
#, fuzzy
msgid "FFT Size"
-msgstr "الحجم:"
+msgstr "الحجم"
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Predelay"
@@ -27985,7 +28000,7 @@ msgstr ""
#: servers/audio/effects/audio_effect_stereo_enhance.cpp
#, fuzzy
msgid "Time Pullout (ms)"
-msgstr "انتهت المهلة."
+msgstr "انتهت المهلة"
#: servers/audio/effects/audio_effect_stereo_enhance.cpp
msgid "Surround"
@@ -28053,7 +28068,7 @@ msgstr ""
#: servers/physics_2d/physics_2d_server_sw.cpp
#, fuzzy
msgid "BP Hash Table Size"
-msgstr "الحجم:"
+msgstr "الحجم"
#: servers/physics_2d/physics_2d_server_sw.cpp
msgid "Large Object Surface Threshold In Cells"
@@ -28179,7 +28194,7 @@ msgstr "لا يمكن تعديل الثوابت."
#: servers/visual/visual_server_scene.cpp
#, fuzzy
msgid "Spatial Partitioning"
-msgstr "تجزئة..."
+msgstr "تجزئة"
#: servers/visual_server.cpp
#, fuzzy
@@ -28369,7 +28384,7 @@ msgstr ""
#: servers/visual_server.cpp
#, fuzzy
msgid "Batching"
-msgstr "جاري البحث..."
+msgstr "جاري البحث"
#: servers/visual_server.cpp
msgid "Use Batching"
@@ -28399,7 +28414,7 @@ msgstr ""
#: servers/visual_server.cpp
#, fuzzy
msgid "Max Join Items"
-msgstr "إدارة العناصر..."
+msgstr "إدارة العناصر"
#: servers/visual_server.cpp
msgid "Batch Buffer Size"
@@ -28502,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 d4ffe0665e..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 ""
@@ -12593,9 +12593,10 @@ msgstr "Yapışdır(Snap):"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13952,12 +13953,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22688,6 +22688,15 @@ msgstr "Maks. Xətti Xəta:"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "İnterpolasiya rejimi"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index 46640b0b55..728ffabe29 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -15,13 +15,16 @@
# Ziv D <wizdavid@gmail.com>, 2020.
# Violin Iliev <violin.developer@gmail.com>, 2021.
# Ivan Gechev <ivan_banov@abv.bg>, 2022.
+# BigHomieDripDrop <bartu.bali@gmail.com>, 2022.
+# xaio <xaio666@gmail.com>, 2022.
+# Vosh <vosh4k@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-04-28 11:11+0000\n"
-"Last-Translator: Любомир Василев <lyubomirv@gmx.com>\n"
+"PO-Revision-Date: 2022-10-25 15:43+0000\n"
+"Last-Translator: Vosh <vosh4k@gmail.com>\n"
"Language-Team: Bulgarian <https://hosted.weblate.org/projects/godot-engine/"
"godot/bg/>\n"
"Language: bg\n"
@@ -29,67 +32,59 @@ 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.12.1-dev\n"
+"X-Generator: Weblate 4.14.2-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
-msgstr ""
+msgstr "Драйвер за таблет"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Clipboard"
-msgstr "Отрязване над"
+msgstr "Клипборд"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Current Screen"
-msgstr "Текущо име на сцената"
+msgstr "Текуща Сцена"
#: core/bind/core_bind.cpp
msgid "Exit Code"
-msgstr ""
+msgstr "Изходен Код"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "V-Sync Enabled"
-msgstr "Включване"
+msgstr "V-Sync Включено"
#: core/bind/core_bind.cpp main/main.cpp
msgid "V-Sync Via Compositor"
-msgstr ""
+msgstr "V-Sync Чрез Композитора"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Delta Smoothing"
-msgstr ""
+msgstr "Делта Изглаждане"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Low Processor Usage Mode"
-msgstr "Режим на преместване"
+msgstr "Режим на Ниско Натоварване на Процесора"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode Sleep (µsec)"
-msgstr ""
+msgstr "Заспиване в Режим на Ниско Натоварване на Процесора (µsec)"
#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp
-#, fuzzy
msgid "Keep Screen On"
-msgstr "Дебъгерът да остане отворен"
+msgstr "Дръж Екрана Включен"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Min Window Size"
-msgstr "Размер на контура:"
+msgstr "Минимален Размер на Екрана"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Max Window Size"
-msgstr "Размер на контура:"
+msgstr "Максимален Размер на Екрана"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Screen Orientation"
-msgstr "Отваряне на документацията"
+msgstr "Ориентация на Екрана"
#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp
#: platform/uwp/os_uwp.cpp
@@ -102,7 +97,7 @@ msgstr "Без граници"
#: core/bind/core_bind.cpp
msgid "Per Pixel Transparency Enabled"
-msgstr ""
+msgstr "Попикселова Прозрачност Включено"
#: core/bind/core_bind.cpp core/project_settings.cpp
msgid "Fullscreen"
@@ -110,26 +105,24 @@ msgstr "Цял екран"
#: core/bind/core_bind.cpp
msgid "Maximized"
-msgstr ""
+msgstr "Максимизиран"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Minimized"
-msgstr "Инициализиране"
+msgstr "Минимизиран"
#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp
#: scene/gui/graph_node.cpp
msgid "Resizable"
-msgstr ""
+msgstr "Преоразмеряване е Възможно"
#: core/bind/core_bind.cpp core/os/input_event.cpp scene/2d/node_2d.cpp
#: scene/2d/physics_body_2d.cpp scene/2d/remote_transform_2d.cpp
#: scene/3d/physics_body.cpp scene/3d/remote_transform.cpp
#: scene/gui/control.cpp scene/gui/line_edit.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Position"
-msgstr "Създаване на функция"
+msgstr "Позиция"
#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp
#: main/main.cpp modules/gridmap/grid_map.cpp
@@ -140,60 +133,52 @@ msgstr "Създаване на функция"
#: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp
#: scene/resources/style_box.cpp scene/resources/texture.cpp
#: scene/resources/visual_shader.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Size"
-msgstr "Размер:"
+msgstr "Размер"
#: core/bind/core_bind.cpp
msgid "Endian Swap"
-msgstr ""
+msgstr "Размяна на Байтова Крайност"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Editor Hint"
-msgstr "Тема на редактора"
+msgstr "Съвет за Редактора"
#: core/bind/core_bind.cpp
msgid "Print Error Messages"
-msgstr "Принирай съобщения за грешки"
+msgstr "Принтирай съобщения за грешки"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Iterations Per Second"
-msgstr "Режим на интерполация"
+msgstr "Итерации в Секунда"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Target FPS"
-msgstr "Принудително изпращане"
+msgstr "Целеви FPS"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Time Scale"
-msgstr "Текстурна област"
+msgstr "Времева Скала"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Physics Jitter Fix"
-msgstr ""
+msgstr "Корекция на Физично Трептене"
#: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Error"
msgstr "Грешка"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Error String"
-msgstr "Грешка при запазване"
+msgstr "Низ на Грешката"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Error Line"
-msgstr "Грешка при запазване"
+msgstr "Линия на Грешката"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Result"
-msgstr "Резултати от търсенето"
+msgstr "Резултат"
#: core/command_queue_mt.cpp core/message_queue.cpp main/main.cpp
msgid "Memory"
@@ -208,16 +193,15 @@ msgstr "Памет"
#: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h
#: servers/visual_server.cpp
msgid "Limits"
-msgstr ""
+msgstr "Ограничения"
#: core/command_queue_mt.cpp
-#, fuzzy
msgid "Command Queue"
-msgstr "Command: завъртане"
+msgstr "Oпашка от Kоманди"
#: core/command_queue_mt.cpp
msgid "Multithreading Queue Size (KB)"
-msgstr ""
+msgstr "Размер на Многонишковата Опашка (KB)"
#: core/func_ref.cpp modules/visual_script/visual_script_builtin_funcs.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
@@ -236,101 +220,92 @@ msgstr "Данни"
#: 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 "Профилиране на мрежата"
+msgstr "Мрежа"
#: core/io/file_access_network.cpp
msgid "Remote FS"
-msgstr "Отдалечена ФС"
+msgstr "Дистанционна ФС"
#: core/io/file_access_network.cpp
msgid "Page Size"
-msgstr "Размер на страница"
+msgstr "Размер на Страница"
#: core/io/file_access_network.cpp
msgid "Page Read Ahead"
-msgstr ""
+msgstr "Кеширане на Страницата"
#: core/io/http_client.cpp
msgid "Blocking Mode Enabled"
-msgstr ""
+msgstr "Блокиращ Режим Включен"
#: core/io/http_client.cpp
-#, fuzzy
msgid "Connection"
-msgstr "Свързване"
+msgstr "Връзка"
#: core/io/http_client.cpp
msgid "Read Chunk Size"
-msgstr ""
+msgstr "Размер на Прочетеното Парче"
#: core/io/marshalls.cpp
-#, fuzzy
msgid "Object ID"
-msgstr "Изчертани обекти:"
+msgstr "Обект ID"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
-#, fuzzy
msgid "Allow Object Decoding"
-msgstr "Показване на избледняващи кадри"
+msgstr "Разреши Декодирането на Обекта"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
msgid "Refuse New Network Connections"
msgstr "Отказ на нови мрежови връзки"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Network Peer"
-msgstr "Профилиране на мрежата"
+msgstr "Мрежов Връстник"
#: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp
-#, fuzzy
msgid "Root Node"
-msgstr "Име на коренния обект"
+msgstr "Коренен Връх"
#: core/io/networked_multiplayer_peer.cpp
-#, fuzzy
msgid "Refuse New Connections"
-msgstr "Свързване"
+msgstr "Отказ на нови връзки"
#: core/io/networked_multiplayer_peer.cpp
-#, fuzzy
msgid "Transfer Mode"
-msgstr "Панорамен режим"
+msgstr "Режим на трансфер"
#: core/io/packet_peer.cpp
msgid "Encode Buffer Max Size"
-msgstr ""
+msgstr "Максимален размер на буфера за кодиране"
#: core/io/packet_peer.cpp
msgid "Input Buffer Max Size"
-msgstr ""
+msgstr "Максимален размер на входния буфер"
#: core/io/packet_peer.cpp
msgid "Output Buffer Max Size"
-msgstr ""
+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
msgid "Data Array"
-msgstr ""
+msgstr "Масив от Данни"
#: core/io/stream_peer_ssl.cpp
msgid "Blocking Handshake"
-msgstr ""
+msgstr "Блокиращ Handshake"
#: core/io/udp_server.cpp
-#, fuzzy
msgid "Max Pending Connections"
-msgstr "Редактиране на Връзката:"
+msgstr "Максимален брой чакащи връзки"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -350,9 +325,8 @@ msgid "Not enough bytes for decoding bytes, or invalid format."
msgstr "Недостатъчно байтове за разкодиране или неправилен формат."
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid input %d (not passed) in expression"
-msgstr "Неправилен входен параметър %i (не е подаден) в израза"
+msgstr "Неправилен входен параметър %d (не е подаден) в израза"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -385,13 +359,12 @@ msgid "Seed"
msgstr ""
#: core/math/random_number_generator.cpp
-#, fuzzy
msgid "State"
-msgstr "Ротация"
+msgstr "Състояние"
#: core/message_queue.cpp
msgid "Message Queue"
-msgstr ""
+msgstr "Опашка на съобщения"
#: core/message_queue.cpp
msgid "Max Size (KB)"
@@ -404,7 +377,7 @@ msgstr "Режим на преместване"
#: core/os/input.cpp
msgid "Use Accumulated Input"
-msgstr ""
+msgstr "Ползвай акумулиран вход"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: servers/audio_server.cpp
@@ -432,9 +405,8 @@ msgid "Command"
msgstr "Command"
#: 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
@@ -445,19 +417,20 @@ msgstr "Натиснат"
#: core/os/input_event.cpp
#, fuzzy
msgid "Scancode"
-msgstr "Сканиране"
+msgstr "Сканкод"
#: core/os/input_event.cpp
msgid "Physical Scancode"
-msgstr ""
+msgstr "Физически сканкод"
#: core/os/input_event.cpp
msgid "Unicode"
msgstr "Уникод"
#: core/os/input_event.cpp
+#, fuzzy
msgid "Echo"
-msgstr ""
+msgstr "Echo"
#: core/os/input_event.cpp scene/gui/base_button.cpp
#, fuzzy
@@ -465,19 +438,16 @@ msgid "Button Mask"
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
-#, fuzzy
msgid "Factor"
-msgstr "Вектор"
+msgstr "Фактор"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Button Index"
-msgstr "Бутон"
+msgstr "Индекс на бутона"
#: core/os/input_event.cpp
msgid "Doubleclick"
@@ -485,7 +455,7 @@ msgstr "Двоен клик"
#: core/os/input_event.cpp
msgid "Tilt"
-msgstr ""
+msgstr "Наклон"
#: core/os/input_event.cpp
msgid "Pressure"
@@ -493,11 +463,11 @@ msgstr "Натиск"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "Писалка обърната"
#: core/os/input_event.cpp
msgid "Relative"
-msgstr ""
+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
@@ -513,9 +483,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
#, fuzzy
@@ -538,14 +507,12 @@ msgid "Delta"
msgstr "Делта"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Channel"
-msgstr "Промяна на филтъра"
+msgstr "Канал"
#: core/os/input_event.cpp main/main.cpp
-#, fuzzy
msgid "Message"
-msgstr "Съобщение за подаването"
+msgstr "Съобщение"
#: core/os/input_event.cpp
#, fuzzy
@@ -555,9 +522,8 @@ 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"
@@ -575,14 +541,12 @@ msgstr "Стойност на контролер"
#: 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 "Действие"
+msgstr "Приложение"
#: core/project_settings.cpp main/main.cpp
-#, fuzzy
msgid "Config"
-msgstr "Настройване на прилепването"
+msgstr "Конфигурация"
#: core/project_settings.cpp
#, fuzzy
@@ -632,28 +596,27 @@ msgstr "Заключен елемент"
#: core/project_settings.cpp
msgid "Use Hidden Project Data Directory"
-msgstr ""
+msgstr "Ползвай скрита дата директория на проекта"
#: core/project_settings.cpp
msgid "Use Custom User Dir"
-msgstr ""
+msgstr "Ползвай персоналната директория на потребителя"
#: 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
#: 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
@@ -662,20 +625,19 @@ msgstr ""
#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp
#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp
msgid "Height"
-msgstr ""
+msgstr "Височина"
#: core/project_settings.cpp
msgid "Always On Top"
-msgstr ""
+msgstr "Винаги отгоре"
#: core/project_settings.cpp
msgid "Test Width"
-msgstr ""
+msgstr "Тестова широчина"
#: core/project_settings.cpp
-#, fuzzy
msgid "Test Height"
-msgstr "Тестово"
+msgstr "Тестова височина"
#: core/project_settings.cpp editor/animation_track_editor.cpp
#: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp
@@ -684,36 +646,34 @@ msgstr "Аудио"
#: core/project_settings.cpp
msgid "Default Bus Layout"
-msgstr ""
+msgstr "Bus Layout по подразбиране"
#: core/project_settings.cpp editor/editor_export.cpp
#: editor/editor_file_system.cpp editor/editor_node.cpp
#: editor/editor_settings.cpp editor/script_create_dialog.cpp
#: scene/2d/camera_2d.cpp scene/3d/light.cpp scene/main/node.cpp
msgid "Editor"
-msgstr ""
+msgstr "Редактор"
#: core/project_settings.cpp
msgid "Main Run Args"
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
@@ -727,7 +687,7 @@ msgstr "Вход"
#: core/project_settings.cpp
msgid "UI Accept"
-msgstr ""
+msgstr "UI Приемам"
#: core/project_settings.cpp
#, fuzzy
@@ -741,38 +701,35 @@ msgstr "Отказ"
#: core/project_settings.cpp
msgid "UI Focus Next"
-msgstr ""
+msgstr "UI фокус следващ"
#: core/project_settings.cpp
msgid "UI Focus Prev"
-msgstr ""
+msgstr "UI фокус предишен"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Left"
-msgstr "Горе вляво"
+msgstr "UI наляво"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Right"
-msgstr "Горе вдясно"
+msgstr "UI надясно"
#: core/project_settings.cpp
msgid "UI Up"
-msgstr ""
+msgstr "UI нагоре"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Down"
-msgstr "Надолу"
+msgstr "UI надолу"
#: core/project_settings.cpp
msgid "UI Page Up"
-msgstr ""
+msgstr "UI страница нагоре"
#: core/project_settings.cpp
msgid "UI Page Down"
-msgstr ""
+msgstr "UI страница надолу"
#: core/project_settings.cpp
msgid "UI Home"
@@ -792,7 +749,7 @@ msgstr "На края"
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
msgid "Physics"
-msgstr ""
+msgstr "Физика"
#: core/project_settings.cpp editor/editor_settings.cpp
#: editor/import/resource_importer_layered_texture.cpp
@@ -802,11 +759,11 @@ msgstr ""
#: 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
msgid "Smooth Trimesh Collision"
-msgstr ""
+msgstr "Плавен тримеш сблъсък"
#: core/project_settings.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles2/rasterizer_scene_gles2.cpp
@@ -818,7 +775,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
@@ -828,18 +785,17 @@ 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
#: servers/visual_server.cpp
-#, fuzzy
msgid "Filters"
-msgstr "Филтри:"
+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
@@ -855,19 +811,18 @@ msgstr "Дебъгване"
#: core/project_settings.cpp main/main.cpp modules/gdscript/gdscript.cpp
#: modules/visual_script/visual_script.cpp scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Settings"
-msgstr "Настройки:"
+msgstr "Настройки"
#: core/project_settings.cpp editor/script_editor_debugger.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
msgid "Profiler"
-msgstr ""
+msgstr "Профайлър"
#: core/project_settings.cpp
#, fuzzy
msgid "Max Functions"
-msgstr "Преобразуване във функция"
+msgstr "Макс функции"
#: core/project_settings.cpp scene/3d/vehicle_body.cpp
msgid "Compression"
@@ -875,31 +830,31 @@ msgstr "Компресиране"
#: core/project_settings.cpp
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"
@@ -914,26 +869,24 @@ 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 "Максимален размер на буфера (степен от 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
msgid "Certificates"
-msgstr "Вертекси:"
+msgstr "Сертификати"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_resource_picker.cpp
@@ -942,9 +895,8 @@ msgid "Resource"
msgstr "Ресурс"
#: core/resource.cpp
-#, fuzzy
msgid "Local To Scene"
-msgstr "Затваряне на сцената"
+msgstr "Локално на сцената"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_autoload_settings.cpp editor/plugins/path_editor_plugin.cpp
@@ -954,22 +906,20 @@ msgid "Path"
msgstr "Път"
#: core/script_language.cpp
-#, fuzzy
msgid "Source Code"
-msgstr "Източник за полигонна мрежа:"
+msgstr "Изходен код"
#: core/translation.cpp editor/project_settings_editor.cpp
msgid "Locale"
-msgstr ""
+msgstr "Локал"
#: core/translation.cpp
-#, fuzzy
msgid "Test"
-msgstr "Тестово"
+msgstr "Тест"
#: core/translation.cpp scene/resources/font.cpp
msgid "Fallback"
-msgstr ""
+msgstr "Резервен вариант"
#: core/ustring.cpp scene/resources/segment_shape_2d.cpp
msgid "B"
@@ -1005,12 +955,12 @@ msgstr "ЕиБ"
#: 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
msgid "Canvas Polygon Buffer Size (KB)"
-msgstr ""
+msgstr "Размер на буфера на полигона на канавата (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
@@ -1027,7 +977,7 @@ msgstr ""
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/visual_server.cpp
msgid "2D"
-msgstr ""
+msgstr "2D"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
@@ -1055,28 +1005,27 @@ msgstr "Изпичане на карти на осветеност"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
msgid "Use Bicubic Sampling"
-msgstr ""
+msgstr "Ползвай Bicubic семплиране"
#: 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
msgid "Max Renderable Reflections"
-msgstr "Центриране върху избраното"
+msgstr "Макс рендерируеми отражения"
#: 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
@@ -1093,7 +1042,7 @@ msgstr "Скалиране"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Follow Surface"
-msgstr ""
+msgstr "Следвай повърхност"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Weight Samples"
@@ -1105,7 +1054,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)"
@@ -1138,7 +1087,7 @@ msgstr "Вмъкване на ключ тук"
#: editor/animation_bezier_editor.cpp
msgid "Duplicate Selected Key(s)"
-msgstr "Копиране на избран(и) ключ(ове)"
+msgstr "Дупликат на избран(и) ключ(ове)"
#: editor/animation_bezier_editor.cpp
msgid "Delete Selected Key(s)"
@@ -1183,22 +1132,20 @@ msgstr "Промяна на повикана функция (Анимация)"
#: editor/animation_track_editor.cpp scene/2d/animated_sprite.cpp
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Frame"
-msgstr "Добавяне на кадър"
+msgstr "Кадър"
#: editor/animation_track_editor.cpp editor/editor_profiler.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
#: scene/resources/particles_material.cpp servers/visual_server.cpp
msgid "Time"
-msgstr ""
+msgstr "Време"
#: editor/animation_track_editor.cpp editor/import/resource_importer_scene.cpp
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Location"
-msgstr "Стъпка при завъртане:"
+msgstr "Местоположение"
#: editor/animation_track_editor.cpp modules/gltf/gltf_node.cpp
#: scene/2d/polygon_2d.cpp scene/2d/remote_transform_2d.cpp
@@ -1220,29 +1167,31 @@ 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
#: 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 "Тип"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "In Handle"
-msgstr ""
+msgstr "In Handle"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Out Handle"
-msgstr ""
+msgstr "Out Handle"
#: editor/animation_track_editor.cpp
#: editor/import/resource_importer_texture.cpp
#: 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
@@ -1265,8 +1214,9 @@ msgid "Animation"
msgstr "Анимация"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Easing"
-msgstr ""
+msgstr "Easing"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
@@ -1376,19 +1326,16 @@ msgid "Remove this track."
msgstr "Премахване на тази пътечка."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Time (s):"
-msgstr "Време (сек): "
+msgstr "Време (сек):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Position:"
-msgstr "Създаване на функция"
+msgstr "Позиция:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Rotation:"
-msgstr "Стъпка при завъртане:"
+msgstr "Завъртане:"
#: editor/animation_track_editor.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -1683,7 +1630,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Clipboard is empty!"
-msgstr ""
+msgstr "Клипбордът е празен!"
#: editor/animation_track_editor.cpp
msgid "Paste Tracks"
@@ -2126,7 +2073,7 @@ msgstr ""
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
-msgstr ""
+msgstr "Сигнали"
#: editor/connections_dialog.cpp
msgid "Filter signals"
@@ -3730,7 +3677,7 @@ msgstr ""
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp
msgid "Node"
-msgstr "Обект"
+msgstr "Връх"
#: editor/editor_network_profiler.cpp
msgid "Incoming RPC"
@@ -6950,7 +6897,7 @@ msgstr ""
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
msgid "sRGB"
-msgstr ""
+msgstr "sRGB"
#: editor/import/resource_importer_layered_texture.cpp
#, fuzzy
@@ -8206,6 +8153,7 @@ msgstr "Режим на възпроизвеждане:"
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#, fuzzy
msgid "AnimationTree"
msgstr "AnimationTree"
@@ -10998,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 ""
@@ -12831,9 +12779,10 @@ msgstr "Настройки за прилепването"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Отместване:"
@@ -14194,16 +14143,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Неправилен път до проекта (Променяли ли сте нещо?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Файлът „project.godot“ не може да бъде зареден от пътя на проекта (грешка "
"%d). Възможно е той да липсва или да е повреден."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Не може да бъде отворен проектът в „%s“."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -18769,14 +18719,13 @@ msgid "Code Signing"
msgstr "Сигнал"
#: 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“ не може да бъде намерена.\n"
-"Проверете дали командата е налична в папката „build-tools“ на Android SDK.\n"
-"Резултатният файл „%s“ не е подписан."
+"Командата „apksigner“ не може да бъде намерена. Проверете дали командата е "
+"налична в папката „build-tools“ на Android SDK. Резултатният файл „%s“ не е "
+"подписан."
#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
@@ -18823,9 +18772,8 @@ msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Неправилно име! Android APK изисква разширение *.apk."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Unsupported export format!"
-msgstr "Неподдържан формат за изнасяне!\n"
+msgstr "Неподдържан формат за изнасяне!"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -18848,10 +18796,8 @@ msgstr ""
"името на проекта"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files to gradle project."
-msgstr ""
-"Файловете на проекта не могат да бъдат изнесени като проект на gradle.\n"
+msgstr "Файловете на проекта не могат да бъдат изнесени като проект на gradle."
#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
@@ -18862,15 +18808,13 @@ msgid "Building Android Project (gradle)"
msgstr "Компилиране на проект за Android (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 ""
"Компилирането на проекта за Android беше неуспешно. Вижте изхода за "
-"грешката.\n"
-"Може също да разгледате документацията за компилиране за Android на docs."
-"godotengine.org."
+"грешката. Може също да разгледате документацията за компилиране за Android "
+"на docs.godotengine.org."
#: platform/android/export/export_plugin.cpp
msgid "Moving output"
@@ -18894,22 +18838,18 @@ msgid "Creating APK..."
msgstr "Създаване на APK…"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not find template APK to export: \"%s\"."
-msgstr ""
-"Не е намерен шаблонен файл APK за изнасяне:\n"
-"%s"
+msgstr "Не е намерен шаблонен файл APK за изнасяне: %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 ""
-"В шаблона за изнасяне липсват библиотеки за избраните архитектури: %s.\n"
-"Моля, създайте шаблон с всички необходими библиотеки или махнете отметките "
-"от липсващите архитектури в конфигурацията за изнасяне."
+"В шаблона за изнасяне липсват библиотеки за избраните архитектури: %s. Моля, "
+"създайте шаблон с всички необходими библиотеки или махнете отметките от "
+"липсващите архитектури в конфигурацията за изнасяне."
#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
@@ -19762,10 +19702,8 @@ msgid "ZIP Creation"
msgstr "Проект"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not open file to read from path \"%s\"."
-msgstr ""
-"Файловете на проекта не могат да бъдат изнесени като проект на gradle.\n"
+msgstr "Файловете на проекта не могат да бъдат изнесени като проект на gradle."
#: platform/osx/export/export.cpp
msgid "Invalid bundle identifier:"
@@ -23398,6 +23336,15 @@ msgstr "Грешка от %s"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Сортиране"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -25772,16 +25719,15 @@ msgstr "Цветове"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Preset BG"
-msgstr "Конфигурация…"
+msgstr "Предварителна настройка BG"
#: scene/resources/default_theme/default_theme.cpp
msgid "Overbright Indicator"
msgstr ""
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Preset FG"
-msgstr "Конфигурация…"
+msgstr "Предварителна настройка FG"
#: scene/resources/default_theme/default_theme.cpp
msgid "Preset BG Icon"
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index f32a090f27..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 ""
@@ -13807,9 +13804,10 @@ msgstr "অ্যানিমেশনের সিদ্ধান্তসম
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "অফসেট/ভারসাম্য:"
@@ -15277,14 +15275,13 @@ msgstr "অকার্যকর প্রকল্পের পথ (কোন
#: editor/project_manager.cpp
#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr "প্রকল্পের পথে engine.cfg তৈরি করা সম্ভব হয়নি।"
#: editor/project_manager.cpp
#, fuzzy
-msgid "Couldn't edit project.godot in project path."
-msgstr "প্রকল্পের পথে engine.cfg তৈরি করা সম্ভব হয়নি।"
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "সংযোগ..."
#: editor/project_manager.cpp
#, fuzzy
@@ -24888,6 +24885,15 @@ msgstr "সমস্যা/ভুল"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "সাজান:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/br.po b/editor/translations/br.po
index 7b92059104..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 ""
@@ -12459,9 +12459,10 @@ msgstr "Tro Fiñvskeudenn"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13803,12 +13804,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22459,6 +22459,15 @@ msgstr "Melezour"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Mod Interpoladur"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index b08b3be823..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 ""
@@ -13232,9 +13232,10 @@ msgstr "Opcions d'Ajustament"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "òfset:"
@@ -14752,16 +14753,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "El Camí del Projecte no és vàlid (S'ha produit algun canvi?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"No es pot carregar el fitxer 'project.godot' en el camí del projecte (error "
"%d). Pot ser que falti o que estigui malmès."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "No es pot editar el fitxer 'project.godot' en el camí del projecte."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "No es pot obrir el projecte a '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -24377,6 +24379,15 @@ msgstr "Error"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Ordena"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index ed04f66e4b..ee5bb962be 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -31,13 +31,15 @@
# Petr Voparil <voparil.petr96@gmail.com>, 2022.
# 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, 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-08-30 03:11+0000\n"
-"Last-Translator: Petr Voparil <voparil.petr96@gmail.com>\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"
"Language: cs\n"
@@ -45,11 +47,11 @@ 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.14.1-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
-msgstr ""
+msgstr "Ovladače grafického tabletu"
#: core/bind/core_bind.cpp
msgid "Clipboard"
@@ -64,13 +66,12 @@ msgid "Exit Code"
msgstr "Kód pro ukončení (exit code)"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "V-Sync Enabled"
-msgstr "V-Sync Zapnutý"
+msgstr "V-Sync zapnutý"
#: core/bind/core_bind.cpp main/main.cpp
msgid "V-Sync Via Compositor"
-msgstr ""
+msgstr "V-Sync Pomocí Kompozitoru"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Delta Smoothing"
@@ -92,22 +93,20 @@ msgstr "Nechat ladící program otevřený"
#: core/bind/core_bind.cpp
msgid "Min Window Size"
-msgstr "Minimální Velikost Okna"
+msgstr "Minimální velikost okna"
#: core/bind/core_bind.cpp
msgid "Max Window Size"
-msgstr "Maximální Velikost Okna"
+msgstr "Maximální velikost okna"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Screen Orientation"
-msgstr "Operátor screen."
+msgstr "Orientace obrazovky"
#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp
#: platform/uwp/os_uwp.cpp
-#, fuzzy
msgid "Window"
-msgstr "Nové okno"
+msgstr "Okno"
#: core/bind/core_bind.cpp core/project_settings.cpp
#, fuzzy
@@ -126,7 +125,7 @@ msgstr "Přepnout celou obrazovku"
#: core/bind/core_bind.cpp
msgid "Maximized"
-msgstr ""
+msgstr "Maximalizováno"
#: core/bind/core_bind.cpp
#, fuzzy
@@ -223,7 +222,7 @@ msgstr "Paměť"
#: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h
#: servers/visual_server.cpp
msgid "Limits"
-msgstr ""
+msgstr "Limity"
#: core/command_queue_mt.cpp
#, fuzzy
@@ -252,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
@@ -283,9 +281,8 @@ msgid "Read Chunk Size"
msgstr ""
#: core/io/marshalls.cpp
-#, fuzzy
msgid "Object ID"
-msgstr "Kreslené objekty:"
+msgstr "ID Objektu"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
#, fuzzy
@@ -406,7 +403,7 @@ msgstr "Status"
#: core/message_queue.cpp
msgid "Message Queue"
-msgstr ""
+msgstr "Fronta zpráv"
#: core/message_queue.cpp
msgid "Max Size (KB)"
@@ -444,7 +441,7 @@ msgstr "Správa verzí"
#: core/os/input_event.cpp
msgid "Meta"
-msgstr ""
+msgstr "Meta"
#: core/os/input_event.cpp
#, fuzzy
@@ -518,7 +515,7 @@ msgstr "Profil"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "Tužka invertována"
#: core/os/input_event.cpp
#, fuzzy
@@ -588,7 +585,7 @@ msgstr "Inicializovat"
#: core/os/input_event.cpp
msgid "Instrument"
-msgstr ""
+msgstr "Nástroj"
#: core/os/input_event.cpp
#, fuzzy
@@ -607,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
@@ -662,8 +658,9 @@ msgid "Use Hidden Project Data Directory"
msgstr ""
#: core/project_settings.cpp
+#, fuzzy
msgid "Use Custom User Dir"
-msgstr ""
+msgstr "Použít vlastní uživatelské dir"
#: core/project_settings.cpp
msgid "Custom User Dir Name"
@@ -1053,8 +1050,9 @@ msgstr "Vyrovnávací Paměti"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
+#, fuzzy
msgid "Canvas Polygon Buffer Size (KB)"
-msgstr ""
+msgstr "Velikost zásobníku polygonového plátna (v KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
@@ -1107,7 +1105,7 @@ msgstr ""
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Lights"
-msgstr ""
+msgstr "Maximální počet renderovatelných světel"
#: drivers/gles3/rasterizer_scene_gles3.cpp
#, fuzzy
@@ -1115,8 +1113,9 @@ msgid "Max Renderable Reflections"
msgstr "Vycentrovat výběr"
#: drivers/gles3/rasterizer_scene_gles3.cpp
+#, fuzzy
msgid "Max Lights Per Object"
-msgstr ""
+msgstr "Maximální počet světel na objekt"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Subsurface Scattering"
@@ -1265,7 +1264,7 @@ msgstr "Množství:"
#: editor/animation_track_editor.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
msgid "Args"
-msgstr ""
+msgstr "Argumenty"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/script_editor_debugger.cpp modules/gltf/gltf_accessor.cpp
@@ -1288,8 +1287,9 @@ msgstr "Nastavit úchyt"
#: editor/import/resource_importer_texture.cpp
#: 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
+#, fuzzy
msgid "Stream"
-msgstr ""
+msgstr "Stream"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1576,14 +1576,12 @@ msgstr "Odstranit stopu animace"
#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Editors"
-msgstr "Editor"
+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
@@ -2322,7 +2320,7 @@ msgstr "Otevřít"
#: editor/dependency_editor.cpp
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "Vlastníci: %s (Dohromady: %d)"
#: editor/dependency_editor.cpp
msgid ""
@@ -2883,8 +2881,9 @@ msgid "Choose"
msgstr "Vyberte"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Project export for platform:"
-msgstr ""
+msgstr "Exportovat projekt pro platformu:"
#: editor/editor_export.cpp
#, fuzzy
@@ -3014,8 +3013,9 @@ msgid "Binary Format"
msgstr "Operátor barvy."
#: editor/editor_export.cpp
+#, fuzzy
msgid "64 Bits"
-msgstr ""
+msgstr "64 Bitů"
#: editor/editor_export.cpp
msgid "Embed PCK"
@@ -3028,19 +3028,19 @@ msgstr "Oblast textury"
#: 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"
@@ -3089,8 +3089,9 @@ msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
msgstr "Při 32-bitovým exportu vestavěné PCK nemůže být větší než 4 GiB."
#: editor/editor_export.cpp
+#, fuzzy
msgid "Convert Text Resources To Binary On Export"
-msgstr ""
+msgstr "Konvertovat textové zdroje do binárky při exportu"
#: editor/editor_feature_profile.cpp
msgid "3D Editor"
@@ -3413,8 +3414,9 @@ msgid "Show Hidden Files"
msgstr "Zobrazit skryté soubory"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Disable Overwrite Warning"
-msgstr ""
+msgstr "Vypnout varování při přepsání"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
@@ -3516,8 +3518,9 @@ msgid "(Re)Importing Assets"
msgstr "(Re)Importování assetů"
#: editor/editor_file_system.cpp
+#, fuzzy
msgid "Reimport Missing Imported Files"
-msgstr ""
+msgstr "Znovu importovat chybějící importované soubory"
#: editor/editor_help.cpp scene/2d/camera_2d.cpp scene/gui/control.cpp
#: scene/gui/nine_patch_rect.cpp scene/resources/dynamic_font.cpp
@@ -3619,9 +3622,8 @@ msgstr ""
#: editor/plugins/script_text_editor.cpp
#: modules/gdscript/editor/gdscript_highlighter.cpp
#: modules/gdscript/gdscript_editor.cpp
-#, fuzzy
msgid "Text Editor"
-msgstr "Otevřít editor"
+msgstr "Editor textu"
#: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp
#: editor/plugins/shader_editor_plugin.cpp
@@ -3630,7 +3632,7 @@ msgstr "Nápověda"
#: editor/editor_help.cpp
msgid "Sort Functions Alphabetically"
-msgstr ""
+msgstr "Třídit funkce abecedně"
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -3750,10 +3752,12 @@ msgstr "(hodnota)"
msgid ""
"Pinning a value forces it to be saved even if it's equal to the default."
msgstr ""
+"Připnutí hodnoty vynutí její uložení, i když bude shodná s výchozí hodnotou."
#: editor/editor_inspector.cpp
+#, fuzzy
msgid "Pin value [Disabled because '%s' is editor-only]"
-msgstr ""
+msgstr "Připnout hodnotu [vypnuto jelikož '%s' je pouze v editoru]"
#: editor/editor_inspector.cpp
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
@@ -3770,11 +3774,11 @@ msgstr "Nastavit více:"
#: editor/editor_inspector.cpp
msgid "Pinned %s"
-msgstr ""
+msgstr "Připnuté %s"
#: editor/editor_inspector.cpp
msgid "Unpinned %s"
-msgstr ""
+msgstr "Nepřipnuté %s"
#: editor/editor_inspector.cpp
#, fuzzy
@@ -4414,80 +4418,73 @@ msgstr "%d více souborů"
msgid ""
"Unable to write to file '%s', file in use, locked or lacking permissions."
msgstr ""
+"Není možné zapisovat do souboru '%s', soubour je používán, uzamčen nebo "
+"chybí oprávnění."
#: editor/editor_node.cpp editor/editor_settings.cpp editor/scene_tree_dock.cpp
#: servers/arvr/arvr_interface.cpp
-#, fuzzy
msgid "Interface"
-msgstr "Uživatelské rozhraní"
+msgstr "Rozhraní"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Scene Tabs"
-msgstr "Přepnout záložku scény"
+msgstr "Karty scén"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Always Show Close Button"
-msgstr "Vždy zobrazit mřížku"
+msgstr "Vždy zobrazit tlačítko zavření"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Resize If Many Tabs"
-msgstr ""
+msgstr "Změnit velikost při velkém počtu záložek"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Minimum Width"
-msgstr ""
+msgstr "Minimální šířka"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Output"
msgstr "Výstup"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Always Clear Output On Play"
-msgstr "Vymazat výstup"
+msgstr "Vždy vymazat výstup při spuštění"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Always Open Output On Play"
-msgstr ""
+msgstr "Vždy otevřít výstup při spuštění"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Always Close Output On Stop"
-msgstr ""
+msgstr "Vždy zavřít výstup při ukončení"
#: editor/editor_node.cpp
msgid "Save On Focus Loss"
msgstr ""
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Save Each Scene On Quit"
-msgstr "Uložit větev jako scénu"
+msgstr "Uložit všechny scény při vypnutí"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Quit Confirmation"
-msgstr "Zobrazit informace"
+msgstr "Potvrzení při vypnutí"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Show Update Spinner"
-msgstr "Schovat aktualizační kolečko"
+msgstr "Zobrazit aktualizační kolečko"
#: editor/editor_node.cpp
msgid "Update Continuously"
msgstr "Aktualizovat průběžně"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Update Vital Only"
-msgstr "Změny materiálu:"
+msgstr "Aktualizovat pouze důležité"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Localize Settings"
-msgstr "Lokalizace"
+msgstr "Lokalizační nastavení"
#: editor/editor_node.cpp
#, fuzzy
@@ -4496,7 +4493,7 @@ msgstr "Uzel TimeSeek"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Show Thumbnail On Hover"
-msgstr ""
+msgstr "Zobrazit náhled při překrytí"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Inspector"
@@ -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:"
@@ -5398,69 +5393,64 @@ msgid "Did you forget the '_run' method?"
msgstr "Nezapoměl jste metodu '_run'?"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Editor Language"
-msgstr "Rozložení editoru"
+msgstr "Jazyk editoru"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Display Scale"
-msgstr "Zobrazit všechny"
+msgstr "Škálování zobrazení"
#: editor/editor_settings.cpp
msgid "Custom Display Scale"
-msgstr ""
+msgstr "Vlastní škálování zobrazení"
#: editor/editor_settings.cpp
msgid "Main Font Size"
-msgstr ""
+msgstr "Velikost písma editoru"
#: editor/editor_settings.cpp
msgid "Code Font Size"
-msgstr ""
+msgstr "Velikost písma kódu"
#: editor/editor_settings.cpp
msgid "Font Antialiased"
-msgstr ""
+msgstr "Vyhlazování písma"
#: editor/editor_settings.cpp
msgid "Font Hinting"
-msgstr ""
+msgstr "Hinting písma"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Main Font"
-msgstr "Hlavní scéna"
+msgstr "Font editoru"
#: editor/editor_settings.cpp
msgid "Main Font Bold"
-msgstr ""
+msgstr "Tučný font editoru"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Code Font"
-msgstr "Přidat bod uzlu"
+msgstr "Font kódu"
#: editor/editor_settings.cpp
msgid "Dim Editor On Dialog Popup"
-msgstr ""
+msgstr "Ztmavit editor při zobrazení dialogového okna"
#: editor/editor_settings.cpp main/main.cpp
msgid "Low Processor Mode Sleep (µsec)"
-msgstr ""
+msgstr "Režim spánku s nízkým využitím procesoru (µs)"
#: editor/editor_settings.cpp
msgid "Unfocused Low Processor Mode Sleep (µsec)"
-msgstr ""
+msgstr "Nezaměřený režim spánku s nízkým využitím procesoru (µs)"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Separate Distraction Mode"
-msgstr "Nerozptylující režitm"
+msgstr "Oddělit nerozptylující režim"
#: editor/editor_settings.cpp
msgid "Automatically Open Screenshots"
-msgstr ""
+msgstr "Automaticky otevřít snímky obrazovky"
#: editor/editor_settings.cpp
msgid "Max Array Dictionary Items Per Page"
@@ -5474,58 +5464,54 @@ msgstr "Téma"
#: editor/editor_settings.cpp editor/import_dock.cpp
msgid "Preset"
-msgstr "Profil"
+msgstr "Předvolba"
#: editor/editor_settings.cpp
msgid "Icon And Font Color"
-msgstr ""
+msgstr "Barva ikon a písma"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Base Color"
-msgstr "Barvy"
+msgstr "Základní barva"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Accent Color"
-msgstr "Vyberte barvu"
+msgstr "Barva zvýraznění"
#: editor/editor_settings.cpp scene/resources/environment.cpp
msgid "Contrast"
-msgstr ""
+msgstr "Kontrast"
#: editor/editor_settings.cpp
+#, fuzzy
msgid "Relationship Line Opacity"
-msgstr ""
+msgstr "Průhlednost linky relace"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Highlight Tabs"
-msgstr "Ukládám světelné mapy"
+msgstr "Zvýraznit karty"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Border Size"
-msgstr "Hraniční pixely"
+msgstr "Velikost okrajů"
#: editor/editor_settings.cpp
+#, fuzzy
msgid "Use Graph Node Headers"
-msgstr ""
+msgstr "Použít uzly záhlaví grafů"
#: editor/editor_settings.cpp
#, fuzzy
msgid "Additional Spacing"
-msgstr "Opakování animace"
+msgstr "Přídavné mezerování"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Custom Theme"
-msgstr "Motiv editoru"
+msgstr "Vlastní téma"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Script Button"
-msgstr "Pravé tlačítko kolečka"
+msgstr "Ukázat tlačítko skriptu"
#: editor/editor_settings.cpp
#, fuzzy
@@ -5538,9 +5524,8 @@ msgid "Autoscan Project Path"
msgstr "Cesta k projektu:"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Project Path"
-msgstr "Cesta k projektu:"
+msgstr "Výchozí cesta k projektu"
#: editor/editor_settings.cpp
#, fuzzy
@@ -5562,9 +5547,8 @@ msgid "File Dialog"
msgstr "XForm dialog"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Thumbnail Size"
-msgstr "Náhled..."
+msgstr "Velikost náhledu"
#: editor/editor_settings.cpp
msgid "Docks"
@@ -5577,83 +5561,73 @@ msgstr "Úpravy stromu scény"
#: editor/editor_settings.cpp
msgid "Start Create Dialog Fully Expanded"
-msgstr ""
+msgstr "Plně rozbalit dialog vytvoření při spuštění"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Always Show Folders"
-msgstr "Vždy zobrazit mřížku"
+msgstr "Vždy zobrazit složky"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Property Editor"
-msgstr "Editor skupin"
+msgstr "Editor oblasti"
#: editor/editor_settings.cpp
msgid "Auto Refresh Interval"
-msgstr ""
+msgstr "Automatický interval obnovení"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Subresource Hue Tint"
-msgstr "Dílčí zdroje"
+msgstr "Podzdroj odstínu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Color Theme"
-msgstr "Motiv editoru"
+msgstr "Barevné téma"
#: editor/editor_settings.cpp scene/3d/label_3d.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Line Spacing"
-msgstr ""
+msgstr "Řádkování"
#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp
#: modules/gdscript/editor/gdscript_highlighter.cpp
-#, fuzzy
msgid "Highlighting"
-msgstr "Přímé osvětlení"
+msgstr "Zvýrazňování"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Syntax Highlighting"
-msgstr "Zvýrazňovač syntaxe"
+msgstr "Zvýrazňování syntaxe"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "Highlight All Occurrences"
-msgstr ""
+msgstr "Zvýraznit všechny výskyty"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "Highlight Current Line"
-msgstr ""
+msgstr "Zvýraznit aktuální řádek"
#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp
msgid "Highlight Type Safe Lines"
msgstr ""
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Indent"
-msgstr "Odsadit zleva"
+msgstr "Odsazení"
#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
msgstr "Automatické odsazení"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Convert Indent On Save"
-msgstr "Převést odsazení na mezery"
+msgstr "Konvertovat odsazení při uložení"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Draw Tabs"
-msgstr "Vykreslovací volání:"
+msgstr "Vykreslit taby"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Draw Spaces"
-msgstr "Vykreslovací volání:"
+msgstr "Vykreslit mezery"
#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/tile_map.cpp
@@ -5664,47 +5638,43 @@ msgstr "Navigace"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "Smooth Scrolling"
-msgstr ""
+msgstr "Plynulé posouvání"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "V Scroll Speed"
-msgstr ""
+msgstr "Vertikální rychlost posouvání"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Minimap"
-msgstr "Zobrazit počátek"
+msgstr "Zobrazit minimapu"
#: editor/editor_settings.cpp
msgid "Minimap Width"
-msgstr ""
+msgstr "Šířka minimapy"
#: editor/editor_settings.cpp
msgid "Mouse Extra Buttons Navigate History"
-msgstr ""
+msgstr "Navigační historie extra tlačítek myši"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Drag And Drop Selection"
-msgstr "GridMap Vyplnit výběr"
+msgstr "Výběr přetažením"
#: editor/editor_settings.cpp
msgid "Stay In Script Editor On Node Selected"
-msgstr ""
+msgstr "Zůstat v editoru skriptu při výběru uzlu"
#: editor/editor_settings.cpp
msgid "Appearance"
-msgstr ""
+msgstr "Vzhled"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Show Line Numbers"
-msgstr "Číslo řádku:"
+msgstr "Zobrazit čísla řádků"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Line Numbers Zero Padded"
-msgstr "Číslo řádku:"
+msgstr "Vyplnit čísla řádků nulami"
#: editor/editor_settings.cpp
msgid "Show Bookmark Gutter"
@@ -5721,110 +5691,105 @@ msgstr ""
#: editor/editor_settings.cpp
msgid "Code Folding"
-msgstr ""
+msgstr "Složení kódu"
#: editor/editor_settings.cpp
msgid "Word Wrap"
-msgstr ""
+msgstr "Zalamování"
#: editor/editor_settings.cpp
msgid "Show Line Length Guidelines"
-msgstr ""
+msgstr "Zobrazit vodící čáry délky řádků"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Soft Column"
-msgstr ""
+msgstr "Měkký sloupec čáry délky řádku"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Hard Column"
-msgstr ""
+msgstr "Tvrdý sloupec čáry délky řádku"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Script List"
-msgstr "Editor skriptů"
+msgstr "Seznam skriptů"
#: editor/editor_settings.cpp
msgid "Show Members Overview"
-msgstr ""
+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"
@@ -5832,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"
@@ -5923,49 +5877,43 @@ 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
-#, fuzzy
msgid "Grid Size"
-msgstr "Krok mřížky:"
+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
@@ -5973,235 +5921,206 @@ 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
-#, fuzzy
msgid "Visual Editors"
-msgstr "Editor skupin"
+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
@@ -6211,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"
@@ -6272,82 +6184,75 @@ 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"
-msgstr ""
+msgstr "Barva znaků"
#: editor/editor_settings.cpp
msgid "Keyword Color"
-msgstr ""
+msgstr "Barva klíčových slov"
#: editor/editor_settings.cpp
msgid "Control Flow Keyword Color"
msgstr ""
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Base Type Color"
-msgstr "Změnit základní typ"
+msgstr "Barva základního typu"
#: editor/editor_settings.cpp
msgid "Engine Type Color"
-msgstr ""
+msgstr "Barva typu enginu"
#: editor/editor_settings.cpp
msgid "User Type Color"
-msgstr ""
+msgstr "Barva typu uživatele"
#: editor/editor_settings.cpp
msgid "Comment Color"
-msgstr ""
+msgstr "Barva komentářů"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "String Color"
-msgstr "Ukládám soubor:"
+msgstr "Barva řetězců"
#: 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 "Neplatná barva pozadí."
+msgstr "Barva pozadí"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Background Color"
-msgstr "Neplatná barva pozadí."
+msgstr "Barva výplně pozadí"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Selected Color"
-msgstr "Importovat vybrané"
+msgstr "Barva výplně výběru"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
+#, fuzzy
msgid "Completion Existing Color"
-msgstr ""
+msgstr "Barva výběru existence"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Scroll Color"
-msgstr ""
+msgstr "Barva výplně scrollu"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Font Color"
-msgstr ""
+msgstr "Barva výplně fontu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Text Color"
-msgstr "Další patro"
+msgstr "Barva textu"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Line Number Color"
-msgstr "Číslo řádku:"
+msgstr "Barva čísla řádku"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -6356,82 +6261,73 @@ msgstr "Číslo řádku:"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Caret Color"
-msgstr ""
+msgstr "Barva stříšky"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Caret Background Color"
-msgstr "Neplatná barva pozadí."
+msgstr "Barva pozadí stříšky"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Text Selected Color"
-msgstr "Smazat vybraný"
+msgstr "Barva vybraného textu"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Selection Color"
-msgstr "Pouze výběr"
+msgstr "Barva výběru"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Brace Mismatch Color"
-msgstr ""
+msgstr "Barva neshody závorek"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Current Line Color"
-msgstr "Aktuální scéna"
+msgstr "Barva aktuálního řádku"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Color"
-msgstr ""
+msgstr "Barva čáry délky řádku"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Word Highlighted Color"
-msgstr "Zvýrazňovač syntaxe"
+msgstr "Barva zvýrazněného slova"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Number Color"
-msgstr ""
+msgstr "Barva čísel"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Function Color"
-msgstr "Funkce"
+msgstr "Barva funkcí"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Member Variable Color"
-msgstr "Přejmenovat proměnnou"
+msgstr "Barva proměnného člena"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Mark Color"
-msgstr "Vyberte barvu"
+msgstr "Barva označení"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Bookmark Color"
-msgstr "Záložky"
+msgstr "Barva záložky"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Breakpoint Color"
-msgstr "Breakpointy"
+msgstr "Barva bodu přerušení (Breakpointu)"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
+#, fuzzy
msgid "Executing Line Color"
-msgstr ""
+msgstr "Barva provádějící se linky"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Code Folding Color"
-msgstr ""
+msgstr "Barva složení kódu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Search Result Color"
-msgstr "Výsledky hledání"
+msgstr "Barva výsledků hledání"
#: editor/editor_settings.cpp
#, fuzzy
@@ -6748,7 +6644,7 @@ msgstr ""
#: editor/plugins/version_control_editor_plugin.cpp
#: platform/uwp/export/export.cpp platform/windows/export/export.cpp
msgid "Password"
-msgstr ""
+msgstr "Heslo"
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -7352,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"
@@ -7488,7 +7383,7 @@ msgstr "Pevné pixely"
#: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp
msgid "Lossy Quality"
-msgstr ""
+msgstr "Ztrátová kvalita"
#: editor/import/resource_importer_texture.cpp
#, fuzzy
@@ -7497,14 +7392,14 @@ msgstr "Režim výběru"
#: editor/import/resource_importer_texture.cpp
msgid "BPTC LDR"
-msgstr ""
+msgstr "BPTC LDR"
#: editor/import/resource_importer_texture.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/mesh_instance_2d.cpp scene/2d/multimesh_instance_2d.cpp
#: scene/2d/particles_2d.cpp scene/2d/sprite.cpp scene/resources/style_box.cpp
msgid "Normal Map"
-msgstr ""
+msgstr "Normálová mapa"
#: editor/import/resource_importer_texture.cpp
#, fuzzy
@@ -7541,7 +7436,7 @@ msgstr "Velikost: "
#: editor/import/resource_importer_texture.cpp
msgid "Detect 3D"
-msgstr ""
+msgstr "Detekovat 3D"
#: editor/import/resource_importer_texture.cpp
#, fuzzy
@@ -7553,6 +7448,8 @@ msgid ""
"Warning, no suitable PC VRAM compression enabled in Project Settings. This "
"texture will not display correctly on PC."
msgstr ""
+"Upozornění, žádná vhodná PC VRAM komprese není povolena v nastavení "
+"projektu. Tato textura se na PC nebude zobrazovat správně."
#: editor/import/resource_importer_texture_atlas.cpp
#, fuzzy
@@ -7570,8 +7467,9 @@ msgid "Crop To Region"
msgstr "Nastavit oblast textury"
#: editor/import/resource_importer_texture_atlas.cpp
+#, fuzzy
msgid "Trim Alpha Border From Region"
-msgstr ""
+msgstr "Oříznout ohraničení alfa z oblasti"
#: editor/import/resource_importer_wav.cpp scene/2d/physics_body_2d.cpp
#, fuzzy
@@ -7579,8 +7477,9 @@ msgid "Force"
msgstr "Vnutit nahrátí"
#: editor/import/resource_importer_wav.cpp
+#, fuzzy
msgid "8 Bit"
-msgstr ""
+msgstr "8 Bit"
#: editor/import/resource_importer_wav.cpp main/main.cpp
#: modules/mono/editor/csharp_project.cpp modules/mono/godotsharp_dirs.cpp
@@ -7600,7 +7499,7 @@ msgstr "Uzel Mix"
#: editor/import/resource_importer_wav.cpp
msgid "Trim"
-msgstr ""
+msgstr "Oříznout"
#: editor/import/resource_importer_wav.cpp
#, fuzzy
@@ -7693,6 +7592,8 @@ msgid ""
"Select a resource file in the filesystem or in the inspector to adjust "
"import settings."
msgstr ""
+"Vyberte zdrojový soubor v prohlížeči souboru nebo v inspektoru k úpravě "
+"nastavení importu."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -7719,7 +7620,7 @@ msgstr "Jazyky"
#: editor/inspector_dock.cpp
msgid "Localization not available for current language."
-msgstr ""
+msgstr "Lokalizace není dostupná pro aktuální jazyk."
#: editor/inspector_dock.cpp
msgid "Copy Properties"
@@ -8330,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"
@@ -8591,7 +8492,7 @@ msgstr "Filtry..."
#: editor/plugins/asset_library_editor_plugin.cpp scene/main/http_request.cpp
msgid "Use Threads"
-msgstr ""
+msgstr "Použít vlákna"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Contents:"
@@ -8718,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!"
@@ -8808,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"
@@ -8824,7 +8724,7 @@ msgstr "Testované"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed to get repository configuration."
-msgstr ""
+msgstr "Nepodařilo se získat konfiguraci repozitáře."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
@@ -8882,7 +8782,7 @@ msgstr "Zapéct lightmapy"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "LightMap Bake"
-msgstr ""
+msgstr "Zapéct lightmapu"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Select lightmap bake file:"
@@ -9233,7 +9133,7 @@ msgstr "Režim škálování"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Shift: Scale proportionally."
-msgstr ""
+msgstr "Shift: Zvětšovat proporčně."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9383,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
@@ -9399,11 +9299,11 @@ msgstr "Zobrazit mřížku"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Show When Snapping"
-msgstr "Chytré přichcování"
+msgstr "Zobrazit při skoku"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Hide"
-msgstr ""
+msgstr "Schovat"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -9752,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"
@@ -9788,7 +9688,7 @@ 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
@@ -10375,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 ""
@@ -10915,58 +10815,51 @@ msgstr "Výsledky hledání"
#: editor/plugins/script_editor_plugin.cpp
msgid "Open Dominant Script On Scene Change"
-msgstr ""
+msgstr "Otevřít dominantní skript při změně scény"
#: editor/plugins/script_editor_plugin.cpp
msgid "External"
-msgstr ""
+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
-#, fuzzy
msgid "Script Temperature Enabled"
-msgstr "Vybrat soubor šablony"
+msgstr "Povolit teplotu skriptu"
#: editor/plugins/script_editor_plugin.cpp
msgid "Highlight Current Script"
-msgstr ""
+msgstr "Zvýraznit aktuální skript"
#: editor/plugins/script_editor_plugin.cpp
msgid "Script Temperature History Size"
-msgstr ""
+msgstr "Velikost historie teploty skriptu"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Current Script Background Color"
-msgstr "Neplatná barva pozadí."
+msgstr "Barva pozadí momentálního skriptu"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Group Help Pages"
-msgstr "Seskupit vybrané"
+msgstr "Seskupit stránky s nápovědou"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Sort Scripts By"
-msgstr "Vytvořit skript"
+msgstr "Seřadit skripty podle"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "List Script Names As"
-msgstr "Název skriptu:"
+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"
@@ -11296,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]"
@@ -11504,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"
@@ -11666,11 +11559,11 @@ msgstr "Přepnout volný pohled"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Decrease Field of View"
-msgstr ""
+msgstr "Zmenšit zorné pole"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Increase Field of View"
-msgstr ""
+msgstr "Zvětšit zorné pole"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -11798,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"
@@ -12254,9 +12146,8 @@ msgid "Select all Theme items with item data."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect All"
-msgstr "Vybrat vše"
+msgstr "Zrušit všechen výběr"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all Theme items."
@@ -12791,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."
@@ -13187,9 +13069,10 @@ msgstr "Možnosti přichycení"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Offset(Posun):"
@@ -13373,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"
@@ -13386,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"
@@ -14638,16 +14521,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Neplatná cesta k projektu (něco se změnilo?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Nelze načíst project.godot v umístění projektu (chyba %d). Může chybět nebo "
"být poškozený."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Nelze upravit project.godot v umístění projektu."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Nelze otevřít projekt v '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15851,13 +15735,12 @@ msgid "Clear Inheritance? (No Undo!)"
msgstr "Vymazat dědičnost? (Nelze vrátit zpět!)"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Show Scene Tree Root Selection"
-msgstr "Vycentrovat výběr"
+msgstr "Zobrazit výběr Tree Root ze scény"
#: editor/scene_tree_dock.cpp
msgid "Derive Script Globals By Name"
-msgstr ""
+msgstr "Načítat globální proměnné skritpu podle názvu"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -16190,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"
@@ -16296,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"
@@ -16306,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"
@@ -16318,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"
@@ -16329,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"
@@ -16376,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
@@ -16417,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
@@ -16445,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
@@ -16766,7 +16640,7 @@ msgstr ""
#: main/main.cpp
msgid "Fullsize"
-msgstr ""
+msgstr "Plná velikost"
#: main/main.cpp scene/resources/dynamic_font.cpp
#, fuzzy
@@ -16804,9 +16678,8 @@ msgid "Emulate Mouse From Touch"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "Mouse Cursor"
-msgstr "Tlačítko myši"
+msgstr "Kurzor myši"
#: main/main.cpp
#, fuzzy
@@ -16880,7 +16753,7 @@ msgstr "Přichytit ke stranám uzlu"
#: main/main.cpp
msgid "Dynamic Fonts"
-msgstr ""
+msgstr "Dynamické fonty"
#: main/main.cpp
msgid "Use Oversampling"
@@ -16892,7 +16765,7 @@ msgstr ""
#: modules/csg/csg_gizmos.cpp
msgid "CSG"
-msgstr ""
+msgstr "CSG"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -16920,21 +16793,18 @@ msgid "Calculate Tangents"
msgstr ""
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Use Collision"
-msgstr "Kolize"
+msgstr "Použít kolize"
#: modules/csg/csg_shape.cpp servers/physics_2d_server.cpp
-#, fuzzy
msgid "Collision Layer"
-msgstr "Kolizní režim"
+msgstr "Kolizní vrstva"
#: 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 "Kolizní režim"
+msgstr "Kolizní maska"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -16949,9 +16819,8 @@ msgstr "Změnit velikost písmen"
#: 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 "Poloměr:"
+msgstr "Poloměr"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -17262,22 +17131,20 @@ 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"
-msgstr ""
+msgstr "Použít vlákno"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
#, fuzzy
@@ -17309,9 +17176,8 @@ msgid "Normalized"
msgstr "Formát"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Count"
-msgstr "Množství:"
+msgstr "Množství"
#: modules/gltf/gltf_accessor.cpp scene/resources/visual_shader_nodes.cpp
#, fuzzy
@@ -17369,9 +17235,8 @@ msgid "Indices"
msgstr "Všechna zařízení"
#: modules/gltf/gltf_camera.cpp
-#, fuzzy
msgid "FOV Size"
-msgstr "Velikost:"
+msgstr "Velikost pohledu"
#: modules/gltf/gltf_camera.cpp
msgid "Zfar"
@@ -17447,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"
@@ -17570,7 +17434,7 @@ msgstr ""
#: modules/gltf/gltf_state.cpp
msgid "Cameras"
-msgstr ""
+msgstr "Kamery"
#: modules/gltf/gltf_state.cpp servers/visual_server.cpp
#, fuzzy
@@ -17778,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"
@@ -18842,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)"
@@ -18850,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
@@ -18893,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
@@ -18945,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"
@@ -19049,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
@@ -19441,9 +19304,8 @@ msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Neplatné jméno souboru! Android APK vyžaduje příponu *.apk."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Unsupported export format!"
-msgstr "Nepodporovaný formát exportu!\n"
+msgstr "Nepodporovaný formát exportu!"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19454,15 +19316,12 @@ msgstr ""
"verzi. Přeinstalujte jej z nabídky \"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 ""
-"Neshoda verzí Android buildu:\n"
-" Šablona nainstalována: %s\n"
-" Verze Godot: %s\n"
-"Přeinstalujte šablonu pro sestavení systému Android z nabídky \"Projekt\"."
+"Neshoda verzí Android buildu: Šablona nainstalována: %s, Verze Godotu: %s. "
+"Prosím, přeinstalujte Android build šablonu z nabídky \"Projekt\"."
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19470,9 +19329,8 @@ msgid ""
msgstr ""
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files to gradle project."
-msgstr "Nelze exportovat soubory projektu do projektu gradle\n"
+msgstr "Nelze exportovat soubory projektu do projektu gradle."
#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
@@ -19483,12 +19341,11 @@ msgid "Building Android Project (gradle)"
msgstr "Buildování projektu pro Android (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 ""
-"Buildování projektu pro Android se nezdařilo, zkontrolujte chybový výstup.\n"
+"Buildování projektu pro Android se nezdařilo, zkontrolujte chybový výstup. "
"Případně navštivte dokumentaci o build pro Android na docs.godotengine.org."
#: platform/android/export/export_plugin.cpp
@@ -19513,11 +19370,8 @@ msgid "Creating APK..."
msgstr "Vytvářím APK..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not find template APK to export: \"%s\"."
-msgstr ""
-"Nepodařilo se najít šablonu APK pro export:\n"
-"%s"
+msgstr "Nepodařilo se najít šablonu APK pro export: \"%s\""
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19639,7 +19493,7 @@ msgstr ""
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Info"
-msgstr ""
+msgstr "Info"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19931,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"
@@ -19942,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."
@@ -20010,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."
@@ -20500,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
@@ -20638,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."
@@ -20693,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
@@ -20702,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
@@ -21383,7 +21236,7 @@ msgstr "Místní projekty"
#: 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 "Pořadí vykreslování"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21423,7 +21276,7 @@ msgstr "Směry"
#: scene/resources/particles_material.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Spread"
-msgstr ""
+msgstr "Rozšířit"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21441,7 +21294,7 @@ msgstr "Inicializovat"
#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
msgid "Angular Velocity"
-msgstr ""
+msgstr "Úhlová rychlost"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21493,12 +21346,12 @@ msgstr ""
#: scene/resources/particles_material.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Damping"
-msgstr ""
+msgstr "Tlumení"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Damping Random"
-msgstr ""
+msgstr "Náhodné tlumení"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21509,12 +21362,12 @@ msgstr "Rozdělit křivku"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp scene/3d/light.cpp
#: scene/resources/particles_material.cpp
msgid "Angle"
-msgstr ""
+msgstr "Úhel"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Angle Random"
-msgstr ""
+msgstr "Náhodný úhel"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21528,8 +21381,9 @@ msgid "Scale Amount"
msgstr "Množství:"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
+#, fuzzy
msgid "Scale Amount Random"
-msgstr ""
+msgstr "Škálovat náhodnou hodnotu"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#, fuzzy
@@ -21638,12 +21492,12 @@ msgstr "Deaktivované tlačítko"
#: scene/2d/joints_2d.cpp scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Softness"
-msgstr ""
+msgstr "Měkkost"
#: scene/2d/joints_2d.cpp scene/resources/animation.cpp
#: scene/resources/ray_shape.cpp scene/resources/segment_shape_2d.cpp
msgid "Length"
-msgstr ""
+msgstr "Délka"
#: scene/2d/joints_2d.cpp
#, fuzzy
@@ -21656,7 +21510,7 @@ msgstr ""
#: scene/2d/joints_2d.cpp scene/3d/physics_joint.cpp scene/3d/vehicle_body.cpp
msgid "Stiffness"
-msgstr ""
+msgstr "Tuhost"
#: scene/2d/light_2d.cpp
msgid ""
@@ -21678,15 +21532,15 @@ msgstr "Oblast textury"
#: scene/3d/light.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp scene/resources/sky.cpp
msgid "Energy"
-msgstr ""
+msgstr "Energie"
#: scene/2d/light_2d.cpp
msgid "Z Min"
-msgstr ""
+msgstr "Z Min"
#: scene/2d/light_2d.cpp
msgid "Z Max"
-msgstr ""
+msgstr "Z Max"
#: scene/2d/light_2d.cpp
#, fuzzy
@@ -21753,8 +21607,9 @@ msgid "Default Color"
msgstr "Výchozí"
#: scene/2d/line_2d.cpp scene/resources/texture.cpp
+#, fuzzy
msgid "Fill"
-msgstr ""
+msgstr "Výplň"
#: scene/2d/line_2d.cpp scene/resources/texture.cpp
#, fuzzy
@@ -21771,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
@@ -22715,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"
@@ -23677,9 +23530,8 @@ msgid "A RoomGroup should not be a child or grandchild of a Portal."
msgstr ""
#: scene/3d/portal.cpp
-#, fuzzy
msgid "Portal Active"
-msgstr " [aktivní portály]"
+msgstr "Aktivní portál"
#: scene/3d/portal.cpp scene/resources/occluder_shape_polygon.cpp
msgid "Two Way"
@@ -23819,8 +23671,9 @@ msgid "There should only be one RoomManager in the SceneTree."
msgstr ""
#: scene/3d/room_manager.cpp
+#, fuzzy
msgid "Main"
-msgstr ""
+msgstr "Hlavní"
#: scene/3d/room_manager.cpp scene/animation/animation_blend_tree.cpp
#: scene/animation/animation_player.cpp scene/animation/animation_tree.cpp
@@ -23832,7 +23685,7 @@ msgstr "Akce"
#: scene/3d/room_manager.cpp
msgid "Roomlist"
-msgstr ""
+msgstr "Seznam místností"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
#, fuzzy
@@ -23851,7 +23704,7 @@ msgstr "Soubor ZIP"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
msgid "Gameplay"
-msgstr ""
+msgstr "Hratelnost"
#: scene/3d/room_manager.cpp
#, fuzzy
@@ -23883,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
@@ -23908,8 +23759,9 @@ msgid ""
msgstr ""
#: scene/3d/room_manager.cpp
+#, fuzzy
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "Seznam místností neobsahuje žádné místnosti, přerušování."
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
@@ -23930,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 ""
@@ -24134,6 +23989,15 @@ msgstr "Chyba"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Seřadit"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -24416,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
@@ -24710,7 +24572,7 @@ msgstr "Vlastnosti motivu"
#: scene/gui/dialogs.cpp
msgid "Window Title"
-msgstr ""
+msgstr "Název okna"
#: scene/gui/dialogs.cpp
#, fuzzy
@@ -24776,7 +24638,7 @@ msgstr "Zobrazit kosti"
#: scene/gui/graph_edit.cpp scene/gui/text_edit.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Minimap"
-msgstr ""
+msgstr "Minimapa"
#: scene/gui/graph_edit.cpp
msgid "Enable grid minimap."
@@ -24829,7 +24691,7 @@ msgstr "Vyplnit výběr"
#: scene/gui/item_list.cpp
msgid "Max Text Lines"
-msgstr ""
+msgstr "Maximální počet řádků textu"
#: scene/gui/item_list.cpp
#, fuzzy
@@ -24838,15 +24700,15 @@ msgstr "Testované"
#: scene/gui/item_list.cpp
msgid "Max Columns"
-msgstr ""
+msgstr "Maximální počet sloupců"
#: scene/gui/item_list.cpp
msgid "Same Column Width"
-msgstr ""
+msgstr "Stejná šířka sloupce"
#: scene/gui/item_list.cpp
msgid "Fixed Column Width"
-msgstr ""
+msgstr "Pevná šířka sloupce"
#: scene/gui/item_list.cpp
#, fuzzy
@@ -24875,15 +24737,16 @@ msgstr "Přepnout viditelnost"
#: scene/gui/label.cpp
msgid "Lines Skipped"
-msgstr ""
+msgstr "Přeskočené řádky"
#: scene/gui/label.cpp
+#, fuzzy
msgid "Max Lines Visible"
-msgstr ""
+msgstr "Maximální počet viditelných řádků"
#: scene/gui/line_edit.cpp scene/resources/navigation_mesh.cpp
msgid "Max Length"
-msgstr ""
+msgstr "Maximální délka"
#: scene/gui/line_edit.cpp
msgid "Secret"
@@ -24949,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"
@@ -25289,7 +25152,7 @@ msgstr "Složka:"
#: scene/gui/text_edit.cpp
#, fuzzy
msgid "Drag And Drop Selection Enabled"
-msgstr "Pouze výběr"
+msgstr "Výběr přetažením povolen"
#: scene/gui/text_edit.cpp
#, fuzzy
@@ -25599,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"
@@ -25766,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
@@ -25955,9 +25818,8 @@ msgid "H Separation"
msgstr "Oddělení:"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Underline Spacing"
-msgstr "Opakování animace"
+msgstr "Mezera podtržení"
#: scene/resources/default_theme/default_theme.cpp
msgid "Arrow"
@@ -26565,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
@@ -27646,9 +27507,8 @@ msgid "Bind"
msgstr "Vazba"
#: scene/resources/skin.cpp
-#, fuzzy
msgid "Bone"
-msgstr "Kosti"
+msgstr "Kost"
#: scene/resources/sky.cpp
#, fuzzy
@@ -28525,9 +28385,8 @@ msgid "Ninepatch Mode"
msgstr "Interpolační režim"
#: servers/visual_server.cpp
-#, fuzzy
msgid "OpenGL"
-msgstr "Otevřít"
+msgstr "OpenGL"
#: servers/visual_server.cpp
msgid "Batching Send Null"
diff --git a/editor/translations/da.po b/editor/translations/da.po
index e83ef150e4..5a9e684e85 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -18,13 +18,14 @@
# Autowinto <happymansi@hotmail.com>, 2020, 2021.
# Mikkel Mouridsen <mikkelmouridsen@me.com>, 2020, 2021, 2022.
# snakatk <snaqii@live.dk>, 2021.
+# Mattis Møl Kristensen <mattismoel@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-04-08 07:29+0000\n"
-"Last-Translator: Mikkel Mouridsen <mikkelmouridsen@me.com>\n"
+"PO-Revision-Date: 2022-11-02 18:47+0000\n"
+"Last-Translator: Mattis Møl Kristensen <mattismoel@gmail.com>\n"
"Language-Team: Danish <https://hosted.weblate.org/projects/godot-engine/"
"godot/da/>\n"
"Language: da\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.12-dev\n"
+"X-Generator: Weblate 4.14.2-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -147,7 +148,7 @@ msgstr "Redaktør"
#: core/bind/core_bind.cpp
msgid "Print Error Messages"
-msgstr ""
+msgstr "Udskriv fejlmeddelelser"
#: core/bind/core_bind.cpp
#, fuzzy
@@ -11470,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 ""
@@ -13427,9 +13428,10 @@ msgstr "Singleton"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14855,13 +14857,13 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Kan ikke åbne projekt"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -24174,6 +24176,15 @@ msgstr "Fejl!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Sorter"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/de.po b/editor/translations/de.po
index a34395385c..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.
@@ -86,13 +86,15 @@
# Tim <sakul8826@gmail.com>, 2022.
# 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-08-30 03:11+0000\n"
-"Last-Translator: Felix Bitsch <felix.a.bitsch@gmail.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"
@@ -100,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.14.1-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -481,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"
@@ -3750,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"
@@ -11037,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]"
@@ -12889,9 +12891,10 @@ msgstr "Einrasteinstellungen"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr "Versatz"
@@ -13069,7 +13072,7 @@ msgstr "Pfad des privaten SSH-Schlüssels auswählen"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Passphrase"
-msgstr "SSH-Passphrase"
+msgstr "SSH Schlüsseltext"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Detect new changes"
@@ -14307,15 +14310,14 @@ msgstr "Ungültiger Projektpfad (etwas geändert?)."
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"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
-msgid "Couldn't edit project.godot in project path."
-msgstr "project.godot des Projektpfads konnte nicht bearbeitet werden."
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Projekt konnte nicht in ‚%s‘ gespeichert werden (Fehler %d)."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15364,20 +15366,18 @@ msgid "Make Local"
msgstr "Lokal machen"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "Szenen-eindeutigen Namen aktivieren"
+msgstr "Szenen-eindeutige(n) Namen aktivieren"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
msgstr ""
-"Ein anderes Node nutzt schon diesen einzigartigen Namen in dieser Szene."
+"Einzigartige Namen, die bereits von anderen Nodes dieser Szene verwendet "
+"werden:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Disable Scene Unique Name(s)"
-msgstr "Szenen-eindeutigen Namen deaktivieren"
+msgstr "Szenen-eindeutige(n) Namen deaktivieren"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -16314,7 +16314,7 @@ msgstr "Ausrichtung"
#: main/main.cpp scene/gui/scroll_container.cpp scene/gui/text_edit.cpp
#: scene/main/scene_tree.cpp scene/register_scene_types.cpp
msgid "Common"
-msgstr "Gewöhnlich"
+msgstr "Allgemein"
#: main/main.cpp
msgid "Physics FPS"
@@ -17444,19 +17444,16 @@ msgid "Auto Update Project"
msgstr "Projekt automatisch aktualisieren"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Assembly Name"
-msgstr "Anzeigename"
+msgstr "Assembly-Name"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Solution Directory"
-msgstr "Wähle ein Verzeichnis"
+msgstr "Solution-Verzeichnis"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "C# Project Directory"
-msgstr "Wähle ein Verzeichnis"
+msgstr "C#-Projektverzeichnis"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
@@ -19224,9 +19221,8 @@ msgid "Custom BG Color"
msgstr "Eigene Hintergrundfarbe"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Icons"
-msgstr "Export-Icon"
+msgstr "Export-Icons"
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp
@@ -20062,6 +20058,9 @@ 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 ""
+"Die von Godot genutzte Mono-Version unterstützt die UWP-Plattform nicht. "
+"Falls UWP-Unterstützung erforderlich ist, muss Standard-Godot (ohne C#-"
+"Unterstützung) verwendet werden."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -23254,6 +23253,14 @@ msgstr "Max Kraft"
msgid "AABB"
msgstr "AABB"
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr "Sortierung"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr "AABB-Mittelpunkt verwenden"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr "Geometrie"
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index fb76a2c2c7..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 ""
@@ -12352,9 +12352,10 @@ msgstr ""
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13683,12 +13684,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22180,6 +22180,14 @@ msgstr ""
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr ""
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/el.po b/editor/translations/el.po
index 3ab08f3dbd..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 ""
@@ -13281,9 +13272,10 @@ msgstr "Επιλογές Προσκόλλησης"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Μετατόπιση:"
@@ -14747,17 +14739,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Μη έγκυρη διαδρομή έργου (Αλλάξατε τίποτα;)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Αδύνατη η φόρτωση του project.godot (σφάλμα %d). Μπορεί να λείπει ή να είναι "
"κατεστραμένο."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
-"Δεν ήταν δυνατή η επεξεργασία του project.godot στη διαδρομή του έργου."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Αδυνατό το άνοιγμα του έργου στο «%s»."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -16731,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
@@ -16753,7 +16745,7 @@ msgstr "Σφάλμα αποθήκευσης"
#: main/main.cpp
msgid "Threads"
-msgstr ""
+msgstr "Νήματα"
#: main/main.cpp servers/physics_2d/physics_2d_server_wrap_mt.h
#, fuzzy
@@ -16766,7 +16758,7 @@ msgstr ""
#: main/main.cpp
msgid "Handheld"
-msgstr ""
+msgstr "Χειρός"
#: main/main.cpp platform/javascript/export/export.cpp
#: platform/uwp/export/export.cpp
@@ -16798,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"
@@ -16810,7 +16802,7 @@ msgstr ""
#: main/main.cpp
msgid "Print FPS"
-msgstr ""
+msgstr "Δείξε Καρέ ανα Δευτερόλεπτο"
#: main/main.cpp
msgid "Verbose stdout"
@@ -16833,7 +16825,7 @@ msgstr "Καρέ Επιλογής"
#: main/main.cpp
msgid "Low Processor Mode"
-msgstr ""
+msgstr "Λειτουργεία Χαμηλής Χρήσης Επεξεργαστή"
#: main/main.cpp
msgid "Delta Sync After Draw"
@@ -16859,7 +16851,7 @@ msgstr "Σημείο"
#: main/main.cpp
msgid "Touch Delay"
-msgstr ""
+msgstr "Καθυστέρηση Επαφής"
#: main/main.cpp servers/visual_server.cpp
msgid "GLES3"
@@ -16883,7 +16875,7 @@ msgstr "Εμφάνιση περιβάλλοντος"
#: main/main.cpp
msgid "Default Clear Color"
-msgstr ""
+msgstr "Προκαθορισμένο Χρώμα Καθαρίσματος"
#: main/main.cpp
msgid "Boot Splash"
@@ -16896,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
@@ -16931,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
@@ -16973,11 +16965,11 @@ msgstr "Λήξη χρονικού ορίου."
#: main/main.cpp
msgid "Runtime"
-msgstr ""
+msgstr "Χρόνος Εκτέλεσης"
#: main/main.cpp
msgid "Unhandled Exception Policy"
-msgstr ""
+msgstr "Πολιτική μη-χειριζόμενων Εξαίρεσεων"
#: main/main.cpp
#, fuzzy
@@ -16987,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
@@ -16996,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
@@ -17014,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"
@@ -17051,7 +17043,7 @@ msgstr "Επιλογές"
#: modules/csg/csg_shape.cpp
msgid "Calculate Tangents"
-msgstr ""
+msgstr "Υπολογεισμός Καθέτων"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -17109,7 +17101,7 @@ msgstr "Εμφάνιση Οδηγιών"
#: modules/csg/csg_shape.cpp
msgid "Cone"
-msgstr ""
+msgstr "Κώνος"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -17134,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
@@ -17336,7 +17328,7 @@ msgstr "Δέσμες Ενεργειών"
#: modules/gdscript/editor/gdscript_highlighter.cpp
msgid "Function Definition Color"
-msgstr ""
+msgstr "Χρώμα Δήλωσης Συνάρτησης"
#: modules/gdscript/editor/gdscript_highlighter.cpp
#, fuzzy
@@ -17349,7 +17341,7 @@ msgstr ""
#: modules/gdscript/gdscript.cpp
msgid "Treat Warnings As Errors"
-msgstr ""
+msgstr "Συμπεριφορά σε προειδοποιήσεις ως σφάλματα"
#: modules/gdscript/gdscript.cpp
msgid "Exclude Addons"
@@ -17413,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
@@ -17638,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
@@ -17703,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
@@ -17781,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
@@ -17931,7 +17923,7 @@ msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Προετοιμασία δομών δεδομένων"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
#, fuzzy
@@ -17965,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
@@ -17989,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"
@@ -18132,7 +18124,7 @@ msgstr ""
#: modules/opensimplex/noise_texture.cpp
msgid "Noise"
-msgstr ""
+msgstr "Θόρυβος"
#: modules/opensimplex/noise_texture.cpp
#, fuzzy
@@ -18141,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
@@ -18154,7 +18146,7 @@ msgstr "Προοπτική"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Lacunarity"
-msgstr ""
+msgstr "Κενότητα"
#: modules/regex/regex.cpp
msgid "Subject"
@@ -18176,7 +18168,7 @@ msgstr ""
#: modules/upnp/upnp.cpp
msgid "Discover Local Port"
-msgstr ""
+msgstr "Εύρεση Τοπικής Θύρας"
#: modules/upnp/upnp.cpp
msgid "Discover IPv6"
@@ -18739,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
@@ -18894,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."
@@ -18954,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
@@ -19604,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 ""
@@ -19660,7 +19650,7 @@ msgstr ""
#: platform/android/export/export_plugin.cpp
msgid "Moving output"
-msgstr ""
+msgstr "Μετακίνηση της εξόδου"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -21361,7 +21351,7 @@ msgstr "Συμπλήρωση"
#: scene/2d/canvas_item.cpp
msgid "Show Behind Parent"
-msgstr ""
+msgstr "Δείξε πίσω απο τον Γωνέα"
#: scene/2d/canvas_item.cpp
#, fuzzy
@@ -21376,7 +21366,7 @@ msgstr "Φως"
#: scene/2d/canvas_item.cpp
msgid "Use Parent Material"
-msgstr ""
+msgstr "Χρησιμποίησε το Υλικό του Γονέα"
#: scene/2d/canvas_modulate.cpp
msgid ""
@@ -21421,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."
@@ -21498,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
@@ -21515,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
@@ -21526,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
@@ -21542,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
@@ -21553,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
@@ -21593,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
@@ -21611,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
@@ -21622,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
@@ -21650,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
@@ -21663,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
@@ -21679,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
@@ -21699,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
@@ -21767,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"
@@ -22205,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
@@ -22268,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
@@ -22459,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."
@@ -22510,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
@@ -22593,7 +22585,7 @@ msgstr "Λειτουργία Σύγκρουσης"
#: scene/2d/tile_map.cpp
msgid "Use Kinematic"
-msgstr ""
+msgstr "Χρήση Κινηματικού"
#: scene/2d/touch_screen_button.cpp
#, fuzzy
@@ -22629,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
@@ -22665,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."
@@ -22728,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
@@ -22747,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
@@ -22774,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)"
@@ -22812,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"
@@ -22906,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
@@ -22920,7 +22912,7 @@ msgstr "Έργο"
#: scene/3d/camera.cpp
msgid "FOV"
-msgstr ""
+msgstr "Οπτικό Πεδίο"
#: scene/3d/camera.cpp
#, fuzzy
@@ -22934,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
@@ -22951,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
@@ -23067,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
@@ -23085,7 +23077,7 @@ msgstr ""
#: scene/3d/cull_instance.cpp
msgid "Allow Merging"
-msgstr ""
+msgstr "Επίτρεψε Συγχώνευση"
#: scene/3d/cull_instance.cpp
#, fuzzy
@@ -23117,7 +23109,7 @@ msgstr ""
#: scene/3d/gi_probe.cpp
msgid "Subdiv"
-msgstr ""
+msgstr "Υποδιαίρεση"
#: scene/3d/gi_probe.cpp
#, fuzzy
@@ -23136,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
@@ -23145,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
@@ -23288,7 +23280,7 @@ msgstr ""
#: scene/3d/light.cpp
msgid "Spot"
-msgstr ""
+msgstr "Προβολέας"
#: scene/3d/light.cpp
#, fuzzy
@@ -23348,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."
@@ -23451,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
@@ -23567,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
@@ -23684,7 +23676,7 @@ msgstr "Αλλαγη Παραμέτρου"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit"
-msgstr ""
+msgstr "Γωνιώδης Ώριο"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23698,7 +23690,7 @@ msgstr "Πεζά"
#: scene/3d/physics_joint.cpp
msgid "Motor"
-msgstr ""
+msgstr "Μοτέρ"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23782,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
@@ -23813,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
@@ -23840,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."
@@ -23869,7 +23861,7 @@ msgstr "Επιστροφή"
#: scene/3d/portal.cpp scene/resources/occluder_shape_polygon.cpp
msgid "Two Way"
-msgstr ""
+msgstr "Διπλής Κατεύθυνσης"
#: scene/3d/portal.cpp
#, fuzzy
@@ -23902,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
@@ -23949,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."
@@ -23975,7 +23967,7 @@ msgstr ""
#: scene/3d/room.cpp
msgid "Bound"
-msgstr ""
+msgstr "Όριο"
#: scene/3d/room_group.cpp
#, fuzzy
@@ -24018,7 +24010,7 @@ msgstr "Ενέργεια"
#: scene/3d/room_manager.cpp
msgid "Roomlist"
-msgstr ""
+msgstr "Λίστα Δωματίων"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
#, fuzzy
@@ -24037,7 +24029,7 @@ msgstr "Αρχείο ZIP"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
msgid "Gameplay"
-msgstr ""
+msgstr "Παιχνίδι"
#: scene/3d/room_manager.cpp
#, fuzzy
@@ -24321,6 +24313,15 @@ msgstr "Σφάλμα"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Ταξινόμηση"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -25137,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"
@@ -26113,7 +26114,7 @@ msgstr ""
#: scene/resources/default_theme/default_theme.cpp
msgid "Panel"
-msgstr ""
+msgstr "Πλαίσιο"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26152,7 +26153,7 @@ msgstr "Επανάληψη κίνησης"
#: scene/resources/default_theme/default_theme.cpp
msgid "Arrow"
-msgstr ""
+msgstr "Βέλος"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -27138,7 +27139,7 @@ msgstr "Αποσφαλμάτωση Καναλιού UV"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "Θόλωση"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -27760,7 +27761,7 @@ msgstr ""
#: scene/resources/physics_material.cpp
msgid "Absorbent"
-msgstr ""
+msgstr "Απορροφητικός"
#: scene/resources/plane_shape.cpp
#, fuzzy
@@ -27805,7 +27806,7 @@ msgstr "Πάνω Δεξιά"
#: scene/resources/primitive_meshes.cpp
msgid "Is Hemisphere"
-msgstr ""
+msgstr "Είναι Ημισφαίριο"
#: scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -27814,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"
@@ -27846,7 +27847,7 @@ msgstr "Μέγεθος περιγράμματος:"
#: scene/resources/sky.cpp
msgid "Panorama"
-msgstr ""
+msgstr "Πανόραμα"
#: scene/resources/sky.cpp
#, fuzzy
@@ -27880,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
@@ -27902,7 +27903,7 @@ msgstr "Ανάπτυξη Όλων"
#: scene/resources/style_box.cpp
msgid "Skew"
-msgstr ""
+msgstr "Λοξότητα"
#: scene/resources/style_box.cpp
#, fuzzy
@@ -27911,7 +27912,7 @@ msgstr "Αλλαγή Εσωτερική Ακτίνας Τόρου"
#: scene/resources/style_box.cpp
msgid "Corner Detail"
-msgstr ""
+msgstr "Λεπτομέρεια Γωνίας"
#: scene/resources/style_box.cpp
msgid "Anti Aliasing"
@@ -28014,9 +28015,8 @@ msgid "Depth Draw"
msgstr "Μέθοδος παρεμβολής"
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Cull"
-msgstr "Λειτουργία Χάρακα"
+msgstr "Αποκοπή"
#: scene/resources/visual_shader.cpp
#, fuzzy
@@ -28250,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
@@ -28316,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 63ce9ca3d5..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 ""
@@ -12406,9 +12406,10 @@ msgstr "𐑨𐑯𐑦𐑥𐑱𐑖𐑩𐑯 𐑤𐑵𐑐𐑦𐑙"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13745,12 +13746,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22359,6 +22359,15 @@ msgstr "𐑥𐑦𐑮𐑼"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "𐑦𐑯𐑑𐑻𐑐𐑩𐑤𐑱𐑖𐑩𐑯 𐑥𐑴𐑛"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/eo.po b/editor/translations/eo.po
index 2bcbc62274..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 ""
@@ -13088,9 +13088,10 @@ msgstr "Opcioj de kaptado"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Krada deŝovo:"
@@ -14472,16 +14473,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Nevalida dosierindiko de projekto (ŝanĝis ion ajn?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Ne eblas ŝargi project.godot en projekta dosierindiko (eraro %d). Ĝi eble "
"estas manka aŭ difektita."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Ne eblas redakti project.godot en projekta dosierindiko."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Ne eblas malfermi projekton ĉe '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -23733,6 +23735,15 @@ msgstr "Eraro!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Enportas:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/es.po b/editor/translations/es.po
index 2788483a33..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.
@@ -43,7 +43,7 @@
# Dario <darlex259@gmail.com>, 2019.
# Adolfo Jayme Barrientos <fitojb@ubuntu.com>, 2019.
# Julián Luini <jluini@gmail.com>, 2020.
-# Victor S. <victorstancioiu@gmail.com>, 2020, 2021.
+# Victor S. <victorstancioiu@gmail.com>, 2020, 2021, 2022.
# henry rujano herrera <rujhen@gmail.com>, 2020.
# Megamega53 <Christopher.Morales21@myhunter.cuny.edu>, 2020.
# Serk Lintur <serk.lintur@gmail.com>, 2020.
@@ -60,7 +60,7 @@
# Lucasdelpiero <lucasdelpiero98@gmail.com>, 2021.
# SteamGoblin <SteamGoblin860@gmail.com>, 2021.
# Francisco C <pruebasfrancisco17@gmail.com>, 2021.
-# Cam <cameron.toms@gmail.com>, 2021.
+# Cam <cameron.toms@gmail.com>, 2021, 2022.
# Juan camilo <jugarciago01@gmail.com>, 2021.
# Manuel González <mgoopazo@gmail.com>, 2021.
# softonicblip <blazeawardspace@gmail.com>, 2021.
@@ -89,13 +89,16 @@
# Fernando Joaquin Manzano Lopez <ticantin12@gmail.com>, 2022.
# 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, 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-09-07 21:02+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"
@@ -103,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.14.1-dev\n"
+"X-Generator: Weblate 4.15.1\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -5564,7 +5567,7 @@ msgstr "Ancho del Minimapa"
#: editor/editor_settings.cpp
msgid "Mouse Extra Buttons Navigate History"
-msgstr "Botones Extra del Ratón Navegar por el Historial"
+msgstr "Botones Extra del Mouse para Navegar por el Historial"
#: editor/editor_settings.cpp
msgid "Drag And Drop Selection"
@@ -8638,7 +8641,7 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
-msgstr "Calcular Lightmaps"
+msgstr "Bakear Lightmaps"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "LightMap Bake"
@@ -9507,7 +9510,7 @@ msgstr "Clic derecho para añadir punto"
#: editor/plugins/gi_probe_editor_plugin.cpp
msgid "Bake GI Probe"
-msgstr "Calcular GI Probe"
+msgstr "Bakear GI Probe"
#: editor/plugins/gradient_editor_plugin.cpp
msgid "Gradient Edited"
@@ -9706,7 +9709,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Simplified Convex Collision Sibling"
-msgstr "Crear Forma de Colisión Conexa Hermana"
+msgstr "Crear Collider Conexo Hermano"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -11039,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]"
@@ -12886,9 +12889,10 @@ msgstr "Opciones de Ajuste"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr "Offset"
@@ -14306,15 +14310,14 @@ msgstr "La ruta del proyecto no es correcta (¿has cambiado algo?)."
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"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
-msgid "Couldn't edit project.godot in project path."
-msgstr "No se pudo editar project.godot en la ruta del proyecto."
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "No se pudo guardar el proyecto en '%s' (error %d)."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15357,19 +15360,16 @@ msgid "Make Local"
msgstr "Crear Local"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "Activar Nombre Único de Escena"
+msgstr "Activar Nombre(s) Único(s) de Escena"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "Otro nodo ya utiliza este nombre único en la escena."
+msgstr "Nombres únicos ya utilizados por otro nodo en la escena:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Disable Scene Unique Name(s)"
-msgstr "Desactivar Nombre Único de Escena"
+msgstr "Desactivar Nombre(s) Único(s) de Escena"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -16339,7 +16339,7 @@ msgstr "Imprimir FPS"
#: main/main.cpp
msgid "Verbose stdout"
-msgstr ""
+msgstr "Stdout Extendido"
#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp
msgid "Physics Interpolation"
@@ -16510,7 +16510,7 @@ msgstr "Aceptar Cierre Del Programa Automáticamente"
#: main/main.cpp scene/main/scene_tree.cpp
msgid "Quit On Go Back"
-msgstr "Salir y Regresar"
+msgstr "Salir al Ir Atrás"
#: main/main.cpp scene/main/viewport.cpp
msgid "Snap Controls To Pixels"
@@ -16813,7 +16813,7 @@ msgstr "Color de la Ruta del Nodo"
#: modules/gdscript/gdscript.cpp modules/visual_script/visual_script.cpp
msgid "Max Call Stack"
-msgstr ""
+msgstr "Pila de llamadas Máxima"
#: modules/gdscript/gdscript.cpp
msgid "Treat Warnings As Errors"
@@ -16953,7 +16953,7 @@ msgstr "Longitud de Bytes"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Byte Stride"
-msgstr ""
+msgstr "Cadencia de Byte"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Indices"
@@ -17089,11 +17089,11 @@ msgstr "Factor Specular"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Spec Gloss Img"
-msgstr ""
+msgstr "Espec. Brillo Img"
#: modules/gltf/gltf_state.cpp
msgid "Json"
-msgstr ""
+msgstr "Json"
#: modules/gltf/gltf_state.cpp
msgid "Major Version"
@@ -17109,7 +17109,7 @@ msgstr "Datos GLB"
#: modules/gltf/gltf_state.cpp
msgid "Use Named Skin Binds"
-msgstr ""
+msgstr "Usar Vínculos de Skins con Nombre"
#: modules/gltf/gltf_state.cpp
msgid "Buffer Views"
@@ -17117,7 +17117,7 @@ msgstr "Vistas del Buffer"
#: modules/gltf/gltf_state.cpp
msgid "Accessors"
-msgstr ""
+msgstr "Accesos"
#: modules/gltf/gltf_state.cpp
msgid "Scene Name"
@@ -17138,7 +17138,7 @@ msgstr "Imágenes"
#: modules/gltf/gltf_state.cpp
msgid "Cameras"
-msgstr ""
+msgstr "Cámaras"
#: modules/gltf/gltf_state.cpp servers/visual_server.cpp
msgid "Lights"
@@ -17178,7 +17178,7 @@ msgstr "Uso en Luz Bakeada"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Cell"
-msgstr ""
+msgstr "Celda"
#: modules/gridmap/grid_map.cpp
msgid "Octant Size"
@@ -17200,7 +17200,7 @@ msgstr "Centro Z"
#: scene/2d/tile_map.cpp scene/3d/collision_object.cpp scene/3d/soft_body.cpp
#: scene/resources/material.cpp
msgid "Mask"
-msgstr ""
+msgstr "Máscara"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Bake Navigation"
@@ -17376,19 +17376,19 @@ msgstr "CPU Lightmapper"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Low Quality Ray Count"
-msgstr ""
+msgstr "Conteo de Rayos de Baja Calidad"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Medium Quality Ray Count"
-msgstr ""
+msgstr "Conteo de Rayos de Calidad Media"
#: modules/lightmapper_cpu/register_types.cpp
msgid "High Quality Ray Count"
-msgstr ""
+msgstr "Conteo de Rayos de Calidad Alta"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Ultra Quality Ray Count"
-msgstr ""
+msgstr "Conteo de Rayos de Calidad Ultra"
#: modules/minimp3/audio_stream_mp3.cpp
#: modules/minimp3/resource_importer_mp3.cpp
@@ -17399,11 +17399,11 @@ msgstr "Offset de Bucle"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Eye Height"
-msgstr ""
+msgstr "Altura Ocular"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "IOD"
-msgstr ""
+msgstr "IOD"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Display Width"
@@ -17415,15 +17415,15 @@ msgstr "Pantalla a Lente"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Oversample"
-msgstr ""
+msgstr "Sobremuestreo"
#: 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"
@@ -17438,23 +17438,20 @@ msgid "Auto Update Project"
msgstr "Actualización Automática del Proyecto"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Assembly Name"
-msgstr "Nombre a Mostrar"
+msgstr "Nombre del Conjunto"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Solution Directory"
-msgstr "Selecciona un directorio"
+msgstr "Directorio de Soluciones"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "C# Project Directory"
-msgstr "Selecciona un directorio"
+msgstr "Directorio de Proyectos C#"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
-msgstr "Fin del reporte de la pila de excepciones"
+msgstr "Fin de la pila de excepciones internas"
#: modules/navigation/navigation_mesh_editor_plugin.cpp
#: scene/3d/navigation_mesh_instance.cpp
@@ -17465,7 +17462,7 @@ msgstr ""
#: modules/navigation/navigation_mesh_editor_plugin.cpp
msgid "Bake NavMesh"
-msgstr "Calcular NavMesh"
+msgstr "Bakear NavMesh"
#: modules/navigation/navigation_mesh_editor_plugin.cpp
msgid "Clear the navigation mesh."
@@ -17525,7 +17522,7 @@ msgstr "¡Hecho!"
#: modules/opensimplex/noise_texture.cpp
msgid "Seamless"
-msgstr ""
+msgstr "Sin costuras"
#: modules/opensimplex/noise_texture.cpp
msgid "As Normal Map"
@@ -17533,11 +17530,11 @@ msgstr "Como Mapa Normal"
#: modules/opensimplex/noise_texture.cpp
msgid "Bump Strength"
-msgstr ""
+msgstr "Fuerza de Choque"
#: modules/opensimplex/noise_texture.cpp
msgid "Noise"
-msgstr ""
+msgstr "Ruido"
#: modules/opensimplex/noise_texture.cpp
msgid "Noise Offset"
@@ -17545,11 +17542,11 @@ msgstr "Offset de Ruido"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Octaves"
-msgstr ""
+msgstr "Octavas"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Period"
-msgstr ""
+msgstr "Periodo"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Persistence"
@@ -17557,11 +17554,11 @@ msgstr "Persistencia"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Lacunarity"
-msgstr ""
+msgstr "Lacunaridad"
#: modules/regex/regex.cpp
msgid "Subject"
-msgstr ""
+msgstr "Asunto"
#: modules/regex/regex.cpp
msgid "Names"
@@ -17573,15 +17570,15 @@ msgstr "Cadenas"
#: modules/upnp/upnp.cpp
msgid "Discover Multicast If"
-msgstr ""
+msgstr "Descubrir Multicast si"
#: modules/upnp/upnp.cpp
msgid "Discover Local Port"
-msgstr ""
+msgstr "Descubrir Puerto Local"
#: modules/upnp/upnp.cpp
msgid "Discover IPv6"
-msgstr ""
+msgstr "Descubrir IPV6"
#: modules/upnp/upnp_device.cpp
msgid "Description URL"
@@ -17593,7 +17590,7 @@ msgstr "Tipo de Servicio"
#: modules/upnp/upnp_device.cpp
msgid "IGD Control URL"
-msgstr ""
+msgstr "IGD Control URL"
#: modules/upnp/upnp_device.cpp
msgid "IGD Service Type"
@@ -17601,7 +17598,7 @@ msgstr "Tipo de Servicio IGD"
#: modules/upnp/upnp_device.cpp
msgid "IGD Our Addr"
-msgstr ""
+msgstr "Dirección de IGD"
#: modules/upnp/upnp_device.cpp
msgid "IGD Status"
@@ -18261,7 +18258,7 @@ msgstr "SubCall"
#: modules/visual_script/visual_script_nodes.cpp scene/gui/graph_node.cpp
msgid "Title"
-msgstr ""
+msgstr "Título"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Construct %s"
@@ -18329,7 +18326,7 @@ msgstr "Modo de Escritura"
#: modules/webrtc/webrtc_data_channel.h
msgid "WebRTC"
-msgstr ""
+msgstr "WebRTC"
#: modules/webrtc/webrtc_data_channel.h
msgid "Max Channel In Buffer (KB)"
@@ -18337,11 +18334,11 @@ msgstr "Buffer de Canal Máximo (KB)"
#: modules/websocket/websocket_client.cpp
msgid "Verify SSL"
-msgstr ""
+msgstr "Verificar SSL"
#: modules/websocket/websocket_client.cpp
msgid "Trusted SSL Certificate"
-msgstr ""
+msgstr "Certificado SSL de Confianza"
#: modules/websocket/websocket_macros.h
msgid "WebSocket Client"
@@ -18353,7 +18350,7 @@ msgstr "Buffer de Entrada Máximo (KB)"
#: modules/websocket/websocket_macros.h
msgid "Max In Packets"
-msgstr ""
+msgstr "Paquetes Máximos de Entrada"
#: modules/websocket/websocket_macros.h
msgid "Max Out Buffer (KB)"
@@ -18361,7 +18358,7 @@ msgstr "Buffer de Salida Máximo (KB)"
#: modules/websocket/websocket_macros.h
msgid "Max Out Packets"
-msgstr ""
+msgstr "Paquetes Máximos de Salida"
#: modules/websocket/websocket_macros.h
msgid "WebSocket Server"
@@ -18369,7 +18366,7 @@ msgstr "Servidor WebSocket"
#: modules/websocket/websocket_server.cpp
msgid "Bind IP"
-msgstr ""
+msgstr "Vincular IP"
#: modules/websocket/websocket_server.cpp
msgid "Private Key"
@@ -18377,7 +18374,7 @@ msgstr "Clave Privada"
#: modules/websocket/websocket_server.cpp platform/javascript/export/export.cpp
msgid "SSL Certificate"
-msgstr ""
+msgstr "Certificado SSL"
#: modules/websocket/websocket_server.cpp
msgid "CA Chain"
@@ -18401,11 +18398,11 @@ msgstr "Características Opcionales"
#: modules/webxr/webxr_interface.cpp
msgid "Requested Reference Space Types"
-msgstr ""
+msgstr "Tipos de Espacios de Referencia Requeridos"
#: modules/webxr/webxr_interface.cpp
msgid "Reference Space Type"
-msgstr ""
+msgstr "Tipo de Espacio de Referencia"
#: modules/webxr/webxr_interface.cpp
msgid "Visibility State"
@@ -18421,7 +18418,7 @@ msgstr "Mapeo Estándar XR"
#: platform/android/export/export.cpp
msgid "Android SDK Path"
-msgstr ""
+msgstr "Ruta del SDK de Android"
#: platform/android/export/export.cpp
msgid "Debug Keystore"
@@ -18429,35 +18426,35 @@ msgstr "Debug Keystore"
#: platform/android/export/export.cpp
msgid "Debug Keystore User"
-msgstr ""
+msgstr "Usuario Debug Keystore"
#: platform/android/export/export.cpp
msgid "Debug Keystore Pass"
-msgstr ""
+msgstr "Contraseña Debug Keystore"
#: platform/android/export/export.cpp
msgid "Force System User"
-msgstr ""
+msgstr "Forzar Usuario del Sistema"
#: platform/android/export/export.cpp
msgid "Shutdown ADB On Exit"
-msgstr ""
+msgstr "Apagar el ADB al Salir"
#: platform/android/export/export_plugin.cpp
msgid "Launcher Icons"
-msgstr ""
+msgstr "Iconos del Launcher"
#: platform/android/export/export_plugin.cpp
msgid "Main 192 X 192"
-msgstr ""
+msgstr "Principal 192 X 192"
#: platform/android/export/export_plugin.cpp
msgid "Adaptive Foreground 432 X 432"
-msgstr ""
+msgstr "Primer Plano Adaptable 432 X 432"
#: platform/android/export/export_plugin.cpp
msgid "Adaptive Background 432 X 432"
-msgstr ""
+msgstr "Fondo Adaptable 432 X 432"
#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
@@ -18532,7 +18529,7 @@ msgstr "Contraseña de Release"
#: platform/android/export/export_plugin.cpp
msgid "One Click Deploy"
-msgstr ""
+msgstr "Despliegue con Un Clic"
#: platform/android/export/export_plugin.cpp
msgid "Clear Previous Install"
@@ -18540,7 +18537,7 @@ msgstr "Limpiar Instalación Previa"
#: platform/android/export/export_plugin.cpp
msgid "Code"
-msgstr ""
+msgstr "Código"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
msgid "Package"
@@ -18560,7 +18557,7 @@ msgstr "Clasificar Como Juego"
#: platform/android/export/export_plugin.cpp
msgid "Retain Data On Uninstall"
-msgstr ""
+msgstr "Conservar Datos al Desinstalar"
#: platform/android/export/export_plugin.cpp
msgid "Exclude From Recents"
@@ -18588,11 +18585,11 @@ msgstr "Seguimiento de Manos"
#: platform/android/export/export_plugin.cpp
msgid "Hand Tracking Frequency"
-msgstr ""
+msgstr "Frecuencia de Seguimiento de la Mano"
#: platform/android/export/export_plugin.cpp
msgid "Passthrough"
-msgstr ""
+msgstr "Pasar por"
#: platform/android/export/export_plugin.cpp
msgid "Immersive Mode"
@@ -18620,7 +18617,7 @@ msgstr "Backup de Datos del Usuario"
#: platform/android/export/export_plugin.cpp
msgid "Allow"
-msgstr ""
+msgstr "Permitir"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
msgid "Command Line"
@@ -18636,7 +18633,7 @@ msgstr "Expansión del APK"
#: platform/android/export/export_plugin.cpp
msgid "Salt"
-msgstr ""
+msgstr "Sal"
#: platform/android/export/export_plugin.cpp
msgid "Public Key"
@@ -18808,12 +18805,15 @@ msgstr ""
#: platform/android/export/export_plugin.cpp
msgid "\"Min SDK\" should be a valid integer, but got \"%s\" which is invalid."
msgstr ""
+"\"Min SDK\" debería ser un entero válido, pero obtuvo \"%s\" que es inválido."
#: platform/android/export/export_plugin.cpp
msgid ""
"\"Min SDK\" cannot be lower than %d, which is the version needed by the "
"Godot library."
msgstr ""
+"\"Min SDK\" no puede ser inferior a %d, que es la versión que necesita la "
+"librería de Godot."
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19012,67 +19012,67 @@ msgstr "El carácter '% s' no está permitido en el Identificador."
#: platform/iphone/export/export.cpp
msgid "Landscape Launch Screens"
-msgstr ""
+msgstr "Pantalla de Inicio Landscape"
#: platform/iphone/export/export.cpp
msgid "iPhone 2436 X 1125"
-msgstr ""
+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 "Pantalla de Inicio Portrait"
#: 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"
-msgstr ""
+msgstr "iPad 1536 X 2048"
#: platform/iphone/export/export.cpp
msgid "iPhone 1242 X 2208"
-msgstr ""
+msgstr "iPhone 1242 X 2208"
#: platform/iphone/export/export.cpp
msgid "App Store Team ID"
-msgstr ""
+msgstr "ID del Equipo de la App Store"
#: platform/iphone/export/export.cpp
msgid "Provisioning Profile UUID Debug"
-msgstr ""
+msgstr "Depuración del Perfil de Aprovisionamiento UUID"
#: platform/iphone/export/export.cpp
msgid "Code Sign Identity Debug"
-msgstr ""
+msgstr "Depuración de la Identidad del Código"
#: platform/iphone/export/export.cpp
msgid "Export Method Debug"
@@ -19080,11 +19080,11 @@ msgstr "Exportar Método de Depuración"
#: platform/iphone/export/export.cpp
msgid "Provisioning Profile UUID Release"
-msgstr ""
+msgstr "Release UUID del Perfil de Aprovisionamiento"
#: platform/iphone/export/export.cpp
msgid "Code Sign Identity Release"
-msgstr ""
+msgstr "Release de Código de Identidad"
#: platform/iphone/export/export.cpp
msgid "Export Method Release"
@@ -19092,11 +19092,11 @@ msgstr "Método de Exportación de Release"
#: platform/iphone/export/export.cpp
msgid "Targeted Device Family"
-msgstr ""
+msgstr "Familia de Dispositivos de Destino"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Info"
-msgstr ""
+msgstr "Información"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Identifier"
@@ -19133,11 +19133,11 @@ msgstr "Datos de Usuario"
#: platform/iphone/export/export.cpp
msgid "Accessible From Files App"
-msgstr ""
+msgstr "Accesible desde la Aplicación de Archivos"
#: platform/iphone/export/export.cpp
msgid "Accessible From iTunes Sharing"
-msgstr ""
+msgstr "Accesible desde iTunes Sharing"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Privacy"
@@ -19157,43 +19157,43 @@ msgstr "Descripción del Uso de la Fotolibrería"
#: platform/iphone/export/export.cpp
msgid "iPhone 120 X 120"
-msgstr ""
+msgstr "iPhone 120 X 120"
#: platform/iphone/export/export.cpp
msgid "iPhone 180 X 180"
-msgstr ""
+msgstr "iPhone 180 X 180"
#: platform/iphone/export/export.cpp
msgid "iPad 76 X 76"
-msgstr ""
+msgstr "iPad 76 X 76"
#: platform/iphone/export/export.cpp
msgid "iPad 152 X 152"
-msgstr ""
+msgstr "iPad 152 X 152"
#: platform/iphone/export/export.cpp
msgid "iPad 167 X 167"
-msgstr ""
+msgstr "iPad 167 X 167"
#: platform/iphone/export/export.cpp
msgid "App Store 1024 X 1024"
-msgstr ""
+msgstr "App Store 1024 X 1024"
#: platform/iphone/export/export.cpp
msgid "Spotlight 40 X 40"
-msgstr ""
+msgstr "Spotlight 40 X 40"
#: platform/iphone/export/export.cpp
msgid "Spotlight 80 X 80"
-msgstr ""
+msgstr "Spotlight 80 X 80"
#: platform/iphone/export/export.cpp
msgid "Storyboard"
-msgstr ""
+msgstr "Storyboard"
#: platform/iphone/export/export.cpp
msgid "Use Launch Screen Storyboard"
-msgstr ""
+msgstr "Usar Storyboard en la Pantalla de Inicio"
#: platform/iphone/export/export.cpp
msgid "Image Scale Mode"
@@ -19216,9 +19216,8 @@ msgid "Custom BG Color"
msgstr "Color de Fondo Personalizado"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Icons"
-msgstr "Icono de Exportación"
+msgstr "Iconos de Exportación"
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp
@@ -19272,7 +19271,7 @@ msgstr "No se pudo leer el archivo: \"%s\"."
#: platform/javascript/export/export.cpp
msgid "PWA"
-msgstr ""
+msgstr "PWA"
#: platform/javascript/export/export.cpp
msgid "Variant"
@@ -19288,15 +19287,15 @@ msgstr "Compresión de Texturas en la VRAM"
#: platform/javascript/export/export.cpp
msgid "For Desktop"
-msgstr ""
+msgstr "Para Escritorio"
#: platform/javascript/export/export.cpp
msgid "For Mobile"
-msgstr ""
+msgstr "Para Móviles"
#: platform/javascript/export/export.cpp
msgid "HTML"
-msgstr ""
+msgstr "HTML"
#: platform/javascript/export/export.cpp
msgid "Export Icon"
@@ -19308,15 +19307,15 @@ msgstr "HTML Shell Personalizado"
#: platform/javascript/export/export.cpp
msgid "Head Include"
-msgstr ""
+msgstr "Incluyendo Cabecera"
#: platform/javascript/export/export.cpp
msgid "Canvas Resize Policy"
-msgstr ""
+msgstr "Política de Redimensionamiento del Canvas"
#: platform/javascript/export/export.cpp
msgid "Focus Canvas On Start"
-msgstr ""
+msgstr "Enfocar Lienzo Al Inicio"
#: platform/javascript/export/export.cpp
msgid "Experimental Virtual Keyboard"
@@ -19324,23 +19323,23 @@ msgstr "Teclado Virtual Experimental"
#: platform/javascript/export/export.cpp
msgid "Progressive Web App"
-msgstr ""
+msgstr "App Web Progresiva"
#: platform/javascript/export/export.cpp
msgid "Offline Page"
-msgstr ""
+msgstr "Página Offline"
#: platform/javascript/export/export.cpp
msgid "Icon 144 X 144"
-msgstr ""
+msgstr "Icono 144 X 144"
#: platform/javascript/export/export.cpp
msgid "Icon 180 X 180"
-msgstr ""
+msgstr "Icono 180 X 180"
#: platform/javascript/export/export.cpp
msgid "Icon 512 X 512"
-msgstr ""
+msgstr "Icono 512 X 512"
#: platform/javascript/export/export.cpp
msgid "Could not read HTML shell: \"%s\"."
@@ -19356,15 +19355,15 @@ msgstr "Error al iniciar el servidor HTTP: %d."
#: platform/javascript/export/export.cpp
msgid "Web"
-msgstr ""
+msgstr "Web"
#: platform/javascript/export/export.cpp
msgid "HTTP Host"
-msgstr ""
+msgstr "HTTP Host"
#: platform/javascript/export/export.cpp
msgid "HTTP Port"
-msgstr ""
+msgstr "Puerto HTTP"
#: platform/javascript/export/export.cpp
msgid "Use SSL"
@@ -19372,7 +19371,7 @@ msgstr "Usar SSL"
#: platform/javascript/export/export.cpp
msgid "SSL Key"
-msgstr ""
+msgstr "Clave SSL"
#: platform/osx/export/codesign.cpp
msgid "Can't get filesystem access."
@@ -19452,7 +19451,7 @@ msgstr "Categoría De La Aplicación"
#: platform/osx/export/export.cpp
msgid "High Res"
-msgstr ""
+msgstr "Alta Resolución"
#: platform/osx/export/export.cpp
msgid "Location Usage Description"
@@ -19460,7 +19459,7 @@ msgstr "Ubicación de la Descripción de Uso"
#: platform/osx/export/export.cpp
msgid "Address Book Usage Description"
-msgstr ""
+msgstr "Descripción de Uso de la Libreta de Direcciones"
#: platform/osx/export/export.cpp
msgid "Calendar Usage Description"
@@ -19480,15 +19479,15 @@ msgstr "Descripción de Uso de la Carpeta de Documentos"
#: platform/osx/export/export.cpp
msgid "Downloads Folder Usage Description"
-msgstr ""
+msgstr "Descripción de Uso de la Carpeta de Descargas"
#: platform/osx/export/export.cpp
msgid "Network Volumes Usage Description"
-msgstr ""
+msgstr "Descripción de Uso de Volúmenes de Red"
#: platform/osx/export/export.cpp
msgid "Removable Volumes Usage Description"
-msgstr ""
+msgstr "Descripción de Uso de Volúmenes Extraíbles"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
msgid "Codesign"
@@ -19521,15 +19520,15 @@ msgstr "Archivo Personalizado"
#: platform/osx/export/export.cpp
msgid "Allow JIT Code Execution"
-msgstr ""
+msgstr "Permitir Ejecución de Código JIT"
#: platform/osx/export/export.cpp
msgid "Allow Unsigned Executable Memory"
-msgstr ""
+msgstr "Permitir Memoria Ejecutable Desfasada"
#: platform/osx/export/export.cpp
msgid "Allow Dyld Environment Variables"
-msgstr ""
+msgstr "Permitir Variables de Entorno Dyld"
#: platform/osx/export/export.cpp
msgid "Disable Library Validation"
@@ -19541,11 +19540,11 @@ msgstr "Entrada de Audio"
#: platform/osx/export/export.cpp
msgid "Address Book"
-msgstr ""
+msgstr "Libreta de Direcciones"
#: platform/osx/export/export.cpp
msgid "Calendars"
-msgstr ""
+msgstr "Calendarios"
#: platform/osx/export/export.cpp
msgid "Photos Library"
@@ -19561,7 +19560,7 @@ msgstr "Depuración"
#: platform/osx/export/export.cpp
msgid "App Sandbox"
-msgstr ""
+msgstr "Sandbox de App"
#: platform/osx/export/export.cpp
msgid "Network Server"
@@ -19577,7 +19576,7 @@ msgstr "Dispositivo USB"
#: platform/osx/export/export.cpp
msgid "Device Bluetooth"
-msgstr ""
+msgstr "Dispositivo Bluetooth"
#: platform/osx/export/export.cpp
msgid "Files Downloads"
@@ -19605,7 +19604,7 @@ msgstr "Notarización"
#: platform/osx/export/export.cpp
msgid "Apple ID Name"
-msgstr ""
+msgstr "Nombre del ID de Apple"
#: platform/osx/export/export.cpp
msgid "Apple ID Password"
@@ -19613,7 +19612,7 @@ msgstr "Contraseña del ID de Apple"
#: platform/osx/export/export.cpp
msgid "Apple Team ID"
-msgstr ""
+msgstr "ID del Equipo Apple"
#: platform/osx/export/export.cpp
msgid "Could not open icon file \"%s\"."
@@ -19629,7 +19628,7 @@ msgstr "La notarización ha fallado."
#: platform/osx/export/export.cpp
msgid "Notarization request UUID: \"%s\""
-msgstr ""
+msgstr "Solicitud de notarización UUID: \"%s\""
#: platform/osx/export/export.cpp
msgid ""
@@ -19668,17 +19667,19 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "Built-in CodeSign failed with error \"%s\"."
-msgstr ""
+msgstr "El CodeSign incorporado falló con el error \"%s\"."
#: platform/osx/export/export.cpp
msgid "Built-in CodeSign require regex module."
-msgstr ""
+msgstr "El CodeSign incorporado requiere un módulo regex."
#: platform/osx/export/export.cpp
msgid ""
"Could not start codesign executable, make sure Xcode command line tools are "
"installed."
msgstr ""
+"No se ha podido iniciar el ejecutable de codificación, asegúrate de que las "
+"herramientas de línea de comandos de Xcode están instaladas."
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
msgid "No identity found."
@@ -19704,11 +19705,11 @@ msgstr "No se ha podido iniciar el ejecutable hdiutil."
#: platform/osx/export/export.cpp
msgid "`hdiutil create` failed - file exists."
-msgstr ""
+msgstr "`hdiutil create` falló - el archivo ya existe."
#: platform/osx/export/export.cpp
msgid "`hdiutil create` failed."
-msgstr ""
+msgstr "`hdiutil create` falló."
#: platform/osx/export/export.cpp
msgid "Creating app bundle"
@@ -19922,11 +19923,11 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "macOS"
-msgstr ""
+msgstr "macOS"
#: platform/osx/export/export.cpp
msgid "Force Builtin Codesign"
-msgstr ""
+msgstr "Forzar Codificación Integrada"
#: platform/uwp/export/export.cpp
msgid "Architecture"
@@ -19942,7 +19943,7 @@ msgstr "Nombre Corto"
#: platform/uwp/export/export.cpp
msgid "Publisher"
-msgstr ""
+msgstr "Editor"
#: platform/uwp/export/export.cpp
msgid "Publisher Display Name"
@@ -19970,11 +19971,11 @@ msgstr "Algoritmo"
#: platform/uwp/export/export.cpp
msgid "Major"
-msgstr ""
+msgstr "Mayor"
#: platform/uwp/export/export.cpp
msgid "Minor"
-msgstr ""
+msgstr "Menor"
#: platform/uwp/export/export.cpp
msgid "Build"
@@ -19986,7 +19987,7 @@ msgstr "Revisión"
#: platform/uwp/export/export.cpp
msgid "Landscape"
-msgstr ""
+msgstr "Landscape"
#: platform/uwp/export/export.cpp
msgid "Portrait"
@@ -19994,11 +19995,11 @@ msgstr "Retrato"
#: platform/uwp/export/export.cpp
msgid "Landscape Flipped"
-msgstr ""
+msgstr "Landscape Volteado"
#: platform/uwp/export/export.cpp
msgid "Portrait Flipped"
-msgstr ""
+msgstr "Retrato Invertido"
#: platform/uwp/export/export.cpp
msgid "Store Logo"
@@ -20006,23 +20007,23 @@ msgstr "Logo de Tienda"
#: platform/uwp/export/export.cpp
msgid "Square 44 X 44 Logo"
-msgstr ""
+msgstr "Logo Cuadrado 44 X 44"
#: platform/uwp/export/export.cpp
msgid "Square 71 X 71 Logo"
-msgstr ""
+msgstr "Logo Cuadrado 71 X 71"
#: platform/uwp/export/export.cpp
msgid "Square 150 X 150 Logo"
-msgstr ""
+msgstr "Logo Cuadrado 150 X 150"
#: platform/uwp/export/export.cpp
msgid "Square 310 X 310 Logo"
-msgstr ""
+msgstr "Logo Cuadrado 310x310"
#: platform/uwp/export/export.cpp
msgid "Wide 310 X 150 Logo"
-msgstr ""
+msgstr "Logotipo Panorámico 310 X 150"
#: platform/uwp/export/export.cpp
msgid "Splash Screen"
@@ -20034,21 +20035,23 @@ msgstr "Tiles"
#: platform/uwp/export/export.cpp
msgid "Show Name On Square 150 X 150"
-msgstr ""
+msgstr "Mostrar Nombre en Cuadrado 150 X 150"
#: platform/uwp/export/export.cpp
msgid "Show Name On Wide 310 X 150"
-msgstr ""
+msgstr "Mostrar Nombre en Panorámico 310 X 150"
#: platform/uwp/export/export.cpp
msgid "Show Name On Square 310 X 310"
-msgstr ""
+msgstr "Mostrar Nombre en Cuadrado 310 X 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 ""
+"La versión Mono de Godot no es compatible con la plataforma UWP. Utiliza la "
+"compilación estándar (sin soporte para C#) si deseas enfocarte en UWP."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -20115,7 +20118,7 @@ msgstr ""
#: platform/uwp/export/export.cpp
msgid "UWP"
-msgstr ""
+msgstr "UWP"
#: platform/uwp/export/export.cpp platform/windows/export/export.cpp
msgid "Signtool"
@@ -20123,7 +20126,7 @@ msgstr "Signtool"
#: platform/uwp/export/export.cpp
msgid "Debug Certificate"
-msgstr ""
+msgstr "Certificado de Depuración"
#: platform/uwp/export/export.cpp
msgid "Debug Algorithm"
@@ -20135,11 +20138,11 @@ msgstr "Fallo al renombrar el archivo temporal \"%s\"."
#: platform/windows/export/export.cpp
msgid "Identity Type"
-msgstr ""
+msgstr "Tipo de Identidad"
#: platform/windows/export/export.cpp
msgid "Timestamp Server URL"
-msgstr ""
+msgstr "URL del Servidor de Marcas de Tiempo"
#: platform/windows/export/export.cpp
msgid "Digest Algorithm"
@@ -20171,7 +20174,7 @@ msgstr "Descripción del Archivo"
#: platform/windows/export/export.cpp
msgid "Trademarks"
-msgstr ""
+msgstr "Marcas comerciales"
#: platform/windows/export/export.cpp
msgid "Resources Modification"
@@ -20256,7 +20259,7 @@ msgstr "Versión de producto no válida:"
#: platform/windows/export/export.cpp
msgid "Windows executables cannot be >= 4 GiB."
-msgstr ""
+msgstr "Los ejecutables de Windows no pueden ser >= 4 GiB."
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
msgid "Failed to open executable file \"%s\"."
@@ -20264,11 +20267,11 @@ msgstr "Fallo al abrir el archivo ejecutable \"%s\"."
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
msgid "Executable file header corrupted."
-msgstr ""
+msgstr "La cabecera del archivo ejecutable está corrupta."
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
msgid "Executable \"pck\" section not found."
-msgstr ""
+msgstr "No se encuentra la sección ejecutable \"pck\"."
#: platform/windows/export/export.cpp
msgid "Windows"
@@ -20276,19 +20279,19 @@ msgstr "Windows"
#: platform/windows/export/export.cpp
msgid "Rcedit"
-msgstr ""
+msgstr "Rcedit"
#: platform/windows/export/export.cpp
msgid "Osslsigncode"
-msgstr ""
+msgstr "Osslsigncode"
#: 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."
-msgstr ""
+msgstr "Los ejecutables de 32 bits no pueden tener datos embebidos >= 4 GiB."
#: scene/2d/animated_sprite.cpp scene/3d/sprite_3d.cpp
#: scene/resources/texture.cpp
@@ -20321,12 +20324,12 @@ msgstr "Centrado"
#: scene/2d/animated_sprite.cpp scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
#: scene/gui/texture_button.cpp scene/gui/texture_rect.cpp
msgid "Flip H"
-msgstr ""
+msgstr "Voltear H"
#: scene/2d/animated_sprite.cpp scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
#: scene/gui/texture_button.cpp scene/gui/texture_rect.cpp
msgid "Flip V"
-msgstr ""
+msgstr "Voltear V"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Monitoring"
@@ -20359,7 +20362,7 @@ msgstr "Velocidad de la Gravedad"
#: 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 "Gravedad"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Linear Damp"
@@ -20367,7 +20370,7 @@ msgstr "Amortiguación Lineal"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Angular Damp"
-msgstr ""
+msgstr "Amortiguación Angular"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Audio Bus"
@@ -20396,7 +20399,7 @@ msgstr "Reproducción Automática"
#: 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 "Stream Pausado"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/3d/light.cpp scene/3d/reflection_probe.cpp
@@ -20416,7 +20419,7 @@ msgstr "Bus"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
msgid "Area Mask"
-msgstr ""
+msgstr "Máscara de Área"
#: scene/2d/back_buffer_copy.cpp
msgid "Copy Mode"
@@ -20491,7 +20494,7 @@ msgstr "Suavizar"
#: scene/2d/camera_2d.cpp
msgid "H"
-msgstr ""
+msgstr "H"
#: scene/2d/camera_2d.cpp
msgid "V"
@@ -20528,11 +20531,11 @@ msgstr "Animación de Partículas"
#: scene/2d/canvas_item.cpp
msgid "Particles Anim H Frames"
-msgstr ""
+msgstr "Animación de partículas Fotogramas H"
#: scene/2d/canvas_item.cpp
msgid "Particles Anim V Frames"
-msgstr ""
+msgstr "Animación de partículas Fotogramas V"
#: scene/2d/canvas_item.cpp
msgid "Particles Anim Loop"
@@ -20553,7 +20556,7 @@ msgstr "Modulación Automática"
#: scene/2d/canvas_item.cpp
msgid "Show Behind Parent"
-msgstr ""
+msgstr "Mostrar detrás del padre"
#: scene/2d/canvas_item.cpp
msgid "Show On Top"
@@ -20566,7 +20569,7 @@ msgstr "Máscara de Luz"
#: scene/2d/canvas_item.cpp
msgid "Use Parent Material"
-msgstr ""
+msgstr "Usar el material del padre"
#: scene/2d/canvas_modulate.cpp
msgid ""
@@ -20688,7 +20691,7 @@ msgstr "Emitiendo"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Lifetime"
-msgstr ""
+msgstr "Tiempo de vida"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp scene/main/timer.cpp
@@ -20703,7 +20706,7 @@ msgstr "Preproceso"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Explosiveness"
-msgstr ""
+msgstr "Explosividad"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -20713,7 +20716,7 @@ msgstr "Aleatoriedad"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Lifetime Randomness"
-msgstr ""
+msgstr "Aleatoriedad para siempre"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -20723,12 +20726,12 @@ msgstr "FPS Fijos"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Fract Delta"
-msgstr ""
+msgstr "Fracción Delta"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Drawing"
-msgstr ""
+msgstr "Dibujo"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -20738,7 +20741,7 @@ msgstr "Coordenadas Locales"
#: 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 "Orden de dibujo"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -20772,7 +20775,7 @@ msgstr "Dirección"
#: scene/resources/particles_material.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Spread"
-msgstr ""
+msgstr "Propagación"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -20788,7 +20791,7 @@ msgstr "Velocidad Aleatoria"
#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
msgid "Angular Velocity"
-msgstr ""
+msgstr "Velocidad angular"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -20813,7 +20816,7 @@ msgstr "Aceleración"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Accel Random"
-msgstr ""
+msgstr "Aceleración aleatoria"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -20823,12 +20826,12 @@ msgstr "Curva de Aceleración"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Radial Accel"
-msgstr ""
+msgstr "Aceleración radial"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Tangential Accel"
-msgstr ""
+msgstr "Aceleración tangencial"
#: scene/2d/cpu_particles_2d.cpp scene/2d/joints_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/physics_body.cpp
@@ -20836,12 +20839,12 @@ msgstr ""
#: scene/resources/particles_material.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Damping"
-msgstr ""
+msgstr "Amortiguación"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Damping Random"
-msgstr ""
+msgstr "Amortiguación Aleatoria"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -20851,12 +20854,12 @@ msgstr "Curva de Amortiguación"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp scene/3d/light.cpp
#: scene/resources/particles_material.cpp
msgid "Angle"
-msgstr ""
+msgstr "Ángulo"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Angle Random"
-msgstr ""
+msgstr "Ángulo aleatorio"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -20869,7 +20872,7 @@ msgstr "Cantidad de Escala"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
msgid "Scale Amount Random"
-msgstr ""
+msgstr "Cantidad de escalado aleatoria"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
msgid "Scale Amount Curve"
@@ -20883,7 +20886,7 @@ msgstr "Rampa de Color"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Color Initial Ramp"
-msgstr ""
+msgstr "Color Rampa Inicial"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -20957,7 +20960,7 @@ msgstr "Nodo B"
#: scene/3d/light.cpp scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
#: scene/resources/environment.cpp
msgid "Bias"
-msgstr ""
+msgstr "Tendencia"
#: scene/2d/joints_2d.cpp
msgid "Disable Collision"
@@ -20965,12 +20968,12 @@ msgstr "Desactivar Colisión"
#: scene/2d/joints_2d.cpp scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Softness"
-msgstr ""
+msgstr "Suavidad"
#: scene/2d/joints_2d.cpp scene/resources/animation.cpp
#: scene/resources/ray_shape.cpp scene/resources/segment_shape_2d.cpp
msgid "Length"
-msgstr ""
+msgstr "Longitud"
#: scene/2d/joints_2d.cpp
msgid "Initial Offset"
@@ -20978,11 +20981,11 @@ msgstr "Offset Inicial"
#: scene/2d/joints_2d.cpp scene/3d/vehicle_body.cpp
msgid "Rest Length"
-msgstr ""
+msgstr "Duración de Reposo"
#: scene/2d/joints_2d.cpp scene/3d/physics_joint.cpp scene/3d/vehicle_body.cpp
msgid "Stiffness"
-msgstr ""
+msgstr "Rigidez"
#: scene/2d/light_2d.cpp
msgid ""
@@ -21004,15 +21007,15 @@ msgstr "Escala de Textura"
#: scene/3d/light.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp scene/resources/sky.cpp
msgid "Energy"
-msgstr ""
+msgstr "Energía"
#: scene/2d/light_2d.cpp
msgid "Z Min"
-msgstr ""
+msgstr "Z Mín"
#: scene/2d/light_2d.cpp
msgid "Z Max"
-msgstr ""
+msgstr "Z Máx"
#: scene/2d/light_2d.cpp
msgid "Layer Min"
@@ -21024,7 +21027,7 @@ msgstr "Capa Máxima"
#: scene/2d/light_2d.cpp
msgid "Item Cull Mask"
-msgstr ""
+msgstr "Ítem Cull Mask"
#: scene/2d/light_2d.cpp scene/3d/light.cpp scene/resources/style_box.cpp
msgid "Shadow"
@@ -21105,11 +21108,11 @@ msgstr "Borde"
#: scene/2d/line_2d.cpp
msgid "Sharp Limit"
-msgstr ""
+msgstr "Límite de nitidez"
#: scene/2d/line_2d.cpp
msgid "Round Precision"
-msgstr ""
+msgstr "Precisión redondeada"
#: scene/2d/line_2d.cpp scene/2d/polygon_2d.cpp
#: scene/resources/dynamic_font.cpp
@@ -21124,7 +21127,7 @@ msgstr "Multimesh"
#: scene/3d/navigation.cpp scene/animation/root_motion_view.cpp
#: scene/resources/world_2d.cpp servers/physics_2d/physics_2d_server_sw.cpp
msgid "Cell Size"
-msgstr ""
+msgstr "Tamaño de la casilla"
#: scene/2d/navigation_2d.cpp scene/3d/navigation.cpp
msgid "Edge Connection Margin"
@@ -21136,6 +21139,9 @@ msgid ""
"will be removed in a future version. Use 'Navigation2DServer.map_get_path()' "
"instead."
msgstr ""
+"El nodo 'Navigation2D' y 'Navigation2D.get_simple_path()' están deprecados y "
+"serán eliminados en una versión future. En su lugar, usa 'Navigation2DServer."
+"map_get_path()'."
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Pathfinding"
@@ -21330,7 +21336,7 @@ msgstr "Visibilidad Rect"
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid "Process Material"
-msgstr ""
+msgstr "Material de Proceso"
#: scene/2d/path_2d.cpp scene/3d/path.cpp scene/resources/sky.cpp
#: scene/resources/texture.cpp
@@ -21356,11 +21362,11 @@ msgstr "Offset V"
#: scene/2d/path_2d.cpp scene/3d/path.cpp
msgid "Cubic Interp"
-msgstr ""
+msgstr "Interp. Cúbica"
#: scene/2d/path_2d.cpp
msgid "Lookahead"
-msgstr ""
+msgstr "Preveer"
#: scene/2d/physics_body_2d.cpp scene/3d/visual_instance.cpp
msgid "Layers"
@@ -21382,11 +21388,11 @@ msgstr "Fricción"
#: scene/2d/physics_body_2d.cpp scene/2d/tile_map.cpp scene/3d/physics_body.cpp
#: scene/resources/physics_material.cpp
msgid "Bounce"
-msgstr ""
+msgstr "Rebotar"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Physics Material Override"
-msgstr ""
+msgstr "Reemplazar el material de físicas"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: scene/resources/world.cpp scene/resources/world_2d.cpp
@@ -21405,7 +21411,7 @@ msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Mass"
-msgstr ""
+msgstr "Masa"
#: scene/2d/physics_body_2d.cpp
msgid "Inertia"
@@ -21417,7 +21423,7 @@ msgstr "Peso"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Gravity Scale"
-msgstr ""
+msgstr "Escala de gravedad"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Custom Integrator"
@@ -21429,7 +21435,7 @@ msgstr "CD Continuo"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Contacts Reported"
-msgstr ""
+msgstr "Contactos reportados"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Contact Monitor"
@@ -21446,19 +21452,19 @@ msgstr "Puede Dormir"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Damp"
-msgstr ""
+msgstr "Humedad"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Angular"
-msgstr ""
+msgstr "Angular"
#: scene/2d/physics_body_2d.cpp
msgid "Applied Forces"
-msgstr ""
+msgstr "Fuerzas aplicadas"
#: scene/2d/physics_body_2d.cpp
msgid "Torque"
-msgstr ""
+msgstr "Torsión"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Safe Margin"
@@ -21474,7 +21480,7 @@ msgstr "Plataforma Móvil"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Apply Velocity On Leave"
-msgstr ""
+msgstr "Aplicar velocidad al salir"
#: scene/2d/physics_body_2d.cpp scene/2d/touch_screen_button.cpp
#: scene/3d/physics_body.cpp scene/gui/texture_button.cpp
@@ -21499,7 +21505,7 @@ msgstr "Colisionador"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Collider ID"
-msgstr ""
+msgstr "ID de colisionador"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
@@ -21522,11 +21528,11 @@ msgstr "Velocidad del Colisionador"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Collider Metadata"
-msgstr ""
+msgstr "Metadatos del colisionador"
#: scene/2d/polygon_2d.cpp
msgid "Invert"
-msgstr ""
+msgstr "Invertir"
#: scene/2d/polygon_2d.cpp
msgid "Vertex Colors"
@@ -21542,7 +21548,7 @@ msgstr "Extensión de Gizmos"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Exclude Parent"
-msgstr ""
+msgstr "Excluir Padre"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Cast To"
@@ -21550,15 +21556,15 @@ msgstr "Lanzar A"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Collide With"
-msgstr ""
+msgstr "Colisionar con"
#: scene/2d/ray_cast_2d.cpp scene/3d/camera.cpp scene/3d/ray_cast.cpp
msgid "Areas"
-msgstr ""
+msgstr "Áreas"
#: scene/2d/ray_cast_2d.cpp scene/3d/camera.cpp scene/3d/ray_cast.cpp
msgid "Bodies"
-msgstr ""
+msgstr "Cuerpos"
#: scene/2d/remote_transform_2d.cpp
msgid "Path property must point to a valid Node2D node to work."
@@ -21598,11 +21604,11 @@ msgstr ""
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
msgid "Hframes"
-msgstr ""
+msgstr "Fotogramas H"
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
msgid "Vframes"
-msgstr ""
+msgstr "Fotogramas V"
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
msgid "Frame Coords"
@@ -21660,7 +21666,7 @@ msgstr "Texturas Centradas"
#: scene/2d/tile_map.cpp
msgid "Cell Clip UV"
-msgstr ""
+msgstr "Clip de Celda UV"
#: scene/2d/tile_map.cpp
msgid "Use Parent"
@@ -21668,7 +21674,7 @@ msgstr "Usar Padres"
#: scene/2d/tile_map.cpp
msgid "Use Kinematic"
-msgstr ""
+msgstr "Usar cinemática"
#: scene/2d/touch_screen_button.cpp
msgid "Shape Centered"
@@ -21680,7 +21686,7 @@ msgstr "Forma Visible"
#: scene/2d/touch_screen_button.cpp
msgid "Passby Press"
-msgstr ""
+msgstr "Prensa de paso"
#: scene/2d/touch_screen_button.cpp
msgid "Visibility Mode"
@@ -21700,7 +21706,7 @@ msgstr "Pausar Animaciones"
#: scene/2d/visibility_notifier_2d.cpp scene/3d/visibility_notifier.cpp
msgid "Freeze Bodies"
-msgstr ""
+msgstr "Congelar cuerpos"
#: scene/2d/visibility_notifier_2d.cpp
msgid "Pause Particles"
@@ -21716,11 +21722,11 @@ msgstr "Procesamiento de los Padres"
#: scene/2d/visibility_notifier_2d.cpp
msgid "Physics Process Parent"
-msgstr ""
+msgstr "Procesado de Físicas Padre"
#: scene/3d/area.cpp
msgid "Reverb Bus"
-msgstr ""
+msgstr "Bus de reverberación"
#: scene/3d/area.cpp
msgid "Uniformity"
@@ -21732,11 +21738,11 @@ msgstr "ARVRCamera tiene que tener un nodo ARVROrigin como padre."
#: scene/3d/arvr_nodes.cpp
msgid "Controller ID"
-msgstr ""
+msgstr "ID del controlador"
#: scene/3d/arvr_nodes.cpp servers/arvr/arvr_positional_tracker.cpp
msgid "Rumble"
-msgstr ""
+msgstr "Retumbar"
#: scene/3d/arvr_nodes.cpp
msgid "ARVRController must have an ARVROrigin node as its parent."
@@ -21780,19 +21786,19 @@ msgstr "Modelo de Atenuación"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Unit dB"
-msgstr ""
+msgstr "dB de la unidad"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Unit Size"
-msgstr ""
+msgstr "Tamaño de la unidad"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Max dB"
-msgstr ""
+msgstr "dB Máx"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Out Of Range Mode"
-msgstr ""
+msgstr "Modo fuera de rango"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Emission Angle"
@@ -21808,13 +21814,13 @@ msgstr "Filtro de Atenuación dB"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Attenuation Filter"
-msgstr ""
+msgstr "Filtro de atenuación"
#: scene/3d/audio_stream_player_3d.cpp
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_filter.cpp
msgid "Cutoff Hz"
-msgstr ""
+msgstr "Hz de cierre"
#: scene/3d/audio_stream_player_3d.cpp
#: servers/audio/effects/audio_effect_filter.cpp
@@ -21832,7 +21838,7 @@ msgstr "Seguimiento"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/reflection_probe.cpp
msgid "Interior"
-msgstr ""
+msgstr "Interior"
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
@@ -21866,15 +21872,15 @@ msgstr "Extensiones"
#: scene/3d/baked_lightmap.cpp
msgid "Tweaks"
-msgstr ""
+msgstr "Retoques"
#: scene/3d/baked_lightmap.cpp
msgid "Bounces"
-msgstr ""
+msgstr "Rebotes"
#: scene/3d/baked_lightmap.cpp
msgid "Bounce Indirect Energy"
-msgstr ""
+msgstr "Energía indirecta del rebote"
#: scene/3d/baked_lightmap.cpp
msgid "Use Denoiser"
@@ -21882,7 +21888,7 @@ msgstr "Usar Eliminador de Ruido"
#: scene/3d/baked_lightmap.cpp scene/resources/texture.cpp
msgid "Use HDR"
-msgstr ""
+msgstr "Usar HDR"
#: scene/3d/baked_lightmap.cpp
msgid "Use Color"
@@ -21942,11 +21948,11 @@ msgstr "Nombre del Hueso"
#: scene/3d/camera.cpp
msgid "Keep Aspect"
-msgstr ""
+msgstr "Mantener aspecto"
#: scene/3d/camera.cpp scene/3d/light.cpp scene/3d/reflection_probe.cpp
msgid "Cull Mask"
-msgstr ""
+msgstr "Cull Mask"
#: scene/3d/camera.cpp
msgid "Doppler Tracking"
@@ -21958,7 +21964,7 @@ msgstr "Proyección"
#: scene/3d/camera.cpp
msgid "FOV"
-msgstr ""
+msgstr "FOV"
#: scene/3d/camera.cpp
msgid "Frustum Offset"
@@ -21970,7 +21976,7 @@ msgstr "Cercano"
#: scene/3d/camera.cpp
msgid "Far"
-msgstr ""
+msgstr "Lejos"
#: 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
@@ -21986,7 +21992,7 @@ msgstr "Recortar A"
#: scene/3d/collision_object.cpp scene/3d/soft_body.cpp
msgid "Ray Pickable"
-msgstr ""
+msgstr "Seleccionable por Rayo"
#: scene/3d/collision_object.cpp
msgid "Capture On Drag"
@@ -22091,7 +22097,7 @@ msgstr "Desactivar Z"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
msgid "Flatness"
-msgstr ""
+msgstr "Llanura"
#: scene/3d/cull_instance.cpp servers/visual_server.cpp
msgid "Portals"
@@ -22103,11 +22109,11 @@ msgstr "Modo Portal"
#: scene/3d/cull_instance.cpp
msgid "Include In Bound"
-msgstr ""
+msgstr "Incluir en límite"
#: scene/3d/cull_instance.cpp
msgid "Allow Merging"
-msgstr ""
+msgstr "Permitir fusión"
#: scene/3d/cull_instance.cpp
msgid "Autoplace Priority"
@@ -22141,7 +22147,7 @@ msgstr ""
#: scene/3d/gi_probe.cpp
msgid "Subdiv"
-msgstr ""
+msgstr "Subdividir"
#: scene/3d/gi_probe.cpp
msgid "Dynamic Range"
@@ -22149,7 +22155,7 @@ msgstr "Rango Dinámico"
#: scene/3d/gi_probe.cpp scene/3d/light.cpp
msgid "Normal Bias"
-msgstr ""
+msgstr "Tendencia normal"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
#: scene/resources/primitive_meshes.cpp
@@ -22158,7 +22164,7 @@ msgstr "Tamaño de Píxeles"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Billboard"
-msgstr ""
+msgstr "Billboard"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Shaded"
@@ -22166,11 +22172,11 @@ msgstr "Sombreado"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Double Sided"
-msgstr ""
+msgstr "Doble cara"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/material.cpp
msgid "No Depth Test"
-msgstr ""
+msgstr "Sin test de profundidad"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/material.cpp
msgid "Fixed Size"
@@ -22178,11 +22184,11 @@ msgstr "Tamaño Fijo"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Alpha Cut"
-msgstr ""
+msgstr "Corte alfa"
#: scene/3d/label_3d.cpp scene/resources/material.cpp
msgid "Alpha Scissor Threshold"
-msgstr ""
+msgstr "Umbral de recorte alfa"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/material.cpp
msgid "Render Priority"
@@ -22268,7 +22274,7 @@ msgstr "Rango de Profundidad"
#: scene/3d/light.cpp
msgid "Omni"
-msgstr ""
+msgstr "Omni"
#: scene/3d/light.cpp
msgid "Shadow Mode"
@@ -22285,7 +22291,7 @@ msgstr ""
#: scene/3d/light.cpp
msgid "Spot"
-msgstr ""
+msgstr "Ubicar"
#: scene/3d/light.cpp
msgid "Angle Attenuation"
@@ -22297,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 ""
@@ -22305,6 +22311,9 @@ msgid ""
"be removed in a future version. Use 'NavigationServer.map_get_path()' "
"instead."
msgstr ""
+"El nodo 'Navigation' y 'Navigation.get_simple_path()' están obsoletos y "
+"serán eliminados en una futura versión. Utiliza en su lugar "
+"'NavigationServer.map_get_path()'."
#: scene/3d/navigation.cpp scene/resources/curve.cpp
msgid "Up Vector"
@@ -22473,7 +22482,7 @@ msgstr "Restringir Articulaciones"
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Impulse Clamp"
-msgstr ""
+msgstr "Restricción de Impulso"
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Swing Span"
@@ -22481,7 +22490,7 @@ msgstr "Expansión de Swing"
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Twist Span"
-msgstr ""
+msgstr "Extensión de Torsión"
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
#: scene/3d/vehicle_body.cpp
@@ -22634,7 +22643,7 @@ msgstr "El nodo A y el nodo B deben ser diferentes PhysicsBody"
#: scene/3d/physics_joint.cpp
msgid "Solver"
-msgstr ""
+msgstr "Resolver"
#: scene/3d/physics_joint.cpp
msgid "Exclude Nodes"
@@ -22646,7 +22655,7 @@ msgstr "Parámetros"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit"
-msgstr ""
+msgstr "Límite Angular"
#: scene/3d/physics_joint.cpp
msgid "Upper"
@@ -22726,15 +22735,15 @@ msgstr "Amortiguación Lineal X"
#: scene/3d/physics_joint.cpp
msgid "Equilibrium Point"
-msgstr ""
+msgstr "Punto de Equilibrio"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit X"
-msgstr ""
+msgstr "Límite Angular X"
#: scene/3d/physics_joint.cpp
msgid "Angular Motor X"
-msgstr ""
+msgstr "Motor Angular X"
#: scene/3d/physics_joint.cpp
msgid "Angular Spring X"
@@ -22754,11 +22763,11 @@ msgstr "Amortiguación Lineal Y"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit Y"
-msgstr ""
+msgstr "Límite Angular Y"
#: scene/3d/physics_joint.cpp
msgid "Angular Motor Y"
-msgstr ""
+msgstr "Motor Angular Y"
#: scene/3d/physics_joint.cpp
msgid "Angular Spring Y"
@@ -22778,11 +22787,11 @@ msgstr "Amortiguación Lineal Z"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit Z"
-msgstr ""
+msgstr "Límite Angular Z"
#: scene/3d/physics_joint.cpp
msgid "Angular Motor Z"
-msgstr ""
+msgstr "Motor Angular Z"
#: scene/3d/physics_joint.cpp
msgid "Angular Spring Z"
@@ -22806,7 +22815,7 @@ msgstr "Portal Activo"
#: scene/3d/portal.cpp scene/resources/occluder_shape_polygon.cpp
msgid "Two Way"
-msgstr ""
+msgstr "Doble Vía"
#: scene/3d/portal.cpp
msgid "Linked Room"
@@ -22822,7 +22831,7 @@ msgstr "Nombre del Grupo"
#: scene/3d/proximity_group.cpp
msgid "Dispatch Mode"
-msgstr ""
+msgstr "Modo de Entrega"
#: scene/3d/proximity_group.cpp
msgid "Grid Radius"
@@ -22834,7 +22843,7 @@ msgstr "Depurar Shape"
#: scene/3d/ray_cast.cpp scene/resources/style_box.cpp
msgid "Thickness"
-msgstr ""
+msgstr "Espesor"
#: scene/3d/reflection_probe.cpp scene/main/viewport.cpp
msgid "Update Mode"
@@ -22899,11 +22908,11 @@ msgstr "Usar Simplificación Predeterminada"
#: scene/3d/room.cpp scene/3d/room_manager.cpp
msgid "Room Simplify"
-msgstr ""
+msgstr "Simplificar Room"
#: scene/3d/room.cpp
msgid "Bound"
-msgstr ""
+msgstr "Conectado"
#: scene/3d/room_group.cpp
msgid "Roomgroup Priority"
@@ -22935,7 +22944,7 @@ msgstr "Sólo debe haber un RoomManager en el SceneTree."
#: scene/3d/room_manager.cpp
msgid "Main"
-msgstr ""
+msgstr "Principal"
#: scene/3d/room_manager.cpp scene/animation/animation_blend_tree.cpp
#: scene/animation/animation_player.cpp scene/animation/animation_tree.cpp
@@ -22962,7 +22971,7 @@ msgstr "Nombre del Archivo PVS"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
msgid "Gameplay"
-msgstr ""
+msgstr "Gameplay"
#: scene/3d/room_manager.cpp
msgid "Gameplay Monitor"
@@ -22986,7 +22995,7 @@ msgstr "Depurar Extensión"
#: scene/3d/room_manager.cpp
msgid "Overlap Warning Threshold"
-msgstr ""
+msgstr "Umbral de Advertencia de Solapamiento"
#: scene/3d/room_manager.cpp
msgid "Preview Camera"
@@ -22994,7 +23003,7 @@ msgstr "Vista previa de la Cámara"
#: scene/3d/room_manager.cpp
msgid "Portal Depth Limit"
-msgstr ""
+msgstr "Límite de Profundidad del Portal"
#: scene/3d/room_manager.cpp
msgid "Default Portal Margin"
@@ -23076,7 +23085,7 @@ msgstr "Índice de Puntos"
#: scene/3d/soft_body.cpp
msgid "Spatial Attachment Path"
-msgstr ""
+msgstr "Ruta del Adjunto Espacial"
#: scene/3d/soft_body.cpp
msgid "Physics Enabled"
@@ -23096,31 +23105,31 @@ msgstr "Masa Total"
#: scene/3d/soft_body.cpp
msgid "Linear Stiffness"
-msgstr ""
+msgstr "Rigidez Lineal"
#: scene/3d/soft_body.cpp
msgid "Areaangular Stiffness"
-msgstr ""
+msgstr "Rigidez Área-angular"
#: scene/3d/soft_body.cpp
msgid "Volume Stiffness"
-msgstr ""
+msgstr "Rigidez de volumen"
#: scene/3d/soft_body.cpp
msgid "Pressure Coefficient"
-msgstr ""
+msgstr "Coeficiente de presión"
#: scene/3d/soft_body.cpp
msgid "Damping Coefficient"
-msgstr ""
+msgstr "Coeficiente de amortización"
#: scene/3d/soft_body.cpp
msgid "Drag Coefficient"
-msgstr ""
+msgstr "Coeficiente de resistencia"
#: scene/3d/soft_body.cpp
msgid "Pose Matching Coefficient"
-msgstr ""
+msgstr "Coeficiente de Adaptación de la Pose"
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -23158,7 +23167,7 @@ msgstr "Cantidad de Amortiguación"
#: scene/3d/sprite_3d.cpp scene/gui/graph_edit.cpp
msgid "Opacity"
-msgstr ""
+msgstr "Opacidad"
#: scene/3d/sprite_3d.cpp scene/resources/material.cpp
msgid "Transparent"
@@ -23190,15 +23199,15 @@ msgstr "Fuerza del Motor"
#: scene/3d/vehicle_body.cpp
msgid "Brake"
-msgstr ""
+msgstr "Freno"
#: scene/3d/vehicle_body.cpp
msgid "Steering"
-msgstr ""
+msgstr "Dirección"
#: scene/3d/vehicle_body.cpp
msgid "VehicleBody Motion"
-msgstr ""
+msgstr "Movimiento del VehicleBody"
#: scene/3d/vehicle_body.cpp
msgid "Use As Traction"
@@ -23206,7 +23215,7 @@ msgstr "Usar Como Tracción"
#: scene/3d/vehicle_body.cpp
msgid "Use As Steering"
-msgstr ""
+msgstr "Usar Como Dirección"
#: scene/3d/vehicle_body.cpp
msgid "Wheel"
@@ -23214,7 +23223,7 @@ msgstr "Rueda"
#: scene/3d/vehicle_body.cpp
msgid "Roll Influence"
-msgstr ""
+msgstr "Influencia del Rodaje"
#: scene/3d/vehicle_body.cpp
msgid "Friction Slip"
@@ -23232,6 +23241,14 @@ msgstr "Fuerza Máxima"
msgid "AABB"
msgstr "AABB"
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr "Ordenar"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr "Usar Centro de AABB"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr "Geometría"
@@ -23262,7 +23279,7 @@ msgstr "Generar Lightmap"
#: scene/3d/visual_instance.cpp
msgid "Lightmap Scale"
-msgstr ""
+msgstr "Escala de Lightmap"
#: scene/3d/visual_instance.cpp
msgid "LOD"
@@ -23275,11 +23292,11 @@ msgstr "Distancia Mínima"
#: scene/3d/visual_instance.cpp
msgid "Min Hysteresis"
-msgstr ""
+msgstr "Histéresis Mínima"
#: scene/3d/visual_instance.cpp
msgid "Max Hysteresis"
-msgstr ""
+msgstr "Histéresis Máxima"
#: scene/3d/world_environment.cpp
msgid ""
@@ -23335,7 +23352,7 @@ msgstr "Reinicio Automático"
#: scene/animation/animation_blend_tree.cpp
msgid "Delay"
-msgstr ""
+msgstr "Retraso"
#: scene/animation/animation_blend_tree.cpp
msgid "Random Delay"
@@ -23388,7 +23405,7 @@ msgstr "Animación Asignada"
#: scene/animation/animation_player.cpp
msgid "Reset On Save"
-msgstr ""
+msgstr "Restablecer Al Guardar"
#: scene/animation/animation_player.cpp
msgid "Current Animation Length"
@@ -23408,7 +23425,7 @@ msgstr "Tiempo de Mezcla Predeterminado"
#: scene/animation/animation_player.cpp
msgid "Method Call Mode"
-msgstr ""
+msgstr "Modo de Llamada de Método"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
@@ -23450,7 +23467,7 @@ msgstr "Reproductor de Animación"
#: scene/animation/animation_tree.cpp
msgid "Root Motion"
-msgstr ""
+msgstr "Movimiento de la Raíz"
#: scene/animation/animation_tree.cpp
msgid "Track"
@@ -23498,11 +23515,11 @@ msgstr "Anular Base de la Punta"
#: scene/animation/skeleton_ik.cpp
msgid "Use Magnet"
-msgstr ""
+msgstr "Usar Imán"
#: scene/animation/skeleton_ik.cpp
msgid "Magnet"
-msgstr ""
+msgstr "Imán"
#: scene/animation/skeleton_ik.cpp
msgid "Target Node"
@@ -23514,7 +23531,7 @@ msgstr "Iteraciones Máximas"
#: scene/animation/tween.cpp
msgid "Playback Process Mode"
-msgstr ""
+msgstr "Modo de Proceso de Reproducción"
#: scene/animation/tween.cpp
msgid "Playback Speed"
@@ -23536,7 +23553,7 @@ msgstr "Modo de Estiramiento"
#: scene/gui/aspect_ratio_container.cpp scene/gui/box_container.cpp
msgid "Alignment"
-msgstr ""
+msgstr "Alineamiento"
#: scene/gui/base_button.cpp
msgid "Shortcut In Tooltip"
@@ -23548,11 +23565,11 @@ msgstr "Modo de Acción"
#: scene/gui/base_button.cpp
msgid "Enabled Focus Mode"
-msgstr ""
+msgstr "Modo de Concentración Activado"
#: scene/gui/base_button.cpp
msgid "Keep Pressed Outside"
-msgstr ""
+msgstr "Mantener presionado al exterior"
#: scene/gui/base_button.cpp scene/gui/shortcut.cpp
msgid "Shortcut"
@@ -23679,7 +23696,7 @@ msgstr "Contenido del Clip"
#: scene/gui/control.cpp scene/resources/visual_shader_nodes.cpp
msgid "Hint"
-msgstr ""
+msgstr "Indicio"
#: scene/gui/control.cpp
msgid "Tooltip"
@@ -23715,7 +23732,7 @@ msgstr "Anterior"
#: scene/gui/control.cpp
msgid "Mouse"
-msgstr ""
+msgstr "Ratón"
#: scene/gui/control.cpp
msgid "Default Cursor Shape"
@@ -23723,7 +23740,7 @@ msgstr "Forma del Cursor Predeterminado"
#: scene/gui/control.cpp
msgid "Pass On Modal Close Click"
-msgstr ""
+msgstr "Pasar Clic Al Cerrar Modal"
#: scene/gui/control.cpp
msgid "Size Flags"
@@ -23739,7 +23756,7 @@ msgstr "Propiedades del Tema"
#: scene/gui/dialogs.cpp
msgid "Window Title"
-msgstr ""
+msgstr "Título de Ventana"
#: scene/gui/dialogs.cpp
msgid "Dialog"
@@ -23747,7 +23764,7 @@ msgstr "Diálogo"
#: scene/gui/dialogs.cpp
msgid "Hide On OK"
-msgstr ""
+msgstr "Ocultar Al Aceptar"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -23796,7 +23813,7 @@ msgstr "Mostrar Etiqueta Zoom"
#: scene/gui/graph_edit.cpp scene/gui/text_edit.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Minimap"
-msgstr ""
+msgstr "Minimapa"
#: scene/gui/graph_edit.cpp
msgid "Enable grid minimap."
@@ -23817,7 +23834,7 @@ msgstr "Comentario"
#: scene/gui/graph_node.cpp
msgid "Overlay"
-msgstr ""
+msgstr "Overlay"
#: scene/gui/grid_container.cpp scene/gui/item_list.cpp scene/gui/tree.cpp
msgid "Columns"
@@ -23830,19 +23847,19 @@ msgstr "Temporizadores"
#: scene/gui/item_list.cpp scene/gui/popup_menu.cpp scene/gui/tree.cpp
msgid "Incremental Search Max Interval Msec"
-msgstr ""
+msgstr "Intervalo Máx. de Búsqueda Incremental Msec"
#: scene/gui/item_list.cpp scene/gui/tree.cpp
msgid "Allow Reselect"
-msgstr "Permitir Volver A Seleccionar"
+msgstr "Permitir Reselección"
#: scene/gui/item_list.cpp scene/gui/tree.cpp
msgid "Allow RMB Select"
-msgstr "Permitir Selección Con Botón Derecho Del Ratón"
+msgstr "Permitir Selección Con Botón Derecho Del Mouse"
#: scene/gui/item_list.cpp
msgid "Max Text Lines"
-msgstr ""
+msgstr "Líneas de Texto Máximas"
#: scene/gui/item_list.cpp
msgid "Auto Height"
@@ -23850,15 +23867,15 @@ msgstr "Altura Automática"
#: scene/gui/item_list.cpp
msgid "Max Columns"
-msgstr ""
+msgstr "Columnas Máximas"
#: scene/gui/item_list.cpp
msgid "Same Column Width"
-msgstr ""
+msgstr "Misma Anchura de Columna"
#: scene/gui/item_list.cpp
msgid "Fixed Column Width"
-msgstr ""
+msgstr "Anchura de Columna Fija"
#: scene/gui/item_list.cpp
msgid "Icon Scale"
@@ -23882,19 +23899,19 @@ msgstr "Porcentaje Visible"
#: scene/gui/label.cpp
msgid "Lines Skipped"
-msgstr ""
+msgstr "Líneas Omitidas"
#: scene/gui/label.cpp
msgid "Max Lines Visible"
-msgstr ""
+msgstr "Máximo de Líneas Visibles"
#: scene/gui/line_edit.cpp scene/resources/navigation_mesh.cpp
msgid "Max Length"
-msgstr ""
+msgstr "Máxima Longitud"
#: scene/gui/line_edit.cpp
msgid "Secret"
-msgstr ""
+msgstr "Secreto"
#: scene/gui/line_edit.cpp
msgid "Secret Character"
@@ -23902,7 +23919,7 @@ msgstr "Caracter Secreto"
#: scene/gui/line_edit.cpp
msgid "Expand To Text Length"
-msgstr ""
+msgstr "Expandir a la Longitud del Texto"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Context Menu Enabled"
@@ -23931,7 +23948,7 @@ msgstr "Selección Activada"
#: scene/gui/line_edit.cpp scene/gui/rich_text_label.cpp
#: scene/gui/text_edit.cpp
msgid "Deselect On Focus Loss Enabled"
-msgstr ""
+msgstr "Deselección al perder el focus activada"
#: scene/gui/line_edit.cpp
msgid "Right Icon"
@@ -23943,15 +23960,15 @@ msgstr "Marcador"
#: scene/gui/line_edit.cpp
msgid "Alpha"
-msgstr ""
+msgstr "Alpha"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Caret"
-msgstr ""
+msgstr "Caret"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink"
-msgstr ""
+msgstr "Parpardeo"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink Speed"
@@ -23959,7 +23976,7 @@ msgstr "Velocidad de Parpadeo"
#: scene/gui/link_button.cpp
msgid "Underline"
-msgstr ""
+msgstr "Subrayar"
#: scene/gui/menu_button.cpp
msgid "Switch On Hover"
@@ -23979,7 +23996,7 @@ msgstr "Parche de Margen"
#: scene/gui/nine_patch_rect.cpp scene/resources/style_box.cpp
msgid "Axis Stretch"
-msgstr ""
+msgstr "Estiramiento de Eje"
#: scene/gui/nine_patch_rect.cpp
msgid ""
@@ -24025,7 +24042,7 @@ msgstr "Ocultar Al Seleccionar Elemento de Estado"
#: scene/gui/popup_menu.cpp
msgid "Submenu Popup Delay"
-msgstr ""
+msgstr "Retraso en la Aparición del Submenú"
#: scene/gui/popup_menu.cpp
msgid "Allow Search"
@@ -24061,11 +24078,11 @@ msgstr "Redondeado"
#: scene/gui/range.cpp
msgid "Allow Greater"
-msgstr ""
+msgstr "Permitir Más"
#: scene/gui/range.cpp
msgid "Allow Lesser"
-msgstr ""
+msgstr "Permitir Menos"
#: scene/gui/reference_rect.cpp
msgid "Border Color"
@@ -24097,11 +24114,11 @@ msgstr "Carácter"
#: scene/gui/rich_text_label.cpp
msgid "BBCode"
-msgstr ""
+msgstr "BBCode"
#: scene/gui/rich_text_label.cpp
msgid "Meta Underlined"
-msgstr ""
+msgstr "Meta Subrayados"
#: scene/gui/rich_text_label.cpp
msgid "Tab Size"
@@ -24113,11 +24130,11 @@ msgstr "Ajustar Altura Del Contenido"
#: scene/gui/rich_text_label.cpp
msgid "Scroll Active"
-msgstr ""
+msgstr "Scroll Activo"
#: scene/gui/rich_text_label.cpp
msgid "Scroll Following"
-msgstr ""
+msgstr "Seguir el Scroll"
#: scene/gui/rich_text_label.cpp
msgid "Selection Enabled"
@@ -24163,15 +24180,15 @@ msgstr "Zona Muerta Predeterminada del Scroll"
#: scene/gui/slider.cpp
msgid "Scrollable"
-msgstr ""
+msgstr "Desplazable"
#: scene/gui/slider.cpp
msgid "Tick Count"
-msgstr "Cantidad De Marcas"
+msgstr "Contador de Marcas"
#: scene/gui/slider.cpp
msgid "Ticks On Borders"
-msgstr "Ticks En Bordes"
+msgstr "Marcas En Los Bordes"
#: scene/gui/spin_box.cpp
msgid "Prefix"
@@ -24195,7 +24212,7 @@ msgstr "Visibilidad de los Arrastradores"
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
msgid "Tab Align"
-msgstr ""
+msgstr "Alineamiento de Pestaña"
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
msgid "Current Tab"
@@ -24207,7 +24224,7 @@ msgstr "Pestañas Visibles"
#: scene/gui/tab_container.cpp
msgid "All Tabs In Front"
-msgstr ""
+msgstr "Todas las Pestañas al Frente"
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
msgid "Drag To Rearrange Enabled"
@@ -24215,31 +24232,31 @@ msgstr "Arrastrar Para Reordenar Habilitado"
#: scene/gui/tab_container.cpp
msgid "Use Hidden Tabs For Min Size"
-msgstr ""
+msgstr "Usar Pestañas Ocultas Para Tamaño Mínimo"
#: scene/gui/tabs.cpp
msgid "Tab Close Display Policy"
-msgstr ""
+msgstr "Política de Botón de Cerrar Pestaña"
#: scene/gui/tabs.cpp
msgid "Scrolling Enabled"
-msgstr ""
+msgstr "Desplazamiento Activado"
#: scene/gui/text_edit.cpp
msgid "Readonly"
-msgstr ""
+msgstr "Solo Lectura"
#: scene/gui/text_edit.cpp
msgid "Bookmark Gutter"
-msgstr "Canalón de Marcadores"
+msgstr "Marca del Umbral"
#: scene/gui/text_edit.cpp
msgid "Breakpoint Gutter"
-msgstr "Canalón de Puntos de Ruptura"
+msgstr "Umbral de Ruptura"
#: scene/gui/text_edit.cpp
msgid "Fold Gutter"
-msgstr "Canalón Plegable"
+msgstr "Pliegue del Umbral"
#: scene/gui/text_edit.cpp
msgid "Drag And Drop Selection Enabled"
@@ -24271,19 +24288,19 @@ msgstr "Modo Bloque"
#: scene/gui/text_edit.cpp
msgid "Moving By Right Click"
-msgstr ""
+msgstr "Mover Con Clic Derecho"
#: scene/gui/text_edit.cpp
msgid "Text Edit Idle Detect (sec)"
-msgstr ""
+msgstr "Detección de Inactividad en la Edición de Texto (seg.)"
#: scene/gui/text_edit.cpp
msgid "Text Edit Undo Stack Max Size"
-msgstr ""
+msgstr "Número máximo de acciones recordados para deshacer"
#: scene/gui/texture_button.cpp scene/resources/default_theme/default_theme.cpp
msgid "Hover"
-msgstr ""
+msgstr "Hover"
#: scene/gui/texture_button.cpp
msgid "Focused"
@@ -24300,7 +24317,7 @@ msgstr "Expandir"
#: scene/gui/texture_progress.cpp
msgid "Under"
-msgstr ""
+msgstr "Debajo"
#: scene/gui/texture_progress.cpp
msgid "Over"
@@ -24320,11 +24337,11 @@ msgstr "Modo de Relleno"
#: scene/gui/texture_progress.cpp scene/resources/material.cpp
msgid "Tint"
-msgstr ""
+msgstr "Tinte"
#: scene/gui/texture_progress.cpp
msgid "Radial Fill"
-msgstr ""
+msgstr "Relleno Radial"
#: scene/gui/texture_progress.cpp
msgid "Initial Angle"
@@ -24360,7 +24377,7 @@ msgstr "Estiramiento de Margen Inferior"
#: scene/gui/tree.cpp
msgid "Custom Minimum Height"
-msgstr ""
+msgstr "Altura Mínima Personalizada"
#: scene/gui/tree.cpp
msgid "(Other)"
@@ -24380,7 +24397,7 @@ msgstr "Ocultar Raíz"
#: scene/gui/tree.cpp
msgid "Drop Mode Flags"
-msgstr ""
+msgstr "Indicadores del Modo de Caída"
#: scene/gui/video_player.cpp
msgid "Audio Track"
@@ -24416,11 +24433,11 @@ msgstr "Descargar Tamaño del Fragmento"
#: scene/main/http_request.cpp
msgid "Body Size Limit"
-msgstr ""
+msgstr "Límite del Tamaño del Cuerpo"
#: scene/main/http_request.cpp
msgid "Max Redirects"
-msgstr ""
+msgstr "Redireccionamientos Máximos"
#: scene/main/http_request.cpp
msgid "Timeout"
@@ -24431,6 +24448,8 @@ msgid ""
"Setting node name '%s' to be unique within scene for '%s', but it's already "
"claimed by '%s'. This node is no longer set unique."
msgstr ""
+"El nombre de nodo '%s' fue establecido como único en la escena de '%s', pero "
+"ya está en uso por '%s'. Éste nodo ya no está como único."
#: scene/main/node.cpp
msgid "Name Num Separator"
@@ -24438,7 +24457,7 @@ msgstr "Separador Numérico del Nombre"
#: scene/main/node.cpp
msgid "Name Casing"
-msgstr ""
+msgstr "Capitalización de Nombre"
#: scene/main/node.cpp
msgid "Editor Description"
@@ -24490,7 +24509,7 @@ msgstr "Sugerencia de Depuración de Navegación"
#: scene/main/scene_tree.cpp
msgid "Use Font Oversampling"
-msgstr ""
+msgstr "Usar Sobremuestreo de Fuente"
#: scene/main/scene_tree.cpp
msgid "Edited Scene Root"
@@ -24498,7 +24517,7 @@ msgstr "Escena Raíz Editada"
#: scene/main/scene_tree.cpp
msgid "Root"
-msgstr ""
+msgstr "Raíz"
#: scene/main/scene_tree.cpp
msgid "Multiplayer Poll"
@@ -24507,11 +24526,11 @@ msgstr "Encuesta Multijugador"
#: scene/main/scene_tree.cpp scene/resources/mesh_library.cpp
#: scene/resources/shape_2d.cpp
msgid "Shapes"
-msgstr ""
+msgstr "Formas"
#: scene/main/scene_tree.cpp
msgid "Shape Color"
-msgstr ""
+msgstr "Color de la Forma"
#: scene/main/scene_tree.cpp
msgid "Contact Color"
@@ -24519,7 +24538,7 @@ msgstr "Color de Contacto"
#: scene/main/scene_tree.cpp
msgid "Geometry Color"
-msgstr ""
+msgstr "Color de la Geometría"
#: scene/main/scene_tree.cpp
msgid "Disabled Geometry Color"
@@ -24527,7 +24546,7 @@ msgstr "Color de la Geometría Desactivada"
#: scene/main/scene_tree.cpp
msgid "Max Contacts Displayed"
-msgstr ""
+msgstr "Núm. Máx. de Contactos Mostrados"
#: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp
msgid "Draw 2D Outlines"
@@ -24543,27 +24562,27 @@ msgstr "Tamaño de Atlas"
#: scene/main/scene_tree.cpp
msgid "Atlas Subdiv"
-msgstr ""
+msgstr "Subdivisión del Atlas"
#: scene/main/scene_tree.cpp scene/main/viewport.cpp
msgid "MSAA"
-msgstr ""
+msgstr "MSAA"
#: scene/main/scene_tree.cpp
msgid "Use FXAA"
-msgstr ""
+msgstr "Usar FXAA"
#: scene/main/scene_tree.cpp
msgid "Use Debanding"
-msgstr ""
+msgstr "Usar Debanding"
#: scene/main/scene_tree.cpp scene/main/viewport.cpp
msgid "HDR"
-msgstr ""
+msgstr "HDR"
#: scene/main/scene_tree.cpp scene/main/viewport.cpp
msgid "Use 32 BPC Depth"
-msgstr ""
+msgstr "Usar Profundidad de 32 BPC"
#: scene/main/scene_tree.cpp
msgid "Default Environment"
@@ -24683,7 +24702,7 @@ msgstr "Objetivo de Renderizado"
#: scene/main/viewport.cpp
msgid "V Flip"
-msgstr ""
+msgstr "Reflejo V"
#: scene/main/viewport.cpp
msgid "Clear Mode"
@@ -24711,19 +24730,19 @@ msgstr "Sombra del Atlas"
#: scene/main/viewport.cpp
msgid "Quad 0"
-msgstr ""
+msgstr "Cuadrángulo 0"
#: scene/main/viewport.cpp
msgid "Quad 1"
-msgstr ""
+msgstr "Cuadrángulo 1"
#: scene/main/viewport.cpp
msgid "Quad 2"
-msgstr ""
+msgstr "Cuadrángulo 2"
#: scene/main/viewport.cpp
msgid "Quad 3"
-msgstr ""
+msgstr "Cuadrángulo 3"
#: scene/main/viewport.cpp
msgid "Canvas Transform"
@@ -24739,7 +24758,7 @@ msgstr "Retraso del Tooltip (sec)"
#: scene/register_scene_types.cpp
msgid "Swap OK Cancel"
-msgstr "Cancelar"
+msgstr "Intercambiar Aceptar con Cancelar"
#: scene/register_scene_types.cpp
msgid "Layer Names"
@@ -24771,7 +24790,7 @@ msgstr "Navegación 3D"
#: scene/register_scene_types.cpp
msgid "Use hiDPI"
-msgstr ""
+msgstr "Usar hiDPI"
#: scene/register_scene_types.cpp
msgid "Custom"
@@ -24788,7 +24807,7 @@ msgstr "Tasa de Mezcla"
#: scene/resources/audio_stream_sample.cpp
msgid "Stereo"
-msgstr ""
+msgstr "Estéreo"
#: scene/resources/concave_polygon_shape_2d.cpp
msgid "Segments"
@@ -24800,11 +24819,11 @@ msgstr "Bakear Resolución"
#: scene/resources/curve.cpp
msgid "Bake Interval"
-msgstr ""
+msgstr "Intervalo de Bakeado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Panel"
-msgstr ""
+msgstr "Panel"
#: scene/resources/default_theme/default_theme.cpp
msgid "Font Color"
@@ -24836,7 +24855,7 @@ msgstr "Espaciado del Subrayado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Arrow"
-msgstr ""
+msgstr "Flecha"
#: scene/resources/default_theme/default_theme.cpp
msgid "Arrow Margin"
@@ -24868,19 +24887,19 @@ msgstr "Radio Marcado Desactivado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Radio Unchecked"
-msgstr ""
+msgstr "Radio Desmarcado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Radio Unchecked Disabled"
-msgstr ""
+msgstr "Radio Desmarcado Desactivado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Font Color Hover Pressed"
-msgstr ""
+msgstr "Color de Fuente Hover Pulsado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Check V Adjust"
-msgstr ""
+msgstr "Comprobar Ajuste V"
#: scene/resources/default_theme/default_theme.cpp
msgid "On Disabled"
@@ -24920,7 +24939,7 @@ msgstr "Color de Fuente Seleccionada"
#: scene/resources/default_theme/default_theme.cpp
msgid "Font Color Uneditable"
-msgstr ""
+msgstr "Color de Fuente No Editable"
#: scene/resources/default_theme/default_theme.cpp
msgid "Cursor Color"
@@ -24944,7 +24963,7 @@ msgstr "BG"
#: scene/resources/default_theme/default_theme.cpp
msgid "FG"
-msgstr ""
+msgstr "FG"
#: scene/resources/default_theme/default_theme.cpp
msgid "Tab"
@@ -24966,7 +24985,7 @@ msgstr "Plegar"
#: scene/resources/default_theme/default_theme.cpp
msgid "Font Color Readonly"
-msgstr ""
+msgstr "Color de Fuente de Sólo Leída"
#: scene/resources/default_theme/default_theme.cpp
msgid "Completion Lines"
@@ -24986,7 +25005,7 @@ msgstr "Enfoque de Scroll"
#: scene/resources/default_theme/default_theme.cpp
msgid "Grabber"
-msgstr ""
+msgstr "Grabber"
#: scene/resources/default_theme/default_theme.cpp
msgid "Grabber Highlight"
@@ -25006,11 +25025,11 @@ msgstr "Incremento Resaltado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Increment Pressed"
-msgstr ""
+msgstr "Incremento Pulsado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Decrement"
-msgstr ""
+msgstr "Decremento"
#: scene/resources/default_theme/default_theme.cpp
msgid "Decrement Highlight"
@@ -25018,7 +25037,7 @@ msgstr "Decremento Resaltado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Decrement Pressed"
-msgstr ""
+msgstr "Decremento Pulsado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Slider"
@@ -25026,11 +25045,11 @@ msgstr "Deslizador"
#: scene/resources/default_theme/default_theme.cpp
msgid "Grabber Area"
-msgstr ""
+msgstr "Área de Grabber"
#: scene/resources/default_theme/default_theme.cpp
msgid "Grabber Area Highlight"
-msgstr ""
+msgstr "Resaltado del Área de Grabber"
#: scene/resources/default_theme/default_theme.cpp
msgid "Grabber Disabled"
@@ -25038,11 +25057,11 @@ msgstr "Agarre Desactivado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Tick"
-msgstr ""
+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"
@@ -25162,7 +25181,7 @@ msgstr "Enfoque Seleccionado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Cursor Unfocused"
-msgstr ""
+msgstr "Cursor Desenfocado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Button Pressed"
@@ -25222,7 +25241,7 @@ msgstr "Color de la Línea de Relación"
#: scene/resources/default_theme/default_theme.cpp
msgid "Custom Button Font Highlight"
-msgstr ""
+msgstr "Fuente Personalizada de Botón Resaltado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Item Margin"
@@ -25270,7 +25289,7 @@ msgstr "Pestaña Desactivada"
#: scene/resources/default_theme/default_theme.cpp
msgid "Menu"
-msgstr ""
+msgstr "Menú"
#: scene/resources/default_theme/default_theme.cpp
msgid "Menu Highlight"
@@ -25294,15 +25313,15 @@ msgstr "Margen Superior"
#: scene/resources/default_theme/default_theme.cpp
msgid "Label V Align FG"
-msgstr ""
+msgstr "Etiqueta V Alinear FG"
#: scene/resources/default_theme/default_theme.cpp
msgid "Label V Align BG"
-msgstr ""
+msgstr "Etiqueta V Alinear BG"
#: scene/resources/default_theme/default_theme.cpp
msgid "Large"
-msgstr "Largo"
+msgstr "Grande"
#: scene/resources/default_theme/default_theme.cpp
msgid "Folder"
@@ -25358,11 +25377,11 @@ msgstr "Preset BG"
#: scene/resources/default_theme/default_theme.cpp
msgid "Overbright Indicator"
-msgstr ""
+msgstr "Indicador de Exceso de Brillo"
#: scene/resources/default_theme/default_theme.cpp
msgid "Preset FG"
-msgstr "Preset FG"
+msgstr "FG Preestablecido"
#: scene/resources/default_theme/default_theme.cpp
msgid "Preset BG Icon"
@@ -25418,11 +25437,11 @@ msgstr "Ocultar Automáticamente"
#: scene/resources/default_theme/default_theme.cpp
msgid "Minus"
-msgstr ""
+msgstr "Menos"
#: scene/resources/default_theme/default_theme.cpp
msgid "More"
-msgstr ""
+msgstr "Más"
#: scene/resources/default_theme/default_theme.cpp
msgid "Grid Minor"
@@ -25454,7 +25473,7 @@ msgstr "Bezier Len Neg"
#: scene/resources/default_theme/default_theme.cpp
msgid "Port Grab Distance Horizontal"
-msgstr ""
+msgstr "Distancia de Agarre Horizontal del Puerto"
#: scene/resources/default_theme/default_theme.cpp
msgid "Port Grab Distance Vertical"
@@ -25462,7 +25481,7 @@ msgstr "Distancia Vertical del Puerto de Agarre"
#: scene/resources/dynamic_font.cpp
msgid "Hinting"
-msgstr ""
+msgstr "Hinting"
#: scene/resources/dynamic_font.cpp
msgid "Override Oversampling"
@@ -25498,11 +25517,11 @@ msgstr "Datos de la Fuente"
#: scene/resources/environment.cpp
msgid "Background"
-msgstr ""
+msgstr "Fondo"
#: scene/resources/environment.cpp scene/resources/sky.cpp
msgid "Sky"
-msgstr ""
+msgstr "Cielo"
#: scene/resources/environment.cpp
msgid "Sky Custom FOV"
@@ -25522,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"
@@ -25538,7 +25557,7 @@ msgstr "Contribución del Cielo"
#: scene/resources/environment.cpp
msgid "Fog"
-msgstr ""
+msgstr "Niebla"
#: scene/resources/environment.cpp
msgid "Sun Color"
@@ -25598,19 +25617,19 @@ msgstr "Exposición"
#: scene/resources/environment.cpp
msgid "White"
-msgstr ""
+msgstr "Blanco"
#: scene/resources/environment.cpp
msgid "Auto Exposure"
-msgstr ""
+msgstr "Exposición Auto"
#: scene/resources/environment.cpp
msgid "Min Luma"
-msgstr ""
+msgstr "Luma Mínimo"
#: scene/resources/environment.cpp
msgid "Max Luma"
-msgstr ""
+msgstr "Luma Máximo"
#: scene/resources/environment.cpp
msgid "SS Reflections"
@@ -25634,11 +25653,11 @@ msgstr "Tolerancia de Profundidad"
#: scene/resources/environment.cpp scene/resources/material.cpp
msgid "Roughness"
-msgstr ""
+msgstr "Aspereza"
#: scene/resources/environment.cpp
msgid "SSAO"
-msgstr ""
+msgstr "SSAO"
#: scene/resources/environment.cpp
msgid "Radius 2"
@@ -25646,7 +25665,7 @@ msgstr "Radio 2"
#: scene/resources/environment.cpp
msgid "Intensity 2"
-msgstr ""
+msgstr "Intensidad 2"
#: scene/resources/environment.cpp scene/resources/material.cpp
msgid "Light Affect"
@@ -25658,15 +25677,15 @@ msgstr "Influencia del Canal AO"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "Blur"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
-msgstr ""
+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"
@@ -25678,11 +25697,11 @@ msgstr "Transición"
#: scene/resources/environment.cpp
msgid "DOF Near Blur"
-msgstr ""
+msgstr "DOF Desenfoque Cercano"
#: scene/resources/environment.cpp
msgid "Glow"
-msgstr ""
+msgstr "Brillo"
#: scene/resources/environment.cpp
msgid "Levels"
@@ -25722,15 +25741,15 @@ msgstr "7"
#: scene/resources/environment.cpp
msgid "Bloom"
-msgstr ""
+msgstr "Resplandor"
#: scene/resources/environment.cpp
msgid "HDR Threshold"
-msgstr ""
+msgstr "Umbral de HDR"
#: scene/resources/environment.cpp
msgid "HDR Luminance Cap"
-msgstr ""
+msgstr "Luminancia de HDR Máxima"
#: scene/resources/environment.cpp
msgid "HDR Scale"
@@ -25738,11 +25757,11 @@ msgstr "Escala HDR"
#: scene/resources/environment.cpp
msgid "Bicubic Upscale"
-msgstr ""
+msgstr "Escala Bicúbica Superior"
#: scene/resources/environment.cpp
msgid "Adjustments"
-msgstr ""
+msgstr "Ajustes"
#: scene/resources/environment.cpp
msgid "Brightness"
@@ -25774,7 +25793,7 @@ msgstr "Offsets"
#: scene/resources/height_map_shape.cpp
msgid "Map Width"
-msgstr ""
+msgstr "Anchura del Mapa"
#: scene/resources/height_map_shape.cpp
msgid "Map Depth"
@@ -25786,7 +25805,7 @@ msgstr "Datos del Mapa"
#: scene/resources/line_shape_2d.cpp
msgid "D"
-msgstr ""
+msgstr "D"
#: scene/resources/material.cpp
msgid "Next Pass"
@@ -25794,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"
@@ -25814,11 +25833,11 @@ msgstr ""
#: scene/resources/material.cpp
msgid "Albedo Tex Force sRGB"
-msgstr ""
+msgstr "Forzar sRGB en Textura Albedo"
#: scene/resources/material.cpp
msgid "Do Not Receive Shadows"
-msgstr ""
+msgstr "No Recibir Sombras"
#: scene/resources/material.cpp
msgid "Disable Ambient Light"
@@ -25830,7 +25849,7 @@ msgstr "Asegurar Normales Correctas"
#: scene/resources/material.cpp
msgid "Albedo Tex MSDF"
-msgstr ""
+msgstr "MSDF en Textura Albedo"
#: scene/resources/material.cpp
msgid "Vertex Color"
@@ -25838,11 +25857,11 @@ msgstr "Color del Vértice"
#: scene/resources/material.cpp
msgid "Use As Albedo"
-msgstr ""
+msgstr "Usar Como Albedo"
#: scene/resources/material.cpp
msgid "Is sRGB"
-msgstr ""
+msgstr "Es sRGB"
#: scene/resources/material.cpp servers/visual_server.cpp
msgid "Parameters"
@@ -25878,15 +25897,15 @@ msgstr "Mantener Escala del Billboard"
#: scene/resources/material.cpp
msgid "Grow"
-msgstr ""
+msgstr "Expandir"
#: scene/resources/material.cpp
msgid "Grow Amount"
-msgstr "Cantidad de Crecimiento"
+msgstr "Cantidad de Expansión"
#: scene/resources/material.cpp
msgid "Use Alpha Scissor"
-msgstr ""
+msgstr "Usar Corte Alpha"
#: scene/resources/material.cpp
msgid "Particles Anim"
@@ -25902,11 +25921,11 @@ msgstr "Cuadros V"
#: scene/resources/material.cpp
msgid "Albedo"
-msgstr ""
+msgstr "Albedo"
#: scene/resources/material.cpp
msgid "Metallic"
-msgstr ""
+msgstr "Metálico"
#: scene/resources/material.cpp
msgid "Texture Channel"
@@ -25918,15 +25937,15 @@ msgstr "Emisión"
#: scene/resources/material.cpp
msgid "On UV2"
-msgstr ""
+msgstr "En UV2"
#: scene/resources/material.cpp
msgid "NormalMap"
-msgstr ""
+msgstr "Mapa Normal"
#: scene/resources/material.cpp
msgid "Rim"
-msgstr ""
+msgstr "Borde"
#: scene/resources/material.cpp
msgid "Clearcoat"
@@ -25934,15 +25953,15 @@ msgstr "Transparencia"
#: scene/resources/material.cpp
msgid "Gloss"
-msgstr ""
+msgstr "Brillo"
#: scene/resources/material.cpp
msgid "Anisotropy"
-msgstr ""
+msgstr "Anisotropía"
#: scene/resources/material.cpp
msgid "Flowmap"
-msgstr ""
+msgstr "Flowmap"
#: scene/resources/material.cpp
msgid "Ambient Occlusion"
@@ -25950,7 +25969,7 @@ msgstr "Oclusión Ambiental"
#: scene/resources/material.cpp
msgid "Deep Parallax"
-msgstr ""
+msgstr "Paralaje Profundo"
#: scene/resources/material.cpp
msgid "Min Layers"
@@ -25962,7 +25981,7 @@ msgstr "Capas Máximas"
#: scene/resources/material.cpp
msgid "Flip Tangent"
-msgstr ""
+msgstr "Voltear Tangente"
#: scene/resources/material.cpp
msgid "Flip Binormal"
@@ -25982,7 +26001,7 @@ msgstr "Refracción"
#: scene/resources/material.cpp
msgid "Detail"
-msgstr ""
+msgstr "Detalle"
#: scene/resources/material.cpp
msgid "UV Layer"
@@ -25994,11 +26013,11 @@ msgstr "UV1"
#: scene/resources/material.cpp
msgid "Triplanar"
-msgstr ""
+msgstr "Triplanar"
#: scene/resources/material.cpp
msgid "Triplanar Sharpness"
-msgstr ""
+msgstr "Nitidez Triplanar"
#: scene/resources/material.cpp
msgid "UV2"
@@ -26010,7 +26029,7 @@ msgstr "Desvanecimiento de Proximidad"
#: scene/resources/material.cpp
msgid "Distance Fade"
-msgstr ""
+msgstr "Fade al Distanciarse"
#: scene/resources/material.cpp
msgid "Async Mode"
@@ -26022,7 +26041,7 @@ msgstr "Sugerencia de Tamaño del Lightmap"
#: scene/resources/mesh.cpp scene/resources/primitive_meshes.cpp
msgid "Custom AABB"
-msgstr ""
+msgstr "AABB Personalizado"
#: scene/resources/mesh_library.cpp
msgid "Mesh Transform"
@@ -26042,7 +26061,7 @@ msgstr "Formato de Transformación"
#: scene/resources/multimesh.cpp
msgid "Custom Data Format"
-msgstr ""
+msgstr "Formato de Datos Personalizado"
#: scene/resources/multimesh.cpp
msgid "Instance Count"
@@ -26050,7 +26069,7 @@ msgstr "Conteo de Instancias"
#: scene/resources/multimesh.cpp
msgid "Visible Instance Count"
-msgstr ""
+msgstr "Número de Instancias Visible"
#: scene/resources/navigation_mesh.cpp
msgid "Sampling"
@@ -26066,7 +26085,7 @@ msgstr "Tipo de Geometría Parseada"
#: scene/resources/navigation_mesh.cpp
msgid "Source Geometry Mode"
-msgstr ""
+msgstr "Modo de Geometría de Origen"
#: scene/resources/navigation_mesh.cpp
msgid "Source Group Name"
@@ -26074,7 +26093,7 @@ msgstr "Nombre del Grupo de Origen"
#: scene/resources/navigation_mesh.cpp
msgid "Cells"
-msgstr ""
+msgstr "Celdas"
#: scene/resources/navigation_mesh.cpp
msgid "Agents"
@@ -26082,11 +26101,11 @@ msgstr "Agentes"
#: scene/resources/navigation_mesh.cpp
msgid "Max Climb"
-msgstr ""
+msgstr "Escalada Máxima"
#: scene/resources/navigation_mesh.cpp
msgid "Max Slope"
-msgstr ""
+msgstr "Pendiente Máxima"
#: scene/resources/navigation_mesh.cpp
msgid "Regions"
@@ -26098,7 +26117,7 @@ msgstr "Tamaño de Unión"
#: scene/resources/navigation_mesh.cpp
msgid "Edges"
-msgstr ""
+msgstr "Aristas"
#: scene/resources/navigation_mesh.cpp
msgid "Max Error"
@@ -26106,7 +26125,7 @@ msgstr "Error Máximo"
#: scene/resources/navigation_mesh.cpp
msgid "Verts Per Poly"
-msgstr ""
+msgstr "Vértices por Poly"
#: scene/resources/navigation_mesh.cpp
msgid "Details"
@@ -26122,7 +26141,7 @@ msgstr "Error Máximo de Muestra"
#: scene/resources/navigation_mesh.cpp
msgid "Low Hanging Obstacles"
-msgstr ""
+msgstr "Obstáculos Colgando Bajo"
#: scene/resources/navigation_mesh.cpp
msgid "Ledge Spans"
@@ -26142,7 +26161,7 @@ msgstr "Bakear Offset AABB"
#: scene/resources/occluder_shape.cpp
msgid "Spheres"
-msgstr ""
+msgstr "Esferas"
#: scene/resources/occluder_shape.cpp
msgid "OccluderShapeSphere Set Spheres"
@@ -26158,11 +26177,11 @@ msgstr "Puntos de Rotura"
#: scene/resources/packed_scene.cpp
msgid "Bundled"
-msgstr ""
+msgstr "Empaquetado"
#: scene/resources/particles_material.cpp
msgid "Trail"
-msgstr ""
+msgstr "Rastro"
#: scene/resources/particles_material.cpp
msgid "Divisor"
@@ -26202,11 +26221,11 @@ msgstr "Curva de Escala"
#: scene/resources/physics_material.cpp
msgid "Rough"
-msgstr ""
+msgstr "Áspero"
#: scene/resources/physics_material.cpp
msgid "Absorbent"
-msgstr ""
+msgstr "Absorbente"
#: scene/resources/plane_shape.cpp
msgid "Plane"
@@ -26218,19 +26237,19 @@ msgstr "Voltear Caras"
#: scene/resources/primitive_meshes.cpp
msgid "Mid Height"
-msgstr ""
+msgstr "Altura Mediana"
#: scene/resources/primitive_meshes.cpp
msgid "Subdivide Width"
-msgstr ""
+msgstr "Anchura de Subdivisión"
#: scene/resources/primitive_meshes.cpp
msgid "Subdivide Height"
-msgstr ""
+msgstr "Altura de Subdivisión"
#: scene/resources/primitive_meshes.cpp
msgid "Subdivide Depth"
-msgstr ""
+msgstr "Profundidad de Subdivisión"
#: scene/resources/primitive_meshes.cpp
msgid "Top Radius"
@@ -26246,7 +26265,7 @@ msgstr "De Izquierda a Derecha"
#: scene/resources/primitive_meshes.cpp
msgid "Is Hemisphere"
-msgstr ""
+msgstr "Es Hemisfera"
#: scene/resources/primitive_meshes.cpp
msgid "Curve Step"
@@ -26254,15 +26273,15 @@ msgstr "Paso de Curva"
#: scene/resources/ray_shape.cpp scene/resources/segment_shape_2d.cpp
msgid "Slips On Slope"
-msgstr ""
+msgstr "Resbala en Pendiente"
#: scene/resources/segment_shape_2d.cpp
msgid "A"
-msgstr ""
+msgstr "A"
#: scene/resources/shape_2d.cpp
msgid "Custom Solver Bias"
-msgstr ""
+msgstr "Bias de Solución Personalizado"
#: scene/resources/skin.cpp
msgid "Bind Count"
@@ -26282,7 +26301,7 @@ msgstr "Tamaño de Resplandor"
#: scene/resources/sky.cpp
msgid "Panorama"
-msgstr ""
+msgstr "Panorama"
#: scene/resources/sky.cpp
msgid "Top Color"
@@ -26310,15 +26329,15 @@ msgstr "Latitud"
#: scene/resources/sky.cpp
msgid "Longitude"
-msgstr ""
+msgstr "Longitud"
#: scene/resources/sky.cpp
msgid "Angle Min"
-msgstr ""
+msgstr "Ángulo Mínimo"
#: scene/resources/sky.cpp
msgid "Angle Max"
-msgstr ""
+msgstr "Ángulo Máximo"
#: scene/resources/style_box.cpp
msgid "Content Margin"
@@ -26330,7 +26349,7 @@ msgstr "Expandir Margen"
#: scene/resources/style_box.cpp
msgid "Skew"
-msgstr ""
+msgstr "Sesgo"
#: scene/resources/style_box.cpp
msgid "Corner Radius"
@@ -26338,19 +26357,19 @@ msgstr "Radio de Esquina"
#: scene/resources/style_box.cpp
msgid "Corner Detail"
-msgstr ""
+msgstr "Detalle de Esquina"
#: scene/resources/style_box.cpp
msgid "Anti Aliasing"
-msgstr ""
+msgstr "Antialias"
#: scene/resources/style_box.cpp
msgid "Grow Begin"
-msgstr ""
+msgstr "Inicio de Expansión"
#: scene/resources/style_box.cpp
msgid "Grow End"
-msgstr ""
+msgstr "Fin de Expansión"
#: scene/resources/texture.cpp
msgid "Load Path"
@@ -26406,7 +26425,7 @@ msgstr "Pausa"
#: scene/resources/texture.cpp
msgid "Which Feed"
-msgstr ""
+msgstr "Cuál Feed"
#: scene/resources/texture.cpp
msgid "Camera Is Active"
@@ -26418,7 +26437,7 @@ msgstr "Fuente Predeterminada"
#: scene/resources/visual_shader.cpp
msgid "Output Port For Preview"
-msgstr ""
+msgstr "Puerto de Salida para Previsualización"
#: scene/resources/visual_shader.cpp
msgid "Depth Draw"
@@ -26470,7 +26489,7 @@ msgstr "Tipo de Textura"
#: scene/resources/visual_shader_nodes.cpp
msgid "Cube Map"
-msgstr ""
+msgstr "Mapa de Cubo"
#: scene/resources/visual_shader_nodes.cpp
msgid "Default Value Enabled"
@@ -26502,7 +26521,7 @@ msgstr "Mapa de Navegación"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
msgid "Direct Space State"
-msgstr ""
+msgstr "Estado de Espacio Directo"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
msgid "Default Gravity Vector"
@@ -26538,7 +26557,7 @@ msgstr "Lienzo"
#: servers/arvr/arvr_interface.cpp
msgid "Is Primary"
-msgstr ""
+msgstr "Es Primario"
#: servers/arvr/arvr_interface.cpp
msgid "Is Initialized"
@@ -26546,11 +26565,11 @@ msgstr "Inicializado"
#: servers/arvr/arvr_interface.cpp
msgid "AR"
-msgstr ""
+msgstr "AR"
#: servers/arvr/arvr_interface.cpp
msgid "Is Anchor Detection Enabled"
-msgstr ""
+msgstr "Detección de Anclaje Está Activada"
#: servers/arvr_server.cpp
msgid "Primary Interface"
@@ -26568,36 +26587,36 @@ msgstr "Tono Aleatorio"
#: servers/audio/effects/audio_effect_spectrum_analyzer.cpp
#: servers/audio/effects/audio_stream_generator.cpp
msgid "Buffer Length"
-msgstr ""
+msgstr "Longitud de Buffer"
#: servers/audio/effects/audio_effect_chorus.cpp
msgid "Voice Count"
-msgstr ""
+msgstr "Número de Voces"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Dry"
-msgstr ""
+msgstr "Seco"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Wet"
-msgstr ""
+msgstr "Mojado"
#: servers/audio/effects/audio_effect_chorus.cpp
msgid "Voice"
-msgstr ""
+msgstr "Voz"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Delay (ms)"
-msgstr ""
+msgstr "Retraso (ms)"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_phaser.cpp
msgid "Rate Hz"
-msgstr ""
+msgstr "Velocidad en Hz"
#: servers/audio/effects/audio_effect_chorus.cpp
msgid "Depth (ms)"
@@ -26606,7 +26625,7 @@ msgstr "Profundidad (ms)"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Level dB"
-msgstr ""
+msgstr "Nivel en dB"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
@@ -26617,11 +26636,11 @@ msgstr "Pan"
#: servers/audio/effects/audio_effect_compressor.cpp
#: servers/audio/effects/audio_effect_filter.cpp
msgid "Gain"
-msgstr ""
+msgstr "Ganancia"
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Attack (µs)"
-msgstr ""
+msgstr "Ataque (µs)"
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Release (ms)"
@@ -26633,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 ""
+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
@@ -26655,15 +26674,15 @@ msgstr "Paso Bajo"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Pre Gain"
-msgstr ""
+msgstr "Pre-Ganancia"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Keep Hf Hz"
-msgstr ""
+msgstr "Mantener Hf Hz"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Drive"
-msgstr ""
+msgstr "Drive"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Post Gain"
@@ -26675,31 +26694,31 @@ msgstr "Resonancia"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Ceiling dB"
-msgstr ""
+msgstr "Límite de dB"
#: servers/audio/effects/audio_effect_limiter.cpp
msgid "Threshold dB"
-msgstr ""
+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"
-msgstr ""
+msgstr "Rango Hz Mínimo"
#: servers/audio/effects/audio_effect_phaser.cpp
msgid "Range Max Hz"
-msgstr ""
+msgstr "Rango Hz Máximo"
#: servers/audio/effects/audio_effect_pitch_shift.cpp
msgid "Oversampling"
-msgstr ""
+msgstr "Oversampling"
#: servers/audio/effects/audio_effect_pitch_shift.cpp
#: servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -26708,15 +26727,15 @@ 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"
-msgstr ""
+msgstr "Mseg"
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Room Size"
-msgstr ""
+msgstr "Tamaño de Habitación"
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "High-pass"
@@ -26736,7 +26755,7 @@ msgstr "Tiempo de Extracción (ms)"
#: servers/audio/effects/audio_effect_stereo_enhance.cpp
msgid "Surround"
-msgstr ""
+msgstr "Envolvente"
#: servers/audio_server.cpp
msgid "Enable Audio Input"
@@ -26748,7 +26767,7 @@ msgstr "Latencia de Salida"
#: servers/audio_server.cpp
msgid "Channel Disable Threshold dB"
-msgstr ""
+msgstr "Umbral dB de Deactivación de Canal"
#: servers/audio_server.cpp
msgid "Channel Disable Time"
@@ -26756,7 +26775,7 @@ msgstr "Tiempo de Desconexión del Canal"
#: servers/audio_server.cpp
msgid "Video Delay Compensation (ms)"
-msgstr ""
+msgstr "Compensación de Retraso de Vídeo (ms)"
#: servers/audio_server.cpp
msgid "Bus Count"
@@ -26772,7 +26791,7 @@ msgstr "Escala Global de Porcentajes"
#: servers/camera/camera_feed.cpp
msgid "Feed"
-msgstr ""
+msgstr "Feed"
#: servers/camera/camera_feed.cpp
msgid "Is Active"
@@ -26780,15 +26799,15 @@ msgstr "Activo"
#: servers/physics/space_sw.cpp servers/physics_2d/space_2d_sw.cpp
msgid "Sleep Threshold Linear"
-msgstr ""
+msgstr "Umbral de Sueño Lineal"
#: servers/physics/space_sw.cpp servers/physics_2d/space_2d_sw.cpp
msgid "Sleep Threshold Angular"
-msgstr ""
+msgstr "Umbral de Sueño Angular"
#: servers/physics/space_sw.cpp servers/physics_2d/space_2d_sw.cpp
msgid "Time Before Sleep"
-msgstr ""
+msgstr "Tiempo Antes de Sueño"
#: servers/physics_2d/physics_2d_server_sw.cpp
msgid "BP Hash Table Size"
@@ -26796,11 +26815,11 @@ msgstr "Tamaño de Tabla Hash BP"
#: servers/physics_2d/physics_2d_server_sw.cpp
msgid "Large Object Surface Threshold In Cells"
-msgstr ""
+msgstr "Umbral de Superficie de Objeto Grande en Celdas"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Inverse Mass"
-msgstr ""
+msgstr "Masa Inversa"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Inverse Inertia"
@@ -26824,11 +26843,11 @@ msgstr "Velocidad Lineal"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Exclude"
-msgstr ""
+msgstr "Excluir"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Shape RID"
-msgstr ""
+msgstr "RID de Forma"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Collide With Bodies"
@@ -26836,7 +26855,7 @@ msgstr "Colisión de Cuerpos"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Collide With Areas"
-msgstr ""
+msgstr "Colisionar Con Áreas"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Motion Remainder"
@@ -26872,7 +26891,7 @@ msgstr "Centro de la Masa"
#: servers/physics_server.cpp
msgid "Principal Inertia Axes"
-msgstr ""
+msgstr "Ejes de Inercia Principal"
#: servers/visual/shader_language.cpp
msgid "Varying may not be assigned in the '%s' function."
@@ -26940,7 +26959,7 @@ msgstr "Importar PVRTC"
#: servers/visual_server.cpp
msgid "Lossless Compression"
-msgstr ""
+msgstr "Compresión Sin Pérdidas"
#: servers/visual_server.cpp
msgid "Force PNG"
@@ -26948,7 +26967,7 @@ msgstr "Forzar PNG"
#: servers/visual_server.cpp
msgid "WebP Compression Level"
-msgstr ""
+msgstr "Nivel de Compresión WebP"
#: servers/visual_server.cpp
msgid "Time Rollover Secs"
@@ -26960,19 +26979,19 @@ msgstr "Tamaño del Cubemap"
#: servers/visual_server.cpp
msgid "Quadrant 0 Subdiv"
-msgstr ""
+msgstr "Subdivisión del Cuadrante 0"
#: servers/visual_server.cpp
msgid "Quadrant 1 Subdiv"
-msgstr ""
+msgstr "Subdivisión del Cuadrante 1"
#: servers/visual_server.cpp
msgid "Quadrant 2 Subdiv"
-msgstr ""
+msgstr "Subdivisión del Cuadrante 2"
#: servers/visual_server.cpp
msgid "Quadrant 3 Subdiv"
-msgstr ""
+msgstr "Subdivisión del Cuadrante 3"
#: servers/visual_server.cpp
msgid "Shadows"
@@ -26988,11 +27007,11 @@ msgstr "Reflejos del Array de Texturas"
#: servers/visual_server.cpp
msgid "High Quality GGX"
-msgstr ""
+msgstr "GGX de Alta Calidad"
#: servers/visual_server.cpp
msgid "Irradiance Max Size"
-msgstr ""
+msgstr "Tamaño Máximo de Irradiancia"
#: servers/visual_server.cpp
msgid "Shading"
@@ -27000,19 +27019,19 @@ msgstr "Sombreado"
#: servers/visual_server.cpp
msgid "Force Vertex Shading"
-msgstr ""
+msgstr "Forzar Sombreado de Vértice"
#: servers/visual_server.cpp
msgid "Force Lambert Over Burley"
-msgstr ""
+msgstr "Forzar Lambert en Lugar de Burley"
#: servers/visual_server.cpp
msgid "Force Blinn Over GGX"
-msgstr ""
+msgstr "Forzar Blinn en Lugar de GGX"
#: servers/visual_server.cpp
msgid "Mesh Storage"
-msgstr ""
+msgstr "Almacenamiento de Malla"
#: servers/visual_server.cpp
msgid "Split Stream"
@@ -27020,7 +27039,7 @@ msgstr "Stream Dividido"
#: servers/visual_server.cpp
msgid "Use Physical Light Attenuation"
-msgstr ""
+msgstr "Usar Atenuación de Luz Física"
#: servers/visual_server.cpp
msgid "Depth Prepass"
@@ -27028,15 +27047,15 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Disable For Vendors"
-msgstr ""
+msgstr "Deshabilitar para Proveedores"
#: servers/visual_server.cpp
msgid "Anisotropic Filter Level"
-msgstr ""
+msgstr "Nivel de Filtro Anisotrópico"
#: servers/visual_server.cpp
msgid "Use Nearest Mipmap Filter"
-msgstr ""
+msgstr "Usar Filtro de Mapa MIP más Cercano"
#: servers/visual_server.cpp
msgid "Skinning"
@@ -27092,7 +27111,7 @@ msgstr "Usar División en Lotes en el Editor"
#: servers/visual_server.cpp
msgid "Single Rect Fallback"
-msgstr ""
+msgstr "Alternativa de Rect Único"
#: servers/visual_server.cpp
msgid "Max Join Item Commands"
@@ -27100,11 +27119,11 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Colored Vertex Format Threshold"
-msgstr ""
+msgstr "Umbral de Formato de Vértice Coloreado"
#: servers/visual_server.cpp
msgid "Scissor Area Threshold"
-msgstr ""
+msgstr "Umbral de Área de Corte"
#: servers/visual_server.cpp
msgid "Max Join Items"
@@ -27112,7 +27131,7 @@ msgstr "Elementos de Unión Máximos"
#: servers/visual_server.cpp
msgid "Batch Buffer Size"
-msgstr ""
+msgstr "Tamaño de Lote de Buffer"
#: servers/visual_server.cpp
msgid "Item Reordering Lookahead"
@@ -27128,7 +27147,7 @@ msgstr "Diagnosticar Cuadro"
#: servers/visual_server.cpp
msgid "GLES2"
-msgstr ""
+msgstr "GLES2"
#: servers/visual_server.cpp
msgid "Compatibility"
@@ -27136,7 +27155,7 @@ msgstr "Compatibilidad"
#: servers/visual_server.cpp
msgid "Disable Half Float"
-msgstr ""
+msgstr "Desactivar Float Medio"
#: servers/visual_server.cpp
msgid "Enable High Float"
@@ -27148,11 +27167,11 @@ msgstr "Precisión"
#: servers/visual_server.cpp
msgid "UV Contract"
-msgstr ""
+msgstr "Contracción UV"
#: servers/visual_server.cpp
msgid "UV Contract Amount"
-msgstr ""
+msgstr "Cantidad de Contracción UV"
#: servers/visual_server.cpp
msgid "Use Simple PVS"
@@ -27160,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"
@@ -27196,7 +27215,7 @@ msgstr "Compilaciones Simultáneas Máximas"
#: servers/visual_server.cpp
msgid "Log Active Async Compiles Count"
-msgstr ""
+msgstr "Anotar Número de Compilaciones Asíncronas Activas"
#: servers/visual_server.cpp
msgid "Shader Cache Size (MB)"
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index 5babe4ff23..24d38e14a7 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -21,13 +21,15 @@
# Manuel González <mgoopazo@gmail.com>, 2021.
# 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-07-23 03:57+0000\n"
-"Last-Translator: Mau_Restor <restor@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"
@@ -35,7 +37,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.14-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -71,7 +73,7 @@ msgstr "Modo de Bajo Uso del Procesador"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode Sleep (µsec)"
-msgstr ""
+msgstr "Modo de Baja Utilización del Procesador en Reposo (µseg)"
#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp
msgid "Keep Screen On"
@@ -141,7 +143,7 @@ msgstr "Tamaño"
#: core/bind/core_bind.cpp
msgid "Endian Swap"
-msgstr ""
+msgstr "Intercambio Endiano"
#: core/bind/core_bind.cpp
msgid "Editor Hint"
@@ -248,20 +250,19 @@ msgstr "Conección"
#: core/io/http_client.cpp
msgid "Read Chunk Size"
-msgstr ""
+msgstr "Tamaño de fragmento de lectura"
#: core/io/marshalls.cpp
msgid "Object ID"
msgstr "ID de Objeto"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
-#, fuzzy
msgid "Allow Object Decoding"
-msgstr "Activar Onion Skinning"
+msgstr "Permitir decodificación de objetos"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
msgid "Refuse New Network Connections"
-msgstr ""
+msgstr "Rechazar Nuevas Conexiones de Red"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
#, fuzzy
@@ -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"
@@ -309,9 +310,8 @@ msgid "Blocking Handshake"
msgstr ""
#: core/io/udp_server.cpp
-#, fuzzy
msgid "Max Pending Connections"
-msgstr "Editar Conexión:"
+msgstr "Máximo de Conexiones Pendientes"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -364,7 +364,6 @@ msgid "Seed"
msgstr "Semilla"
#: core/math/random_number_generator.cpp
-#, fuzzy
msgid "State"
msgstr "Estado"
@@ -381,9 +380,8 @@ msgid "Mouse Mode"
msgstr "Modo Mouse"
#: core/os/input.cpp
-#, fuzzy
msgid "Use Accumulated Input"
-msgstr "Eliminar Entrada"
+msgstr "Usar entrada acumulada"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: servers/audio_server.cpp
@@ -411,9 +409,8 @@ msgid "Command"
msgstr "Comando"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Physical"
-msgstr " (Física)"
+msgstr "Física"
#: core/os/input_event.cpp scene/2d/touch_screen_button.cpp
#: scene/gui/base_button.cpp scene/gui/texture_button.cpp
@@ -509,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"
@@ -725,7 +723,7 @@ msgstr "Superior Derecha"
#: core/project_settings.cpp
msgid "UI Up"
-msgstr ""
+msgstr "Interfaz Arriba"
#: core/project_settings.cpp
#, fuzzy
@@ -739,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"
@@ -757,9 +755,8 @@ msgstr "Al Final de la interfaz de usuario"
#: servers/physics_2d/physics_2d_server_wrap_mt.h
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
-#, fuzzy
msgid "Physics"
-msgstr " (Física)"
+msgstr "(Física)"
#: core/project_settings.cpp editor/editor_settings.cpp
#: editor/import/resource_importer_layered_texture.cpp
@@ -1018,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"
@@ -1073,7 +1070,7 @@ msgstr ""
#. TRANSLATORS: Adjective, refers to the mode for Bezier handles (Free, Balanced, Mirror).
#: editor/animation_bezier_editor.cpp
msgid "Free"
-msgstr "Gratis"
+msgstr "Libre"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
@@ -11256,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]"
@@ -13119,9 +13116,10 @@ msgstr "Opciones de Ajuste"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Offset:"
@@ -14563,16 +14561,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Ruta de proyecto inválida (cambiaste algo?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"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."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "No se pudo editar project.godot en la ruta de proyecto."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "No se puede abrir el proyecto en '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -19323,15 +19322,13 @@ msgid "Code Signing"
msgstr "Firmando código de DMG"
#: 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 ""
-"No se ha encontrado 'apksigner'.\n"
-"Por favor, comprobá que el comando esté disponible en el directorio Android "
-"SDK build-tools.\n"
-"El %s resultante está sin firmar."
+"No se ha encontrado 'apksigner'. Por favor, comprobá que el comando esté "
+"disponible en el directorio Android SDK build-tools. El %s resultante está "
+"sin firmar."
#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
@@ -19380,9 +19377,8 @@ msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "¡Nombre de archivo inválido! Android APK requiere la extensión *.apk."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Unsupported export format!"
-msgstr "¡Formato de exportación no soportado!\n"
+msgstr "¡Formato de exportación no soportado!"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19394,16 +19390,13 @@ msgstr ""
"'Proyecto'."
#: 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 ""
-"La versión de compilación de Android no coincide:\n"
-" Plantilla instalada: %s\n"
-" Versión de Godot: %s\n"
-"Por favor, reinstalá la plantilla de compilación de Android desde el menú "
-"'Proyecto'."
+"La versión de compilación de Android no coincide: Plantilla instalada: %s, "
+"Versión de Godot: %s. Por favor, reinstalá la plantilla de compilación de "
+"Android desde el menú 'Proyecto'."
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -19414,10 +19407,9 @@ msgstr ""
"el nombre del proyecto"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files to gradle project."
msgstr ""
-"No se pudieron exportar los archivos del proyecto a un proyecto gradle\n"
+"No se pudieron exportar los archivos del proyecto a un proyecto gradle."
#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
@@ -19428,12 +19420,11 @@ msgid "Building Android Project (gradle)"
msgstr "Construir Proyecto Android (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 ""
-"La construcción del proyecto Android falló, comprueba la salida del error.\n"
+"La construcción del proyecto Android falló, comprueba la salida del error. "
"También podés visitar docs.godotengine.org para consultar la documentación "
"de compilación de Android."
@@ -19459,23 +19450,19 @@ msgid "Creating APK..."
msgstr "Creando APK..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not find template APK to export: \"%s\"."
-msgstr ""
-"No se pudo encontrar la plantilla APK para exportar:\n"
-"%s"
+msgstr "No se pudo encontrar la plantilla APK para exportar: %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 ""
"Bibliotecas faltantes en la plantilla de exportación para las arquitecturas "
-"seleccionadas: %s.\n"
-"Por favor, construya una plantilla con todas las bibliotecas necesarias, o "
-"desmarque las arquitecturas faltantes en el preset de exportación."
+"seleccionadas: %s. Por favor, construya una plantilla con todas las "
+"bibliotecas necesarias, o desmarque las arquitecturas faltantes en el preset "
+"de exportación."
#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
@@ -20350,10 +20337,8 @@ msgid "ZIP Creation"
msgstr "Proyección"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not open file to read from path \"%s\"."
-msgstr ""
-"No se pudieron exportar los archivos del proyecto a un proyecto gradle\n"
+msgstr "No se pudieron exportar los archivos del proyecto a un proyecto gradle"
#: platform/osx/export/export.cpp
msgid "Invalid bundle identifier:"
@@ -22186,9 +22171,8 @@ msgid "Safe Margin"
msgstr "Margen Seguro"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Sync To Physics"
-msgstr " (Física)"
+msgstr "(Física)"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -23667,9 +23651,8 @@ msgid "A RoomGroup should not be a child or grandchild of a Portal."
msgstr "Un RoomGroup no debe ser hijo o nieto de un Portal."
#: scene/3d/portal.cpp
-#, fuzzy
msgid "Portal Active"
-msgstr " [portales activos]"
+msgstr "[portales activos]"
#: scene/3d/portal.cpp scene/resources/occluder_shape_polygon.cpp
msgid "Two Way"
@@ -24135,6 +24118,15 @@ msgstr "Error"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Ordenar"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr "Geometría"
@@ -25863,14 +25855,12 @@ msgid "3D Render"
msgstr "Renderizador:"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "2D Physics"
-msgstr " (Física)"
+msgstr "(Física)"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "3D Physics"
-msgstr " (Física)"
+msgstr "(Física)"
#: scene/register_scene_types.cpp
#, fuzzy
diff --git a/editor/translations/et.po b/editor/translations/et.po
index 20da09ffc5..c08335ed4f 100644
--- a/editor/translations/et.po
+++ b/editor/translations/et.po
@@ -6,118 +6,112 @@
# Mattias Aabmets <mattias.aabmets@gmail.com>, 2019.
# StReef <streef.gtx@gmail.com>, 2020, 2021.
# René <renepiik@gmail.com>, 2020.
-# Kritzmensch <streef.gtx@gmail.com>, 2021.
+# 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: 2021-07-16 05:47+0000\n"
-"Last-Translator: Kritzmensch <streef.gtx@gmail.com>\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.7.2-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
-msgstr ""
+msgstr "Graafikatahvli draiver"
#: core/bind/core_bind.cpp
msgid "Clipboard"
-msgstr ""
+msgstr "Lõikelaud"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Current Screen"
-msgstr "Virnakaadrid"
+msgstr "Avatud Ekraan"
#: core/bind/core_bind.cpp
msgid "Exit Code"
-msgstr ""
+msgstr "Lõpukood"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "V-Sync Enabled"
-msgstr "Luba"
+msgstr "V-Sync Sees"
#: core/bind/core_bind.cpp main/main.cpp
msgid "V-Sync Via Compositor"
-msgstr ""
+msgstr "V-sync komposiitori kaudu"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Delta Smoothing"
-msgstr ""
+msgstr "Delta silumine"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Low Processor Usage Mode"
-msgstr "Liigutamisrežiim"
+msgstr "Protsessori madala võimsuse režiim"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode Sleep (µsec)"
-msgstr ""
+msgstr "Protsessori madala võimsuse režiimi puhkeaeg (µsek)"
#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp
msgid "Keep Screen On"
-msgstr ""
+msgstr "Hoia ekraan sees"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Min Window Size"
-msgstr "Suurus: "
+msgstr "Minimaalne akna suurus"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Max Window Size"
-msgstr "Suurus: "
+msgstr "Maksimaalne akna suurus"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Screen Orientation"
-msgstr "Ava dokumentatsioon"
+msgstr "Ekraani orientatsioon"
#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp
#: platform/uwp/os_uwp.cpp
-#, fuzzy
msgid "Window"
-msgstr "Uus aken"
+msgstr "Aken"
#: core/bind/core_bind.cpp core/project_settings.cpp
msgid "Borderless"
-msgstr ""
+msgstr "Ääriseta"
#: core/bind/core_bind.cpp
msgid "Per Pixel Transparency Enabled"
-msgstr ""
+msgstr "Läbipaistvus piksli kohta lubatud"
#: core/bind/core_bind.cpp core/project_settings.cpp
msgid "Fullscreen"
-msgstr ""
+msgstr "Täisekraan"
#: core/bind/core_bind.cpp
msgid "Maximized"
-msgstr ""
+msgstr "Maksimeeritud"
#: core/bind/core_bind.cpp
msgid "Minimized"
-msgstr ""
+msgstr "Minimeeritud"
#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp
#: scene/gui/graph_node.cpp
msgid "Resizable"
-msgstr ""
+msgstr "Suurust muudetav"
#: core/bind/core_bind.cpp core/os/input_event.cpp scene/2d/node_2d.cpp
#: scene/2d/physics_body_2d.cpp scene/2d/remote_transform_2d.cpp
#: scene/3d/physics_body.cpp scene/3d/remote_transform.cpp
#: scene/gui/control.cpp scene/gui/line_edit.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Position"
-msgstr "Doki asukoht"
+msgstr "Asend"
#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp
#: main/main.cpp modules/gridmap/grid_map.cpp
@@ -128,63 +122,56 @@ msgstr "Doki asukoht"
#: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp
#: scene/resources/style_box.cpp scene/resources/texture.cpp
#: scene/resources/visual_shader.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Size"
-msgstr "Suurus: "
+msgstr "Suurus"
#: core/bind/core_bind.cpp
msgid "Endian Swap"
-msgstr ""
+msgstr "Endiani vahetus"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Editor Hint"
-msgstr "Redaktor"
+msgstr "Toimeti vihje"
#: core/bind/core_bind.cpp
msgid "Print Error Messages"
-msgstr ""
+msgstr "Trüki veateated"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Iterations Per Second"
-msgstr "Interpolatsiooni režiim"
+msgstr "Iteratsioone sekundis"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Target FPS"
-msgstr "Ressursi tee"
+msgstr "Kaadrisageduse eesmärk"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Time Scale"
-msgstr "Skaleerimisrežiim"
+msgstr "Ajaskaala"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Physics Jitter Fix"
-msgstr ""
+msgstr "Füüsika värisemise parandus"
#: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Error"
-msgstr ""
+msgstr "Viga"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Error String"
-msgstr "Redaktori sätted"
+msgstr "Veasõne"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Error Line"
-msgstr "Viga:"
+msgstr "Vearida"
#: core/bind/core_bind.cpp
msgid "Result"
-msgstr ""
+msgstr "Tulemus"
#: core/command_queue_mt.cpp core/message_queue.cpp main/main.cpp
msgid "Memory"
-msgstr ""
+msgstr "Mälu"
#: core/command_queue_mt.cpp core/message_queue.cpp
#: core/register_core_types.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp
@@ -195,128 +182,119 @@ msgstr ""
#: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h
#: servers/visual_server.cpp
msgid "Limits"
-msgstr ""
+msgstr "Limiidid"
#: core/command_queue_mt.cpp
msgid "Command Queue"
-msgstr ""
+msgstr "Käskude järjekord"
#: core/command_queue_mt.cpp
msgid "Multithreading Queue Size (KB)"
-msgstr ""
+msgstr "Lõimtöötluse järjekorra suurus (KB)"
#: core/func_ref.cpp modules/visual_script/visual_script_builtin_funcs.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Function"
-msgstr "Funktsioonid"
+msgstr "Funktsioon"
#: core/image.cpp core/packed_data_container.cpp scene/2d/polygon_2d.cpp
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
msgid "Data"
-msgstr ""
+msgstr "Andmed"
#: core/io/file_access_network.cpp core/register_core_types.cpp
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp main/main.cpp
#: 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 "Võrgu profileerija"
+msgstr "Võrk"
#: core/io/file_access_network.cpp
-#, fuzzy
msgid "Remote FS"
-msgstr "Eemalda"
+msgstr "Kaugfailisüsteem"
#: core/io/file_access_network.cpp
msgid "Page Size"
-msgstr ""
+msgstr "Lehekülje suurus"
#: core/io/file_access_network.cpp
msgid "Page Read Ahead"
-msgstr ""
+msgstr "Lehekülje ettelaadimine"
#: core/io/http_client.cpp
msgid "Blocking Mode Enabled"
-msgstr ""
+msgstr "Blokeerimisrežiim lubatud"
#: core/io/http_client.cpp
-#, fuzzy
msgid "Connection"
-msgstr "Ühenda"
+msgstr "Ühendus"
#: core/io/http_client.cpp
msgid "Read Chunk Size"
-msgstr ""
+msgstr "Loe tüki suurust"
#: core/io/marshalls.cpp
-#, fuzzy
msgid "Object ID"
-msgstr "Objekte kuvatud"
+msgstr "Objekti ID"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
msgid "Allow Object Decoding"
-msgstr ""
+msgstr "Luba objekti dekodeerimine"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
msgid "Refuse New Network Connections"
-msgstr ""
+msgstr "Keeldu uutest võrguühendustest"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Network Peer"
-msgstr "Võrgu profileerija"
+msgstr "Võrgukaaslane"
#: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp
-#, fuzzy
msgid "Root Node"
-msgstr "Sõlm"
+msgstr "Juur Node"
#: core/io/networked_multiplayer_peer.cpp
-#, fuzzy
msgid "Refuse New Connections"
-msgstr "Ühenda"
+msgstr "Keeldu uutest ühendustest"
#: core/io/networked_multiplayer_peer.cpp
-#, fuzzy
msgid "Transfer Mode"
-msgstr "Skaleerimisrežiim"
+msgstr "Ülekanderežiim"
#: core/io/packet_peer.cpp
msgid "Encode Buffer Max Size"
-msgstr ""
+msgstr "Kodeerimispuhvri maksimaalne suurus"
#: core/io/packet_peer.cpp
msgid "Input Buffer Max Size"
-msgstr ""
+msgstr "Sisendpuhvri maksimaalne suurus"
#: core/io/packet_peer.cpp
msgid "Output Buffer Max Size"
-msgstr ""
+msgstr "Väljundpuhvri maksimaalne suurus"
#: core/io/packet_peer.cpp
msgid "Stream Peer"
-msgstr ""
+msgstr "Voogedastuskaaslane"
#: core/io/stream_peer.cpp
msgid "Big Endian"
-msgstr ""
+msgstr "Suur Endian"
#: core/io/stream_peer.cpp
msgid "Data Array"
-msgstr ""
+msgstr "Andmemassiiv"
#: core/io/stream_peer_ssl.cpp
msgid "Blocking Handshake"
-msgstr ""
+msgstr "Käepigistuse blokeerimine"
#: core/io/udp_server.cpp
msgid "Max Pending Connections"
-msgstr ""
+msgstr "Maksimaalne ootel ühenduste arv"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -326,7 +304,7 @@ msgstr ""
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "Eeldati sõne pikkusega 1 (trükimärk)."
+msgstr "Eeldati sõne pikkusega 1 (tähemärk)."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -335,7 +313,6 @@ msgid "Not enough bytes for decoding bytes, or invalid format."
msgstr "Ebapiisav kogus baite nende dekodeerimiseks või kehtetu formaat."
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid input %d (not passed) in expression"
msgstr "Väljendis on kehtetu sisend %i (mitte edastatud)"
@@ -366,209 +343,193 @@ msgstr "'%' kutsudes:"
#: core/math/random_number_generator.cpp
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Seed"
-msgstr ""
+msgstr "Seeme"
#: core/math/random_number_generator.cpp
-#, fuzzy
msgid "State"
msgstr "Olek"
#: core/message_queue.cpp
msgid "Message Queue"
-msgstr ""
+msgstr "Sõnumijärjekord"
#: core/message_queue.cpp
msgid "Max Size (KB)"
-msgstr ""
+msgstr "Maksimaalne suurus (KB)"
#: core/os/input.cpp
-#, fuzzy
msgid "Mouse Mode"
-msgstr "Liigutamisrežiim"
+msgstr "Hiire režiim"
#: core/os/input.cpp
msgid "Use Accumulated Input"
-msgstr ""
+msgstr "Kasuta akumuleeritud sisendit"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: servers/audio_server.cpp
msgid "Device"
-msgstr ""
+msgstr "Seade"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Alt"
-msgstr "Tähelepanu!"
+msgstr "Alt"
#: core/os/input_event.cpp
msgid "Shift"
-msgstr ""
+msgstr "Shift"
#: core/os/input_event.cpp
msgid "Control"
-msgstr ""
+msgstr "Control"
#: core/os/input_event.cpp
msgid "Meta"
-msgstr ""
+msgstr "Meta"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Command"
-msgstr "Kogukond"
+msgstr "Command"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Physical"
-msgstr "Luba"
+msgstr "Füüsiline"
#: core/os/input_event.cpp scene/2d/touch_screen_button.cpp
#: scene/gui/base_button.cpp scene/gui/texture_button.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Pressed"
-msgstr "Eelseadistus"
+msgstr "Vajutatud"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Scancode"
-msgstr "Otsi"
+msgstr "Klahvikood"
#: core/os/input_event.cpp
msgid "Physical Scancode"
-msgstr ""
+msgstr "Füüsiline klahvikood"
#: core/os/input_event.cpp
msgid "Unicode"
-msgstr ""
+msgstr "Unicode"
#: core/os/input_event.cpp
msgid "Echo"
-msgstr ""
+msgstr "Kaja"
#: core/os/input_event.cpp scene/gui/base_button.cpp
msgid "Button Mask"
-msgstr ""
+msgstr "Nupu mask"
#: core/os/input_event.cpp scene/2d/node_2d.cpp scene/gui/control.cpp
-#, fuzzy
msgid "Global Position"
-msgstr "Konstant"
+msgstr "Globaalne positsioon"
#: core/os/input_event.cpp
msgid "Factor"
-msgstr ""
+msgstr "Faktor"
#: core/os/input_event.cpp
msgid "Button Index"
-msgstr ""
+msgstr "Nupu indeks"
#: core/os/input_event.cpp
msgid "Doubleclick"
-msgstr ""
+msgstr "Topeltklõps"
#: core/os/input_event.cpp
msgid "Tilt"
-msgstr ""
+msgstr "Kallutus"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pressure"
-msgstr "Eelseadistus"
+msgstr "Surve"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "Pliiats ümberpööratud"
#: core/os/input_event.cpp
msgid "Relative"
-msgstr ""
+msgstr "Suhteline"
#: 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
#: scene/animation/animation_player.cpp scene/resources/environment.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Speed"
-msgstr "Skaleerimisrežiim"
+msgstr "Kiirus"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: scene/3d/sprite_3d.cpp
msgid "Axis"
-msgstr ""
+msgstr "Telg"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Axis Value"
-msgstr "(väärtus)"
+msgstr "Telje väärtus"
#: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp
msgid "Index"
-msgstr ""
+msgstr "Indeks"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: modules/visual_script/visual_script_nodes.cpp
#: scene/2d/touch_screen_button.cpp
msgid "Action"
-msgstr ""
+msgstr "Tegevus"
#: core/os/input_event.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp
msgid "Strength"
-msgstr ""
+msgstr "Tugevus"
#: core/os/input_event.cpp
msgid "Delta"
-msgstr ""
+msgstr "Delta"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Channel"
-msgstr "Muuda"
+msgstr "Kanal"
#: core/os/input_event.cpp main/main.cpp
-#, fuzzy
msgid "Message"
-msgstr "Kasutus"
+msgstr "Sõnum"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pitch"
-msgstr "Frontaal"
+msgstr "Helikõrgus"
#: 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 "Kiirus"
#: core/os/input_event.cpp
msgid "Instrument"
-msgstr ""
+msgstr "Instrument"
#: core/os/input_event.cpp
msgid "Controller Number"
-msgstr ""
+msgstr "Kontrolleri number"
#: core/os/input_event.cpp
msgid "Controller Value"
-msgstr ""
+msgstr "Kontrolleri väärtus"
#: 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 "Animatsioon"
+msgstr "Rakendus"
#: core/project_settings.cpp main/main.cpp
msgid "Config"
-msgstr ""
+msgstr "Konfiig"
#: core/project_settings.cpp
-#, fuzzy
msgid "Project Settings Override"
-msgstr "Projekti sätted..."
+msgstr "Projekti seadete ülekirjutamine"
#: core/project_settings.cpp core/resource.cpp
#: editor/animation_track_editor.cpp editor/editor_autoload_settings.cpp
@@ -599,40 +560,39 @@ msgstr "Käivita"
#: core/project_settings.cpp editor/editor_node.cpp
#: editor/run_settings_dialog.cpp main/main.cpp
msgid "Main Scene"
-msgstr ""
+msgstr "Peamine stseen"
#: core/project_settings.cpp
msgid "Disable stdout"
-msgstr ""
+msgstr "Lülita stdout välja"
#: core/project_settings.cpp
msgid "Disable stderr"
-msgstr ""
+msgstr "Lülita stderr välja"
#: core/project_settings.cpp
msgid "Use Hidden Project Data Directory"
-msgstr ""
+msgstr "Kasuta varjatud projektiandmete kausta"
#: core/project_settings.cpp
msgid "Use Custom User Dir"
-msgstr ""
+msgstr "Kasuta kohandatud kasutaja kausta"
#: core/project_settings.cpp
msgid "Custom User Dir Name"
-msgstr ""
+msgstr "Kohandatud kasutaja kausta nimi"
#: 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 "Kuva kõik"
+msgstr "Ekraan"
#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp
#: 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 "Laius"
#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp
#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp
@@ -641,20 +601,19 @@ msgstr ""
#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp
#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp
msgid "Height"
-msgstr ""
+msgstr "Kõrgus"
#: core/project_settings.cpp
msgid "Always On Top"
-msgstr ""
+msgstr "Alati pealmine"
#: core/project_settings.cpp
msgid "Test Width"
-msgstr ""
+msgstr "Testimise laius"
#: core/project_settings.cpp
-#, fuzzy
msgid "Test Height"
-msgstr "Testimine"
+msgstr "Testimise kõrgus"
#: core/project_settings.cpp editor/animation_track_editor.cpp
#: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp
@@ -662,9 +621,8 @@ msgid "Audio"
msgstr "Heli"
#: core/project_settings.cpp
-#, fuzzy
msgid "Default Bus Layout"
-msgstr "Lae vaikimise siini paigutus."
+msgstr "Siini vaikepaigutus"
#: core/project_settings.cpp editor/editor_export.cpp
#: editor/editor_file_system.cpp editor/editor_node.cpp
@@ -675,90 +633,84 @@ msgstr "Redaktor"
#: core/project_settings.cpp
msgid "Main Run Args"
-msgstr ""
+msgstr "Peamised jooksuargumendid"
#: core/project_settings.cpp
-#, fuzzy
msgid "Scene Naming"
-msgstr "Stseeni tee:"
+msgstr "Stseeni nimetamine"
#: core/project_settings.cpp
msgid "Search In File Extensions"
-msgstr ""
+msgstr "Otsi faililaienditest"
#: core/project_settings.cpp
msgid "Script Templates Search Path"
-msgstr ""
+msgstr "Skriptimallide otsingutee"
#: core/project_settings.cpp
msgid "Version Control Autoload On Startup"
-msgstr ""
+msgstr "Versioonikontrolli automaatne laadimine käivitamisel"
#: core/project_settings.cpp
msgid "Version Control Plugin Name"
-msgstr ""
+msgstr "Versioonikontrolli plugina nimi"
#: core/project_settings.cpp scene/2d/collision_object_2d.cpp
#: scene/3d/collision_object.cpp scene/gui/control.cpp
msgid "Input"
-msgstr ""
+msgstr "Sisend"
#: core/project_settings.cpp
msgid "UI Accept"
-msgstr ""
+msgstr "UI Aktsepteeri"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Select"
-msgstr "Vali"
+msgstr "UI Vali"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Cancel"
-msgstr "Tühista"
+msgstr "UI Tühista"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Focus Next"
-msgstr "Fookuse tee"
+msgstr "UI Fokusseeri järgmine"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Focus Prev"
-msgstr "Fookuse tee"
+msgstr "UI fokusseeri eelmine"
#: core/project_settings.cpp
msgid "UI Left"
-msgstr ""
+msgstr "UI Vasakule"
#: core/project_settings.cpp
msgid "UI Right"
-msgstr ""
+msgstr "UI Paremale"
#: core/project_settings.cpp
msgid "UI Up"
-msgstr ""
+msgstr "UI Üles"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Down"
-msgstr "Alla"
+msgstr "UI Alla"
#: core/project_settings.cpp
msgid "UI Page Up"
-msgstr ""
+msgstr "UI Leht üles"
#: core/project_settings.cpp
msgid "UI Page Down"
-msgstr ""
+msgstr "UI leht alla"
#: core/project_settings.cpp
msgid "UI Home"
-msgstr ""
+msgstr "UI Kodu"
#: core/project_settings.cpp
msgid "UI End"
-msgstr ""
+msgstr "UI Lõpp"
#: core/project_settings.cpp main/main.cpp modules/bullet/register_types.cpp
#: modules/bullet/space_bullet.cpp scene/2d/physics_body_2d.cpp
@@ -769,7 +721,7 @@ msgstr ""
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
msgid "Physics"
-msgstr ""
+msgstr "Füüsika"
#: core/project_settings.cpp editor/editor_settings.cpp
#: editor/import/resource_importer_layered_texture.cpp
@@ -779,11 +731,11 @@ msgstr ""
#: 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
msgid "Smooth Trimesh Collision"
-msgstr ""
+msgstr "Sujuv Trimeshi kokkupõrge"
#: core/project_settings.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles2/rasterizer_scene_gles2.cpp
@@ -795,7 +747,7 @@ msgstr ""
#: scene/main/viewport.cpp servers/visual/visual_server_scene.cpp
#: servers/visual_server.cpp
msgid "Rendering"
-msgstr ""
+msgstr "Renderdamine"
#: core/project_settings.cpp drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_scene_gles3.cpp
@@ -805,18 +757,17 @@ msgstr ""
#: scene/resources/multimesh.cpp servers/visual/visual_server_scene.cpp
#: servers/visual_server.cpp
msgid "Quality"
-msgstr ""
+msgstr "Kvaliteet"
#: core/project_settings.cpp scene/gui/file_dialog.cpp
#: scene/main/scene_tree.cpp scene/resources/navigation_mesh.cpp
#: servers/visual_server.cpp
-#, fuzzy
msgid "Filters"
-msgstr "Filtreeri sõlmed"
+msgstr "Filtrid"
#: core/project_settings.cpp scene/main/viewport.cpp
msgid "Sharpen Intensity"
-msgstr ""
+msgstr "Teravdamise intensiivsus"
#: core/project_settings.cpp editor/editor_export.cpp editor/editor_node.cpp
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
@@ -832,9 +783,8 @@ msgstr "Silumine"
#: core/project_settings.cpp main/main.cpp modules/gdscript/gdscript.cpp
#: modules/visual_script/visual_script.cpp scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Settings"
-msgstr "Sätted..."
+msgstr "Seaded"
#: core/project_settings.cpp editor/script_editor_debugger.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
@@ -842,22 +792,20 @@ msgid "Profiler"
msgstr "Profileerija"
#: core/project_settings.cpp
-#, fuzzy
msgid "Max Functions"
-msgstr "Loo funktsioon"
+msgstr "Funktsioone maksimaalselt"
#: core/project_settings.cpp scene/3d/vehicle_body.cpp
msgid "Compression"
-msgstr ""
+msgstr "Kompressioon"
#: core/project_settings.cpp
-#, fuzzy
msgid "Formats"
-msgstr "Formaat"
+msgstr "Formaadid"
#: core/project_settings.cpp
msgid "Zstd"
-msgstr ""
+msgstr "Zstd"
#: core/project_settings.cpp
msgid "Long Distance Matching"
@@ -865,35 +813,36 @@ msgstr ""
#: core/project_settings.cpp
msgid "Compression Level"
-msgstr ""
+msgstr "Kompressiooni tase"
#: core/project_settings.cpp
+#, fuzzy
msgid "Window Log Size"
-msgstr ""
+msgstr "Akna logi suurus"
#: 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"
-msgstr ""
+msgstr "Android"
#: core/project_settings.cpp
msgid "Modules"
-msgstr ""
+msgstr "Moodulid"
#: core/register_core_types.cpp
msgid "TCP"
-msgstr ""
+msgstr "TCP"
#: core/register_core_types.cpp
msgid "Connect Timeout Seconds"
-msgstr ""
+msgstr "Ühendamise aegumistähtaeg sekundites"
#: core/register_core_types.cpp
msgid "Packet Peer Stream"
@@ -905,12 +854,11 @@ msgstr ""
#: 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
msgid "Certificates"
-msgstr "Tipud"
+msgstr "Sertifikaadid"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_resource_picker.cpp
@@ -919,9 +867,8 @@ msgid "Resource"
msgstr "Ressurss"
#: core/resource.cpp
-#, fuzzy
msgid "Local To Scene"
-msgstr "Sule stseen"
+msgstr "Kohalik stseenile"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_autoload_settings.cpp editor/plugins/path_editor_plugin.cpp
@@ -932,20 +879,19 @@ msgstr "Tee"
#: core/script_language.cpp
msgid "Source Code"
-msgstr ""
+msgstr "Lähtekood"
#: core/translation.cpp editor/project_settings_editor.cpp
msgid "Locale"
-msgstr ""
+msgstr "Lokaal"
#: core/translation.cpp
-#, fuzzy
msgid "Test"
-msgstr "Testimine"
+msgstr "Test"
#: core/translation.cpp scene/resources/font.cpp
msgid "Fallback"
-msgstr ""
+msgstr "Varuvariant"
#: core/ustring.cpp scene/resources/segment_shape_2d.cpp
msgid "B"
@@ -981,17 +927,17 @@ msgstr "EiB"
#: drivers/gles3/rasterizer_scene_gles3.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp modules/gltf/gltf_state.cpp
msgid "Buffers"
-msgstr ""
+msgstr "Puhvrid"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
msgid "Canvas Polygon Buffer Size (KB)"
-msgstr ""
+msgstr "Lõuendipolügooni puhvri suurus (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
msgid "Canvas Polygon Index Buffer Size (KB)"
-msgstr ""
+msgstr "Lõuendipolügoonide indekspuhvri suurus (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp
@@ -1003,54 +949,52 @@ msgstr ""
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/visual_server.cpp
msgid "2D"
-msgstr ""
+msgstr "2D"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
-#, fuzzy
msgid "Snapping"
-msgstr "Intervall:"
+msgstr "Naksamine"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
-#, fuzzy
msgid "Use GPU Pixel Snap"
-msgstr "Kasuta ruudustiku naksamist"
+msgstr "Kasuta GPU piksli naksamist"
#: drivers/gles2/rasterizer_scene_gles2.cpp
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Immediate Buffer Size (KB)"
-msgstr ""
+msgstr "Kohene puhvri suurus (KB)"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
msgid "Lightmapping"
-msgstr ""
+msgstr "Valguskaardistamine"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
msgid "Use Bicubic Sampling"
-msgstr ""
+msgstr "Kasutage bikuubilist proovivõtmist"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Elements"
-msgstr ""
+msgstr "Max renderdatavaid elemente"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Lights"
-msgstr ""
+msgstr "Max renderdatavaid tulesid"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Reflections"
-msgstr ""
+msgstr "Max renderdatavaid peegeldusi"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Lights Per Object"
-msgstr ""
+msgstr "Max tulesid objekti kohta"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Subsurface Scattering"
-msgstr ""
+msgstr "Pinnaalune hajumine"
#: drivers/gles3/rasterizer_scene_gles3.cpp editor/animation_track_editor.cpp
#: editor/import/resource_importer_texture.cpp
@@ -1062,29 +1006,28 @@ msgstr ""
#: scene/animation/animation_blend_tree.cpp scene/gui/control.cpp
#: scene/main/canvas_layer.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Scale"
-msgstr "Skaleerimisrežiim"
+msgstr "Skaala"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Follow Surface"
-msgstr ""
+msgstr "Jälgi pinda"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Weight Samples"
-msgstr ""
+msgstr "Kaalu proovid"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Voxel Cone Tracing"
-msgstr ""
+msgstr "Vokseli koonuse jälgimine"
#: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp
msgid "High Quality"
-msgstr ""
+msgstr "Kõrge kvaliteet"
#: drivers/gles3/rasterizer_storage_gles3.cpp
msgid "Blend Shape Max Buffer Size (KB)"
-msgstr ""
+msgstr "Segu kuju max puhvri suurus (KB)"
#. TRANSLATORS: Adjective, refers to the mode for Bezier handles (Free, Balanced, Mirror).
#: editor/animation_bezier_editor.cpp
@@ -1128,12 +1071,14 @@ msgid "Move Bezier Points"
msgstr "Liiguta Bezieri punkte"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
+#, fuzzy
msgid "Anim Duplicate Keys"
-msgstr ""
+msgstr "Anim duplikaatvõtmed"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
+#, fuzzy
msgid "Anim Delete Keys"
-msgstr ""
+msgstr "Anim kustuta võtmed"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Time"
@@ -1158,9 +1103,8 @@ msgstr ""
#: editor/animation_track_editor.cpp scene/2d/animated_sprite.cpp
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Frame"
-msgstr "Kaadri %"
+msgstr "Kaader"
#: editor/animation_track_editor.cpp editor/editor_profiler.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
@@ -1171,16 +1115,14 @@ msgstr "Aeg"
#: editor/animation_track_editor.cpp editor/import/resource_importer_scene.cpp
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Location"
-msgstr "Tõlked"
+msgstr "Asukoht"
#: editor/animation_track_editor.cpp modules/gltf/gltf_node.cpp
#: scene/2d/polygon_2d.cpp scene/2d/remote_transform_2d.cpp
#: scene/3d/remote_transform.cpp scene/3d/spatial.cpp scene/gui/control.cpp
-#, fuzzy
msgid "Rotation"
-msgstr "Pööramisrežiim"
+msgstr "Pööramine"
#: editor/animation_track_editor.cpp editor/script_editor_debugger.cpp
#: modules/visual_script/visual_script_nodes.cpp scene/gui/range.cpp
@@ -1188,14 +1130,13 @@ msgid "Value"
msgstr "Väärtus"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Arg Count"
-msgstr "Sisesta võti siia"
+msgstr "Arg kogus"
#: editor/animation_track_editor.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
msgid "Args"
-msgstr ""
+msgstr "Argumendid"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/script_editor_debugger.cpp modules/gltf/gltf_accessor.cpp
@@ -1206,28 +1147,26 @@ msgstr "Tüüp"
#: editor/animation_track_editor.cpp
msgid "In Handle"
-msgstr ""
+msgstr "Käepidemes"
#: editor/animation_track_editor.cpp
msgid "Out Handle"
-msgstr ""
+msgstr "Väljas käepide"
#: editor/animation_track_editor.cpp
#: editor/import/resource_importer_texture.cpp
#: 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 "Voog"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Start Offset"
-msgstr "Liigutamisrežiim"
+msgstr "Algnihe"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "End Offset"
-msgstr "Kustuta sõlm(ed)"
+msgstr "Lõpunihe"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/import/resource_importer_scene.cpp
@@ -1241,7 +1180,7 @@ msgstr "Animatsioon"
#: editor/animation_track_editor.cpp
msgid "Easing"
-msgstr ""
+msgstr "Lõdvendamine"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
@@ -1270,7 +1209,7 @@ msgstr "Muuda animatsiooni pikkust"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr "Muuda animatsiooni silmust"
+msgstr "Muuda animatsiooni tsüklit"
#: editor/animation_track_editor.cpp
msgid "Property Track"
@@ -1278,23 +1217,23 @@ msgstr "Atribuudi rada"
#: editor/animation_track_editor.cpp
msgid "3D Transform Track"
-msgstr "3D muundus rada"
+msgstr "3D transformatsiooni rada"
#: editor/animation_track_editor.cpp
msgid "Call Method Track"
-msgstr ""
+msgstr "Meetodi kutsumise rada"
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
-msgstr "Bezieri kurvi rada"
+msgstr "Bezier-kõvera rada"
#: editor/animation_track_editor.cpp
msgid "Audio Playback Track"
-msgstr "Heli taasesituse rada"
+msgstr "Helimängimise rada"
#: editor/animation_track_editor.cpp
msgid "Animation Playback Track"
-msgstr "Animatsiooni taasesituse rada"
+msgstr "Animatsiooni mängimise rada"
#: editor/animation_track_editor.cpp
msgid "Animation length (frames)"
@@ -1335,40 +1274,38 @@ msgstr "Lülita see rada sisse/välja."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
-msgstr "Uuendusrežiim (kuidas see omadus on seatud)"
+msgstr "Uuendusrežiim (kuidas see atribuut on määratud)"
#: editor/animation_track_editor.cpp scene/resources/gradient.cpp
msgid "Interpolation Mode"
msgstr "Interpolatsiooni režiim"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
-msgstr "Korduse mähise režiim (nterpoleeri lõpp silmuse alguses)"
+msgstr "Korduse mähise režiim (interpoleeri lõpp algusega tsükli kordudes)"
#: editor/animation_track_editor.cpp
msgid "Remove this track."
msgstr "Eemalda see rada."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Time (s):"
-msgstr "Aeg (sek): "
+msgstr "Aeg (s):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Position:"
-msgstr "Doki asukoht"
+msgstr "Asukoht:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Rotation:"
-msgstr "Pööramisrežiim"
+msgstr "Pööramine:"
#: editor/animation_track_editor.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
-msgstr ""
+msgstr "Skaala:"
#: editor/animation_track_editor.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
@@ -1379,13 +1316,12 @@ msgid "Type:"
msgstr "Tüüp:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "(Invalid, expected type: %s)"
-msgstr "Vigane nimi."
+msgstr "(Kehtetu, eeldatav tüüp: %s)"
#: editor/animation_track_editor.cpp
msgid "Easing:"
-msgstr ""
+msgstr "Lõdvestumine:"
#: editor/animation_track_editor.cpp
msgid "In-Handle:"
@@ -1401,22 +1337,20 @@ msgid "Stream:"
msgstr "Heli kuulaja"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Start (s):"
-msgstr "Käivita"
+msgstr "Algus (s):"
#: editor/animation_track_editor.cpp
msgid "End (s):"
-msgstr ""
+msgstr "Lõpp (s):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Clip:"
-msgstr "Animatsiooni klipid:"
+msgstr "Animatsiooni klipp:"
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
-msgstr "Lülita rada sisse"
+msgstr "Lülita raja seesolekut"
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -1496,14 +1430,12 @@ msgstr "Eemalda animatsiooni rada"
#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Editors"
-msgstr "Redaktor"
+msgstr "Toimetid"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Confirm Insert Track"
-msgstr "Sisesta animatsiooni rada ja võti"
+msgstr "Kinnitage raja lisamine"
#. TRANSLATORS: %s will be replaced by a phrase describing the target of track.
#: editor/animation_track_editor.cpp
@@ -1512,7 +1444,7 @@ msgstr "Loo uus rada %s-le ja sisesta võti?"
#: editor/animation_track_editor.cpp
msgid "Create %d NEW tracks and insert keys?"
-msgstr ""
+msgstr "Kas luua %d UUT rada ja sisestada võtmed?"
#: editor/animation_track_editor.cpp editor/create_dialog.cpp
#: editor/editor_audio_buses.cpp editor/editor_feature_profile.cpp
@@ -1528,6 +1460,7 @@ msgid "Create"
msgstr "Loo"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Anim Insert"
msgstr "Animatsiooni sisestus"
@@ -1698,7 +1631,7 @@ msgstr "Vali AnimationPlayer sõlm, et luua ja redigeerida animatsioone."
#: editor/animation_track_editor.cpp
msgid "Only show tracks from nodes selected in tree."
-msgstr ""
+msgstr "Näita ainult radu puus valitud node'idelt."
#: editor/animation_track_editor.cpp
msgid "Group tracks by node or display them as plain list."
@@ -1884,31 +1817,31 @@ msgstr ""
#: editor/code_editor.cpp
msgid "Go to Line"
-msgstr ""
+msgstr "Mine reale"
#: editor/code_editor.cpp
msgid "Line Number:"
-msgstr ""
+msgstr "Reanumber:"
#: editor/code_editor.cpp
msgid "%d replaced."
-msgstr ""
+msgstr "%d asendatud."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
-msgstr ""
+msgstr "%d vaste."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d matches."
-msgstr ""
+msgstr "%d vastet."
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Match Case"
-msgstr ""
+msgstr "Sobita suur- ja väiketähed"
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Whole Words"
-msgstr ""
+msgstr "Terved sõnad"
#: editor/code_editor.cpp
msgid "Replace"
@@ -1916,76 +1849,78 @@ msgstr "Asenda"
#: editor/code_editor.cpp
msgid "Replace All"
-msgstr ""
+msgstr "Asenda kõik"
#: editor/code_editor.cpp
msgid "Selection Only"
-msgstr ""
+msgstr "Ainult valik"
#: editor/code_editor.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/text_editor.cpp
msgid "Standard"
-msgstr ""
+msgstr "Standard"
#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
msgid "Toggle Scripts Panel"
-msgstr ""
+msgstr "Lülita skriptide paneel sisse/välja"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom In"
-msgstr ""
+msgstr "Suurenda"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom Out"
-msgstr ""
+msgstr "Vähenda"
#: editor/code_editor.cpp
msgid "Reset Zoom"
-msgstr ""
+msgstr "Lähtesta suum"
#: editor/code_editor.cpp modules/gdscript/gdscript.cpp
msgid "Warnings"
-msgstr ""
+msgstr "Hoiatused"
#: editor/code_editor.cpp
msgid "Line and column numbers."
-msgstr ""
+msgstr "Rea- ja veerunumbrid."
#: editor/connections_dialog.cpp
msgid "Method in target node must be specified."
-msgstr ""
+msgstr "Tuleb täpsustada siht-node'i meetod."
#: editor/connections_dialog.cpp
msgid "Method name must be a valid identifier."
-msgstr ""
+msgstr "Meetodi nimi peab olema kehtiv identifikaator."
#: editor/connections_dialog.cpp
msgid ""
"Target method not found. Specify a valid method or attach a script to the "
"target node."
msgstr ""
+"Sihtmeetodit ei leitud. Määrake kehtiv meetod või lisage siht-node'ile "
+"skript."
#: editor/connections_dialog.cpp
msgid "Connect to Node:"
-msgstr ""
+msgstr "Ühenda node'iga:"
#: editor/connections_dialog.cpp
msgid "Connect to Script:"
-msgstr ""
+msgstr "Ühenda skriptiga:"
#: editor/connections_dialog.cpp
msgid "From Signal:"
-msgstr ""
+msgstr "Signaalilt:"
#: editor/connections_dialog.cpp
msgid "Scene does not contain any script."
-msgstr ""
+msgstr "Stseen ei sisalda skripti."
#: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp
#: editor/groups_editor.cpp
@@ -2007,15 +1942,15 @@ msgstr "Eemalda"
#: editor/connections_dialog.cpp
msgid "Add Extra Call Argument:"
-msgstr ""
+msgstr "Lisa ekstra kutsumisargument:"
#: editor/connections_dialog.cpp
msgid "Extra Call Arguments:"
-msgstr ""
+msgstr "Ekstra kutsumisargumendid:"
#: editor/connections_dialog.cpp
msgid "Receiver Method:"
-msgstr ""
+msgstr "Vastuvõtjameetod:"
#: editor/connections_dialog.cpp scene/3d/room_manager.cpp
#: servers/visual_server.cpp
@@ -2024,12 +1959,14 @@ msgstr "Täpsem"
#: editor/connections_dialog.cpp
msgid "Deferred"
-msgstr ""
+msgstr "Edasi lükatud"
#: editor/connections_dialog.cpp
msgid ""
"Defers the signal, storing it in a queue and only firing it at idle time."
msgstr ""
+"Lükkab signaali edasi, salvestades selle järjekorda ja väljastab seda ainult "
+"tühikäigul."
#: editor/connections_dialog.cpp scene/resources/texture.cpp
msgid "Oneshot"
@@ -2037,11 +1974,11 @@ msgstr "Ainulaadne"
#: editor/connections_dialog.cpp
msgid "Disconnects the signal after its first emission."
-msgstr ""
+msgstr "Ühendab signaali lahti pärast selle esimest väljastamist."
#: editor/connections_dialog.cpp
msgid "Cannot connect signal"
-msgstr ""
+msgstr "Signaali ei saa ühendada"
#: editor/connections_dialog.cpp editor/dependency_editor.cpp
#: editor/export_template_manager.cpp editor/groups_editor.cpp
@@ -2064,19 +2001,19 @@ msgstr "Ühenda"
#: editor/connections_dialog.cpp
msgid "Signal:"
-msgstr ""
+msgstr "Signaal:"
#: editor/connections_dialog.cpp
msgid "Connect '%s' to '%s'"
-msgstr ""
+msgstr "Ühenda '%s' ja '%s'"
#: editor/connections_dialog.cpp
msgid "Disconnect '%s' from '%s'"
-msgstr ""
+msgstr "Ühenda '%s' ja '%s' lahti"
#: editor/connections_dialog.cpp
msgid "Disconnect all from signal: '%s'"
-msgstr ""
+msgstr "Ühenda kõik lahti signaalist: %s"
#: editor/connections_dialog.cpp
msgid "Connect..."
@@ -2089,45 +2026,45 @@ msgstr "Katkesta ühendus"
#: editor/connections_dialog.cpp
msgid "Connect a Signal to a Method"
-msgstr ""
+msgstr "Signaali ühendamine meetodiga"
#: editor/connections_dialog.cpp
msgid "Edit Connection:"
-msgstr ""
+msgstr "Muuda ühendust:"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from the \"%s\" signal?"
msgstr ""
+"Kas olete kindel, et soovite eemaldada kõik ühendused signaalist \"%s\"?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
msgstr "Signaalid"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Filter signals"
-msgstr "Filtreeri sõlmed"
+msgstr "Filtreeri signaale"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from this signal?"
msgstr ""
+"Kas olete kindel, et soovite sellest signaalist kõik ühendused eemaldada?"
#: editor/connections_dialog.cpp
msgid "Disconnect All"
-msgstr ""
+msgstr "Ühenda kõik lahti"
#: editor/connections_dialog.cpp
msgid "Edit..."
msgstr "Muuda..."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go to Method"
-msgstr "Mine järmisesse kausta."
+msgstr "Mine meetodi juurde"
#: editor/create_dialog.cpp
msgid "Change %s Type"
-msgstr ""
+msgstr "Muuda %s tüüpi"
#: editor/create_dialog.cpp editor/project_settings_editor.cpp
msgid "Change"
@@ -2135,15 +2072,15 @@ msgstr "Muuda"
#: editor/create_dialog.cpp
msgid "Create New %s"
-msgstr ""
+msgstr "Loo uus %s"
#: editor/create_dialog.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "No results for \"%s\"."
-msgstr ""
+msgstr "Päringule \"%s\" pole tulemusi."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "%s jaoks kirjeldus puudub."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -2177,23 +2114,27 @@ msgstr "Kirjeldus:"
#: editor/dependency_editor.cpp
msgid "Search Replacement For:"
-msgstr ""
+msgstr "Otsi asendust järgnevale:"
#: editor/dependency_editor.cpp
msgid "Dependencies For:"
-msgstr ""
+msgstr "Sõltuvused järgneva jaoks:"
#: editor/dependency_editor.cpp
msgid ""
"Scene '%s' is currently being edited.\n"
"Changes will only take effect when reloaded."
msgstr ""
+"Stseeni '%s' redigeeritakse praegu.\n"
+"Muudatused jõustuvad ainult uuesti laadimisel."
#: editor/dependency_editor.cpp
msgid ""
"Resource '%s' is in use.\n"
"Changes will only take effect when reloaded."
msgstr ""
+"Ressurss '%s' on kasutusel.\n"
+"Muudatused jõustuvad ainult uuesti laadimisel."
#: editor/dependency_editor.cpp
#: modules/gdnative/gdnative_library_editor_plugin.cpp
@@ -2206,15 +2147,15 @@ msgstr "Sõltuvused:"
#: editor/dependency_editor.cpp
msgid "Fix Broken"
-msgstr ""
+msgstr "Paranda katkised"
#: editor/dependency_editor.cpp
msgid "Dependency Editor"
-msgstr ""
+msgstr "Sõltuvuste toimeti"
#: editor/dependency_editor.cpp
msgid "Search Replacement Resource:"
-msgstr ""
+msgstr "Otsi asendusressurssi:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
@@ -2228,7 +2169,7 @@ msgstr "Ava"
#: editor/dependency_editor.cpp
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "Omanikud: %s (Kokku: %d)"
#: editor/dependency_editor.cpp
msgid ""
@@ -2236,6 +2177,9 @@ msgid ""
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
+"Kas eemaldada valitud failid projektist? (Ei saa tagasi võtta.)\n"
+"Sõltuvalt teie failisüsteemi konfiguratsioonist teisaldatakse failid "
+"süsteemi prügikasti või kustutatakse jäädavalt."
#: editor/dependency_editor.cpp
msgid ""
@@ -2245,46 +2189,50 @@ msgid ""
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
+"Eemaldatavaid faile vajavad toimimiseks muud ressursid.\n"
+"Eemaldage need ikkagi? (Ei saa tagasi võtta.)\n"
+"Sõltuvalt teie failisüsteemi konfiguratsioonist teisaldatakse failid "
+"süsteemi prügikasti või kustutatakse jäädavalt."
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
-msgstr ""
+msgstr "Ei saa eemaldada:"
#: editor/dependency_editor.cpp
msgid "Error loading:"
-msgstr ""
+msgstr "Viga laadimisel:"
#: editor/dependency_editor.cpp
msgid "Load failed due to missing dependencies:"
-msgstr ""
+msgstr "Laadimine ebaõnnestus puuduvate sõltuvuste tõttu:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
msgid "Open Anyway"
-msgstr ""
+msgstr "Ava ikkagi"
#: editor/dependency_editor.cpp
msgid "Which action should be taken?"
-msgstr ""
+msgstr "Mida tuleks teha?"
#: editor/dependency_editor.cpp
msgid "Fix Dependencies"
-msgstr ""
+msgstr "Paranda sõltuvused"
#: editor/dependency_editor.cpp
msgid "Errors loading!"
-msgstr ""
+msgstr "Laadimisel ilmnesid vead!"
#: editor/dependency_editor.cpp
msgid "Permanently delete %d item(s)? (No undo!)"
-msgstr ""
+msgstr "Kas kustutada jäädavalt %d üksus(t)? (Ei saa tagasi võtta!)"
#: editor/dependency_editor.cpp
msgid "Show Dependencies"
-msgstr ""
+msgstr "Näita sõltuvusi"
#: editor/dependency_editor.cpp
msgid "Orphan Resource Explorer"
-msgstr ""
+msgstr "Orbressursside haldur"
#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
@@ -2296,19 +2244,19 @@ msgstr "Kustuta"
#: editor/dependency_editor.cpp
msgid "Owns"
-msgstr ""
+msgstr "Omab"
#: editor/dependency_editor.cpp
msgid "Resources Without Explicit Ownership:"
-msgstr ""
+msgstr "Ressursid ilma selge omandiõiguseta:"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Key"
-msgstr ""
+msgstr "Muuda sõnastiku võtit"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Value"
-msgstr ""
+msgstr "Muuda sõnastiku väärtust"
#: editor/editor_about.cpp
msgid "Thanks from the Godot community!"
@@ -2332,10 +2280,9 @@ msgstr "Juhtiv arendaja"
#. TRANSLATORS: This refers to a job title.
#: editor/editor_about.cpp
-#, fuzzy
msgctxt "Job Title"
msgid "Project Manager"
-msgstr "projektihaldur"
+msgstr "Projekti juht"
#: editor/editor_about.cpp
msgid "Developers"
@@ -2415,35 +2362,35 @@ msgstr "Litsensid"
#: editor/editor_asset_installer.cpp
msgid "Error opening asset file for \"%s\" (not in ZIP format)."
-msgstr ""
+msgstr "Viga varade faili \"%s\" avamisel (pole ZIP-formaadis)."
#: editor/editor_asset_installer.cpp
msgid "%s (already exists)"
-msgstr ""
+msgstr "%s (juba olemas)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
-msgstr ""
+msgstr "Vara \"%s\" - %d faili(de) sisu on vastuolus teie projektiga:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
-msgstr ""
+msgstr "Vara \"%s\" sisu - ükski fail ei ole teie projektiga vastuolus:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
-msgstr ""
+msgstr "Varade lahtipakkimine"
#: editor/editor_asset_installer.cpp
msgid "The following files failed extraction from asset \"%s\":"
-msgstr ""
+msgstr "Järgmised failid ebaõnnestusid varast \"%s\" väljavõtmisel:"
#: editor/editor_asset_installer.cpp
msgid "(and %s more files)"
-msgstr ""
+msgstr "(ja veel %s faili)"
#: editor/editor_asset_installer.cpp
msgid "Asset \"%s\" installed successfully!"
-msgstr ""
+msgstr "Vara \"%s\" paigaldatud edukalt!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -2455,9 +2402,8 @@ msgid "Install"
msgstr "Paigalda"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset Installer"
-msgstr "Paigalda"
+msgstr "Varade paigaldaja"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -2469,19 +2415,19 @@ msgstr "Lisa efekt"
#: editor/editor_audio_buses.cpp
msgid "Rename Audio Bus"
-msgstr ""
+msgstr "Nimeta ümber audiosiin"
#: editor/editor_audio_buses.cpp
msgid "Change Audio Bus Volume"
-msgstr ""
+msgstr "Muuda audiosiini helitugevust"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Solo"
-msgstr ""
+msgstr "Lülita audiosiini soolo sisse/välja"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Mute"
-msgstr ""
+msgstr "Lülita helisiini vaigistamine sisse/välja"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Bypass Effects"
@@ -2505,7 +2451,7 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Drag & drop to rearrange."
-msgstr ""
+msgstr "Ümberkorraldamiseks lohistage."
#: editor/editor_audio_buses.cpp
msgid "Solo"
@@ -2520,9 +2466,8 @@ msgid "Bypass"
msgstr "Jäta vahele"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bus Options"
-msgstr "Klassi valikud"
+msgstr "Siinivalikud"
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/project_export.cpp editor/scene_tree_dock.cpp
@@ -2535,23 +2480,23 @@ msgstr "Lähtesta valjus"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
-msgstr ""
+msgstr "Kustuta efekt"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus"
-msgstr ""
+msgstr "Lisa audiosiin"
#: editor/editor_audio_buses.cpp
msgid "Master bus can't be deleted!"
-msgstr ""
+msgstr "Põhisiini ei saa kustutada!"
#: editor/editor_audio_buses.cpp
msgid "Delete Audio Bus"
-msgstr ""
+msgstr "Kustuta audiosiin"
#: editor/editor_audio_buses.cpp
msgid "Duplicate Audio Bus"
-msgstr ""
+msgstr "Duplikeeri audiosiin"
#: editor/editor_audio_buses.cpp
msgid "Reset Bus Volume"
@@ -2559,15 +2504,15 @@ msgstr "Lähtesta siini valjus"
#: editor/editor_audio_buses.cpp
msgid "Move Audio Bus"
-msgstr ""
+msgstr "Liiguta audiosiin"
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As..."
-msgstr ""
+msgstr "Salvesta audiosiini paigutus kui..."
#: editor/editor_audio_buses.cpp
msgid "Location for New Layout..."
-msgstr ""
+msgstr "Uue paigutuse asukoht..."
#: editor/editor_audio_buses.cpp
msgid "Open Audio Bus Layout"
@@ -2578,9 +2523,8 @@ msgid "There is no '%s' file."
msgstr "Faili '%s' ei ole eksisteeri."
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Layout:"
-msgstr "Paigutus"
+msgstr "Paigutus:"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -2629,9 +2573,8 @@ msgid "Create a new Bus Layout."
msgstr "Loo uus siini paigutus."
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Audio Bus Layout"
-msgstr "Ava heliliinide paigutus"
+msgstr "Audiosiini paigutus"
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
@@ -2639,7 +2582,7 @@ msgstr "Vigane nimi."
#: editor/editor_autoload_settings.cpp
msgid "Cannot begin with a digit."
-msgstr ""
+msgstr "Ei saa alata numbriga."
#: editor/editor_autoload_settings.cpp
msgid "Valid characters:"
@@ -2651,11 +2594,11 @@ msgstr "Ei tohi kokkupõrkuda mängumootori juba olemasoleva klassi nimega."
#: editor/editor_autoload_settings.cpp
msgid "Must not collide with an existing built-in type name."
-msgstr ""
+msgstr "Ei tohi põrkuda olemasoleva sisse-ehitatud tüübinimega."
#: editor/editor_autoload_settings.cpp
msgid "Must not collide with an existing global constant name."
-msgstr ""
+msgstr "Ei tohi põrkuda olemasoleva globaalse konstandi nimega."
#: editor/editor_autoload_settings.cpp
msgid "Keyword cannot be used as an autoload name."
@@ -2663,11 +2606,11 @@ msgstr "Võtmesõnu ei saa kasutada automaatsete nimedena."
#: editor/editor_autoload_settings.cpp
msgid "Autoload '%s' already exists!"
-msgstr ""
+msgstr "Automaatlaadimine '%s' on juba olemas!"
#: editor/editor_autoload_settings.cpp
msgid "Rename Autoload"
-msgstr ""
+msgstr "Nimeta automaatlaadimine ümber"
#: editor/editor_autoload_settings.cpp
msgid "Toggle AutoLoad Globals"
@@ -2675,11 +2618,11 @@ msgstr ""
#: editor/editor_autoload_settings.cpp
msgid "Move Autoload"
-msgstr ""
+msgstr "Liiguta automaatlaadimist"
#: editor/editor_autoload_settings.cpp
msgid "Remove Autoload"
-msgstr ""
+msgstr "Eemalda automaatlaadimine"
#: editor/editor_autoload_settings.cpp editor/editor_plugin_settings.cpp
#: modules/gdscript/gdscript.cpp platform/android/export/export_plugin.cpp
@@ -2692,31 +2635,30 @@ msgstr "Luba"
#: editor/editor_autoload_settings.cpp
msgid "Rearrange Autoloads"
-msgstr ""
+msgstr "Paiguta automaatlaadimised ümber"
#: editor/editor_autoload_settings.cpp
msgid "Can't add autoload:"
-msgstr ""
+msgstr "Ei saa lisada automaatlaadimist:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "%s is an invalid path. File does not exist."
-msgstr "Faili ei ole olemas."
+msgstr "%s on kehtetu failitee. Faili pole olemas."
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
-msgstr ""
+msgstr "%s on kehtetu failitee. Ei ole ressursiteel (res://)."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
-msgstr ""
+msgstr "Lisa automaatlaadimine"
#: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp
#: editor/editor_plugin_settings.cpp
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/script_create_dialog.cpp scene/gui/file_dialog.cpp
msgid "Path:"
-msgstr "Tee:"
+msgstr "Failitee:"
#: editor/editor_autoload_settings.cpp
msgid "Node Name:"
@@ -2724,7 +2666,7 @@ msgstr "Sõlme nimi:"
#: editor/editor_autoload_settings.cpp
msgid "Global Variable"
-msgstr ""
+msgstr "Globaalne muutuja"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -2732,11 +2674,11 @@ msgstr "Kleebi parameetrid"
#: editor/editor_data.cpp
msgid "Updating Scene"
-msgstr "Värskendan stseeni"
+msgstr "Stseeni värskendamine"
#: editor/editor_data.cpp
msgid "Storing local changes..."
-msgstr "Salvestan kohalikud muudatused..."
+msgstr "Kohalike muudatuste salvestamine..."
#: editor/editor_data.cpp
msgid "Updating scene..."
@@ -2754,11 +2696,11 @@ msgstr "[salvestamata]"
#: editor/editor_dir_dialog.cpp
msgid "Please select a base directory first."
-msgstr "Palun valige kõigepealt baaskataloog."
+msgstr "Palun valige kõigepealt baaskaust."
#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
-msgstr "Vali kataloog"
+msgstr "Valige kaust"
#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp editor/project_manager.cpp
@@ -2785,20 +2727,19 @@ msgstr "Vali"
#: editor/editor_export.cpp
msgid "Project export for platform:"
-msgstr ""
+msgstr "Projekti eksportimine platvormi jaoks:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed with warnings."
-msgstr "Kopeeri sõlme tee"
+msgstr "Lõpetas koos hoiatustega."
#: editor/editor_export.cpp
msgid "Completed successfully."
-msgstr ""
+msgstr "Lõpetas edukalt."
#: editor/editor_export.cpp
msgid "Failed."
-msgstr ""
+msgstr "Ebaõnnestus."
#: editor/editor_export.cpp
msgid "Storing File:"
@@ -2813,29 +2754,24 @@ msgid "Packing"
msgstr "Pakin"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Save PCK"
-msgstr "Salvesta kui"
+msgstr "Salvesta PCK"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Cannot create file \"%s\"."
-msgstr "Ei saanud luua kausta."
+msgstr "Ei saa luua faili \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to export project files."
-msgstr "Ei saanud luua kausta."
+msgstr "Projektifailide eksportimine ebaõnnestus."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Can't open file to read from path \"%s\"."
-msgstr "Faili ei saa kirjutamiseks avada:"
+msgstr "Faili ei saa avada lugemiseks teelt \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Save ZIP"
-msgstr "Salvesta kui"
+msgstr "Salvesta ZIP"
#: editor/editor_export.cpp
msgid ""
@@ -2865,22 +2801,20 @@ msgstr ""
"tagasilangemine lubatud”."
#: editor/editor_export.cpp
-#, fuzzy
msgid ""
"Target platform requires 'PVRTC' texture compression for GLES2. Enable "
"'Import Pvrtc' in Project Settings."
msgstr ""
-"Sihtplatvorm nõuab GLES2 jaoks 'ETC' tekstuuri tihendamist. Projekti "
-"seadetes lubage „Impordi ETC”."
+"Sihtplatvorm nõuab GLES2 jaoks 'PVRTC' tekstuuri tihendamist. Projekti "
+"seadetes lubage „Impordi PVRTC”."
#: editor/editor_export.cpp
-#, fuzzy
msgid ""
"Target platform requires 'ETC2' or 'PVRTC' texture compression for GLES3. "
"Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings."
msgstr ""
-"Sihtplatvorm nõuab GLES3 jaoks 'ETC2' tekstuuri tihendamist. Projekti "
-"seadetes lubage „Impordi ETC2”."
+"Sihtplatvorm nõuab GLES3 jaoks \"ETC2\" või \"PVRTC\" tekstuuri tihendamist. "
+"Lubage projekti seadetes \"Impordi Etc 2\" või \"Impordi Pvrtc\"."
#: editor/editor_export.cpp
#, fuzzy
@@ -2890,103 +2824,100 @@ msgid ""
"Enable 'Import Pvrtc' in Project Settings, or disable 'Driver Fallback "
"Enabled'."
msgstr ""
-"Sihtplatvorm nõuab juhi varundamiseks GLES2-ga 'ETC' tekstuuri tihendamist.\n"
-"Lülitage projekti sätetes sisse „Impordi ETC” või keelake „Draiveri "
-"tagasilangemine lubatud”."
+"Sihtplatvorm nõuab 'PVRTC' tekstuuride tihendamist, et draiver saaks tagasi "
+"pöörduda GLES2-le.\n"
+"Lülitage projekti seadetes sisse 'Import Pvrtc' või lülitage välja 'Driver "
+"Fallback Enabled'."
#: 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 "Redaktor"
+msgstr "Kohandatud mall"
#: editor/editor_export.cpp editor/project_export.cpp
#: platform/android/export/export_plugin.cpp platform/iphone/export/export.cpp
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
#: platform/uwp/export/export.cpp
msgid "Release"
-msgstr ""
+msgstr "Avalda"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Binary Format"
-msgstr "Formaat"
+msgstr "Binaarne formaat"
#: editor/editor_export.cpp
msgid "64 Bits"
-msgstr ""
+msgstr "64 bitti"
#: editor/editor_export.cpp
msgid "Embed PCK"
-msgstr ""
+msgstr "Manusta PCK"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Texture Format"
-msgstr "Pööramisrežiim"
+msgstr "Tekstuuriformaat"
#: 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 "Puuduvad BPTC varuvariandid"
#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
-msgstr ""
+msgstr "Kohandatud silumismalli ei leitud."
#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
-msgstr ""
+msgstr "Kohandatud väljalaskemalli ei leitud."
#: editor/editor_export.cpp
msgid "Prepare Template"
-msgstr ""
+msgstr "Malli ettevalmistamine"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "The given export path doesn't exist."
-msgstr ""
+msgstr "Antud eksporditee ei ole olemas."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found: \"%s\"."
-msgstr "Mallifaili ei leitud:"
+msgstr "Mallifaili ei leitud: \"%s\"."
#: editor/editor_export.cpp
msgid "Failed to copy export template."
-msgstr ""
+msgstr "Eksportmalli kopeerimine ebaõnnestus."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
msgid "PCK Embedding"
-msgstr ""
+msgstr "PCK manustamine"
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
-msgstr ""
+msgstr "32-bitise ekspordi puhul ei saa manustatud PCK olla suurem kui 4 GiB."
#: editor/editor_export.cpp
msgid "Convert Text Resources To Binary On Export"
-msgstr ""
+msgstr "Teisenda tekstiressursid eksportimisel binaarseks"
#: editor/editor_feature_profile.cpp
msgid "3D Editor"
@@ -3007,20 +2938,19 @@ msgstr "Stseenipuu redigeerimine"
#: editor/editor_feature_profile.cpp
msgid "Node Dock"
-msgstr ""
+msgstr "Node'i dokk"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "FileSystem Dock"
-msgstr "Failikuvaja"
+msgstr "Failisüsteemi dokk"
#: editor/editor_feature_profile.cpp
msgid "Import Dock"
-msgstr ""
+msgstr "Impordi dokk"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "Võimaldab vaadata ja redigeerida 3D stseene."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
@@ -3439,7 +3369,7 @@ msgstr "Klass:"
#: editor/editor_help.cpp editor/scene_tree_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Inherits:"
-msgstr "Pärib:"
+msgstr "Pärandub:"
#: editor/editor_help.cpp
msgid "Inherited by:"
@@ -3491,7 +3421,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Enumerations"
-msgstr "Loetelu"
+msgstr "Loendused"
#: editor/editor_help.cpp
msgid "Property Descriptions"
@@ -3509,7 +3439,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Method Descriptions"
-msgstr "Meetodi kirjeldused"
+msgstr "Meetodite kirjeldused"
#: editor/editor_help.cpp
msgid ""
@@ -9448,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
@@ -10191,7 +10121,7 @@ msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp modules/csg/csg_shape.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Snap"
-msgstr ""
+msgstr "Naksamine"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Enable Snap"
@@ -10928,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 ""
@@ -12784,9 +12714,10 @@ msgstr "Intervall:"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14157,12 +14088,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -14700,7 +14630,7 @@ msgstr ""
#: editor/project_settings_editor.cpp
msgid "Input Map"
-msgstr ""
+msgstr "Sisendikaart"
#: editor/project_settings_editor.cpp
msgid "Action:"
@@ -14720,7 +14650,7 @@ msgstr ""
#: editor/project_settings_editor.cpp
msgid "Localization"
-msgstr "Tõlked"
+msgstr "Lokaliseerimine"
#: editor/project_settings_editor.cpp
msgid "Translations"
@@ -15448,7 +15378,7 @@ msgstr ""
#: editor/script_create_dialog.cpp
msgid "File does not exist."
-msgstr "Faili ei ole olemas."
+msgstr "Faili pole olemas."
#: editor/script_create_dialog.cpp
msgid "Invalid extension."
@@ -15492,7 +15422,7 @@ msgstr ""
#: editor/script_create_dialog.cpp
msgid "Invalid path."
-msgstr "Kehtetu tee."
+msgstr "Kehtetu failitee."
#: editor/script_create_dialog.cpp
msgid "Invalid class name."
@@ -23190,6 +23120,15 @@ msgstr "Viga:"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Salvestan faili:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
@@ -24597,9 +24536,8 @@ msgid "Draw 2D Outlines"
msgstr ""
#: scene/main/scene_tree.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Reflections"
-msgstr "Kopeeri valik"
+msgstr "Peegeldused"
#: scene/main/scene_tree.cpp
msgid "Atlas Size"
diff --git a/editor/translations/eu.po b/editor/translations/eu.po
index c0f1953269..bfd4302fa8 100644
--- a/editor/translations/eu.po
+++ b/editor/translations/eu.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.
-# Julen Irazoki <rktzbkr.julen@gmail.com>, 2019.
+# Julen Irazoki <rktzbkr.julen@gmail.com>, 2019, 2022.
# Osoitz <oelkoro@gmail.com>, 2019, 2020.
# Erik Zubiria <erik@ezsd.net>, 2021.
# Sergio Varela <sergitroll9@gmail.com>, 2021.
@@ -11,15 +11,15 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2022-05-23 21:52+0000\n"
-"Last-Translator: Gorka Egino <gorkainventor@gmail.com>\n"
+"PO-Revision-Date: 2022-11-06 03:12+0000\n"
+"Last-Translator: Julen Irazoki <rktzbkr.julen@gmail.com>\n"
"Language-Team: Basque <https://hosted.weblate.org/projects/godot-engine/"
"godot/eu/>\n"
"Language: eu\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.13-dev\n"
+"X-Generator: Weblate 4.14.2\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -2064,7 +2064,7 @@ msgstr ""
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
-msgstr ""
+msgstr "Seinaleak"
#: editor/connections_dialog.cpp
msgid "Filter signals"
@@ -3676,7 +3676,7 @@ msgstr ""
#: editor/editor_network_profiler.cpp editor/editor_node.cpp
#: scene/main/node.cpp scene/resources/default_theme/default_theme.cpp
msgid "Node"
-msgstr ""
+msgstr "Nodoa"
#: editor/editor_network_profiler.cpp
msgid "Incoming RPC"
@@ -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 ""
@@ -12662,9 +12662,10 @@ msgstr "Atxikitze aukerak"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14022,12 +14023,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22940,6 +22940,15 @@ msgstr "Ispilua"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Atxikitze ezarpenak"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/extract.py b/editor/translations/extract.py
index 07026baee2..e681bf39f2 100755
--- a/editor/translations/extract.py
+++ b/editor/translations/extract.py
@@ -8,6 +8,7 @@ import re
import shutil
import subprocess
import sys
+from typing import Dict, Tuple
class Message:
@@ -42,7 +43,7 @@ class Message:
return "\n".join(lines)
-messages_map = {} # (id, context) -> Message.
+messages_map: Dict[Tuple[str, str], Message] = {} # (id, context) -> Message.
line_nb = False
@@ -51,11 +52,11 @@ for arg in sys.argv[1:]:
print("Enabling line numbers in the context locations.")
line_nb = True
else:
- os.sys.exit("Non supported argument '" + arg + "'. Aborting.")
+ sys.exit("Non supported argument '" + arg + "'. Aborting.")
if not os.path.exists("editor"):
- os.sys.exit("ERROR: This script should be started from the root of the git repo.")
+ sys.exit("ERROR: This script should be started from the root of the git repo.")
matches = []
@@ -70,17 +71,30 @@ matches.sort()
remaps = {}
remap_re = re.compile(r'^\t*capitalize_string_remaps\["(?P<from>.+)"\] = (String::utf8\()?"(?P<to>.+)"')
+stop_words = set()
+stop_words_re = re.compile(r'^\t*"(?P<word>.+)",')
+is_inside_stop_words = False
with open("editor/editor_property_name_processor.cpp") as f:
for line in f:
- m = remap_re.search(line)
- if m:
- remaps[m.group("from")] = m.group("to")
+ if is_inside_stop_words:
+ m = stop_words_re.search(line)
+ if m:
+ stop_words.add(m.group("word"))
+ else:
+ is_inside_stop_words = False
+ else:
+ m = remap_re.search(line)
+ if m:
+ remaps[m.group("from")] = m.group("to")
+
+ if not is_inside_stop_words and not stop_words:
+ is_inside_stop_words = "stop_words = " in line
main_po = """
# 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.
@@ -146,9 +160,12 @@ capitalize_re = re.compile(r"(?<=\D)(?=\d)|(?<=\d)(?=\D([a-z]|\d))")
def _process_editor_string(name):
# See EditorPropertyNameProcessor::process_string().
capitalized_parts = []
- for segment in name.split("_"):
- if not segment:
+ parts = list(filter(bool, name.split("_"))) # Non-empty only.
+ for i, segment in enumerate(parts):
+ if i > 0 and i + 1 < len(parts) and segment in stop_words:
+ capitalized_parts.append(segment)
continue
+
remapped = remaps.get(segment)
if remapped:
capitalized_parts.append(remapped)
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index 186ab7264e..eb6c113057 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -28,15 +28,17 @@
# 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.
+# 2g.2d.2t <2g.2d.2t@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-09-09 12:36+0000\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"
@@ -45,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.14.1-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -246,7 +248,7 @@ msgstr "اندازهٔ صفحه"
#: core/io/file_access_network.cpp
msgid "Page Read Ahead"
-msgstr ""
+msgstr "صفحه پیش‌رو را بخوانید"
#: core/io/http_client.cpp
msgid "Blocking Mode Enabled"
@@ -257,9 +259,8 @@ msgid "Connection"
msgstr "اتصال"
#: core/io/http_client.cpp
-#, fuzzy
msgid "Read Chunk Size"
-msgstr "خواندن اندازه تکه"
+msgstr "اندازه تکه خواندن"
#: core/io/marshalls.cpp
msgid "Object ID"
@@ -314,9 +315,8 @@ msgid "Data Array"
msgstr "آرایه داده"
#: core/io/stream_peer_ssl.cpp
-#, fuzzy
msgid "Blocking Handshake"
-msgstr "مسدود کردن دست دادن"
+msgstr "مسدود کردن تکان دادن دست"
#: core/io/udp_server.cpp
msgid "Max Pending Connections"
@@ -524,7 +524,7 @@ msgstr "پیام"
#: core/os/input_event.cpp
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
@@ -533,7 +533,6 @@ msgid "Velocity"
msgstr "سرعت"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Instrument"
msgstr "ابزار"
@@ -591,14 +590,12 @@ msgid "Main Scene"
msgstr "صحنهٔ اصلی"
#: core/project_settings.cpp
-#, fuzzy
msgid "Disable stdout"
-msgstr "غیرفعال شده"
+msgstr "stdout غیرفعال شده"
#: core/project_settings.cpp
-#, fuzzy
msgid "Disable stderr"
-msgstr "غیرفعال شده"
+msgstr "stderr غیرفعال شده"
#: core/project_settings.cpp
msgid "Use Hidden Project Data Directory"
@@ -701,9 +698,8 @@ msgid "UI Select"
msgstr "انتخاب رابط کاربری"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Cancel"
-msgstr "لغو"
+msgstr "لغو رابط کاربری"
#: core/project_settings.cpp
#, fuzzy
@@ -827,9 +823,8 @@ msgid "Profiler"
msgstr "پروفایلر"
#: core/project_settings.cpp
-#, fuzzy
msgid "Max Functions"
-msgstr "تغییر نام نقش"
+msgstr "تغییر نام توابع"
#: core/project_settings.cpp scene/3d/vehicle_body.cpp
msgid "Compression"
@@ -841,7 +836,7 @@ msgstr "فرمت‌ها"
#: core/project_settings.cpp
msgid "Zstd"
-msgstr ""
+msgstr "Zstd"
#: core/project_settings.cpp
msgid "Long Distance Matching"
@@ -853,15 +848,15 @@ 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"
@@ -873,7 +868,7 @@ msgstr "ماژول‌ها"
#: core/register_core_types.cpp
msgid "TCP"
-msgstr "تی‌سی‌پی"
+msgstr "TCP"
#: core/register_core_types.cpp
msgid "Connect Timeout Seconds"
@@ -892,9 +887,8 @@ msgid "SSL"
msgstr "SSL"
#: core/register_core_types.cpp main/main.cpp
-#, fuzzy
msgid "Certificates"
-msgstr "خصوصیات"
+msgstr "مدارک"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_resource_picker.cpp
@@ -968,15 +962,13 @@ msgstr "بافرها"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
-#, fuzzy
msgid "Canvas Polygon Buffer Size (KB)"
-msgstr "اندازه بافر پرده چندضعلی (کیلوبایت)"
+msgstr "اندازه بافر پرده چندضلعی (کیلوبایت)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
-#, fuzzy
msgid "Canvas Polygon Index Buffer Size (KB)"
-msgstr "اندازه بافر شاخص پرده چندضعلی (کیلوبایت)"
+msgstr "اندازه بافر شاخص پرده چندضلعی (کیلوبایت)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp
@@ -992,9 +984,8 @@ msgstr "دو بعدی"
#: 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
@@ -1188,9 +1179,8 @@ msgid "Type"
msgstr "تایپ"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "In Handle"
-msgstr "دسته داخل"
+msgstr "در دسته"
#: editor/animation_track_editor.cpp
msgid "Out Handle"
@@ -1603,9 +1593,8 @@ msgid "Add Method Track Key"
msgstr "افزودن تابع کلید میسر"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Method not found in object:"
-msgstr "تابع در شئ یافت نشد: "
+msgstr "تابع در آبجکت یافت نشد:"
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
@@ -1621,7 +1610,7 @@ msgstr "تبدیل"
#: editor/animation_track_editor.cpp editor/editor_help.cpp
msgid "Methods"
-msgstr "روش ها"
+msgstr "روش‌ها"
#: editor/animation_track_editor.cpp
msgid "Bezier"
@@ -2883,9 +2872,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 "عضوها"
+msgstr "قالب شخصی"
#: editor/editor_export.cpp editor/project_export.cpp
#: platform/android/export/export_plugin.cpp platform/iphone/export/export.cpp
@@ -2895,9 +2883,8 @@ msgid "Release"
msgstr "انتشار"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Binary Format"
-msgstr "انتقال را در انیمیشن تغییر بده"
+msgstr "باینری فرمت"
#: editor/editor_export.cpp
msgid "64 Bits"
@@ -2914,7 +2901,7 @@ msgstr "انتخاب حالت"
#: editor/editor_export.cpp
msgid "BPTC"
-msgstr ""
+msgstr "بی‌پی‌تی‌سی (BPTC)"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "S3TC"
@@ -2922,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"
@@ -2950,19 +2937,16 @@ 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
msgid "Failed to copy export template."
-msgstr "نام دارایی ایندکس نامعتبر."
+msgstr "خطا در کپی قالب خروجی."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
@@ -2980,7 +2964,7 @@ msgstr "تبدیل منابع متنی به دوتایی هنگام خروجی"
#: editor/editor_feature_profile.cpp
msgid "3D Editor"
-msgstr "ویرایشگر 3بعدی"
+msgstr "ویرایشگر ۳بعدی"
#: editor/editor_feature_profile.cpp
msgid "Script Editor"
@@ -3000,9 +2984,8 @@ msgid "Node Dock"
msgstr "لنگرگاه گره:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "FileSystem Dock"
-msgstr "سامانه پرونده"
+msgstr "قایل‌سیستم داک"
#: editor/editor_feature_profile.cpp
msgid "Import Dock"
@@ -3190,7 +3173,6 @@ msgid "Select Current Folder"
msgstr "برگزیدن پوشه موجود"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "File exists, overwrite?"
msgstr "فایل وجود دارد، آیا بازنویسی شود؟"
@@ -3278,9 +3260,8 @@ msgid "Mode"
msgstr "حالت"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Current Dir"
-msgstr "دایرکتوری کنونی"
+msgstr "مسیر کنونی"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Current File"
@@ -3399,9 +3380,8 @@ msgid "(Re)Importing Assets"
msgstr "(در حال) وارد کردن دوباره عست ها"
#: editor/editor_file_system.cpp
-#, fuzzy
msgid "Reimport Missing Imported Files"
-msgstr "وارد کردن دوباره فایل های وارد شده ناپیدا"
+msgstr "وارد کردن دوباره فایل های وارد شده پیدانشده"
#: editor/editor_help.cpp scene/2d/camera_2d.cpp scene/gui/control.cpp
#: scene/gui/nine_patch_rect.cpp scene/resources/dynamic_font.cpp
@@ -3450,7 +3430,7 @@ msgstr "رنگ‌ها"
#: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constants"
-msgstr "ثابت ها"
+msgstr "ثابت‌ها"
#: editor/editor_help.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Fonts"
@@ -3467,7 +3447,7 @@ msgstr "استایل‌ها"
#: editor/editor_help.cpp
msgid "Enumerations"
-msgstr "شمارش ها"
+msgstr "شمارش‌ها"
#: editor/editor_help.cpp
msgid "Property Descriptions"
@@ -3478,10 +3458,12 @@ msgid "(value)"
msgstr "(مقدار)"
#: editor/editor_help.cpp
+#, fuzzy
msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"این ویژگی هیچ تعریفی ندارد. لطفا به ما کمک کنید با [color=$color][url=$url]"
#: editor/editor_help.cpp
msgid "Method Descriptions"
@@ -3492,6 +3474,8 @@ msgid ""
"There is currently no description for this method. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"در حال حاضر هیچ توضیحی برای این متد وجود ندارد. لطفاً به ما در [color=$color]"
+"[url=$url]مشارکت در یکی[/url][/color] کمک کنید!"
#: editor/editor_help.cpp editor/editor_settings.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -3764,6 +3748,8 @@ msgid ""
"This resource can't be saved because it does not belong to the edited scene. "
"Make it unique first."
msgstr ""
+"این منبع نمی‌تواند ذخیره شود زیرا به صحنهٔ ویرایش شده تعلق ندارد. ابتدا آن را "
+"منحصر به فرد کنید."
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
msgid "Save Resource As..."
@@ -3795,7 +3781,7 @@ msgstr "پایان غیر منتظرهٔ فایل '%s'."
#: editor/editor_node.cpp
msgid "Missing '%s' or its dependencies."
-msgstr ""
+msgstr "'%s' ناموجود یا وابستگی‌های مربوط به آن وجود ندارد."
#: editor/editor_node.cpp
msgid "Error while loading '%s'."
@@ -3815,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 ""
@@ -3852,11 +3840,11 @@ msgstr "خطا در ذخیره MeshLibrary!"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
-msgstr ""
+msgstr "نمی‌توان TileSet را برای ادغام بارگیری کرد!"
#: editor/editor_node.cpp
msgid "Error saving TileSet!"
-msgstr ""
+msgstr "خطا در ذخیرهٔ TileSet!"
#: editor/editor_node.cpp
msgid ""
@@ -3887,6 +3875,9 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"این منبع متعلق به صحنه‌ای است که ایمپورت شده است، بنابراین قابل ویرایش نیست.\n"
+" لطفاً اسناد مربوط به وارد کردن صحنه‌ها را بخوانید تا این گردش کار را بهتر درک "
+"کنید."
#: editor/editor_node.cpp
msgid ""
@@ -4839,12 +4830,12 @@ msgstr "استخراج پرونده های زیر از بسته بندی انج
#: editor/plugins/shader_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Reload"
-msgstr ""
+msgstr "بارگذاری دوباره"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Resave"
-msgstr ""
+msgstr "ذخیره مجدد"
#: editor/editor_node.cpp
msgid "New Inherited"
@@ -4890,7 +4881,7 @@ msgstr ""
#: editor/editor_node.h
msgid "Warning!"
-msgstr ""
+msgstr "هشدار!"
#: editor/editor_path.cpp
#, fuzzy
@@ -4949,7 +4940,7 @@ msgstr "وضعیت:"
#: editor/editor_profiler.cpp
msgid "Measure:"
-msgstr ""
+msgstr "اندازه گیری:"
#: editor/editor_profiler.cpp
#, fuzzy
@@ -4958,7 +4949,7 @@ msgstr "زمان(s): "
#: editor/editor_profiler.cpp
msgid "Average Time (ms)"
-msgstr ""
+msgstr "زمان متوسط (میلی‌ثانیه)"
#: editor/editor_profiler.cpp
msgid "Frame %"
@@ -4974,7 +4965,7 @@ msgstr ""
#: editor/editor_profiler.cpp
msgid "Self"
-msgstr ""
+msgstr "خود"
#: editor/editor_profiler.cpp
msgid ""
@@ -4998,7 +4989,7 @@ msgstr "فراخوانی"
#: editor/editor_profiler.cpp editor/plugins/script_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
msgid "Debugger"
-msgstr ""
+msgstr "دیباگِر"
#: editor/editor_profiler.cpp
msgid "Profiler Frame History Size"
@@ -5017,7 +5008,7 @@ msgstr "عضوها"
#: editor/editor_properties.cpp editor/script_create_dialog.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "On"
-msgstr ""
+msgstr "روشن"
#: editor/editor_properties.cpp modules/gridmap/grid_map.cpp
#: scene/2d/collision_object_2d.cpp scene/2d/tile_map.cpp
@@ -5032,7 +5023,7 @@ msgstr ""
#: editor/editor_properties.cpp
msgid "[Empty]"
-msgstr ""
+msgstr "[خالی]"
#: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp
msgid "Assign..."
@@ -5069,7 +5060,7 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Size:"
-msgstr ""
+msgstr "اندازه:"
#: editor/editor_properties_array_dict.cpp
msgid "Page:"
@@ -5272,8 +5263,9 @@ msgstr ""
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp
#: scene/register_scene_types.cpp
+#, fuzzy
msgid "Theme"
-msgstr ""
+msgstr "تم"
#: editor/editor_settings.cpp editor/import_dock.cpp
#, fuzzy
@@ -5294,7 +5286,7 @@ msgstr ""
#: editor/editor_settings.cpp scene/resources/environment.cpp
msgid "Contrast"
-msgstr ""
+msgstr "تضاد"
#: editor/editor_settings.cpp
msgid "Relationship Line Opacity"
@@ -5366,7 +5358,7 @@ msgstr ""
#: editor/editor_settings.cpp
msgid "Docks"
-msgstr ""
+msgstr "داک‌ها"
#: editor/editor_settings.cpp
#, fuzzy
@@ -5490,7 +5482,7 @@ msgstr ""
#: editor/editor_settings.cpp
msgid "Appearance"
-msgstr ""
+msgstr "ظاهر"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
#, fuzzy
@@ -5578,8 +5570,9 @@ msgid "Sort Members Outline Alphabetically"
msgstr ""
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
+#, fuzzy
msgid "Cursor"
-msgstr ""
+msgstr "اشاره‌گر"
#: editor/editor_settings.cpp
msgid "Scroll Past End Of File"
@@ -5713,7 +5706,7 @@ msgstr "برداشتن نقطه"
#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
msgid "Shape"
-msgstr ""
+msgstr "شکل"
#: editor/editor_settings.cpp
msgid "Primary Grid Steps"
@@ -5987,8 +5980,9 @@ msgstr ""
#: 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 ""
+msgstr "مستطیل"
#: editor/editor_settings.cpp
#, fuzzy
@@ -5997,7 +5991,7 @@ msgstr "برداشتن موج"
#: editor/editor_settings.cpp platform/android/export/export_plugin.cpp
msgid "Screen"
-msgstr ""
+msgstr "صفحه"
#: editor/editor_settings.cpp
#, fuzzy
@@ -6035,13 +6029,14 @@ msgstr ""
#: editor/editor_settings.cpp
msgid "Host"
-msgstr ""
+msgstr "میزبان"
#: 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
+#, fuzzy
msgid "Port"
-msgstr ""
+msgstr "پورت"
#. TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects.
#: editor/editor_settings.cpp
@@ -6231,7 +6226,7 @@ msgstr "انتخاب گره (ها) برای وارد شدن"
#: editor/editor_sub_scene.cpp editor/project_manager.cpp
msgid "Browse"
-msgstr ""
+msgstr "مرور کردن"
#: editor/editor_sub_scene.cpp
msgid "Scene Path:"
@@ -6409,7 +6404,7 @@ msgstr ""
#: editor/export_template_manager.cpp
msgid "Importing:"
-msgstr ""
+msgstr "وارد کردن:"
#: editor/export_template_manager.cpp
msgid "Remove templates for the version '%s'?"
@@ -6447,7 +6442,7 @@ msgstr ""
#: editor/export_template_manager.cpp
msgid "Uninstall"
-msgstr ""
+msgstr "حذف نصب"
#: editor/export_template_manager.cpp
msgid "Uninstall templates for the current version."
@@ -6535,7 +6530,7 @@ msgstr ""
#: editor/plugins/version_control_editor_plugin.cpp
#: platform/uwp/export/export.cpp platform/windows/export/export.cpp
msgid "Password"
-msgstr ""
+msgstr "گذرواژه"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -6771,7 +6766,7 @@ msgstr ""
#: editor/filesystem_dock.cpp
msgid "Move"
-msgstr ""
+msgstr "حرکت"
#: editor/filesystem_dock.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -6893,7 +6888,7 @@ msgstr "حذف گره(ها)"
#: editor/groups_editor.cpp editor/node_dock.cpp
msgid "Groups"
-msgstr "گروه ها"
+msgstr "گروه‌ها"
#: editor/groups_editor.cpp
msgid "Nodes Not in Group"
@@ -6923,7 +6918,7 @@ msgstr ""
#: editor/import/editor_import_collada.cpp
msgid "Collada"
-msgstr ""
+msgstr "کولادا"
#: editor/import/editor_import_collada.cpp
msgid "Use Ambient"
@@ -6937,7 +6932,7 @@ msgstr "ایجاد پوشه"
#: editor/import/resource_importer_bitmask.cpp
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Threshold"
-msgstr ""
+msgstr "آستانه"
#: editor/import/resource_importer_csv_translation.cpp
#: editor/import/resource_importer_layered_texture.cpp
@@ -6973,14 +6968,13 @@ msgstr ""
#: editor/import/resource_importer_texture.cpp scene/animation/tween.cpp
#: scene/resources/texture.cpp
msgid "Repeat"
-msgstr ""
+msgstr "تکرار"
#: 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 "صافی:"
+msgstr "صافی"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
@@ -6996,7 +6990,7 @@ msgstr ""
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
msgid "sRGB"
-msgstr ""
+msgstr "sRGB"
#: editor/import/resource_importer_layered_texture.cpp
#, fuzzy
@@ -7130,7 +7124,7 @@ msgstr "وارد کردن دوباره"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
msgid "Meshes"
-msgstr ""
+msgstr "مش‌ها"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
@@ -7147,8 +7141,9 @@ msgid "Lightmap Texel Size"
msgstr ""
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
+#, fuzzy
msgid "Skins"
-msgstr ""
+msgstr "پوسته‌ها"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
@@ -7229,7 +7224,7 @@ msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Import Scene"
-msgstr ""
+msgstr "وارد کردن صحنه"
#: editor/import/resource_importer_scene.cpp
msgid "Importing Scene..."
@@ -7265,7 +7260,7 @@ msgstr ""
#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
-msgstr ""
+msgstr "در حال ذخیره..."
#: editor/import/resource_importer_texture.cpp
msgid ""
@@ -7373,7 +7368,7 @@ msgstr ""
#: editor/import/resource_importer_wav.cpp scene/2d/physics_body_2d.cpp
msgid "Force"
-msgstr ""
+msgstr "نیرو"
#: editor/import/resource_importer_wav.cpp
msgid "8 Bit"
@@ -7858,7 +7853,7 @@ msgstr ""
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend:"
-msgstr ""
+msgstr "درآمیختن:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#, fuzzy
@@ -8086,7 +8081,7 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/version_control_editor_plugin.cpp
msgid "New"
-msgstr ""
+msgstr "جدید"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Paste As Reference"
@@ -8132,14 +8127,14 @@ msgstr "چسباندن"
#. TRANSLATORS: Opposite of "Past", refers to a direction in animation onion skinning.
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Future"
-msgstr ""
+msgstr "آینده"
#: editor/plugins/animation_player_editor_plugin.cpp modules/csg/csg_shape.cpp
#: scene/3d/collision_polygon.cpp scene/main/scene_tree.cpp
#: scene/resources/material.cpp scene/resources/primitive_meshes.cpp
#: servers/audio/effects/audio_effect_phaser.cpp
msgid "Depth"
-msgstr ""
+msgstr "عمق"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "1 step"
@@ -8179,7 +8174,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
msgid "Error!"
-msgstr ""
+msgstr "خطا!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Blend Times:"
@@ -8320,7 +8315,7 @@ msgstr ""
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: scene/resources/style_box.cpp scene/resources/visual_shader.cpp
msgid "Blend"
-msgstr ""
+msgstr "درآمیختن"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Auto Restart:"
@@ -8336,12 +8331,12 @@ msgstr ""
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Start!"
-msgstr ""
+msgstr "شروع!"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Amount:"
-msgstr ""
+msgstr "مقدار:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend 0:"
@@ -8427,7 +8422,7 @@ msgstr "ویرایش صافی های گره"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Filters..."
-msgstr ""
+msgstr "فیلتر‌ها:"
#: editor/plugins/asset_library_editor_plugin.cpp scene/main/http_request.cpp
msgid "Use Threads"
@@ -8442,8 +8437,9 @@ msgid "View Files"
msgstr "نمایش پرونده ها"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Download"
-msgstr ""
+msgstr "دانلود"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
@@ -8507,7 +8503,7 @@ msgstr "زمان:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "ناموفق:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
@@ -8515,11 +8511,11 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr ""
+msgstr "انتظار می‌رود:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr ""
+msgstr "گرفته شد:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed SHA-256 hash check"
@@ -8549,8 +8545,9 @@ msgid "Error making request"
msgstr "خطای بارگذاری قلم."
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Idle"
-msgstr ""
+msgstr "بیکار"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
@@ -8559,7 +8556,7 @@ msgstr "نصب کردن"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "تلاش دوباره"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download Error"
@@ -8646,7 +8643,7 @@ msgstr "وارد کردن"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Plugins..."
-msgstr ""
+msgstr "افزونه‌ها..."
#: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp
msgid "Sort:"
@@ -8732,7 +8729,7 @@ msgstr "انتخاب پرونده قالب"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp scene/resources/mesh_library.cpp
msgid "Preview"
-msgstr ""
+msgstr "پیش نمایش"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Configure Snap"
@@ -8752,7 +8749,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "steps"
-msgstr ""
+msgstr "گام‌ها"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Offset:"
@@ -8904,7 +8901,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center"
-msgstr ""
+msgstr "مرکز"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -9249,11 +9246,11 @@ msgstr "پخش سفارشی صحنه"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View"
-msgstr ""
+msgstr "دیدن"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show"
-msgstr ""
+msgstr "نشان دادن"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show When Snapping"
@@ -9261,7 +9258,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Hide"
-msgstr ""
+msgstr "مخفی کردن"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -9496,7 +9493,7 @@ msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp editor/spatial_editor_gizmos.cpp
msgid "Particles"
-msgstr ""
+msgstr "ذرات"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -9554,7 +9551,7 @@ msgstr ""
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat 1"
-msgstr "تخت 1"
+msgstr "تخت ۱"
#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
msgid "Ease In"
@@ -9673,7 +9670,7 @@ msgstr ""
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Items"
-msgstr ""
+msgstr "موارد"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item List Editor"
@@ -9783,7 +9780,7 @@ msgstr ""
#: scene/resources/multimesh.cpp scene/resources/primitive_meshes.cpp
#: scene/resources/texture.cpp
msgid "Mesh"
-msgstr ""
+msgstr "مِش"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Body"
@@ -9989,15 +9986,15 @@ msgstr ""
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "X-Axis"
-msgstr ""
+msgstr "محور X"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Y-Axis"
-msgstr ""
+msgstr "محور Y"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Z-Axis"
-msgstr ""
+msgstr "محور Z"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh Up Axis:"
@@ -10090,7 +10087,7 @@ msgstr ""
#: editor/plugins/particles_editor_plugin.cpp scene/gui/video_player.cpp
msgid "Volume"
-msgstr ""
+msgstr "حجم"
#: editor/plugins/particles_editor_plugin.cpp
#, fuzzy
@@ -10688,7 +10685,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
#, fuzzy
@@ -10767,7 +10764,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
#: editor/script_editor_debugger.cpp
msgid "Continue"
-msgstr ""
+msgstr "ادامه"
#: editor/plugins/script_editor_plugin.cpp
msgid "Keep Debugger Open"
@@ -10822,7 +10819,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "External"
-msgstr ""
+msgstr "خارجی"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
@@ -10937,15 +10934,15 @@ msgstr ""
#: scene/3d/label_3d.cpp scene/gui/label.cpp
#: scene/resources/primitive_meshes.cpp
msgid "Uppercase"
-msgstr ""
+msgstr "حروف بزرگ"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Lowercase"
-msgstr ""
+msgstr "حروف کوچک"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Capitalize"
-msgstr ""
+msgstr "بزرگ کردن حروف"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Syntax Highlighter"
@@ -11100,7 +11097,7 @@ msgstr ""
#: editor/plugins/shader_editor_plugin.cpp scene/resources/material.cpp
msgid "Shader"
-msgstr ""
+msgstr "شیدر"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "This skeleton has no bones, create some children Bone2D nodes."
@@ -11151,7 +11148,7 @@ msgstr "پخش"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orthogonal"
-msgstr ""
+msgstr "قائم"
#: editor/plugins/spatial_editor_plugin.cpp modules/gltf/gltf_camera.cpp
msgid "Perspective"
@@ -11209,9 +11206,9 @@ msgstr ""
#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [auto]"
-msgstr ""
+msgstr " [خودکار]"
-#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#. TRANSLATORS: This will be appended to the view name when Portal Occlusion is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
msgid " [portals active]"
msgstr ""
@@ -11713,11 +11710,11 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Pre"
-msgstr ""
+msgstr "پیش"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Post"
-msgstr ""
+msgstr "پس"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Size"
@@ -11911,7 +11908,7 @@ msgstr "حالت صافی:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
-msgstr ""
+msgstr "سرعت:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
#: modules/gltf/gltf_animation.cpp modules/minimp3/audio_stream_mp3.cpp
@@ -11920,7 +11917,7 @@ msgstr ""
#: modules/stb_vorbis/resource_importer_ogg_vorbis.cpp scene/2d/path_2d.cpp
#: scene/3d/path.cpp scene/resources/animation.cpp scene/resources/material.cpp
msgid "Loop"
-msgstr ""
+msgstr "حلقه"
#: editor/plugins/sprite_frames_editor_plugin.cpp
#, fuzzy
@@ -11988,7 +11985,7 @@ msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "SpriteFrames"
-msgstr ""
+msgstr "فریم های اسپرایت"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Set Region Rect"
@@ -12016,7 +12013,7 @@ msgstr ""
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Step:"
-msgstr "قدم:"
+msgstr "گام:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "TextureRegion"
@@ -13191,9 +13188,10 @@ msgstr "تنها در قسمت انتخاب شده"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13241,8 +13239,9 @@ msgstr "تغییر بده"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/canvas_item.cpp
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/style_box.cpp
+#, fuzzy
msgid "Modulate"
-msgstr ""
+msgstr "تعدیل"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -13354,11 +13353,11 @@ msgstr "انجمن"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Date:"
-msgstr ""
+msgstr "تاریخ:"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Subtitle:"
-msgstr ""
+msgstr "زیرنویس:"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Do you want to remove the %s branch?"
@@ -13397,7 +13396,7 @@ msgstr ""
#: editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Passphrase"
-msgstr ""
+msgstr "عبارت عبور SSH"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -13500,7 +13499,7 @@ msgstr ""
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Modified"
-msgstr ""
+msgstr "تغییر کرده"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -13519,7 +13518,7 @@ msgstr "تغییر بده"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Unmerged"
-msgstr ""
+msgstr "ترکیب نشده"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -13533,7 +13532,7 @@ msgstr "ویرایش منحنی گره"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Unified"
-msgstr ""
+msgstr "متحد شده"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(GLES3 only)"
@@ -13545,8 +13544,9 @@ msgid "Add Output"
msgstr "خروجی"
#: editor/plugins/visual_shader_editor_plugin.cpp
+#, fuzzy
msgid "Scalar"
-msgstr ""
+msgstr "اسکالر"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector"
@@ -14405,9 +14405,8 @@ msgid "Exporting All"
msgstr "صدور"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export Path"
-msgstr "صدور پروژه"
+msgstr "مسیر خروجی"
#: editor/project_export.cpp
msgid "Presets"
@@ -14618,13 +14617,13 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "ناتوان در گشودن پروژه"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -14941,7 +14940,7 @@ msgstr ""
#: editor/project_settings_editor.cpp
msgid "Key "
-msgstr ""
+msgstr "کلید "
#: editor/project_settings_editor.cpp
msgid "Joy Button"
@@ -14986,7 +14985,7 @@ msgstr "دستگاه"
#: editor/project_settings_editor.cpp
msgid " (Physical)"
-msgstr ""
+msgstr " (فیزیکی)"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key..."
@@ -15187,8 +15186,9 @@ msgid "Input Map"
msgstr ""
#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Action:"
-msgstr ""
+msgstr "عمل:"
#: editor/project_settings_editor.cpp scene/gui/scroll_container.cpp
msgid "Deadzone"
@@ -15196,7 +15196,7 @@ msgstr ""
#: editor/project_settings_editor.cpp
msgid "Device:"
-msgstr ""
+msgstr "دستگاه:"
#: editor/project_settings_editor.cpp
msgid "Index:"
@@ -15268,7 +15268,7 @@ msgstr ""
#: editor/property_editor.cpp
msgid "Zero"
-msgstr ""
+msgstr "صفر"
#: editor/property_editor.cpp
msgid "Easing In-Out"
@@ -15328,11 +15328,11 @@ msgstr "تغییر نام"
#: editor/rename_dialog.cpp
msgid "Prefix:"
-msgstr ""
+msgstr "پیشوند:"
#: editor/rename_dialog.cpp
msgid "Suffix:"
-msgstr ""
+msgstr "پسوند:"
#: editor/rename_dialog.cpp
#, fuzzy
@@ -15642,9 +15642,8 @@ msgid "Make Local"
msgstr "محلی"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "نام گره:"
+msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -15652,9 +15651,8 @@ 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
#, fuzzy
@@ -16004,7 +16002,7 @@ msgstr "خطای بارگذاری قلم."
#: editor/script_create_dialog.cpp
msgid "Overrides"
-msgstr ""
+msgstr "بازنویسی می‌کند"
#: editor/script_create_dialog.cpp
msgid "N/A"
@@ -16105,11 +16103,11 @@ msgstr "برداشتن"
#: editor/script_editor_debugger.cpp
msgid "Bytes:"
-msgstr ""
+msgstr "بایت‌ها:"
#: editor/script_editor_debugger.cpp
msgid "Warning:"
-msgstr ""
+msgstr "هشدار:"
#: editor/script_editor_debugger.cpp
#, fuzzy
@@ -16147,7 +16145,7 @@ msgstr ""
#: editor/script_editor_debugger.cpp
msgid "Errors"
-msgstr ""
+msgstr "خطا‌ها"
#: editor/script_editor_debugger.cpp
#, fuzzy
@@ -16208,11 +16206,11 @@ msgstr "صدور پروژه"
#: editor/script_editor_debugger.cpp
msgid "Monitor"
-msgstr ""
+msgstr "مانیتور"
#: editor/script_editor_debugger.cpp
msgid "Monitors"
-msgstr ""
+msgstr "مانیتور‌ها"
#: editor/script_editor_debugger.cpp
msgid "Pick one or more items from the list to display the graph."
@@ -16224,7 +16222,7 @@ msgstr ""
#: editor/script_editor_debugger.cpp
msgid "Total:"
-msgstr ""
+msgstr "کل:"
#: editor/script_editor_debugger.cpp
#, fuzzy
@@ -16239,15 +16237,15 @@ msgstr ""
#: editor/script_editor_debugger.cpp scene/resources/audio_stream_sample.cpp
#: servers/audio/effects/audio_effect_record.cpp
msgid "Format"
-msgstr ""
+msgstr "قالب"
#: editor/script_editor_debugger.cpp scene/main/viewport.cpp
msgid "Usage"
-msgstr ""
+msgstr "کاربرد:"
#: editor/script_editor_debugger.cpp servers/visual_server.cpp
msgid "Misc"
-msgstr ""
+msgstr "متفرقه"
#: editor/script_editor_debugger.cpp
msgid "Clicked Control:"
@@ -16288,7 +16286,7 @@ msgstr "ویرایشگر ترجیحات"
#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
-msgstr ""
+msgstr "میانبر‌ها"
#: editor/settings_config_dialog.cpp
msgid "Binding"
@@ -16310,7 +16308,7 @@ msgstr ""
#: platform/osx/export/export.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Camera"
-msgstr ""
+msgstr "دوربین"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
@@ -16318,7 +16316,7 @@ msgstr ""
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera Size"
-msgstr ""
+msgstr "تغییر اندازه دوربین"
#: editor/spatial_editor_gizmos.cpp
msgid "Visibility Notifier"
@@ -16351,7 +16349,7 @@ msgstr ""
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Sphere Shape Radius"
-msgstr ""
+msgstr "تغییر شعاع شکل کره"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Box Shape Extents"
@@ -16359,11 +16357,11 @@ msgstr ""
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Radius"
-msgstr ""
+msgstr "تغییر شعاع شکل کپسول"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Capsule Shape Height"
-msgstr ""
+msgstr "تغییر ارتفاع شکل کپسول"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Cylinder Shape Radius"
@@ -16557,7 +16555,7 @@ msgstr ""
#: main/main.cpp
msgid "Driver"
-msgstr ""
+msgstr "درایور"
#: main/main.cpp
#, fuzzy
@@ -16574,7 +16572,7 @@ msgstr ""
#: main/main.cpp
msgid "DPI"
-msgstr ""
+msgstr "دی‌پی‌آی"
#: main/main.cpp
msgid "Allow hiDPI"
@@ -16582,7 +16580,7 @@ msgstr ""
#: main/main.cpp
msgid "V-Sync"
-msgstr ""
+msgstr "وی-سینک"
#: main/main.cpp
msgid "Use V-Sync"
@@ -16594,7 +16592,7 @@ msgstr ""
#: main/main.cpp
msgid "Allowed"
-msgstr ""
+msgstr "مجاز"
#: main/main.cpp
msgid "Intended Usage"
@@ -16653,7 +16651,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"
@@ -16696,7 +16694,7 @@ msgstr ""
#: main/main.cpp
msgid "iOS"
-msgstr ""
+msgstr "آی‌او‌اس"
#: main/main.cpp
msgid "Hide Home Indicator"
@@ -16718,7 +16716,7 @@ msgstr ""
#: main/main.cpp servers/visual_server.cpp
msgid "GLES3"
-msgstr ""
+msgstr "جی‌ال‌ای‌اس‌۳"
#: main/main.cpp servers/visual_server.cpp
#, fuzzy
@@ -16733,7 +16731,7 @@ msgstr ""
#: scene/3d/world_environment.cpp scene/main/scene_tree.cpp
#: scene/resources/world.cpp
msgid "Environment"
-msgstr ""
+msgstr "محیط"
#: main/main.cpp
msgid "Default Clear Color"
@@ -16749,11 +16747,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
@@ -16834,8 +16832,9 @@ msgstr "پیدا کردن نوع گره"
#: main/main.cpp scene/gui/texture_progress.cpp
#: scene/gui/viewport_container.cpp
+#, fuzzy
msgid "Stretch"
-msgstr ""
+msgstr "کشیدن"
#: main/main.cpp
msgid "Aspect"
@@ -16843,7 +16842,7 @@ msgstr ""
#: main/main.cpp
msgid "Shrink"
-msgstr ""
+msgstr "کوچک کردن"
#: main/main.cpp scene/main/scene_tree.cpp
msgid "Auto Accept Quit"
@@ -16930,7 +16929,7 @@ msgstr "اتصال به گره:"
#: scene/resources/navigation_mesh.cpp scene/resources/primitive_meshes.cpp
#: scene/resources/sphere_shape.cpp
msgid "Radius"
-msgstr ""
+msgstr "شعاع"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
msgid "Radial Segments"
@@ -16948,11 +16947,11 @@ msgstr "گام نرم"
#: modules/csg/csg_shape.cpp
msgid "Sides"
-msgstr ""
+msgstr "طرفین"
#: modules/csg/csg_shape.cpp
msgid "Cone"
-msgstr ""
+msgstr "مخروط"
#: modules/csg/csg_shape.cpp
msgid "Inner Radius"
@@ -17116,12 +17115,14 @@ msgid "Double click to create a new entry"
msgstr ""
#: modules/gdnative/gdnative_library_editor_plugin.cpp
+#, fuzzy
msgid "Platform:"
-msgstr ""
+msgstr "سکو:"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
+#, fuzzy
msgid "Platform"
-msgstr ""
+msgstr "سکو"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
#, fuzzy
@@ -17133,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"
@@ -17295,7 +17295,7 @@ msgstr "مگابایت"
#: modules/gltf/gltf_accessor.cpp scene/resources/visual_shader_nodes.cpp
msgid "Max"
-msgstr ""
+msgstr "حداکثر"
#: modules/gltf/gltf_accessor.cpp
#, fuzzy
@@ -17324,7 +17324,7 @@ msgstr ""
#: modules/gltf/gltf_buffer_view.cpp
msgid "Buffer"
-msgstr ""
+msgstr "بافر"
#: modules/gltf/gltf_buffer_view.cpp
#, fuzzy
@@ -17422,7 +17422,7 @@ msgstr "برداشتن نقطه"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
msgid "Roots"
-msgstr ""
+msgstr "ریشه‌ها"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_state.cpp
msgid "Unique Names"
@@ -17485,7 +17485,7 @@ msgstr ""
#: modules/gltf/gltf_state.cpp
msgid "Json"
-msgstr ""
+msgstr "جی‌سان"
#: modules/gltf/gltf_state.cpp
#, fuzzy
@@ -17531,15 +17531,15 @@ 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
msgid "Lights"
-msgstr ""
+msgstr "نور‌ها"
#: modules/gltf/gltf_state.cpp
#, fuzzy
@@ -17580,7 +17580,7 @@ msgstr ""
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Cell"
-msgstr ""
+msgstr "سلول"
#: modules/gridmap/grid_map.cpp
#, fuzzy
@@ -17606,7 +17606,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
@@ -17633,7 +17633,7 @@ msgstr "زبانه قبلی"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "سطح"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
@@ -17866,19 +17866,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 ""
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
@@ -17922,8 +17919,9 @@ msgid "Eroding walkable area..."
msgstr ""
#: modules/navigation/navigation_mesh_generator.cpp
+#, fuzzy
msgid "Partitioning..."
-msgstr ""
+msgstr "تقسیم بندی..."
#: modules/navigation/navigation_mesh_generator.cpp
msgid "Creating contours..."
@@ -17947,11 +17945,11 @@ msgstr ""
#: modules/navigation/navigation_mesh_generator.cpp
msgid "Done!"
-msgstr ""
+msgstr "انجام شد!"
#: modules/opensimplex/noise_texture.cpp
msgid "Seamless"
-msgstr ""
+msgstr "یک‌پارچه"
#: modules/opensimplex/noise_texture.cpp
msgid "As Normal Map"
@@ -17962,8 +17960,9 @@ msgid "Bump Strength"
msgstr ""
#: modules/opensimplex/noise_texture.cpp
+#, fuzzy
msgid "Noise"
-msgstr ""
+msgstr "نویز"
#: modules/opensimplex/noise_texture.cpp
msgid "Noise Offset"
@@ -17975,11 +17974,11 @@ msgstr ""
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Period"
-msgstr ""
+msgstr "دوره"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Persistence"
-msgstr ""
+msgstr "ماندگاری"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Lacunarity"
@@ -17987,7 +17986,7 @@ msgstr ""
#: modules/regex/regex.cpp
msgid "Subject"
-msgstr ""
+msgstr "موضوع"
#: modules/regex/regex.cpp
#, fuzzy
@@ -18456,8 +18455,9 @@ msgid "if (cond) is:"
msgstr ""
#: modules/visual_script/visual_script_flow_control.cpp
+#, fuzzy
msgid "While"
-msgstr ""
+msgstr "هنگامی که"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "while (cond):"
@@ -18488,7 +18488,7 @@ msgstr "تکرارگر نامعتبر شد: "
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Sequence"
-msgstr ""
+msgstr "دنباله"
#: modules/visual_script/visual_script_flow_control.cpp
#, fuzzy
@@ -18584,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
@@ -18649,7 +18648,7 @@ msgstr "آرایه را تغییر اندازه بده"
#: modules/visual_script/visual_script_nodes.cpp scene/resources/material.cpp
#: scene/resources/visual_shader_nodes.cpp
msgid "Operator"
-msgstr ""
+msgstr "عملگر"
#: modules/visual_script/visual_script_nodes.cpp
#, fuzzy
@@ -18734,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."
@@ -18752,13 +18750,12 @@ 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"
-msgstr ""
+msgstr "عنوان"
#: modules/visual_script/visual_script_nodes.cpp
#, fuzzy
@@ -18795,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
@@ -19056,7 +19053,7 @@ msgstr "زبانه قبلی"
#: platform/android/export/export_plugin.cpp
msgid "Code"
-msgstr ""
+msgstr "کد"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
#, fuzzy
@@ -19732,9 +19729,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
@@ -19886,8 +19882,9 @@ msgid "Error starting HTTP server: %d."
msgstr "خطا در بارگذاری:"
#: platform/javascript/export/export.cpp
+#, fuzzy
msgid "Web"
-msgstr ""
+msgstr "وب"
#: platform/javascript/export/export.cpp
msgid "HTTP Host"
@@ -20447,7 +20444,7 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "macOS"
-msgstr ""
+msgstr "مک‌او‌اس"
#: platform/osx/export/export.cpp
msgid "Force Builtin Codesign"
@@ -20520,7 +20517,7 @@ msgstr "انتقال را در انیمیشن تغییر بده"
#: platform/uwp/export/export.cpp
msgid "Landscape"
-msgstr ""
+msgstr "چشم‌انداز"
#: platform/uwp/export/export.cpp
msgid "Portrait"
@@ -20830,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."
@@ -20881,11 +20878,11 @@ msgstr ""
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Monitoring"
-msgstr ""
+msgstr "نظارت"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Monitorable"
-msgstr ""
+msgstr "قابل نظارت"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Physics Overrides"
@@ -20912,7 +20909,7 @@ 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
@@ -20930,7 +20927,7 @@ msgstr "افزودن کانل صوتی"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Override"
-msgstr ""
+msgstr "بازنویسی"
#: scene/2d/audio_stream_player_2d.cpp scene/audio/audio_stream_player.cpp
#: scene/gui/video_player.cpp servers/audio/effects/audio_effect_amplify.cpp
@@ -21639,9 +21636,8 @@ msgid "Filter Smooth"
msgstr "حالت صافی:"
#: scene/2d/light_occluder_2d.cpp
-#, fuzzy
msgid "Closed"
-msgstr "بستن"
+msgstr "بسته"
#: scene/2d/light_occluder_2d.cpp scene/resources/material.cpp
#, fuzzy
@@ -22050,7 +22046,7 @@ msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Damp"
-msgstr ""
+msgstr "مرطوب"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Angular"
@@ -22062,7 +22058,7 @@ msgstr ""
#: scene/2d/physics_body_2d.cpp
msgid "Torque"
-msgstr ""
+msgstr "گشتاور"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Safe Margin"
@@ -22089,7 +22085,7 @@ msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Remainder"
-msgstr ""
+msgstr "باقی مانده"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -22165,7 +22161,7 @@ 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"
@@ -22430,7 +22426,7 @@ msgstr ""
#: scene/3d/audio_stream_player_3d.cpp
msgid "Degrees"
-msgstr ""
+msgstr "درجه"
#: scene/3d/audio_stream_player_3d.cpp
#, fuzzy
@@ -22490,7 +22486,7 @@ msgstr ""
#: scene/3d/baked_lightmap.cpp
msgid "Done"
-msgstr ""
+msgstr "انجام شد"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/reflection_probe.cpp scene/resources/box_shape.cpp
@@ -22591,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
@@ -22851,7 +22847,7 @@ msgstr "انتخاب حالت"
#: scene/3d/label_3d.cpp scene/resources/default_theme/default_theme.cpp
#: scene/resources/dynamic_font.cpp scene/resources/primitive_meshes.cpp
msgid "Font"
-msgstr ""
+msgstr "فونت"
#: scene/3d/label_3d.cpp scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -23548,7 +23544,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,6 +23946,15 @@ msgstr "بازتاب"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "مرتب‌سازی:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
@@ -24250,7 +24255,7 @@ msgstr ""
#: scene/animation/skeleton_ik.cpp
msgid "Magnet"
-msgstr ""
+msgstr "آهن‌ربا"
#: scene/animation/skeleton_ik.cpp
#, fuzzy
@@ -24435,7 +24440,7 @@ msgstr "ثابت"
#: scene/gui/control.cpp scene/resources/visual_shader_nodes.cpp
msgid "Hint"
-msgstr ""
+msgstr "تذکر"
#: scene/gui/control.cpp
#, fuzzy
@@ -24444,7 +24449,7 @@ msgstr "ابزارها"
#: scene/gui/control.cpp scene/resources/default_theme/default_theme.cpp
msgid "Focus"
-msgstr ""
+msgstr "تمرکز"
#: scene/gui/control.cpp
msgid "Neighbour Left"
@@ -24473,7 +24478,7 @@ msgstr "زبانه قبلی"
#: scene/gui/control.cpp
msgid "Mouse"
-msgstr ""
+msgstr "موس"
#: scene/gui/control.cpp
#, fuzzy
@@ -24503,8 +24508,9 @@ msgid "Window Title"
msgstr ""
#: scene/gui/dialogs.cpp
+#, fuzzy
msgid "Dialog"
-msgstr ""
+msgstr "دیالوگ"
#: scene/gui/dialogs.cpp
msgid "Hide On OK"
@@ -24590,7 +24596,7 @@ msgstr ""
#: scene/gui/grid_container.cpp scene/gui/item_list.cpp scene/gui/tree.cpp
msgid "Columns"
-msgstr ""
+msgstr "ستون‌ها"
#: scene/gui/item_list.cpp scene/gui/popup_menu.cpp scene/gui/text_edit.cpp
#: scene/gui/tree.cpp scene/main/viewport.cpp
@@ -24727,15 +24733,15 @@ msgstr "بارگیری به عنوان جانگهدار"
#: scene/gui/line_edit.cpp
msgid "Alpha"
-msgstr ""
+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"
-msgstr ""
+msgstr "پلک"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
#, fuzzy
@@ -24744,7 +24750,7 @@ msgstr "پخش صحنه"
#: scene/gui/link_button.cpp
msgid "Underline"
-msgstr ""
+msgstr "زیرخط"
#: scene/gui/menu_button.cpp
#, fuzzy
@@ -24777,12 +24783,13 @@ msgid ""
msgstr ""
#: scene/gui/popup.cpp
+#, fuzzy
msgid "Popup"
-msgstr ""
+msgstr "پاپ‌آپ"
#: scene/gui/popup.cpp
msgid "Exclusive"
-msgstr ""
+msgstr "انحصاری"
#: scene/gui/popup.cpp
#, fuzzy
@@ -24840,7 +24847,7 @@ msgstr "مقدار:"
#: scene/gui/range.cpp
msgid "Page"
-msgstr ""
+msgstr "صفحه"
#: scene/gui/range.cpp
#, fuzzy
@@ -24965,7 +24972,7 @@ msgstr ""
#: scene/gui/slider.cpp
msgid "Scrollable"
-msgstr ""
+msgstr "قابل اسکرول"
#: scene/gui/slider.cpp
msgid "Tick Count"
@@ -24978,7 +24985,7 @@ msgstr "ساختن پوشه"
#: scene/gui/spin_box.cpp
msgid "Prefix"
-msgstr ""
+msgstr "پیشوند"
#: scene/gui/spin_box.cpp
msgid "Suffix"
@@ -25036,7 +25043,7 @@ msgstr ""
#: scene/gui/text_edit.cpp
msgid "Readonly"
-msgstr ""
+msgstr "فقط خواندنی"
#: scene/gui/text_edit.cpp
msgid "Bookmark Gutter"
@@ -25120,11 +25127,11 @@ msgstr ""
#: scene/gui/texture_progress.cpp
msgid "Under"
-msgstr ""
+msgstr "زیر"
#: scene/gui/texture_progress.cpp
msgid "Over"
-msgstr ""
+msgstr "روی"
#: scene/gui/texture_progress.cpp
#, fuzzy
@@ -25141,8 +25148,9 @@ msgid "Fill Mode"
msgstr "حالت صدور:"
#: scene/gui/texture_progress.cpp scene/resources/material.cpp
+#, fuzzy
msgid "Tint"
-msgstr ""
+msgstr "رنگ"
#: scene/gui/texture_progress.cpp
msgid "Radial Fill"
@@ -25350,7 +25358,7 @@ msgstr "صحنه جدید"
#: scene/main/scene_tree.cpp
msgid "Root"
-msgstr ""
+msgstr "ریشه"
#: scene/main/scene_tree.cpp
#, fuzzy
@@ -25360,7 +25368,7 @@ msgstr "تعیین چندگانه:"
#: scene/main/scene_tree.cpp scene/resources/mesh_library.cpp
#: scene/resources/shape_2d.cpp
msgid "Shapes"
-msgstr ""
+msgstr "شکل‌ها"
#: scene/main/scene_tree.cpp
msgid "Shape Color"
@@ -25482,7 +25490,7 @@ msgstr ""
#: scene/main/viewport.cpp scene/resources/world_2d.cpp
msgid "World"
-msgstr ""
+msgstr "جهان"
#: scene/main/viewport.cpp
msgid "World 2D"
@@ -25651,7 +25659,7 @@ msgstr "گره ترکیب"
#: scene/resources/audio_stream_sample.cpp
msgid "Stereo"
-msgstr ""
+msgstr "استریو"
#: scene/resources/concave_polygon_shape_2d.cpp
#, fuzzy
@@ -26487,11 +26495,11 @@ msgstr "اتصال گره‌ها"
#: scene/resources/environment.cpp
msgid "Background"
-msgstr ""
+msgstr "پس‌زمینه"
#: scene/resources/environment.cpp scene/resources/sky.cpp
msgid "Sky"
-msgstr ""
+msgstr "آسمان"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26532,7 +26540,7 @@ msgstr "انیمیشن"
#: scene/resources/environment.cpp
msgid "Fog"
-msgstr ""
+msgstr "مه"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26605,7 +26613,7 @@ msgstr "خروجی"
#: scene/resources/environment.cpp
msgid "White"
-msgstr ""
+msgstr "سفید"
#: scene/resources/environment.cpp
msgid "Auto Exposure"
@@ -26643,8 +26651,9 @@ msgid "Depth Tolerance"
msgstr "بومی"
#: scene/resources/environment.cpp scene/resources/material.cpp
+#, fuzzy
msgid "Roughness"
-msgstr ""
+msgstr "زبری"
#: scene/resources/environment.cpp
msgid "SSAO"
@@ -26669,7 +26678,7 @@ msgstr ""
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "بلوری"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -26695,7 +26704,7 @@ msgstr ""
#: scene/resources/environment.cpp
msgid "Glow"
-msgstr ""
+msgstr "درخشش"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26756,12 +26765,13 @@ msgid "Bicubic Upscale"
msgstr ""
#: scene/resources/environment.cpp
+#, fuzzy
msgid "Adjustments"
-msgstr ""
+msgstr "تنظیمات"
#: scene/resources/environment.cpp
msgid "Brightness"
-msgstr ""
+msgstr "روشنایی"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26789,8 +26799,9 @@ msgid "Raw Data"
msgstr "صادکردن فایل کتابخانه ای"
#: scene/resources/gradient.cpp
+#, fuzzy
msgid "Offsets"
-msgstr ""
+msgstr "انحراف‌ها"
#: scene/resources/height_map_shape.cpp
msgid "Map Width"
@@ -26942,7 +26953,7 @@ msgstr ""
#: scene/resources/material.cpp
msgid "Metallic"
-msgstr ""
+msgstr "فلزی"
#: scene/resources/material.cpp
#, fuzzy
@@ -27026,7 +27037,7 @@ msgstr "شمارش ها:"
#: scene/resources/material.cpp
msgid "Detail"
-msgstr ""
+msgstr "جزئیات"
#: scene/resources/material.cpp
msgid "UV Layer"
@@ -27203,7 +27214,7 @@ msgstr "حذف قالب"
#: scene/resources/occluder_shape.cpp
msgid "Spheres"
-msgstr ""
+msgstr "کره‌ها"
#: scene/resources/occluder_shape.cpp
msgid "OccluderShapeSphere Set Spheres"
@@ -27225,11 +27236,12 @@ msgstr ""
#: scene/resources/particles_material.cpp
msgid "Trail"
-msgstr ""
+msgstr "دنباله"
#: scene/resources/particles_material.cpp
+#, fuzzy
msgid "Divisor"
-msgstr ""
+msgstr "مقسوم علیه"
#: scene/resources/particles_material.cpp
#, fuzzy
@@ -27273,11 +27285,11 @@ msgstr "ویرایش منحنی گره"
#: scene/resources/physics_material.cpp
msgid "Rough"
-msgstr ""
+msgstr "زبری"
#: scene/resources/physics_material.cpp
msgid "Absorbent"
-msgstr ""
+msgstr "جاذب"
#: scene/resources/plane_shape.cpp
#, fuzzy
@@ -27357,7 +27369,7 @@ msgstr ""
#: scene/resources/sky.cpp
msgid "Panorama"
-msgstr ""
+msgstr "پانوراما"
#: scene/resources/sky.cpp
#, fuzzy
@@ -27385,8 +27397,9 @@ msgid "Sun"
msgstr "اجرا"
#: scene/resources/sky.cpp
+#, fuzzy
msgid "Latitude"
-msgstr ""
+msgstr "عرض"
#: scene/resources/sky.cpp
msgid "Longitude"
@@ -27518,9 +27531,8 @@ msgid "Depth Draw"
msgstr "حالت درون یابی(درون‌یابی روشی است برای یافتن مقدار تابع درون یک بازه)"
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Cull"
-msgstr "انتخاب حالت"
+msgstr "Cull"
#: scene/resources/visual_shader.cpp
#, fuzzy
@@ -27689,21 +27701,21 @@ msgstr ""
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Dry"
-msgstr ""
+msgstr "خشک"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Wet"
-msgstr ""
+msgstr "مرطوب"
#: servers/audio/effects/audio_effect_chorus.cpp
msgid "Voice"
-msgstr ""
+msgstr "صدا"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Delay (ms)"
-msgstr ""
+msgstr "تأخیر (میلی‌ثانیه)"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_phaser.cpp
@@ -27718,14 +27730,13 @@ msgstr "بومی"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Level dB"
-msgstr ""
+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
@@ -27742,7 +27753,7 @@ msgstr ""
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Mix"
-msgstr ""
+msgstr "ترکیب"
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Sidechain"
@@ -27750,17 +27761,17 @@ msgstr ""
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Tap 1"
-msgstr ""
+msgstr "ضربه ۱"
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Tap 2"
-msgstr ""
+msgstr "ضربه ۲"
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_phaser.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Feedback"
-msgstr ""
+msgstr "بازخورد"
#: servers/audio/effects/audio_effect_delay.cpp
#, fuzzy
@@ -28114,7 +28125,7 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Shadows"
-msgstr ""
+msgstr "سایه‌ها"
#: servers/visual_server.cpp
#, fuzzy
@@ -28135,7 +28146,7 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Shading"
-msgstr ""
+msgstr "سایه‌زنی"
#: servers/visual_server.cpp
msgid "Force Vertex Shading"
@@ -28279,7 +28290,7 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Compatibility"
-msgstr ""
+msgstr "سازگاری"
#: servers/visual_server.cpp
msgid "Disable Half Float"
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index c560e51b01..96267c77e3 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -12,13 +12,15 @@
# Tuomas Lähteenmäki <lahtis@gmail.com>, 2019, 2022.
# Matti Niskanen <matti.t.niskanen@gmail.com>, 2020.
# Severi Vidnäs <severi.vidnas@gmail.com>, 2021.
+# Akseli Pihlajamaa <akselijuhanipihlajamaa@gmail.com>, 2022.
+# Hannu Lammi <hpl@kapsi.fi>, 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-03-17 13:58+0000\n"
-"Last-Translator: Tuomas Lähteenmäki <lahtis@gmail.com>\n"
+"PO-Revision-Date: 2022-10-27 01:11+0000\n"
+"Last-Translator: Hannu Lammi <hpl@kapsi.fi>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/"
"godot/fi/>\n"
"Language: fi\n"
@@ -26,30 +28,27 @@ 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.12-dev\n"
+"X-Generator: Weblate 4.14.2-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
msgstr ""
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Clipboard"
-msgstr "Leikepöytä on tyhjä!"
+msgstr "Leikepöytä"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Current Screen"
-msgstr "Nykyinen kohtaus"
+msgstr "Nykyinen näkymä"
#: core/bind/core_bind.cpp
msgid "Exit Code"
-msgstr ""
+msgstr "Poistumiskoodi"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "V-Sync Enabled"
-msgstr "Ota käyttöön"
+msgstr "V-Sync käytössä"
#: core/bind/core_bind.cpp main/main.cpp
msgid "V-Sync Via Compositor"
@@ -60,9 +59,8 @@ msgid "Delta Smoothing"
msgstr ""
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Low Processor Usage Mode"
-msgstr "Siirtotila"
+msgstr "Matala prosessorin käyttötila"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode Sleep (µsec)"
@@ -140,9 +138,8 @@ msgstr "Telakan sijainti"
#: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp
#: scene/resources/style_box.cpp scene/resources/texture.cpp
#: scene/resources/visual_shader.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Size"
-msgstr "Koko:"
+msgstr "Koko"
#: core/bind/core_bind.cpp
msgid "Endian Swap"
@@ -155,7 +152,7 @@ msgstr "Editori"
#: core/bind/core_bind.cpp
msgid "Print Error Messages"
-msgstr ""
+msgstr "Tulosta virheilmoitukset"
#: core/bind/core_bind.cpp
#, fuzzy
@@ -198,7 +195,7 @@ msgstr "Haun tulokset"
#: core/command_queue_mt.cpp core/message_queue.cpp main/main.cpp
msgid "Memory"
-msgstr ""
+msgstr "Muisti"
#: core/command_queue_mt.cpp core/message_queue.cpp
#: core/register_core_types.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp
@@ -461,7 +458,7 @@ msgstr "Fyysinen avain"
#: core/os/input_event.cpp
msgid "Unicode"
-msgstr ""
+msgstr "Unicode"
#: core/os/input_event.cpp
msgid "Echo"
@@ -489,7 +486,7 @@ msgstr "Hiiren painikkeen indeksi:"
#: core/os/input_event.cpp
msgid "Doubleclick"
-msgstr ""
+msgstr "Kaksoisnapsautus"
#: core/os/input_event.cpp
msgid "Tilt"
@@ -513,9 +510,8 @@ msgstr "Suhteellinen tarttuminen"
#: scene/3d/cpu_particles.cpp scene/3d/interpolated_camera.cpp
#: scene/animation/animation_player.cpp scene/resources/environment.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Speed"
-msgstr "Nopeus:"
+msgstr "Nopeus"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: scene/3d/sprite_3d.cpp
@@ -528,9 +524,8 @@ msgid "Axis Value"
msgstr "Kiinnitä arvo"
#: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Index"
-msgstr "Indeksi:"
+msgstr "Indeksi"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: modules/visual_script/visual_script_nodes.cpp
@@ -642,15 +637,15 @@ msgstr "Toimintakyvytön osanen"
#: core/project_settings.cpp
msgid "Use Hidden Project Data Directory"
-msgstr ""
+msgstr "Käytä piilotettua projektin datahakemistoa"
#: core/project_settings.cpp
msgid "Use Custom User Dir"
-msgstr ""
+msgstr "Käytä mukautettua käyttäjähakemistoa"
#: core/project_settings.cpp
msgid "Custom User Dir Name"
-msgstr ""
+msgstr "Mukautetun käyttäjähakemiston nimi"
#: core/project_settings.cpp main/main.cpp
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
@@ -663,7 +658,7 @@ msgstr "Näytä kaikki"
#: 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 "Leveys"
#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp
#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp
@@ -677,7 +672,7 @@ msgstr "Valo"
#: core/project_settings.cpp
msgid "Always On Top"
-msgstr ""
+msgstr "Aina päällimmäisenä"
#: core/project_settings.cpp
#, fuzzy
@@ -821,7 +816,7 @@ msgstr " (fyysinen)"
#: 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
@@ -849,7 +844,7 @@ msgstr "Renderöijä:"
#: scene/resources/multimesh.cpp servers/visual/visual_server_scene.cpp
#: servers/visual_server.cpp
msgid "Quality"
-msgstr ""
+msgstr "Laatu"
#: core/project_settings.cpp scene/gui/file_dialog.cpp
#: scene/main/scene_tree.cpp scene/resources/navigation_mesh.cpp
@@ -918,15 +913,15 @@ 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"
-msgstr ""
+msgstr "Android"
#: core/project_settings.cpp
msgid "Modules"
@@ -934,7 +929,7 @@ msgstr ""
#: core/register_core_types.cpp
msgid "TCP"
-msgstr ""
+msgstr "TCP"
#: core/register_core_types.cpp
#, fuzzy
@@ -951,7 +946,7 @@ msgstr ""
#: 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
@@ -1050,7 +1045,7 @@ msgstr ""
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/visual_server.cpp
msgid "2D"
-msgstr ""
+msgstr "2D"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
@@ -1129,7 +1124,7 @@ msgstr ""
#: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp
msgid "High Quality"
-msgstr ""
+msgstr "Korkea laatu"
#: drivers/gles3/rasterizer_storage_gles3.cpp
msgid "Blend Shape Max Buffer Size (KB)"
@@ -1402,9 +1397,8 @@ msgid "Remove this track."
msgstr "Poista tämä raita."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Time (s):"
-msgstr "Aika (s): "
+msgstr "Aika (s):"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1683,9 +1677,8 @@ msgid "Add Method Track Key"
msgstr "Lisää metodikutsuraidan avainruutu"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Method not found in object:"
-msgstr "Metodia ei löydy objektista: "
+msgstr "Metodia ei löydy objektista:"
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
@@ -1705,7 +1698,7 @@ msgstr "Metodit"
#: editor/animation_track_editor.cpp
msgid "Bezier"
-msgstr ""
+msgstr "Bezier"
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -2860,7 +2853,7 @@ msgstr "Valitse"
#: editor/editor_export.cpp
msgid "Project export for platform:"
-msgstr ""
+msgstr "Projektin vienti alustalle:"
#: editor/editor_export.cpp
#, fuzzy
@@ -2868,14 +2861,12 @@ msgid "Completed with warnings."
msgstr "Kopioi solmun polku"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed successfully."
-msgstr "Paketti asennettu onnistuneesti!"
+msgstr "Paketti asennettu onnistuneesti."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed."
-msgstr "Epäonnistui:"
+msgstr "Epäonnistui."
#: editor/editor_export.cpp
msgid "Storing File:"
@@ -2900,14 +2891,12 @@ msgid "Cannot create file \"%s\"."
msgstr "Kansiota ei voitu luoda."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to export project files."
-msgstr "Ei voitu viedä projektin tiedostoja"
+msgstr "Ei voitu viedä projektin tiedostoja."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Can't open file to read from path \"%s\"."
-msgstr "Ei voida avata tiedostoa kirjoitettavaksi:"
+msgstr "Ei voida avata tiedostoa luettavaksi polulta \"%s\"."
#: editor/editor_export.cpp
#, fuzzy
@@ -2989,7 +2978,7 @@ msgstr "Värioperaattori."
#: editor/editor_export.cpp
msgid "64 Bits"
-msgstr ""
+msgstr "64 bittiä"
#: editor/editor_export.cpp
msgid "Embed PCK"
@@ -3002,19 +2991,19 @@ msgstr "Tekstuurialue"
#: 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
#, fuzzy
@@ -3039,19 +3028,16 @@ msgid "Prepare Template"
msgstr "Hallinnoi malleja"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "The given export path doesn't exist."
-msgstr "Annettu vientipolku ei ole olemassa:"
+msgstr "Annettu vientipolku ei ole olemassa."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found: \"%s\"."
-msgstr "Mallitiedostoa ei löytynyt:"
+msgstr "Mallitiedostoa \"%s\" ei löytynyt."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to copy export template."
-msgstr "Virheellinen vientimalli:"
+msgstr "Vientimallin kopiointi epäonnistui."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
@@ -5256,9 +5242,8 @@ msgid "Size:"
msgstr "Koko:"
#: editor/editor_properties_array_dict.cpp
-#, fuzzy
msgid "Page:"
-msgstr "Sivu: "
+msgstr "Sivu:"
#: editor/editor_properties_array_dict.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -5551,9 +5536,8 @@ msgid "File Dialog"
msgstr "XForm-ikkuna"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Thumbnail Size"
-msgstr "Pienoiskuva..."
+msgstr "Pienoiskuvan koko"
#: editor/editor_settings.cpp
msgid "Docks"
@@ -6215,9 +6199,8 @@ msgid "Auto Save"
msgstr "Jaa automaattisesti"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Save Before Running"
-msgstr "Tallenna kohtaus ennen suorittamista..."
+msgstr "Tallenna kohtaus ennen suorittamista"
#: editor/editor_settings.cpp
#, fuzzy
@@ -6303,9 +6286,8 @@ msgstr "Varastoidaan tiedostoa:"
#: 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 "Virheellinen taustaväri."
+msgstr "Taustaväri"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -8453,9 +8435,8 @@ msgid "Set the end animation. This is useful for sub-transitions."
msgstr "Aseta loppuanimaatio. Tämä on hyödyllistä alisiirtymiä varten."
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition:"
-msgstr "Siirtymä: "
+msgstr "Siirtymä:"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Play Mode:"
@@ -10229,9 +10210,8 @@ msgid "Volume"
msgstr "Tilavuus"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Source:"
-msgstr "Emission lähde: "
+msgstr "Emission lähde:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
@@ -11289,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]"
@@ -11882,19 +11862,16 @@ msgid "Sprite"
msgstr "Sprite"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Simplification:"
-msgstr "Yksinkertaistus: "
+msgstr "Yksinkertaistus:"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Shrink (Pixels):"
-msgstr "Kutista (pikseleissä): "
+msgstr "Kutista (pikseleissä):"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Grow (Pixels):"
-msgstr "Suurrennus (pikseleissä): "
+msgstr "Suurrennus (pikseleissä):"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Update Preview"
@@ -13153,9 +13130,10 @@ msgstr "Tarttumisen asetukset"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Siirtymä:"
@@ -14484,14 +14462,12 @@ msgid "More Info..."
msgstr "Siirrä..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export PCK/Zip..."
-msgstr "Vie PCK/Zip"
+msgstr "Vie PCK/Zip..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export Project..."
-msgstr "Vie projekti"
+msgstr "Vie projekti..."
#: editor/project_export.cpp
msgid "Export All"
@@ -14503,9 +14479,8 @@ msgid "Choose an export mode:"
msgstr "Ole hyvä ja valitse tyhjä kansio."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export All..."
-msgstr "Vie kaikki"
+msgstr "Vie kaikki..."
#: editor/project_export.cpp editor/project_manager.cpp
msgid "ZIP File"
@@ -14589,16 +14564,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Virheellinen projektin polku (muuttuiko mikään?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Tiedoston project.godot lataus projektin polusta epäonnistui (virhe %d). Se "
"saattaa puuttua tai olla vioittunut."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Ei voitu muokata project.godot tiedostoa projektin polussa."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Ei voida avata projektia kohteesta '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -17142,9 +17118,8 @@ msgid "Disabled GDNative Singleton"
msgstr "GDNative singleton on poistettu käytöstä"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
-#, fuzzy
msgid "Libraries:"
-msgstr "Kirjastot: "
+msgstr "Kirjastot:"
#: modules/gdnative/nativescript/nativescript.cpp
#, fuzzy
@@ -18066,18 +18041,16 @@ msgstr ""
"korjaa solmusi."
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Node returned an invalid sequence output:"
-msgstr "Solmu palautti virheellisen jakson tulosteen: "
+msgstr "Solmu palautti virheellisen jakson tulosteen:"
#: modules/visual_script/visual_script.cpp
msgid "Found sequence bit but not the node in the stack, report bug!"
msgstr "Jaksobitti löytyi, mutta solmua ei löydy pinosta, raportoi bugi!"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Stack overflow with stack depth:"
-msgstr "Pinon ylivuoto pinosyvyydellä: "
+msgstr "Pinon ylivuoto pinosyvyydellä:"
#: modules/visual_script/visual_script.cpp
#, fuzzy
@@ -18447,18 +18420,16 @@ msgid "for (elem) in (input):"
msgstr "kullekin (elementille) (syötteessä):"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Input type not iterable:"
-msgstr "Syötetyyppi ei ole iteroitavissa: "
+msgstr "Syötetyyppi ei ole iteroitavissa:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator became invalid"
msgstr "Iteraattori muuttui epäkelvoksi"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Iterator became invalid:"
-msgstr "Iteraattori muuttui epäkelvoksi: "
+msgstr "Iteraattori muuttui epäkelvoksi:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Sequence"
@@ -18616,19 +18587,16 @@ msgstr "Laadi taulukko"
#: modules/visual_script/visual_script_nodes.cpp scene/resources/material.cpp
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Operator"
-msgstr "Iteraattori"
+msgstr "Operaattori"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Invalid argument of type:"
-msgstr ": Virheellinen argumentti tyyppiä: "
+msgstr "Virheellinen argumentti tyyppiä:"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Invalid arguments:"
-msgstr ": Virheelliset argumentit: "
+msgstr "Virheelliset argumentit:"
#: modules/visual_script/visual_script_nodes.cpp
msgid "a if cond, else b"
@@ -18640,14 +18608,12 @@ msgid "Var Name"
msgstr "Nimi"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "VariableGet not found in script:"
-msgstr "VariableGet ei löytynyt skriptistä: "
+msgstr "VariableGet ei löytynyt skriptistä:"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "VariableSet not found in script:"
-msgstr "VariableSet ei löytynyt skriptistä: "
+msgstr "VariableSet ei löytynyt skriptistä:"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Preload"
@@ -19344,15 +19310,13 @@ msgid "Code Signing"
msgstr "Allekirjoitetaan DMG-koodi"
#: 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' ei löydy.\n"
-"Ole hyvä ja tarkista, että komento on saatavilla Android SDK build-tools "
-"hakemistossa.\n"
-"Tuloksena syntynyt %s on allekirjoittamaton."
+"'apksigner' ei löydy. Ole hyvä ja tarkista, että komento on saatavilla "
+"Android SDK build-tools hakemistossa. Tuloksena syntynyt %s on "
+"allekirjoittamaton."
#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
@@ -19367,9 +19331,8 @@ msgid "Could not find keystore, unable to export."
msgstr "Keystorea ei löytynyt, ei voida viedä."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not start apksigner executable."
-msgstr "Aliprosessia ei voitu käynnistää!"
+msgstr "apkgsigner-käynnistystiedostoa ei voitu käynnistää."
#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
@@ -19403,9 +19366,8 @@ msgstr ""
"Virheellinen tiedostonimi! Android APK tarvitsee *.apk tiedostopäätteen."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Unsupported export format!"
-msgstr "Vientiformaatti ei ole tuettu!\n"
+msgstr "Vientiformaatti ei ole tuettu!"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19416,28 +19378,24 @@ msgstr ""
"versiotietoa. Ole hyvä ja uudelleenasenna se 'Projekti'-valikosta."
#: 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 ""
-"Androidin käännösversion epäyhteensopivuus:\n"
-" Malli asennettu: %s\n"
-" Godotin versio: %s\n"
-"Ole hyvä ja uudelleenasenna Androidin käännösmalli 'Projekti'-valikosta."
+"Androidin käännösversion epäyhteensopivuus: Malli asennettu: %s, Godotin "
+"versio: %s. Ole hyvä ja uudelleenasenna Androidin käännösmalli 'Projekti'-"
+"valikosta."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name."
msgstr ""
"Ei voitu ylikirjoittaa res://android/build/res/*.xml tiedostoja projektin "
-"nimellä"
+"nimellä."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files to gradle project."
-msgstr "Ei voitu viedä projektitiedostoja gradle-projektiksi.\n"
+msgstr "Ei voitu viedä projektitiedostoja gradle-projektiksi."
#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
@@ -19448,12 +19406,11 @@ msgid "Building Android Project (gradle)"
msgstr "Käännetään Android-projektia (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 ""
-"Android-projektin käännös epäonnistui, tarkista virhe tulosteesta.\n"
+"Android-projektin käännös epäonnistui, tarkista virhe tulosteesta. "
"Vaihtoehtoisesti, lue docs.godotengine.org sivustolta Androidin "
"käännösdokumentaatio."
@@ -19470,30 +19427,25 @@ msgstr ""
"tulosteet gradle-projektin hakemistosta."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Package not found: \"%s\"."
-msgstr "Pakettia ei löytynyt: %s"
+msgstr "Pakettia ei löytynyt: \"%s\"."
#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr "Luodaan APK:ta..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not find template APK to export: \"%s\"."
-msgstr ""
-"Ei löydetty APK-vientimallia vientiä varten:\n"
-"%s"
+msgstr "Ei löydetty APK-vientimallia vientiä varten: \"%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 ""
-"Vientimalleista puuttuu kirjastoja valituille arkkitehtuureille: %s.\n"
-"Ole hyvä ja kokoa malli, jossa on kaikki tarvittavat kirjastot, tai poista "
+"Vientimalleista puuttuu kirjastoja valituille arkkitehtuureille: %s. Ole "
+"hyvä ja kokoa malli, jossa on kaikki tarvittavat kirjastot, tai poista "
"puuttuvien arkkitehtuurien valinta viennin esiasetuksista."
#: platform/android/export/export_plugin.cpp
@@ -19501,9 +19453,8 @@ msgid "Adding files..."
msgstr "Lisätään tiedostoja..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files."
-msgstr "Ei voitu viedä projektin tiedostoja"
+msgstr "Ei voitu viedä projektin tiedostoja."
#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
@@ -19782,19 +19733,16 @@ msgid "Run exported HTML in the system's default browser."
msgstr "Suorita viety HTML järjestelmän oletusselaimessa."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not open template for export: \"%s\"."
-msgstr "Mallin avaus vientiin epäonnistui:"
+msgstr "Mallin avaus vientiin epäonnistui: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Invalid export template: \"%s\"."
-msgstr "Virheellinen vientimalli:"
+msgstr "Virheellinen vientimalli: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not write file: \"%s\"."
-msgstr "Ei voitu kirjoittaa tiedostoa:"
+msgstr "Ei voitu kirjoittaa tiedostoa: \"%s\"."
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19802,9 +19750,8 @@ msgid "Icon Creation"
msgstr "Aseta marginaali"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file: \"%s\"."
-msgstr "Ei voitu lukea tiedostoa:"
+msgstr "Ei voitu lukea tiedostoa: \"%s\"."
#: platform/javascript/export/export.cpp
msgid "PWA"
@@ -19885,19 +19832,16 @@ msgid "Icon 512 X 512"
msgstr ""
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell: \"%s\"."
-msgstr "Ei voitu lukea HTML tulkkia:"
+msgstr "Ei voitu lukea HTML tulkkia: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not create HTTP server directory: %s."
-msgstr "Ei voitu luoda HTTP-palvelimen hakemistoa:"
+msgstr "Ei voitu luoda HTTP-palvelimen hakemistoa: %s."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server: %d."
-msgstr "Virhe käynnistettäessä HTTP-palvelinta:"
+msgstr "Virhe käynnistettäessä HTTP-palvelinta: %d."
#: platform/javascript/export/export.cpp
msgid "Web"
@@ -20194,9 +20138,8 @@ msgid "Could not open icon file \"%s\"."
msgstr "Ei voitu viedä projektin tiedostoja"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not start xcrun executable."
-msgstr "Aliprosessia ei voitu käynnistää!"
+msgstr "xcrun-käynnistystiedostoa ei voitu käynnistää."
#: platform/osx/export/export.cpp
#, fuzzy
@@ -20283,9 +20226,8 @@ msgid "DMG Creation"
msgstr "Suunnat"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not start hdiutil executable."
-msgstr "Aliprosessia ei voitu käynnistää!"
+msgstr "hkiutil-käynnistystiedostoa ei voitu käynnistää."
#: platform/osx/export/export.cpp
msgid "`hdiutil create` failed - file exists."
@@ -20305,9 +20247,8 @@ msgid "Could not find template app to export: \"%s\"."
msgstr "Ei löydetty app-vientimallia vientiä varten:"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid export format."
-msgstr "Virheellinen vientimalli:"
+msgstr "Virheellinen vientimalli."
#: platform/osx/export/export.cpp
msgid ""
@@ -20372,9 +20313,8 @@ msgid "ZIP Creation"
msgstr "Projekti"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not open file to read from path \"%s\"."
-msgstr "Ei voitu viedä projektitiedostoja gradle-projektiksi.\n"
+msgstr "Ei voitu avata luettavaksi tiedostoa polulta \"%s\"."
#: platform/osx/export/export.cpp
msgid "Invalid bundle identifier:"
@@ -20842,9 +20782,8 @@ msgid "Signtool failed to sign executable: %s."
msgstr "Virheellinen käynnistystiedosto."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Failed to remove temporary file \"%s\"."
-msgstr "Väliaikaista tiedosta ei voida poistaa:"
+msgstr "Väliaikaista tiedosta ei voida poistaa: \"%s\"."
#: platform/windows/export/export.cpp
msgid ""
@@ -21947,9 +21886,8 @@ msgstr "Matkaa"
#: scene/2d/node_2d.cpp scene/2d/polygon_2d.cpp scene/3d/spatial.cpp
#: scene/main/canvas_layer.cpp
-#, fuzzy
msgid "Rotation Degrees"
-msgstr "Kierto %s astetta."
+msgstr "Kierto asteina"
#: scene/2d/node_2d.cpp scene/3d/spatial.cpp
#, fuzzy
@@ -24207,6 +24145,15 @@ msgstr "Virhe"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Lajittele"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -25140,9 +25087,8 @@ msgid "Max Value"
msgstr "Arvo"
#: scene/gui/range.cpp
-#, fuzzy
msgid "Page"
-msgstr "Sivu: "
+msgstr "Sivu"
#: scene/gui/range.cpp
#, fuzzy
@@ -25578,9 +25524,8 @@ msgid "Max Redirects"
msgstr ""
#: scene/main/http_request.cpp
-#, fuzzy
msgid "Timeout"
-msgstr "Aikakatkaisu."
+msgstr "Aikakatkaisu"
#: scene/main/node.cpp
msgid ""
@@ -27048,9 +26993,8 @@ msgid "Distance"
msgstr "Poimintaetäisyys:"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Transition"
-msgstr "Siirtymä: "
+msgstr "Siirtymä"
#: scene/resources/environment.cpp
msgid "DOF Near Blur"
@@ -28404,9 +28348,8 @@ msgid "Physics Engine"
msgstr "Fysiikkaruutujen %"
#: servers/physics_server.cpp
-#, fuzzy
msgid "Center Of Mass"
-msgstr "Keskitä vasemmalle"
+msgstr "Massakeskipiste"
#: servers/physics_server.cpp
msgid "Principal Inertia Axes"
@@ -28462,29 +28405,24 @@ msgid "VRAM Compression"
msgstr "Lauseke"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Import BPTC"
-msgstr "Tuo"
+msgstr "Tuo BPTC"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Import S3TC"
-msgstr "Tuo"
+msgstr "Tuo S3TC"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Import ETC"
-msgstr "Tuo"
+msgstr "Tuo ETC"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Import ETC2"
-msgstr "Tuo"
+msgstr "Tuo ETC2"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Import PVRTC"
-msgstr "Tuo teema"
+msgstr "Tuo PVRTC"
#: servers/visual_server.cpp
msgid "Lossless Compression"
@@ -28615,9 +28553,8 @@ msgid "Ninepatch Mode"
msgstr "Interpolaatiotila"
#: servers/visual_server.cpp
-#, fuzzy
msgid "OpenGL"
-msgstr "Avaa"
+msgstr "OpenGL"
#: servers/visual_server.cpp
msgid "Batching Send Null"
diff --git a/editor/translations/fil.po b/editor/translations/fil.po
index e6d675f5ca..2b6aa3a671 100644
--- a/editor/translations/fil.po
+++ b/editor/translations/fil.po
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2022-08-30 03:11+0000\n"
+"PO-Revision-Date: 2022-12-03 04:48+0000\n"
"Last-Translator: Marco Santos <enum.scima@gmail.com>\n"
"Language-Team: Filipino <https://hosted.weblate.org/projects/godot-engine/"
"godot/fil/>\n"
@@ -21,7 +21,7 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1 && n != 2 && n != 3 && (n % 10 == 4 "
"|| n % 10 == 6 || n % 10 == 9);\n"
-"X-Generator: Weblate 4.14.1-dev\n"
+"X-Generator: Weblate 4.15-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -300,7 +300,7 @@ msgstr "Max na Nakabinbing Koneksyon"
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
msgstr ""
-"Invalid na argumento ng type sa convert(), gumamit ng mga TYPE_* constant."
+"Invalid na type argument sa convert(), gamitin ang mga TYPE_* constant."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
@@ -310,7 +310,7 @@ msgstr "Inaasahan ang isang string na may habang 1 (karakter)."
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr "Kulang sa bytes para i-decode ang bytes, o invalid na format."
+msgstr "Kulang sa espasyo para ma-decode ang bytes, o invalid na format."
#: core/math/expression.cpp
msgid "Invalid input %d (not passed) in expression"
@@ -318,23 +318,23 @@ msgstr "Invalid na input na %d (di pinasa) sa expression"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr "Di magagamit ang self dahil null ang instance (di pinasa)"
+msgstr "Hindi magagamit ang self dahil null ang instance (di pinasa)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
-msgstr "Mga invalid na operand sa operator %s, %s, at %s."
+msgstr "Mga invalid na operand aa operator %s, %s, at %s."
#: core/math/expression.cpp
msgid "Invalid index of type %s for base type %s"
-msgstr "Invalid na index ng type na %s para sa base type na %s"
+msgstr "Invalid na index ng type %s para sa base type %s"
#: core/math/expression.cpp
msgid "Invalid named index '%s' for base type %s"
-msgstr "Invalid na napangalanang index na '%s' para sa base type na %s"
+msgstr "Invalid na may pangalang index '%s' para sa base type %s"
#: core/math/expression.cpp
msgid "Invalid arguments to construct '%s'"
-msgstr "Mga invalid na argumento para i-construct ang '%s'"
+msgstr "Mga invalid na argument para i-construct ang '%s'"
#: core/math/expression.cpp
msgid "On call to '%s':"
@@ -1033,7 +1033,7 @@ msgstr "Max na Laki ng Buffer ng Blend Shape (KB)"
#. TRANSLATORS: Adjective, refers to the mode for Bezier handles (Free, Balanced, Mirror).
#: editor/animation_bezier_editor.cpp
msgid "Free"
-msgstr "Libre"
+msgstr "Malaya"
#: editor/animation_bezier_editor.cpp
msgid "Balanced"
@@ -1053,51 +1053,51 @@ msgstr "Value:"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
-msgstr "Magpasok ng Key Rito"
+msgstr "Mag-key rito"
#: editor/animation_bezier_editor.cpp
msgid "Duplicate Selected Key(s)"
-msgstr "Doblehin ang (mga) Napiling Key"
+msgstr "Doblehin ang (mga) napiling key"
#: editor/animation_bezier_editor.cpp
msgid "Delete Selected Key(s)"
-msgstr "Burahin ang (mga) Napiling Key"
+msgstr "Burahin ang (mga) napiling key"
#: editor/animation_bezier_editor.cpp
msgid "Add Bezier Point"
-msgstr "Magdagdag ng Bezier Point"
+msgstr "Magdagdag ng bezier point"
#: editor/animation_bezier_editor.cpp
msgid "Move Bezier Points"
-msgstr "Maglipat ng (mga) Bezier Point"
+msgstr "Maglipat ng (mga) bezier point"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
-msgstr "Anim Duplicate Keys"
+msgstr "I-anim ang mga key sa pagdoble"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Delete Keys"
-msgstr "Anim Delete Keys"
+msgstr "I-anim ang mga key sa pagbura"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Time"
-msgstr "Anim Change Keyframe Time"
+msgstr "I-anim ang oras ng pagpalit keyframe"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
-msgstr "Anim Change Transition"
+msgstr "I-anim ang pagpalit transition"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
-msgstr "Anim Change Transform"
+msgstr "I-anim ang pagpalit transform"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Value"
-msgstr "Anim Change Keyframe Value"
+msgstr "I-anim ang value ng pagpalit keyframe"
#: editor/animation_track_editor.cpp
msgid "Anim Change Call"
-msgstr "Anim Change Call"
+msgstr "I-anim ang pagpalit call"
#: editor/animation_track_editor.cpp scene/2d/animated_sprite.cpp
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
@@ -1207,36 +1207,36 @@ msgstr "Anim Multi Change Call"
#: editor/animation_track_editor.cpp
msgid "Change Animation Length"
-msgstr "Baguhin ang Haba ng Animation"
+msgstr "Baguhin ang haba ng animation"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr "Baguhin ang Animation Loop"
+msgstr "Baguhin ang loop sa animation"
#: editor/animation_track_editor.cpp
msgid "Property Track"
-msgstr "Property Track"
+msgstr "Katangian"
#: editor/animation_track_editor.cpp
msgid "3D Transform Track"
-msgstr "3D Transform Track"
+msgstr "3D Transform"
#: editor/animation_track_editor.cpp
msgid "Call Method Track"
-msgstr "Call Method Track"
+msgstr "Call Method"
#: editor/animation_track_editor.cpp
msgid "Bezier Curve Track"
-msgstr "Bezier Curve Track"
+msgstr "Kurbang Bezier"
#: editor/animation_track_editor.cpp
msgid "Audio Playback Track"
-msgstr "Audio Playback Track"
+msgstr "Pag-play ng tunog"
#: editor/animation_track_editor.cpp
msgid "Animation Playback Track"
-msgstr "Animation Playback Track"
+msgstr "Pag-play sa animation"
#: editor/animation_track_editor.cpp
msgid "Animation length (frames)"
@@ -1248,28 +1248,28 @@ msgstr "Haba ng animation (segundo)"
#: editor/animation_track_editor.cpp
msgid "Add Track"
-msgstr "Magdagdag ng Track"
+msgstr "Magdagdag ng track"
#: editor/animation_track_editor.cpp
msgid "Animation Looping"
-msgstr "Pag-loop sa Animation"
+msgstr "I-loop ang animation"
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
-msgstr "Mga Function:"
+msgstr "Mga function:"
#: editor/animation_track_editor.cpp
msgid "Audio Clips:"
-msgstr "Mga Audio Clip:"
+msgstr "Mga tunog:"
#: editor/animation_track_editor.cpp
msgid "Anim Clips:"
-msgstr "Mga Anim Clip:"
+msgstr "Mga anim clip:"
#: editor/animation_track_editor.cpp
msgid "Change Track Path"
-msgstr "Baguhin ang Track Path"
+msgstr "Baguhin ang track path"
#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
@@ -1277,15 +1277,15 @@ msgstr "Buksan/isara ang track na ito."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
-msgstr "Update Mode (kung paano itinatakda ang property na ito)"
+msgstr "Update Mode (Kung paano tinakda ang katangian na ito)"
#: editor/animation_track_editor.cpp scene/resources/gradient.cpp
msgid "Interpolation Mode"
-msgstr "Interpolation Mode"
+msgstr "Interpolation"
#: editor/animation_track_editor.cpp
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
-msgstr "Loop Wrap Mode (ini-interpolate ang dulo sa simula ng loop)"
+msgstr "Paikot-ikot (i-interpolate ang dulo sa simula ng loop)"
#: editor/animation_track_editor.cpp
msgid "Remove this track."
@@ -1358,7 +1358,7 @@ msgstr "Mga Anim Clip:"
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
-msgstr "Nakabukas ang Toggle Track"
+msgstr "Nakabukas ang toggle track"
#: editor/animation_track_editor.cpp
msgid "Continuous"
@@ -1378,7 +1378,7 @@ msgstr "I-capture"
#: editor/animation_track_editor.cpp
msgid "Nearest"
-msgstr "Pinakamalapit"
+msgstr "Malapit"
#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
#: editor/property_editor.cpp scene/2d/physics_body_2d.cpp
@@ -1392,20 +1392,20 @@ msgstr "Cubic"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
-msgstr "Clamp Loop Interp"
+msgstr "I-clamp ang loop interp"
#: editor/animation_track_editor.cpp
msgid "Wrap Loop Interp"
-msgstr "Wrap Loop Interp"
+msgstr "I-wrap ang loop interp"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key"
-msgstr "Magpasok ng Key"
+msgstr "Magsingit ng key"
#: editor/animation_track_editor.cpp
msgid "Duplicate Key(s)"
-msgstr "Doblehin ang (mga) Key"
+msgstr "Doblehin ang (mga) key"
#: editor/animation_track_editor.cpp
msgid "Add RESET Value(s)"
@@ -1413,23 +1413,23 @@ msgstr "Magdagdag ng (mga) RESET value"
#: editor/animation_track_editor.cpp
msgid "Delete Key(s)"
-msgstr "Burahin ang (mga) Key"
+msgstr "Burahin ang (mga) key"
#: editor/animation_track_editor.cpp
msgid "Change Animation Update Mode"
-msgstr "Baguhin ang Animation Update Mode"
+msgstr "Baguhin ang pag-update sa animation"
#: editor/animation_track_editor.cpp
msgid "Change Animation Interpolation Mode"
-msgstr "Baguhin ang Animation Interpolation Mode"
+msgstr "Baguhin ang interpolation ng animation"
#: editor/animation_track_editor.cpp
msgid "Change Animation Loop Mode"
-msgstr "Baguhin ang Animation Loop Mode"
+msgstr "Baguhin ang pag-loop sa animation"
#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
-msgstr "Tanggalin ang Anim Track"
+msgstr "Tanggalin ang anim track"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/plugins/path_editor_plugin.cpp
@@ -1448,7 +1448,7 @@ msgstr ""
#. TRANSLATORS: %s will be replaced by a phrase describing the target of track.
#: editor/animation_track_editor.cpp
msgid "Create NEW track for %s and insert key?"
-msgstr ""
+msgstr "Gumawa ng BAGONG track para sa %s at magsingit ng key?"
#: editor/animation_track_editor.cpp
msgid "Create %d NEW tracks and insert keys?"
@@ -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 ""
@@ -12480,9 +12480,10 @@ msgstr "Pag-snap"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13833,12 +13834,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22508,6 +22508,15 @@ msgstr "Salamin"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Pagsasaayos"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index b65ff797d7..f6b1b5d1c9 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -104,13 +104,18 @@
# Helix Sir <vincentbarkmann@gmail.com>, 2022.
# 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, 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-09-02 23:49+0000\n"
-"Last-Translator: DinosaurHorseSword <ewenlandry@mailfence.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"
@@ -118,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-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -150,7 +155,7 @@ msgstr "Lissage de Delta"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode"
-msgstr "Mode d'utilisation faible du processeur"
+msgstr "Mode d'utilisation du processeur bas en ressources"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode Sleep (µsec)"
@@ -244,7 +249,7 @@ msgstr "Cible de FPS"
#: core/bind/core_bind.cpp
msgid "Time Scale"
-msgstr "Echelle de temps"
+msgstr "Échelle de temps"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Physics Jitter Fix"
@@ -323,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"
@@ -331,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"
@@ -594,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
@@ -604,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"
@@ -3903,7 +3908,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Could not save one or more scenes!"
-msgstr "Impossible de sauver la (les) scènes(s) !"
+msgstr "Impossible d'enregistrer la ou les scènes !"
#: editor/editor_node.cpp
msgid "Save All Scenes"
@@ -5903,7 +5908,7 @@ msgstr "Touche de combinaison : Zoom"
#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Warped Mouse Panning"
-msgstr ""
+msgstr "Panoramique déformé de la souris"
#: editor/editor_settings.cpp
msgid "Navigation Feel"
@@ -8840,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"
@@ -11080,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]"
@@ -12940,9 +12945,10 @@ msgstr "Options de magnétisme"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr "Décalage"
@@ -14364,16 +14370,14 @@ msgstr "Chemin de projet non valide (avez-vous changé quelque chose ?)."
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
-"Impossible de charger le fichier project.godot dans le chemin du projet "
-"(erreur %d). Le fichier est manquant ou corrompu."
+"Impossible de charger le project à \"%s\" (erreur %d). Il peut être manquant "
+"ou corrompu."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
-"Impossible de modifier le fichier project.godot dans le chemin du projet."
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Impossible d'enregistrer le projet à \"%s\" (erreur %d)."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15421,19 +15425,16 @@ msgid "Make Local"
msgstr "Rendre local"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "Activer le nom unique de la scène"
+msgstr "Activer le(s) nom(s) unique(s) de scène"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "Un autre Nœud utilise ce nom unique dans la scène."
+msgstr "Noms uniques déjà utilisés par un autre nœud de la scène :"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Disable Scene Unique Name(s)"
-msgstr "Désactiver le nom unique de la scène"
+msgstr "Désactiver le(s) nom(s) unique(s) de la scène"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -16308,9 +16309,8 @@ msgid "Fallback To GLES2"
msgstr "Se replier sur GLES2"
#: main/main.cpp
-#, fuzzy
msgid "Use Nvidia Rect Flicker Workaround"
-msgstr "Utiliser le contournement Nvidia pour éviter le clignotement"
+msgstr "Utiliser la solution alternative Nvidia pour éviter le clignotement"
#: main/main.cpp
msgid "DPI"
@@ -16357,9 +16357,8 @@ msgid "Thread Model"
msgstr "Modèle de Parallélisme"
#: main/main.cpp
-#, fuzzy
msgid "Thread Safe BVH"
-msgstr "BVH avec Thread Sécurisés"
+msgstr "BVH avec le parallélisme sécurisé"
#: main/main.cpp
msgid "Handheld"
@@ -16598,7 +16597,7 @@ msgstr "Activer le support des SoftBody par le Monde"
#: modules/csg/csg_gizmos.cpp
msgid "CSG"
-msgstr ""
+msgstr "GCS"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -16836,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"
@@ -16988,17 +16987,16 @@ msgid "Max"
msgstr "Max"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Sparse Count"
-msgstr "Instance"
+msgstr "Comptage épars"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Buffer View"
-msgstr ""
+msgstr "Affichage tampon des indices épars"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Byte Offset"
-msgstr ""
+msgstr "Décalage d'octet des indices épars"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Component Type"
@@ -17006,11 +17004,11 @@ msgstr "Type de composant d'indices épars"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Values Buffer View"
-msgstr ""
+msgstr "Affichage tampon des valeurs éparses"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Values Byte Offset"
-msgstr ""
+msgstr "Décalage d'octet des valeurs éparses"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Buffer"
@@ -17018,11 +17016,11 @@ msgstr "Tampon"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Byte Length"
-msgstr "Longueur de byte"
+msgstr "Longueur d'octet"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Byte Stride"
-msgstr ""
+msgstr "Foulée d'octet"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Indices"
@@ -17158,7 +17156,7 @@ msgstr "Facteur Spéculaire"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Spec Gloss Img"
-msgstr ""
+msgstr "Img Spéculaire Brillante"
#: modules/gltf/gltf_state.cpp
msgid "Json"
@@ -17242,9 +17240,8 @@ msgid "Physics Material"
msgstr "Matériau physique"
#: modules/gridmap/grid_map.cpp scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Use In Baked Light"
-msgstr "Précalculer les lightmaps"
+msgstr "Utiliser des lumières pré-calculées"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Cell"
@@ -17441,9 +17438,8 @@ msgid "Plotting lightmaps"
msgstr "Tracer des lightmaps"
#: modules/lightmapper_cpu/register_types.cpp
-#, fuzzy
msgid "CPU Lightmapper"
-msgstr "Précalculer les lightmaps"
+msgstr "Mappeur de lumière processeur"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Low Quality Ray Count"
@@ -17509,19 +17505,16 @@ msgid "Auto Update Project"
msgstr "Mettre à jour le projet automatiquement"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Assembly Name"
-msgstr "Afficher le nom"
+msgstr "Nom de l'assembly"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Solution Directory"
-msgstr "Choisir un répertoire"
+msgstr "Choisir un répertoire pour la solution"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "C# Project Directory"
-msgstr "Choisir un répertoire"
+msgstr "Choisir un répertoire pour le projet C#"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
@@ -17644,7 +17637,7 @@ msgstr "Paramètres"
#: modules/upnp/upnp.cpp
msgid "Discover Multicast If"
-msgstr ""
+msgstr "Révéler la multidiffusion si"
#: modules/upnp/upnp.cpp
msgid "Discover Local Port"
@@ -17652,7 +17645,7 @@ msgstr "Révéler le port local"
#: modules/upnp/upnp.cpp
msgid "Discover IPv6"
-msgstr "Découvrir IPv6"
+msgstr "Révéler IPv6"
#: modules/upnp/upnp_device.cpp
msgid "Description URL"
@@ -17672,7 +17665,7 @@ msgstr "Type de service IGD"
#: modules/upnp/upnp_device.cpp
msgid "IGD Our Addr"
-msgstr ""
+msgstr "Notre adresse PGI"
#: modules/upnp/upnp_device.cpp
msgid "IGD Status"
@@ -18049,9 +18042,8 @@ msgid "Return"
msgstr "Retour"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Enabled"
-msgstr "Exécutable"
+msgstr "Retour activé"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Return Type"
@@ -18181,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"
@@ -18312,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."
@@ -18366,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"
@@ -18473,14 +18465,12 @@ msgid "Optional Features"
msgstr "Fonctionnalités Optionnelles"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Requested Reference Space Types"
-msgstr "Type d'espace référence requis"
+msgstr "Types d'espaces référence requis"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Reference Space Type"
-msgstr "Type d'espace référence"
+msgstr "Type d'espace de référence"
#: modules/webxr/webxr_interface.cpp
msgid "Visibility State"
@@ -18491,9 +18481,8 @@ msgid "Bounds Geometry"
msgstr "Géométrie des limites"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "XR Standard Mapping"
-msgstr "Mapping Standard AR/VR"
+msgstr "Mappage Standard XR"
#: platform/android/export/export.cpp
msgid "Android SDK Path"
@@ -18677,24 +18666,20 @@ msgid "Immersive Mode"
msgstr "Mode immersif"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Small"
-msgstr "Support"
+msgstr "Supporte les petits écrans"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Normal"
-msgstr "Support"
+msgstr "Supporte les écrans normaux"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Large"
-msgstr "Support"
+msgstr "Supporte les grands écrans"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Xlarge"
-msgstr "Support"
+msgstr "Supporte les très grands écrans"
#: platform/android/export/export_plugin.cpp
msgid "User Data Backup"
@@ -18713,9 +18698,8 @@ msgid "Extra Args"
msgstr "Arguments Supplémentaires"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "APK Expansion"
-msgstr "Expression"
+msgstr "Expansion APK"
#: platform/android/export/export_plugin.cpp
msgid "Salt"
@@ -19107,7 +19091,7 @@ msgstr "Le caractère « %s » n'est pas autorisé dans l'identifiant."
#: platform/iphone/export/export.cpp
msgid "Landscape Launch Screens"
-msgstr ""
+msgstr "Écrans de lancement en mode paysage"
#: platform/iphone/export/export.cpp
msgid "iPhone 2436 X 1125"
@@ -19284,11 +19268,11 @@ msgstr "Projecteur 80 X 80"
#: platform/iphone/export/export.cpp
msgid "Storyboard"
-msgstr ""
+msgstr "Story-board"
#: platform/iphone/export/export.cpp
msgid "Use Launch Screen Storyboard"
-msgstr ""
+msgstr "Utiliser le storyboard de l'écran de lancement"
#: platform/iphone/export/export.cpp
msgid "Image Scale Mode"
@@ -19311,9 +19295,8 @@ msgid "Custom BG Color"
msgstr "Couleur d'arrière-plan personnalisée"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Icons"
-msgstr "Icône d'exportation"
+msgstr "Exporter les icônes"
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp
@@ -19366,7 +19349,7 @@ msgstr "Impossible de lire le fichier : «%s »."
#: platform/javascript/export/export.cpp
msgid "PWA"
-msgstr ""
+msgstr "PWA"
#: platform/javascript/export/export.cpp
msgid "Variant"
@@ -19402,7 +19385,7 @@ msgstr "Shell HTML personnalisé"
#: platform/javascript/export/export.cpp
msgid "Head Include"
-msgstr ""
+msgstr "Inclure la tête de fichier"
#: platform/javascript/export/export.cpp
msgid "Canvas Resize Policy"
@@ -19410,7 +19393,7 @@ msgstr "Politique de redimensionnement du canevas"
#: platform/javascript/export/export.cpp
msgid "Focus Canvas On Start"
-msgstr ""
+msgstr "Sélectionner le canevas au démarrage"
#: platform/javascript/export/export.cpp
msgid "Experimental Virtual Keyboard"
@@ -19517,9 +19500,8 @@ msgid "Failed to get CodeResources hash."
msgstr "La récupération du hachage de CodeResources a échouée."
#: platform/osx/export/codesign.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid entitlements file."
-msgstr "Extension invalide."
+msgstr "Fichier de permissions invalide."
#: platform/osx/export/codesign.cpp
msgid "Invalid executable file."
@@ -19600,16 +19582,15 @@ msgstr "Horodatage"
#: platform/osx/export/export.cpp
msgid "Hardened Runtime"
-msgstr ""
+msgstr "Environnement d'exécution Renforcé"
#: platform/osx/export/export.cpp
msgid "Replace Existing Signature"
msgstr "Remplacer la signature existante"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Entitlements"
-msgstr "Gadgets"
+msgstr "Permissions"
#: platform/osx/export/export.cpp
msgid "Custom File"
@@ -19620,13 +19601,12 @@ msgid "Allow JIT Code Execution"
msgstr "Autoriser l'exécution du code JIT"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Allow Unsigned Executable Memory"
msgstr "Autoriser la mémoire exécutable non signée"
#: platform/osx/export/export.cpp
msgid "Allow Dyld Environment Variables"
-msgstr ""
+msgstr "Autoriser les variables d'environnement Dyld"
#: platform/osx/export/export.cpp
msgid "Disable Library Validation"
@@ -19677,33 +19657,28 @@ msgid "Device Bluetooth"
msgstr "Périphérique Bluetooth"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Downloads"
msgstr "Téléchargement de fichiers"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Pictures"
-msgstr "Fonctionnalités"
+msgstr "Fichiers Images"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Music"
-msgstr "Fichier"
+msgstr "Fichiers Musicaux"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Movies"
-msgstr "Filtrer les tuiles"
+msgstr "Fichiers Vidéo"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
msgid "Custom Options"
msgstr "Options personnalisées"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization"
-msgstr "Localisation"
+msgstr "Notarisation"
#: platform/osx/export/export.cpp
msgid "Apple ID Name"
@@ -19731,7 +19706,7 @@ msgstr "Notarisation échouée."
#: platform/osx/export/export.cpp
msgid "Notarization request UUID: \"%s\""
-msgstr ""
+msgstr "UUID de la requête de notarisation : \"%s\""
#: platform/osx/export/export.cpp
msgid ""
@@ -19767,10 +19742,12 @@ msgstr ""
msgid ""
"Hardened Runtime is not compatible with ad-hoc signature, and was disabled!"
msgstr ""
+"L'Environnement d'exécution Renforcé n'est pas compatible avec la signature "
+"ad-hoc et a été désactivé !"
#: platform/osx/export/export.cpp
msgid "Built-in CodeSign failed with error \"%s\"."
-msgstr ""
+msgstr "CodeSign intégré a échoué avec l'erreur : \"%s\"."
#: platform/osx/export/export.cpp
msgid "Built-in CodeSign require regex module."
@@ -19928,33 +19905,32 @@ msgid "Notarization: Hardened runtime is required for notarization."
msgstr "Notarisation : exécution renforcée nécessaire pour la notarisation."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization: Timestamp runtime is required for notarization."
-msgstr "Certification : exécution renforcée requise."
+msgstr "Notarisation : Horodatage nécessaire à la notarisation."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID name not specified."
-msgstr "Certification : Identifiant Apple ID non spécifié."
+msgstr "Notarisation : Identifiant Apple ID non spécifié."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID password not specified."
-msgstr "Certification : Mot de passe Apple ID non spécifié."
+msgstr "Notarisation : Mot de passe Apple ID non spécifié."
#: platform/osx/export/export.cpp
msgid ""
"Warning: Notarization is disabled. The exported project will be blocked by "
"Gatekeeper if it's downloaded from an unknown source."
msgstr ""
-"Attention : La certification est désactivé. Le projet exporté sera bloqué "
-"par Gatekeeper si il est téléchargé depuis une source inconnue."
+"Attention : La notarisation est désactivée. Le projet exporté sera bloqué "
+"par Gatekeeper s'il est téléchargé depuis une source inconnue."
#: platform/osx/export/export.cpp
msgid ""
"Code signing is disabled. The exported project will not run on Macs with "
"enabled Gatekeeper and Apple Silicon powered Macs."
msgstr ""
-"La signature du code est désactivé. Le projet exporté ne fonctionnera pas "
-"sur les Macs avec Gatekeeper activé et sous les Macs fonctionnant sous Apple "
+"La signature du code est désactivée. Le projet exporté ne fonctionnera pas "
+"sur les Macs avec Gatekeeper activé ni sur les Macs fonctionnant sous Apple "
"Silicon."
#: platform/osx/export/export.cpp
@@ -19962,12 +19938,14 @@ msgid ""
"Hardened Runtime is not compatible with ad-hoc signature, and will be "
"disabled!"
msgstr ""
+"L'Environnement d'éxécution renforcé n'est pas compatible avec la signature "
+"ad-hoc et va être désactivé !"
#: platform/osx/export/export.cpp
msgid ""
"Timestamping is not compatible with ad-hoc signature, and will be disabled!"
msgstr ""
-"L'horodatage n'est pas compatible avec la signature ad-hoc et a été "
+"L'horodatage n'est pas compatible avec la signature ad-hoc et va être "
"désactivé !"
#: platform/osx/export/export.cpp
@@ -19975,7 +19953,7 @@ msgid ""
"Warning: Notarization is not supported from this OS. The exported project "
"will be blocked by Gatekeeper if it's downloaded from an unknown source."
msgstr ""
-"Attention : La certification n'est pas compatible avec ce système "
+"Attention : La notarisation n'est pas compatible avec ce système "
"d'exploitation. Le projet exporté sera bloqué par Gatekeeper si il est "
"téléchargé depuis une source inconnue."
@@ -19984,7 +19962,7 @@ msgid ""
"Privacy: Microphone access is enabled, but usage description is not "
"specified."
msgstr ""
-"Confidentialité : L'accès au microphone est actif, mais son usage n'a pas "
+"Confidentialité : L'accès au microphone est activé, mais son usage n'a pas "
"été spécifié."
#: platform/osx/export/export.cpp
@@ -20154,6 +20132,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 ""
+"La version Mono de Godot ne supporte pas la plateforme UWP. Utilisé la "
+"version standard (sans le support C#) si vous souhaitez cibler UWP."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -20249,9 +20229,8 @@ msgid "Timestamp Server URL"
msgstr "URL du serveur d'horodatage"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Digest Algorithm"
-msgstr "Débogueur"
+msgstr "Fonction de hachage"
#: platform/windows/export/export.cpp
msgid "Modify Resources"
@@ -20286,25 +20265,22 @@ msgid "Resources Modification"
msgstr "Modification de ressources"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Could not find rcedit executable at \"%s\"."
-msgstr "Impossible de trouver le keystore, impossible d'exporter."
+msgstr "Impossible de trouver rcedit à l'emplacement \"%s\"."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Could not find wine executable at \"%s\"."
-msgstr "Impossible de trouver le keystore, impossible d'exporter."
+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."
@@ -20327,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."
@@ -20371,9 +20346,8 @@ msgid "Windows executables cannot be >= 4 GiB."
msgstr "Les exécutables Windows ne peuvent pas peser >= 4Gio."
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
-#, fuzzy
msgid "Failed to open executable file \"%s\"."
-msgstr "Fichier exécutable invalide."
+msgstr "Fichier exécutable invalide : \"%s\"."
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
msgid "Executable file header corrupted."
@@ -20393,11 +20367,11 @@ msgstr "Rcedit"
#: platform/windows/export/export.cpp
msgid "Osslsigncode"
-msgstr "Osslsigncode"
+msgstr "Code Signature OpenSSL"
#: platform/windows/export/export.cpp
msgid "Wine"
-msgstr "Wine"
+msgstr "Vin"
#: platform/x11/export/export.cpp
msgid "32-bit executables cannot have embedded data >= 4 GiB."
@@ -20476,13 +20450,12 @@ msgid "Gravity"
msgstr "Gravité"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Linear Damp"
-msgstr "Linéaire"
+msgstr "Amorti Linéaire"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Angular Damp"
-msgstr ""
+msgstr "Amorti Angulaire"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Audio Bus"
@@ -20561,9 +20534,8 @@ msgstr "Vue personnalisée"
#: scene/2d/camera_2d.cpp scene/3d/camera.cpp scene/3d/interpolated_camera.cpp
#: scene/animation/animation_player.cpp scene/animation/animation_tree.cpp
#: scene/animation/animation_tree_player.cpp scene/main/timer.cpp
-#, fuzzy
msgid "Process Mode"
-msgstr "Mode déplacement"
+msgstr "Mode de traitement"
#: scene/2d/camera_2d.cpp
msgid "Limit"
@@ -20586,28 +20558,24 @@ msgid "Bottom"
msgstr "Bas"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Smoothed"
-msgstr "Progression douce"
+msgstr "Adouci"
#: scene/2d/camera_2d.cpp
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
-#, fuzzy
msgid "Smoothing"
-msgstr "Progression douce"
+msgstr "Adoucissement"
#: scene/2d/camera_2d.cpp
msgid "H"
@@ -20618,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"
@@ -20631,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
@@ -20670,9 +20636,8 @@ msgid "Visible"
msgstr "Visible"
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Self Modulate"
-msgstr "Peupler"
+msgstr "Auto-modulation"
#: scene/2d/canvas_item.cpp
msgid "Show Behind Parent"
@@ -20844,12 +20809,12 @@ msgstr "FPS fixes"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Fract Delta"
-msgstr ""
+msgstr "Delta Fraction"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Drawing"
-msgstr ""
+msgstr "Dessin"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -20872,9 +20837,8 @@ msgid "Sphere Radius"
msgstr "Rayon de la Sphère"
#: scene/2d/cpu_particles_2d.cpp
-#, fuzzy
msgid "Rect Extents"
-msgstr "Gadgets"
+msgstr "Étendue du rectangle"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
msgid "Normals"
@@ -20986,18 +20950,16 @@ msgid "Angle Curve"
msgstr "Courbe d'angle"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
-#, fuzzy
msgid "Scale Amount"
msgstr "Valeur d'échelle"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
msgid "Scale Amount Random"
-msgstr ""
+msgstr "Valeur d'échelle aléatoire"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
-#, fuzzy
msgid "Scale Amount Curve"
-msgstr "Agrandir/Rétrécir à partir du curseur"
+msgstr "Courbe de valeur d'échelle"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21102,7 +21064,7 @@ msgstr "Décalage initial"
#: scene/2d/joints_2d.cpp scene/3d/vehicle_body.cpp
msgid "Rest Length"
-msgstr ""
+msgstr "Longueur au repos"
#: scene/2d/joints_2d.cpp scene/3d/physics_joint.cpp scene/3d/vehicle_body.cpp
msgid "Stiffness"
@@ -21148,7 +21110,7 @@ msgstr "Calque max"
#: scene/2d/light_2d.cpp
msgid "Item Cull Mask"
-msgstr ""
+msgstr "Masque d'élagage d'élément"
#: scene/2d/light_2d.cpp scene/3d/light.cpp scene/resources/style_box.cpp
msgid "Shadow"
@@ -21163,18 +21125,16 @@ msgid "Gradient Length"
msgstr "Longueur du dégradé"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Filter Smooth"
-msgstr "Filtrer les méthodes"
+msgstr "Filtre de lissage"
#: scene/2d/light_occluder_2d.cpp
msgid "Closed"
msgstr "Fermé"
#: scene/2d/light_occluder_2d.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Cull Mode"
-msgstr "Mode Règle"
+msgstr "Mode Élagage"
#: scene/2d/light_occluder_2d.cpp
msgid ""
@@ -21218,13 +21178,12 @@ msgid "Joint Mode"
msgstr "Mode de jointure"
#: scene/2d/line_2d.cpp
-#, fuzzy
msgid "Begin Cap Mode"
-msgstr "Mode Région"
+msgstr "Lancer le mode capuchon"
#: scene/2d/line_2d.cpp
msgid "End Cap Mode"
-msgstr "Mode du capuchon de fin"
+msgstr "Terminer le mode capuchon"
#: scene/2d/line_2d.cpp scene/2d/polygon_2d.cpp scene/resources/style_box.cpp
msgid "Border"
@@ -21232,7 +21191,7 @@ msgstr "Bordure"
#: scene/2d/line_2d.cpp
msgid "Sharp Limit"
-msgstr ""
+msgstr "Limite Nette"
#: scene/2d/line_2d.cpp
msgid "Round Precision"
@@ -21244,9 +21203,8 @@ msgid "Antialiased"
msgstr "Anticrénelé"
#: scene/2d/multimesh_instance_2d.cpp scene/3d/multimesh_instance.cpp
-#, fuzzy
msgid "Multimesh"
-msgstr "Multiplier %s"
+msgstr "Multimaillage"
#: scene/2d/navigation_2d.cpp scene/3d/baked_lightmap.cpp
#: scene/3d/navigation.cpp scene/animation/root_motion_view.cpp
@@ -21269,9 +21227,8 @@ msgstr ""
"Navigation2DServer.map_get_path() » à la place."
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Pathfinding"
-msgstr "Pathfinding"
+msgstr "Recherche de chemin"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Path Desired Distance"
@@ -21302,9 +21259,8 @@ msgid "Max Neighbors"
msgstr "Maximum de voisins"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Time Horizon"
-msgstr "Retourner horizontalement"
+msgstr "Horizon temporel"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Max Speed"
@@ -21609,7 +21565,7 @@ msgstr "Plateforme mobile"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Apply Velocity On Leave"
-msgstr ""
+msgstr "Appliquer la vélocité à la sortie"
#: scene/2d/physics_body_2d.cpp scene/2d/touch_screen_button.cpp
#: scene/3d/physics_body.cpp scene/gui/texture_button.cpp
@@ -21672,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"
@@ -21748,9 +21703,8 @@ msgid "Frame Coords"
msgstr "Coordonnées de trame"
#: scene/2d/sprite.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Filter Clip"
-msgstr "Filtrer les scripts"
+msgstr "Filtrer les clips"
#: scene/2d/tile_map.cpp
msgid ""
@@ -21771,9 +21725,8 @@ msgid "Quadrant Size"
msgstr "Taille de quadrant"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Custom Transform"
-msgstr "Transformation"
+msgstr "Transformation Personalisée"
#: scene/2d/tile_map.cpp
msgid "Half Offset"
@@ -21801,7 +21754,7 @@ msgstr "Textures Centrées"
#: scene/2d/tile_map.cpp
msgid "Cell Clip UV"
-msgstr ""
+msgstr "Cellule Clip UV"
#: scene/2d/tile_map.cpp
msgid "Use Parent"
@@ -21821,7 +21774,7 @@ msgstr "Forme Visible"
#: scene/2d/touch_screen_button.cpp
msgid "Passby Press"
-msgstr ""
+msgstr "Activation en passant"
#: scene/2d/touch_screen_button.cpp
msgid "Visibility Mode"
@@ -21861,7 +21814,7 @@ msgstr "Parent du Processus Physique"
#: scene/3d/area.cpp
msgid "Reverb Bus"
-msgstr ""
+msgstr "Bus de Réverb"
#: scene/3d/area.cpp
msgid "Uniformity"
@@ -21892,9 +21845,8 @@ msgstr ""
"aucun contrôleur."
#: scene/3d/arvr_nodes.cpp
-#, fuzzy
msgid "Anchor ID"
-msgstr "Uniquement les ancres"
+msgstr "ID de l'ancre"
#: scene/3d/arvr_nodes.cpp
msgid "ARVRAnchor must have an ARVROrigin node as its parent."
@@ -21934,7 +21886,7 @@ msgstr "Max (dB)"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Out Of Range Mode"
-msgstr ""
+msgstr "Mode Hors-de-plage"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Emission Angle"
@@ -21956,7 +21908,7 @@ msgstr "Filtre d’atténuation"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_filter.cpp
msgid "Cutoff Hz"
-msgstr ""
+msgstr "Hz de coupure"
#: scene/3d/audio_stream_player_3d.cpp
#: servers/audio/effects/audio_effect_filter.cpp
@@ -21968,9 +21920,8 @@ msgid "Doppler"
msgstr "Doppler"
#: scene/3d/audio_stream_player_3d.cpp
-#, fuzzy
msgid "Tracking"
-msgstr "Empaquetage"
+msgstr "Suivi"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/reflection_probe.cpp
@@ -22004,9 +21955,8 @@ msgstr "Terminé"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/reflection_probe.cpp scene/resources/box_shape.cpp
#: scene/resources/rectangle_shape_2d.cpp
-#, fuzzy
msgid "Extents"
-msgstr "Gadgets"
+msgstr "Étendues"
#: scene/3d/baked_lightmap.cpp
msgid "Tweaks"
@@ -22065,9 +22015,8 @@ msgid "Custom Energy"
msgstr "Énergie personnalisée"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Min Light"
-msgstr "Indenter vers la droite"
+msgstr "Lumière Min"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
msgid "Propagation"
@@ -22091,12 +22040,11 @@ msgstr "Garder l'aspect"
#: scene/3d/camera.cpp scene/3d/light.cpp scene/3d/reflection_probe.cpp
msgid "Cull Mask"
-msgstr ""
+msgstr "Masque d'élagage"
#: scene/3d/camera.cpp
-#, fuzzy
msgid "Doppler Tracking"
-msgstr "Piste de propriété"
+msgstr "Effet Doppler de Suivi"
#: scene/3d/camera.cpp
msgid "Projection"
@@ -22127,18 +22075,16 @@ msgid "Margin"
msgstr "Marge"
#: scene/3d/camera.cpp
-#, fuzzy
msgid "Clip To"
-msgstr "Agrafe ci-dessus"
+msgstr "Agrafer à"
#: scene/3d/collision_object.cpp scene/3d/soft_body.cpp
msgid "Ray Pickable"
-msgstr ""
+msgstr "Sélectionnable par rayon"
#: scene/3d/collision_object.cpp
-#, fuzzy
msgid "Capture On Drag"
-msgstr "Capturer"
+msgstr "Capturer lors du glissement"
#: scene/3d/collision_object.cpp
msgid ""
@@ -22209,9 +22155,8 @@ msgstr ""
"Particles » activé."
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Box Extents"
-msgstr "Gadgets"
+msgstr "Étendues de la boîte"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
msgid "Ring Radius"
@@ -22251,10 +22196,9 @@ msgstr "Mode portail"
#: scene/3d/cull_instance.cpp
msgid "Include In Bound"
-msgstr ""
+msgstr "Inclure dans la frontière"
#: scene/3d/cull_instance.cpp
-#, fuzzy
msgid "Allow Merging"
msgstr "Autoriser la fusion"
@@ -22385,37 +22329,32 @@ msgid "Contact"
msgstr "Contact"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Reverse Cull Face"
-msgstr "Réinitialiser le volume de bus"
+msgstr "Élagage inversé de la face"
#: scene/3d/light.cpp servers/visual_server.cpp
msgid "Directional Shadow"
msgstr "Ombre directionnelle"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 1"
-msgstr "Divisé"
+msgstr "Séparation 1"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 2"
-msgstr "Divisé"
+msgstr "Séparation 2"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 3"
-msgstr "Divisé"
+msgstr "Séparation 3"
#: scene/3d/light.cpp
msgid "Blend Splits"
-msgstr "Mélanger les écarts"
+msgstr "Mélanger les séparations"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Bias Split Scale"
-msgstr "Utiliser le magnétisme d'échelle"
+msgstr "Échelle du biais de séparation"
#: scene/3d/light.cpp
msgid "Depth Range"
@@ -22449,7 +22388,7 @@ msgstr "Atténuation d'angle"
#: scene/3d/mesh_instance.cpp
msgid "Software Skinning"
-msgstr ""
+msgstr "Habillage Logiciel"
#: scene/3d/mesh_instance.cpp
msgid "Transform Normals"
@@ -22618,15 +22557,15 @@ msgstr "Z angulaire"
#: scene/3d/physics_body.cpp
msgid "Motion X"
-msgstr "X mouvement"
+msgstr "Mouvement X"
#: scene/3d/physics_body.cpp
msgid "Motion Y"
-msgstr "Y mouvement"
+msgstr "Mouvement Y"
#: scene/3d/physics_body.cpp
msgid "Motion Z"
-msgstr "Z mouvement"
+msgstr "Mouvement Z"
#: scene/3d/physics_body.cpp
msgid "Joint Constraints"
@@ -22751,7 +22690,7 @@ msgstr "Amortissement angulaire"
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "ERP"
-msgstr ""
+msgstr "ERP"
#: scene/3d/physics_body.cpp
msgid "Angular Spring Enabled"
@@ -22983,7 +22922,7 @@ msgstr "Nom de groupe"
#: scene/3d/proximity_group.cpp
msgid "Dispatch Mode"
-msgstr ""
+msgstr "Mode Répartition"
#: scene/3d/proximity_group.cpp
msgid "Grid Radius"
@@ -23022,9 +22961,8 @@ msgid "Ambient Energy"
msgstr "Énergie ambiante"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Ambient Contrib"
-msgstr "Indenter vers la droite"
+msgstr "Contribution Ambiante"
#: scene/3d/remote_transform.cpp
msgid ""
@@ -23058,20 +22996,19 @@ msgstr ""
#: scene/3d/room.cpp
msgid "Use Default Simplify"
-msgstr ""
+msgstr "Utiliser la simplification par défaut"
#: scene/3d/room.cpp scene/3d/room_manager.cpp
msgid "Room Simplify"
-msgstr ""
+msgstr "Simplifier la pièce"
#: scene/3d/room.cpp
msgid "Bound"
-msgstr ""
+msgstr "Frontière"
#: scene/3d/room_group.cpp
-#, fuzzy
msgid "Roomgroup Priority"
-msgstr "Priorité"
+msgstr "Priorité du groupe de pièces"
#: scene/3d/room_group.cpp
msgid "The RoomManager should not be placed inside a RoomGroup."
@@ -23099,67 +23036,58 @@ msgstr "Il ne doit y avoir qu'un seul RoomManager dans le SceneTree."
#: scene/3d/room_manager.cpp
msgid "Main"
-msgstr ""
+msgstr "Principal"
#: scene/3d/room_manager.cpp scene/animation/animation_blend_tree.cpp
#: scene/animation/animation_player.cpp scene/animation/animation_tree.cpp
#: scene/animation/animation_tree_player.cpp
#: servers/audio/effects/audio_effect_delay.cpp
-#, fuzzy
msgid "Active"
-msgstr "Action"
+msgstr "Actif"
#: scene/3d/room_manager.cpp
msgid "Roomlist"
-msgstr ""
+msgstr "Liste des pièces"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
-#, fuzzy
msgid "PVS"
-msgstr "IPS"
+msgstr "PVS"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "PVS Mode"
-msgstr "Mode navigation"
+msgstr "Mode PVS"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "PVS Filename"
-msgstr "Fichier ZIP"
+msgstr "Nom de ficher PVS"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
msgid "Gameplay"
-msgstr ""
+msgstr "Jouabilité"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Gameplay Monitor"
-msgstr "Moniteur"
+msgstr "Moniteur de jouabilité"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Use Secondary PVS"
-msgstr "Utiliser le magnétisme d'échelle"
+msgstr "Utiliser PVS secondaire"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Merge Meshes"
-msgstr "Maillages"
+msgstr "Unifier les maillages"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Show Margins"
-msgstr "Afficher l'origine"
+msgstr "Afficher les marges"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Debug Sprawl"
-msgstr "Débogage"
+msgstr "Déboger le sprawl"
#: scene/3d/room_manager.cpp
msgid "Overlap Warning Threshold"
-msgstr ""
+msgstr "Seuil d'avertissement de superposition"
#: scene/3d/room_manager.cpp
msgid "Preview Camera"
@@ -23167,17 +23095,15 @@ msgstr "Aperçu de caméra"
#: scene/3d/room_manager.cpp
msgid "Portal Depth Limit"
-msgstr ""
+msgstr "Limite de profondeur du portail"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Default Portal Margin"
-msgstr "Définir la marge"
+msgstr "Marge de portail par défaut"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Roaming Expansion Margin"
-msgstr "Développer tout"
+msgstr "Marge d'expansion roaming"
#: scene/3d/room_manager.cpp
msgid ""
@@ -23232,43 +23158,36 @@ msgstr ""
"manuelles."
#: scene/3d/skeleton.cpp scene/resources/skin.cpp
-#, fuzzy
msgid "Pose"
-msgstr "Copier la pose"
+msgstr "Pose"
#: scene/3d/skeleton.cpp
-#, fuzzy
msgid "Bound Children"
-msgstr "Enfants modifiables"
+msgstr "Enfants liés"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Pinned Points"
-msgstr "Épinglé %s"
+msgstr "Points épinglés"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Attachments"
-msgstr "Gadgets"
+msgstr "Attachements"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Point Index"
-msgstr "Récupérer la position"
+msgstr "Index de point"
#: scene/3d/soft_body.cpp
msgid "Spatial Attachment Path"
-msgstr ""
+msgstr "Chemin de la pièce jointe spatiale"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Physics Enabled"
-msgstr "Image physique %"
+msgstr "Physique active"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Parent Collision Ignore"
-msgstr "Créer le polygone de collision"
+msgstr "Ignorer les collisions avec le parent"
#: scene/3d/soft_body.cpp
msgid "Simulation Precision"
@@ -23280,32 +23199,31 @@ msgstr "Masse totale"
#: scene/3d/soft_body.cpp
msgid "Linear Stiffness"
-msgstr ""
+msgstr "Rigidité Linéaire"
#: scene/3d/soft_body.cpp
msgid "Areaangular Stiffness"
-msgstr ""
+msgstr "Rigidité Aire Angulaire"
#: scene/3d/soft_body.cpp
msgid "Volume Stiffness"
-msgstr ""
+msgstr "Rigidité de volume"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Pressure Coefficient"
msgstr "Coefficient de pression"
#: scene/3d/soft_body.cpp
msgid "Damping Coefficient"
-msgstr ""
+msgstr "Coefficient d'amortissement"
#: scene/3d/soft_body.cpp
msgid "Drag Coefficient"
-msgstr ""
+msgstr "Coefficient de traînée"
#: scene/3d/soft_body.cpp
msgid "Pose Matching Coefficient"
-msgstr ""
+msgstr "Coefficient d'alignement de pose"
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -23322,9 +23240,8 @@ msgstr ""
"Modifiez les tailles dans les formes de collision enfants à la place."
#: scene/3d/spatial.cpp
-#, fuzzy
msgid "Global Translation"
-msgstr "Transformation Globale"
+msgstr "Position globale"
#: scene/3d/spatial.cpp
msgid "Matrix"
@@ -23335,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"
@@ -23419,6 +23335,14 @@ msgstr "Force max"
msgid "AABB"
msgstr "AABB"
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr "Arrangement"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr "Utiliser le centre de l'AABB"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr "Géométrie"
@@ -23550,9 +23474,8 @@ msgid "Xfade Time"
msgstr "Durée du fondu croisé"
#: scene/animation/animation_node_state_machine.cpp
-#, fuzzy
msgid "Switch Mode"
-msgstr "Mode de Switch"
+msgstr "Changer de mode"
#: scene/animation/animation_node_state_machine.cpp
msgid "Auto Advance"
@@ -23650,14 +23573,12 @@ msgid "This node has been deprecated. Use AnimationTree instead."
msgstr "Ce nœud est désormais déprécié. Utilisez AnimationTree à la place."
#: scene/animation/animation_tree_player.cpp
-#, fuzzy
msgid "Playback"
-msgstr "Jouer"
+msgstr "Lecture"
#: scene/animation/animation_tree_player.cpp
-#, fuzzy
msgid "Master Player"
-msgstr "Coller les paramètres"
+msgstr "Lecteur principal"
#: scene/animation/animation_tree_player.cpp
msgid "Base Path"
@@ -23712,9 +23633,8 @@ msgid "Playback Speed"
msgstr "Vitesse de lecture"
#: scene/audio/audio_stream_player.cpp
-#, fuzzy
msgid "Mix Target"
-msgstr "Cible"
+msgstr "Cible Mixte"
#: scene/gui/aspect_ratio_container.cpp scene/gui/range.cpp
#: servers/audio/effects/audio_effect_compressor.cpp
@@ -23740,11 +23660,11 @@ msgstr "Mode d'action"
#: scene/gui/base_button.cpp
msgid "Enabled Focus Mode"
-msgstr ""
+msgstr "Mode Concentration activé"
#: scene/gui/base_button.cpp
msgid "Keep Pressed Outside"
-msgstr ""
+msgstr "Garder pressé à l'extérieur"
#: scene/gui/base_button.cpp scene/gui/shortcut.cpp
msgid "Shortcut"
@@ -23755,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
@@ -23769,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"
@@ -23868,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"
@@ -23881,9 +23798,8 @@ msgid "Tooltip"
msgstr "Info-bulle"
#: scene/gui/control.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Focus"
-msgstr "Focaliser le chemin"
+msgstr "Focus"
#: scene/gui/control.cpp
msgid "Neighbour Left"
@@ -23919,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"
@@ -23930,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"
@@ -23944,7 +23859,7 @@ msgstr "Boîte de dialogue"
#: scene/gui/dialogs.cpp
msgid "Hide On OK"
-msgstr ""
+msgstr "Cacher quand OK"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -23955,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"
@@ -23977,138 +23890,123 @@ msgid "Snap Distance"
msgstr "Distance d'arrondissage"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom Min"
-msgstr "Zoomer"
+msgstr "Zoom Min"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom Max"
-msgstr "Zoomer"
+msgstr "Zoom Max"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom Step"
-msgstr "Dézoomer"
+msgstr "Pas de Zoom"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Show Zoom Label"
-msgstr "Afficher les os"
+msgstr "Afficher le label de zoom"
#: scene/gui/graph_edit.cpp scene/gui/text_edit.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Minimap"
-msgstr ""
+msgstr "Mini-carte"
#: scene/gui/graph_edit.cpp
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
-#, fuzzy
msgid "Selected"
-msgstr "Sélectionner"
+msgstr "Sélectionné"
#: scene/gui/graph_node.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Comment"
-msgstr "Enregistrer"
+msgstr "Commentaire"
#: scene/gui/graph_node.cpp
msgid "Overlay"
-msgstr ""
+msgstr "Surcouche"
#: scene/gui/grid_container.cpp scene/gui/item_list.cpp scene/gui/tree.cpp
-#, fuzzy
msgid "Columns"
-msgstr "Volume"
+msgstr "Colonnes"
#: scene/gui/item_list.cpp scene/gui/popup_menu.cpp scene/gui/text_edit.cpp
#: scene/gui/tree.cpp scene/main/viewport.cpp
-#, fuzzy
msgid "Timers"
-msgstr "Temps"
+msgstr "Chronomètres"
#: scene/gui/item_list.cpp scene/gui/popup_menu.cpp scene/gui/tree.cpp
msgid "Incremental Search Max Interval Msec"
-msgstr ""
+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 ""
+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"
-msgstr ""
+msgstr "Colonnes Max"
#: scene/gui/item_list.cpp
msgid "Same Column Width"
-msgstr ""
+msgstr "Même Largeur de Colonne"
#: scene/gui/item_list.cpp
msgid "Fixed Column Width"
-msgstr ""
+msgstr "Largeur de Colonne Fixe"
#: scene/gui/item_list.cpp
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"
-msgstr ""
+msgstr "Lignes Ignorées"
#: scene/gui/label.cpp
msgid "Max Lines Visible"
-msgstr ""
+msgstr "Lignes Visibles Max"
#: scene/gui/line_edit.cpp scene/resources/navigation_mesh.cpp
msgid "Max Length"
-msgstr ""
+msgstr "Longueur Max"
#: scene/gui/line_edit.cpp
msgid "Secret"
-msgstr ""
+msgstr "Secret"
#: scene/gui/line_edit.cpp
msgid "Secret Character"
@@ -24116,56 +24014,48 @@ msgstr "Caractère secret"
#: scene/gui/line_edit.cpp
msgid "Expand To Text Length"
-msgstr ""
+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
msgid "Deselect On Focus Loss Enabled"
-msgstr ""
+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"
-msgstr ""
+msgstr "Alpha"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Caret"
@@ -24173,7 +24063,7 @@ msgstr "Caret"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink"
-msgstr ""
+msgstr "Clignoter"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink Speed"
@@ -24181,31 +24071,27 @@ msgstr "Vitesse de Clignotement"
#: scene/gui/link_button.cpp
msgid "Underline"
-msgstr ""
+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"
-msgstr ""
+msgstr "Etirer les Axes"
#: scene/gui/nine_patch_rect.cpp
msgid ""
@@ -24220,14 +24106,12 @@ msgstr ""
"un étirement."
#: scene/gui/popup.cpp
-#, fuzzy
msgid "Popup"
-msgstr "Peupler"
+msgstr "Fenêtre contextuelle"
#: scene/gui/popup.cpp
-#, fuzzy
msgid "Exclusive"
-msgstr "Inclusif"
+msgstr "Exclusif"
#: scene/gui/popup.cpp
msgid ""
@@ -24235,34 +24119,30 @@ msgid ""
"functions. Making them visible for editing is fine, but they will hide upon "
"running."
msgstr ""
-"Les pop-ups seront cachées par défaut jusqu'à ce que vous appeliez une "
-"fonction popup() ou une des fonctions popup*(). Les rendre visibles pour "
-"l'édition ne pose pas de problème, mais elles seront cachées lors de "
-"l'exécution."
+"Les fenêtres contextuelles seront cachées par défaut jusqu'à ce que vous "
+"appeliez une fonction popup() ou une des fonctions popup*(). Les rendre "
+"visibles pour l'édition ne pose pas de problème, mais elles seront cachées "
+"lors de l'exécution."
#: scene/gui/popup_menu.cpp
-#, fuzzy
msgid "Hide On Item Selection"
-msgstr "Centrer sur la sélection"
+msgstr "Masquer lors de la sélection de l'élément"
#: scene/gui/popup_menu.cpp
-#, fuzzy
msgid "Hide On Checkable Item Selection"
-msgstr "Suppression de la sélection de GridMap"
+msgstr "Masquer lors de la sélection de l'élément cochable"
#: scene/gui/popup_menu.cpp
-#, fuzzy
msgid "Hide On State Item Selection"
-msgstr "Supprimer la sélection"
+msgstr "Cacher lors de la sélection de l'élément d'état"
#: scene/gui/popup_menu.cpp
msgid "Submenu Popup Delay"
-msgstr ""
+msgstr "Délai de pop-up du sous-menu"
#: scene/gui/popup_menu.cpp
-#, fuzzy
msgid "Allow Search"
-msgstr "Rechercher"
+msgstr "Autoriser la recherche"
#: scene/gui/progress_bar.cpp
msgid "Percent"
@@ -24270,68 +24150,61 @@ msgstr "Pourcentage"
#: scene/gui/range.cpp
msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."
-msgstr "Si « Exp Edit » est vrai, « Min Value » doit être supérieur à 0."
+msgstr ""
+"Si \"Édition Exponentielle\" est activée, \"Valeur Minimale\" doit être "
+"supérieure à 0."
#: scene/gui/range.cpp scene/resources/curve.cpp
-#, fuzzy
msgid "Min Value"
-msgstr "Épingler la valeur"
+msgstr "Valeur minimale"
#: scene/gui/range.cpp scene/resources/curve.cpp
-#, fuzzy
msgid "Max Value"
-msgstr "Valeur"
+msgstr "Valeur maximale"
#: scene/gui/range.cpp
msgid "Page"
msgstr "Page"
#: scene/gui/range.cpp
-#, fuzzy
msgid "Exp Edit"
-msgstr "Édition"
+msgstr "Édition Exponentielle"
#: scene/gui/range.cpp
-#, fuzzy
msgid "Rounded"
-msgstr "Groupé"
+msgstr "Arrondi"
#: scene/gui/range.cpp
msgid "Allow Greater"
-msgstr ""
+msgstr "Autoriser supérieur"
#: scene/gui/range.cpp
msgid "Allow Lesser"
-msgstr ""
+msgstr "Autoriser inférieur"
#: scene/gui/reference_rect.cpp
-#, fuzzy
msgid "Border Color"
-msgstr "Renommer l'item de couleur"
+msgstr "Couleur de la bordure"
#: scene/gui/reference_rect.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Border Width"
-msgstr "Pixels de bordure"
+msgstr "Largeur de la bordure"
#: scene/gui/rich_text_effect.cpp
-#, fuzzy
msgid "Relative Index"
-msgstr "Récupérer la position"
+msgstr "Position relative"
#: scene/gui/rich_text_effect.cpp
-#, fuzzy
msgid "Absolute Index"
-msgstr "Indentation automatique"
+msgstr "Indice absolu"
#: scene/gui/rich_text_effect.cpp
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"
@@ -24339,47 +24212,43 @@ msgstr "Caractère"
#: scene/gui/rich_text_label.cpp
msgid "BBCode"
-msgstr ""
+msgstr "BBCode"
#: scene/gui/rich_text_label.cpp
msgid "Meta Underlined"
-msgstr ""
+msgstr "Méta-données soulignées"
#: scene/gui/rich_text_label.cpp
msgid "Tab Size"
msgstr "Taille de tabulation"
#: scene/gui/rich_text_label.cpp
-#, fuzzy
msgid "Fit Content Height"
-msgstr "Peindre les poids de l'os"
+msgstr "Ajuster à la hauteur du conteneur"
#: scene/gui/rich_text_label.cpp
msgid "Scroll Active"
-msgstr ""
+msgstr "Défilement actif"
#: scene/gui/rich_text_label.cpp
msgid "Scroll Following"
-msgstr ""
+msgstr "Suivi du défilement"
#: scene/gui/rich_text_label.cpp
-#, fuzzy
msgid "Selection Enabled"
-msgstr "Sélection uniquement"
+msgstr "Sélection activée"
#: scene/gui/rich_text_label.cpp scene/gui/text_edit.cpp
msgid "Override Selected Font Color"
-msgstr "Remplacer la couleur de police sélectionnée"
+msgstr "Surcharger la couleur de police sélectionnée"
#: scene/gui/rich_text_label.cpp
-#, fuzzy
msgid "Custom Effects"
-msgstr "Déplacer effet de transport"
+msgstr "Effets personnalisés"
#: scene/gui/scroll_bar.cpp
-#, fuzzy
msgid "Custom Step"
-msgstr "Nœud Personnalisé"
+msgstr "Pas personnalisé"
#: scene/gui/scroll_container.cpp
msgid ""
@@ -24393,31 +24262,28 @@ 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"
-msgstr ""
+msgstr "Zone morte par défaut du défilement"
#: scene/gui/slider.cpp
msgid "Scrollable"
-msgstr ""
+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"
@@ -24436,31 +24302,28 @@ 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"
-msgstr ""
+msgstr "Alignement de l'onglet"
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
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"
-msgstr ""
+msgstr "Tous les Onglets au Premier Plan"
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
msgid "Drag To Rearrange Enabled"
@@ -24468,11 +24331,11 @@ msgstr "Glisser pour Réorganiser Activé"
#: scene/gui/tab_container.cpp
msgid "Use Hidden Tabs For Min Size"
-msgstr ""
+msgstr "Utiliser des onglets cachés pour la taille minimum"
#: scene/gui/tabs.cpp
msgid "Tab Close Display Policy"
-msgstr ""
+msgstr "Stratégie d'affichage pour la fermeture d'onglet"
#: scene/gui/tabs.cpp
msgid "Scrolling Enabled"
@@ -24480,36 +24343,31 @@ msgstr "Défilement activé"
#: scene/gui/text_edit.cpp
msgid "Readonly"
-msgstr ""
+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"
@@ -24524,59 +24382,54 @@ 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"
-msgstr ""
+msgstr "Déplacer avec clic droit"
#: scene/gui/text_edit.cpp
msgid "Text Edit Idle Detect (sec)"
-msgstr ""
+msgstr "Détéction d'inactivité du champ de texte (s)"
#: scene/gui/text_edit.cpp
msgid "Text Edit Undo Stack Max Size"
msgstr ""
+"Nombre d'actions max dans le champ de texte à mémoriser pour l'annulation"
#: scene/gui/texture_button.cpp scene/resources/default_theme/default_theme.cpp
msgid "Hover"
-msgstr ""
+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 ""
+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"
-msgstr ""
+msgstr "Décalage de la Progression"
#: scene/gui/texture_progress.cpp
msgid "Fill Mode"
@@ -24584,68 +24437,59 @@ msgstr "Mode de Remplissage"
#: scene/gui/texture_progress.cpp scene/resources/material.cpp
msgid "Tint"
-msgstr ""
+msgstr "Teinte"
#: scene/gui/texture_progress.cpp
msgid "Radial Fill"
-msgstr ""
+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"
-msgstr ""
+msgstr "Taille Minimum Personnalisée"
#: scene/gui/tree.cpp
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"
@@ -24653,54 +24497,47 @@ msgstr "Masquer la Racine"
#: scene/gui/tree.cpp
msgid "Drop Mode Flags"
-msgstr ""
+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 ""
+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"
-msgstr ""
+msgstr "Taille Limite du Corps"
#: scene/main/http_request.cpp
msgid "Max Redirects"
-msgstr ""
+msgstr "Redirections Max"
#: scene/main/http_request.cpp
msgid "Timeout"
@@ -24711,82 +24548,72 @@ msgid ""
"Setting node name '%s' to be unique within scene for '%s', but it's already "
"claimed by '%s'. This node is no longer set unique."
msgstr ""
+"Impossible de déclarer le nom de nœud '%s' comme unique dans la scène pour "
+"'%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 ""
+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 ""
+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"
@@ -24847,7 +24674,7 @@ msgstr "Utiliser FXAA"
#: scene/main/scene_tree.cpp
msgid "Use Debanding"
-msgstr ""
+msgstr "Utiliser le Debanding"
#: scene/main/scene_tree.cpp scene/main/viewport.cpp
msgid "HDR"
@@ -24870,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 ""
@@ -24921,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"
@@ -24951,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"
@@ -24980,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"
@@ -24993,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"
@@ -25092,13 +24912,12 @@ 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"
-msgstr ""
+msgstr "Intervalle de Précalcul"
#: scene/resources/default_theme/default_theme.cpp
msgid "Panel"
@@ -25225,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"
@@ -25339,16 +25155,15 @@ msgstr "Poignée quand désactivée"
#: scene/resources/default_theme/default_theme.cpp
msgid "Tick"
-msgstr ""
+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"
@@ -25399,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"
@@ -25420,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"
@@ -25458,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"
@@ -25476,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"
@@ -25503,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"
@@ -25537,7 +25339,7 @@ msgstr "Couleur des lignes de relation"
#: scene/resources/default_theme/default_theme.cpp
msgid "Custom Button Font Highlight"
-msgstr ""
+msgstr "Surlignage Personnalisé de la Police du Bouton"
#: scene/resources/default_theme/default_theme.cpp
msgid "Item Margin"
@@ -25592,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"
@@ -25611,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"
@@ -25638,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"
@@ -25765,13 +25562,12 @@ 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"
-msgstr ""
+msgstr "Longueur Négative Courbe de Bézier"
#: scene/resources/default_theme/default_theme.cpp
msgid "Port Grab Distance Horizontal"
@@ -25843,7 +25639,7 @@ msgstr "Degrés de Rotation du Ciel"
#: scene/resources/environment.cpp
msgid "Canvas Max Layer"
-msgstr ""
+msgstr "Calque Max du Canvas"
#: scene/resources/environment.cpp scene/resources/texture.cpp
msgid "Camera Feed ID"
@@ -25934,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"
@@ -25971,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"
@@ -26118,7 +25911,7 @@ msgstr "Passe suivante"
#: scene/resources/material.cpp
msgid "Use Shadow To Opacity"
-msgstr ""
+msgstr "Utiliser l'ombre pour l'opacité"
#: scene/resources/material.cpp
msgid "Unshaded"
@@ -26250,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"
@@ -26267,7 +26059,7 @@ msgstr "Anisotropie"
#: scene/resources/material.cpp
msgid "Flowmap"
-msgstr ""
+msgstr "Organigramme"
#: scene/resources/material.cpp
msgid "Ambient Occlusion"
@@ -26275,26 +26067,23 @@ msgstr "Occlusion ambiante"
#: scene/resources/material.cpp
msgid "Deep Parallax"
-msgstr ""
+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 ""
+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"
@@ -26326,33 +26115,31 @@ msgstr "Triplanaire"
#: scene/resources/material.cpp
msgid "Triplanar Sharpness"
-msgstr ""
+msgstr "Netteté Triplanaire"
#: scene/resources/material.cpp
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"
-msgstr ""
+msgstr "Fondu de Distance"
#: scene/resources/material.cpp
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"
-msgstr ""
+msgstr "AABB Personnalisé"
#: scene/resources/mesh_library.cpp
msgid "Mesh Transform"
@@ -26372,7 +26159,7 @@ msgstr "Format de transformation"
#: scene/resources/multimesh.cpp
msgid "Custom Data Format"
-msgstr ""
+msgstr "Format de Données Personnalisé"
#: scene/resources/multimesh.cpp
msgid "Instance Count"
@@ -26396,12 +26183,11 @@ msgstr "Type de la géométrie analysée"
#: scene/resources/navigation_mesh.cpp
msgid "Source Geometry Mode"
-msgstr ""
+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"
@@ -26413,7 +26199,7 @@ msgstr "Agents"
#: scene/resources/navigation_mesh.cpp
msgid "Max Climb"
-msgstr ""
+msgstr "Escalade Max"
#: scene/resources/navigation_mesh.cpp
msgid "Max Slope"
@@ -26424,22 +26210,20 @@ 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"
-msgstr ""
+msgstr "Sommets par Poly"
#: scene/resources/navigation_mesh.cpp
msgid "Details"
@@ -26450,31 +26234,28 @@ 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"
-msgstr ""
+msgstr "Obstacles Suspendus Bas"
#: scene/resources/navigation_mesh.cpp
msgid "Ledge Spans"
-msgstr ""
+msgstr "Etendue de Rebord"
#: scene/resources/navigation_mesh.cpp
msgid "Walkable Low Height Spans"
-msgstr ""
+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"
@@ -26505,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"
@@ -26523,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"
@@ -26536,13 +26314,12 @@ 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"
-msgstr ""
+msgstr "Rugueux"
#: scene/resources/physics_material.cpp
msgid "Absorbent"
@@ -26558,7 +26335,7 @@ msgstr "Retourner les faces"
#: scene/resources/primitive_meshes.cpp
msgid "Mid Height"
-msgstr ""
+msgstr "Mi-hauteur"
#: scene/resources/primitive_meshes.cpp
msgid "Subdivide Width"
@@ -26577,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"
@@ -26603,7 +26379,7 @@ msgstr "A"
#: scene/resources/shape_2d.cpp
msgid "Custom Solver Bias"
-msgstr ""
+msgstr "Biais Personnalisé du Solveur"
#: scene/resources/skin.cpp
msgid "Bind Count"
@@ -26666,22 +26442,20 @@ 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"
-msgstr ""
+msgstr "Détail des Coins"
#: scene/resources/style_box.cpp
msgid "Anti Aliasing"
@@ -26689,16 +26463,15 @@ msgstr "Anticrénelage"
#: scene/resources/style_box.cpp
msgid "Grow Begin"
-msgstr ""
+msgstr "Début d'Expansion"
#: scene/resources/style_box.cpp
msgid "Grow End"
-msgstr ""
+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"
@@ -26750,7 +26523,7 @@ msgstr "Pause"
#: scene/resources/texture.cpp
msgid "Which Feed"
-msgstr ""
+msgstr "Quel Flux"
#: scene/resources/texture.cpp
msgid "Camera Is Active"
@@ -26765,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"
@@ -26819,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"
@@ -26849,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"
@@ -26899,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"
@@ -26961,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
@@ -26982,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
@@ -27012,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"
@@ -27032,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"
@@ -27048,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
@@ -27073,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)"
@@ -27100,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)"
@@ -27146,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"
@@ -27205,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"
@@ -27231,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."
@@ -27265,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"
@@ -27307,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"
@@ -27339,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"
@@ -27349,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"
@@ -27357,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"
@@ -27369,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"
@@ -27402,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"
@@ -27422,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"
@@ -27430,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"
@@ -27450,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"
@@ -27478,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"
@@ -27497,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"
@@ -27526,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"
@@ -27558,7 +27313,7 @@ msgstr "Nombre de compilations simultanées"
#: servers/visual_server.cpp
msgid "Log Active Async Compiles Count"
-msgstr ""
+msgstr "Noter le nombre de compilations asynchrones actives"
#: servers/visual_server.cpp
msgid "Shader Cache Size (MB)"
diff --git a/editor/translations/ga.po b/editor/translations/ga.po
index 246c04dc63..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 ""
@@ -12451,9 +12451,10 @@ msgstr "Cruthaigh"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13796,12 +13797,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22473,6 +22473,15 @@ msgstr ""
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Nód Beochana"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/gl.po b/editor/translations/gl.po
index 2445ec4783..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 ""
@@ -13135,9 +13135,10 @@ msgstr "Opcións de Axuste de Cuadrícula"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Offset:"
@@ -14561,17 +14562,18 @@ msgid "Invalid project path (changed anything?)."
msgstr "A ruta ao proxecto non é valida. Cambiaches algo?"
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Non se pudo cargar o arquivo de configuración 'project.godot' na ruta do "
"proxecto (erro %d). Pode ser que o arquivo non exista; ou que esté "
"corrompido."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Non se pudo editar o arquivo 'project.godot' na ruta do proxecto."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Non se pode abrir proxecto en '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -23866,6 +23868,15 @@ msgstr "Erro"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Ordenar"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/he.po b/editor/translations/he.po
index e0a690c9b4..7458eedd15 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -23,13 +23,17 @@
# Shailee Eliyahu <dev.sle.il@gmail.com>, 2021.
# Mati Borlak <matiborlak@gmail.com>, 2022.
# Tamir Livneh <fkeyzuwu@gmail.com>, 2022.
+# 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-09-05 11:17+0000\n"
-"Last-Translator: Tamir Livneh <fkeyzuwu@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"
@@ -38,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.14.1-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -57,26 +61,24 @@ msgid "Exit Code"
msgstr "קוד יציאה"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "V-Sync Enabled"
-msgstr "הפעלה"
+msgstr "V-Sync מופעל"
#: core/bind/core_bind.cpp main/main.cpp
msgid "V-Sync Via Compositor"
-msgstr ""
+msgstr "V-Sync דרך Compositor"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Delta Smoothing"
-msgstr ""
+msgstr "החלקת דלטא"
#: core/bind/core_bind.cpp
-#, fuzzy
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"
@@ -105,7 +107,7 @@ msgstr "בלי קצה"
#: core/bind/core_bind.cpp
msgid "Per Pixel Transparency Enabled"
-msgstr ""
+msgstr "שקיפות-פר-פיקסל מופעלת"
#: core/bind/core_bind.cpp core/project_settings.cpp
msgid "Fullscreen"
@@ -146,7 +148,7 @@ msgstr "גודל"
#: core/bind/core_bind.cpp
msgid "Endian Swap"
-msgstr ""
+msgstr "החלפת סדר בתים (Byte Order)"
#: core/bind/core_bind.cpp
msgid "Editor Hint"
@@ -161,28 +163,24 @@ msgid "Iterations Per Second"
msgstr "איטרציות לשניה"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Target FPS"
-msgstr "נתיב המשאב"
+msgstr "יעד קצב פריימים"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Time Scale"
-msgstr "מפרק TimeScale"
+msgstr "ציר זמן"
#: core/bind/core_bind.cpp main/main.cpp
-#, fuzzy
msgid "Physics Jitter Fix"
-msgstr "שקופית פיזיקלית %"
+msgstr "תיקון רטט בפיזיקה"
#: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Error"
msgstr "שגיאה"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Error String"
-msgstr "שגיאה בשמירה"
+msgstr "מחרוזת שגויה"
#: core/bind/core_bind.cpp
msgid "Error Line"
@@ -213,7 +211,7 @@ msgstr "תור פיקוד"
#: core/command_queue_mt.cpp
msgid "Multithreading Queue Size (KB)"
-msgstr ""
+msgstr "גודל תור תהליכי משנה (KB)"
#: core/func_ref.cpp modules/visual_script/visual_script_builtin_funcs.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
@@ -236,9 +234,8 @@ msgid "Network"
msgstr "רשת"
#: core/io/file_access_network.cpp
-#, fuzzy
msgid "Remote FS"
-msgstr "מרוחק "
+msgstr "שרת קבצים מרוחק"
#: core/io/file_access_network.cpp
msgid "Page Size"
@@ -246,11 +243,11 @@ msgstr "גודל דף"
#: core/io/file_access_network.cpp
msgid "Page Read Ahead"
-msgstr ""
+msgstr "קריאה מראש של דף"
#: core/io/http_client.cpp
msgid "Blocking Mode Enabled"
-msgstr ""
+msgstr "מצב חסימה מאופשר"
#: core/io/http_client.cpp
msgid "Connection"
@@ -258,73 +255,69 @@ msgstr "חיבור"
#: core/io/http_client.cpp
msgid "Read Chunk Size"
-msgstr ""
+msgstr "גודל קריאת נתח"
#: core/io/marshalls.cpp
msgid "Object ID"
msgstr "זהות אוביקט"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
-#, fuzzy
msgid "Allow Object Decoding"
-msgstr "הפעלת שכבות בצל"
+msgstr "אפשר פענוח אובייקט"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
msgid "Refuse New Network Connections"
-msgstr ""
+msgstr "סירוב חיבורים חדשים לרשת"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
#, fuzzy
msgid "Network Peer"
-msgstr "מאפיין רשת"
+msgstr "מאפיין\\עמית רשת"
#: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp
-#, fuzzy
msgid "Root Node"
-msgstr "שינוי שם מפרק השורש"
+msgstr "מפרק השורש"
#: core/io/networked_multiplayer_peer.cpp
-#, fuzzy
msgid "Refuse New Connections"
-msgstr "התחברות"
+msgstr "דחה חיבורים חדשים"
#: core/io/networked_multiplayer_peer.cpp
-#, fuzzy
msgid "Transfer Mode"
-msgstr "מפרק מעברון"
+msgstr "מצב מעבר"
#: core/io/packet_peer.cpp
msgid "Encode Buffer Max Size"
-msgstr ""
+msgstr "קודד גודל מקסימלי של החוצץ"
#: core/io/packet_peer.cpp
msgid "Input Buffer Max Size"
-msgstr ""
+msgstr "הכנס גודל מירבי של החוצץ"
#: core/io/packet_peer.cpp
msgid "Output Buffer Max Size"
-msgstr ""
+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
msgid "Data Array"
-msgstr ""
+msgstr "מערך מידע"
#: core/io/stream_peer_ssl.cpp
msgid "Blocking Handshake"
-msgstr ""
+msgstr "לחיצת ידיים חוסמת"
#: core/io/udp_server.cpp
-#, fuzzy
msgid "Max Pending Connections"
-msgstr "עריכת חיבור:"
+msgstr "מקסימום חיבורים ממתינים"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -342,9 +335,8 @@ msgid "Not enough bytes for decoding bytes, or invalid format."
msgstr "אין מספיק בתים לפענוח בתים, או פורמט לא תקין‭‭."
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid input %d (not passed) in expression"
-msgstr "קלט שגוי %i (לא הועבר) בתוך הביטוי"
+msgstr "קלט שגוי %d (לא הועבר) בתוך הביטוי"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -373,7 +365,7 @@ msgstr "בקריאה ל־‚%s’:"
#: core/math/random_number_generator.cpp
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Seed"
-msgstr ""
+msgstr "גרעין"
#: core/math/random_number_generator.cpp
msgid "State"
@@ -381,7 +373,7 @@ msgstr "מצב"
#: core/message_queue.cpp
msgid "Message Queue"
-msgstr "תור הוראות"
+msgstr "תור הודעות"
#: core/message_queue.cpp
msgid "Max Size (KB)"
@@ -403,31 +395,28 @@ msgid "Device"
msgstr "מכשיר"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Alt"
-msgstr "הכל"
+msgstr "אלט"
#: core/os/input_event.cpp
msgid "Shift"
-msgstr ""
+msgstr "הסט"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Control"
-msgstr "בקרת גירסאות"
+msgstr "לשלוט"
#: core/os/input_event.cpp
msgid "Meta"
-msgstr ""
+msgstr "מטא"
#: core/os/input_event.cpp
msgid "Command"
-msgstr "פיקוד"
+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
@@ -436,48 +425,44 @@ msgid "Pressed"
msgstr "לחוץ"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Scancode"
-msgstr "סריקת מקורות"
+msgstr "קוד סריקה"
#: core/os/input_event.cpp
msgid "Physical Scancode"
-msgstr ""
+msgstr "קוד סריקה פיזי"
#: core/os/input_event.cpp
msgid "Unicode"
-msgstr ""
+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"
-msgstr ""
+msgstr "לחיצת עכבר כפולה"
#: core/os/input_event.cpp
msgid "Tilt"
-msgstr ""
+msgstr "הטייה"
#: core/os/input_event.cpp
msgid "Pressure"
@@ -485,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
@@ -505,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"
@@ -537,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"
@@ -567,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
@@ -605,36 +584,33 @@ 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
-#, fuzzy
msgid "Disable stdout"
-msgstr "כפתור אמצעי"
+msgstr "בטל stdout"
#: core/project_settings.cpp
-#, fuzzy
msgid "Disable stderr"
-msgstr "מושבת"
+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
@@ -653,7 +629,7 @@ msgstr "גבה"
#: core/project_settings.cpp
msgid "Always On Top"
-msgstr ""
+msgstr "תמיד עליון"
#: core/project_settings.cpp
msgid "Test Width"
@@ -682,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
@@ -714,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
@@ -806,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
@@ -826,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
@@ -852,43 +818,40 @@ msgid "Profiler"
msgstr "מאפיין"
#: core/project_settings.cpp
-#, fuzzy
msgid "Max Functions"
-msgstr "יצירת פונקציה"
+msgstr "פונקציות מקסימום"
#: core/project_settings.cpp scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Compression"
-msgstr "גרסה נוכחית:"
+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"
@@ -896,33 +859,31 @@ msgstr "Android"
#: core/project_settings.cpp
msgid "Modules"
-msgstr ""
+msgstr "מודולים"
#: core/register_core_types.cpp
msgid "TCP"
-msgstr ""
+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"
-msgstr ""
+msgstr "SSL"
#: core/register_core_types.cpp main/main.cpp
-#, fuzzy
msgid "Certificates"
-msgstr "קודקודים"
+msgstr "תעודות"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_resource_picker.cpp
@@ -931,9 +892,8 @@ msgid "Resource"
msgstr "משאב"
#: core/resource.cpp
-#, fuzzy
msgid "Local To Scene"
-msgstr "סגירת סצנה"
+msgstr "ייחודי לסצנה"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_autoload_settings.cpp editor/plugins/path_editor_plugin.cpp
@@ -943,13 +903,12 @@ msgid "Path"
msgstr "נתיב"
#: core/script_language.cpp
-#, fuzzy
msgid "Source Code"
-msgstr "משאב"
+msgstr "קוד מקור"
#: core/translation.cpp editor/project_settings_editor.cpp
msgid "Locale"
-msgstr ""
+msgstr "מקומי"
#: core/translation.cpp
msgid "Test"
@@ -957,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"
@@ -993,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
@@ -1019,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
@@ -1060,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
@@ -1081,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"
@@ -1206,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
@@ -1228,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
@@ -1252,7 +1208,7 @@ msgstr "הנפשה"
#: editor/animation_track_editor.cpp
msgid "Easing"
-msgstr ""
+msgstr "הקלה (אנימציה)"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
@@ -1387,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
@@ -1480,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)"
@@ -2246,7 +2202,7 @@ msgstr "פתיחה"
#: editor/dependency_editor.cpp
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "בעלים של: %s (סה\"כ: %d)"
#: editor/dependency_editor.cpp
msgid ""
@@ -2659,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:"
@@ -2804,7 +2760,7 @@ msgstr "בחירה"
#: editor/editor_export.cpp
msgid "Project export for platform:"
-msgstr ""
+msgstr "ייצוא פרויקט לפלטפורמה:"
#: editor/editor_export.cpp
#, fuzzy
@@ -2922,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
@@ -2931,7 +2887,7 @@ msgstr "התמרה"
#: editor/editor_export.cpp
msgid "64 Bits"
-msgstr ""
+msgstr "64 ביטים"
#: editor/editor_export.cpp
msgid "Embed PCK"
@@ -2944,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
@@ -3005,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"
@@ -3329,7 +3285,7 @@ msgstr "הצג/הסתר קבצים מוסתרים"
#: editor/editor_file_dialog.cpp
msgid "Disable Overwrite Warning"
-msgstr ""
+msgstr "השבת את אזהרת החלפה"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
@@ -3430,7 +3386,7 @@ msgstr "ייבוא משאבים (מחדש)"
#: editor/editor_file_system.cpp
msgid "Reimport Missing Imported Files"
-msgstr ""
+msgstr "ייבוא קבצים חסרים מחדש"
#: editor/editor_help.cpp scene/2d/camera_2d.cpp scene/gui/control.cpp
#: scene/gui/nine_patch_rect.cpp scene/resources/dynamic_font.cpp
@@ -3485,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"
@@ -3544,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
@@ -3636,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
@@ -3662,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
@@ -3683,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
@@ -3775,7 +3731,7 @@ msgstr "חלון חדש"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Unnamed Project"
-msgstr ""
+msgstr "פרויקט ללא שם"
#: editor/editor_node.cpp
msgid ""
@@ -3783,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."
@@ -3909,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 ""
@@ -3916,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!"
@@ -3977,7 +3941,7 @@ msgstr "אין סצנה מוגדרת להרצה."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "שמור סצנה לפני ריצה..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -4023,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
@@ -4324,11 +4289,11 @@ msgstr "החלפת לשונית סצנה"
#: editor/editor_node.cpp
msgid "Always Show Close Button"
-msgstr ""
+msgstr "תמיד הראה כפתור סגירה"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Resize If Many Tabs"
-msgstr ""
+msgstr "שינוי גודל כשטאבים מרובים"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Minimum Width"
@@ -4353,7 +4318,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Save On Focus Loss"
-msgstr ""
+msgstr "שמור באיבוד פוקוס"
#: editor/editor_node.cpp editor/editor_settings.cpp
#, fuzzy
@@ -4385,13 +4350,12 @@ msgid "Localize Settings"
msgstr "הגדרות"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Restore Scenes On Load"
-msgstr "מפרק TimeSeek"
+msgstr "שיחזור סצנה כשמבוצע טעינה"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Show Thumbnail On Hover"
-msgstr ""
+msgstr "הראה דוגמית בריחוף מעל"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Inspector"
@@ -4435,7 +4399,7 @@ msgstr "פתיחה במפקח"
#: editor/editor_node.cpp
msgid "Default Color Picker Mode"
-msgstr ""
+msgstr "מצב ברירת מחדל לבחירת צבעים"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Version Control"
@@ -5364,7 +5328,7 @@ msgstr "ערכה מוגדרת…"
#: editor/editor_settings.cpp
msgid "Icon And Font Color"
-msgstr ""
+msgstr "צבע איקון ופונט"
#: editor/editor_settings.cpp
#, fuzzy
@@ -5524,9 +5488,8 @@ msgid "Auto Indent"
msgstr "הזחה אוטומטית"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Convert Indent On Save"
-msgstr "המרת הזחות לרווחים"
+msgstr "המרת הזחות בשמירה"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
#, fuzzy
@@ -5586,7 +5549,6 @@ msgid "Show Line Numbers"
msgstr "שורה מספר:"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Line Numbers Zero Padded"
msgstr "שורה מספר:"
@@ -5613,7 +5575,7 @@ msgstr ""
#: editor/editor_settings.cpp
msgid "Show Line Length Guidelines"
-msgstr ""
+msgstr "הראה מדריך אורך קו"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Soft Column"
@@ -5647,7 +5609,7 @@ msgstr ""
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
msgid "Restore Scripts On Load"
-msgstr ""
+msgstr "שיחזור סקריפטים בעת טעינה"
#: editor/editor_settings.cpp
msgid "Auto Reload And Parse Scripts On Save"
@@ -5887,7 +5849,7 @@ msgstr ""
#: editor/editor_settings.cpp
msgid "Emulate 3 Button Mouse"
-msgstr ""
+msgstr "דמה עכבר בעל 3 כפתורים"
#: editor/editor_settings.cpp
msgid "Orbit Modifier"
@@ -11275,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 ""
@@ -12414,23 +12376,20 @@ msgid "Edit Items"
msgstr "עריכת מסננים"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Types:"
-msgstr "סוג"
+msgstr "סוגים:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type:"
-msgstr "סוג"
+msgstr "הוסף סוג:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item:"
-msgstr "הוספת קלט"
+msgstr "הוסף פריט:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add StyleBox Item"
-msgstr ""
+msgstr "הוסף פריט StyleBox"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -13243,9 +13202,10 @@ msgstr "הגדרות הצמדה"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "היסט רשת:"
@@ -13451,7 +13411,7 @@ msgstr ""
#: editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Passphrase"
-msgstr ""
+msgstr "סיסמת SSH"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -14667,13 +14627,13 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "לא ניתן לפתוח את ‚%s’."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -18440,7 +18400,7 @@ msgstr ""
#: modules/visual_script/visual_script_flow_control.cpp
msgid "While"
-msgstr ""
+msgstr "כל עוד"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "while (cond):"
@@ -20462,16 +20422,15 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "macOS"
-msgstr ""
+msgstr "macOS"
#: platform/osx/export/export.cpp
msgid "Force Builtin Codesign"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Architecture"
-msgstr "הוספת ערך ארכיטקטורה"
+msgstr "ארכיטקטורה"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20508,14 +20467,12 @@ msgid "Signing"
msgstr "אות"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Certificate"
-msgstr "קודקודים"
+msgstr "תעודה"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Algorithm"
-msgstr "ניפוי שגיאות"
+msgstr "אלגוריתם"
#: platform/uwp/export/export.cpp
msgid "Major"
@@ -20845,7 +20802,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."
@@ -20886,12 +20843,12 @@ 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
msgid "Flip H"
-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
msgid "Flip V"
-msgstr ""
+msgstr "הפוך אנכית"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
#, fuzzy
@@ -20931,7 +20888,7 @@ 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
@@ -20955,20 +20912,18 @@ msgstr "דריסה"
#: scene/2d/audio_stream_player_2d.cpp scene/audio/audio_stream_player.cpp
#: scene/gui/video_player.cpp servers/audio/effects/audio_effect_amplify.cpp
msgid "Volume dB"
-msgstr ""
+msgstr "ווליום בדציבלים"
#: 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
-#, fuzzy
msgid "Autoplay"
-msgstr "הפעלת/ביטול הפעלה אוטומטית"
+msgstr "הפעלה אוטומטית"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/audio/audio_stream_player.cpp
@@ -21861,9 +21816,8 @@ msgid "Rotation Degrees"
msgstr "הטיה של %s מעלות."
#: scene/2d/node_2d.cpp scene/3d/spatial.cpp
-#, fuzzy
msgid "Global Rotation"
-msgstr "קבוע"
+msgstr "רוטציה גלובלית"
#: scene/2d/node_2d.cpp
#, fuzzy
@@ -21887,12 +21841,11 @@ msgstr ""
#: scene/2d/parallax_background.cpp scene/gui/scroll_container.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Scroll"
-msgstr ""
+msgstr "גלול"
#: scene/2d/parallax_background.cpp
-#, fuzzy
msgid "Base Offset"
-msgstr "היסט רשת:"
+msgstr "סטייה מהבסיס"
#: scene/2d/parallax_background.cpp
#, fuzzy
@@ -21910,7 +21863,7 @@ msgstr "בסוף"
#: scene/2d/parallax_background.cpp
msgid "Ignore Camera Zoom"
-msgstr ""
+msgstr "התעלם מזום המצלמה"
#: scene/2d/parallax_layer.cpp
msgid ""
@@ -22215,15 +22168,15 @@ msgstr "יצירת תיקייה"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Collide With"
-msgstr ""
+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."
@@ -22264,11 +22217,11 @@ msgstr "לעצם זו אין תנוחת REST ראויה. עבור למפרק ה-
#: 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
@@ -22315,9 +22268,8 @@ msgid "Tile Origin"
msgstr ""
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Y Sort"
-msgstr "מיון"
+msgstr "מיון אנכי"
#: scene/2d/tile_map.cpp
#, fuzzy
@@ -22339,13 +22291,12 @@ msgid "Cell Clip UV"
msgstr ""
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Use Parent"
-msgstr "עריכת מצולע"
+msgstr "השתמש בהורה"
#: scene/2d/tile_map.cpp
msgid "Use Kinematic"
-msgstr ""
+msgstr "השתמש בפיזיקה קינמטית"
#: scene/2d/touch_screen_button.cpp
msgid "Shape Centered"
@@ -22380,7 +22331,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
@@ -22576,7 +22527,7 @@ msgstr "מסננים..."
#: scene/3d/baked_lightmap.cpp scene/resources/texture.cpp
msgid "Use HDR"
-msgstr ""
+msgstr "השתמש בHDR"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -22598,14 +22549,12 @@ msgid "Generate"
msgstr "כללי"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Max Size"
-msgstr "מבט קדמי"
+msgstr "גודל מקסימלי"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Custom Sky"
-msgstr "גזירת מפרקים"
+msgstr "שמיים מותאמים אישית"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -22613,9 +22562,8 @@ msgid "Custom Sky Rotation Degrees"
msgstr "הטיה של %s מעלות."
#: scene/3d/baked_lightmap.cpp scene/3d/ray_cast.cpp
-#, fuzzy
msgid "Custom Color"
-msgstr "גזירת מפרקים"
+msgstr "צבע מותאם אישית"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -22642,9 +22590,8 @@ msgid "Light Data"
msgstr "ימין"
#: scene/3d/bone_attachment.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Bone Name"
-msgstr "שם המפרק:"
+msgstr "שם מפרק"
#: scene/3d/camera.cpp
msgid "Keep Aspect"
@@ -22666,12 +22613,11 @@ msgstr "מיזם"
#: scene/3d/camera.cpp
msgid "FOV"
-msgstr ""
+msgstr "קוטר ראייה"
#: scene/3d/camera.cpp
-#, fuzzy
msgid "Frustum Offset"
-msgstr "היסט רשת:"
+msgstr "היסט רשת"
#: scene/3d/camera.cpp
#, fuzzy
@@ -23427,7 +23373,7 @@ msgstr "אותיות קטנות"
#: scene/3d/physics_joint.cpp
msgid "Motor"
-msgstr ""
+msgstr "מוטורי"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -24047,6 +23993,15 @@ msgstr "שגיאה!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "מיון"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -24350,7 +24305,7 @@ msgstr ""
#: scene/animation/skeleton_ik.cpp
msgid "Magnet"
-msgstr ""
+msgstr "מגנט"
#: scene/animation/skeleton_ik.cpp
#, fuzzy
@@ -25346,7 +25301,7 @@ msgstr "הוספת רצועה"
#: scene/gui/video_player.cpp scene/main/scene_tree.cpp scene/main/timer.cpp
msgid "Paused"
-msgstr ""
+msgstr "עצור"
#: scene/gui/video_player.cpp
#, fuzzy
@@ -25368,9 +25323,8 @@ msgid "Follow Viewport"
msgstr ""
#: scene/main/http_request.cpp
-#, fuzzy
msgid "Download File"
-msgstr "הורדה"
+msgstr "הורדת קובץ"
#: scene/main/http_request.cpp
#, fuzzy
@@ -25435,14 +25389,12 @@ msgid "Owner"
msgstr "בעלים של:"
#: scene/main/node.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Multiplayer"
-msgstr "קביעה מרובה:"
+msgstr "רב-משתתפים"
#: scene/main/node.cpp
-#, fuzzy
msgid "Custom Multiplayer"
-msgstr "קביעה מרובה:"
+msgstr "רב-משתתפים מותאם אישית"
#: scene/main/node.cpp
#, fuzzy
@@ -25475,7 +25427,7 @@ msgstr "שורש סצינה חדש"
#: scene/main/scene_tree.cpp
msgid "Root"
-msgstr ""
+msgstr "שורש"
#: scene/main/scene_tree.cpp
#, fuzzy
@@ -25540,7 +25492,7 @@ msgstr ""
#: scene/main/scene_tree.cpp scene/main/viewport.cpp
msgid "HDR"
-msgstr ""
+msgstr "HDR"
#: scene/main/scene_tree.cpp scene/main/viewport.cpp
msgid "Use 32 BPC Depth"
@@ -25573,9 +25525,8 @@ msgid ""
msgstr ""
#: scene/main/timer.cpp
-#, fuzzy
msgid "Autostart"
-msgstr "התחלה מחדש אוטומטית:"
+msgstr "התחלה אוטומטית"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25638,14 +25589,12 @@ msgid "Debanding"
msgstr "קישור"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Disable 3D"
-msgstr "מושבת"
+msgstr "השבת תלת מימד"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Keep 3D Linear"
-msgstr "ליניארי"
+msgstr "השאר תלת מימד לינארי"
#: scene/main/viewport.cpp
msgid "Render Direct To Screen"
@@ -25735,11 +25684,11 @@ msgstr "שם"
#: scene/register_scene_types.cpp
msgid "2D Render"
-msgstr ""
+msgstr "רנדור בדו-מימד"
#: scene/register_scene_types.cpp
msgid "3D Render"
-msgstr ""
+msgstr "רנדור בתלת-מימד"
#: scene/register_scene_types.cpp
#, fuzzy
@@ -25783,11 +25732,11 @@ msgstr "מפרק ערבוב"
#: scene/resources/audio_stream_sample.cpp
msgid "Stereo"
-msgstr ""
+msgstr "סטריאו"
#: scene/resources/concave_polygon_shape_2d.cpp
msgid "Segments"
-msgstr ""
+msgstr "חלקים"
#: scene/resources/curve.cpp
#, fuzzy
@@ -25796,11 +25745,11 @@ msgstr "חצי רזולוציה"
#: scene/resources/curve.cpp
msgid "Bake Interval"
-msgstr ""
+msgstr "זמן בין אפייה"
#: scene/resources/default_theme/default_theme.cpp
msgid "Panel"
-msgstr ""
+msgstr "לוח"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25839,7 +25788,7 @@ msgstr "לולאת הנפשה"
#: scene/resources/default_theme/default_theme.cpp
msgid "Arrow"
-msgstr ""
+msgstr "חץ"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25958,7 +25907,7 @@ msgstr "סנן אותות"
#: scene/resources/default_theme/default_theme.cpp
msgid "Minimum Spaces"
-msgstr ""
+msgstr "מינימום רווחים"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25967,11 +25916,11 @@ msgstr "B"
#: scene/resources/default_theme/default_theme.cpp
msgid "FG"
-msgstr ""
+msgstr "FG"
#: scene/resources/default_theme/default_theme.cpp
msgid "Tab"
-msgstr ""
+msgstr "לשונית"
#: scene/resources/default_theme/default_theme.cpp
#: scene/resources/dynamic_font.cpp scene/resources/world.cpp
@@ -26044,7 +25993,7 @@ msgstr ""
#: scene/resources/default_theme/default_theme.cpp
msgid "Decrement"
-msgstr ""
+msgstr "הורדה ב1"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26355,7 +26304,7 @@ msgstr "מושבת"
#: scene/resources/default_theme/default_theme.cpp
msgid "Menu"
-msgstr ""
+msgstr "תפריט"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26392,7 +26341,7 @@ msgstr ""
#: scene/resources/default_theme/default_theme.cpp
msgid "Large"
-msgstr ""
+msgstr "גדול"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26436,7 +26385,7 @@ msgstr "מבט שמאלי"
#: scene/resources/default_theme/default_theme.cpp
msgid "Screen Picker"
-msgstr ""
+msgstr "בוחר מהמסך"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26489,7 +26438,7 @@ msgstr "תכונות מרכזיות:"
#: scene/resources/default_theme/default_theme.cpp
msgid "Bold Italics Font"
-msgstr ""
+msgstr "גופן מודגש ומוטה"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26533,11 +26482,11 @@ msgstr "הזחה אוטומטית"
#: scene/resources/default_theme/default_theme.cpp
msgid "Minus"
-msgstr ""
+msgstr "מינוס"
#: scene/resources/default_theme/default_theme.cpp
msgid "More"
-msgstr ""
+msgstr "עוד"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26584,7 +26533,7 @@ msgstr "עותק"
#: scene/resources/dynamic_font.cpp
msgid "Hinting"
-msgstr ""
+msgstr "רמיזה"
#: scene/resources/dynamic_font.cpp
#, fuzzy
@@ -26598,7 +26547,7 @@ msgstr "מיקוד נתיב"
#: scene/resources/dynamic_font.cpp
msgid "Outline Size"
-msgstr ""
+msgstr "גודל קו מתאר"
#: scene/resources/dynamic_font.cpp
#, fuzzy
@@ -26627,11 +26576,11 @@ msgstr "קישור נתוני ‫מפרק"
#: scene/resources/environment.cpp
msgid "Background"
-msgstr ""
+msgstr "רקע"
#: scene/resources/environment.cpp scene/resources/sky.cpp
msgid "Sky"
-msgstr ""
+msgstr "שמיים"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26673,7 +26622,7 @@ msgstr "הנפשה"
#: scene/resources/environment.cpp
msgid "Fog"
-msgstr ""
+msgstr "אובך"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26746,7 +26695,7 @@ msgstr "ייצוא"
#: scene/resources/environment.cpp
msgid "White"
-msgstr ""
+msgstr "לבן"
#: scene/resources/environment.cpp
msgid "Auto Exposure"
@@ -26787,11 +26736,11 @@ msgstr "עומק"
#: scene/resources/environment.cpp scene/resources/material.cpp
msgid "Roughness"
-msgstr ""
+msgstr "חספוס"
#: scene/resources/environment.cpp
msgid "SSAO"
-msgstr ""
+msgstr "SSAO"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26813,7 +26762,7 @@ msgstr ""
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "טשטוש"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -26849,7 +26798,7 @@ msgstr "מפתחים"
#: scene/resources/environment.cpp
#: servers/audio/effects/audio_effect_chorus.cpp
msgid "1"
-msgstr ""
+msgstr "1"
#: scene/resources/environment.cpp
#: servers/audio/effects/audio_effect_chorus.cpp
@@ -28502,7 +28451,7 @@ msgstr "עריכת מצולע"
#: servers/visual_server.cpp
msgid "Max Active Spheres"
-msgstr ""
+msgstr "מקסימום כדורים אקטיביים"
#: servers/visual_server.cpp
#, fuzzy
diff --git a/editor/translations/hi.po b/editor/translations/hi.po
index 5e3b28ff79..229a1e6ee7 100644
--- a/editor/translations/hi.po
+++ b/editor/translations/hi.po
@@ -16,13 +16,14 @@
# harvinder rathor <harvinderr09@gmail.com>, 2021.
# Sumanyu Aggarwal <sumanyu.code@gmail.com>, 2021.
# Arin <upadhyay.arin@gmail.com>, 2022.
+# Anime Fanz <accc1431@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-06-08 06:48+0000\n"
-"Last-Translator: Arin <upadhyay.arin@gmail.com>\n"
+"PO-Revision-Date: 2022-12-05 04:25+0000\n"
+"Last-Translator: Anime Fanz <accc1431@gmail.com>\n"
"Language-Team: Hindi <https://hosted.weblate.org/projects/godot-engine/godot/"
"hi/>\n"
"Language: hi\n"
@@ -30,7 +31,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.13-dev\n"
+"X-Generator: Weblate 4.15-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -242,72 +243,71 @@ msgid "Connection"
msgstr "संबंध"
#: core/io/http_client.cpp
+#, fuzzy
msgid "Read Chunk Size"
-msgstr ""
+msgstr "चंक आकार पढ़ें"
#: core/io/marshalls.cpp
msgid "Object ID"
-msgstr ""
+msgstr "वस्तु आईडी"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
+#, fuzzy
msgid "Allow Object Decoding"
-msgstr ""
+msgstr "ऑब्जेक्ट डिकोडिंग की अनुमति दें"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
msgid "Refuse New Network Connections"
-msgstr ""
+msgstr "नए नेटवर्क कनेक्शन को मना करें"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
msgid "Network Peer"
-msgstr ""
+msgstr "नेटवर्क सहकर्मी"
#: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp
-#, fuzzy
msgid "Root Node"
-msgstr "एक नया बनाएं"
+msgstr "रूट नोड"
#: core/io/networked_multiplayer_peer.cpp
-#, fuzzy
msgid "Refuse New Connections"
-msgstr "जोड़िये"
+msgstr "नए कनेक्शनों को मना करें"
#: core/io/networked_multiplayer_peer.cpp
#, fuzzy
msgid "Transfer Mode"
-msgstr "सदस्यता बनाएं"
+msgstr "रीति का अंतरण करें"
#: core/io/packet_peer.cpp
msgid "Encode Buffer Max Size"
-msgstr ""
+msgstr "एनकोड बफर अधिकतम आकार"
#: core/io/packet_peer.cpp
msgid "Input Buffer Max Size"
-msgstr ""
+msgstr "इनपुट बफर अधिकतम आकार"
#: core/io/packet_peer.cpp
msgid "Output Buffer Max Size"
-msgstr ""
+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
msgid "Data Array"
-msgstr ""
+msgstr "डेटा ऐरे"
#: core/io/stream_peer_ssl.cpp
msgid "Blocking Handshake"
-msgstr ""
+msgstr "हैंडशेक ब्लॉक करना"
#: core/io/udp_server.cpp
-#, fuzzy
msgid "Max Pending Connections"
-msgstr "कनेक्शन संपादित करें:"
+msgstr "अधिकतम लंबित कनेक्शन"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -325,9 +325,8 @@ msgid "Not enough bytes for decoding bytes, or invalid format."
msgstr "अमान्य फ़ोर्मैट, या बाइट्स डिकोडिंग के लिए पर्याप्त बाइट्स नहीं।"
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid input %d (not passed) in expression"
-msgstr "एक्सप्रेशन मे अमान्य इनपुट %i (पास नहीं हो पाया)"
+msgstr "व्यंजक में अमान्य इनपुट %d (पास नहीं हुआ)"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -355,144 +354,141 @@ msgstr "'%s ' को कॉल करने पर:"
#: core/math/random_number_generator.cpp
#: modules/opensimplex/open_simplex_noise.cpp
+#, fuzzy
msgid "Seed"
-msgstr ""
+msgstr "बीज"
#: core/math/random_number_generator.cpp
+#, fuzzy
msgid "State"
-msgstr ""
+msgstr "राज्य"
#: core/message_queue.cpp
+#, fuzzy
msgid "Message Queue"
-msgstr ""
+msgstr "संदेश कतार"
#: core/message_queue.cpp
msgid "Max Size (KB)"
-msgstr ""
+msgstr "अधिकतम आकार (केबी)"
#: core/os/input.cpp
-#, fuzzy
msgid "Mouse Mode"
-msgstr "दृश्य रोकें"
+msgstr "माउस मोड"
#: core/os/input.cpp
msgid "Use Accumulated Input"
-msgstr ""
+msgstr "संचित इनपुट का प्रयोग करें"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: servers/audio_server.cpp
msgid "Device"
-msgstr ""
+msgstr "उपकरण"
#: core/os/input_event.cpp
+#, fuzzy
msgid "Alt"
-msgstr ""
+msgstr "ऑल्ट"
#: core/os/input_event.cpp
msgid "Shift"
-msgstr ""
+msgstr "शिफ्ट"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Control"
-msgstr "वर्जन कंट्रोल"
+msgstr "कंट्रोल"
#: core/os/input_event.cpp
msgid "Meta"
-msgstr ""
+msgstr "मेटा"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Command"
-msgstr "समुदाय"
+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
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Pressed"
msgstr "प्रीसेट"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Scancode"
-msgstr "स्रोतस्कैन कीजिये"
+msgstr "स्कैनकोड"
#: core/os/input_event.cpp
msgid "Physical Scancode"
-msgstr ""
+msgstr "भौतिक स्कैनकोड"
#: core/os/input_event.cpp
msgid "Unicode"
-msgstr ""
+msgstr "यूनिकोड"
#: core/os/input_event.cpp
msgid "Echo"
-msgstr ""
+msgstr "इको"
#: core/os/input_event.cpp scene/gui/base_button.cpp
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 ""
+msgstr "फैक्टर"
#: core/os/input_event.cpp
msgid "Button Index"
-msgstr ""
+msgstr "बटन अनुक्रमणिका"
#: core/os/input_event.cpp
msgid "Doubleclick"
-msgstr ""
+msgstr "डबलक्लिक"
#: core/os/input_event.cpp
msgid "Tilt"
-msgstr ""
+msgstr "टिल्ट"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pressure"
-msgstr "प्रीसेट"
+msgstr "प्रेशर"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "पेन उल्टा"
#: core/os/input_event.cpp
+#, fuzzy
msgid "Relative"
-msgstr ""
+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
#: scene/animation/animation_player.cpp scene/resources/environment.cpp
#: scene/resources/particles_material.cpp
msgid "Speed"
-msgstr ""
+msgstr "स्पीड"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: scene/3d/sprite_3d.cpp
msgid "Axis"
-msgstr ""
+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"
-msgstr ""
+msgstr "इंडेक्स"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: modules/visual_script/visual_script_nodes.cpp
@@ -503,60 +499,55 @@ msgstr "कार्य"
#: core/os/input_event.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp
msgid "Strength"
-msgstr ""
+msgstr "शक्ति"
#: core/os/input_event.cpp
msgid "Delta"
-msgstr ""
+msgstr "डेल्टा"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Channel"
-msgstr "बदली"
+msgstr "चैनल"
#: core/os/input_event.cpp main/main.cpp
-#, fuzzy
msgid "Message"
-msgstr "समुदाय"
+msgstr "मैसेज"
#: core/os/input_event.cpp
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
msgid "Velocity"
-msgstr ""
+msgstr "वेग"
#: core/os/input_event.cpp
msgid "Instrument"
-msgstr ""
+msgstr "साधन"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Controller Number"
-msgstr "लाइन क्र.:"
+msgstr "नियंत्रक संख्या"
#: core/os/input_event.cpp
msgid "Controller Value"
-msgstr ""
+msgstr "नियंत्रक मान"
#: 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 "कार्य"
+msgstr "अनुप्रयोग"
#: core/project_settings.cpp main/main.cpp
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
@@ -582,47 +573,44 @@ msgstr "विवरण"
#: main/main.cpp platform/android/export/export_plugin.cpp
#: platform/javascript/export/export.cpp
msgid "Run"
-msgstr ""
+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
-#, fuzzy
msgid "Disable stdout"
msgstr "बंद कर दिया गया है"
#: core/project_settings.cpp
-#, fuzzy
msgid "Disable stderr"
msgstr "बंद कर दिया गया है"
#: core/project_settings.cpp
msgid "Use Hidden Project Data Directory"
-msgstr ""
+msgstr "छिपी हुई प्रोजेक्ट डेटा निर्देशिका का उपयोग करें"
#: core/project_settings.cpp
msgid "Use Custom User Dir"
-msgstr ""
+msgstr "कस्टम उपयोगकर्ता डायरेक्टरी का उपयोग करें"
#: 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
#: 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
@@ -631,19 +619,19 @@ msgstr ""
#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp
#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp
msgid "Height"
-msgstr ""
+msgstr "ऊंचाई"
#: core/project_settings.cpp
msgid "Always On Top"
-msgstr ""
+msgstr "हमेशा शीर्ष पर"
#: core/project_settings.cpp
msgid "Test Width"
-msgstr ""
+msgstr "परीक्षण चौड़ाई"
#: core/project_settings.cpp
msgid "Test Height"
-msgstr ""
+msgstr "परीक्षण ऊंचाई"
#: core/project_settings.cpp editor/animation_track_editor.cpp
#: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp
@@ -651,9 +639,8 @@ msgid "Audio"
msgstr "ऑडियो"
#: core/project_settings.cpp
-#, fuzzy
msgid "Default Bus Layout"
-msgstr "प्रायिक बस लेआउट लोड कीजिये."
+msgstr "डिफ़ॉल्ट बस लेआउट"
#: core/project_settings.cpp editor/editor_export.cpp
#: editor/editor_file_system.cpp editor/editor_node.cpp
@@ -664,93 +651,84 @@ 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
msgid "Input"
-msgstr ""
+msgstr "इनपुट"
#: core/project_settings.cpp
msgid "UI Accept"
-msgstr ""
+msgstr "उपयोगकर्ता हस्तक्षेप स्वीकार करें"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Select"
-msgstr "चुनें"
+msgstr "उपयोगकर्ता हस्तक्षेप का चयन करें"
#: core/project_settings.cpp
-#, fuzzy
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
msgid "UI Left"
-msgstr ""
+msgstr "उपयोगकर्ता हस्तक्षेप छोड़ दिया गया"
#: core/project_settings.cpp
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
-#, fuzzy
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
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
@@ -760,9 +738,8 @@ msgstr ""
#: servers/physics_2d/physics_2d_server_wrap_mt.h
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
-#, fuzzy
msgid "Physics"
-msgstr "फिजिक्स फ्रेम %"
+msgstr "फिजिक्स"
#: core/project_settings.cpp editor/editor_settings.cpp
#: editor/import/resource_importer_layered_texture.cpp
@@ -772,11 +749,11 @@ msgstr "फिजिक्स फ्रेम %"
#: scene/3d/physics_body.cpp scene/resources/world.cpp
#: servers/physics/space_sw.cpp servers/physics_server.cpp
msgid "3D"
-msgstr ""
+msgstr "3 डी"
#: core/project_settings.cpp
msgid "Smooth Trimesh Collision"
-msgstr ""
+msgstr "त्रिमेश की टक्कर"
#: core/project_settings.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles2/rasterizer_scene_gles2.cpp
@@ -788,7 +765,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
@@ -798,18 +775,17 @@ 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
#: servers/visual_server.cpp
-#, fuzzy
msgid "Filters"
-msgstr "फिल्टर:"
+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
@@ -825,86 +801,81 @@ msgstr "डीबग करें"
#: core/project_settings.cpp main/main.cpp modules/gdscript/gdscript.cpp
#: modules/visual_script/visual_script.cpp scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Settings"
-msgstr "एडीटर सेटिन्गस..."
+msgstr "सेटिंग्स"
#: core/project_settings.cpp editor/script_editor_debugger.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
msgid "Profiler"
-msgstr ""
+msgstr "प्रोफाइलर"
#: core/project_settings.cpp
-#, fuzzy
msgid "Max Functions"
-msgstr "कार्यों:"
+msgstr "मैक्स फ़ंक्शन"
#: core/project_settings.cpp scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Compression"
-msgstr "सदस्यता बनाएं"
+msgstr "कंप्रेशन"
#: core/project_settings.cpp
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"
-msgstr ""
+msgstr "एंड्रॉयड"
#: core/project_settings.cpp
msgid "Modules"
-msgstr ""
+msgstr "मॉड्यूल"
#: core/register_core_types.cpp
msgid "TCP"
-msgstr ""
+msgstr "टीसीपी"
#: core/register_core_types.cpp
-#, fuzzy
msgid "Connect Timeout Seconds"
-msgstr "Node से कनेक्ट करें:"
+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 "मैक्स बफर (2 की शक्ति)"
#: core/register_core_types.cpp editor/editor_settings.cpp main/main.cpp
msgid "SSL"
-msgstr ""
+msgstr "एसएसएल"
#: core/register_core_types.cpp main/main.cpp
-#, fuzzy
msgid "Certificates"
-msgstr "विशेषता"
+msgstr "प्रमाणपत्र"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_resource_picker.cpp
@@ -913,9 +884,8 @@ msgid "Resource"
msgstr "संसाधन"
#: core/resource.cpp
-#, fuzzy
msgid "Local To Scene"
-msgstr "क्लोज सीन"
+msgstr "स्थानीय से दृश्य"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_autoload_settings.cpp editor/plugins/path_editor_plugin.cpp
@@ -925,21 +895,20 @@ msgid "Path"
msgstr "पथ"
#: core/script_language.cpp
-#, fuzzy
msgid "Source Code"
-msgstr "संसाधन"
+msgstr "स्रोत कोड"
#: core/translation.cpp editor/project_settings_editor.cpp
msgid "Locale"
-msgstr ""
+msgstr "लोकेल"
#: core/translation.cpp
msgid "Test"
-msgstr ""
+msgstr "टेस्ट"
#: core/translation.cpp scene/resources/font.cpp
msgid "Fallback"
-msgstr ""
+msgstr "फ़ॉलबैक"
#: core/ustring.cpp scene/resources/segment_shape_2d.cpp
msgid "B"
@@ -975,17 +944,17 @@ 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
msgid "Canvas Polygon Buffer Size (KB)"
-msgstr ""
+msgstr "कैनवास बहुभुज बफर आकार (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
msgid "Canvas Polygon Index Buffer Size (KB)"
-msgstr ""
+msgstr "कैनवास बहुभुज सूचकांक बफर आकार (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp
@@ -997,28 +966,27 @@ msgstr ""
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/visual_server.cpp
msgid "2D"
-msgstr ""
+msgstr "2डी"
#: 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
msgid "Use GPU Pixel Snap"
-msgstr ""
+msgstr "GPU Pixel Snap का उपयोग करें"
#: 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
msgid "Lightmapping"
-msgstr ""
+msgstr "लाइटमैपिंग"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
@@ -11097,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 ""
@@ -13001,9 +12969,10 @@ msgstr "आकस्मिक:"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14399,12 +14368,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -23488,6 +23456,15 @@ msgstr "प्रतिमा"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "आयात:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/hr.po b/editor/translations/hr.po
index b634136191..d3ea72cf63 100644
--- a/editor/translations/hr.po
+++ b/editor/translations/hr.po
@@ -5,14 +5,16 @@
# Unlimited Creativity <marinosah1@gmail.com>, 2019.
# Patik <patrikfs5@gmail.com>, 2019.
# Nikola Bunjevac <nikola.bunjevac@gmail.com>, 2019, 2020.
-# LeoClose <leoclose575@gmail.com>, 2020, 2021.
+# 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-07-23 03:57+0000\n"
-"Last-Translator: Filip <fhomolka@protonmail.com>\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"
@@ -20,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-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -28,16 +30,15 @@ msgstr "Upravljački program za Tablet"
#: core/bind/core_bind.cpp
msgid "Clipboard"
-msgstr ""
+msgstr "Međuspremnik"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Current Screen"
-msgstr "Premjesti Okvir"
+msgstr "Trenutni Ekran"
#: core/bind/core_bind.cpp
msgid "Exit Code"
-msgstr ""
+msgstr "Exit Kod"
#: core/bind/core_bind.cpp
msgid "V-Sync Enabled"
@@ -77,38 +78,31 @@ msgstr "Orijentacija zaslona"
#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp
#: platform/uwp/os_uwp.cpp
-#, fuzzy
msgid "Window"
msgstr "Prozor"
#: core/bind/core_bind.cpp core/project_settings.cpp
-#, fuzzy
msgid "Borderless"
msgstr "Bez obruba"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Per Pixel Transparency Enabled"
msgstr "Omogućena prozirnost po pikselu"
#: core/bind/core_bind.cpp core/project_settings.cpp
-#, fuzzy
msgid "Fullscreen"
msgstr "Cijeli zaslon"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Maximized"
msgstr "Maksimiziran"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Minimized"
msgstr "Minimiziran"
#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp
#: scene/gui/graph_node.cpp
-#, fuzzy
msgid "Resizable"
msgstr "Mogućnost promjene veličine"
@@ -117,7 +111,6 @@ msgstr "Mogućnost promjene veličine"
#: scene/3d/physics_body.cpp scene/3d/remote_transform.cpp
#: scene/gui/control.cpp scene/gui/line_edit.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Position"
msgstr "Pozicija"
@@ -130,38 +123,32 @@ msgstr "Pozicija"
#: scene/resources/primitive_meshes.cpp scene/resources/sky.cpp
#: scene/resources/style_box.cpp scene/resources/texture.cpp
#: scene/resources/visual_shader.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Size"
msgstr "Veličina"
#: core/bind/core_bind.cpp
msgid "Endian Swap"
-msgstr ""
+msgstr "Promjena Endian-a"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Editor Hint"
msgstr "Savjet Urednika"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Print Error Messages"
msgstr "Ispis poruka o pogreškama"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Iterations Per Second"
msgstr "Iteracije u sekundi"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Target FPS"
msgstr "Ciljani FPS"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Time Scale"
-msgstr "Vremenska skala"
+msgstr "Skala vremena"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Physics Jitter Fix"
@@ -169,7 +156,7 @@ msgstr ""
#: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Error"
-msgstr ""
+msgstr "Greška"
#: core/bind/core_bind.cpp
#, fuzzy
@@ -342,7 +329,7 @@ msgstr "Neispravan unos %i (nije uspio) u izrazu"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr "self se ne može koristiti jer instanca je null (nije prosljeđena)"
+msgstr "self se ne može koristiti jer je instanca null (nije prosljeđena)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -1414,7 +1401,7 @@ msgstr "Okidač"
#: editor/animation_track_editor.cpp scene/3d/baked_lightmap.cpp
msgid "Capture"
-msgstr ""
+msgstr "Snimka"
#: editor/animation_track_editor.cpp
msgid "Nearest"
@@ -3446,7 +3433,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Enumerations"
-msgstr ""
+msgstr "Nabrajanja"
#: editor/editor_help.cpp
msgid "Property Descriptions"
@@ -10838,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 ""
@@ -12668,9 +12655,10 @@ msgstr "Opcije Klase"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14046,12 +14034,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22939,6 +22926,15 @@ msgstr "Greška!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Zalijepi Animaciju"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
@@ -24308,9 +24304,8 @@ msgid "Draw 2D Outlines"
msgstr ""
#: scene/main/scene_tree.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Reflections"
-msgstr "Direkcije"
+msgstr "Reflekcija"
#: scene/main/scene_tree.cpp
msgid "Atlas Size"
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index 996249e619..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 ""
@@ -13160,9 +13160,10 @@ msgstr "Illesztési beállítások"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Rács Eltolás:"
@@ -14544,13 +14545,13 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "A projekt nem nyitható meg a(z) %s helyen."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -23781,6 +23782,15 @@ msgstr "Hiba!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Rendezés"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/id.po b/editor/translations/id.po
index 696799d370..47b026986a 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -40,13 +40,15 @@
# Rizky Ramadhan <rizkyterm@gmail.com>, 2022.
# 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-07-31 18:34+0000\n"
-"Last-Translator: ProgrammerIndonesia 44 <elo.jhy@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"
@@ -54,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-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -2800,7 +2802,7 @@ msgstr "Pilih"
#: editor/editor_export.cpp
msgid "Project export for platform:"
-msgstr ""
+msgstr "Proyek ekspor untuk platform:"
#: editor/editor_export.cpp
#, fuzzy
@@ -2849,9 +2851,8 @@ msgid "Can't open file to read from path \"%s\"."
msgstr "Tidak dapat membuka file untuk menulis:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Save ZIP"
-msgstr "Simpan Sebagai"
+msgstr "Simpan ZIP"
#: editor/editor_export.cpp
msgid ""
@@ -2878,7 +2879,7 @@ msgid ""
msgstr ""
"Platform target membutuhkan kompressi tekstur 'ETC' untuk mengembalikan "
"driver ke GLES2. \n"
-"Aktifkan 'Impor Lainnya' di Pengaturan Proyek, atau matikan 'Driver Fallback "
+"Aktifkan 'Impor Etc' di Pengaturan Proyek, atau matikan 'Driver Fallback "
"Enabled'."
#: editor/editor_export.cpp
@@ -2895,7 +2896,7 @@ msgid ""
"Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings."
msgstr ""
"Platform target membutuhkan kompresi tekstur 'ETC2' atau 'PVRTC' untuk "
-"GLES3. Aktifkan 'Impor Lainnya 2' atau 'Import Pvrtc' di Pengaturan Proyek."
+"GLES3. Aktifkan 'Impor Etc 2' atau 'Import Pvrtc' di Pengaturan Proyek."
#: editor/editor_export.cpp
msgid ""
@@ -2930,7 +2931,7 @@ msgstr "Operator warna."
#: editor/editor_export.cpp
msgid "64 Bits"
-msgstr ""
+msgstr "64 Bits"
#: editor/editor_export.cpp
msgid "Embed PCK"
@@ -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]"
@@ -13105,9 +13106,10 @@ msgstr "Opsi-opsi Snap"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Pengimbangan:"
@@ -14569,16 +14571,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Lokasi proyek tidak valid (mengubah sesuatu?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Tidak dapat memuat project.godot dalam lokasi proyek (galat %d). Mungkin "
"berkas itu tidak ada atau rusak."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Tidak dapat menyunting project.godot dalam lokasi proyek."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Tidak dapat membuka proyek di '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -20763,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"
@@ -23964,6 +23966,16 @@ msgstr "Galat"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Urutkan"
+
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Use AABB Center"
+msgstr "Gunakan Sebagai Kemudi"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/ig.po b/editor/translations/ig.po
index 8d96de35f3..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 ""
@@ -12357,9 +12357,10 @@ msgstr ""
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13688,12 +13689,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22185,6 +22185,14 @@ msgstr ""
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr ""
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/is.po b/editor/translations/is.po
index 8514155c68..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 ""
@@ -12635,9 +12635,10 @@ msgstr "Val á kvarða"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14004,12 +14005,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22783,6 +22783,15 @@ msgstr ""
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Stillið breyting á:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/it.po b/editor/translations/it.po
index c520b1567d..6010f082aa 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -61,7 +61,7 @@
# Daniele Basso <tiziodcaio@gmail.com>, 2021.
# Riteo Siuga <riteo@posteo.net>, 2021, 2022.
# Luigi <luibass92@live.it>, 2021.
-# Micky <micheledevita2@gmail.com>, 2021.
+# Micky <micheledevita2@gmail.com>, 2021, 2022.
# Fabio Plos <altre0cose@gmail.com>, 2021.
# Theraloss <danilo.polani@gmail.com>, 2021.
# Pietro Grungo <pietro.grungo@libero.it>, 2021.
@@ -72,13 +72,18 @@
# Gico2006 <gradaellig@protonmail.com>, 2022.
# 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, 2023.
+# Silvia Scaglione <sissisoad@gmail.com>, 2022.
+# Cosimo Davide Viggiano <cosimod089@gmail.com>, 2022.
+# Francesco Cammarata <francescocammarata.fr@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-08-30 03:11+0000\n"
-"Last-Translator: Mirko <miknsop@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"
@@ -86,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.14.1-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -212,7 +217,7 @@ msgstr "Target FPS"
#: core/bind/core_bind.cpp
msgid "Time Scale"
-msgstr "Scala Temporale"
+msgstr "Scala temporale"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Physics Jitter Fix"
@@ -407,7 +412,7 @@ msgstr "Alla chiamata di '%s':"
#: core/math/random_number_generator.cpp
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Seed"
-msgstr "Seed"
+msgstr "Seme"
#: core/math/random_number_generator.cpp
msgid "State"
@@ -455,7 +460,6 @@ msgid "Command"
msgstr "Comando"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Physical"
msgstr "Fisico"
@@ -466,16 +470,14 @@ msgid "Pressed"
msgstr "Premuto"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Scancode"
-msgstr "Scancode"
+msgstr "Codice di scansione"
#: core/os/input_event.cpp
msgid "Physical Scancode"
-msgstr "Scancode Fisico"
+msgstr "Codice di Scansione Fisico"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Unicode"
msgstr "Unicode"
@@ -513,7 +515,7 @@ msgstr "Pressione"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "Penna Invertita"
#: core/os/input_event.cpp
msgid "Relative"
@@ -1020,7 +1022,7 @@ msgstr "2D"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
msgid "Snapping"
-msgstr "Ancoraggio"
+msgstr "Scatto"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
@@ -1353,7 +1355,6 @@ msgid "Remove this track."
msgstr "Rimuovi questa traccia."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Time (s):"
msgstr "Tempo (s):"
@@ -1388,14 +1389,12 @@ msgid "Easing:"
msgstr "Allentamento:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "In-Handle:"
-msgstr "Imposta Maniglia"
+msgstr "In Gestione:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Out-Handle:"
-msgstr "Imposta Maniglia"
+msgstr "Fuori Gestione:"
#: editor/animation_track_editor.cpp
msgid "Stream:"
@@ -1539,7 +1538,6 @@ msgid "animation"
msgstr "animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "AnimationPlayer can't animate itself, only other players."
msgstr "AnimationPlayer non può animare se stesso, solo altri nodi."
@@ -2602,7 +2600,7 @@ msgstr "File \"%s\" assente."
#: editor/editor_audio_buses.cpp
msgid "Layout:"
-msgstr ""
+msgstr "Disposizione:"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -2806,21 +2804,18 @@ msgid "Choose"
msgstr "Scegli"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Project export for platform:"
-msgstr "Esportazione del progetto per la piattaforma:"
+msgstr "Esportazione del progetto per piattaforma:"
#: editor/editor_export.cpp
msgid "Completed with warnings."
msgstr "Completato con avvertimenti."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed successfully."
msgstr "Completato con successo."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed."
msgstr "Fallito."
@@ -2837,7 +2832,6 @@ msgid "Packing"
msgstr "Impacchettando"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Save PCK"
msgstr "Salva PCK"
@@ -2846,16 +2840,14 @@ msgid "Cannot create file \"%s\"."
msgstr "impossibile creare il file \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to export project files."
-msgstr "Impossibile esportare i file del progetto"
+msgstr "Esportazione dei file di progetto fallita."
#: editor/editor_export.cpp
msgid "Can't open file to read from path \"%s\"."
msgstr "impossibile aprire file da leggere dalla path \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Save ZIP"
msgstr "Salva ZIP"
@@ -2962,9 +2954,8 @@ msgid "ETC2"
msgstr "ETC2"
#: editor/editor_export.cpp
-#, fuzzy
msgid "No BPTC Fallbacks"
-msgstr "Nessun fallback per la BPTC"
+msgstr "Nessun fallback per BPTC"
#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
@@ -2979,30 +2970,25 @@ msgid "Custom release template not found."
msgstr "Modello di rilascio personalizzato non trovato."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Prepare Template"
-msgstr "Gestisci i modelli d'esportazione"
+msgstr "Prepara Modello"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "The given export path doesn't exist."
-msgstr "Il percorso di esportazione specificato non esiste:"
+msgstr "Il percorso di esportazione specificato non esiste."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found: \"%s\"."
-msgstr "File del modello non trovato:"
+msgstr "File modello non trovato: \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to copy export template."
-msgstr "Template di esportazione non valido:"
+msgstr "Copiatura del modello di esportazione fallita."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
-#, fuzzy
msgid "PCK Embedding"
-msgstr "Padding"
+msgstr "Incorporazione PCK"
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
@@ -3179,7 +3165,7 @@ msgstr "Rendi attuale"
#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
#: modules/fbx/editor_scene_importer_fbx.cpp
msgid "Import"
-msgstr "Importa"
+msgstr "Importare"
#: editor/editor_feature_profile.cpp editor/project_export.cpp
#: platform/android/export/export.cpp platform/android/export/export_plugin.cpp
@@ -3301,7 +3287,7 @@ msgstr "Accedi"
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp
msgid "Display Mode"
-msgstr "Modalità Visualizzazione"
+msgstr "Modalità di visualizzazione"
#: editor/editor_file_dialog.cpp
#: editor/import/resource_importer_layered_texture.cpp
@@ -4094,7 +4080,7 @@ msgstr "Niente da annullare."
#: editor/editor_node.cpp
msgid "Undo: %s"
-msgstr "Annulla"
+msgstr "Annulla: %s"
#: editor/editor_node.cpp
msgid "Can't redo while mouse buttons are pressed."
@@ -5184,7 +5170,6 @@ msgid "Size:"
msgstr "Dimensione:"
#: editor/editor_properties_array_dict.cpp
-#, fuzzy
msgid "Page:"
msgstr "Pagina:"
@@ -5284,9 +5269,8 @@ msgstr ""
"esistente come eseguibile."
#: editor/editor_run_native.cpp
-#, fuzzy
msgid "Project Run"
-msgstr "Progetto"
+msgstr "Esegui Progetto"
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
@@ -5318,11 +5302,11 @@ msgstr "Lingua dell'Editor"
#: editor/editor_settings.cpp
msgid "Display Scale"
-msgstr "Dimensione Display"
+msgstr "Scala di visualizzazione"
#: editor/editor_settings.cpp
msgid "Custom Display Scale"
-msgstr "Dimensione Display Personalizzata"
+msgstr "Scala di visualizzazione personalizzata"
#: editor/editor_settings.cpp
msgid "Main Font Size"
@@ -5568,13 +5552,12 @@ msgid "Mouse Extra Buttons Navigate History"
msgstr "Uso dei tasti aggiuntivi del mouse per navigare la cronologia"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Drag And Drop Selection"
-msgstr "Selezione GridMap"
+msgstr "Selezione Drag And Drop"
#: editor/editor_settings.cpp
msgid "Stay In Script Editor On Node Selected"
-msgstr ""
+msgstr "Rimani nell'editor degli script quando un nodo è selezionato"
#: editor/editor_settings.cpp
msgid "Appearance"
@@ -5614,7 +5597,7 @@ msgstr "Mostra Linee Guida della Lunghezza della Linea"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Soft Column"
-msgstr ""
+msgstr "Margine suggerito per lunghezza riga"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Hard Column"
@@ -5732,7 +5715,6 @@ msgid "Help Font Size"
msgstr "Dimensione Carattere della Guida"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Help Source Font Size"
msgstr "Dimensione dei caratteri della sezione d'assistenza codice sorgente"
@@ -5842,7 +5824,6 @@ msgid "Lightmap Baking Number Of CPU Threads"
msgstr "Numero di Threads CPU del Baking di Lightmap"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Navigation Scheme"
msgstr "Schema di Navigazione"
@@ -5871,9 +5852,8 @@ msgid "Orbit Modifier"
msgstr "Modificatore Orbita"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Modifier"
-msgstr "Modificatore di Pan"
+msgstr "Modificatore Pan"
#: editor/editor_settings.cpp
msgid "Zoom Modifier"
@@ -5884,9 +5864,8 @@ msgid "Warped Mouse Panning"
msgstr "Panning Continuo Del Mouse"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Navigation Feel"
-msgstr "Sensazione Navigazione"
+msgstr "Sensazione della Navigazione"
#: editor/editor_settings.cpp
msgid "Orbit Sensitivity"
@@ -5942,7 +5921,7 @@ msgstr "Colore Guide"
#: editor/editor_settings.cpp
msgid "Smart Snapping Line Color"
-msgstr "Colore Linea Agganciamento Intelligente"
+msgstr "Colore della linea dello scatto intelligente"
#: editor/editor_settings.cpp
msgid "Bone Width"
@@ -5961,9 +5940,8 @@ msgid "Bone Selected Color"
msgstr "Colore Osso Selezionato"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone IK Color"
-msgstr "Colore IK Osso"
+msgstr "Colore Osso IK"
#: editor/editor_settings.cpp
msgid "Bone Outline Color"
@@ -5999,7 +5977,6 @@ msgid "Poly Editor"
msgstr "Editor Poly"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Point Grab Radius"
msgstr "Raggio Afferramento Punti"
@@ -6112,9 +6089,8 @@ msgid "Keyword Color"
msgstr "Colore Parola Chiave"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Control Flow Keyword Color"
-msgstr "Colore Parola Chiave Controllo Flusso"
+msgstr "Colore della Parola Chiave del Controllo Flusso"
#: editor/editor_settings.cpp
msgid "Base Type Color"
@@ -6956,7 +6932,6 @@ msgid "Delimiter"
msgstr "Delimitatore"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "ColorCorrect"
msgstr "Correzione Colore"
@@ -6987,7 +6962,7 @@ msgstr "Filtro"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
msgid "Mipmaps"
-msgstr "Mipmaps"
+msgstr "Mappe errate"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
@@ -7093,7 +7068,7 @@ msgstr "Nome Root"
#: editor/import/resource_importer_scene.cpp
msgid "Root Scale"
-msgstr "Scala Root"
+msgstr "Scala di radice"
#: editor/import/resource_importer_scene.cpp
msgid "Custom Script"
@@ -7214,9 +7189,8 @@ msgid "Generating Lightmaps"
msgstr "Generando Lightmap"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Generating for Mesh:"
-msgstr "Generazione della Mesh:"
+msgstr "Generando per il Mesh:"
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
@@ -7248,12 +7222,17 @@ 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: Rilevato uso della texture come mappa Normale in 3D. Sarà abilitata la "
+"compressione rosso-verde della texture per ridurre l'uso di memoria (il "
+"canale blu è ignorato)."
#: 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: Rilevato uso della texture in 3D. Sarà abilitato filtraggio, "
+"ripetizione, generazione delle mipmap e compressione della texture in VRAM."
#: editor/import/resource_importer_texture.cpp
msgid "2D, Detect 3D"
@@ -8020,7 +7999,7 @@ msgstr "Posizione animazione (in secondi)."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Scale animation playback globally for the node."
-msgstr "Scala playback dell'animazione globalmente per il nodo."
+msgstr "Scala la riproduzione dell'animazione globalmente per il nodo."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Tools"
@@ -8224,7 +8203,6 @@ msgid "Set the end animation. This is useful for sub-transitions."
msgstr "Assegna l'animazione finale. Utile per le sotto-transizioni."
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition:"
msgstr "Transizione:"
@@ -8338,12 +8316,13 @@ msgid "Blend4 Node"
msgstr "Nodo Blend4"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#, fuzzy
msgid "TimeScale Node"
msgstr "Nodo TimeScale"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "TimeSeek Node"
-msgstr "Nodo TimeScale"
+msgstr "Nodo TimeSeek"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Transition Node"
@@ -8475,7 +8454,7 @@ msgstr "Errore nel fare richiesta"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Idle"
-msgstr "Inattivo"
+msgstr "Inattività"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Install..."
@@ -8665,7 +8644,7 @@ msgstr "Anteprima"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Configure Snap"
-msgstr "Configura Agganciamento"
+msgstr "Configura scatto"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Offset:"
@@ -8741,7 +8720,7 @@ msgstr "Sposta Ancora CanvasItem \"%s\""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale Node2D \"%s\" to (%s, %s)"
-msgstr "Scala Node2D \"%s\" a (%s, %s)"
+msgstr "Ridimensiona Node2D \"%s\" a (%s, %s)"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Resize Control \"%s\" to (%d, %d)"
@@ -8749,11 +8728,11 @@ msgstr "Ridimensiona Control \"%s\" a (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale %d CanvasItems"
-msgstr "Scala %d CanvasItem"
+msgstr "Ridimensiona %d CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale CanvasItem \"%s\" to (%s, %s)"
-msgstr "Scala CanvasItem \"%s\" a (%s, %s)"
+msgstr "Ridimensiona CanvasItem \"%s\" a (%s, %s)"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move %d CanvasItems"
@@ -8970,7 +8949,7 @@ msgstr "Alt+Trascina: Muovi nodo selezionato."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Alt+Drag: Scale selected node."
-msgstr "Alt+Trascina: Ridimensiona il nodo selezionato."
+msgstr "Alt+Trascinamento: Ridimensiona il nodo selezionato."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "V: Set selected node's pivot position."
@@ -9004,7 +8983,7 @@ msgstr "Modalità scala"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Shift: Scale proportionally."
-msgstr "Shift: Ridimensiona proporzionalmente."
+msgstr "Maiusc: Ridimensiona proporzionalmente."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9029,7 +9008,7 @@ msgstr "Modalità Righello"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Toggle smart snapping."
-msgstr "Commuta l'agganciamento intelligente."
+msgstr "Commuta lo scatto intelligente."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Smart Snap"
@@ -9045,7 +9024,7 @@ msgstr "Usa la griglia magnetica"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snapping Options"
-msgstr "Opzioni Agganciamento"
+msgstr "Opzioni dello scatto"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Rotation Snap"
@@ -9053,19 +9032,19 @@ msgstr "Aggancia Rotazione"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Scale Snap"
-msgstr "Aggancia Ridimensionamento"
+msgstr "Scatta la scala"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
-msgstr "Agganciamento Relativo"
+msgstr "Scatto relativo"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Pixel Snap"
-msgstr "Agganciamento su Pixel"
+msgstr "Scatta sui pixel"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Smart Snapping"
-msgstr "Agganciamento Intelligente"
+msgstr "Scatto intelligente"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9164,7 +9143,7 @@ msgstr "Mostra"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show When Snapping"
-msgstr "Mostra Se Agganciamento"
+msgstr "Mostra durante lo scatto"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Hide"
@@ -9229,7 +9208,7 @@ msgstr "Maschera di rotazione per l'inserimento delle chiavi."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale mask for inserting keys."
-msgstr "Maschera di scala per l'inserimento delle chiavi."
+msgstr "Scala maschera per l'inserimento delle chiavi."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert keys (based on mask)."
@@ -9355,8 +9334,8 @@ msgid ""
"Drag & drop + Shift : Add node as sibling\n"
"Drag & drop + Alt : Change node type"
msgstr ""
-"Trascina & Rilascia + Shift : Aggiungi nodo come fratello\n"
-"Trascina & Rilascia + Alt : Cambia tipo del nodo"
+"Trascina e Rilascia + Shift : Aggiungi nodo come fratello\n"
+"Trascina e Rilascia + Alt : Cambia tipo del nodo"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Polygon3D"
@@ -9452,7 +9431,7 @@ msgstr "Flat 0"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat 1"
-msgstr "Flat 1"
+msgstr "Flat 1Flat 1"
#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
msgid "Ease In"
@@ -9532,7 +9511,7 @@ msgstr "Scambia Punti di Riempimento del Gradiente"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
msgid "Toggle Grid Snap"
-msgstr "Commuta Agganciamento Griglia"
+msgstr "Commuta scatto sulla griglia"
#: editor/plugins/item_list_editor_plugin.cpp editor/project_export.cpp
#: scene/3d/label_3d.cpp scene/gui/button.cpp scene/gui/dialogs.cpp
@@ -9550,7 +9529,6 @@ msgid "Icon"
msgstr "Icona"
#: editor/plugins/item_list_editor_plugin.cpp
-#, fuzzy
msgid "ID"
msgstr "ID"
@@ -9719,7 +9697,6 @@ msgstr ""
"collisioni."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Collision Sibling"
msgstr "Crea Fratello di Collisione Convessa Semplificato"
@@ -9919,7 +9896,7 @@ msgstr "Inclinazione Casuale:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Scale:"
-msgstr "Scala Casuale:"
+msgstr "Scala casuale:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate"
@@ -9999,9 +9976,8 @@ msgid "Volume"
msgstr "Volume"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Source:"
-msgstr "Sorgente Emissione:"
+msgstr "Sorgente dell' Emissione:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
@@ -10180,7 +10156,7 @@ msgstr ""
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
-msgstr "Crea Poligono & UV"
+msgstr "Crea Poligono e UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Internal Vertex"
@@ -10276,7 +10252,7 @@ msgstr "Ruota poligono"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Scale Polygon"
-msgstr "Scala poligono"
+msgstr "Ridimensiona poligono"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create a custom polygon. Enables custom polygon rendering."
@@ -10417,9 +10393,8 @@ msgid "Flip Portal"
msgstr "Ribalta Portale"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Occluder Set Transform"
-msgstr "Trasformazione dell'Insieme dell'Occlusore"
+msgstr "Imposta Trasformazione dell' Occlusore"
#: editor/plugins/room_manager_editor_plugin.cpp
msgid "Center Node"
@@ -10769,7 +10744,7 @@ msgstr "[Ignora]"
#: editor/plugins/script_text_editor.cpp
msgid "Line"
-msgstr "Linea"
+msgstr "Riga"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
@@ -11017,7 +10992,7 @@ msgstr "Ortogonale dal Basso"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom Perspective"
-msgstr "Prospettica dal Basso"
+msgstr "Prospettica dal basso"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left Orthogonal"
@@ -11025,7 +11000,7 @@ msgstr "Ortogonale a Sinistra"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left Perspective"
-msgstr "Prospettica a Sinistra"
+msgstr "Prospettica da sinistra"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right Orthogonal"
@@ -11033,7 +11008,7 @@ msgstr "Ortogonale a Destra"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right Perspective"
-msgstr "Prospettica a Destra"
+msgstr "Prospettica da destra"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front Orthogonal"
@@ -11041,7 +11016,7 @@ msgstr "Ortogonale di Fronte"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front Perspective"
-msgstr "Prospettica di Fronte"
+msgstr "Prospettica di fronte"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear Orthogonal"
@@ -11049,14 +11024,14 @@ msgstr "Ortogonale da Dietro"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear Perspective"
-msgstr "Prospettica da Dietro"
+msgstr "Prospettica da dietro"
#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
#: editor/plugins/spatial_editor_plugin.cpp
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]"
@@ -11098,13 +11073,11 @@ msgstr "Trasla"
#. TRANSLATORS: Refers to changing the scale of a node in the 3D editor.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scaling:"
-msgstr "Scalatura:"
+msgstr "Scala:"
#. TRANSLATORS: Refers to changing the position of a node in the 3D editor.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translating:"
msgstr "Traslazione:"
@@ -11153,7 +11126,6 @@ msgid "Vertices:"
msgstr "Vertici:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "FPS: %d (%s ms)"
msgstr "FPS: %d (%s ms)"
@@ -11199,31 +11171,31 @@ msgstr "Questa operazione richiede un solo nodo selezionato."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Auto Orthogonal Enabled"
-msgstr "Ortogonale Automatico Abilitato"
+msgstr "Ortogonale automatica abilitata"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock View Rotation"
-msgstr "Blocca Rotazione Vista"
+msgstr "Blocca la rotazione della vista"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Normal"
-msgstr "Mostra Normale"
+msgstr "Visualizzazione predefinita"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Wireframe"
-msgstr "Mostra Wireframe"
+msgstr "Visualizzazione fildiferro"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Overdraw"
-msgstr "Mostra Overdraw"
+msgstr "Visualizza Overdraw"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Unshaded"
-msgstr "Mostra Unshaded"
+msgstr "Visualizzazione senza ombre"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Environment"
-msgstr "Mostra Ambiente"
+msgstr "Visualizza ambiente"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Gizmos"
@@ -11361,7 +11333,6 @@ msgid "Use Snap"
msgstr "Usa Scatto"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Converts rooms for portal culling."
msgstr "Converte stanze per culling del portale."
@@ -11402,12 +11373,10 @@ msgid "Orbit View Right"
msgstr "Orbita la visuale a destra"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Orbit View Up"
msgstr "Orbita la visuale in sù"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Orbit View 180"
msgstr "Orbita la visuale 180"
@@ -11440,9 +11409,8 @@ msgid "Increase Field of View"
msgstr "Aumenta il Campo Visivo"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Reset Field of View to Default"
-msgstr "Ripristina le impostazioni predefinite"
+msgstr "Ripristina il Campo Visivo alle impostazioni predefinite"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Object to Floor"
@@ -11450,7 +11418,7 @@ msgstr "Scatta l'oggetto sul suolo"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Dialog..."
-msgstr "Finestra di Transform..."
+msgstr "Modale di trasformazione..."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "1 Viewport"
@@ -11482,11 +11450,11 @@ msgstr "Gizmos"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Origin"
-msgstr "Visualizza Origine"
+msgstr "Visualizza l'origine"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Grid"
-msgstr "Visualizza Griglia"
+msgstr "Visualizza la griglia"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Portal Culling"
@@ -11503,19 +11471,19 @@ msgstr "Impostazioni…"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Settings"
-msgstr "Impostazioni Agganciamento"
+msgstr "Impostazioni dello scatto"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translate Snap:"
-msgstr "Agganciamento Traslazione:"
+msgstr "Scatto di traslazione:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Snap (deg.):"
-msgstr "Agganciamento Rotazione (gradi):"
+msgstr "Scatto di rotazione (gradi):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Snap (%):"
-msgstr "Agganciamento Ridimensionamento (%):"
+msgstr "Scatto della scala (%):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Viewport Settings"
@@ -11535,7 +11503,7 @@ msgstr "Visualizza Z-Far:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Change"
-msgstr "Cambiamento Transform"
+msgstr "Cambio di trasformazione"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translate:"
@@ -11551,7 +11519,7 @@ msgstr "Scala (rapporto):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Type"
-msgstr "Tipo Transform"
+msgstr "Tipo di trasformazione"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Pre"
@@ -11562,14 +11530,12 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Manipulator Gizmo Size"
msgstr "Dimensione Gizmo Di Controllo"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Manipulator Gizmo Opacity"
-msgstr "Opacità Gizmo Di Controllo"
+msgstr "Opacità Gizmo Manipolatore"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Show Viewport Rotation Gizmo"
@@ -11626,9 +11592,8 @@ msgid "Invalid geometry, can't replace by mesh."
msgstr "Geometria non valida, impossibile sostituirla con una mesh."
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Convert to MeshInstance2D"
-msgstr "Converti in Mesh2D"
+msgstr "Converti in MeshInstance2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
@@ -11659,17 +11624,14 @@ msgid "Sprite"
msgstr "Sprite"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Simplification:"
msgstr "Semplificazione:"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Shrink (Pixels):"
msgstr "Rimpicciolisci (Pixels):"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Grow (Pixels):"
msgstr "Ingrandisci (Pixels):"
@@ -11734,9 +11696,8 @@ msgid "New Animation"
msgstr "Nuova Animazione"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Filter animations"
-msgstr "Modalità di filtraggio"
+msgstr "Filtraggio animazioni"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
@@ -11827,11 +11788,11 @@ msgstr "Modalità dello scatto:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Pixel Snap"
-msgstr "Agganciamento Pixel"
+msgstr "Scatto sui pixel"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Grid Snap"
-msgstr "Agganciamento Griglia"
+msgstr "Scatto sulla griglia"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Auto Slice"
@@ -12031,6 +11992,9 @@ msgid ""
"closing this window.\n"
"Close anyway?"
msgstr ""
+"La scheda \"Importa Oggetti\" ha alcuni elementi selezionati. Chiudendo "
+"questa finestra si perderà la selezione.\n"
+"Chiudere lo stesso?"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Type"
@@ -12402,7 +12366,7 @@ msgstr "Elemento Modificabile"
#: editor/plugins/theme_editor_preview.cpp
msgid "Subtree"
-msgstr "Sottoalbero"
+msgstr "Subtree"
#: editor/plugins/theme_editor_preview.cpp
msgid "Has,Many,Options"
@@ -12539,7 +12503,6 @@ msgid "Palette Min Width"
msgstr "Larghezza Min Paletta"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Palette Item H Separation"
msgstr "Separazione Orizzontale Elementi Paletta"
@@ -12566,7 +12529,7 @@ msgstr "Lato Editor"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Display Grid"
-msgstr "Mostra Griglia"
+msgstr "Visualizza griglia"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Axis Color"
@@ -12722,7 +12685,7 @@ msgstr "Abilita lo scatto e mostra la griglia (configurabile dall'ispettore)."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Display Tile Names (Hold Alt Key)"
-msgstr "Mostra i Nomi delle Tile (Tenere Premuto Tasto Alt)"
+msgstr "Visualizza i nomi dei tasselli (tenere premuto il tasto alt)"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
@@ -12911,7 +12874,7 @@ msgstr "Questa proprietà non può essere cambiata."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Snap Options"
-msgstr "Opzioni Agganciamento"
+msgstr "Opzioni dello scatto"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/animated_sprite.cpp
#: scene/2d/camera_2d.cpp scene/2d/cpu_particles_2d.cpp scene/2d/light_2d.cpp
@@ -12919,9 +12882,10 @@ msgstr "Opzioni Agganciamento"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr "Scostamento"
@@ -13003,14 +12967,13 @@ msgid "Selected Collision"
msgstr "Collisione Selezionata"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision One Way"
msgstr "Collisione Selezionata Solo Da Una Parte"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
msgid "Selected Collision One Way Margin"
-msgstr "Margine di Collisione BVH"
+msgstr "Margine di Collisione Solo Da Una Parte Selezionato"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Selected Navigation"
@@ -13048,14 +13011,12 @@ msgid "Commit"
msgstr "Commit"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Staged Changes"
-msgstr "Cambiamenti in Scena"
+msgstr "Cambiamenti Graduali"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Unstaged Changes"
-msgstr "Cambiamenti non in Scena"
+msgstr "Cambiamenti non Graduali"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Commit:"
@@ -13102,9 +13063,8 @@ msgid "Select SSH private key path"
msgstr "Seleziona il percorso della chiave privata SSH"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "SSH Passphrase"
-msgstr "Frase di accesso SSH"
+msgstr "SSH Passphrase"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Detect new changes"
@@ -13176,11 +13136,11 @@ msgstr "URL Remoto"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Fetch"
-msgstr ""
+msgstr "Fetch"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Pull"
-msgstr ""
+msgstr "Pull"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -13208,9 +13168,8 @@ msgid "Typechange"
msgstr "Cambio di tipo"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Unmerged"
-msgstr "Non mescolato"
+msgstr "Non combinato"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "View:"
@@ -14121,12 +14080,10 @@ msgid "Runnable"
msgstr "Eseguibile"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export the project for all the presets defined."
msgstr "Esporta il progetto per tutti i preset definiti."
#: editor/project_export.cpp
-#, fuzzy
msgid "All presets must have an export path defined for Export All to work."
msgstr ""
"Tutti i preset devono avere un percorso di esportazione definito affinché "
@@ -14251,12 +14208,10 @@ msgid "More Info..."
msgstr "Maggiori Informazioni..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export PCK/Zip..."
msgstr "Esporta PCK/Zip..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export Project..."
msgstr "Esporta Progetto..."
@@ -14265,12 +14220,10 @@ msgid "Export All"
msgstr "Esporta Tutto"
#: editor/project_export.cpp
-#, fuzzy
msgid "Choose an export mode:"
-msgstr "Si prega di scegliere una cartella vuota:"
+msgstr "Scegli una modalità di esportazione:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export All..."
msgstr "Esporta Tutto..."
@@ -14279,18 +14232,16 @@ msgid "ZIP File"
msgstr "File ZIP"
#: editor/project_export.cpp
-#, fuzzy
msgid "Godot Project Pack"
-msgstr "Pacchetto Gioco Godot"
+msgstr "Pacchetto Progetto Godot"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "Le export templates per questa piattaforma sono mancanti:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Project Export"
-msgstr "Fondatori del progetto"
+msgstr "Esporta Progetto"
#: editor/project_export.cpp
msgid "Manage Export Templates"
@@ -14356,16 +14307,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Percorso del progetto invalido (cambiato qualcosa?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Impossibile caricare project.godot nel percorso del progetto (errore %d). "
"Può essere mancante o corrotto."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Impossibile modificare project.godot nel percorso del progetto."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Impossibile aprire il progetto a \"%s\"."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -14393,7 +14345,7 @@ msgstr "Importa Progetto Esistente"
#: editor/project_manager.cpp
msgid "Import & Edit"
-msgstr "Importa & Modifica"
+msgstr "Importa e Modifica"
#: editor/project_manager.cpp
msgid "Create New Project"
@@ -14401,7 +14353,7 @@ msgstr "Crea Nuovo Progetto"
#: editor/project_manager.cpp
msgid "Create & Edit"
-msgstr "Crea & Modifica"
+msgstr "Crea e Modifica"
#: editor/project_manager.cpp
msgid "Install Project:"
@@ -14409,7 +14361,7 @@ msgstr "Installa Progetto:"
#: editor/project_manager.cpp
msgid "Install & Edit"
-msgstr "Installa & Modifica"
+msgstr "Installa e Modifica"
#: editor/project_manager.cpp
msgid "Project Name:"
@@ -15171,7 +15123,6 @@ msgid "snake_case to PascalCase"
msgstr "snake_case a PascalCase"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Case"
msgstr "Caso"
@@ -15209,7 +15160,7 @@ msgstr "Mantieni Transform Globale"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent"
-msgstr "Cambia Genitore"
+msgstr "Riaccoppiare"
#: editor/run_settings_dialog.cpp
msgid "Run Mode:"
@@ -15414,7 +15365,7 @@ msgstr "Abilita Nome Unico Scena"
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "Un altro nodo sta già usando questo nome unico nella scena."
+msgstr "Nomi unici già usati da un altro nodo nella scena:"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -15852,7 +15803,6 @@ msgid "Attach Node Script"
msgstr "Allega Script Nodo"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Remote %s:"
msgstr "Remoto %s:"
@@ -15934,7 +15884,7 @@ msgstr "Filtra variabili su stack"
#: editor/script_editor_debugger.cpp
msgid "Auto Switch To Remote Scene Tree"
-msgstr ""
+msgstr "Passa automaticamente all'Albero Scena Remota"
#: editor/script_editor_debugger.cpp
msgid "Remote Scene Tree Refresh Interval"
@@ -15942,7 +15892,7 @@ msgstr "Intervallo di Refresh dello Scene Tree Remoto"
#: editor/script_editor_debugger.cpp
msgid "Remote Inspect Refresh Interval"
-msgstr ""
+msgstr "Intervallo Aggiornamento Ispettore Remoto"
#: editor/script_editor_debugger.cpp
msgid "Network Profiler"
@@ -15958,7 +15908,7 @@ msgstr "Monitor"
#: editor/script_editor_debugger.cpp
msgid "Pick one or more items from the list to display the graph."
-msgstr "Scegli uno o più elementi dall'elenco per mostrare il grafico."
+msgstr "Scegliere uno o più elementi dall'elenco per mostrare il grafico."
#: editor/script_editor_debugger.cpp
msgid "List of Video Memory Usage by Resource:"
@@ -16040,7 +15990,7 @@ msgstr "Cambia Raggio Luce"
#: editor/spatial_editor_gizmos.cpp
msgid "Stream Player 3D"
-msgstr ""
+msgstr "Stream Player 3D"
#: editor/spatial_editor_gizmos.cpp
msgid "Change AudioStreamPlayer3D Emission Angle"
@@ -16133,12 +16083,14 @@ msgid "Navigation Solid Disabled"
msgstr "Solido di Navigazione Disabilitato"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Joint Body A"
-msgstr ""
+msgstr "Articolazione Corpo A"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Joint Body B"
-msgstr ""
+msgstr "Articolazione Corpo B"
#: editor/spatial_editor_gizmos.cpp
msgid "Room Edge"
@@ -16169,13 +16121,14 @@ msgid "Set Portal Point Position"
msgstr "Imposta Posizione Punto Portale"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Portal Front"
-msgstr ""
+msgstr "Davanti del Portale"
#: editor/spatial_editor_gizmos.cpp
#, fuzzy
msgid "Portal Back"
-msgstr "Torna indietro"
+msgstr "Dietro del Portale"
#: editor/spatial_editor_gizmos.cpp scene/2d/light_occluder_2d.cpp
#: scene/2d/tile_map.cpp
@@ -16234,7 +16187,7 @@ msgstr "Server con Multithread"
#: main/main.cpp
msgid "RID Pool Prealloc"
-msgstr ""
+msgstr "Preallocazione pool RID"
#: main/main.cpp
msgid "Debugger stdout"
@@ -16261,13 +16214,12 @@ msgid "Flush stdout On Print"
msgstr "Svuota stdout Alla Stampa"
#: main/main.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Logging"
msgstr "Logging"
#: main/main.cpp
msgid "File Logging"
-msgstr ""
+msgstr "Logging su file"
#: main/main.cpp
msgid "Enable File Logging"
@@ -16295,7 +16247,7 @@ msgstr "Ripiega Su GLES2"
#: main/main.cpp
msgid "Use Nvidia Rect Flicker Workaround"
-msgstr ""
+msgstr "Usa stratagemma contro il flickering rettangoli su NVIDIA"
#: main/main.cpp
msgid "DPI"
@@ -16323,7 +16275,7 @@ msgstr "Permesso"
#: main/main.cpp
msgid "Intended Usage"
-msgstr ""
+msgstr "Uso previsto"
#: main/main.cpp
msgid "Framebuffer Allocation"
@@ -16335,7 +16287,7 @@ msgstr "Risparmio Energia"
#: main/main.cpp
msgid "Threads"
-msgstr ""
+msgstr "Threads"
#: main/main.cpp servers/physics_2d/physics_2d_server_wrap_mt.h
msgid "Thread Model"
@@ -16343,11 +16295,11 @@ msgstr "Modello Thread"
#: main/main.cpp
msgid "Thread Safe BVH"
-msgstr ""
+msgstr "Thread sicuro BVH"
#: main/main.cpp
msgid "Handheld"
-msgstr ""
+msgstr "Maneggiato"
#: main/main.cpp platform/javascript/export/export.cpp
#: platform/uwp/export/export.cpp
@@ -16369,7 +16321,7 @@ msgstr "Forza FPS"
#: main/main.cpp
msgid "Enable Pause Aware Picking"
-msgstr ""
+msgstr "Abilita Picking Allerta Pausa"
#: 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
@@ -16379,7 +16331,7 @@ msgstr "Interfaccia Grafica"
#: main/main.cpp
msgid "Drop Mouse On GUI Input Disabled"
-msgstr ""
+msgstr "Rilascio del mouse sull'Input della GUI Disabilitato"
#: main/main.cpp
msgid "stdout"
@@ -16411,7 +16363,7 @@ msgstr "Modalità Basso Utilizzo Processore"
#: main/main.cpp
msgid "Delta Sync After Draw"
-msgstr ""
+msgstr "Sincronizzazione delta dopo il disegno"
#: main/main.cpp
msgid "iOS"
@@ -16426,7 +16378,6 @@ msgid "Input Devices"
msgstr "Dispositivi Input"
#: main/main.cpp
-#, fuzzy
msgid "Pointing"
msgstr "Puntamento"
@@ -16443,9 +16394,8 @@ msgid "Shaders"
msgstr "Shaders"
#: main/main.cpp
-#, fuzzy
msgid "Debug Shader Fallbacks"
-msgstr "Forza fallback dello shader"
+msgstr "Forza Fallback dello Shader"
#: main/main.cpp scene/3d/baked_lightmap.cpp scene/3d/camera.cpp
#: scene/3d/world_environment.cpp scene/main/scene_tree.cpp
@@ -16454,9 +16404,8 @@ msgid "Environment"
msgstr "Ambiente"
#: main/main.cpp
-#, fuzzy
msgid "Default Clear Color"
-msgstr "Colore Di Cancellamento Di Default"
+msgstr "Colore Di Sfondo Di Default"
#: main/main.cpp
msgid "Boot Splash"
@@ -16492,11 +16441,11 @@ msgstr "Icona Nativa Di Windows"
#: main/main.cpp
msgid "Buffering"
-msgstr ""
+msgstr "Buffering"
#: main/main.cpp
msgid "Agile Event Flushing"
-msgstr ""
+msgstr "Svuotamento degli eventi usando l'algoritmo Agile"
#: main/main.cpp
msgid "Emulate Touch From Mouse"
@@ -16516,7 +16465,7 @@ msgstr "Immagine Personalizzata"
#: main/main.cpp
msgid "Custom Image Hotspot"
-msgstr ""
+msgstr "Punto focale immagine personalizzato"
#: main/main.cpp
msgid "Tooltip Position Offset"
@@ -16540,7 +16489,7 @@ msgstr "Esecuzione"
#: main/main.cpp
msgid "Unhandled Exception Policy"
-msgstr ""
+msgstr "Regola per eccezioni non gestite"
#: main/main.cpp
msgid "Main Loop Type"
@@ -16684,16 +16633,15 @@ msgstr "Gradi di Rotazione"
#: modules/csg/csg_shape.cpp
msgid "Spin Sides"
-msgstr ""
+msgstr "Lati rotazione"
#: modules/csg/csg_shape.cpp
msgid "Path Node"
msgstr "Percorso Nodo"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Interval Type"
-msgstr "Crea Vertice Interno"
+msgstr "Tipo di intervallo del Percorso"
#: modules/csg/csg_shape.cpp
msgid "Path Interval"
@@ -16701,7 +16649,7 @@ msgstr "Intervallo Percorso"
#: modules/csg/csg_shape.cpp
msgid "Path Simplify Angle"
-msgstr ""
+msgstr "Angolo di semplificazione Percorso"
#: modules/csg/csg_shape.cpp
msgid "Path Rotation"
@@ -16722,7 +16670,6 @@ msgid "Path U Distance"
msgstr "Scegli la Distanza:"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Joined"
msgstr "Percorsi Uniti"
@@ -16744,15 +16691,15 @@ msgstr "Sempre In Ordine"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "Server Relay"
-msgstr ""
+msgstr "Rimbalzo Server"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "DTLS Verify"
-msgstr ""
+msgstr "Verifica DTLS"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "DTLS Hostname"
-msgstr ""
+msgstr "Nome host DTLS"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "Use DTLS"
@@ -16760,7 +16707,7 @@ msgstr "Usa DTLS"
#: modules/fbx/editor_scene_importer_fbx.cpp
msgid "FBX"
-msgstr ""
+msgstr "FBX"
#: modules/fbx/editor_scene_importer_fbx.cpp
msgid "Use FBX"
@@ -16838,7 +16785,6 @@ msgid "Disabled GDNative Singleton"
msgstr "Singleton GDNative disabilitato"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
-#, fuzzy
msgid "Libraries:"
msgstr "Librerie:"
@@ -16984,11 +16930,11 @@ msgstr "Conteggio Sparso"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Buffer View"
-msgstr ""
+msgstr "Vista indici sparsi dei buffer"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Byte Offset"
-msgstr ""
+msgstr "Scostamento Byte degli Indici Sparsi"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Component Type"
@@ -16996,11 +16942,11 @@ msgstr "Tipo di Componente degli Indici Sparsi"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Values Buffer View"
-msgstr ""
+msgstr "Vista buffer dei valori sparsi"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Values Byte Offset"
-msgstr ""
+msgstr "Scostamento Byte dei Valori Sparsi"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Buffer"
@@ -17024,11 +16970,11 @@ msgstr "Dimensione Campo VIsivo"
#: modules/gltf/gltf_camera.cpp
msgid "Zfar"
-msgstr ""
+msgstr "Z Lontano"
#: modules/gltf/gltf_camera.cpp
msgid "Znear"
-msgstr "Znear"
+msgstr "Z Vicino"
#: modules/gltf/gltf_light.cpp scene/2d/canvas_modulate.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/light_2d.cpp scene/2d/polygon_2d.cpp
@@ -17076,11 +17022,11 @@ msgstr "Xform"
#: modules/gltf/gltf_node.cpp scene/3d/mesh_instance.cpp
msgid "Skin"
-msgstr ""
+msgstr "Skin"
#: modules/gltf/gltf_node.cpp scene/3d/spatial.cpp
msgid "Translation"
-msgstr "Traslazione"
+msgstr "Traduzione"
#: modules/gltf/gltf_node.cpp
msgid "Children"
@@ -17103,18 +17049,18 @@ msgid "Godot Bone Node"
msgstr "Nodo Osso Godot"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Skin Root"
-msgstr "Nuova Scena Radice"
+msgstr "Radice della Skin"
#: modules/gltf/gltf_skin.cpp
#, fuzzy
msgid "Joints Original"
-msgstr "Centra Origine"
+msgstr "Articolazioni Originali"
#: modules/gltf/gltf_skin.cpp
+#, fuzzy
msgid "Inverse Binds"
-msgstr ""
+msgstr "Inverti Legamenti"
#: modules/gltf/gltf_skin.cpp
msgid "Non Joints"
@@ -17122,11 +17068,11 @@ msgstr "Non Articolazioni"
#: modules/gltf/gltf_skin.cpp
msgid "Joint I To Bone I"
-msgstr ""
+msgstr "Articolazione I ad Osso I"
#: modules/gltf/gltf_skin.cpp
msgid "Joint I To Name"
-msgstr ""
+msgstr "Articolazione I a Nome"
#: modules/gltf/gltf_skin.cpp
msgid "Godot Skin"
@@ -17154,7 +17100,7 @@ msgstr "Immagine Gloss Speculare"
#: modules/gltf/gltf_state.cpp
msgid "Json"
-msgstr ""
+msgstr "Json"
#: modules/gltf/gltf_state.cpp
msgid "Major Version"
@@ -17169,13 +17115,13 @@ msgid "GLB Data"
msgstr "Dati GLB"
#: modules/gltf/gltf_state.cpp
+#, fuzzy
msgid "Use Named Skin Binds"
-msgstr ""
+msgstr "Usa associazioni skin con nome"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Buffer Views"
-msgstr "Vista dal retro"
+msgstr "Viste dei Buffer"
#: modules/gltf/gltf_state.cpp
msgid "Accessors"
@@ -17265,17 +17211,15 @@ msgid "Mask"
msgstr "Maschera"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
-#, fuzzy
msgid "Bake Navigation"
-msgstr "Navigazione"
+msgstr "Preprocessa Navigazione"
#: modules/gridmap/grid_map.cpp scene/2d/navigation_2d.cpp
#: 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 "Sensazione Navigazione"
+msgstr "Livelli Navigazione"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -17310,9 +17254,8 @@ msgid "GridMap Fill Selection"
msgstr "GridMap Riempi Selezione"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Paste Selection"
-msgstr "Sezione GridMap incolla"
+msgstr "Incolla Selezione GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "GridMap Paint"
@@ -17327,9 +17270,8 @@ msgid "Snap View"
msgstr "Scatta Visuale"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Clip Disabled"
-msgstr "Clip Disabilitata"
+msgstr "Clip Disabilitato"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Above"
@@ -17437,9 +17379,8 @@ msgid "Plotting lightmaps"
msgstr "Stampando le lightmap"
#: modules/lightmapper_cpu/register_types.cpp
-#, fuzzy
msgid "CPU Lightmapper"
-msgstr "Preprocessa Lightmaps"
+msgstr "CPU Mappatore Della Luce"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Low Quality Ray Count"
@@ -17470,28 +17411,27 @@ msgstr "Altezza Occhio"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "IOD"
-msgstr ""
+msgstr "IOD"
#: modules/mobile_vr/mobile_vr_interface.cpp
+#, fuzzy
msgid "Display Width"
msgstr "Larghezza Display"
#: modules/mobile_vr/mobile_vr_interface.cpp
#, fuzzy
msgid "Display To Lens"
-msgstr "Mostra Unshaded"
+msgstr "Mostra alle Lenti"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Oversample"
-msgstr ""
+msgstr "Sovracampionamento"
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "K1"
msgstr "K1"
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "K2"
msgstr "K2"
@@ -17510,20 +17450,17 @@ msgstr "Auto-Aggiorna Progetto"
#: modules/mono/godotsharp_dirs.cpp
#, fuzzy
msgid "Assembly Name"
-msgstr "Nome Display"
+msgstr "Nome Assemblaggio"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Solution Directory"
-msgstr "Scegli una cartella"
+msgstr "Cartella di Soluzione"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "C# Project Directory"
-msgstr "Scegli una cartella"
+msgstr "Cartella Progetto C#"
#: modules/mono/mono_gd/gd_mono_utils.cpp
-#, fuzzy
msgid "End of inner exception stack trace"
msgstr "Fine dell'analisi dell’eccezione interna dello stack"
@@ -17648,11 +17585,11 @@ msgstr ""
#: modules/upnp/upnp.cpp
msgid "Discover Local Port"
-msgstr ""
+msgstr "Rileva Porta Locale"
#: modules/upnp/upnp.cpp
msgid "Discover IPv6"
-msgstr ""
+msgstr "Rilevamento IPv6"
#: modules/upnp/upnp_device.cpp
msgid "Description URL"
@@ -17664,21 +17601,19 @@ msgstr "Tipo Di Servizio"
#: modules/upnp/upnp_device.cpp
msgid "IGD Control URL"
-msgstr ""
+msgstr "URL di controllo IGD"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "IGD Service Type"
-msgstr "Imposta Tipo di Variabile"
+msgstr "Tipo Servizio IGD"
#: modules/upnp/upnp_device.cpp
msgid "IGD Our Addr"
-msgstr ""
+msgstr "Indirizzo locale IGD"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "IGD Status"
-msgstr "Stato"
+msgstr "Stato IGD"
#: modules/visual_script/visual_script.cpp
msgid ""
@@ -17705,7 +17640,6 @@ msgstr ""
"memoria di lavoro del nodo! Si prega di correggere il nodo."
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Node returned an invalid sequence output:"
msgstr "Il nodo ha ritornato una sequenza di output invalida:"
@@ -17714,14 +17648,13 @@ msgid "Found sequence bit but not the node in the stack, report bug!"
msgstr "Trovato bit di sequenza ma non il nodo nello stack, segnalare il bug!"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Stack overflow with stack depth:"
msgstr "Overflow dello stack con profondità dello stack:"
#: modules/visual_script/visual_script.cpp
#, fuzzy
msgid "Visual Script"
-msgstr "Ricerca VisualScript"
+msgstr "Script Visivo"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Signal Arguments"
@@ -18042,7 +17975,6 @@ msgstr "Modifica membro"
#: modules/visual_script/visual_script_expression.cpp
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Expression"
msgstr "Espressione"
@@ -18051,9 +17983,8 @@ msgid "Return"
msgstr "Ritorno"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Enabled"
-msgstr "Eseguibile"
+msgstr "Ritorno Abilitato"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Return Type"
@@ -18066,27 +17997,26 @@ msgstr "Condizione"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "if (cond) is:"
-msgstr "if (cond) is:"
+msgstr "se (cond) è:"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "While"
-msgstr "While"
+msgstr "Mentre"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "while (cond):"
-msgstr ""
+msgstr "mentre (cond):"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator"
msgstr "Iteratore"
#: modules/visual_script/visual_script_flow_control.cpp
+#, fuzzy
msgid "for (elem) in (input):"
-msgstr ""
+msgstr "per (elem) in (input):"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Input type not iterable:"
msgstr "Il tipo di input non è iterabile:"
@@ -18095,7 +18025,6 @@ msgid "Iterator became invalid"
msgstr "L'iteratore è diventato invalido"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Iterator became invalid:"
msgstr "L'iteratore è diventato invalido:"
@@ -18108,9 +18037,8 @@ msgid "in order:"
msgstr "in ordine:"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Steps"
-msgstr "Passo"
+msgstr "Passi"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Switch"
@@ -18123,7 +18051,7 @@ msgstr "'input' è:"
#: modules/visual_script/visual_script_flow_control.cpp
#, fuzzy
msgid "Type Cast"
-msgstr "Tipo:"
+msgstr "Conversione Tipo"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Is %s?"
@@ -18167,9 +18095,8 @@ msgid "Validate"
msgstr "Valida"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "RPC Call Mode"
-msgstr "Modalità scala"
+msgstr "Modalità Chiamata RPC"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Subtract %s"
@@ -18188,34 +18115,38 @@ msgid "Mod %s"
msgstr "Modulo %s"
#: modules/visual_script/visual_script_func_nodes.cpp
+#, fuzzy
msgid "ShiftLeft %s"
-msgstr "ShiftLeft %s"
+msgstr "SpostaSinistra %s"
#: modules/visual_script/visual_script_func_nodes.cpp
+#, fuzzy
msgid "ShiftRight %s"
-msgstr ""
+msgstr "SpostaDestra %s"
#: modules/visual_script/visual_script_func_nodes.cpp
+#, fuzzy
msgid "BitAnd %s"
-msgstr "BitAnd %s"
+msgstr "Bit E %s"
#: modules/visual_script/visual_script_func_nodes.cpp
+#, fuzzy
msgid "BitOr %s"
-msgstr ""
+msgstr "Bit O %s"
#: modules/visual_script/visual_script_func_nodes.cpp
+#, fuzzy
msgid "BitXor %s"
-msgstr ""
+msgstr "Bit XO %s"
#: modules/visual_script/visual_script_func_nodes.cpp
#, fuzzy
msgid "Set Mode"
-msgstr "Modalità di Selezione"
+msgstr "Modalità di Impostazione"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Assign Op"
-msgstr "Assegna"
+msgstr "Operatore Assegna"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
@@ -18232,7 +18163,6 @@ msgid "Base object is not a Node!"
msgstr "L'oggetto base non è un Nodo!"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Path does not lead to Node!"
msgstr "Il percorso non conduce a un Nodo!"
@@ -18241,14 +18171,13 @@ msgid "Invalid index property name '%s' in node %s."
msgstr "Nome proprietà indice invalido \"%s\" nel nodo %s."
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Emit %s"
-msgstr "Imposta %s"
+msgstr "Emetti %s"
#: modules/visual_script/visual_script_nodes.cpp
#, fuzzy
msgid "Compose Array"
-msgstr "Ridimensiona lista"
+msgstr "Componi Lista"
#: modules/visual_script/visual_script_nodes.cpp scene/resources/material.cpp
#: scene/resources/visual_shader_nodes.cpp
@@ -18256,12 +18185,10 @@ msgid "Operator"
msgstr "Operatore"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Invalid argument of type:"
msgstr "Argomento invalido di tipo:"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Invalid arguments:"
msgstr "Argomenti invalidi:"
@@ -18274,12 +18201,10 @@ msgid "Var Name"
msgstr "Var Nome"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "VariableGet not found in script:"
msgstr "VariableGet non trovato nello script:"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "VariableSet not found in script:"
msgstr "VariableSet non trovato nello script:"
@@ -18346,46 +18271,40 @@ msgstr ""
"oppure una stringa (errore)."
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "SubCall"
-msgstr "Chiamate"
+msgstr "SottoChiamata"
#: modules/visual_script/visual_script_nodes.cpp scene/gui/graph_node.cpp
msgid "Title"
msgstr "Titolo"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Construct %s"
-msgstr "Costanti"
+msgstr "Costruisci %s"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Get Local Var"
-msgstr "Usa Spazio Locale"
+msgstr "Ottieni Variabile Locale"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Set Local Var"
-msgstr "Usa Spazio Locale"
+msgstr "Imposta Variabile Locale"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Action %s"
-msgstr "Azione"
+msgstr "Azione %s"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Deconstruct %s"
-msgstr ""
+msgstr "Decostruisci %s"
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search VisualScript"
msgstr "Ricerca VisualScript"
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "Yield"
-msgstr "Yield"
+msgstr "Rendi (Yield)"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "Wait"
@@ -18410,31 +18329,31 @@ msgstr "Tempo Di Attesa"
#: modules/visual_script/visual_script_yield_nodes.cpp
#, fuzzy
msgid "WaitSignal"
-msgstr "WaitSignal"
+msgstr "SegnaleAspetta"
#: modules/visual_script/visual_script_yield_nodes.cpp
#, fuzzy
msgid "WaitNodeSignal"
-msgstr "WaitNodeSignal"
+msgstr "SegnaleAspettaNodo"
#: modules/visual_script/visual_script_yield_nodes.cpp
#, fuzzy
msgid "WaitInstanceSignal"
-msgstr "WaitInstanceSignal"
+msgstr "SegnaleAspettaIstanza"
#: modules/webrtc/webrtc_data_channel.cpp
#, fuzzy
msgid "Write Mode"
-msgstr "Modalità Priorità"
+msgstr "Modalità Scrittura"
#: modules/webrtc/webrtc_data_channel.h
+#, fuzzy
msgid "WebRTC"
-msgstr ""
+msgstr "RTCWeb"
#: modules/webrtc/webrtc_data_channel.h
-#, fuzzy
msgid "Max Channel In Buffer (KB)"
-msgstr "Dimensione Index Buffer dei Poligoni nel Canvas (KB)"
+msgstr "Canali In Buffer Massimi (KB)"
#: modules/websocket/websocket_client.cpp
msgid "Verify SSL"
@@ -18445,36 +18364,36 @@ msgid "Trusted SSL Certificate"
msgstr "Certificato SSL Fidato"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "WebSocket Client"
-msgstr "Peer di Rete"
+msgstr "Cliente WebSocket"
#: modules/websocket/websocket_macros.h
#, fuzzy
msgid "Max In Buffer (KB)"
-msgstr "Dimensione Massima (KB)"
+msgstr "In Buffer Massimi (KB)"
#: modules/websocket/websocket_macros.h
+#, fuzzy
msgid "Max In Packets"
-msgstr ""
+msgstr "Pacchetti In Massimi"
#: modules/websocket/websocket_macros.h
#, fuzzy
msgid "Max Out Buffer (KB)"
-msgstr "Dimensione Massima (KB)"
+msgstr "Out Buffer Massimi (KB)"
#: modules/websocket/websocket_macros.h
+#, fuzzy
msgid "Max Out Packets"
-msgstr ""
+msgstr "Pacchetti Out Massimi"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "WebSocket Server"
-msgstr "Peer di Rete"
+msgstr "Server WebSocket"
#: modules/websocket/websocket_server.cpp
msgid "Bind IP"
-msgstr ""
+msgstr "Collega IP"
#: modules/websocket/websocket_server.cpp
msgid "Private Key"
@@ -18485,9 +18404,8 @@ msgid "SSL Certificate"
msgstr "Certificato SSL"
#: modules/websocket/websocket_server.cpp
-#, fuzzy
msgid "CA Chain"
-msgstr "Elimina Catena IK"
+msgstr "Catena CA"
#: modules/websocket/websocket_server.cpp
msgid "Handshake Timeout"
@@ -18506,12 +18424,14 @@ msgid "Optional Features"
msgstr "Funzionalità Opzionali"
#: modules/webxr/webxr_interface.cpp
+#, fuzzy
msgid "Requested Reference Space Types"
-msgstr ""
+msgstr "Tipi di Riferimento Spazio Richiesti"
#: modules/webxr/webxr_interface.cpp
+#, fuzzy
msgid "Reference Space Type"
-msgstr ""
+msgstr "Tipi di Riferimento Spazio"
#: modules/webxr/webxr_interface.cpp
msgid "Visibility State"
@@ -18522,26 +18442,25 @@ msgid "Bounds Geometry"
msgstr "Confini Geometria"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "XR Standard Mapping"
-msgstr "Agganciamento Intelligente"
+msgstr "Mappamento Standard XR"
#: platform/android/export/export.cpp
msgid "Android SDK Path"
msgstr "Percorso SDK Android"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Debug Keystore"
-msgstr "Debugger"
+msgstr "Keystore di Debug"
#: platform/android/export/export.cpp
msgid "Debug Keystore User"
-msgstr ""
+msgstr "Keystore di Debug Utente"
#: platform/android/export/export.cpp
+#, fuzzy
msgid "Debug Keystore Pass"
-msgstr ""
+msgstr "Keystore di Debug Pass"
#: platform/android/export/export.cpp
msgid "Force System User"
@@ -18549,23 +18468,23 @@ msgstr "Forza Utente System"
#: platform/android/export/export.cpp
msgid "Shutdown ADB On Exit"
-msgstr ""
+msgstr "Spegni ADB In Uscita"
#: platform/android/export/export_plugin.cpp
msgid "Launcher Icons"
-msgstr ""
+msgstr "Icone del Launcher"
#: platform/android/export/export_plugin.cpp
msgid "Main 192 X 192"
-msgstr ""
+msgstr "Principale 192 X 192"
#: platform/android/export/export_plugin.cpp
msgid "Adaptive Foreground 432 X 432"
-msgstr ""
+msgstr "Primo Piano Adattivo 432 X 432"
#: platform/android/export/export_plugin.cpp
msgid "Adaptive Background 432 X 432"
-msgstr ""
+msgstr "Sfondo Adattivo 432 X 432"
#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
@@ -18597,9 +18516,8 @@ msgid "The package must have at least one '.' separator."
msgstr "Il pacchetto deve avere almeno un \".\" separatore."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Custom Build"
-msgstr "Utilizza Build Personalizzata"
+msgstr "Build Personalizzata"
#: platform/android/export/export_plugin.cpp
msgid "Use Custom Build"
@@ -18618,22 +18536,20 @@ msgid "Target SDK"
msgstr "Target SDK"
#: platform/android/export/export_plugin.cpp platform/iphone/export/export.cpp
-#, fuzzy
msgid "Architectures"
-msgstr "Architettura"
+msgstr "Architetture"
#: platform/android/export/export_plugin.cpp
msgid "Keystore"
msgstr "Archivio Chiavi"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Debug User"
-msgstr "Debugger"
+msgstr "User di Debug"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
msgid "Debug Password"
-msgstr ""
+msgstr "Password di Debug"
#: platform/android/export/export_plugin.cpp
msgid "Release User"
@@ -18645,7 +18561,7 @@ msgstr "Password Di Rilascio"
#: platform/android/export/export_plugin.cpp
msgid "One Click Deploy"
-msgstr ""
+msgstr "Distribuzione con un Click"
#: platform/android/export/export_plugin.cpp
msgid "Clear Previous Install"
@@ -18664,9 +18580,8 @@ msgid "Unique Name"
msgstr "Nome Unico"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Signed"
-msgstr "Segnale"
+msgstr "Firmato"
#: platform/android/export/export_plugin.cpp
msgid "Classify As Game"
@@ -18697,50 +18612,45 @@ msgid "XR Mode"
msgstr "Modalità XR"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Hand Tracking"
-msgstr "Impacchettando"
+msgstr "Tracciamento della Mano"
#: platform/android/export/export_plugin.cpp
msgid "Hand Tracking Frequency"
-msgstr ""
+msgstr "Frequenza Tracciamento della Mano"
#: platform/android/export/export_plugin.cpp
msgid "Passthrough"
-msgstr "Passthrough"
+msgstr "Passaggio"
#: platform/android/export/export_plugin.cpp
msgid "Immersive Mode"
msgstr "Modalità Immersiva"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Small"
-msgstr "Supporta"
+msgstr "Supporta Piccolo"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Normal"
-msgstr "Supporta"
+msgstr "Supporta Normale"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Large"
-msgstr "Supporta"
+msgstr "Supporta Grande"
#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Support Xlarge"
-msgstr "Supporta"
+msgstr "Supporta Extra-Grande"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "User Data Backup"
-msgstr "Interfaccia Utente"
+msgstr "Backup Dati Utente"
#: platform/android/export/export_plugin.cpp
msgid "Allow"
-msgstr ""
+msgstr "Permetti"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
msgid "Command Line"
@@ -18756,7 +18666,7 @@ msgstr "Espansione APK"
#: platform/android/export/export_plugin.cpp
msgid "Salt"
-msgstr ""
+msgstr "Sale"
#: platform/android/export/export_plugin.cpp
msgid "Public Key"
@@ -18880,6 +18790,7 @@ msgid "Invalid package name:"
msgstr "Nome del pacchetto non valido:"
#: platform/android/export/export_plugin.cpp
+#, fuzzy
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -18887,26 +18798,29 @@ msgid ""
"Note that the singleton was also renamed from \"GodotPayments\" to "
"\"GodotGooglePlayBilling\"."
msgstr ""
+"Invalido modulo \"GodotPaymentV3\" incluso nelle impostazioni progetto "
+"\"android/modules\" (cambiato in Godot 3.2.2).\n"
+"Rimpiazzalo con il plugin di prime parti \"GodotGooglePlayBilling\".\n"
+"Da notare che il singleton è stato rinominato da \"GodotPayments\" a "
+"\"GodotGooglePlayBilling\"."
#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "Per utilizzare i plugin \"Use Custom Build\" deve essere abilitato."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Hand Tracking\" is only valid when \"XR Mode\" is \"Oculus Mobile VrApi\" "
"or \"OpenXR\"."
msgstr ""
-"\"Hand Tracking\" è valido solo quando \"Xr Mode\" è impostato su \"Oculus "
-"Mobile VR\"."
+"\"Tracciamento della Mano\" è valido solo quando \"Modalità XR\" è impostato "
+"su \"Oculus Mobile VrApi\" o \"OpenXR\"."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "\"Passthrough\" is only valid when \"XR Mode\" is \"OpenXR\"."
msgstr ""
-"\"Hand Tracking\" è valido solo quando \"Xr Mode\" è impostato su \"Oculus "
-"Mobile VR\"."
+"\"Oltrepassaggio\" è valido solo quando \"Modalità XR\" è impostato su "
+"\"OpenXR\"."
#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
@@ -18914,52 +18828,60 @@ msgstr ""
"\"Export AAB\" è valido soltanto quanto \"Use Custom Build\" è abilitato."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Min SDK\" can only be overridden when \"Use Custom Build\" is enabled."
msgstr ""
-"\"Export AAB\" è valido soltanto quanto \"Use Custom Build\" è abilitato."
+"\"Min SDK\" può essere sovrascritto solo se \"Utilizza Build "
+"Personalizzata\" è abilitato."
#: platform/android/export/export_plugin.cpp
msgid "\"Min SDK\" should be a valid integer, but got \"%s\" which is invalid."
msgstr ""
+"\"Min SDK\" dovrebbe essere un intero valido, ma si è ottenuto \"%s\" che è "
+"invalido."
#: platform/android/export/export_plugin.cpp
msgid ""
"\"Min SDK\" cannot be lower than %d, which is the version needed by the "
"Godot library."
msgstr ""
+"\"Min SDK\" non può essere più basso di %d, che è la versione richiesta "
+"dalla libreria Godot."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Target SDK\" can only be overridden when \"Use Custom Build\" is enabled."
msgstr ""
-"\"Export AAB\" è valido soltanto quanto \"Use Custom Build\" è abilitato."
+"\"Target SDK\" può essere sovrascritto solo se \"Utilizza Build "
+"Personalizzata\" è abilitato."
#: platform/android/export/export_plugin.cpp
msgid ""
"\"Target SDK\" should be a valid integer, but got \"%s\" which is invalid."
msgstr ""
+"\"Target SDK\" dovrebbe essere un intero valido, ma si è ottenuto \"%s\" che "
+"è invalido."
#: 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 è più alto della versione di default %d. Questo potrebbe "
+"funzionare, ma non è stato testato e potrebbe essere instabile."
#: platform/android/export/export_plugin.cpp
msgid "\"Target SDK\" version must be greater or equal to \"Min SDK\" version."
msgstr ""
+"La versione di \"Target SDK\" dovrebbe essere maggiore o uguale della "
+"versione di \"Min SDK\"."
#: platform/android/export/export_plugin.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Code Signing"
-msgstr "Segnale"
+msgstr "Firmatura Codice"
#: 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."
@@ -18969,7 +18891,7 @@ msgstr ""
#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
-msgstr ""
+msgstr "Firmando debug %s..."
#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
@@ -18980,7 +18902,6 @@ msgid "Could not find keystore, unable to export."
msgstr "Non è stato possibile trovare keystore, impossible esportare."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not start apksigner executable."
msgstr "Non è stato possibile avviare l'eseguibile apksigner."
@@ -18997,7 +18918,6 @@ msgid "'apksigner' verification of %s failed."
msgstr "Verifica 'apksigner' di %s non riuscita."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Exporting for Android"
msgstr "Esportazione per Android"
@@ -19028,25 +18948,22 @@ msgstr ""
"\"Progetto\"."
#: 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 ""
-"Versione build di Android non coerente: Template installato: %s, Versione "
-"Godot: %s. Per favore, reinstalla il build template di Android dal menu "
-"\"Progetto\"."
+"La Versione build di Android non corrisponde: Template installato: %s, "
+"Versione Godot: %s. Per favore, reinstalla il build template di Android dal "
+"menu \"Progetto\"."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name."
msgstr ""
"Impossibile sovrascrivere i file res://android/build/res/*.xml con il nome "
-"del progetto"
+"del progetto."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files to gradle project."
msgstr "Impossibile esportare i file del progetto in un progetto gradle."
@@ -19059,7 +18976,6 @@ msgid "Building Android Project (gradle)"
msgstr "Compilazione di un progetto Android (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."
@@ -19081,38 +18997,35 @@ msgstr ""
"directory del progetto gradle per gli output."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Package not found: \"%s\"."
-msgstr "Pacchetto non trovato: \"%s\""
+msgstr "Pacchetto non trovato: \"%s\"."
#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr "Creazione APK..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not find template APK to export: \"%s\"."
msgstr "Impossibile trovare il template APK per l'esportazione: \"%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 ""
"Librerie mancanti nel modello di esportazione per le architetture "
-"selezionate: %s. Creare un modello con tutte le librerie richieste o "
-"deselezionare le architetture mancanti nella preimpostazione di esportazione."
+"selezionate: %s. Per favore creare un modello con tutte le librerie "
+"richieste, o deselezionare le architetture mancanti nella preimpostazione di "
+"esportazione."
#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr "Aggiungendo file..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files."
-msgstr "Impossibile esportare i file del progetto"
+msgstr "Impossibile esportare i file del progetto."
#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
@@ -19132,243 +19045,225 @@ msgstr "Il carattere \"%s\" non è consentito nell'Identificatore."
#: platform/iphone/export/export.cpp
msgid "Landscape Launch Screens"
-msgstr ""
+msgstr "Schermate di avvio Panorama"
#: platform/iphone/export/export.cpp
msgid "iPhone 2436 X 1125"
-msgstr ""
+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 "Schermate di avvio Ritratto"
#: 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"
-msgstr ""
+msgstr "iPad 1536 x 2048"
#: platform/iphone/export/export.cpp
msgid "iPhone 1242 X 2208"
-msgstr ""
+msgstr "iPhone 1242 x 2208"
#: platform/iphone/export/export.cpp
+#, fuzzy
msgid "App Store Team ID"
-msgstr ""
+msgstr "ID App Store Team"
#: platform/iphone/export/export.cpp
msgid "Provisioning Profile UUID Debug"
-msgstr ""
+msgstr "Profilo di provisioning UUID Debug"
#: platform/iphone/export/export.cpp
+#, fuzzy
msgid "Code Sign Identity Debug"
-msgstr ""
+msgstr "Firma Codice Identità di Debug"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Method Debug"
-msgstr "Esporta Con Debug"
+msgstr "Metodo di Esportazione Debug"
#: platform/iphone/export/export.cpp
msgid "Provisioning Profile UUID Release"
-msgstr ""
+msgstr "Profilo di provisioning UUID Release"
#: platform/iphone/export/export.cpp
msgid "Code Sign Identity Release"
-msgstr ""
+msgstr "Identità firma del codice Release"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Method Release"
-msgstr "Modalità d'Esportazione:"
+msgstr "Metodo di Esportazione Rilascio"
#: platform/iphone/export/export.cpp
msgid "Targeted Device Family"
-msgstr ""
+msgstr "Famiglia di dispositivi selezionata"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Info"
-msgstr ""
+msgstr "Info"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Identifier"
-msgstr "Identificatore non valido:"
+msgstr "Identificatore"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Signature"
-msgstr "Segnale"
+msgstr "Firma"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Short Version"
-msgstr "Versione"
+msgstr "Versione Corta"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Copyright"
-msgstr "In Alto A Destra"
+msgstr "Copyright"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Capabilities"
-msgstr "Compatibilità"
+msgstr "Possibilità"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Access Wi-Fi"
-msgstr "Accedi"
+msgstr "Accesso al Wi-Fi"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Push Notifications"
-msgstr "Rotazione Casuale:"
+msgstr "Notifiche Push"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "User Data"
-msgstr "Interfaccia Utente"
+msgstr "Dati Utente"
#: platform/iphone/export/export.cpp
msgid "Accessible From Files App"
-msgstr ""
+msgstr "Accessibile dall'Applicazione File"
#: platform/iphone/export/export.cpp
msgid "Accessible From iTunes Sharing"
-msgstr ""
+msgstr "Accessibile dalla condivisione di iTunes"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Privacy"
-msgstr "Tasto Fisico"
+msgstr "Privacy"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Camera Usage Description"
-msgstr "Descrizione"
+msgstr "Descrizione Utilizzo Camera"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Microphone Usage Description"
-msgstr "Descrizioni delle proprietà"
+msgstr "Descrizione Utilizzo Microfono"
#: platform/iphone/export/export.cpp
#, fuzzy
msgid "Photolibrary Usage Description"
-msgstr "Descrizioni delle proprietà"
+msgstr "Descrizione Utilizzo Fotolibreria"
#: platform/iphone/export/export.cpp
msgid "iPhone 120 X 120"
-msgstr ""
+msgstr "iPhone 120 x 120"
#: platform/iphone/export/export.cpp
msgid "iPhone 180 X 180"
-msgstr ""
+msgstr "iPhone 180 x 180"
#: platform/iphone/export/export.cpp
msgid "iPad 76 X 76"
-msgstr ""
+msgstr "iPad 76 x 76"
#: platform/iphone/export/export.cpp
msgid "iPad 152 X 152"
-msgstr ""
+msgstr "iPad 152 x 152"
#: platform/iphone/export/export.cpp
msgid "iPad 167 X 167"
-msgstr ""
+msgstr "iPad 167 x 167"
#: platform/iphone/export/export.cpp
msgid "App Store 1024 X 1024"
-msgstr ""
+msgstr "App Store 1024 x 1024"
#: platform/iphone/export/export.cpp
msgid "Spotlight 40 X 40"
-msgstr ""
+msgstr "Spotlight 40 X 40"
#: platform/iphone/export/export.cpp
msgid "Spotlight 80 X 80"
-msgstr ""
+msgstr "Spotlight 80 X 80"
#: platform/iphone/export/export.cpp
msgid "Storyboard"
-msgstr ""
+msgstr "Storyboard"
#: platform/iphone/export/export.cpp
msgid "Use Launch Screen Storyboard"
-msgstr ""
+msgstr "Usa schermata di avvio Storyboard"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Image Scale Mode"
-msgstr "Modalità scala"
+msgstr "Modalità di ridimensionamento dell'immagine"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom Image @2x"
-msgstr "Immagine Personalizzata"
+msgstr "Immagine Personalizzata @2x"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom Image @3x"
-msgstr "Immagine Personalizzata"
+msgstr "Immagine Personalizzata @3x"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Use Custom BG Color"
-msgstr "Taglia nodi"
+msgstr "Utilizza Colore di Sfondo Personalizzato"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom BG Color"
-msgstr "Taglia nodi"
+msgstr "Colore di Sfondo Personalizzato"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Icons"
-msgstr "Espandi Tutto"
+msgstr "Icone Esportazione"
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Prepare Templates"
-msgstr "Gestisci i modelli d'esportazione"
+msgstr "Prepara i modelli d'esportazione"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Export template not found."
-msgstr "Modello di rilascio personalizzato non trovato."
+msgstr "Modello di esportazione non trovato."
#: platform/iphone/export/export.cpp
msgid "App Store Team ID not specified - cannot configure the project."
@@ -19392,122 +19287,110 @@ msgid "Run exported HTML in the system's default browser."
msgstr "Esegui il codice HTML esportato nel browser di sistema predefinito."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not open template for export: \"%s\"."
-msgstr "Impossibile aprire il template per l'esportazione:"
+msgstr "Non è stato possibile aprire il modello per l'esportazione: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Invalid export template: \"%s\"."
-msgstr "Template di esportazione non valido:"
+msgstr "Modello di esportazione non valido: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not write file: \"%s\"."
-msgstr "Impossibile scrivere il file:"
+msgstr "Non è stato possibile scrivere il file: \"%s\"."
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Icon Creation"
-msgstr "Imposta Margine"
+msgstr "Creazione Icona"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file: \"%s\"."
-msgstr "Impossibile leggere il file:"
+msgstr "Non è stato possibile leggere il file: \"%s\"."
#: platform/javascript/export/export.cpp
msgid "PWA"
-msgstr ""
+msgstr "PWA"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Variant"
-msgstr "Separazione:"
+msgstr "Variante"
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Export Type"
-msgstr "Esporta"
+msgstr "Tipo di Esportazione"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "VRAM Texture Compression"
-msgstr "Cambia espressione"
+msgstr "Compressione Texture VRAM"
#: platform/javascript/export/export.cpp
msgid "For Desktop"
-msgstr ""
+msgstr "Per il Desktop"
#: platform/javascript/export/export.cpp
msgid "For Mobile"
-msgstr ""
+msgstr "Per dispositivi mobile"
#: platform/javascript/export/export.cpp
msgid "HTML"
-msgstr ""
+msgstr "HTML"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Export Icon"
-msgstr "Espandi Tutto"
+msgstr "Icona di Esportazione"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Custom HTML Shell"
-msgstr "Taglia nodi"
+msgstr "Shell HTML Personalizzato"
#: platform/javascript/export/export.cpp
msgid "Head Include"
-msgstr ""
+msgstr "Includi head"
#: platform/javascript/export/export.cpp
msgid "Canvas Resize Policy"
-msgstr ""
+msgstr "Regole di ridimensionamento canvas"
#: platform/javascript/export/export.cpp
msgid "Focus Canvas On Start"
-msgstr ""
+msgstr "Evidenzia Canvas all'avvio"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Experimental Virtual Keyboard"
-msgstr "Filtra segnali"
+msgstr "Tastiera Virtuale Sperimentale"
#: platform/javascript/export/export.cpp
msgid "Progressive Web App"
-msgstr ""
+msgstr "Applicazione Web progressiva"
#: platform/javascript/export/export.cpp
msgid "Offline Page"
-msgstr ""
+msgstr "Pagina Offline"
#: platform/javascript/export/export.cpp
msgid "Icon 144 X 144"
-msgstr ""
+msgstr "Icona 144 x 144"
#: platform/javascript/export/export.cpp
msgid "Icon 180 X 180"
-msgstr ""
+msgstr "Icona 180 x 180"
#: platform/javascript/export/export.cpp
msgid "Icon 512 X 512"
-msgstr ""
+msgstr "Icona 512 x 512"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell: \"%s\"."
-msgstr "Impossibile leggere la shell HTML:"
+msgstr "Non è stato possibile leggere lo shell HTML: \"%s\"."
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not create HTTP server directory: %s."
-msgstr "Impossibile creare la directory per il server HTTP:"
+msgstr "Impossibile creare la cartella per il server HTTP: %s."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server: %d."
-msgstr "Errore all'avvio del server HTTP:"
+msgstr "Errore all'avvio del server HTTP: %d."
#: platform/javascript/export/export.cpp
msgid "Web"
@@ -19515,69 +19398,63 @@ msgstr "Web"
#: platform/javascript/export/export.cpp
msgid "HTTP Host"
-msgstr ""
+msgstr "Host HTTP"
#: platform/javascript/export/export.cpp
msgid "HTTP Port"
-msgstr ""
+msgstr "Porta HTTP"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Use SSL"
-msgstr "Usa Scatto"
+msgstr "Usa SSL"
#: platform/javascript/export/export.cpp
msgid "SSL Key"
-msgstr ""
+msgstr "Chiave SSL"
#: platform/osx/export/codesign.cpp
msgid "Can't get filesystem access."
-msgstr ""
+msgstr "Non si può avere accesso al filesystem."
#: platform/osx/export/codesign.cpp
msgid "Failed to get Info.plist hash."
-msgstr ""
+msgstr "Recupero dell'hash di Info.plist fallito."
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Invalid Info.plist, no exe name."
-msgstr "Nome del progetto non valido."
+msgstr "Invalido Info.plist, nessun nome exe."
#: platform/osx/export/codesign.cpp
msgid "Invalid Info.plist, no bundle id."
-msgstr ""
+msgstr "Info.plist invalido, nessun bundle id."
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Invalid Info.plist, can't load."
-msgstr "Geometria non valida, impossibile creare il poligono."
+msgstr "Info.plist non valido, impossibile caricare."
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Failed to create \"%s\" subfolder."
-msgstr "Impossibile creare la cartella."
+msgstr "Impossibile creare la sottocartella \"%s\"."
#: platform/osx/export/codesign.cpp
msgid "Failed to extract thin binary."
-msgstr ""
+msgstr "Estrazione del file binario fallito."
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Invalid binary format."
-msgstr "Percorso di base non valido."
+msgstr "Formato eseguibile non valido."
#: platform/osx/export/codesign.cpp
msgid "Already signed!"
-msgstr ""
+msgstr "Già firmato!"
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Failed to process nested resources."
-msgstr "Caricamento della risorsa fallito."
+msgstr "Elaborazione risorse nidificate fallito."
#: platform/osx/export/codesign.cpp
msgid "Failed to create _CodeSignature subfolder."
-msgstr ""
+msgstr "Creazione sottocartella _CodeSignature fallita."
#: platform/osx/export/codesign.cpp
#, fuzzy
@@ -19585,53 +19462,48 @@ msgid "Failed to get CodeResources hash."
msgstr "Caricamento della risorsa fallito."
#: platform/osx/export/codesign.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid entitlements file."
-msgstr "Estensione non valida."
+msgstr "File di permessi non valido."
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Invalid executable file."
-msgstr "Estensione non valida."
+msgstr "File eseguibile non valido."
#: platform/osx/export/codesign.cpp
msgid "Can't resize signature load command."
-msgstr ""
+msgstr "Impossibile ridimensionare il comando caricamento firma."
#: platform/osx/export/codesign.cpp
msgid "Failed to create fat binary."
-msgstr ""
+msgstr "Creazione del file binario fat fallito."
#: platform/osx/export/codesign.cpp
msgid "Unknown bundle type."
-msgstr ""
+msgstr "Tipo di bundle sconosciuto."
#: platform/osx/export/codesign.cpp
msgid "Unknown object type."
-msgstr ""
+msgstr "Tipo di oggetto sconosciuto."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "App Category"
-msgstr "Categoria:"
+msgstr "Categoria Applicazione"
#: platform/osx/export/export.cpp
msgid "High Res"
-msgstr ""
+msgstr "Alta Risoluzione"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Location Usage Description"
-msgstr "Descrizione"
+msgstr "Descrizione d'uso Posizione"
#: platform/osx/export/export.cpp
msgid "Address Book Usage Description"
-msgstr ""
+msgstr "Descrizione d'uso Rubrica"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Calendar Usage Description"
-msgstr "Descrizione"
+msgstr "Descrizione d'uso Calendario"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19639,37 +19511,33 @@ msgid "Photos Library Usage Description"
msgstr "Descrizioni delle proprietà"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Desktop Folder Usage Description"
-msgstr "Descrizioni del metodo"
+msgstr "Descrizione d'uso Cartella Desktop"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Documents Folder Usage Description"
-msgstr "Descrizioni del metodo"
+msgstr "Descrizione d'uso Cartella Documenti"
#: platform/osx/export/export.cpp
msgid "Downloads Folder Usage Description"
-msgstr ""
+msgstr "Descrizione d'uso Cartella Downloads"
#: platform/osx/export/export.cpp
msgid "Network Volumes Usage Description"
-msgstr ""
+msgstr "Descrizione d'uso Volumi di Rete"
#: platform/osx/export/export.cpp
msgid "Removable Volumes Usage Description"
-msgstr ""
+msgstr "Descrizione d'uso Volumi Rimovibili"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Codesign"
-msgstr "Nodo"
+msgstr "Firma del codice"
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Identity"
-msgstr "Indenta"
+msgstr "Identità"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
#, fuzzy
@@ -19681,59 +19549,52 @@ msgid "Hardened Runtime"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Replace Existing Signature"
-msgstr "Sostituisci nei file"
+msgstr "Sostituisci firma esistente"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Entitlements"
-msgstr "Gizmos"
+msgstr "Permessi"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Custom File"
-msgstr "Taglia nodi"
+msgstr "File Personalizzato"
#: platform/osx/export/export.cpp
msgid "Allow JIT Code Execution"
-msgstr ""
+msgstr "Consenti l'esecuzione di codice JIT"
#: platform/osx/export/export.cpp
msgid "Allow Unsigned Executable Memory"
-msgstr ""
+msgstr "Consenti memoria eseguibile non firmata"
#: platform/osx/export/export.cpp
msgid "Allow Dyld Environment Variables"
-msgstr ""
+msgstr "Consenti variabili d'ambiente Dyld"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Disable Library Validation"
-msgstr "Pulsante disabilitato"
+msgstr "Disabilita Convalida Libreria"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Audio Input"
-msgstr "Aggiungi Input"
+msgstr "Ingresso Audio"
#: platform/osx/export/export.cpp
msgid "Address Book"
-msgstr ""
+msgstr "Rubrica"
#: platform/osx/export/export.cpp
msgid "Calendars"
-msgstr ""
+msgstr "Calendari"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Photos Library"
-msgstr "Esporta Libreria"
+msgstr "Libreria Foto"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Apple Events"
-msgstr "Aggiungi Evento"
+msgstr "Eventi Apple"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19742,60 +19603,51 @@ msgstr "Debug"
#: platform/osx/export/export.cpp
msgid "App Sandbox"
-msgstr ""
+msgstr "Applicazione Sandbox"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Network Server"
-msgstr "Peer di Rete"
+msgstr "Server di Rete"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Network Client"
-msgstr "Peer di Rete"
+msgstr "Client di Rete"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Device USB"
-msgstr "Dispositivo"
+msgstr "Dispositivo USB"
#: platform/osx/export/export.cpp
msgid "Device Bluetooth"
-msgstr ""
+msgstr "Dispositivo Bluetooth"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Downloads"
-msgstr "Scarica"
+msgstr "File scaricati"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Pictures"
-msgstr "Funzionalità"
+msgstr "File Immagini"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Music"
-msgstr "Files"
+msgstr "File Audio"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Movies"
-msgstr "Filtra tiles"
+msgstr "File Video"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Custom Options"
-msgstr "Opzioni Bus"
+msgstr "Opzioni personalizzate"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization"
-msgstr "Localizzazione"
+msgstr "Autenticazione"
#: platform/osx/export/export.cpp
msgid "Apple ID Name"
-msgstr ""
+msgstr "Nome Apple ID"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19817,9 +19669,8 @@ msgid "Could not start xcrun executable."
msgstr "Impossibile avviare l'eseguibile xcrun."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization failed."
-msgstr "Localizzazione"
+msgstr "Autenticazione fallita."
#: platform/osx/export/export.cpp
msgid "Notarization request UUID: \"%s\""
@@ -19830,22 +19681,30 @@ msgid ""
"The notarization process generally takes less than an hour. When the process "
"is completed, you'll receive an email."
msgstr ""
+"Il processo di autenticazione impiega generalmente meno di un'ora. Riceverai "
+"una email quando il processo sarà concluso."
#: platform/osx/export/export.cpp
msgid ""
"You can check progress manually by opening a Terminal and running the "
"following command:"
msgstr ""
+"Puoi controllare manualmente l'avanzamento aprendo il Terminale e lanciando "
+"il seguente comando:"
#: platform/osx/export/export.cpp
msgid ""
"Run the following command to staple the notarization ticket to the exported "
"application (optional):"
msgstr ""
+"Lancia il seguente comando per agganciare il ticket di notarizzazione "
+"all'applicazione esportata (opzionale):"
#: platform/osx/export/export.cpp
msgid "Timestamping is not compatible with ad-hoc signature, and was disabled!"
msgstr ""
+"La visualizzazione dell'orario non è compatibile con la firma ad-hoc, ed è "
+"stata disabilitata!"
#: platform/osx/export/export.cpp
msgid ""
@@ -19854,17 +19713,19 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "Built-in CodeSign failed with error \"%s\"."
-msgstr ""
+msgstr "Firma del codice incorporata fallita con errore \"%s\"."
#: platform/osx/export/export.cpp
msgid "Built-in CodeSign require regex module."
-msgstr ""
+msgstr "La firma del codice incorporata richiede il modulo regex."
#: platform/osx/export/export.cpp
msgid ""
"Could not start codesign executable, make sure Xcode command line tools are "
"installed."
msgstr ""
+"Non è stato possibile lanciare l'eseguibile di firma del codice, controllare "
+"che gli strumenti da linea di comando di Xcode siano installati."
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
#, fuzzy
@@ -19879,11 +19740,12 @@ msgstr "Errore nel salvataggio del file: %s"
#: platform/osx/export/export.cpp
msgid "Relative symlinks are not supported, exported \"%s\" might be broken!"
msgstr ""
+"I link simbolici relativi non sono supportati, \"%s\" esportato potrebbe "
+"essere danneggiato!"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "DMG Creation"
-msgstr "Direzione"
+msgstr "Creazione del DMG"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19892,79 +19754,83 @@ msgstr "Impossibile avviare l'eseguibile hdiutil."
#: platform/osx/export/export.cpp
msgid "`hdiutil create` failed - file exists."
-msgstr ""
+msgstr "`hdutil create` fallito - Il file già esiste."
#: platform/osx/export/export.cpp
msgid "`hdiutil create` failed."
-msgstr ""
+msgstr "`hdutil create` fallito."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Creating app bundle"
-msgstr "Creando la miniatura"
+msgstr "Creando il pacchetto dell'app"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not find template app to export: \"%s\"."
-msgstr "Impossibile trovare il template dell'app per l'esportazione:"
+msgstr "Impossibile trovare il template dell'app per l'esportazione:\"%s\"."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid export format."
-msgstr "Template di esportazione non valido:"
+msgstr "Formato di esportazione invalido."
#: platform/osx/export/export.cpp
msgid ""
"Relative symlinks are not supported on this OS, the exported project might "
"be broken!"
msgstr ""
+"I link simbolici relativi non sono supportati in questo Sistema Operativo, "
+"il progetto esportato potrebbe essere danneggiato!"
#: platform/osx/export/export.cpp
msgid ""
"Requested template binary \"%s\" not found. It might be missing from your "
"template archive."
msgstr ""
+"Il modello di eseguibile \"%s\" richiesto non è stato trovato. Potrebbe "
+"essere mancante dal tuo archivio dei modelli."
#: platform/osx/export/export.cpp
msgid "Making PKG"
-msgstr ""
+msgstr "Creando il PKG"
#: platform/osx/export/export.cpp
msgid ""
"Ad-hoc signed applications require the 'Disable Library Validation' "
"entitlement to load dynamic libraries."
msgstr ""
+"Le applicazioni firmate ad-hoc richiedono il permesso \"Disabilita verifica "
+"libreria\" per caricare le librerie dinamiche."
#: platform/osx/export/export.cpp
msgid "Code signing bundle"
-msgstr ""
+msgstr "Pacchetto di firma del codice"
#: platform/osx/export/export.cpp
msgid "Making DMG"
-msgstr ""
+msgstr "Creando il DMG"
#: platform/osx/export/export.cpp
msgid "Code signing DMG"
-msgstr ""
+msgstr "Firmando il codice DMG"
#: platform/osx/export/export.cpp
msgid "Making ZIP"
-msgstr ""
+msgstr "Creando lo ZIP"
#: platform/osx/export/export.cpp
msgid ""
"Notarization requires the app to be archived first, select the DMG or ZIP "
"export format instead."
msgstr ""
+"La notarizazzione richiede che l'app sia prima archiviata, seleziona invece "
+"il formato di esportazione DMG o ZIP."
#: platform/osx/export/export.cpp
msgid "Sending archive for notarization"
-msgstr ""
+msgstr "Inviando l'archivio per l'autenticazione"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "ZIP Creation"
-msgstr "Proiezione"
+msgstr "Creazione dello ZIP"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19980,16 +19846,22 @@ msgid ""
"Warning: Built-in \"codesign\" is selected in the Editor Settings. Code "
"signing is limited to ad-hoc signature only."
msgstr ""
+"Warning: \"firma del codice\" integrato è selezionato nelle impostazioni "
+"dell'editor. La firma del codice è limitata solo alle firme ad-hoc."
#: 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 ""
+"Warning: gli strumenti da linea di comando di Xcode non sono installati, "
+"usando la \"firma del codice\" integrata. La firma del codice è limitata "
+"solo alle firme ad-hoc."
#: platform/osx/export/export.cpp
msgid "Notarization: Notarization with an ad-hoc signature is not supported."
msgstr ""
+"Autenticazione: L'autenticazione con una firma ad-hoc non è supportata."
#: platform/osx/export/export.cpp
#, fuzzy
@@ -20019,12 +19891,16 @@ msgid ""
"Warning: Notarization is disabled. The exported project will be blocked by "
"Gatekeeper if it's downloaded from an unknown source."
msgstr ""
+"Warning: l'autenticazione è disabilitata. Il progetto esportato sarà "
+"bloccato dal Gatekeeper is è scaricato da una sorgente sconosciuta."
#: platform/osx/export/export.cpp
msgid ""
"Code signing is disabled. The exported project will not run on Macs with "
"enabled Gatekeeper and Apple Silicon powered Macs."
msgstr ""
+"La firma del codice è disabilitata. Il progetto esportato non verrà eseguito "
+"su Mac con Gatekeeper abilitato e Mac alimentati da Apple Silicon."
#: platform/osx/export/export.cpp
msgid ""
@@ -20036,23 +19912,32 @@ msgstr ""
msgid ""
"Timestamping is not compatible with ad-hoc signature, and will be disabled!"
msgstr ""
+"La stampa dell'ora non è compatibile con la firma ad-hoc, e sarà "
+"disabilitata!"
#: platform/osx/export/export.cpp
msgid ""
"Warning: Notarization is not supported from this OS. The exported project "
"will be blocked by Gatekeeper if it's downloaded from an unknown source."
msgstr ""
+"Warning: la notarizzazione non è supportata da questo Sistema Operativo. Il "
+"progetto esportato sarà bloccato da Gatekeeper se è scaricato da una "
+"sorgente sconosciuta."
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Microphone access is enabled, but usage description is not "
"specified."
msgstr ""
+"Privacy: L'accesso al microfono è abilitato, ma la descrizione dell'uso non "
+"è specificata."
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Camera access is enabled, but usage description is not specified."
msgstr ""
+"Privacy: L'accesso alla Camera è abilitato, ma la descrizione d'uso non è "
+"specificata."
#: platform/osx/export/export.cpp
msgid ""
@@ -20090,6 +19975,7 @@ msgid "Architecture"
msgstr "Architettura"
#: platform/uwp/export/export.cpp
+#, fuzzy
msgid "Display Name"
msgstr "Nome Display"
@@ -20151,7 +20037,7 @@ msgstr "Cambia espressione"
#: platform/uwp/export/export.cpp
msgid "Landscape"
-msgstr ""
+msgstr "Panorama"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20228,6 +20114,7 @@ msgid "Invalid package unique name."
msgstr "Nome univoco del pacchetto non valido."
#: platform/uwp/export/export.cpp
+#, fuzzy
msgid "Invalid package publisher display name."
msgstr "Nome visualizzato del publisher del pacchetto invalido."
@@ -20290,9 +20177,8 @@ msgid "UWP"
msgstr "UWP"
#: platform/uwp/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Signtool"
-msgstr "Signtool"
+msgstr "Strumento di segno"
#: platform/uwp/export/export.cpp
msgid "Debug Certificate"
@@ -20468,7 +20354,7 @@ msgstr "Osslsigncode"
#: platform/windows/export/export.cpp
msgid "Wine"
-msgstr "Wine"
+msgstr "Vino"
#: platform/x11/export/export.cpp
msgid "32-bit executables cannot have embedded data >= 4 GiB."
@@ -20486,13 +20372,13 @@ msgid ""
"order for AnimatedSprite to display frames."
msgstr ""
"Una risorsa SpriteFrames deve essere creata o impostata nella proprietà "
-"\"Frames\" per permettere a AnimatedSprite di visualizzare i frame."
+"\"Frames\" per permettere all'AnimatedSprite di visualizzare i frame."
#: 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 "Scala"
+msgstr "Scala della velocità"
#: scene/2d/animated_sprite.cpp scene/2d/audio_stream_player_2d.cpp
#: scene/3d/audio_stream_player_3d.cpp scene/3d/sprite_3d.cpp
@@ -20544,7 +20430,7 @@ msgstr "Genera punti"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
#, fuzzy
msgid "Gravity Distance Scale"
-msgstr "Istanza"
+msgstr "Scala della distanza della gravità"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
#, fuzzy
@@ -20587,7 +20473,7 @@ msgstr "Volume"
#: servers/audio/effects/audio_effect_pitch_shift.cpp
#, fuzzy
msgid "Pitch Scale"
-msgstr "Scala"
+msgstr "Scala del tono"
#: 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
@@ -21417,7 +21303,6 @@ msgid "Antialiased"
msgstr "Inizializza"
#: scene/2d/multimesh_instance_2d.cpp scene/3d/multimesh_instance.cpp
-#, fuzzy
msgid "Multimesh"
msgstr "Multimesh"
@@ -21512,7 +21397,6 @@ msgstr ""
"poligono."
#: scene/2d/navigation_polygon.cpp
-#, fuzzy
msgid "Navpoly"
msgstr "Navpoly"
@@ -21558,7 +21442,7 @@ msgstr "Scatti relativi"
#: scene/2d/parallax_background.cpp scene/gui/scroll_container.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Scroll"
-msgstr ""
+msgstr "Scorrere"
#: scene/2d/parallax_background.cpp
#, fuzzy
@@ -21869,7 +21753,7 @@ msgstr ""
#: scene/2d/polygon_2d.cpp
msgid "Invert"
-msgstr ""
+msgstr "Invertire"
#: scene/2d/polygon_2d.cpp
#, fuzzy
@@ -21949,12 +21833,10 @@ msgstr ""
"Skeleton2D e impostane una."
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
-#, fuzzy
msgid "Hframes"
msgstr "Hframes"
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
-#, fuzzy
msgid "Vframes"
msgstr "Vframes"
@@ -22356,9 +22238,8 @@ msgid "Projection"
msgstr "Proiezione"
#: scene/3d/camera.cpp
-#, fuzzy
msgid "FOV"
-msgstr "FOV"
+msgstr "Campo Visivo"
#: scene/3d/camera.cpp
#, fuzzy
@@ -22558,7 +22439,6 @@ msgstr ""
"Per rimuovere questo avviso, disattiva la proprietà Compress di GIProbe."
#: scene/3d/gi_probe.cpp
-#, fuzzy
msgid "Subdiv"
msgstr "Subdiv"
@@ -22625,9 +22505,8 @@ msgstr "Forza Modulazione Bianca"
#: scene/3d/label_3d.cpp scene/resources/default_theme/default_theme.cpp
#: scene/resources/dynamic_font.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Font"
-msgstr "Font"
+msgstr "Carattere"
#: scene/3d/label_3d.cpp scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -22711,7 +22590,6 @@ msgid "Depth Range"
msgstr "Profondità"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Omni"
msgstr "Omni"
@@ -23786,6 +23664,16 @@ msgstr "Errore"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Ordina"
+
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Use AABB Center"
+msgstr "Usa Ambiente"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -24269,6 +24157,7 @@ msgid "Theme Overrides"
msgstr "Sovrascrizioni"
#: scene/gui/control.cpp
+#, fuzzy
msgid ""
"The Hint Tooltip won't be displayed as the control's Mouse Filter is set to "
"\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"."
@@ -24434,7 +24323,7 @@ msgstr "Mostra Ossa"
#: scene/gui/graph_edit.cpp scene/gui/text_edit.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Minimap"
-msgstr ""
+msgstr "Minimappa"
#: scene/gui/graph_edit.cpp
msgid "Enable grid minimap."
@@ -25297,9 +25186,8 @@ msgid "Use 32 BPC Depth"
msgstr ""
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Default Environment"
-msgstr "Mostra Ambiente"
+msgstr "Ambiente predefinito"
#: scene/main/scene_tree.cpp
msgid ""
@@ -26589,7 +26477,7 @@ msgstr "Debug del Canale UV"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "Sfocatura"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -27534,9 +27422,8 @@ msgid "Invalid comparison function for that type."
msgstr "Funzione di confronto non valida per quel tipo."
#: scene/resources/world.cpp
-#, fuzzy
msgid "Fallback Environment"
-msgstr "Mostra Ambiente"
+msgstr "Ambiente di ripiego"
#: scene/resources/world.cpp
#, fuzzy
@@ -27849,9 +27736,8 @@ msgid "Feed"
msgstr ""
#: servers/camera/camera_feed.cpp
-#, fuzzy
msgid "Is Active"
-msgstr "Prospettica"
+msgstr "È attiva"
#: servers/physics/space_sw.cpp servers/physics_2d/space_2d_sw.cpp
msgid "Sleep Threshold Linear"
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index f086111ef2..e7016610d7 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -42,13 +42,18 @@
# cacapon <takuma.tsubo@amazingengine.co.jp>, 2022.
# fadhliazhari <m.fadhliazhari@gmail.com>, 2022.
# Chia-Hsiang Cheng <cche0109@student.monash.edu>, 2022.
+# meko <hirono.yoneyama@outlook.com>, 2022.
+# 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, 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-08-21 06:01+0000\n"
-"Last-Translator: KokiOgawa <mupimupicandy@gmail.com>\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"
"Language: ja\n"
@@ -56,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.14-dev\n"
+"X-Generator: Weblate 4.15.1\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -185,9 +190,8 @@ msgid "Time Scale"
msgstr "タイムスケール"
#: core/bind/core_bind.cpp main/main.cpp
-#, fuzzy
msgid "Physics Jitter Fix"
-msgstr "物理ジッタ修正"
+msgstr "物理のジッター修正"
#: core/bind/core_bind.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Error"
@@ -325,9 +329,8 @@ msgid "Data Array"
msgstr "データ配列"
#: core/io/stream_peer_ssl.cpp
-#, fuzzy
msgid "Blocking Handshake"
-msgstr "ハンドシェイクを阻止すること"
+msgstr "ハンドシェイクをブロッキング処理にする"
#: core/io/udp_server.cpp
msgid "Max Pending Connections"
@@ -399,7 +402,7 @@ msgstr "マウスモード"
#: core/os/input.cpp
msgid "Use Accumulated Input"
-msgstr "蓄積入力使用"
+msgstr "蓄積された入力を使用"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: servers/audio_server.cpp
@@ -481,7 +484,6 @@ msgid "Pressure"
msgstr "圧力"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pen Inverted"
msgstr "ペン反転"
@@ -645,10 +647,12 @@ msgid "Always On Top"
msgstr "常に最前面"
#: core/project_settings.cpp
+#, fuzzy
msgid "Test Width"
msgstr "幅テスト"
#: core/project_settings.cpp
+#, fuzzy
msgid "Test Height"
msgstr "高さテスト"
@@ -743,7 +747,7 @@ msgstr "UI ページダウン"
#: core/project_settings.cpp
msgid "UI Home"
-msgstr "ホーム"
+msgstr "UI ホーム"
#: core/project_settings.cpp
msgid "UI End"
@@ -771,9 +775,8 @@ msgid "3D"
msgstr "3D"
#: core/project_settings.cpp
-#, fuzzy
msgid "Smooth Trimesh Collision"
-msgstr "スムーズ三角形メッシュコリジョン"
+msgstr "三角形メッシュ コリジョンをスムーズ化"
#: core/project_settings.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles2/rasterizer_scene_gles2.cpp
@@ -800,7 +803,6 @@ msgstr "品質"
#: core/project_settings.cpp scene/gui/file_dialog.cpp
#: scene/main/scene_tree.cpp scene/resources/navigation_mesh.cpp
#: servers/visual_server.cpp
-#, fuzzy
msgid "Filters"
msgstr "フィルター"
@@ -831,9 +833,8 @@ msgid "Profiler"
msgstr "プロファイラー"
#: core/project_settings.cpp
-#, fuzzy
msgid "Max Functions"
-msgstr "最大関数"
+msgstr "関数の上限"
#: core/project_settings.cpp scene/3d/vehicle_body.cpp
msgid "Compression"
@@ -856,6 +857,7 @@ msgid "Compression Level"
msgstr "圧縮レベル"
#: core/project_settings.cpp
+#, fuzzy
msgid "Window Log Size"
msgstr "Windowのログサイズ"
@@ -884,7 +886,6 @@ msgid "Connect Timeout Seconds"
msgstr "接続タイムアウトの秒数"
#: core/register_core_types.cpp
-#, fuzzy
msgid "Packet Peer Stream"
msgstr "パケットピアストリーム"
@@ -907,9 +908,8 @@ msgid "Resource"
msgstr "リソース"
#: core/resource.cpp
-#, fuzzy
msgid "Local To Scene"
-msgstr "シーンを閉じる"
+msgstr "シーンで固有"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_autoload_settings.cpp editor/plugins/path_editor_plugin.cpp
@@ -1051,7 +1051,6 @@ msgid "Scale"
msgstr "スケール"
#: drivers/gles3/rasterizer_scene_gles3.cpp
-#, fuzzy
msgid "Follow Surface"
msgstr "サーフェスをフォローする"
@@ -1143,7 +1142,6 @@ msgstr "アニメーション呼び出しの変更"
#: editor/animation_track_editor.cpp scene/2d/animated_sprite.cpp
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Frame"
msgstr "フレーム"
@@ -1171,9 +1169,8 @@ msgid "Value"
msgstr "値"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Arg Count"
-msgstr "引数数"
+msgstr "引数の数"
#: editor/animation_track_editor.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
@@ -1205,12 +1202,10 @@ msgid "Stream"
msgstr "ストリーム"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Start Offset"
msgstr "始点オフセット"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "End Offset"
msgstr "終点オフセット"
@@ -1225,9 +1220,8 @@ msgid "Animation"
msgstr "アニメーション"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Easing"
-msgstr "イージング(In-Out)"
+msgstr "イージング"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
@@ -1336,19 +1330,16 @@ msgid "Remove this track."
msgstr "このトラックを除去する。"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Time (s):"
-msgstr "時間 (秒): "
+msgstr "時間 (秒):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Position:"
-msgstr "位置"
+msgstr "位置:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Rotation:"
-msgstr "回転のステップ:"
+msgstr "回転:"
#: editor/animation_track_editor.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -1365,44 +1356,36 @@ msgid "Type:"
msgstr "型:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "(Invalid, expected type: %s)"
-msgstr "無効なエクスポート テンプレート:"
+msgstr "(無効, 予期されたタイプ: %s)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Easing:"
-msgstr "イージング(In-Out)"
+msgstr "イージング:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "In-Handle:"
-msgstr "ハンドルを設定する"
+msgstr "インハンドル:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Out-Handle:"
-msgstr "ハンドルを設定する"
+msgstr "アウトハンドル:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Stream:"
-msgstr "ストリーム"
+msgstr "ストリーム:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Start (s):"
-msgstr "リスタート:"
+msgstr "開始:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "End (s):"
-msgstr "フェードイン:"
+msgstr "終了:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Clip:"
-msgstr "アニメーション:"
+msgstr "アニメーションクリップ:"
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
@@ -1617,9 +1600,8 @@ msgid "Add Method Track Key"
msgstr "メソッドトラックキーの追加"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Method not found in object:"
-msgstr "オブジェクトにメソッドが見つかりません: "
+msgstr "オブジェクト内にメソッドが見つかりません:"
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
@@ -1660,9 +1642,8 @@ msgid ""
msgstr "このオプションは単一トラックでのベジェ編集では機能しません。"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Add RESET Keys"
-msgstr "アニメーションキーの拡縮"
+msgstr "リセットキーの追加"
#: editor/animation_track_editor.cpp
msgid ""
@@ -2230,9 +2211,8 @@ msgid "Open"
msgstr "開く"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Owners of: %s (Total: %d)"
-msgstr "所有者: %s (合計: %d)"
+msgstr "%s のオーナー (合計: %d)"
#: editor/dependency_editor.cpp
msgid ""
@@ -2343,7 +2323,6 @@ msgstr "開発リーダー"
#. TRANSLATORS: This refers to a job title.
#: editor/editor_about.cpp
-#, fuzzy
msgctxt "Job Title"
msgid "Project Manager"
msgstr "プロジェクトマネージャー"
@@ -2587,9 +2566,8 @@ msgid "There is no '%s' file."
msgstr "'%s' ファイルがありません。"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Layout:"
-msgstr "レイアウト"
+msgstr "レイアウト:"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -2667,7 +2645,7 @@ msgstr "既存のグローバル定数名と重複してはいけません。"
#: editor/editor_autoload_settings.cpp
msgid "Keyword cannot be used as an autoload name."
-msgstr "キーワードは自動ロード名として使用できません。"
+msgstr "キーワードは自動読み込みの名前として使用できません。"
#: editor/editor_autoload_settings.cpp
msgid "Autoload '%s' already exists!"
@@ -2788,27 +2766,23 @@ msgstr "フォルダーを作成できませんでした。"
#: editor/editor_dir_dialog.cpp
msgid "Choose"
-msgstr "選ぶ"
+msgstr "選択"
#: editor/editor_export.cpp
-#, fuzzy
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:"
@@ -2823,29 +2797,24 @@ msgid "Packing"
msgstr "パック中"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Save PCK"
-msgstr "名前を付けて保存"
+msgstr "PCKを保存"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Cannot create file \"%s\"."
-msgstr "フォルダーを作成できませんでした。"
+msgstr "ファイル \"%s\" を作成できませんでした。"
#: 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
msgid "Save ZIP"
-msgstr "名前を付けて保存"
+msgstr "ZIPを保存"
#: editor/editor_export.cpp
msgid ""
@@ -2926,39 +2895,32 @@ msgid "64 Bits"
msgstr "64ビット"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Embed PCK"
msgstr "組み込みPCK"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Texture Format"
-msgstr "テクスチャ領域"
+msgstr "テクスチャ形式"
#: editor/editor_export.cpp
-#, fuzzy
msgid "BPTC"
msgstr "BPTC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "S3TC"
msgstr "S3TC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "ETC"
-msgstr "TCP"
+msgstr "ETC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "ETC2"
msgstr "ETC2"
#: editor/editor_export.cpp
-#, fuzzy
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
@@ -2973,30 +2935,25 @@ msgid "Custom release template not found."
msgstr "カスタム リリーステンプレートが見つかりません。"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Prepare Template"
-msgstr "テンプレートの管理"
+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
msgid "Failed to copy export template."
-msgstr "無効なエクスポート テンプレート:"
+msgstr "エクスポートテンプレートのコピーに失敗しました。"
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
-#, fuzzy
msgid "PCK Embedding"
-msgstr "パディング"
+msgstr "PCKの組み込み"
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
@@ -3638,14 +3595,12 @@ msgid "Checked"
msgstr "チェック済み"
#: editor/editor_inspector.cpp
-#, fuzzy
msgid "Draw Red"
-msgstr "ドローコール:"
+msgstr "赤色で描画"
#: editor/editor_inspector.cpp
-#, fuzzy
msgid "Keying"
-msgstr "実行"
+msgstr "キーイング"
#: editor/editor_inspector.cpp
msgid "Pin value"
@@ -4378,19 +4333,16 @@ msgid "Update Continuously"
msgstr "継続的に更新"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Update Vital Only"
-msgstr "マテリアルの変更:"
+msgstr "重要な変更点のみを更新"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Localize Settings"
-msgstr "ローカライズ"
+msgstr "ローカライズの設定"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Restore Scenes On Load"
-msgstr "タイムシーク ノード"
+msgstr "ロード時にシーンを復元"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Show Thumbnail On Hover"
@@ -4401,31 +4353,26 @@ msgid "Inspector"
msgstr "インスペクター"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Default Property Name Style"
-msgstr "デフォルトのプロジェクトパス"
+msgstr "デフォルトのプロパティ名のスタイル"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Default Float Step"
-msgstr "デフォルトフロートステップ"
+msgstr "デフォルトの小数点数のステップ"
#: editor/editor_node.cpp scene/gui/tree.cpp
msgid "Disable Folding"
msgstr "折りたたみを無効化"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Auto Unfold Foreign Scenes"
-msgstr "自動展開外来シーン"
+msgstr "外部シーンの自動展開"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Horizontal Vector2 Editing"
msgstr "水平ベクトル2編集"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Horizontal Vector Types Editing"
msgstr "水平ベクトルタイプ編集"
@@ -4434,9 +4381,8 @@ msgid "Open Resources In Current Inspector"
msgstr "リソースを現在のインスペクターで開く"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Resources To Open In New Inspector"
-msgstr "インスペクターで開く"
+msgstr "新規インスペクターで開くリソース"
#: editor/editor_node.cpp
msgid "Default Color Picker Mode"
@@ -5096,14 +5042,12 @@ msgid "Debugger"
msgstr "デバッガー"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Profiler Frame History Size"
-msgstr "プロファイラフレーム履歴サイズ"
+msgstr "プロファイラーフレームの履歴サイズ"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Profiler Frame Max Functions"
-msgstr "プロファイラフレーム最大関数数"
+msgstr "プロファイラーフレームの関数の上限"
#: editor/editor_properties.cpp
msgid "Edit Text:"
@@ -5131,7 +5075,7 @@ msgstr "[空]"
#: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp
msgid "Assign..."
-msgstr "割り当て.."
+msgstr "割り当て..."
#: editor/editor_properties.cpp
msgid "Invalid RID"
@@ -5235,14 +5179,12 @@ msgstr "新規 %s"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "Base Type"
-msgstr "基底型を変更"
+msgstr "基底型"
#: editor/editor_resource_picker.cpp
-#, fuzzy
msgid "Edited Resource"
-msgstr "リソースを追加"
+msgstr "編集したリソース"
#: editor/editor_resource_picker.cpp scene/gui/line_edit.cpp
#: scene/gui/slider.cpp scene/gui/spin_box.cpp
@@ -5272,9 +5214,8 @@ msgstr ""
"行可能にしてください。"
#: editor/editor_run_native.cpp
-#, fuzzy
msgid "Project Run"
-msgstr "プロジェクト"
+msgstr "プロジェクトの実行"
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
@@ -5345,27 +5286,22 @@ msgid "Dim Editor On Dialog Popup"
msgstr "ダイアログのポップアップ時にエディターを薄暗くする"
#: editor/editor_settings.cpp main/main.cpp
-#, fuzzy
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
-#, fuzzy
msgid "Separate Distraction Mode"
-msgstr "集中モード"
+msgstr "集中モードを分離する"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Automatically Open Screenshots"
msgstr "自動的にスクリーンショットを開く"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Max Array Dictionary Items Per Page"
msgstr "ページあたりの最大配列辞書項目数"
@@ -5396,7 +5332,6 @@ msgid "Contrast"
msgstr "コントラスト"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Relationship Line Opacity"
msgstr "関係線の不透明度"
@@ -5409,14 +5344,12 @@ msgid "Border Size"
msgstr "ボーダーサイズ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Use Graph Node Headers"
-msgstr "グラフ ノード ヘッダーを使用する"
+msgstr "グラフノードヘッダーを使用する"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Additional Spacing"
-msgstr "アニメーションループ"
+msgstr "追加の間隔"
#: editor/editor_settings.cpp
msgid "Custom Theme"
@@ -5427,14 +5360,12 @@ msgid "Show Script Button"
msgstr "スクリプトボタンを表示"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Directories"
-msgstr "方向"
+msgstr "ディレクトリ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Autoscan Project Path"
-msgstr "プロジェクトパス:"
+msgstr "自動スキャンするプロジェクトパス"
#: editor/editor_settings.cpp
msgid "Default Project Path"
@@ -5445,14 +5376,12 @@ msgid "On Save"
msgstr "保存時"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Compress Binary Resources"
-msgstr "リソースをコピー"
+msgstr "バイナリリソースの圧縮"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Safe Save On Backup Then Rename"
-msgstr "バックアップ時に安全に保存してから名前を変更する"
+msgstr "バックアップとして名前を変更してから安全に保存する"
#: editor/editor_settings.cpp
msgid "File Dialog"
@@ -5463,18 +5392,16 @@ msgid "Thumbnail Size"
msgstr "サムネイルのサイズ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Docks"
-msgstr "Docks"
+msgstr "ドック"
#: editor/editor_settings.cpp
msgid "Scene Tree"
msgstr "シーンツリー"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Start Create Dialog Fully Expanded"
-msgstr "完全に展開された作成ダイアログを開始する"
+msgstr "新規作成ダイアログの開始時にすべてを展開する"
#: editor/editor_settings.cpp
msgid "Always Show Folders"
@@ -5489,9 +5416,8 @@ msgid "Auto Refresh Interval"
msgstr "自動リフレッシュの間隔"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Subresource Hue Tint"
-msgstr "サブリソース"
+msgstr "サブリソースの色相・色合い"
#: editor/editor_settings.cpp
msgid "Color Theme"
@@ -5567,19 +5493,16 @@ msgid "Minimap Width"
msgstr "ミニマップの幅"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Mouse Extra Buttons Navigate History"
-msgstr "マウス追加ボタンナビゲート履歴"
+msgstr "マウスの追加ボタンで履歴を表示"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Drag And Drop Selection"
-msgstr "GridMap の選択"
+msgstr "選択範囲のドラッグ&ドロップ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Stay In Script Editor On Node Selected"
-msgstr "ノード選択時にスクリプトエディタにとどまる"
+msgstr "ノード選択時にスクリプトエディターにとどまる"
#: editor/editor_settings.cpp
msgid "Appearance"
@@ -5594,26 +5517,22 @@ msgid "Line Numbers Zero Padded"
msgstr "行番号をゼロ埋め"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Bookmark Gutter"
-msgstr "ブックマークガターを表示"
+msgstr "ブックマークバーを表示"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Breakpoint Gutter"
-msgstr "ブレークポイントをスキップする"
+msgstr "ブレークポイントバーを表示"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Info Gutter"
-msgstr "情報ガターを表示"
+msgstr "情報バーを表示"
#: editor/editor_settings.cpp
msgid "Code Folding"
msgstr "コードの折りたたみ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Word Wrap"
msgstr "ワードラップ"
@@ -5622,26 +5541,22 @@ msgid "Show Line Length Guidelines"
msgstr "行の長さのガイド線を表示"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Line Length Guideline Soft Column"
-msgstr "行長ガイドラインソフト列"
+msgstr "行の長さのソフトガイドライン"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Line Length Guideline Hard Column"
-msgstr "行長ガイドライン ハード列"
+msgstr "行の長さのハードガイドライン"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
msgid "Script List"
msgstr "スクリプト一覧"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Members Overview"
-msgstr "メンバー概要を表示"
+msgstr "クラスメンバーの概要を表示"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Files"
msgstr "ファイル"
@@ -5651,7 +5566,7 @@ msgstr "保存時に末尾の空白を取り除く"
#: editor/editor_settings.cpp
msgid "Autosave Interval Secs"
-msgstr "自動保存の間隔秒数"
+msgstr "自動保存する間隔の秒数"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
msgid "Restore Scripts On Load"
@@ -5670,18 +5585,16 @@ msgid "Create Signal Callbacks"
msgstr "シグナルのコールバックを作成"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Sort Members Outline Alphabetically"
-msgstr "メンバーのアウトラインをアルファベット順に並べ替える"
+msgstr "クラスメンバーの概要をアルファベット順に並べる"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Cursor"
msgstr "カーソル"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Scroll Past End Of File"
-msgstr "ファイルの終わりを過ぎてスクロールする"
+msgstr "ファイルの末尾を越えたスクロール"
#: editor/editor_settings.cpp
msgid "Block Caret"
@@ -5703,42 +5616,35 @@ msgstr "右クリックでキャレットを移動"
#: modules/gdscript/gdscript_editor.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Completion"
-msgstr "完了"
+msgstr "自動補完"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Idle Parse Delay"
-msgstr "アイドル解析遅延"
+msgstr "アイドル時の解析の遅延"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Auto Brace Complete"
-msgstr "自動ブレース補完"
+msgstr "波括弧の自動補完"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Code Complete Delay"
-msgstr "コード補完遅延"
+msgstr "コード補完の遅延"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Put Callhint Tooltip Below Current Line"
-msgstr "コールヒントツールチップを現在の行の下に配置"
+msgstr "コード補完ツールチップを現在の行の下に配置"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Callhint Tooltip Offset"
-msgstr "コールヒントツールチップオフセット"
+msgstr "コード補完ツールチップのオフセット"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Complete File Paths"
-msgstr "ノードのパスをコピー"
+msgstr "ファイルパスの補完"
#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp
-#, fuzzy
msgid "Add Type Hints"
-msgstr "タイプを追加"
+msgstr "型ヒントを追加"
#: editor/editor_settings.cpp
msgid "Use Single Quotes"
@@ -5765,9 +5671,8 @@ msgid "Grid Map"
msgstr "グリッドマップ"
#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Pick Distance"
-msgstr "距離を取得:"
+msgstr "距離を選択"
#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Preview Size"
@@ -5782,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
@@ -5802,9 +5706,8 @@ msgstr "インスタンス化済"
#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Joint"
-msgstr "点"
+msgstr "ジョイント"
#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp
@@ -5816,44 +5719,36 @@ msgid "Shape"
msgstr "シェイプ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Primary Grid Steps"
-msgstr "グリッドのステップ:"
+msgstr "プライマリグリッドのステップ数"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid Size"
-msgstr "グリッドのステップ:"
+msgstr "グリッドのサイズ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid Division Level Max"
-msgstr "グリッド分割レベル最大"
+msgstr "グリッドの分割の最大レベル"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid Division Level Min"
-msgstr "グリッド分割レベル最小"
+msgstr "グリッドの分割の最小レベル"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid Division Level Bias"
-msgstr "グリッド分割レベルバイアス"
+msgstr "グリッドの分割レベルのバイアス"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid XZ Plane"
-msgstr "GridMap ペイント"
+msgstr "グリッドのXZ平面"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid XY Plane"
-msgstr "GridMap ペイント"
+msgstr "グリッドのXY平面"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid YZ Plane"
-msgstr "GridMap ペイント"
+msgstr "グリッドのYZ平面"
#: editor/editor_settings.cpp
msgid "Default FOV"
@@ -5872,9 +5767,8 @@ msgid "Lightmap Baking Number Of CPU Threads"
msgstr "ライトマップベイクのCPUスレッド数"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Navigation Scheme"
-msgstr "ナビゲーションモード"
+msgstr "ナビゲーションの方式"
#: editor/editor_settings.cpp
msgid "Invert Y Axis"
@@ -5897,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
@@ -5917,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"
@@ -5963,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"
@@ -6017,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
@@ -6032,75 +5913,62 @@ 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
-#, fuzzy
msgid "Poly Editor"
-msgstr "Polygon 2D UV エディター"
+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
-#, fuzzy
msgid "Autorename Animation Tracks"
-msgstr "アニメーションの名前を変更"
+msgstr "アニメーションのトラック名を自動変更"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Create Bezier Tracks"
-msgstr "デフォルトベジェトラックを作成"
+msgstr "デフォルトでベジェトラックを作成"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Create Reset Tracks"
-msgstr "RESETトラックを作成"
+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"
msgstr "ミニマップの不透明度"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Window Placement"
msgstr "ウィンドウの配置"
#: 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 "Rect全面"
+msgstr "矩形"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Rect Custom Position"
-msgstr "曲線のOut-Controlの位置を指定"
+msgstr "矩形のカスタム位置"
#: editor/editor_settings.cpp platform/android/export/export_plugin.cpp
msgid "Screen"
@@ -6195,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"
@@ -6228,9 +6091,8 @@ msgid "Line Number Color"
msgstr "行番号の色"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Safe Line Number Color"
-msgstr "行番号:"
+msgstr "安全な行番号の色"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Caret Color"
@@ -6245,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"
@@ -6314,9 +6175,8 @@ msgid "Flat"
msgstr "フラット"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hide Slider"
-msgstr "コリジョンモード"
+msgstr "スライダーを隠す"
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
@@ -6983,44 +6843,37 @@ msgid "Collada"
msgstr "Collada"
#: editor/import/editor_import_collada.cpp
-#, fuzzy
msgid "Use Ambient"
msgstr "アンビエントを使用"
#: editor/import/resource_importer_bitmask.cpp
-#, fuzzy
msgid "Create From"
-msgstr "フォルダーを作成"
+msgstr "作成元"
#: editor/import/resource_importer_bitmask.cpp
#: servers/audio/effects/audio_effect_compressor.cpp
-#, fuzzy
msgid "Threshold"
-msgstr "閾"
+msgstr "しきい値"
#: 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 "コンポーネント"
+msgstr "圧縮"
#: editor/import/resource_importer_csv_translation.cpp
-#, fuzzy
msgid "Delimiter"
msgstr "区切り文字"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "ColorCorrect"
-msgstr "Color関数。"
+msgstr "カラーコレクト"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "No BPTC If RGB"
-msgstr "RGB使用中の場合はBPTCを使用しない"
+msgstr "RGBの場合はBPTCなしにする"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp scene/2d/cpu_particles_2d.cpp
@@ -7033,26 +6886,22 @@ msgstr "フラグ"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp scene/animation/tween.cpp
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Repeat"
msgstr "繰り返し"
#: 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 "フィルター:"
+msgstr "フィルター"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Mipmaps"
-msgstr "シグナル"
+msgstr "ミップマップ"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Anisotropic"
msgstr "異方性"
@@ -7062,51 +6911,43 @@ msgid "sRGB"
msgstr "sRGB"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "Slices"
-msgstr "自動スライス"
+msgstr "スライス"
#: 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 "水平:"
+msgstr "水平"
#: 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 "垂直:"
+msgstr "垂直"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Generate Tangents"
-msgstr "ポイントを生成"
+msgstr "接線を生成"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Scale Mesh"
-msgstr "スケールモード"
+msgstr "スケールメッシュ"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Offset Mesh"
-msgstr "オフセット:"
+msgstr "メッシュのオフセット"
#: editor/import/resource_importer_obj.cpp
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Octahedral Compression"
-msgstr "圧縮"
+msgstr "八面体圧縮"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Optimize Mesh Flags"
-msgstr "サイズ: "
+msgstr "メッシュ最適化フラグ"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Single Scene"
@@ -7150,104 +6991,84 @@ msgstr "複数のシーン+マテリアルとしてインポート"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Nodes"
msgstr "ノード"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Type"
-msgstr "Return(戻り値)"
+msgstr "ルートの型"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Name"
-msgstr "リモート名"
+msgstr "ルートの名前"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Scale"
-msgstr "スケール"
+msgstr "ルートのスケール"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Custom Script"
-msgstr "ノードを切り取る"
+msgstr "カスタムスクリプト"
#: editor/import/resource_importer_scene.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Storage"
-msgstr "ファイルの保存:"
+msgstr "ストレージ"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Use Legacy Names"
-msgstr "従来の名前を使用"
+msgstr "レガシーな名前を使用"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Materials"
-msgstr "マテリアルの変更:"
+msgstr "マテリアル"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep On Reimport"
-msgstr "再インポート"
+msgstr "再インポート時に保持(Keep On Reimport)"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Meshes"
msgstr "メッシュ"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Ensure Tangents"
-msgstr "接線を計算"
+msgstr "接線の確保"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Light Baking"
-msgstr "ライトマップ"
+msgstr "ライトベーキング(Light Baking)"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Lightmap Texel Size"
-msgstr "ライトマップを焼き込む"
+msgstr "ライトマップのテクセルサイズ"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Skins"
msgstr "スキン"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Use Named Skins"
-msgstr "スケールスナップを使用"
+msgstr "名前付きスキンの使用"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "External Files"
-msgstr "外部"
+msgstr "外部ファイル"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Store In Subdir"
msgstr "サブディレクトリに保存"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Filter Script"
msgstr "スクリプトを絞り込む"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep Custom Tracks"
-msgstr "トランスフォーム"
+msgstr "カスタムトラックを保持"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Optimizer"
-msgstr "最適化"
+msgstr "オプティマイザー(Optimizer)"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/item_list_editor_plugin.cpp main/main.cpp
@@ -7261,34 +7082,28 @@ msgstr "最適化"
#: 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 "有効"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Linear Error"
-msgstr "最大。線形エラー:"
+msgstr "最大リニアエラー"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Angular Error"
-msgstr "最大。角度エラー:"
+msgstr "最大角度エラー"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Angle"
-msgstr "値"
+msgstr "最大角度"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Remove Unused Tracks"
-msgstr "アニメーショントラックを除去"
+msgstr "未使用のトラックを除去"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Clips"
-msgstr "アニメーションクリップ"
+msgstr "クリップ"
#: 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
@@ -7310,9 +7125,8 @@ msgid "Generating Lightmaps"
msgstr "ライトマップの生成"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Generating for Mesh:"
-msgstr "メッシュの生成: "
+msgstr "メッシュの生成:"
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
@@ -7340,43 +7154,37 @@ msgid "Saving..."
msgstr "保存中..."
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
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: 3Dで法線マップとして使用されているテクスチャが検出されました。赤緑テクス"
-"チャ圧縮を有効にしてメモリ使用量を削減します(青チャンネルはすでに破棄されま"
-"した)。"
+"%s: 3Dで法線マップとして使用されているテクスチャが検出されました。赤と緑のテ"
+"クスチャ圧縮を有効にしてメモリ使用量を削減します(青チャンネルは破棄されま"
+"す)。"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid ""
"%s: Texture detected as used in 3D. Enabling filter, repeat, mipmap "
"generation and VRAM texture compression."
msgstr ""
-"%s: 3Dで使用されているテクスチャが検出されました。フィルター、繰り返し、ミッ"
-"プマップ生成、VRAMテクスチャ圧縮を有効にします。"
+"%s: 3Dで使用されるテクスチャが検出されました。フィルター、繰り返し、ミップ"
+"マップ生成、VRAMテクスチャ圧縮を有効にします。"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "2D, Detect 3D"
msgstr "2D、3D検出"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "2D Pixel"
-msgstr "凝集ピクセル"
+msgstr "2Dピクセル"
#: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Lossy Quality"
-msgstr "損失のある品質"
+msgstr "非可逆品質"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "HDR Mode"
-msgstr "選択モード"
+msgstr "HDRモード"
#: editor/import/resource_importer_texture.cpp
msgid "BPTC LDR"
@@ -7386,90 +7194,74 @@ msgstr "BPTC LDR"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/mesh_instance_2d.cpp scene/2d/multimesh_instance_2d.cpp
#: scene/2d/particles_2d.cpp scene/2d/sprite.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Normal Map"
msgstr "法線マップ"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Process"
-msgstr "前処理"
+msgstr "プロセス"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
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
-#, fuzzy
msgid "Invert Color"
-msgstr "頂点"
+msgstr "色の反転"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Normal Map Invert Y"
-msgstr "ランダムな縮尺:"
+msgstr "法線マップのYを反転"
#: editor/import/resource_importer_texture.cpp
msgid "Size Limit"
msgstr "サイズ制限"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Detect 3D"
msgstr "3Dを検出"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "SVG"
-msgstr "CSG"
+msgstr "SVG"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid ""
"Warning, no suitable PC VRAM compression enabled in Project Settings. This "
"texture will not display correctly on PC."
msgstr ""
-"警告、プロジェクト設定で有効な適切なPC VRAM圧縮がありません。このテクスチャ"
-"は PCで正しく表示されません。"
+"警告、プロジェクト設定で適切なPC VRAM圧縮が有効化されていません。このテクス"
+"チャは PCで正しく表示されません。"
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Atlas File"
-msgstr "アウトラインのサイズ:"
+msgstr "アトラスファイル"
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Import Mode"
-msgstr "エクスポートモード:"
+msgstr "インポートモード"
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Crop To Region"
-msgstr "タイル領域を設定"
+msgstr "領域にあわせてトリミング"
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Trim Alpha Border From Region"
-msgstr "アルファ境界線を領域からトリミング"
+msgstr "領域からアルファボーダーをトリミング"
#: editor/import/resource_importer_wav.cpp scene/2d/physics_body_2d.cpp
-#, fuzzy
msgid "Force"
-msgstr "強制プッシュ"
+msgstr "強制"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "8 Bit"
msgstr "8ビット"
@@ -7480,42 +7272,35 @@ msgid "Mono"
msgstr "Mono"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Max Rate"
-msgstr "ミックス ノード"
+msgstr "最大レート"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Max Rate Hz"
-msgstr "ミックス ノード"
+msgstr "最大レート(Hz)"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Trim"
msgstr "トリム"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Normalize"
-msgstr "フォーマット"
+msgstr "ノーマライズ"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop Mode"
-msgstr "移動モード"
+msgstr "ループモード"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop Begin"
-msgstr "移動モード"
+msgstr "ループの開始"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop End"
-msgstr "移動モード"
+msgstr "ループの終了"
#: editor/import_defaults_editor.cpp
msgid "Select Importer"
@@ -7585,17 +7370,16 @@ msgid ""
"Select a resource file in the filesystem or in the inspector to adjust "
"import settings."
msgstr ""
-"ファイルシステムや Inspector にある Resource ファイルを選択してインポート設定"
-"を調整してください。"
+"ファイルシステムやインスペクターにあるリソースファイルを選択してインポート設"
+"定を調整します。"
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
msgstr "リソースの読み込みに失敗しました。"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Property Name Style"
-msgstr "プロジェクト名:"
+msgstr "プロパティ名のスタイル"
#: editor/inspector_dock.cpp scene/gui/color_picker.cpp
msgid "Raw"
@@ -7607,14 +7391,12 @@ msgid "Capitalized"
msgstr "単語の先頭文字を大文字に"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Localized"
-msgstr "ロケール"
+msgstr "ローカライズ済"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Localization not available for current language."
-msgstr "現地語化は現在の言語では使用できません。"
+msgstr "ローカライズ化は現在の言語では使用できません。"
#: editor/inspector_dock.cpp
msgid "Copy Properties"
@@ -8347,9 +8129,8 @@ msgid "Set the end animation. This is useful for sub-transitions."
msgstr "終了アニメーションを設定する。これはサブトランジションに便利です。"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition:"
-msgstr "トランジション: "
+msgstr "トランジション:"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Play Mode:"
@@ -8650,25 +8431,21 @@ msgid "Loading..."
msgstr "読み込み中..."
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "First"
msgstr "最初"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Previous"
msgstr "前"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Next"
msgstr "次"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Last"
msgstr "最後"
@@ -8718,9 +8495,8 @@ msgid "Testing"
msgstr "試験的"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Failed to get repository configuration."
-msgstr "リポジトリを構成できませんでした。"
+msgstr "リポジトリ構成を取得できませんでした。"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
@@ -9657,9 +9433,8 @@ msgid "Swap Gradient Fill Points"
msgstr "Gradient の塗りつぶしポイントを入れ替え"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Grid Snap"
-msgstr "グリッドの切り替え"
+msgstr "グリッドスナップの切り替え"
#: editor/plugins/item_list_editor_plugin.cpp editor/project_export.cpp
#: scene/3d/label_3d.cpp scene/gui/button.cpp scene/gui/dialogs.cpp
@@ -9682,9 +9457,8 @@ msgstr "ID"
#: editor/plugins/item_list_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Separator"
-msgstr "分離:"
+msgstr "セパレーター"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
@@ -9920,7 +9694,6 @@ msgstr ""
"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "MeshLibrary"
msgstr "メッシュライブラリ"
@@ -10855,7 +10628,6 @@ msgid "List Script Names As"
msgstr "スクリプト名:"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Exec Flags"
msgstr "実行フラグ"
@@ -11177,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 " [ポータル有効]"
@@ -11738,9 +11510,8 @@ msgid "Invalid geometry, can't replace by mesh."
msgstr "ジオメトリが無効です。メッシュに置き換えることはできません。"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Convert to MeshInstance2D"
-msgstr "Mesh2Dに変換する"
+msgstr "MeshInstance2Dに変換する"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
@@ -11776,14 +11547,12 @@ msgid "Simplification:"
msgstr "簡略化: "
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Shrink (Pixels):"
-msgstr "縮小 (ピクセル): "
+msgstr "縮小 (ピクセル):"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Grow (Pixels):"
-msgstr "拡大(ピクセル): "
+msgstr "拡大(ピクセル):"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Update Preview"
@@ -11846,9 +11615,8 @@ msgid "New Animation"
msgstr "新規アニメーション"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Filter animations"
-msgstr "メソッドを絞り込む"
+msgstr "アニメーションを絞り込む"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
@@ -13030,9 +12798,8 @@ msgid "This property can't be changed."
msgstr "このプロパティは変更できません。"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Snap Options"
-msgstr "スナッピングオプション"
+msgstr "スナップオプション"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/animated_sprite.cpp
#: scene/2d/camera_2d.cpp scene/2d/cpu_particles_2d.cpp scene/2d/light_2d.cpp
@@ -13040,12 +12807,12 @@ msgstr "スナッピングオプション"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
-#, fuzzy
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
-msgstr "オフセット:"
+msgstr "オフセット"
#: editor/plugins/tile_set_editor_plugin.cpp editor/rename_dialog.cpp
#: scene/gui/range.cpp scene/resources/animation.cpp
@@ -13056,14 +12823,12 @@ msgstr "ステップ"
#: editor/plugins/tile_set_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Separation"
-msgstr "分離:"
+msgstr "分離"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Tile"
-msgstr "選択"
+msgstr "タイルの選択"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/light_2d.cpp scene/2d/line_2d.cpp scene/2d/mesh_instance_2d.cpp
@@ -13072,14 +12837,12 @@ msgstr "選択"
#: scene/gui/nine_patch_rect.cpp scene/gui/texture_rect.cpp
#: scene/resources/material.cpp scene/resources/sky.cpp
#: scene/resources/style_box.cpp scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Texture"
-msgstr "テキスト"
+msgstr "テクスチャ"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tex Offset"
-msgstr "バイトのオフセット"
+msgstr "テクスチャのオフセット"
#: editor/plugins/tile_set_editor_plugin.cpp modules/csg/csg_shape.cpp
#: scene/2d/canvas_item.cpp scene/2d/particles_2d.cpp
@@ -13089,79 +12852,64 @@ msgstr "マテリアル"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/canvas_item.cpp
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Modulate"
-msgstr "データの投入"
+msgstr "変調"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tile Mode"
-msgstr "モード切り替え"
+msgstr "タイルモード"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Autotile Bitmask Mode"
-msgstr "ビットマスクモード"
+msgstr "オートタイル ビットマスクモード"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Size"
-msgstr "アウトラインのサイズ:"
+msgstr "サブタイルのサイズ"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Spacing"
-msgstr "行間隔"
+msgstr "サブタイルの間隔"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Occluder Offset"
-msgstr "オクルーダーポリゴンを生成"
+msgstr "オクルーダーのオフセット"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Navigation Offset"
-msgstr "ナビゲーションモード"
+msgstr "ナビゲーションのオフセット"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Offset"
-msgstr "オフセット:"
+msgstr "シェイプオフセット"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Transform"
-msgstr "トランスフォーム"
+msgstr "シェイプトランスフォーム"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision"
-msgstr "コリジョンを使用"
+msgstr "コリジョンを選択"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision One Way"
-msgstr "選択範囲のみ"
+msgstr "片方向のコリジョンを選択"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision One Way Margin"
-msgstr "BVHコリジョンマージン"
+msgstr "片方向のコリジョンのマージン"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Navigation"
-msgstr "ナビゲーションを表示"
+msgstr "ナビゲーションを選択"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Occlusion"
-msgstr "選択"
+msgstr "オクルージョンの選択"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tileset Script"
-msgstr "スクリプトを絞り込む"
+msgstr "タイルセットスクリプト"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "TileSet"
@@ -14243,6 +13991,8 @@ msgstr "定義されたすべてのプリセットのプロジェクトをエク
#: editor/project_export.cpp
msgid "All presets must have an export path defined for Export All to work."
msgstr ""
+"全てのプリセットはエクスポートが全て機能するために、エクスポートパスを定義す"
+"る必要があります。"
#: editor/project_export.cpp
msgid "Delete preset '%s'?"
@@ -14355,53 +14105,48 @@ 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
-#, fuzzy
msgid "More Info..."
-msgstr "移動..."
+msgstr "詳細情報..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export PCK/Zip..."
-msgstr "PCK/Zipのエクスポート"
+msgstr "PCK/Zipのエクスポート..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export Project..."
-msgstr "プロジェクトのエクスポート"
+msgstr "プロジェクトのエクスポート..."
#: editor/project_export.cpp
msgid "Export All"
msgstr "すべてエクスポート"
#: editor/project_export.cpp
-#, fuzzy
msgid "Choose an export mode:"
-msgstr "空のフォルダーを選択してください。"
+msgstr "エクスポートのモードを選択:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export All..."
-msgstr "すべてエクスポート"
+msgstr "すべてエクスポート..."
#: editor/project_export.cpp editor/project_manager.cpp
msgid "ZIP File"
msgstr "ZIPファイル"
#: editor/project_export.cpp
-#, fuzzy
msgid "Godot Project Pack"
-msgstr "Godotゲームパック"
+msgstr "Godotプロジェクトパック"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "このプラットフォームに対するエクスポート テンプレートが見つかりません:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Project Export"
-msgstr "プロジェクト創始者"
+msgstr "プロジェクトのエクスポート"
#: editor/project_export.cpp
msgid "Manage Export Templates"
@@ -14469,15 +14214,14 @@ msgstr "無効なプロジェクトパスです (なにか変更がありまし
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
-"プロジェクトパスの project.godot を読み込めませんでした。 (エラー %d)。見つか"
-"らないか破損している可能性があります。"
+"%s のプロジェクトを読み込めませんでした。 (エラー %d)。見つからないか破損して"
+"いる可能性があります。"
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "プロジェクトパスの project.godot を編集できませんでした。"
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "プロジェクトを '%s' に保存できませんでした (エラー %d)。"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -14485,7 +14229,7 @@ msgstr "project.godot をプロジェクトパスに生成できませんでし
#: editor/project_manager.cpp
msgid "Error opening package file, not in ZIP format."
-msgstr "パッケージファイルを開けませんでした、zip 形式ではありません。"
+msgstr "パッケージファイルを開けませんでした、ZIP形式ではありません。"
#: editor/project_manager.cpp
msgid "The following files failed extraction from package:"
@@ -14712,7 +14456,6 @@ msgstr ""
#. TRANSLATORS: This refers to the application where users manage their Godot projects.
#: editor/project_manager.cpp
-#, fuzzy
msgctxt "Application"
msgid "Project Manager"
msgstr "プロジェクトマネージャー"
@@ -15510,19 +15253,16 @@ msgid "Make Local"
msgstr "ローカルにする"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "ノード名:"
+msgstr "シーン固有名を有効にする"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "他の関数/変数/シグナルによりすでに使われている名前:"
+msgstr "固有名がシーン内の他のノードに既に使われています:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Disable Scene Unique Name(s)"
-msgstr "ノード名:"
+msgstr "シーン固有名を無効にする"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -15598,7 +15338,7 @@ msgstr "サブリソース"
#: editor/scene_tree_dock.cpp
msgid "Access as Scene Unique Name"
-msgstr ""
+msgstr "シーン固有名でアクセス"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance"
@@ -15698,18 +15438,16 @@ msgid "Clear Inheritance? (No Undo!)"
msgstr "継承をクリアしますか? (元に戻せません!)"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Show Scene Tree Root Selection"
-msgstr "選択対象を中央に"
+msgstr "シーンツリーのルート選択対象を表示"
#: editor/scene_tree_dock.cpp
msgid "Derive Script Globals By Name"
-msgstr ""
+msgstr "名前によるスクリプトグローバルの導出"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Use Favorites Root Selection"
-msgstr "選択対象を全面に"
+msgstr "お気に入りのルート選択対象を使用"
#: editor/scene_tree_editor.cpp
msgid "Toggle Visible"
@@ -15724,9 +15462,8 @@ msgid "Button Group"
msgstr "ボタングループ"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Disable Scene Unique Name"
-msgstr "ノード名:"
+msgstr "シーン固有名を無効にする"
#: editor/scene_tree_editor.cpp
msgid "(Connecting From)"
@@ -15742,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 ""
@@ -15749,7 +15489,7 @@ msgid ""
"Click to show signals dock."
msgstr ""
"ノードには %s 接続と %s グループがあります。\n"
-"クリックすると、信号ドックが表示されます。"
+"クリックすると、シグナルドックが表示されます。"
#: editor/scene_tree_editor.cpp
msgid ""
@@ -15805,7 +15545,7 @@ msgstr "無効なノード名。以下の文字は使えません:"
#: editor/scene_tree_editor.cpp
msgid "Another node already uses this unique name in the scene."
-msgstr ""
+msgstr "既にシーン中の他のノードにこの固有名が使われています。"
#: editor/scene_tree_editor.cpp
msgid "Rename Node"
@@ -15956,9 +15696,8 @@ msgid "Attach Node Script"
msgstr "ノードにスクリプトをアタッチする"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Remote %s:"
-msgstr "リモート "
+msgstr "リモート %s:"
#: editor/script_editor_debugger.cpp
msgid "Bytes:"
@@ -16046,7 +15785,7 @@ msgstr "リモートシーンツリーの更新間隔"
#: editor/script_editor_debugger.cpp
msgid "Remote Inspect Refresh Interval"
-msgstr ""
+msgstr "リモートインスペクトのリフレッシュ間隔"
#: editor/script_editor_debugger.cpp
msgid "Network Profiler"
@@ -16144,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"
@@ -16154,7 +15893,7 @@ msgstr "AudioStreamPlayer3Dの放射角度を変更する"
#: platform/osx/export/export.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Camera"
-msgstr ""
+msgstr "カメラ"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
@@ -16166,7 +15905,7 @@ msgstr "カメラサイズを変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Visibility Notifier"
-msgstr ""
+msgstr "可視性通知"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Notifier AABB"
@@ -16174,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"
@@ -16238,11 +15977,11 @@ msgstr "ナビゲーションソリッド無効化"
#: editor/spatial_editor_gizmos.cpp
msgid "Joint Body A"
-msgstr ""
+msgstr "ジョイント ボディA"
#: editor/spatial_editor_gizmos.cpp
msgid "Joint Body B"
-msgstr ""
+msgstr "ジョイント ボディB"
#: editor/spatial_editor_gizmos.cpp
msgid "Room Edge"
@@ -16283,9 +16022,8 @@ msgstr "戻る"
#: editor/spatial_editor_gizmos.cpp scene/2d/light_occluder_2d.cpp
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Occluder"
-msgstr "オクルージョンモード"
+msgstr "オクルーダー"
#: editor/spatial_editor_gizmos.cpp
msgid "Set Occluder Sphere Radius"
@@ -16347,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"
@@ -16369,7 +16106,7 @@ msgstr "1秒あたりの最大警告数"
#: main/main.cpp
msgid "Flush stdout On Print"
-msgstr ""
+msgstr "Print時にstdoutをフラッシュ"
#: main/main.cpp servers/visual_server.cpp
msgid "Logging"
@@ -16389,7 +16126,7 @@ msgstr "ログのパス"
#: main/main.cpp
msgid "Max Log Files"
-msgstr ""
+msgstr "最大ログファイル数"
#: main/main.cpp
msgid "Driver"
@@ -16429,7 +16166,7 @@ msgstr "ピクセル単位の透明度"
#: main/main.cpp
msgid "Allowed"
-msgstr ""
+msgstr "許可"
#: main/main.cpp
msgid "Intended Usage"
@@ -16440,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"
@@ -16454,37 +16190,33 @@ msgstr "スレッドモデル"
#: main/main.cpp
msgid "Thread Safe BVH"
-msgstr ""
+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
-#, fuzzy
msgid "Physics FPS"
-msgstr "物理フレーム %"
+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
@@ -16498,38 +16230,35 @@ msgstr ""
#: main/main.cpp
msgid "stdout"
-msgstr ""
+msgstr "stdout"
#: main/main.cpp
msgid "Print FPS"
-msgstr ""
+msgstr "FPSを表示する"
#: main/main.cpp
msgid "Verbose stdout"
-msgstr ""
+msgstr "冗長なstdout"
#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp
-#, fuzzy
msgid "Physics Interpolation"
-msgstr "補間モード"
+msgstr "物理補間"
#: main/main.cpp
-#, fuzzy
msgid "Enable Warnings"
-msgstr "フィルタリングを有効化"
+msgstr "警告を有効化"
#: main/main.cpp
-#, fuzzy
msgid "Frame Delay Msec"
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"
@@ -16537,7 +16266,7 @@ msgstr "iOS"
#: main/main.cpp
msgid "Hide Home Indicator"
-msgstr ""
+msgstr "ホームインジケーターを隠す"
#: main/main.cpp
msgid "Input Devices"
@@ -16560,33 +16289,30 @@ 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
#: scene/resources/world.cpp
-#, fuzzy
msgid "Environment"
-msgstr "環境を表示"
+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"
-msgstr ""
+msgstr "画像"
#: main/main.cpp
msgid "Fullsize"
@@ -16610,11 +16336,11 @@ msgstr "Windowsのネイティブアイコン"
#: main/main.cpp
msgid "Buffering"
-msgstr ""
+msgstr "バッファリング"
#: main/main.cpp
msgid "Agile Event Flushing"
-msgstr ""
+msgstr "即座にイベントフラッシュ"
#: main/main.cpp
msgid "Emulate Touch From Mouse"
@@ -16629,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"
@@ -16680,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"
@@ -16701,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"
@@ -16717,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"
@@ -16782,17 +16506,15 @@ msgstr "ガイドを表示"
#: modules/csg/csg_shape.cpp
msgid "Cone"
-msgstr ""
+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"
@@ -16868,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"
@@ -16890,22 +16611,19 @@ msgstr "DTLSを使用"
#: modules/fbx/editor_scene_importer_fbx.cpp
msgid "FBX"
-msgstr ""
+msgstr "FBX"
#: modules/fbx/editor_scene_importer_fbx.cpp
-#, fuzzy
msgid "Use FBX"
-msgstr "BVHを使用"
+msgstr "FBXを使用"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Config File"
-msgstr "ファイルの保存:"
+msgstr "構成ファイル"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Load Once"
-msgstr "リソースを読み込む"
+msgstr "一度だけ読み込む"
#: modules/gdnative/gdnative.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
@@ -16913,14 +16631,12 @@ msgid "Singleton"
msgstr "シングルトン"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Symbol Prefix"
-msgstr "接頭辞:"
+msgstr "シンボルの接頭辞"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Reloadable"
-msgstr "再読み込み"
+msgstr "再読み込み可能"
#: modules/gdnative/gdnative.cpp
#: modules/gdnative/gdnative_library_singleton_editor.cpp
@@ -16973,9 +16689,8 @@ msgid "Disabled GDNative Singleton"
msgstr "無効なGDNativeシングルトン"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
-#, fuzzy
msgid "Libraries:"
-msgstr "ライブラリ: "
+msgstr "ライブラリ:"
#: modules/gdnative/nativescript/nativescript.cpp
msgid "Class Name"
@@ -17016,11 +16731,11 @@ msgstr "警告をエラーとして扱う"
#: modules/gdscript/gdscript.cpp
msgid "Exclude Addons"
-msgstr ""
+msgstr "アドオンを除外"
#: modules/gdscript/gdscript.cpp
msgid "Autocomplete Setters And Getters"
-msgstr ""
+msgstr "セッターとゲッターを自動補完"
#: modules/gdscript/gdscript_functions.cpp
msgid "Step argument is zero!"
@@ -17063,9 +16778,8 @@ msgid "Language Server"
msgstr "言語サーバー"
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Enable Smart Resolve"
-msgstr "解決できません"
+msgstr "Smart Resolveを有効化"
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Show Native Symbols In Editor"
@@ -17093,14 +16807,12 @@ msgid "Byte Offset"
msgstr "バイトのオフセット"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Component Type"
-msgstr "コンポーネント"
+msgstr "コンポーネントの型"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Normalized"
-msgstr "フォーマット"
+msgstr "正規化"
#: modules/gltf/gltf_accessor.cpp
#, fuzzy
@@ -17108,19 +16820,16 @@ msgid "Count"
msgstr "総計:"
#: modules/gltf/gltf_accessor.cpp scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Min"
-msgstr "MiB"
+msgstr "最小"
#: modules/gltf/gltf_accessor.cpp scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Max"
-msgstr "ミックス"
+msgstr "最大"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Sparse Count"
-msgstr "インスタンス"
+msgstr "スパースカウント"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Buffer View"
@@ -17162,18 +16871,16 @@ msgid "Indices"
msgstr "すべてのデバイス"
#: modules/gltf/gltf_camera.cpp
-#, fuzzy
msgid "FOV Size"
-msgstr "サイズ:"
+msgstr "FOVサイズ"
#: modules/gltf/gltf_camera.cpp
msgid "Zfar"
-msgstr ""
+msgstr "Zfar"
#: modules/gltf/gltf_camera.cpp
-#, fuzzy
msgid "Znear"
-msgstr "リニア"
+msgstr "Znear"
#: modules/gltf/gltf_light.cpp scene/2d/canvas_modulate.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/light_2d.cpp scene/2d/polygon_2d.cpp
@@ -17189,12 +16896,11 @@ msgstr "色"
#: modules/gltf/gltf_light.cpp scene/3d/reflection_probe.cpp
#: scene/resources/environment.cpp
msgid "Intensity"
-msgstr ""
+msgstr "強度"
#: modules/gltf/gltf_light.cpp scene/2d/light_2d.cpp scene/3d/light.cpp
-#, fuzzy
msgid "Range"
-msgstr "変更"
+msgstr "範囲"
#: modules/gltf/gltf_light.cpp
msgid "Inner Cone Angle"
@@ -17205,14 +16911,12 @@ msgid "Outer Cone Angle"
msgstr ""
#: modules/gltf/gltf_mesh.cpp
-#, fuzzy
msgid "Blend Weights"
-msgstr "ライトマップを焼き込む"
+msgstr "ブレンドウエイト"
#: modules/gltf/gltf_mesh.cpp
-#, fuzzy
msgid "Instance Materials"
-msgstr "マテリアルの変更:"
+msgstr "マテリアルインスタンス"
#: modules/gltf/gltf_node.cpp scene/3d/skeleton.cpp
msgid "Parent"
@@ -17225,7 +16929,7 @@ msgstr "プラットフォーム"
#: modules/gltf/gltf_node.cpp scene/3d/mesh_instance.cpp
msgid "Skin"
-msgstr ""
+msgstr "スキン"
#: modules/gltf/gltf_node.cpp scene/3d/spatial.cpp
#, fuzzy
@@ -17238,9 +16942,8 @@ msgid "Children"
msgstr "編集可能な子"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Joints"
-msgstr "点"
+msgstr "ジョイント"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
msgid "Roots"
@@ -17248,7 +16951,7 @@ msgstr ""
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_state.cpp
msgid "Unique Names"
-msgstr ""
+msgstr "固有名"
#: modules/gltf/gltf_skeleton.cpp
#, fuzzy
@@ -17256,9 +16959,8 @@ msgid "Godot Bone Node"
msgstr "タイムシーク ノード"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Skin Root"
-msgstr "新しいシーンのルート"
+msgstr "スキンのルート"
#: modules/gltf/gltf_skin.cpp
#, fuzzy
@@ -17342,36 +17044,31 @@ msgid "Scene Name"
msgstr "シーンのパス:"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Root Nodes"
-msgstr "ルートノード名"
+msgstr "ルートノード"
#: modules/gltf/gltf_state.cpp scene/2d/particles_2d.cpp
#: scene/gui/texture_button.cpp scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Textures"
-msgstr "機能"
+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
msgid "Lights"
msgstr "ライト"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Unique Animation Names"
-msgstr "新規アニメーション名:"
+msgstr "固有アニメーション名"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Skeletons"
msgstr "スケルトン"
@@ -17381,9 +17078,8 @@ msgid "Skeleton To Node"
msgstr "ノードを選択"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Animations"
-msgstr "アニメーション:"
+msgstr "アニメーション"
#: modules/gltf/gltf_texture.cpp
#, fuzzy
@@ -17395,9 +17091,8 @@ msgid "Mesh Library"
msgstr "メッシュライブラリ"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Physics Material"
-msgstr "物理フレーム %"
+msgstr "物理マテリアル"
#: modules/gridmap/grid_map.cpp scene/3d/visual_instance.cpp
#, fuzzy
@@ -17406,7 +17101,7 @@ msgstr "ライトマップを焼き込む"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Cell"
-msgstr ""
+msgstr "セル"
#: modules/gridmap/grid_map.cpp
#, fuzzy
@@ -17432,7 +17127,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
@@ -17629,9 +17324,8 @@ 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 "オフセット:"
+msgstr "ループのオフセット"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Eye Height"
@@ -17657,11 +17351,11 @@ msgstr ""
#: 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"
@@ -17677,19 +17371,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"
@@ -17767,13 +17458,12 @@ msgid "Seamless"
msgstr "シームレス"
#: modules/opensimplex/noise_texture.cpp
-#, fuzzy
msgid "As Normal Map"
-msgstr "ランダムな縮尺:"
+msgstr "法線マップとして"
#: modules/opensimplex/noise_texture.cpp
msgid "Bump Strength"
-msgstr ""
+msgstr "バンプ強度"
#: modules/opensimplex/noise_texture.cpp
msgid "Noise"
@@ -17785,16 +17475,15 @@ 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
msgid "Persistence"
-msgstr "透視投影"
+msgstr "パーシステンス"
#: modules/opensimplex/open_simplex_noise.cpp
#, fuzzy
@@ -17807,12 +17496,10 @@ msgid "Subject"
msgstr "対象"
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Names"
msgstr "名前"
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Strings"
msgstr "文字列"
@@ -18227,36 +17914,32 @@ msgstr "メンバーを編集"
#: modules/visual_script/visual_script_expression.cpp
#: scene/resources/visual_shader.cpp
msgid "Expression"
-msgstr ""
+msgstr "式"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Return"
msgstr "Return(戻り値)"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Enabled"
-msgstr "実行可能"
+msgstr "戻り値が有効"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Type"
-msgstr "Return(戻り値)"
+msgstr "戻り値の型"
#: modules/visual_script/visual_script_flow_control.cpp
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Condition"
-msgstr "コンディション"
+msgstr "条件"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "if (cond) is:"
msgstr ""
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "While"
-msgstr "一方"
+msgstr "〜の間(While)"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "while (cond):"
@@ -18271,18 +17954,16 @@ msgid "for (elem) in (input):"
msgstr ""
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Input type not iterable:"
-msgstr "入力タイプは反復可能ではありません: "
+msgstr "入力タイプは反復可能ではありません:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator became invalid"
msgstr "イテレーターが無効になりました"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Iterator became invalid:"
-msgstr "イテレーターが無効になりました: "
+msgstr "イテレーターが無効になりました:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Sequence"
@@ -18293,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"
@@ -18379,11 +18059,11 @@ msgstr ""
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "ShiftLeft %s"
-msgstr ""
+msgstr "左シフト%s"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "ShiftRight %s"
-msgstr ""
+msgstr "右シフト%s"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "BitAnd %s"
@@ -18442,19 +18122,16 @@ msgstr "配列のサイズを変更"
#: modules/visual_script/visual_script_nodes.cpp scene/resources/material.cpp
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Operator"
-msgstr "イテレータ"
+msgstr "演算子"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Invalid argument of type:"
-msgstr ":無効な引数 引数の型: "
+msgstr "無効な引数の型:"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Invalid arguments:"
-msgstr ": 無効な引数: "
+msgstr "無効な引数:"
#: modules/visual_script/visual_script_nodes.cpp
msgid "a if cond, else b"
@@ -18525,9 +18202,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."
@@ -18556,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"
@@ -18617,18 +18291,16 @@ msgid "WaitInstanceSignal"
msgstr "インスタンス"
#: modules/webrtc/webrtc_data_channel.cpp
-#, fuzzy
msgid "Write Mode"
-msgstr "優先順位モード"
+msgstr "書き込みモード"
#: modules/webrtc/webrtc_data_channel.h
msgid "WebRTC"
-msgstr ""
+msgstr "WebRTC"
#: modules/webrtc/webrtc_data_channel.h
-#, fuzzy
msgid "Max Channel In Buffer (KB)"
-msgstr "キャンバスのポリゴンインデックスのバッファサイズ (KB)"
+msgstr "チャンネルの入力バッファの上限 (KB)"
#: modules/websocket/websocket_client.cpp
msgid "Verify SSL"
@@ -18639,32 +18311,28 @@ msgid "Trusted SSL Certificate"
msgstr "信頼済みSSL証明書"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "WebSocket Client"
-msgstr "ネットワーク ピア"
+msgstr "WebSocketクライアント"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "Max In Buffer (KB)"
-msgstr "最大サイズ (KB)"
+msgstr "入力バッファの上限 (KB)"
#: modules/websocket/websocket_macros.h
msgid "Max In Packets"
-msgstr ""
+msgstr "入力パケットの上限"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "Max Out Buffer (KB)"
-msgstr "最大サイズ (KB)"
+msgstr "出力バッファの上限 (KB)"
#: modules/websocket/websocket_macros.h
msgid "Max Out Packets"
-msgstr ""
+msgstr "出力パケットの上限"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "WebSocket Server"
-msgstr "ネットワーク ピア"
+msgstr "WebSocketサーバー"
#: modules/websocket/websocket_server.cpp
msgid "Bind IP"
@@ -18683,9 +18351,8 @@ msgid "CA Chain"
msgstr "CAチェーン"
#: modules/websocket/websocket_server.cpp
-#, fuzzy
msgid "Handshake Timeout"
-msgstr "タイムアウト。"
+msgstr "ハンドシェイクのタイムアウト"
#: modules/webxr/webxr_interface.cpp
msgid "Session Mode"
@@ -18796,9 +18463,8 @@ msgid "Use Custom Build"
msgstr ""
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Export Format"
-msgstr "エクスポート先のパス"
+msgstr "エクスポート形式"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18850,22 +18516,19 @@ msgstr "前のインスタンスを調べる"
#: platform/android/export/export_plugin.cpp
msgid "Code"
-msgstr ""
+msgstr "コード"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Package"
-msgstr "パック中"
+msgstr "パッケージ"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Unique Name"
-msgstr "ノード名:"
+msgstr "固有名"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Signed"
-msgstr "シグナル"
+msgstr "署名付き"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18897,22 +18560,20 @@ msgid "XR Features"
msgstr "機能"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "XR Mode"
-msgstr "パンモード"
+msgstr "XRモード"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Hand Tracking"
-msgstr "トラッキング"
+msgstr "ハンドトラッキング"
#: platform/android/export/export_plugin.cpp
msgid "Hand Tracking Frequency"
-msgstr ""
+msgstr "ハンドトラッキングの周期"
#: platform/android/export/export_plugin.cpp
msgid "Passthrough"
-msgstr ""
+msgstr "パススルー"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18950,37 +18611,32 @@ msgid "Allow"
msgstr "hiDPIを許可"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Command Line"
-msgstr "Command"
+msgstr "コマンドライン"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Extra Args"
-msgstr "追加の呼び出し引数:"
+msgstr "追加の引数"
#: platform/android/export/export_plugin.cpp
msgid "APK Expansion"
-msgstr ""
+msgstr "APK拡張"
#: platform/android/export/export_plugin.cpp
msgid "Salt"
-msgstr ""
+msgstr "ソルト"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Public Key"
-msgstr "SSH 公開鍵パス"
+msgstr "公開鍵"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Permissions"
-msgstr "放出マスク"
+msgstr "権限"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Custom Permissions"
-msgstr "カスタムシーンを実行"
+msgstr "カスタムの権限"
#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
@@ -19108,9 +18764,8 @@ msgstr ""
"\"OpenXR\" の場合にのみ有効です。"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "\"Passthrough\" is only valid when \"XR Mode\" is \"OpenXR\"."
-msgstr "\"Passthrough\" は \"Xr Mode\" が \"OpenXR\" の場合にのみ有効です。"
+msgstr "\"パススルー\" は \"XR Mode\" が \"OpenXR\" の場合にのみ有効です。"
#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
@@ -19160,20 +18815,16 @@ msgstr ""
#: platform/android/export/export_plugin.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Code Signing"
-msgstr "DMGをコード署名中"
+msgstr "コード署名"
#: 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' が見つかりませんでした。\n"
-"このコマンドが Android SDK build-tools ディレクトリにあるか確認してくださ"
-"い。\n"
-"%s は署名されませんでした。"
+"'apksigner' が見つかりませんでした。このコマンドが Android SDK build-tools "
+"ディレクトリにあるか確認してください。%s は署名されませんでした。"
#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
@@ -19188,9 +18839,8 @@ msgid "Could not find keystore, unable to export."
msgstr "キーストアが見つからないため、エクスポートできません。"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not start apksigner executable."
-msgstr "サブプロセスを開始できませんでした!"
+msgstr "apksigner実行ファイルを開始できませんでした。"
#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
@@ -19221,9 +18871,8 @@ msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "無効なファイル名です! Android APKには拡張子 *.apk が必要です。"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Unsupported export format!"
-msgstr "サポートされていないエクスポートフォーマットです!\n"
+msgstr "サポートされていないエクスポート形式です!"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19234,7 +18883,6 @@ msgstr ""
"情報が存在しません。 「プロジェクト」メニューから再インストールしてください。"
#: 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."
@@ -19289,9 +18937,8 @@ msgstr ""
"gradleのプロジェクトディレクトリを確認してください。"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Package not found: \"%s\"."
-msgstr "見つからないパッケージ: %s"
+msgstr "パッケージが見つかりません: \"%s\"。"
#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
@@ -19321,9 +18968,8 @@ msgid "Adding files..."
msgstr "ファイルを追加中..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files."
-msgstr "プロジェクトファイルをエクスポートできませんでした"
+msgstr "プロジェクトファイルをエクスポートできませんでした。"
#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
@@ -19347,19 +18993,19 @@ msgstr ""
#: platform/iphone/export/export.cpp
msgid "iPhone 2436 X 1125"
-msgstr ""
+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"
@@ -19367,35 +19013,35 @@ msgstr ""
#: 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"
-msgstr ""
+msgstr "iPad 1536 x 2048"
#: platform/iphone/export/export.cpp
msgid "iPhone 1242 X 2208"
-msgstr ""
+msgstr "iPhone 1242 x 2208"
#: platform/iphone/export/export.cpp
msgid "App Store Team ID"
-msgstr ""
+msgstr "App Store Team ID"
#: platform/iphone/export/export.cpp
msgid "Provisioning Profile UUID Debug"
@@ -19429,7 +19075,7 @@ msgstr ""
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Info"
-msgstr ""
+msgstr "情報"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19501,35 +19147,35 @@ msgstr "プロパティの説明"
#: platform/iphone/export/export.cpp
msgid "iPhone 120 X 120"
-msgstr ""
+msgstr "iPhone 120 x 120"
#: platform/iphone/export/export.cpp
msgid "iPhone 180 X 180"
-msgstr ""
+msgstr "iPhone 180 x 180"
#: platform/iphone/export/export.cpp
msgid "iPad 76 X 76"
-msgstr ""
+msgstr "iPad 76 x 76"
#: platform/iphone/export/export.cpp
msgid "iPad 152 X 152"
-msgstr ""
+msgstr "iPad 152 x 152"
#: platform/iphone/export/export.cpp
msgid "iPad 167 X 167"
-msgstr ""
+msgstr "iPad 167 x 167"
#: platform/iphone/export/export.cpp
msgid "App Store 1024 X 1024"
-msgstr ""
+msgstr "App Store 1024 x 1024"
#: platform/iphone/export/export.cpp
msgid "Spotlight 40 X 40"
-msgstr ""
+msgstr "Spotlight 40 x 40"
#: platform/iphone/export/export.cpp
msgid "Spotlight 80 X 80"
-msgstr ""
+msgstr "Spotlight 80 x 80"
#: platform/iphone/export/export.cpp
msgid "Storyboard"
@@ -19606,14 +19252,12 @@ msgid "Could not open template for export: \"%s\"."
msgstr "エクスポート用のテンプレートを開けませんでした:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Invalid export template: \"%s\"."
-msgstr "無効なエクスポート テンプレート:"
+msgstr "無効なエクスポートテンプレート: \"%s\"。"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not write file: \"%s\"."
-msgstr "ファイルを書き込めませんでした:"
+msgstr "ファイルを書き込めませんでした: \"%s\"。"
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19621,13 +19265,12 @@ msgid "Icon Creation"
msgstr "マージンを設定する"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file: \"%s\"."
-msgstr "ファイルを読み込めませんでした:"
+msgstr "ファイルを読み込めませんでした: \"%s\"。"
#: platform/javascript/export/export.cpp
msgid "PWA"
-msgstr ""
+msgstr "PWA"
#: platform/javascript/export/export.cpp
#, fuzzy
@@ -19640,21 +19283,20 @@ msgid "Export Type"
msgstr "エクスポート"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "VRAM Texture Compression"
-msgstr "VRAM圧縮"
+msgstr "VRAMテクスチャ圧縮"
#: platform/javascript/export/export.cpp
msgid "For Desktop"
-msgstr ""
+msgstr "デスクトップ向け"
#: platform/javascript/export/export.cpp
msgid "For Mobile"
-msgstr ""
+msgstr "モバイル向け"
#: platform/javascript/export/export.cpp
msgid "HTML"
-msgstr ""
+msgstr "HTML"
#: platform/javascript/export/export.cpp
#, fuzzy
@@ -19704,31 +19346,28 @@ msgid "Icon 512 X 512"
msgstr ""
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell: \"%s\"."
-msgstr "HTMLシェルを読み込めませんでした:"
+msgstr "HTMLシェルを読み込めませんでした: \"%s\"。"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not create HTTP server directory: %s."
-msgstr "HTTPサーバーのディレクトリの作成に失敗:"
+msgstr "HTTPサーバーのディレクトリの作成に失敗しました: %s。"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server: %d."
-msgstr "HTTPサーバーの開始に失敗:"
+msgstr "HTTPサーバーの開始に失敗しました: %d。"
#: platform/javascript/export/export.cpp
msgid "Web"
-msgstr ""
+msgstr "Web"
#: 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
msgid "Use SSL"
@@ -19865,15 +19504,13 @@ msgid "Removable Volumes Usage Description"
msgstr ""
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Codesign"
-msgstr "DMGをコード署名中"
+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
@@ -19881,9 +19518,8 @@ msgid "Timestamp"
msgstr "時間"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Hardened Runtime"
-msgstr "ランタイム"
+msgstr "Hardened Runtime"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19994,9 +19630,8 @@ msgid "Custom Options"
msgstr "バス オプション"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization"
-msgstr "ローカライズ"
+msgstr "公証"
#: platform/osx/export/export.cpp
msgid "Apple ID Name"
@@ -20012,29 +19647,28 @@ msgid "Apple Team ID"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not open icon file \"%s\"."
-msgstr "プロジェクトファイルをエクスポートできませんでした"
+msgstr "アイコンファイルを開けませんでした: \"%s\"。"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not start xcrun executable."
-msgstr "サブプロセスを開始できませんでした!"
+msgstr "xcrun実行ファイルを開始できませんでした。"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization failed."
-msgstr "ローカライズ"
+msgstr "公証に失敗しました。"
#: platform/osx/export/export.cpp
msgid "Notarization request UUID: \"%s\""
-msgstr ""
+msgstr "公証の要求UUID: \"%s\""
#: platform/osx/export/export.cpp
msgid ""
"The notarization process generally takes less than an hour. When the process "
"is completed, you'll receive an email."
msgstr ""
+"公証の手続きは通常1時間以内に終了します。手続きが完了するとEメールが届きま"
+"す。"
#: platform/osx/export/export.cpp
msgid ""
@@ -20047,6 +19681,8 @@ msgid ""
"Run the following command to staple the notarization ticket to the exported "
"application (optional):"
msgstr ""
+"次のコマンドを実行して、公証のチケットをエクスポートしたアプリケーションに紐"
+"付けします(オプション):"
#: platform/osx/export/export.cpp
msgid "Timestamping is not compatible with ad-hoc signature, and was disabled!"
@@ -20072,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
@@ -20114,9 +19749,8 @@ msgid "Could not find template app to export: \"%s\"."
msgstr "エクスポートするテンプレートAPKが見つかりませんでした:"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid export format."
-msgstr "無効なエクスポート テンプレート:"
+msgstr "無効なエクスポート形式です。"
#: platform/osx/export/export.cpp
msgid ""
@@ -20139,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"
@@ -20161,21 +19797,20 @@ msgid ""
"Notarization requires the app to be archived first, select the DMG or ZIP "
"export format instead."
msgstr ""
+"公証にはまずアプリをアーカイブする必要があります。DMGまたはZIPのエクスポート"
+"形式のものを選択してください。"
#: platform/osx/export/export.cpp
msgid "Sending archive for notarization"
-msgstr ""
+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:"
@@ -20186,102 +19821,123 @@ 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."
-msgstr ""
+msgstr "公証: アドホック署名による公証はサポートされていません。"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization: Code signing is required for notarization."
-msgstr "Notarization: コード署名が必要です。"
+msgstr "公証: 公証にはコード署名が必要です。"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization: Hardened runtime is required for notarization."
-msgstr "Notarization: hardened runtime が必要です。"
+msgstr "公証: 公証にはHardened runtimeが必要です。"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization: Timestamp runtime is required for notarization."
-msgstr "Notarization: hardened runtime が必要です。"
+msgstr "公証: 公証にはTimestamp runtimeが必要です。"
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID name not specified."
-msgstr "Notarization: Apple ID 名が指定されていません。"
+msgstr "公証: Apple ID名が指定されていません。"
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID password not specified."
-msgstr "Notarization: Apple ID パスワードが指定されていません。"
+msgstr "公証: Apple ID パスワードが指定されていません。"
#: platform/osx/export/export.cpp
msgid ""
"Warning: Notarization is disabled. The exported project will be blocked by "
"Gatekeeper if it's downloaded from an unknown source."
msgstr ""
+"警告: 公証が無効化されています。エクスポートしたプロジェクトは、不明なソース"
+"からダウンロードされた場合Gatekeeperによってブロックされます。"
#: platform/osx/export/export.cpp
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 ""
"Warning: Notarization is not supported from this OS. The exported project "
"will be blocked by Gatekeeper if it's downloaded from an unknown source."
msgstr ""
+"警告: このOSによる公証はサポートされていません。エクスポートしたプロジェクト"
+"は、不明なソースからダウンロードされた場合Gatekeeperによってブロックされま"
+"す。"
#: platform/osx/export/export.cpp
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"
@@ -20289,144 +19945,131 @@ msgstr "macOS"
#: platform/osx/export/export.cpp
msgid "Force Builtin Codesign"
-msgstr ""
+msgstr "ビルドインコード署名を強制"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Architecture"
-msgstr "アーキテクチャエントリを追加する"
+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
-#, fuzzy
msgid "Signing"
-msgstr "スキニング"
+msgstr "署名"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Certificate"
msgstr "証明書"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Algorithm"
-msgstr "デバッガー"
+msgstr "アルゴリズム"
#: platform/uwp/export/export.cpp
msgid "Major"
-msgstr ""
+msgstr "メジャー"
#: platform/uwp/export/export.cpp
msgid "Minor"
-msgstr ""
+msgstr "マイナー"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Build"
-msgstr "定規モード"
+msgstr "ビルド"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Revision"
-msgstr "バージョン"
+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."
@@ -20492,85 +20135,72 @@ 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
-#, fuzzy
msgid "File Version"
-msgstr "バージョン"
+msgstr "ファイルバージョン"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Product Version"
-msgstr "無効な製品バージョン:"
+msgstr "製品バージョン"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Company Name"
-msgstr "ノード名:"
+msgstr "会社名"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Product Name"
-msgstr "プロジェクト名:"
+msgstr "製品名"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "File Description"
-msgstr "説明"
+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 ""
@@ -20578,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 ""
@@ -20610,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:"
@@ -20641,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"
@@ -20662,7 +20292,7 @@ msgstr "Windows"
#: platform/windows/export/export.cpp
msgid "Rcedit"
-msgstr ""
+msgstr "Rcedit"
#: platform/windows/export/export.cpp
msgid "Osslsigncode"
@@ -20674,13 +20304,12 @@ msgstr "Wine"
#: platform/x11/export/export.cpp
msgid "32-bit executables cannot have embedded data >= 4 GiB."
-msgstr ""
+msgstr "32bitの実行ファイルは4GiB以上の組み込みデータを持つことができません。"
#: scene/2d/animated_sprite.cpp scene/3d/sprite_3d.cpp
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Frames"
-msgstr "フレーム %"
+msgstr "フレーム"
#: scene/2d/animated_sprite.cpp
msgid ""
@@ -20692,80 +20321,69 @@ 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
msgid "Flip H"
-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
msgid "Flip V"
-msgstr ""
+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
-#, fuzzy
msgid "Physics Overrides"
-msgstr "上書き"
+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"
@@ -20783,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
@@ -20795,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
@@ -20805,34 +20422,29 @@ 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
-#, fuzzy
msgid "Bus"
-msgstr "バスを追加"
+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
@@ -20844,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
@@ -20856,91 +20467,76 @@ msgstr "処理モード"
#: scene/2d/camera_2d.cpp
msgid "Limit"
-msgstr ""
+msgstr "制限"
#: scene/2d/camera_2d.cpp scene/gui/control.cpp scene/gui/nine_patch_rect.cpp
#: scene/resources/style_box.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Left"
-msgstr "左上"
+msgstr "左"
#: scene/2d/camera_2d.cpp scene/gui/control.cpp scene/gui/nine_patch_rect.cpp
#: scene/resources/style_box.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Right"
-msgstr "ライト"
+msgstr "右"
#: scene/2d/camera_2d.cpp scene/gui/control.cpp scene/gui/nine_patch_rect.cpp
#: scene/resources/dynamic_font.cpp scene/resources/style_box.cpp
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Bottom"
-msgstr "左下"
+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"
-msgstr ""
+msgstr "水平"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "V"
-msgstr "UV"
+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
@@ -21048,9 +20644,8 @@ msgid ""
msgstr ""
#: scene/2d/collision_polygon_2d.cpp
-#, fuzzy
msgid "Build Mode"
-msgstr "定規モード"
+msgstr "ビルドモード"
#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp
#: scene/3d/collision_polygon.cpp scene/3d/collision_shape.cpp
@@ -21205,19 +20800,17 @@ 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
-#, fuzzy
msgid "Initial Velocity"
-msgstr "初期化"
+msgstr "初期速度"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Velocity Random"
-msgstr "オービットビュー 右"
+msgstr "速度ランダム化"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp
@@ -21227,15 +20820,13 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Velocity Curve"
-msgstr "オービットビュー 右"
+msgstr "速度曲線"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Orbit Velocity"
-msgstr "オービットビュー 右"
+msgstr "オービット速度"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21245,25 +20836,23 @@ msgstr "リニア"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Accel"
-msgstr "アクセス"
+msgstr "加速度"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Accel Random"
-msgstr ""
+msgstr "加速度ランダム化"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Accel Curve"
-msgstr "曲線を分割する"
+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
@@ -21292,7 +20881,7 @@ 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
@@ -21362,21 +20951,18 @@ msgstr "スケール"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Speed Curve"
-msgstr "曲線を分割する"
+msgstr "速度曲線"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Offset Random"
-msgstr "オフセット:"
+msgstr "オフセットランダム化"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Offset Curve"
-msgstr "曲線を閉じる"
+msgstr "オフセット曲線"
#: scene/2d/joints_2d.cpp
msgid "Node A and Node B must be PhysicsBody2Ds"
@@ -21424,7 +21010,7 @@ msgstr ""
#: scene/2d/joints_2d.cpp scene/resources/animation.cpp
#: scene/resources/ray_shape.cpp scene/resources/segment_shape_2d.cpp
msgid "Length"
-msgstr ""
+msgstr "長さ"
#: scene/2d/joints_2d.cpp
#, fuzzy
@@ -21447,9 +21033,8 @@ msgstr ""
"光の形状を持つテクスチャは\"Texture\"プロパティに指定する必要があります。"
#: scene/2d/light_2d.cpp scene/3d/light.cpp scene/gui/reference_rect.cpp
-#, fuzzy
msgid "Editor Only"
-msgstr "エディター"
+msgstr "エディターのみ"
#: scene/2d/light_2d.cpp
#, fuzzy
@@ -21485,9 +21070,8 @@ msgid "Item Cull Mask"
msgstr ""
#: scene/2d/light_2d.cpp scene/3d/light.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Shadow"
-msgstr "シェーダー"
+msgstr "シャドウ"
#: scene/2d/light_2d.cpp
#, fuzzy
@@ -21576,7 +21160,7 @@ msgstr ""
#: scene/2d/line_2d.cpp
msgid "Round Precision"
-msgstr ""
+msgstr "丸め精度"
#: scene/2d/line_2d.cpp scene/2d/polygon_2d.cpp
#: scene/resources/dynamic_font.cpp
@@ -21592,7 +21176,7 @@ msgstr ""
#: scene/3d/navigation.cpp scene/animation/root_motion_view.cpp
#: scene/resources/world_2d.cpp servers/physics_2d/physics_2d_server_sw.cpp
msgid "Cell Size"
-msgstr ""
+msgstr "セルサイズ"
#: scene/2d/navigation_2d.cpp scene/3d/navigation.cpp
#, fuzzy
@@ -21751,7 +21335,7 @@ msgstr "終りに"
#: scene/2d/parallax_background.cpp
msgid "Ignore Camera Zoom"
-msgstr ""
+msgstr "カメラのズームを無視"
#: scene/2d/parallax_layer.cpp
msgid ""
@@ -21840,14 +21424,12 @@ msgid "Unit Offset"
msgstr "グリッドのオフセット:"
#: scene/2d/path_2d.cpp scene/3d/camera.cpp scene/3d/path.cpp
-#, fuzzy
msgid "H Offset"
-msgstr "オフセット:"
+msgstr "水平オフセット"
#: scene/2d/path_2d.cpp scene/3d/camera.cpp scene/3d/path.cpp
-#, fuzzy
msgid "V Offset"
-msgstr "オフセット:"
+msgstr "垂直オフセット"
#: scene/2d/path_2d.cpp scene/3d/path.cpp
msgid "Cubic Interp"
@@ -21858,7 +21440,6 @@ msgid "Lookahead"
msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Layers"
msgstr "レイヤー"
@@ -21874,9 +21455,8 @@ msgstr "初期化"
#: scene/2d/physics_body_2d.cpp scene/2d/tile_map.cpp scene/3d/physics_body.cpp
#: scene/resources/physics_material.cpp
-#, fuzzy
msgid "Friction"
-msgstr "関数"
+msgstr "摩擦"
#: scene/2d/physics_body_2d.cpp scene/2d/tile_map.cpp scene/3d/physics_body.cpp
#: scene/resources/physics_material.cpp
@@ -21885,7 +21465,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
@@ -21905,17 +21485,15 @@ msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Mass"
-msgstr ""
+msgstr "質量"
#: scene/2d/physics_body_2d.cpp
-#, fuzzy
msgid "Inertia"
-msgstr "垂直:"
+msgstr "慣性"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Weight"
-msgstr "ライト"
+msgstr "重量"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Gravity Scale"
@@ -21965,14 +21543,12 @@ msgid "Torque"
msgstr "トルク"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Safe Margin"
-msgstr "マージンを設定する"
+msgstr "セーフマージン"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Sync To Physics"
-msgstr "(物理的)同期"
+msgstr "物理との同期"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -22150,7 +21726,6 @@ msgstr ""
"使用してください。"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Tile Set"
msgstr "タイルセット"
@@ -22170,9 +21745,8 @@ msgid "Half Offset"
msgstr "初期化"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Tile Origin"
-msgstr "原点を表示"
+msgstr "タイルの原点"
#: scene/2d/tile_map.cpp
#, fuzzy
@@ -22259,7 +21833,7 @@ msgstr "優先順位を有効化"
#: scene/2d/visibility_notifier_2d.cpp
msgid "Physics Process Parent"
-msgstr ""
+msgstr "親の物理処理"
#: scene/3d/area.cpp
msgid "Reverb Bus"
@@ -22276,7 +21850,7 @@ msgstr "ARVRCameraはARVROriginノードを親に持つ必要があります。"
#: scene/3d/arvr_nodes.cpp
msgid "Controller ID"
-msgstr ""
+msgstr "コントローラーID"
#: scene/3d/arvr_nodes.cpp servers/arvr/arvr_positional_tracker.cpp
msgid "Rumble"
@@ -22334,7 +21908,7 @@ msgstr ""
#: scene/3d/audio_stream_player_3d.cpp
msgid "Max dB"
-msgstr ""
+msgstr "最大dB"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Out Of Range Mode"
@@ -22876,9 +22450,8 @@ msgid "Omni"
msgstr ""
#: scene/3d/light.cpp
-#, fuzzy
msgid "Shadow Mode"
-msgstr "シェーダー"
+msgstr "シャドウモード"
#: scene/3d/light.cpp
#, fuzzy
@@ -23061,15 +22634,15 @@ msgstr "リニア"
#: scene/3d/physics_body.cpp
msgid "Angular X"
-msgstr ""
+msgstr "角度X"
#: scene/3d/physics_body.cpp
msgid "Angular Y"
-msgstr ""
+msgstr "角度Y"
#: scene/3d/physics_body.cpp
msgid "Angular Z"
-msgstr ""
+msgstr "角度Z"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -23280,7 +22853,7 @@ msgstr "Node A と Node B は異なる PhysicsBody でなければなりませ
#: scene/3d/physics_joint.cpp
msgid "Solver"
-msgstr ""
+msgstr "ソルバー"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23527,9 +23100,8 @@ msgid "Box Projection"
msgstr "プロジェクト"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Enable Shadows"
-msgstr "スナップを有効にする"
+msgstr "シャドウを有効化"
#: scene/3d/reflection_probe.cpp
#, fuzzy
@@ -23777,9 +23349,8 @@ msgid "Spatial Attachment Path"
msgstr ""
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Physics Enabled"
-msgstr "物理フレーム %"
+msgstr "物理を有効化"
#: scene/3d/soft_body.cpp
#, fuzzy
@@ -23809,11 +23380,11 @@ msgstr ""
#: scene/3d/soft_body.cpp
msgid "Pressure Coefficient"
-msgstr ""
+msgstr "圧力係数"
#: scene/3d/soft_body.cpp
msgid "Damping Coefficient"
-msgstr ""
+msgstr "減衰係数"
#: scene/3d/soft_body.cpp
msgid "Drag Coefficient"
@@ -23851,9 +23422,8 @@ msgid "Gizmo"
msgstr "ギズモ"
#: scene/3d/spatial_velocity_tracker.cpp
-#, fuzzy
msgid "Track Physics Step"
-msgstr "物理フレーム %"
+msgstr "物理ステップの追跡"
#: scene/3d/spring_arm.cpp
msgid "Spring Length"
@@ -23861,7 +23431,7 @@ msgstr ""
#: scene/3d/sprite_3d.cpp scene/gui/graph_edit.cpp
msgid "Opacity"
-msgstr ""
+msgstr "不透明度"
#: scene/3d/sprite_3d.cpp scene/resources/material.cpp
#, fuzzy
@@ -23942,6 +23512,14 @@ msgstr "エラー"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr "ソート"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr "AABBセンターを使用"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -24522,7 +24100,7 @@ msgstr "テーマ プロパティ"
#: scene/gui/dialogs.cpp
msgid "Window Title"
-msgstr ""
+msgstr "ウィンドウタイトル"
#: scene/gui/dialogs.cpp
#, fuzzy
@@ -24612,7 +24190,7 @@ msgstr "コミット"
#: scene/gui/graph_node.cpp
msgid "Overlay"
-msgstr ""
+msgstr "オーバーレイ"
#: scene/gui/grid_container.cpp scene/gui/item_list.cpp scene/gui/tree.cpp
#, fuzzy
@@ -24695,7 +24273,7 @@ msgstr ""
#: scene/gui/line_edit.cpp scene/resources/navigation_mesh.cpp
msgid "Max Length"
-msgstr ""
+msgstr "最大長"
#: scene/gui/line_edit.cpp
msgid "Secret"
@@ -25082,7 +24660,7 @@ msgstr ""
#: scene/gui/text_edit.cpp
msgid "Readonly"
-msgstr ""
+msgstr "読み取り専用"
#: scene/gui/text_edit.cpp
#, fuzzy
@@ -25340,9 +24918,8 @@ msgid "Pause Mode"
msgstr "パンモード"
#: scene/main/node.cpp
-#, fuzzy
msgid "Physics Interpolation Mode"
-msgstr "補間モード"
+msgstr "物理補間モード"
#: scene/main/node.cpp
#, fuzzy
@@ -25602,14 +25179,12 @@ msgid "Clear Mode"
msgstr "定規モード"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Enable 2D"
-msgstr "有効"
+msgstr "2D有効化"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Enable 3D"
-msgstr "有効"
+msgstr "3D有効化"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25617,14 +25192,12 @@ msgid "Object Picking"
msgstr "オニオンスキンを有効にする"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Disable Input"
-msgstr "アイテムを無効にする"
+msgstr "入力無効化"
#: scene/main/viewport.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Shadow Atlas"
-msgstr "新しいアトラス"
+msgstr "シャドウアトラス"
#: scene/main/viewport.cpp
msgid "Quad 0"
@@ -25677,14 +25250,12 @@ msgid "3D Render"
msgstr "レンダリング"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "2D Physics"
-msgstr " (物理的)"
+msgstr "2D物理"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "3D Physics"
-msgstr " (物理的)"
+msgstr "3D物理"
#: scene/register_scene_types.cpp
#, fuzzy
@@ -25854,14 +25425,12 @@ msgid "Font Outline Modulate"
msgstr "白色調整"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Shadow Offset X"
-msgstr "グリッドのオフセット X:"
+msgstr "シャドウのオフセットX"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Shadow Offset Y"
-msgstr "グリッドのオフセット Y:"
+msgstr "シャドウのオフセットY"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26573,11 +26142,11 @@ msgstr "データ付"
#: scene/resources/environment.cpp
msgid "Background"
-msgstr ""
+msgstr "背景"
#: scene/resources/environment.cpp scene/resources/sky.cpp
msgid "Sky"
-msgstr ""
+msgstr "空"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26585,19 +26154,16 @@ msgid "Sky Custom FOV"
msgstr "ノードを切り取る"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sky Orientation"
-msgstr "オンラインドキュメント"
+msgstr "空の方向"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sky Rotation"
-msgstr "回転のステップ:"
+msgstr "空の回転"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sky Rotation Degrees"
-msgstr "%s 度回転。"
+msgstr "空の回転角度"
#: scene/resources/environment.cpp
msgid "Canvas Max Layer"
@@ -26617,9 +26183,8 @@ msgid "Sky Contribution"
msgstr ""
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Fog"
-msgstr "Fog(霧)"
+msgstr "フォグ"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26761,7 +26326,7 @@ msgstr "UVチャンネル デバッグ"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "ブラー"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -26828,7 +26393,7 @@ msgstr ""
#: scene/resources/environment.cpp
msgid "Bloom"
-msgstr ""
+msgstr "ブルーム"
#: scene/resources/environment.cpp
msgid "HDR Threshold"
@@ -26872,19 +26437,16 @@ msgid "Ascent"
msgstr "最近:"
#: scene/resources/font.cpp
-#, fuzzy
msgid "Distance Field"
-msgstr "集中モード"
+msgstr "距離フィールド"
#: scene/resources/gradient.cpp
-#, fuzzy
msgid "Raw Data"
-msgstr "Depth(深度/奥行)"
+msgstr "生データ"
#: scene/resources/gradient.cpp
-#, fuzzy
msgid "Offsets"
-msgstr "オフセット:"
+msgstr "オフセット"
#: scene/resources/height_map_shape.cpp
msgid "Map Width"
@@ -26914,14 +26476,12 @@ msgid "Use Shadow To Opacity"
msgstr ""
#: scene/resources/material.cpp
-#, fuzzy
msgid "Unshaded"
-msgstr "シェーディングなしで表示"
+msgstr "シェーディングなしで"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Vertex Lighting"
-msgstr "直接光"
+msgstr "頂点ライティング"
#: scene/resources/material.cpp
#, fuzzy
@@ -26938,7 +26498,7 @@ msgstr ""
#: scene/resources/material.cpp
msgid "Do Not Receive Shadows"
-msgstr ""
+msgstr "シャドウを受け取らない"
#: scene/resources/material.cpp
#, fuzzy
@@ -26968,9 +26528,8 @@ msgid "Is sRGB"
msgstr ""
#: scene/resources/material.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Parameters"
-msgstr "パラメーターが変更されました:"
+msgstr "パラメーター"
#: scene/resources/material.cpp
#, fuzzy
@@ -27059,7 +26618,7 @@ msgstr ""
#: scene/resources/material.cpp
msgid "NormalMap"
-msgstr ""
+msgstr "法線マップ"
#: scene/resources/material.cpp
msgid "Rim"
@@ -27083,9 +26642,8 @@ msgid "Flowmap"
msgstr ""
#: scene/resources/material.cpp
-#, fuzzy
msgid "Ambient Occlusion"
-msgstr "オクルージョン"
+msgstr "アンビエントオクルージョン"
#: scene/resources/material.cpp
msgid "Deep Parallax"
@@ -27470,7 +27028,7 @@ msgstr "アウトラインのサイズ:"
#: scene/resources/sky.cpp
msgid "Panorama"
-msgstr ""
+msgstr "パノラマ"
#: scene/resources/sky.cpp
#, fuzzy
@@ -27483,9 +27041,8 @@ msgid "Horizon Color"
msgstr "ファイルの保存:"
#: scene/resources/sky.cpp
-#, fuzzy
msgid "Ground"
-msgstr "グループ化済み"
+msgstr "地面"
#: scene/resources/sky.cpp
#, fuzzy
@@ -27493,18 +27050,16 @@ msgid "Bottom Color"
msgstr "ブックマーク"
#: scene/resources/sky.cpp
-#, fuzzy
msgid "Sun"
-msgstr "実行"
+msgstr "太陽"
#: scene/resources/sky.cpp
-#, fuzzy
msgid "Latitude"
-msgstr "代替"
+msgstr "緯度"
#: scene/resources/sky.cpp
msgid "Longitude"
-msgstr ""
+msgstr "経度"
#: scene/resources/sky.cpp
msgid "Angle Min"
@@ -27848,9 +27403,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 "パン"
#: servers/audio/effects/audio_effect_compressor.cpp
#: servers/audio/effects/audio_effect_filter.cpp
@@ -27859,12 +27413,11 @@ msgstr ""
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Attack (µs)"
-msgstr ""
+msgstr "アタック (マイクロ秒)"
#: servers/audio/effects/audio_effect_compressor.cpp
-#, fuzzy
msgid "Release (ms)"
-msgstr "リリース"
+msgstr "リリース (ミリ秒)"
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Mix"
@@ -27885,14 +27438,12 @@ 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 "ドキュメントのフィードバックを送る"
+msgstr "フィードバック"
#: servers/audio/effects/audio_effect_delay.cpp
-#, fuzzy
msgid "Low-pass"
-msgstr "バイパス"
+msgstr "ローパス"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Pre Gain"
@@ -27978,7 +27529,7 @@ msgstr "タイムアウト。"
#: servers/audio/effects/audio_effect_stereo_enhance.cpp
msgid "Surround"
-msgstr ""
+msgstr "サラウンド"
#: servers/audio_server.cpp
msgid "Enable Audio Input"
@@ -28120,9 +27671,8 @@ msgid "Collision Unsafe Fraction"
msgstr "コリジョンモード"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Physics Engine"
-msgstr "物理フレーム %"
+msgstr "物理エンジン"
#: servers/physics_server.cpp
msgid "Center Of Mass"
@@ -28238,9 +27788,8 @@ msgid "Quadrant 3 Subdiv"
msgstr ""
#: servers/visual_server.cpp
-#, fuzzy
msgid "Shadows"
-msgstr "シェーダー"
+msgstr "シャドウ"
#: servers/visual_server.cpp
msgid "Filter Mode"
@@ -28291,7 +27840,7 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Depth Prepass"
-msgstr ""
+msgstr "深度プレパス"
#: servers/visual_server.cpp
msgid "Disable For Vendors"
@@ -28322,14 +27871,12 @@ msgid "Use Software Skinning"
msgstr "ソフトウェアスキニングを使用"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Ninepatch Mode"
-msgstr "補間モード"
+msgstr "Ninepatchモード"
#: servers/visual_server.cpp
-#, fuzzy
msgid "OpenGL"
-msgstr "開く"
+msgstr "OpenGL"
#: servers/visual_server.cpp
msgid "Batching Send Null"
@@ -28402,7 +27949,7 @@ msgstr "フレームを貼り付け"
#: servers/visual_server.cpp
msgid "GLES2"
-msgstr ""
+msgstr "GLES2"
#: servers/visual_server.cpp
msgid "Compatibility"
@@ -28410,17 +27957,15 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Disable Half Float"
-msgstr ""
+msgstr "半精度小数を無効化"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Enable High Float"
-msgstr "優先順位を有効化"
+msgstr "高精度小数を有効化"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Precision"
-msgstr "バージョン"
+msgstr "精度"
#: servers/visual_server.cpp
msgid "UV Contract"
diff --git a/editor/translations/ka.po b/editor/translations/ka.po
index f085051bf7..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 ""
@@ -12951,9 +12951,10 @@ msgstr "მონიშნული მხოლოდ"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14349,12 +14350,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -23337,6 +23337,15 @@ msgstr "სარკე"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "გადასვლები"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/km.po b/editor/translations/km.po
index 3d39686d68..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 ""
@@ -12389,9 +12389,10 @@ msgstr "Anim ផ្លាស់ប្តូរ Transform"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13726,12 +13727,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22256,6 +22256,14 @@ msgstr "កញ្ចក់"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr ""
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index e3edb07ce4..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.
@@ -38,13 +38,17 @@
# 김태우 <ogosengi3@gmail.com>, 2022.
# 박민규 <80dots@gmail.com>, 2022.
# 이지민 <jiminaleejung@gmail.com>, 2022.
+# 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-09-07 06:16+0000\n"
-"Last-Translator: 이지민 <jiminaleejung@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"
@@ -52,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-dev\n"
+"X-Generator: Weblate 4.15.1\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -269,7 +273,7 @@ msgstr "청크 크기 읽기"
#: core/io/marshalls.cpp
msgid "Object ID"
-msgstr "오브젝트 ID"
+msgstr "오브젝트 아이디"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
msgid "Allow Object Decoding"
@@ -313,7 +317,7 @@ msgstr "스트림 피어"
#: core/io/stream_peer.cpp
msgid "Big Endian"
-msgstr "Big Endian"
+msgstr "빅 엔디안"
#: core/io/stream_peer.cpp
msgid "Data Array"
@@ -393,9 +397,8 @@ msgid "Mouse Mode"
msgstr "마우스 모드"
#: core/os/input.cpp
-#, fuzzy
msgid "Use Accumulated Input"
-msgstr "입력 삭제"
+msgstr "누적 입력 사용"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: servers/audio_server.cpp
@@ -478,7 +481,7 @@ msgstr "압력"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "펜 반전"
#: core/os/input_event.cpp
msgid "Relative"
@@ -580,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
@@ -681,11 +684,11 @@ msgstr "스크립트 템플릿 검색 경로"
#: core/project_settings.cpp
msgid "Version Control Autoload On Startup"
-msgstr "시작할 때 자동으로 Version Control 로드"
+msgstr "시작 시 버전 관리 자동실행"
#: core/project_settings.cpp
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
@@ -869,7 +872,7 @@ msgstr "모듈"
#: core/register_core_types.cpp
msgid "TCP"
-msgstr "TCP (전송 제어 프로토콜)"
+msgstr "TCP"
#: core/register_core_types.cpp
msgid "Connect Timeout Seconds"
@@ -1013,7 +1016,7 @@ msgstr "최대 렌더 요소 수"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Lights"
-msgstr "최대 렌더 광원 수"
+msgstr "최대 렌더 조명 수"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Reflections"
@@ -1021,7 +1024,7 @@ msgstr "최대 렌더 반사 수"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Lights Per Object"
-msgstr "오브젝트당 최대 광원 수"
+msgstr "오브젝트당 최대 조명 수"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Subsurface Scattering"
@@ -1605,7 +1608,7 @@ msgstr "변형"
#: editor/animation_track_editor.cpp editor/editor_help.cpp
msgid "Methods"
-msgstr "메서드"
+msgstr "방법"
#: editor/animation_track_editor.cpp
msgid "Bezier"
@@ -2070,7 +2073,7 @@ msgstr "\"%s\" 시그널의 모든 연결을 제거하시겠습니까?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
-msgstr "시그널"
+msgstr "신호"
#: editor/connections_dialog.cpp
msgid "Filter signals"
@@ -2199,7 +2202,7 @@ msgstr "열기"
#: editor/dependency_editor.cpp
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "소유자: %s(총: %d)"
#: editor/dependency_editor.cpp
msgid ""
@@ -2755,16 +2758,15 @@ msgstr "선택"
#: editor/editor_export.cpp
msgid "Project export for platform:"
-msgstr "플랫폼으로 프로젝트 내보내기:"
+msgstr "플랫폼용 프로젝트 내보내기:"
#: editor/editor_export.cpp
msgid "Completed with warnings."
msgstr "완료하였지만 경고가 있습니다."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed successfully."
-msgstr "패키지를 성공적으로 설치했습니다!"
+msgstr "성공적으로 완료되었습니다."
#: editor/editor_export.cpp
msgid "Failed."
@@ -2784,7 +2786,7 @@ msgstr "패킹 중"
#: editor/editor_export.cpp
msgid "Save PCK"
-msgstr "PCK를 저장합니다."
+msgstr "PCK 저장"
#: editor/editor_export.cpp
msgid "Cannot create file \"%s\"."
@@ -2920,9 +2922,8 @@ msgid "Custom release template not found."
msgstr "커스텀 릴리스 템플릿을 찾을 수 없습니다."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Prepare Template"
-msgstr "템플릿 관리"
+msgstr "템플릿 준비"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "The given export path doesn't exist."
@@ -2930,18 +2931,16 @@ msgstr "Export하려고 했으나 해당 경로가 존재하지 않습니다."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found: \"%s\"."
-msgstr "템플릿 파일을 찾을 수 없습니다: \"%s\""
+msgstr "템플릿 파일을 찾을 수 없습니다: \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to copy export template."
-msgstr "잘못된 내보내기 템플릿:"
+msgstr "내보내기 템플릿을 복사하지 못했습니다."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
-#, fuzzy
msgid "PCK Embedding"
-msgstr "패딩"
+msgstr "PCK 임베딩"
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
@@ -3435,7 +3434,7 @@ msgstr "스타일"
#: editor/editor_help.cpp
msgid "Enumerations"
-msgstr "열거형"
+msgstr "목록"
#: editor/editor_help.cpp
msgid "Property Descriptions"
@@ -5472,7 +5471,7 @@ msgstr "선택된 항목을 Drag and drop"
#: editor/editor_settings.cpp
msgid "Stay In Script Editor On Node Selected"
-msgstr ""
+msgstr "선택한 노드에서 스크립트 편집기 유지"
#: editor/editor_settings.cpp
msgid "Appearance"
@@ -5774,7 +5773,7 @@ msgstr "줌 변경"
#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Warped Mouse Panning"
-msgstr ""
+msgstr "뒤틀린 마우스 패닝"
#: editor/editor_settings.cpp
msgid "Navigation Feel"
@@ -5782,56 +5781,47 @@ msgstr "내비게이션 감도"
#: editor/editor_settings.cpp
msgid "Orbit Sensitivity"
-msgstr ""
+msgstr "궤도 감도"
#: editor/editor_settings.cpp
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
-#, fuzzy
msgid "Freelook"
-msgstr "자유 시점 위로"
+msgstr "자유 시점"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Navigation Scheme"
-msgstr "내비게이션 메시 만들기"
+msgstr "자유 시점 내비게이션 계획"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Sensitivity"
-msgstr "자유 시점 왼쪽으로"
+msgstr "자유 시점 감도"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Inertia"
-msgstr "자유 시점 왼쪽으로"
+msgstr "자유 시점 관성"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Base Speed"
-msgstr "자유 시점 속도 수정자"
+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"
@@ -5867,98 +5857,89 @@ msgstr "본 IK 색상"
#: editor/editor_settings.cpp
msgid "Bone Outline Color"
-msgstr ""
+msgstr "뼈 윤곽선 색상"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Outline Size"
-msgstr "윤곽선 크기:"
+msgstr "뼈 윤곽선 크기"
#: editor/editor_settings.cpp
msgid "Viewport Border Color"
-msgstr ""
+msgstr "표시 영역 테두리 색상"
#: editor/editor_settings.cpp
msgid "Constrain Editor View"
-msgstr ""
+msgstr "제약 편집기 보기"
#: editor/editor_settings.cpp
msgid "Simple Panning"
-msgstr ""
+msgstr "간단한 패닝"
#: editor/editor_settings.cpp
msgid "Scroll To Pan"
-msgstr ""
+msgstr "팬으로 스크롤"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Speed"
-msgstr "속도:"
+msgstr "팬 속도"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Poly Editor"
-msgstr "폴리곤 2D UV 에디터"
+msgstr "폴리 에디터"
#: editor/editor_settings.cpp
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
-#, fuzzy
msgid "Autorename Animation Tracks"
-msgstr "애니메이션 이름 바꾸기"
+msgstr "애니메이션 트랙 자동 이름 바꾸기"
#: editor/editor_settings.cpp
msgid "Default Create Bezier Tracks"
-msgstr ""
+msgstr "기본 베지어 트랙 만들기"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Create Reset Tracks"
-msgstr "재설정 트랙 만들기"
+msgstr "기본 재설정 트랙 만들기"
#: editor/editor_settings.cpp
msgid "Onion Layers Past Color"
-msgstr ""
+msgstr "양파 레이어 과거 색상"
#: editor/editor_settings.cpp
msgid "Onion Layers Future Color"
-msgstr ""
+msgstr "양파 레이어 미래 색상"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Visual Editors"
-msgstr "그룹 에디터"
+msgstr "비주얼 편집기"
#: editor/editor_settings.cpp
msgid "Minimap Opacity"
-msgstr ""
+msgstr "미니맵 불투명도"
#: editor/editor_settings.cpp
msgid "Window Placement"
-msgstr ""
+msgstr "창 배치"
#: 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 "사각형 전체"
+msgstr "직사각형"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Rect Custom Position"
-msgstr "곡선의 아웃 위치 설정"
+msgstr "직사각형 사용자 정의 위치"
#: editor/editor_settings.cpp platform/android/export/export_plugin.cpp
msgid "Screen"
-msgstr ""
+msgstr "화면"
#: editor/editor_settings.cpp
msgid "Auto Save"
@@ -5974,20 +5955,17 @@ msgstr "폰트 크기"
#: editor/editor_settings.cpp
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Remote Host"
-msgstr "원격 "
+msgstr "원격 호스트"
#: editor/editor_settings.cpp
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Remote Port"
-msgstr "점 제거"
+msgstr "원격 포트"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Editor SSL Certificates"
-msgstr "에디터 설정"
+msgstr "편집자 SSL 인증서"
#: editor/editor_settings.cpp
msgid "HTTP Proxy"
@@ -5995,13 +5973,13 @@ msgstr "HTTP 프록시"
#: editor/editor_settings.cpp
msgid "Host"
-msgstr ""
+msgstr "호스트"
#: 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 "포트"
#. TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects.
#: editor/editor_settings.cpp
@@ -6010,9 +5988,8 @@ msgstr "프로젝트 매니저"
#. TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects.
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Sorting Order"
-msgstr "폴더 이름 바꾸기:"
+msgstr "정렬 순서"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Symbol Color"
@@ -6020,77 +5997,69 @@ msgstr "상징 색"
#: editor/editor_settings.cpp
msgid "Keyword Color"
-msgstr ""
+msgstr "키워드 색상"
#: editor/editor_settings.cpp
msgid "Control Flow Keyword Color"
-msgstr ""
+msgstr "플로우 키워드 색상 제어"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Base Type Color"
-msgstr "기본 타입 바꾸기"
+msgstr "기본 유형 색상"
#: editor/editor_settings.cpp
msgid "Engine Type Color"
-msgstr ""
+msgstr "엔진 유형 색상"
#: editor/editor_settings.cpp
msgid "User Type Color"
-msgstr ""
+msgstr "사용자 유형 색상"
#: editor/editor_settings.cpp
msgid "Comment Color"
-msgstr ""
+msgstr "댓글 색상"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "String Color"
-msgstr "저장하려는 파일:"
+msgstr "문자열 색"
#: 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 "잘못된 배경 색상."
+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
msgid "Completion Existing Color"
-msgstr ""
+msgstr "기존 색상 완성"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Scroll Color"
-msgstr ""
+msgstr "스크롤 색상 완료"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Font Color"
-msgstr ""
+msgstr "글꼴 색상 완료"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Text Color"
-msgstr "다음 층"
+msgstr "글자색"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Line Number Color"
-msgstr "행 번호:"
+msgstr "행 번호의 색"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Safe Line Number Color"
-msgstr "행 번호:"
+msgstr "안전 라인 번호 색상"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Caret Color"
@@ -6101,93 +6070,82 @@ msgid "Caret Background Color"
msgstr "탈자 기호 배경 색"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Text Selected Color"
-msgstr "선택 항목 삭제"
+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"
-msgstr ""
+msgstr "중괄호 불일치 색상"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Current Line Color"
-msgstr "현재 씬"
+msgstr "현재 줄 색상"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Color"
-msgstr ""
+msgstr "라인 길이 가이드라인 색상"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Word Highlighted Color"
-msgstr "구문 강조"
+msgstr "구문 강조 색상"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Number Color"
-msgstr ""
+msgstr "숫자 색상"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Function Color"
-msgstr "함수(Function)"
+msgstr "함수 색상"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Member Variable Color"
-msgstr "변수명 바꾸기"
+msgstr "멤버 변수 색상"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Mark Color"
-msgstr "색상 선택"
+msgstr "마크 색상"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Bookmark Color"
-msgstr "북마크"
+msgstr "북마크 색상"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Breakpoint Color"
-msgstr "중단점"
+msgstr "중단점 색상"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Executing Line Color"
-msgstr ""
+msgstr "라인 색상 실행"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Code Folding Color"
-msgstr ""
+msgstr "코드 폴딩 색상"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Search Result Color"
-msgstr "검색 결과"
+msgstr "검색 결과 색상"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Search Result Border Color"
-msgstr "검색 결과"
+msgstr "검색 결과 테두리 색상"
#: editor/editor_spin_slider.cpp
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
-msgstr "%s를 눌러 정수로 반올림합니다. Shift를 눌러 좀 더 정밀하게 조작합니다."
+msgstr ""
+"정수로 반올림하려면 %s 키를 누르세요. 더 정밀한 변경을 하려면 Shift 키를 누르"
+"세요."
#: editor/editor_spin_slider.cpp scene/gui/button.cpp
-#, fuzzy
msgid "Flat"
-msgstr "플랫 0"
+msgstr "평면"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hide Slider"
-msgstr "콜리전 모드"
+msgstr "슬라이더 숨기기"
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
@@ -6195,11 +6153,11 @@ msgstr "가져올 노드 선택"
#: editor/editor_sub_scene.cpp editor/project_manager.cpp
msgid "Browse"
-msgstr "탐색"
+msgstr "검색"
#: editor/editor_sub_scene.cpp
msgid "Scene Path:"
-msgstr "씬 경로:"
+msgstr "장면 경로:"
#: editor/editor_sub_scene.cpp
msgid "Import From Node:"
@@ -6207,13 +6165,12 @@ msgstr "노드에서 가져오기:"
#. TRANSLATORS: %s refers to the name of a version control system (e.g. "Git").
#: editor/editor_vcs_interface.cpp
-#, fuzzy
msgid "%s Error"
-msgstr "오류"
+msgstr "%s 오류"
#: editor/export_template_manager.cpp
msgid "Open the folder containing these templates."
-msgstr "이 템플릿을 포함하는 폴더를 엽니다."
+msgstr "이 템플릿이 포함된 폴더를 엽니다."
#: editor/export_template_manager.cpp
msgid "Uninstall these templates."
@@ -6225,11 +6182,11 @@ msgstr "사용 가능한 미러가 없습니다."
#: editor/export_template_manager.cpp
msgid "Retrieving the mirror list..."
-msgstr "미러 목록을 검색하는 중..."
+msgstr "미러 목록을 가져오는 중..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
-msgstr "다운로드를 시작하는 중..."
+msgstr "다운로드 시작 중..."
#: editor/export_template_manager.cpp
msgid "Error requesting URL:"
@@ -6237,11 +6194,11 @@ msgstr "URL 요청 중 오류:"
#: editor/export_template_manager.cpp
msgid "Connecting to the mirror..."
-msgstr "미러에 연결 중..."
+msgstr "미러 연결 중..."
#: editor/export_template_manager.cpp
msgid "Can't resolve the requested address."
-msgstr "요청된 주소를 해결할 수 없습니다."
+msgstr "요청한 주소를 확인할 수 없습니다."
#: editor/export_template_manager.cpp
msgid "Can't connect to the mirror."
@@ -6477,13 +6434,13 @@ msgstr ""
#: editor/fileserver/editor_file_server.cpp
msgid "File Server"
-msgstr ""
+msgstr "파일 서버"
#: editor/fileserver/editor_file_server.cpp
#: editor/plugins/version_control_editor_plugin.cpp
#: platform/uwp/export/export.cpp platform/windows/export/export.cpp
msgid "Password"
-msgstr ""
+msgstr "비밀번호"
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -6544,6 +6501,9 @@ msgid ""
"After renaming to an unknown extension, the file won't be shown in the "
"editor anymore."
msgstr ""
+"이 파일 확장자는 편집기에서 인식되지 않습니다.\n"
+"이름을 변경하려면 운영 체제의 파일 탐색기를 사용하십시오.\n"
+"알 수 없는 확장자로 이름을 바꾸면 파일이 더 이상 편집기에 표시되지 않습니다."
#: editor/filesystem_dock.cpp
msgid ""
@@ -6765,14 +6725,12 @@ msgid "Replace..."
msgstr "바꾸기..."
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Replace in Files"
-msgstr "모두 바꾸기"
+msgstr "파일에서 바꾸기"
#: editor/find_in_files.cpp
-#, fuzzy
msgid "Replace All (NO UNDO)"
-msgstr "모두 바꾸기"
+msgstr "모두 바꾸기(실행 취소 없음)"
#: editor/find_in_files.cpp
msgid "Searching..."
@@ -6845,43 +6803,40 @@ msgstr "그룹 관리"
#: editor/import/editor_import_collada.cpp
msgid "Collada"
-msgstr ""
+msgstr "COLLADA"
#: editor/import/editor_import_collada.cpp
msgid "Use Ambient"
-msgstr ""
+msgstr "주변광 사용"
#: editor/import/resource_importer_bitmask.cpp
-#, fuzzy
msgid "Create From"
-msgstr "폴더 만들기"
+msgstr "다음에서 만들기"
#: editor/import/resource_importer_bitmask.cpp
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Threshold"
-msgstr ""
+msgstr "스레숄드"
#: 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 "구성 요소"
+msgstr "컴프레스"
#: editor/import/resource_importer_csv_translation.cpp
msgid "Delimiter"
-msgstr ""
+msgstr "디리미터"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "ColorCorrect"
-msgstr "색상 함수."
+msgstr "컬러코렉트"
#: editor/import/resource_importer_layered_texture.cpp
msgid "No BPTC If RGB"
-msgstr ""
+msgstr "RGB인 경우 BPTC 없음"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp scene/2d/cpu_particles_2d.cpp
@@ -6889,31 +6844,29 @@ msgstr ""
#: scene/resources/material.cpp scene/resources/particles_material.cpp
#: scene/resources/texture.cpp scene/resources/visual_shader.cpp
msgid "Flags"
-msgstr ""
+msgstr "플래그"
#: 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 "반복"
#: 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 "필터:"
+msgstr "필터"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Mipmaps"
-msgstr "시그널"
+msgstr "밉맵"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
msgid "Anisotropic"
-msgstr ""
+msgstr "이방성"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
@@ -6921,51 +6874,43 @@ msgid "sRGB"
msgstr "sRGB"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "Slices"
-msgstr "자동 자르기"
+msgstr "슬라이스"
#: 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 "수평:"
+msgstr "수평"
#: 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 "수직:"
+msgstr "수직"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Generate Tangents"
-msgstr "생성한 점 개수"
+msgstr "접선 생성"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Scale Mesh"
-msgstr "스케일 모드"
+msgstr "스케일 메쉬"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Offset Mesh"
-msgstr "오프셋:"
+msgstr "오프셋 메시"
#: editor/import/resource_importer_obj.cpp
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Octahedral Compression"
-msgstr "표현식 설정"
+msgstr "팔면체 압축"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Optimize Mesh Flags"
-msgstr "크기: "
+msgstr "메시 플래그 최적화"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Single Scene"
@@ -7009,101 +6954,84 @@ msgstr "여러 개의 씬과 머티리얼로 가져오기"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Nodes"
msgstr "노드"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Type"
-msgstr "멤버 타입"
+msgstr "루트 유형"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Name"
-msgstr "원격 이름"
+msgstr "루트 이름"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Scale"
-msgstr "스케일"
+msgstr "루트 스케일"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Custom Script"
-msgstr "노드 잘라내기"
+msgstr "사용자 정의 스크립트"
#: editor/import/resource_importer_scene.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Storage"
-msgstr "저장하려는 파일:"
+msgstr "보관소"
#: editor/import/resource_importer_scene.cpp
msgid "Use Legacy Names"
-msgstr ""
+msgstr "기존 이름 사용"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Materials"
-msgstr "머티리얼 바꾸기:"
+msgstr "머티리얼"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep On Reimport"
-msgstr "다시 가져오기"
+msgstr "계속 다시 가져오기"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Meshes"
-msgstr "메시"
+msgstr "메쉬"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Ensure Tangents"
-msgstr "곡선 탄젠트 수정"
+msgstr "접선 확인"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Light Baking"
-msgstr "라이트맵 굽기"
+msgstr "라이트 베이킹"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Lightmap Texel Size"
-msgstr "라이트맵 굽기"
+msgstr "라이트맵 텍셀 크기"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
msgid "Skins"
-msgstr ""
+msgstr "스킨"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Use Named Skins"
-msgstr "스케일 스냅 사용"
+msgstr "네임드 스킨 사용"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "External Files"
-msgstr "파일 열기"
+msgstr "외부 파일"
#: editor/import/resource_importer_scene.cpp
msgid "Store In Subdir"
-msgstr ""
+msgstr "하위 디렉토리에 저장"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Filter Script"
-msgstr "스크립트 필터"
+msgstr "필터 스크립트"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep Custom Tracks"
-msgstr "변형"
+msgstr "맞춤 트랙 유지"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Optimizer"
-msgstr "최적화"
+msgstr "최적화 도구"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/item_list_editor_plugin.cpp main/main.cpp
@@ -7117,41 +7045,34 @@ msgstr "최적화"
#: 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 "활성화"
+msgstr "활성화됨"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Linear Error"
-msgstr "최대 선형 오류:"
+msgstr "최대 선형 오류"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Angular Error"
-msgstr "최대 각도 오류:"
+msgstr "최대 각도 오류"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Angle"
-msgstr "값"
+msgstr "최대 각도"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Remove Unused Tracks"
-msgstr "애니메이션 트랙 제거"
+msgstr "미사용 트랙 제거"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Clips"
-msgstr "애니메이션 클립"
+msgstr "클립"
#: 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 "양:"
+msgstr "양"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7167,9 +7088,8 @@ msgid "Generating Lightmaps"
msgstr "라이트맵 생성 중"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Generating for Mesh:"
-msgstr "메시 용으로 생성 중: "
+msgstr "메시 용으로 생성 중:"
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
@@ -7200,160 +7120,148 @@ 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: 텍스처가 3D에서 노멀 맵으로 사용되는 것으로 감지되었습니다. 메모리 사용량"
+"을 줄이기 위해 빨강-초록 텍스처 압축을 활성화합니다(파란색 채널은 버려짐)."
#: 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: 텍스처가 3D에서 사용된 것으로 감지되었습니다. 필터, 반복, 밉맵 생성 및 "
+"VRAM 텍스처 압축을 활성화합니다."
#: editor/import/resource_importer_texture.cpp
msgid "2D, Detect 3D"
-msgstr ""
+msgstr "2D, 3D 감지"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "2D Pixel"
-msgstr "전면 픽셀"
+msgstr "2D 픽셀"
#: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp
msgid "Lossy Quality"
-msgstr ""
+msgstr "손실 품질"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "HDR Mode"
-msgstr "모드 선택"
+msgstr "HDR 모드"
#: editor/import/resource_importer_texture.cpp
msgid "BPTC LDR"
-msgstr ""
+msgstr "BPTC LDR"
#: editor/import/resource_importer_texture.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/mesh_instance_2d.cpp scene/2d/multimesh_instance_2d.cpp
#: scene/2d/particles_2d.cpp scene/2d/sprite.cpp scene/resources/style_box.cpp
msgid "Normal Map"
-msgstr ""
+msgstr "일반 맵"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Process"
-msgstr "후처리"
+msgstr "프로세스"
#: editor/import/resource_importer_texture.cpp
msgid "Fix Alpha Border"
-msgstr ""
+msgstr "알파 테두리 수정"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Premult Alpha"
-msgstr "폴리곤 편집"
+msgstr "프리멀트 알파"
#: editor/import/resource_importer_texture.cpp
msgid "Hdr As Srgb"
-msgstr ""
+msgstr "Srgb로 HDR"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Invert Color"
-msgstr "꼭짓점"
+msgstr "색상 반전"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Normal Map Invert Y"
-msgstr "무작위 스케일:"
+msgstr "노멀 맵 Y축 반전"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Size Limit"
-msgstr "크기: "
+msgstr "크기 제한"
#: editor/import/resource_importer_texture.cpp
msgid "Detect 3D"
-msgstr ""
+msgstr "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 ""
+"경고, 프로젝트 설정에서 활성화된 적절한 PC VRAM 압축이 없습니다. 이 텍스처는 "
+"PC에서 올바르게 표시되지 않습니다."
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Atlas File"
-msgstr "윤곽선 크기:"
+msgstr "아틀라스 파일"
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Import Mode"
-msgstr "내보내기 모드:"
+msgstr "가져오기 모드"
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Crop To Region"
-msgstr "타일 영역 설정"
+msgstr "영역으로 자르기"
#: editor/import/resource_importer_texture_atlas.cpp
msgid "Trim Alpha Border From Region"
-msgstr ""
+msgstr "영역에서 알파 테두리 자르기"
#: editor/import/resource_importer_wav.cpp scene/2d/physics_body_2d.cpp
-#, fuzzy
msgid "Force"
-msgstr "원본 메시:"
+msgstr "힘"
#: editor/import/resource_importer_wav.cpp
msgid "8 Bit"
-msgstr ""
+msgstr "8비트"
#: 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 "모노"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Max Rate"
-msgstr "믹스 노드"
+msgstr "최대 비율"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Max Rate Hz"
-msgstr "믹스 노드"
+msgstr "최대 속도 Hz"
#: editor/import/resource_importer_wav.cpp
msgid "Trim"
-msgstr ""
+msgstr "손질"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Normalize"
-msgstr "형식"
+msgstr "정규화"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop Mode"
-msgstr "이동 모드"
+msgstr "루프 모드"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop Begin"
-msgstr "이동 모드"
+msgstr "루프 시작"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop End"
-msgstr "이동 모드"
+msgstr "루프 종료"
#: editor/import_defaults_editor.cpp
msgid "Select Importer"
@@ -7365,7 +7273,7 @@ msgstr "임포터:"
#: editor/import_defaults_editor.cpp
msgid "Reset to Defaults"
-msgstr "디폴트로 재설정"
+msgstr "기본값으로 재설정"
#: editor/import_dock.cpp
msgid "Keep File (No Import)"
@@ -7377,11 +7285,11 @@ msgstr "파일 %d개"
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
-msgstr "'%s'을(를) 디폴트로 설정"
+msgstr "기본값으로 '%s' 설정"
#: editor/import_dock.cpp
msgid "Clear Default for '%s'"
-msgstr "'%s'을(를) 디폴트에서 지우기"
+msgstr "'%s'의 기본값 지우기"
#: editor/import_dock.cpp
msgid "Reimport"
@@ -7401,55 +7309,54 @@ msgstr ""
#: editor/import_dock.cpp
msgid "Import As:"
-msgstr "다음 형식으로 가져오기:"
+msgstr "다음으로 가져오기:"
#: editor/import_dock.cpp
msgid "Save Scenes, Re-Import, and Restart"
-msgstr "씬 저장, 다시 가져오기 및 다시 시작"
+msgstr "장면 저장, 다시 가져오기 및 재시작"
#: editor/import_dock.cpp
msgid "Changing the type of an imported file requires editor restart."
-msgstr "가져온 파일의 타입을 바꾸려면 에디터를 다시 시작해야 합니다."
+msgstr "가져온 파일의 유형을 변경하려면 편집기를 다시 시작해야 합니다."
#: editor/import_dock.cpp
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
-"경고: 이 리소스를 사용하는 애셋이 있습니다. 정상적으로 불러오지 못할 수도 있"
-"습니다."
+"경고: 이 리소스를 사용하는 애셋이 있습니다. 정상적으로 불러오지 못할 수 있습"
+"니다."
#: editor/import_dock.cpp
msgid ""
"Select a resource file in the filesystem or in the inspector to adjust "
"import settings."
msgstr ""
+"파일 시스템 또는 검사기에서 리소스 파일을 선택하여 가져오기 설정을 조정하십시"
+"오."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
-msgstr "리소스 불러오기에 실패했습니다."
+msgstr "리소스를 불러오지 못했습니다."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Property Name Style"
-msgstr "프로젝트 이름:"
+msgstr "속성 이름 스타일"
#: editor/inspector_dock.cpp scene/gui/color_picker.cpp
msgid "Raw"
-msgstr "Raw"
+msgstr "RAW"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Capitalized"
msgstr "대문자로 시작"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Localized"
-msgstr "로케일"
+msgstr "현지화"
#: editor/inspector_dock.cpp
msgid "Localization not available for current language."
-msgstr ""
+msgstr "현재 언어로는 현지화가 불가능합니다."
#: editor/inspector_dock.cpp
msgid "Copy Properties"
@@ -7992,9 +7899,8 @@ msgid "New"
msgstr "새로 만들기"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Paste As Reference"
-msgstr "%s 클래스 참조"
+msgstr "참조로 붙여넣기"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Edit Transitions..."
@@ -8184,9 +8090,8 @@ msgid "Set the end animation. This is useful for sub-transitions."
msgstr "끝 애니메이션을 설정합니다. 이것은 하위 전환에 유용합니다."
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition:"
-msgstr "전환: "
+msgstr "전환:"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Play Mode:"
@@ -8323,7 +8228,7 @@ msgstr "필터..."
#: editor/plugins/asset_library_editor_plugin.cpp scene/main/http_request.cpp
msgid "Use Threads"
-msgstr ""
+msgstr "스레드 사용"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Contents:"
@@ -8450,9 +8355,8 @@ msgid "Download Error"
msgstr "다운로드 오류"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Available URLs"
-msgstr "사용 가능한 프로필:"
+msgstr "사용 가능한 URL"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
@@ -8487,28 +8391,24 @@ msgid "Loading..."
msgstr "불러오는 중..."
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "First"
-msgstr "처음으로"
+msgstr "처음"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Previous"
msgstr "이전"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Next"
msgstr "다음"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Last"
-msgstr "끝으로"
+msgstr "마지막"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "All"
@@ -8556,7 +8456,7 @@ msgstr "테스트"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed to get repository configuration."
-msgstr ""
+msgstr "저장소 구성을 가져오지 못했습니다."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
@@ -8612,7 +8512,7 @@ msgstr "라이트맵 굽기"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "LightMap Bake"
-msgstr ""
+msgstr "라이트맵 베이킹"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Select lightmap bake file:"
@@ -8922,9 +8822,8 @@ msgid "Alt+Drag: Move selected node."
msgstr "Alt+드래그: 선택된 노드를 이동합니다."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Scale selected node."
-msgstr "Alt+드래그: 선택된 노드를 이동합니다."
+msgstr "Alt+드래그: 선택한 노드의 크기를 조절합니다."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "V: Set selected node's pivot position."
@@ -8957,7 +8856,7 @@ msgstr "스케일 모드"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Shift: Scale proportionally."
-msgstr ""
+msgstr "Shift: 비례적으로 조정합니다."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9056,9 +8955,8 @@ msgstr "선택된 오브젝트를 그 자리에 잠급니다 (움직일 수 없
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Lock Selected Node(s)"
-msgstr "선택 항목 잠그기"
+msgstr "선택한 노드 잠금"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9067,9 +8965,8 @@ msgstr "선택된 오브젝트를 잠금에서 풉니다 (움직일 수 있습
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Unlock Selected Node(s)"
-msgstr "선택 항목 잠금 풀기"
+msgstr "선택한 노드 잠금 해제"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9078,9 +8975,8 @@ msgstr "오브젝트의 자식을 선택하지 않도록 합니다."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Group Selected Node(s)"
-msgstr "선택 항목 묶기"
+msgstr "선택한 노드 그룹화"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -9089,9 +8985,8 @@ msgstr "오브젝트의 자식을 선택할 수 있도록 복원합니다."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Ungroup Selected Node(s)"
-msgstr "선택 항목 묶음 풀기"
+msgstr "선택한 노드 그룹 해제"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton Options"
@@ -9116,23 +9011,20 @@ msgid "View"
msgstr "보기"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show"
-msgstr "격자 보이기"
+msgstr "표시"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show When Snapping"
-msgstr "스마트 스냅"
+msgstr "스냅할 때 표시"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Hide"
-msgstr ""
+msgstr "숨김"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Grid"
-msgstr "모드 토글"
+msgstr "토글 그리드"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -9483,16 +9375,15 @@ msgstr "기울기 편집됨"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
msgid "Swap GradientTexture2D Fill Points"
-msgstr ""
+msgstr "그라디언트텍스처2D 채우기 포인트 교체"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
msgid "Swap Gradient Fill Points"
-msgstr ""
+msgstr "그라디언트 채우기 포인트 교체"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Grid Snap"
-msgstr "모드 토글"
+msgstr "토글 그리드 스냅"
#: editor/plugins/item_list_editor_plugin.cpp editor/project_export.cpp
#: scene/3d/label_3d.cpp scene/gui/button.cpp scene/gui/dialogs.cpp
@@ -9511,13 +9402,12 @@ msgstr "아이콘"
#: 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 "간격:"
+msgstr "분리 기호"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
@@ -9750,9 +9640,8 @@ msgstr ""
"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "MeshLibrary"
-msgstr "메시 라이브러리"
+msgstr "메쉬 라이브러리"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Add Item"
@@ -9775,14 +9664,12 @@ msgid "Update from Scene"
msgstr "씬에서 업데이트"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Apply without Transforms"
-msgstr "MeshInstance 변형 적용"
+msgstr "변환 없이 적용"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Apply with Transforms"
-msgstr "MeshInstance 변형 적용"
+msgstr "변환과 함께 적용"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
@@ -9950,9 +9837,8 @@ msgid "Volume"
msgstr "볼륨"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Source:"
-msgstr "방출 소스: "
+msgstr "방출 소스:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
@@ -10307,7 +10193,7 @@ msgstr "본을 폴리곤에 동기화"
#: editor/plugins/ray_cast_2d_editor_plugin.cpp
msgid "Set cast_to"
-msgstr ""
+msgstr "cast_to 설정"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ERROR: Couldn't load resource!"
@@ -10638,58 +10524,51 @@ msgstr "검색 결과"
#: editor/plugins/script_editor_plugin.cpp
msgid "Open Dominant Script On Scene Change"
-msgstr ""
+msgstr "장면 변경 시 주요 스크립트 열기"
#: editor/plugins/script_editor_plugin.cpp
msgid "External"
-msgstr ""
+msgstr "외부"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Use External Editor"
-msgstr "외부 에디터로 디버깅"
+msgstr "외부 편집기 사용"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Exec Path"
-msgstr "경로 내보내기"
+msgstr "실행 경로"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Script Temperature Enabled"
-msgstr "템플릿 파일 선택"
+msgstr "스크립트 온도 활성화됨"
#: editor/plugins/script_editor_plugin.cpp
msgid "Highlight Current Script"
-msgstr ""
+msgstr "현재 스크립트 강조 표시"
#: editor/plugins/script_editor_plugin.cpp
msgid "Script Temperature History Size"
-msgstr ""
+msgstr "스크립트 온도 기록 크기"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Current Script Background Color"
-msgstr "잘못된 배경 색상."
+msgstr "현재 스크립트 배경 색"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Group Help Pages"
-msgstr "선택 항목 묶기"
+msgstr "그룹 도움말 페이지"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Sort Scripts By"
-msgstr "스크립트 만들기"
+msgstr "스크립트 정렬 기준"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "List Script Names As"
-msgstr "스크립트 이름:"
+msgstr "스크립트 이름 나열"
#: editor/plugins/script_editor_plugin.cpp
msgid "Exec Flags"
-msgstr ""
+msgstr "실행 플래그"
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Scripts"
@@ -10845,9 +10724,8 @@ msgid "Find in Files..."
msgstr "파일에서 찾기..."
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Replace in Files..."
-msgstr "바꾸기..."
+msgstr "파일에서 바꾸기..."
#: editor/plugins/script_text_editor.cpp
msgid "Contextual Help"
@@ -11009,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 " [포털 활성]"
@@ -11051,15 +10929,13 @@ msgstr "이동"
#. TRANSLATORS: Refers to changing the scale of a node in the 3D editor.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scaling:"
-msgstr "크기 조절 중: "
+msgstr "스케일링:"
#. TRANSLATORS: Refers to changing the position of a node in the 3D editor.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translating:"
-msgstr "이동 중: "
+msgstr "번역 중:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
@@ -11207,13 +11083,14 @@ msgstr "시네마틱 미리보기"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "(Not in GLES2)"
-msgstr ""
+msgstr "(GLES2에는 없음)"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Debug draw modes are only available when using the GLES3 renderer, not GLES2."
-msgstr "GLES2 렌더러에서 사용할 수 없습니다."
+msgstr ""
+"디버그 그리기 모드는 GLES2가 아닌 GLES3 렌더러를 사용할 때만 사용할 수 있습니"
+"다."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Left"
@@ -11376,16 +11253,15 @@ msgstr "자유 시점 토글"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Decrease Field of View"
-msgstr ""
+msgstr "시야 감소"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Increase Field of View"
-msgstr ""
+msgstr "시야 확대"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Reset Field of View to Default"
-msgstr "디폴트로 재설정"
+msgstr "시야를 기본값으로 재설정"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Object to Floor"
@@ -11506,16 +11382,15 @@ msgstr "후"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Size"
-msgstr ""
+msgstr "조작기 기즈모 크기"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Opacity"
-msgstr ""
+msgstr "조작기 기즈모 불투명도"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Show Viewport Rotation Gizmo"
-msgstr "뷰 회전 잠금"
+msgstr "뷰포트 회전 기즈모 표시"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unnamed Gizmo"
@@ -11566,9 +11441,8 @@ msgid "Invalid geometry, can't replace by mesh."
msgstr "잘못된 지오메트리. 메시로 대체할 수 없습니다."
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Convert to MeshInstance2D"
-msgstr "Mesh2D로 변환"
+msgstr "메쉬인스턴스2D로 변환"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
@@ -11599,19 +11473,16 @@ msgid "Sprite"
msgstr "스프라이트"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Simplification:"
-msgstr "단순화: "
+msgstr "단순화:"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Shrink (Pixels):"
-msgstr "수축 (픽셀): "
+msgstr "축소(픽셀):"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Grow (Pixels):"
-msgstr "성장 (픽셀): "
+msgstr "확대(픽셀):"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Update Preview"
@@ -11674,9 +11545,8 @@ msgid "New Animation"
msgstr "새 애니메이션"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Filter animations"
-msgstr "메서드 필터"
+msgstr "애니메이션 필터링"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
@@ -11975,9 +11845,8 @@ msgstr ""
"무시하고 닫으시겠습니까?"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Type"
-msgstr "타일 제거"
+msgstr "유형 제거"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -12020,14 +11889,12 @@ msgstr ""
"직접 또는 다른 테마에서 가져와서 테마에 더 많은 항목을 추가하세요."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Type"
-msgstr "항목 타입 추가"
+msgstr "테마 유형 추가"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Theme Type"
-msgstr "항목 제거"
+msgstr "테마 유형 제거"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Color Item"
@@ -12142,9 +12009,8 @@ msgid "Select Another Theme Resource:"
msgstr "다른 테마 리소스 선택:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Theme Resource"
-msgstr "리소스 이름 바꾸기"
+msgstr "테마 리소스"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Another Theme"
@@ -12156,22 +12022,19 @@ msgstr "타입 추가"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Filter the list of types or create a new custom type:"
-msgstr ""
+msgstr "유형 목록을 필터링하거나 새 사용자 정의 유형을 만드세요:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Available Node-based types:"
-msgstr "사용 가능한 프로필:"
+msgstr "사용 가능한 노드 기반 유형:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Type name is empty!"
-msgstr "파일 이름이 비었습니다."
+msgstr "유형 이름이 비어 있습니다!"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Are you sure you want to create an empty type?"
-msgstr "두 개 이상의 프로젝트를 여시겠습니까?"
+msgstr "빈 유형을 만드시겠습니까?"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Confirm Item Rename"
@@ -12202,14 +12065,12 @@ msgid "Add Item Type"
msgstr "항목 타입 추가"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Set Variation Base Type"
-msgstr "변수 타입 설정"
+msgstr "변형 기본 유형 설정"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Set Base Type"
-msgstr "기본 타입 바꾸기"
+msgstr "기본 유형 설정"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Show Default"
@@ -12229,13 +12090,13 @@ msgstr "모든 디폴트 타입 항목을 오버라이드합니다."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select the variation base type from a list of available types."
-msgstr ""
+msgstr "사용 가능한 유형 목록에서 변형 기본 유형을 선택합니다."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"A type associated with a built-in class cannot be marked as a variation of "
"another type."
-msgstr ""
+msgstr "내장 클래스와 연결된 유형은 다른 유형의 변형으로 표시할 수 없습니다."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme:"
@@ -12472,55 +12333,46 @@ msgid "Clear Transform"
msgstr "변형 지우기"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Tile Map"
-msgstr "타일맵 칠하기"
+msgstr "타일 맵"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Palette Min Width"
-msgstr ""
+msgstr "팔레트 최소 너비"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Palette Item H Separation"
-msgstr "이름 있는 구분자"
+msgstr "팔레트 항목 H 분리"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Show Tile Names"
-msgstr "모든 로케일 보이기"
+msgstr "타일 이름 표시"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Show Tile Ids"
-msgstr "자 보이기"
+msgstr "타일 아이디 표시"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Sort Tiles By Name"
-msgstr "파일 정렬"
+msgstr "이름별로 타일 정렬"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Bucket Fill Preview"
-msgstr "버킷 채우기"
+msgstr "버킷 채우기 미리보기"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Editor Side"
-msgstr "에디터"
+msgstr "편집기 사이드"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Display Grid"
-msgstr "오버드로 표시"
+msgstr "그리드 표시"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Axis Color"
-msgstr "색상 선택"
+msgstr "축 색상"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Add Texture(s) to TileSet."
@@ -12582,7 +12434,7 @@ msgstr "콜리전"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Occlusion"
-msgstr "오클루전"
+msgstr "차폐"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/touch_screen_button.cpp
msgid "Bitmask"
@@ -12857,7 +12709,6 @@ msgid "This property can't be changed."
msgstr "이 속성은 바꿀 수 없습니다."
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Snap Options"
msgstr "스냅 설정"
@@ -12867,12 +12718,12 @@ msgstr "스냅 설정"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
-#, fuzzy
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
-msgstr "오프셋:"
+msgstr "오프셋"
#: editor/plugins/tile_set_editor_plugin.cpp editor/rename_dialog.cpp
#: scene/gui/range.cpp scene/resources/animation.cpp
@@ -12883,14 +12734,12 @@ msgstr "단계"
#: editor/plugins/tile_set_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Separation"
-msgstr "간격:"
+msgstr "분리"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Tile"
-msgstr "선택"
+msgstr "선택한 타일"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/light_2d.cpp scene/2d/line_2d.cpp scene/2d/mesh_instance_2d.cpp
@@ -12899,158 +12748,134 @@ msgstr "선택"
#: scene/gui/nine_patch_rect.cpp scene/gui/texture_rect.cpp
#: scene/resources/material.cpp scene/resources/sky.cpp
#: scene/resources/style_box.cpp scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Texture"
-msgstr "텍스트"
+msgstr "텍스쳐"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tex Offset"
-msgstr "격자 오프셋:"
+msgstr "텍스 오프셋"
#: editor/plugins/tile_set_editor_plugin.cpp modules/csg/csg_shape.cpp
#: scene/2d/canvas_item.cpp scene/2d/particles_2d.cpp
#: scene/3d/mesh_instance.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Material"
-msgstr "머티리얼 바꾸기:"
+msgstr "머티리얼"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/canvas_item.cpp
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Modulate"
-msgstr "만들기"
+msgstr "변조"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tile Mode"
-msgstr "모드 토글"
+msgstr "타일 모드"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Autotile Bitmask Mode"
-msgstr "비트 마스크 모드"
+msgstr "오토타일 비트마스크 모드"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Size"
-msgstr "윤곽선 크기:"
+msgstr "서브타일 크기"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Spacing"
-msgstr "애니메이션 반복"
+msgstr "서브타일 간격"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Occluder Offset"
-msgstr "Occluder 폴리곤 만들기"
+msgstr "오클루더 오프셋"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Navigation Offset"
-msgstr "내비게이션 모드"
+msgstr "내비게이션 오프셋"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Offset"
-msgstr "오프셋:"
+msgstr "모양 오프셋"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Transform"
-msgstr "변형"
+msgstr "모양 변형"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision"
-msgstr "콜리전"
+msgstr "선택된 충돌"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision One Way"
-msgstr "선택 영역만"
+msgstr "선택된 단방향 충돌"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision One Way Margin"
-msgstr "콜리전 모드"
+msgstr "선택된 단방향 충돌 여백"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Navigation"
-msgstr "내비게이션 보이기"
+msgstr "선택한 내비게이션"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Occlusion"
-msgstr "선택"
+msgstr "선택된 차폐"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tileset Script"
-msgstr "스크립트 필터"
+msgstr "타일셋 스크립트"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "TileSet"
msgstr "타일셋"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "No VCS plugins are available."
-msgstr "이용할 수 있는 버전 관리 시스템(VCS)이 없습니다."
+msgstr "VCS 플러그인을 사용할 수 없습니다."
#: editor/plugins/version_control_editor_plugin.cpp
msgid ""
"Remote settings are empty. VCS features that use the network may not work."
msgstr ""
+"원격 설정이 비어 있습니다. 네트워크를 사용하는 VCS 기능이 작동하지 않을 수 있"
+"습니다."
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "No commit message was provided."
-msgstr "이름을 제공하지 않았습니다."
+msgstr "커밋 메시지가 제공되지 않았습니다."
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Commit"
msgstr "커밋"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Staged Changes"
-msgstr "셰이더 바꾸기:"
+msgstr "단계적 변경"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Unstaged Changes"
-msgstr "셰이더 바꾸기:"
+msgstr "비단계적 변경"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Commit:"
-msgstr "커밋"
+msgstr "커밋:"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Date:"
-msgstr ""
+msgstr "날짜:"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Subtitle:"
-msgstr "하위 트리"
+msgstr "부제:"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Do you want to remove the %s branch?"
-msgstr ""
+msgstr "%s 분기를 제거하시겠습니까?"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Do you want to remove the %s remote?"
-msgstr "두 개 이상의 프로젝트를 여시겠습니까?"
+msgstr "%s 리모트를 제거하시겠습니까?"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Apply"
-msgstr "재설정 적용"
+msgstr "적용"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Version Control System"
@@ -13061,92 +12886,80 @@ msgid "Initialize"
msgstr "초기화"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Remote Login"
-msgstr "점 제거"
+msgstr "원격 로그인"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Select SSH public key path"
-msgstr ""
+msgstr "SSH 공개키의 경로를 선택하세요"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Select SSH private key path"
-msgstr ""
+msgstr "SSH 비밀키의 경로를 선택하세요"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Passphrase"
-msgstr "SSH Passphrase"
+msgstr "SSH 암호"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Detect new changes"
msgstr "새 변경사항 감지"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Discard all changes"
-msgstr "변경사항을 저장하고 닫을까요?"
+msgstr "모든 변경사항 버리기"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Stage all changes"
-msgstr "로컬 변경사항을 저장하는 중..."
+msgstr "모든 변경사항 스테이징"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Unstage all changes"
-msgstr "머티리얼 바꾸기:"
+msgstr "모든 변경사항 스테이징 취소"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Commit Message"
-msgstr "커밋 변경사항"
+msgstr "커밋 메세지"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Commit Changes"
msgstr "커밋 변경사항"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Commit List"
-msgstr "커밋"
+msgstr "커밋 목록"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Commit list size"
-msgstr ""
+msgstr "커밋 목록 크기"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Branches"
-msgstr "일치함:"
+msgstr "브랜치"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Create New Branch"
-msgstr "새 프로젝트 만들기"
+msgstr "새 브랜치 생성"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Remove Branch"
-msgstr "애니메이션 트랙 제거"
+msgstr "브랜치 삭제"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Branch Name"
-msgstr ""
+msgstr "브랜치 이름"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Remotes"
msgstr "원격"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Create New Remote"
-msgstr "새 프로젝트 만들기"
+msgstr "새 원격 추가"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Remove Remote"
-msgstr "항목 제거"
+msgstr "원격 제거"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Remote Name"
@@ -13158,20 +12971,19 @@ msgstr "원격 URL"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Fetch"
-msgstr ""
+msgstr "페치"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Pull"
-msgstr ""
+msgstr "풀"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Push"
-msgstr ""
+msgstr "푸시"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Force Push"
-msgstr "원본 메시:"
+msgstr "강제 푸시"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Modified"
@@ -13191,22 +13003,19 @@ msgstr "타입체인지"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Unmerged"
-msgstr ""
+msgstr "미병합"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "View:"
-msgstr "보기"
+msgstr "보기:"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Split"
-msgstr "경로 가르기"
+msgstr "분할"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Unified"
-msgstr "수정됨"
+msgstr "통합됨"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(GLES3 only)"
@@ -14078,11 +13887,13 @@ msgstr "실행가능"
#: editor/project_export.cpp
msgid "Export the project for all the presets defined."
-msgstr ""
+msgstr "정의된 모든 사전 설정의 프로젝트를 내보냅니다."
#: editor/project_export.cpp
msgid "All presets must have an export path defined for Export All to work."
msgstr ""
+"모든 사전 설정에는 모두 내보내기가 작동하도록 정의된 내보내기 경로가 있어야 "
+"합니다."
#: editor/project_export.cpp
msgid "Delete preset '%s'?"
@@ -14193,53 +14004,48 @@ 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
-#, fuzzy
msgid "More Info..."
-msgstr "여기로 이동..."
+msgstr "추가 정보..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export PCK/Zip..."
-msgstr "PCK/Zip 내보내기"
+msgstr "PCK/Zip 내보내기..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export Project..."
-msgstr "프로젝트 내보내기"
+msgstr "프로젝트 내보내기..."
#: editor/project_export.cpp
msgid "Export All"
msgstr "모두 내보내기"
#: editor/project_export.cpp
-#, fuzzy
msgid "Choose an export mode:"
-msgstr "비어있는 폴더를 선택해주세요."
+msgstr "내보내기 모드를 선택하세요:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export All..."
-msgstr "모두 내보내기"
+msgstr "모두 내보내기..."
#: editor/project_export.cpp editor/project_manager.cpp
msgid "ZIP File"
msgstr "ZIP 파일"
#: editor/project_export.cpp
-#, fuzzy
msgid "Godot Project Pack"
-msgstr "Godot 게임 팩"
+msgstr "Godot 프로젝트 팩"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "이 플랫폼에 대한 내보내기 템플릿이 누락됨:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Project Export"
-msgstr "프로젝트 창립자"
+msgstr "프로젝트 내보내기"
#: editor/project_export.cpp
msgid "Manage Export Templates"
@@ -14305,16 +14111,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "잘못된 프로젝트 경로 (무언가를 변경하셨습니까?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"프로젝트 경로에서 project.godot을 불러올 수 없습니다 (오류 %d). 누락되거나 손"
"상된 모양입니다."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "프로젝트 경로에서 project.godot 파일을 편집할 수 없습니다."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "'%s'에서 프로젝트를 열 수 없습니다."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -14546,7 +14353,6 @@ msgstr ""
#. TRANSLATORS: This refers to the application where users manage their Godot projects.
#: editor/project_manager.cpp
-#, fuzzy
msgctxt "Application"
msgid "Project Manager"
msgstr "프로젝트 매니저"
@@ -15300,6 +15106,9 @@ msgid ""
"To save this branch into its own scene, open the original scene, right click "
"on this branch, and select \"Save Branch as Scene\"."
msgstr ""
+"이미 인스턴스화된 장면의 하위 항목인 분기를 저장할 수 없습니다.\n"
+"이 분기를 자체 장면에 저장하려면 원본 장면을 열고 이 분기를 마우스 오른쪽 버"
+"튼으로 클릭한 다음 \"분기를 장면으로 저장\"을 선택하세요."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -15307,6 +15116,9 @@ msgid ""
"To save this branch into its own scene, open the original scene, right click "
"on this branch, and select \"Save Branch as Scene\"."
msgstr ""
+"상속된 장면의 일부인 분기를 저장할 수 없습니다.\n"
+"이 분기를 자체 장면에 저장하려면 원본 장면을 열고 이 분기를 마우스 오른쪽 버"
+"튼으로 클릭한 다음 \"분기를 장면으로 저장\"을 선택하세요."
#: editor/scene_tree_dock.cpp
msgid "Save New Scene As..."
@@ -15332,19 +15144,16 @@ msgid "Make Local"
msgstr "로컬로 만들기"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "노드 이름:"
+msgstr "씬 고유 이름 활성화"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "이미 다른 함수/변수/시그널로 사용된 이름:"
+msgstr "장면의 다른 노드에서 이미 사용 중인 고유 이름:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Disable Scene Unique Name(s)"
-msgstr "노드 이름:"
+msgstr "씬 고유 이름 비활성화"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -15419,7 +15228,7 @@ msgstr "하위 리소스"
#: editor/scene_tree_dock.cpp
msgid "Access as Scene Unique Name"
-msgstr ""
+msgstr "장면 고유 이름으로 액세스"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance"
@@ -15516,18 +15325,16 @@ msgid "Clear Inheritance? (No Undo!)"
msgstr "상속을 지울까요? (되돌릴 수 없습니다!)"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Show Scene Tree Root Selection"
-msgstr "선택 항목 중앙으로"
+msgstr "장면 트리 루트 선택 표시"
#: editor/scene_tree_dock.cpp
msgid "Derive Script Globals By Name"
-msgstr ""
+msgstr "이름으로 스크립트 전역 파생"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Use Favorites Root Selection"
-msgstr "프레임 선택"
+msgstr "즐겨찾기 루트 선택 사용"
#: editor/scene_tree_editor.cpp
msgid "Toggle Visible"
@@ -15542,9 +15349,8 @@ msgid "Button Group"
msgstr "버튼 그룹"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Disable Scene Unique Name"
-msgstr "노드 이름:"
+msgstr "씬 고유 이름 비활성화"
#: editor/scene_tree_editor.cpp
msgid "(Connecting From)"
@@ -15560,6 +15366,9 @@ msgid ""
"with the '%s' prefix in a node path.\n"
"Click to disable this."
msgstr ""
+"이 노드는 노드 경로에서 '%s' 접두사를 앞에 붙여 장면의 어느 곳에서나 액세스"
+"할 수 있습니다.\n"
+"비활성화하려면 클릭하세요."
#: editor/scene_tree_editor.cpp
msgid ""
@@ -15623,7 +15432,7 @@ msgstr "잘못된 노드 이름입니다. 다음 문자는 허용하지 않습
#: editor/scene_tree_editor.cpp
msgid "Another node already uses this unique name in the scene."
-msgstr ""
+msgstr "다른 노드가 이미 장면에서 이 고유한 이름을 사용하고 있습니다."
#: editor/scene_tree_editor.cpp
msgid "Rename Node"
@@ -15774,9 +15583,8 @@ msgid "Attach Node Script"
msgstr "노드 스크립트 붙이기"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Remote %s:"
-msgstr "원격 "
+msgstr "원격 %s:"
#: editor/script_editor_debugger.cpp
msgid "Bytes:"
@@ -15851,21 +15659,20 @@ msgid "Stack Frames"
msgstr "스택 프레임"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Filter stack variables"
-msgstr "타일 필터"
+msgstr "스택 변수 필터링"
#: editor/script_editor_debugger.cpp
msgid "Auto Switch To Remote Scene Tree"
-msgstr ""
+msgstr "원격 장면 트리로 자동 전환"
#: editor/script_editor_debugger.cpp
msgid "Remote Scene Tree Refresh Interval"
-msgstr ""
+msgstr "원격 장면 트리 새로 고침 간격"
#: editor/script_editor_debugger.cpp
msgid "Remote Inspect Refresh Interval"
-msgstr ""
+msgstr "원격 검사 새로 고침 간격"
#: editor/script_editor_debugger.cpp
msgid "Network Profiler"
@@ -15963,7 +15770,7 @@ msgstr "라이트 반경 바꾸기"
#: editor/spatial_editor_gizmos.cpp
msgid "Stream Player 3D"
-msgstr ""
+msgstr "스트림 플레이어 3D"
#: editor/spatial_editor_gizmos.cpp
msgid "Change AudioStreamPlayer3D Emission Angle"
@@ -15973,7 +15780,7 @@ msgstr "AudioStreamPlayer3D 방출 각도 바꾸기"
#: platform/osx/export/export.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Camera"
-msgstr ""
+msgstr "카메라"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
@@ -15985,7 +15792,7 @@ msgstr "카메라 크기 바꾸기"
#: editor/spatial_editor_gizmos.cpp
msgid "Visibility Notifier"
-msgstr ""
+msgstr "가시성 알리미"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Notifier AABB"
@@ -15996,23 +15803,20 @@ msgid "Change Particles AABB"
msgstr "파티클 AABB 바꾸기"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Reflection Probe"
-msgstr "속성 선택"
+msgstr "반사 프로브"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
msgstr "프로브 범위 바꾸기"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "GI Probe"
-msgstr "GI 프로브 굽기"
+msgstr "GI 프로브"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Baked Indirect Light"
-msgstr "간접 조명"
+msgstr "구운 간접 조명"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Sphere Shape Radius"
@@ -16043,57 +15847,52 @@ msgid "Change Ray Shape Length"
msgstr "광선 모양 길이 바꾸기"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Edge"
-msgstr "내비게이션 모드"
+msgstr "내비게이션 엣지"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Edge Disabled"
-msgstr "내비게이션 모드"
+msgstr "내비게이션 엣지 비활성화"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Solid"
-msgstr "내비게이션 모드"
+msgstr "내비게이션 솔리드"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Solid Disabled"
-msgstr "내비게이션 모드"
+msgstr "내비게이션 솔리드 비활성화됨"
#: editor/spatial_editor_gizmos.cpp
msgid "Joint Body A"
-msgstr ""
+msgstr "조인트 바디 A"
#: editor/spatial_editor_gizmos.cpp
msgid "Joint Body B"
-msgstr ""
+msgstr "조인트 바디 B"
#: editor/spatial_editor_gizmos.cpp
msgid "Room Edge"
-msgstr ""
+msgstr "방 가장자리"
#: editor/spatial_editor_gizmos.cpp
msgid "Room Overlap"
-msgstr ""
+msgstr "룸 겹침"
#: editor/spatial_editor_gizmos.cpp
msgid "Set Room Point Position"
-msgstr "룸 점 위치 설정"
+msgstr "룸 포인트 위치 설정"
#: editor/spatial_editor_gizmos.cpp scene/3d/portal.cpp
-#, fuzzy
msgid "Portal Margin"
-msgstr "여백 설정"
+msgstr "포털 여백"
#: editor/spatial_editor_gizmos.cpp
msgid "Portal Edge"
-msgstr ""
+msgstr "포털 엣지"
#: editor/spatial_editor_gizmos.cpp
msgid "Portal Arrow"
-msgstr ""
+msgstr "포털 애로우"
#: editor/spatial_editor_gizmos.cpp
msgid "Set Portal Point Position"
@@ -16101,18 +15900,16 @@ msgstr "포털 점 위치 설정"
#: editor/spatial_editor_gizmos.cpp
msgid "Portal Front"
-msgstr ""
+msgstr "포털 전면"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Portal Back"
-msgstr "뒤로"
+msgstr "포털 뒤로"
#: editor/spatial_editor_gizmos.cpp scene/2d/light_occluder_2d.cpp
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Occluder"
-msgstr "어클루전 모드"
+msgstr "오클루더"
#: editor/spatial_editor_gizmos.cpp
msgid "Set Occluder Sphere Radius"
@@ -16123,439 +15920,397 @@ msgid "Set Occluder Sphere Position"
msgstr "어클루더 구체 위치 설정"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Occluder Polygon Point Position"
-msgstr "포털 점 위치 설정"
+msgstr "오클루더 폴리곤 포인트 위치 설정"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Occluder Hole Point Position"
-msgstr "곡선 점 위치 설정"
+msgstr "오클루더 홀 포인트 위치 설정"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Occluder Polygon Front"
-msgstr "Occluder 폴리곤 만들기"
+msgstr "오클루더 폴리곤 프론트"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Occluder Polygon Back"
-msgstr "Occluder 폴리곤 만들기"
+msgstr "오클루더 폴리곤 백"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Occluder Hole"
-msgstr "Occluder 폴리곤 만들기"
+msgstr "오클루더 홀"
#: main/main.cpp
msgid "Godot Physics"
-msgstr ""
+msgstr "Godot 물리"
#: main/main.cpp servers/physics_2d/physics_2d_server_sw.cpp
#: servers/visual/visual_server_scene.cpp
msgid "Use BVH"
-msgstr ""
+msgstr "BVH 사용"
#: main/main.cpp servers/physics_2d/physics_2d_server_sw.cpp
#: servers/visual/visual_server_scene.cpp
-#, fuzzy
msgid "BVH Collision Margin"
-msgstr "콜리전 모드"
+msgstr "BVH 충돌 여백"
#: main/main.cpp
-#, fuzzy
msgid "Crash Handler"
-msgstr "핸들 설정"
+msgstr "충돌 처리기"
#: main/main.cpp
-#, fuzzy
msgid "Multithreaded Server"
-msgstr "다중 노드 설정"
+msgstr "멀티스레드 서버"
#: main/main.cpp
msgid "RID Pool Prealloc"
-msgstr ""
+msgstr "RID 풀 사전 할당"
#: main/main.cpp
-#, fuzzy
msgid "Debugger stdout"
-msgstr "디버거"
+msgstr "디버거 표준 출력"
#: main/main.cpp
msgid "Max Chars Per Second"
-msgstr ""
+msgstr "초당 최대 문자"
#: main/main.cpp
msgid "Max Messages Per Frame"
-msgstr ""
+msgstr "프레임당 최대 메시지"
#: main/main.cpp
msgid "Max Errors Per Second"
-msgstr ""
+msgstr "초당 최대 오류"
#: main/main.cpp
msgid "Max Warnings Per Second"
-msgstr ""
+msgstr "초당 최대 경고"
#: main/main.cpp
msgid "Flush stdout On Print"
-msgstr ""
+msgstr "인쇄 시 stdout 플러시"
#: main/main.cpp servers/visual_server.cpp
msgid "Logging"
-msgstr ""
+msgstr "로깅"
#: main/main.cpp
msgid "File Logging"
-msgstr ""
+msgstr "파일 로깅"
#: main/main.cpp
-#, fuzzy
msgid "Enable File Logging"
-msgstr "필터 활성화"
+msgstr "파일 로깅 활성화"
#: main/main.cpp
-#, fuzzy
msgid "Log Path"
-msgstr "경로 복사"
+msgstr "로그 경로"
#: main/main.cpp
msgid "Max Log Files"
-msgstr ""
+msgstr "최대 로그 파일"
#: main/main.cpp
msgid "Driver"
-msgstr ""
+msgstr "드라이버"
#: main/main.cpp
-#, fuzzy
msgid "Driver Name"
-msgstr "스크립트 이름:"
+msgstr "드라이버 이름"
#: main/main.cpp
msgid "Fallback To GLES2"
-msgstr ""
+msgstr "GLES2로 대체"
#: main/main.cpp
msgid "Use Nvidia Rect Flicker Workaround"
-msgstr ""
+msgstr "Nvidia Rect 깜박임 해결 방법 사용"
#: main/main.cpp
msgid "DPI"
-msgstr ""
+msgstr "DPI"
#: main/main.cpp
msgid "Allow hiDPI"
-msgstr ""
+msgstr "hiDPI 허용"
#: main/main.cpp
-#, fuzzy
msgid "V-Sync"
-msgstr "동기화"
+msgstr "수직동기화"
#: main/main.cpp
-#, fuzzy
msgid "Use V-Sync"
-msgstr "스냅 사용"
+msgstr "V-Sync 사용"
#: 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
msgid "Framebuffer Allocation"
-msgstr "프레임 선택"
+msgstr "프레임 버퍼 할당"
#: main/main.cpp platform/uwp/os_uwp.cpp
-#, fuzzy
msgid "Energy Saving"
-msgstr "저장 중 오류"
+msgstr "에너지 절약"
#: main/main.cpp
msgid "Threads"
-msgstr ""
+msgstr "스레드"
#: main/main.cpp servers/physics_2d/physics_2d_server_wrap_mt.h
-#, fuzzy
msgid "Thread Model"
-msgstr "모드 토글"
+msgstr "스레드 모델"
#: main/main.cpp
msgid "Thread Safe BVH"
-msgstr ""
+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
-#, fuzzy
msgid "Physics FPS"
-msgstr "물리 프레임 %"
+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
#: scene/main/viewport.cpp scene/register_scene_types.cpp
msgid "GUI"
-msgstr ""
+msgstr "GUI"
#: main/main.cpp
msgid "Drop Mouse On GUI Input Disabled"
-msgstr ""
+msgstr "GUI 입력 시 마우스 놓기 비활성화됨"
#: main/main.cpp
msgid "stdout"
-msgstr ""
+msgstr "표준 출력"
#: main/main.cpp
msgid "Print FPS"
-msgstr ""
+msgstr "FPS 인쇄"
#: main/main.cpp
msgid "Verbose stdout"
-msgstr ""
+msgstr "자세한 표준 출력"
#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp
-#, fuzzy
msgid "Physics Interpolation"
-msgstr "보간 모드"
+msgstr "물리 보간"
#: main/main.cpp
-#, fuzzy
msgid "Enable Warnings"
-msgstr "필터 활성화"
+msgstr "경고 활성화"
#: main/main.cpp
-#, fuzzy
msgid "Frame Delay Msec"
-msgstr "프레임 선택"
+msgstr "프레임 지연 Msec"
#: main/main.cpp
msgid "Low Processor Mode"
-msgstr ""
+msgstr "낮은 프로세서 모드"
#: main/main.cpp
msgid "Delta Sync After Draw"
-msgstr ""
+msgstr "그리기 후 델타 동기화"
#: main/main.cpp
msgid "iOS"
-msgstr ""
+msgstr "iOS"
#: main/main.cpp
msgid "Hide Home Indicator"
-msgstr ""
+msgstr "홈 표시기 숨기기"
#: main/main.cpp
-#, fuzzy
msgid "Input Devices"
-msgstr "모든 기기"
+msgstr "입력 장치"
#: main/main.cpp
-#, fuzzy
msgid "Pointing"
-msgstr "점"
+msgstr "포인팅"
#: main/main.cpp
msgid "Touch Delay"
-msgstr ""
+msgstr "터치 지연"
#: main/main.cpp servers/visual_server.cpp
msgid "GLES3"
-msgstr ""
+msgstr "GLES3"
#: main/main.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Shaders"
msgstr "셰이더"
#: main/main.cpp
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
#: scene/resources/world.cpp
-#, fuzzy
msgid "Environment"
-msgstr "환경 보기"
+msgstr "환경"
#: main/main.cpp
msgid "Default Clear Color"
-msgstr ""
+msgstr "기본 클리어 컬러"
#: main/main.cpp
msgid "Boot Splash"
-msgstr ""
+msgstr "부트 스플래쉬"
#: main/main.cpp
-#, fuzzy
msgid "Show Image"
-msgstr "본 보이기"
+msgstr "이미지 표시"
#: main/main.cpp
msgid "Image"
-msgstr ""
+msgstr "영상"
#: main/main.cpp
msgid "Fullsize"
-msgstr ""
+msgstr "전체 크기"
#: main/main.cpp scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Use Filter"
-msgstr "필터:"
+msgstr "필터 사용"
#: main/main.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "BG Color"
-msgstr "색상"
+msgstr "배경색"
#: main/main.cpp
-#, fuzzy
msgid "macOS Native Icon"
-msgstr "타일 아이콘 설정"
+msgstr "맥OS 네이티브 아이콘"
#: main/main.cpp
msgid "Windows Native Icon"
-msgstr ""
+msgstr "윈도우 네이티브 아이콘"
#: main/main.cpp
msgid "Buffering"
-msgstr ""
+msgstr "버퍼링"
#: main/main.cpp
msgid "Agile Event Flushing"
-msgstr ""
+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
msgid "Mouse Cursor"
-msgstr "마우스 버튼"
+msgstr "마우스 커서"
#: main/main.cpp
-#, fuzzy
msgid "Custom Image"
-msgstr "노드 잘라내기"
+msgstr "사용자 정의 이미지"
#: main/main.cpp
msgid "Custom Image Hotspot"
-msgstr ""
+msgstr "사용자 정의 이미지 핫스팟"
#: main/main.cpp
-#, fuzzy
msgid "Tooltip Position Offset"
-msgstr "회전 오프셋:"
+msgstr "툴팁 위치 오프셋"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
-#, fuzzy
msgid "Debugger Agent"
-msgstr "디버거"
+msgstr "디버거 에이전트"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
-#, fuzzy
msgid "Wait For Debugger"
-msgstr "디버거"
+msgstr "디버거 대기"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
-#, fuzzy
msgid "Wait Timeout"
-msgstr "시간 초과."
+msgstr "대기 타임아웃"
#: main/main.cpp
msgid "Runtime"
-msgstr ""
+msgstr "런타임"
#: main/main.cpp
msgid "Unhandled Exception Policy"
-msgstr ""
+msgstr "처리되지 않은 예외 정책"
#: main/main.cpp
-#, fuzzy
msgid "Main Loop Type"
-msgstr "노드 타입 찾기"
+msgstr "메인 루프 유형"
#: main/main.cpp scene/gui/texture_progress.cpp
#: scene/gui/viewport_container.cpp
msgid "Stretch"
-msgstr ""
+msgstr "스트레치"
#: main/main.cpp
-#, fuzzy
msgid "Aspect"
-msgstr "인스펙터"
+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
msgid "Quit On Go Back"
-msgstr "뒤로"
+msgstr "돌아가면서 종료"
#: main/main.cpp scene/main/viewport.cpp
-#, fuzzy
msgid "Snap Controls To Pixels"
-msgstr "노드 옆면에 스냅"
+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"
-msgstr ""
+msgstr "액티브 소프트 월드"
#: modules/csg/csg_gizmos.cpp
msgid "CSG"
-msgstr ""
+msgstr "CSG"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -16574,35 +16329,30 @@ msgid "Change Torus Outer Radius"
msgstr "도넛 외부 반지름 바꾸기"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Operation"
-msgstr "설정"
+msgstr "오퍼레이션"
#: modules/csg/csg_shape.cpp
msgid "Calculate Tangents"
-msgstr ""
+msgstr "접선 계산"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Use Collision"
-msgstr "콜리전"
+msgstr "충돌 사용"
#: modules/csg/csg_shape.cpp servers/physics_2d_server.cpp
-#, fuzzy
msgid "Collision Layer"
-msgstr "콜리전 모드"
+msgstr "충돌 레이어"
#: 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 "콜리전 모드"
+msgstr "충돌 마스크"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Invert Faces"
-msgstr "대소문자 변환"
+msgstr "면 반전"
#: modules/csg/csg_shape.cpp scene/2d/navigation_agent_2d.cpp
#: scene/2d/navigation_obstacle_2d.cpp scene/3d/navigation_agent.cpp
@@ -16612,176 +16362,151 @@ msgstr "대소문자 변환"
#: 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 "반지름:"
+msgstr "반지름"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Radial Segments"
-msgstr "메인 씬 인수:"
+msgstr "방사형 세그먼트"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Rings"
-msgstr "경고"
+msgstr "링"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Smooth Faces"
-msgstr "부드러운 단계"
+msgstr "부드러운 얼굴"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Sides"
-msgstr "가이드 보이기"
+msgstr "사이드"
#: modules/csg/csg_shape.cpp
msgid "Cone"
-msgstr ""
+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"
-msgstr ""
+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 "폴리곤"
#: 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
msgid "Path Node"
-msgstr "노드 붙여넣기"
+msgstr "경로 노드"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Interval Type"
-msgstr "내부 꼭짓점 만들기"
+msgstr "경로 간격 유형"
#: modules/csg/csg_shape.cpp
msgid "Path Interval"
-msgstr ""
+msgstr "경로 간격"
#: modules/csg/csg_shape.cpp
msgid "Path Simplify Angle"
-msgstr ""
+msgstr "경로 단순화 각도"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Rotation"
-msgstr "무작위 회전:"
+msgstr "경로 회전"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Local"
-msgstr "로컬로 만들기"
+msgstr "경로 로컬"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Continuous U"
-msgstr "연속적"
+msgstr "경로 연속 U"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path U Distance"
-msgstr "거리 선택:"
+msgstr "경로 U 거리"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Joined"
-msgstr "무작위 회전:"
+msgstr "결합된 경로"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Compression Mode"
-msgstr "콜리전 모드"
+msgstr "압축 모드"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Transfer Channel"
-msgstr "변형 바꾸기"
+msgstr "전송 채널"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Channel Count"
-msgstr "인스턴스하기"
+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"
-msgstr ""
+msgstr "DTLS 호스트 이름"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Use DTLS"
-msgstr "스냅 사용"
+msgstr "DTLS 사용"
#: modules/fbx/editor_scene_importer_fbx.cpp
msgid "FBX"
-msgstr ""
+msgstr "FBX"
#: modules/fbx/editor_scene_importer_fbx.cpp
msgid "Use FBX"
-msgstr ""
+msgstr "FBX 사용"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Config File"
-msgstr "저장하려는 파일:"
+msgstr "설정 파일"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Load Once"
-msgstr "리소스 불러오기"
+msgstr "한 번 로드"
#: modules/gdnative/gdnative.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Singleton"
-msgstr "스켈레톤"
+msgstr "싱글톤"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Symbol Prefix"
-msgstr "접두사:"
+msgstr "기호 접두어"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Reloadable"
-msgstr "새로고침"
+msgstr "다시 로드 가능"
#: modules/gdnative/gdnative.cpp
#: modules/gdnative/gdnative_library_singleton_editor.cpp
@@ -16834,24 +16559,20 @@ msgid "Disabled GDNative Singleton"
msgstr "비활성화된 GDNative 싱글톤"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
-#, fuzzy
msgid "Libraries:"
-msgstr "라이브러리: "
+msgstr "라이브러리:"
#: modules/gdnative/nativescript/nativescript.cpp
-#, fuzzy
msgid "Class Name"
-msgstr "클래스 이름:"
+msgstr "클래스 이름"
#: modules/gdnative/nativescript/nativescript.cpp
-#, fuzzy
msgid "Script Class"
-msgstr "스크립트 이름:"
+msgstr "스크립트 클래스"
#: modules/gdnative/nativescript/nativescript.cpp
-#, fuzzy
msgid "Icon Path"
-msgstr "경로 포커스"
+msgstr "아이콘 경로"
#: modules/gdnative/register_types.cpp
msgid "GDNative"
@@ -16859,34 +16580,32 @@ msgstr "GDNative"
#: modules/gdscript/editor/gdscript_highlighter.cpp
#: modules/gdscript/gdscript.cpp
-#, fuzzy
msgid "GDScript"
-msgstr "스크립트"
+msgstr "GD스크립트"
#: modules/gdscript/editor/gdscript_highlighter.cpp
msgid "Function Definition Color"
-msgstr ""
+msgstr "함수 정의 색상"
#: modules/gdscript/editor/gdscript_highlighter.cpp
-#, fuzzy
msgid "Node Path Color"
-msgstr "노드 경로 복사"
+msgstr "노드 경로 색상"
#: modules/gdscript/gdscript.cpp modules/visual_script/visual_script.cpp
msgid "Max Call Stack"
-msgstr ""
+msgstr "최대 호출 스택"
#: modules/gdscript/gdscript.cpp
msgid "Treat Warnings As Errors"
-msgstr ""
+msgstr "경고를 오류로 처리"
#: modules/gdscript/gdscript.cpp
msgid "Exclude Addons"
-msgstr ""
+msgstr "애드온 제외"
#: modules/gdscript/gdscript.cpp
msgid "Autocomplete Setters And Getters"
-msgstr ""
+msgstr "자동 완성 설정자 및 게터"
#: modules/gdscript/gdscript_functions.cpp
msgid "Step argument is zero!"
@@ -16925,22 +16644,20 @@ msgid "Object can't provide a length."
msgstr "오브젝트는 길이를 제공할 수 없습니다."
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Language Server"
-msgstr "언어:"
+msgstr "언어 서버"
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Enable Smart Resolve"
-msgstr "해결할 수 없음"
+msgstr "스마트 해결 활성화"
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Show Native Symbols In Editor"
-msgstr ""
+msgstr "편집기에서 기본 기호 표시"
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Use Thread"
-msgstr ""
+msgstr "스레드 사용"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
msgid "Export Mesh GLTF2"
@@ -16951,98 +16668,84 @@ msgid "Export GLTF..."
msgstr "GLTF 내보내기..."
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Buffer View"
-msgstr "후면 뷰"
+msgstr "버퍼 보기"
#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Byte Offset"
-msgstr "격자 오프셋:"
+msgstr "바이트 오프셋"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Component Type"
-msgstr "구성 요소"
+msgstr "구성 요소 유형"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Normalized"
-msgstr "형식"
+msgstr "정규화"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Count"
-msgstr "양:"
+msgstr "양"
#: modules/gltf/gltf_accessor.cpp scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Min"
-msgstr "MiB"
+msgstr "최소"
#: modules/gltf/gltf_accessor.cpp scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Max"
-msgstr "믹스"
+msgstr "최대"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Sparse Count"
-msgstr "인스턴스하기"
+msgstr "희소 카운트"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Buffer View"
-msgstr ""
+msgstr "희소 인덱스 버퍼 보기"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Byte Offset"
-msgstr ""
+msgstr "희소 인덱스 바이트 오프셋"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Sparse Indices Component Type"
-msgstr "지오메트리 분석 중..."
+msgstr "희소 인덱스 구성 요소 유형"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Values Buffer View"
-msgstr ""
+msgstr "희소 값 버퍼 보기"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Values Byte Offset"
-msgstr ""
+msgstr "희소 값 바이트 오프셋"
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Buffer"
-msgstr "후면 뷰"
+msgstr "버퍼"
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Byte Length"
-msgstr "디폴트 테마"
+msgstr "바이트 길이"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Byte Stride"
-msgstr ""
+msgstr "바이트 스트라이드"
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Indices"
-msgstr "모든 기기"
+msgstr "인덱스"
#: modules/gltf/gltf_camera.cpp
-#, fuzzy
msgid "FOV Size"
-msgstr "크기:"
+msgstr "FOV 크기"
#: modules/gltf/gltf_camera.cpp
msgid "Zfar"
-msgstr ""
+msgstr "Z 멀리"
#: modules/gltf/gltf_camera.cpp
-#, fuzzy
msgid "Znear"
-msgstr "직선형"
+msgstr "Z 근처"
#: modules/gltf/gltf_light.cpp scene/2d/canvas_modulate.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/light_2d.cpp scene/2d/polygon_2d.cpp
@@ -17052,274 +16755,239 @@ msgstr "직선형"
#: scene/resources/environment.cpp scene/resources/material.cpp
#: scene/resources/particles_material.cpp scene/resources/sky.cpp
#: scene/resources/style_box.cpp
-#, fuzzy
msgid "Color"
msgstr "색상"
#: modules/gltf/gltf_light.cpp scene/3d/reflection_probe.cpp
#: scene/resources/environment.cpp
msgid "Intensity"
-msgstr ""
+msgstr "강함"
#: modules/gltf/gltf_light.cpp scene/2d/light_2d.cpp scene/3d/light.cpp
-#, fuzzy
msgid "Range"
-msgstr "바꾸기"
+msgstr "범위"
#: modules/gltf/gltf_light.cpp
msgid "Inner Cone Angle"
-msgstr ""
+msgstr "내부 원뿔 각도"
#: modules/gltf/gltf_light.cpp
msgid "Outer Cone Angle"
-msgstr ""
+msgstr "외부 원뿔 각도"
#: modules/gltf/gltf_mesh.cpp
-#, fuzzy
msgid "Blend Weights"
-msgstr "라이트맵 굽기"
+msgstr "혼합 가중치"
#: modules/gltf/gltf_mesh.cpp
-#, fuzzy
msgid "Instance Materials"
-msgstr "머티리얼 바꾸기:"
+msgstr "인스턴스 재료"
#: modules/gltf/gltf_node.cpp scene/3d/skeleton.cpp
-#, fuzzy
msgid "Parent"
-msgstr "부모 다시 지정"
+msgstr "부모"
#: modules/gltf/gltf_node.cpp
-#, fuzzy
msgid "Xform"
-msgstr "플랫폼"
+msgstr "변형"
#: modules/gltf/gltf_node.cpp scene/3d/mesh_instance.cpp
msgid "Skin"
-msgstr ""
+msgstr "스킨"
#: modules/gltf/gltf_node.cpp scene/3d/spatial.cpp
-#, fuzzy
msgid "Translation"
msgstr "번역"
#: modules/gltf/gltf_node.cpp
-#, fuzzy
msgid "Children"
-msgstr "편집할 수 있는 자식"
+msgstr "어린이"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Joints"
-msgstr "점"
+msgstr "관절"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
msgid "Roots"
-msgstr ""
+msgstr "루트"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_state.cpp
msgid "Unique Names"
-msgstr ""
+msgstr "고유한 이름"
#: modules/gltf/gltf_skeleton.cpp
-#, fuzzy
msgid "Godot Bone Node"
-msgstr "시간 탐색 노드"
+msgstr "Godot 본 노드"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Skin Root"
-msgstr "새 씬 루트"
+msgstr "스킨 루트"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Joints Original"
-msgstr "원점 포커스"
+msgstr "관절 원본"
#: modules/gltf/gltf_skin.cpp
msgid "Inverse Binds"
-msgstr ""
+msgstr "역결합"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Non Joints"
-msgstr "관절 이동"
+msgstr "비 관절"
#: modules/gltf/gltf_skin.cpp
msgid "Joint I To Bone I"
-msgstr ""
+msgstr "관절 I에서 뼈 I"
#: modules/gltf/gltf_skin.cpp
msgid "Joint I To Name"
-msgstr ""
+msgstr "관절 I 이름"
#: modules/gltf/gltf_skin.cpp
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
msgid "Gloss Factor"
-msgstr ""
+msgstr "광택 계수"
#: modules/gltf/gltf_spec_gloss.cpp
-#, fuzzy
msgid "Specular Factor"
-msgstr "스칼라 연산자."
+msgstr "반사 인자"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Spec Gloss Img"
-msgstr ""
+msgstr "반사광 이미지"
#: modules/gltf/gltf_state.cpp
msgid "Json"
-msgstr ""
+msgstr "Json"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Major Version"
-msgstr "버전"
+msgstr "메이저 버전"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Minor Version"
-msgstr "버전"
+msgstr "마이너 버전"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "GLB Data"
-msgstr "데이터와 함께"
+msgstr "GLB 데이터"
#: modules/gltf/gltf_state.cpp
msgid "Use Named Skin Binds"
-msgstr ""
+msgstr "네임드 스킨 바인딩 사용"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Buffer Views"
-msgstr "후면 뷰"
+msgstr "버퍼 보기"
#: modules/gltf/gltf_state.cpp
msgid "Accessors"
-msgstr ""
+msgstr "접근자"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Scene Name"
-msgstr "씬 경로:"
+msgstr "씬 이름"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Root Nodes"
-msgstr "루트 노드 이름"
+msgstr "루트 노드"
#: modules/gltf/gltf_state.cpp scene/2d/particles_2d.cpp
#: scene/gui/texture_button.cpp scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Textures"
-msgstr "기능"
+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
msgid "Lights"
-msgstr "라이트"
+msgstr "빛"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Unique Animation Names"
-msgstr "새 애니메이션 이름:"
+msgstr "고유한 애니메이션 이름"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Skeletons"
msgstr "스켈레톤"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Skeleton To Node"
-msgstr "노드를 선택하세요"
+msgstr "스켈레톤에서 노드로"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Animations"
-msgstr "애니메이션:"
+msgstr "애니메이션"
#: modules/gltf/gltf_texture.cpp
-#, fuzzy
msgid "Src Image"
-msgstr "본 보이기"
+msgstr "SRC 이미지"
#: modules/gridmap/grid_map.cpp
msgid "Mesh Library"
msgstr "메시 라이브러리"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Physics Material"
-msgstr "물리 프레임 %"
+msgstr "물리 재료"
#: modules/gridmap/grid_map.cpp scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Use In Baked Light"
-msgstr "라이트맵 굽기"
+msgstr "베이킹 라이트에서 사용"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Cell"
-msgstr ""
+msgstr "셀"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Octant Size"
-msgstr "정면 뷰"
+msgstr "옥탄트 크기"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center X"
-msgstr "중앙"
+msgstr "중앙 X"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center Y"
-msgstr "중앙"
+msgstr "중앙 Y"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center Z"
-msgstr "중앙"
+msgstr "중앙 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 "마스크"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
-#, fuzzy
msgid "Bake Navigation"
-msgstr "네비게이션"
+msgstr "베이크 내비게이션"
#: modules/gridmap/grid_map.cpp scene/2d/navigation_2d.cpp
#: 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 "내비게이션 감도"
+msgstr "내비게이션 레이어"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -17478,63 +17146,59 @@ msgid "Plotting lightmaps"
msgstr "라이트맵 그리는 중"
#: modules/lightmapper_cpu/register_types.cpp
-#, fuzzy
msgid "CPU Lightmapper"
-msgstr "라이트맵 굽기"
+msgstr "CPU 라이트매퍼"
#: 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
#: modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
#: modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
-#, fuzzy
msgid "Loop Offset"
-msgstr "오프셋:"
+msgstr "루프 오프셋"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Eye Height"
-msgstr ""
+msgstr "눈 높이"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "IOD"
-msgstr ""
+msgstr "IOD"
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "Display Width"
-msgstr "와이어프레임 표시"
+msgstr "디스플레이 너비"
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "Display To Lens"
-msgstr "셰이더 없음 표시"
+msgstr "렌즈에 표시"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Oversample"
-msgstr ""
+msgstr "오버샘플"
#: 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"
@@ -17545,24 +17209,20 @@ msgid "Build Solution"
msgstr "솔루션 빌드"
#: modules/mono/editor/csharp_project.cpp
-#, fuzzy
msgid "Auto Update Project"
-msgstr "이름 없는 프로젝트"
+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"
@@ -17636,96 +17296,87 @@ msgstr "완료!"
#: modules/opensimplex/noise_texture.cpp
msgid "Seamless"
-msgstr ""
+msgstr "원활한"
#: modules/opensimplex/noise_texture.cpp
-#, fuzzy
msgid "As Normal Map"
-msgstr "무작위 스케일:"
+msgstr "노멀 맵으로"
#: modules/opensimplex/noise_texture.cpp
msgid "Bump Strength"
-msgstr ""
+msgstr "범프 강도"
#: modules/opensimplex/noise_texture.cpp
msgid "Noise"
-msgstr ""
+msgstr "소음"
#: modules/opensimplex/noise_texture.cpp
-#, fuzzy
msgid "Noise Offset"
-msgstr "격자 오프셋:"
+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
msgid "Persistence"
-msgstr "원근"
+msgstr "지속성"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Lacunarity"
-msgstr ""
+msgstr "세심함"
#: modules/regex/regex.cpp
msgid "Subject"
-msgstr ""
+msgstr "서브젝트"
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Names"
msgstr "이름"
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Strings"
-msgstr "설정:"
+msgstr "문자열"
#: modules/upnp/upnp.cpp
msgid "Discover Multicast If"
-msgstr ""
+msgstr "멀티캐스트를 발견하면"
#: modules/upnp/upnp.cpp
msgid "Discover Local Port"
-msgstr ""
+msgstr "로컬 포트 검색"
#: modules/upnp/upnp.cpp
msgid "Discover IPv6"
-msgstr ""
+msgstr "IPv6 발견"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "Description URL"
-msgstr "설명"
+msgstr "설명 URL"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "Service Type"
-msgstr "변수 타입 설정"
+msgstr "서비스 유형"
#: modules/upnp/upnp_device.cpp
msgid "IGD Control URL"
-msgstr ""
+msgstr "IGD 제어 URL"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "IGD Service Type"
-msgstr "변수 타입 설정"
+msgstr "IGD 서비스 유형"
#: modules/upnp/upnp_device.cpp
msgid "IGD Our Addr"
-msgstr ""
+msgstr "IGD 우리의 주소"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "IGD Status"
-msgstr "상태"
+msgstr "IGD 상태"
#: modules/visual_script/visual_script.cpp
msgid ""
@@ -17751,9 +17402,8 @@ msgstr ""
"쳐주세요."
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Node returned an invalid sequence output:"
-msgstr "잘못된 시퀀스 출력을 반환한 노드: "
+msgstr "잘못된 시퀀스 출력을 반환한 노드:"
#: modules/visual_script/visual_script.cpp
msgid "Found sequence bit but not the node in the stack, report bug!"
@@ -17761,14 +17411,12 @@ msgstr ""
"시퀀스 비트를 발견했지만 스택 안의 노드에는 없습니다. 버그를 신고하세요!"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Stack overflow with stack depth:"
-msgstr "스택 깊이로 오버플로우한 스택: "
+msgstr "스택 깊이가 있는 스택 오버플로:"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Visual Script"
-msgstr "비주얼스크립트 검색"
+msgstr "비주얼 스크립트"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Signal Arguments"
@@ -18089,122 +17737,108 @@ msgstr "멤버 편집"
#: modules/visual_script/visual_script_expression.cpp
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Expression"
-msgstr "표현식 설정"
+msgstr "표현"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Return"
-msgstr ""
+msgstr "반환"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Enabled"
-msgstr "실행가능"
+msgstr "반환 활성화됨"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Type"
-msgstr "멤버 타입"
+msgstr "반환 유형"
#: modules/visual_script/visual_script_flow_control.cpp
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Condition"
-msgstr "애니메이션"
+msgstr "조건"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "if (cond) is:"
-msgstr ""
+msgstr "(조건)이 다음과 같으면:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "While"
-msgstr "While"
+msgstr "동안"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "while (cond):"
-msgstr ""
+msgstr "동안(조건):"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator"
-msgstr ""
+msgstr "반복자"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "for (elem) in (input):"
-msgstr ""
+msgstr "(입력)에서 (요소):"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Input type not iterable:"
-msgstr "반복할 수 없는 입력 타입: "
+msgstr "반복할 수 없는 입력 유형:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator became invalid"
-msgstr "Iterator가 잘못되었습니다"
+msgstr "반복자가 잘못되었습니다"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Iterator became invalid:"
-msgstr "Iterator가 잘못됨: "
+msgstr "반복자가 잘못되었습니다:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Sequence"
-msgstr ""
+msgstr "순서"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "in order:"
-msgstr "폴더 이름 바꾸기:"
+msgstr "규칙대로:"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Steps"
msgstr "단계"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Switch"
-msgstr "Pitch:"
+msgstr "스위치"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "'input' is:"
-msgstr ""
+msgstr "'입력'은:"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Type Cast"
-msgstr "타입:"
+msgstr "유형 캐스트"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Is %s?"
-msgstr ""
+msgstr "%s인가요?"
#: modules/visual_script/visual_script_flow_control.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Base Script"
-msgstr "새 스크립트"
+msgstr "기본 스크립트"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "On %s"
-msgstr ""
+msgstr "%s에"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "On Self"
-msgstr "자체"
+msgstr "온 셀프"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "Call Mode"
-msgstr "스케일 모드"
+msgstr "호출 모드"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Basic Type"
-msgstr "기본 타입 바꾸기"
+msgstr "기본형"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
@@ -18219,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
@@ -18313,9 +17946,8 @@ msgstr "배열 크기 바꾸기"
#: modules/visual_script/visual_script_nodes.cpp scene/resources/material.cpp
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Operator"
-msgstr "오버레이 연산자."
+msgstr "연산자"
#: modules/visual_script/visual_script_nodes.cpp
#, fuzzy
@@ -18352,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
@@ -18377,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
@@ -18402,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."
@@ -18464,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
@@ -18504,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)"
@@ -18516,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)"
@@ -18549,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
@@ -18563,9 +18184,8 @@ msgid "CA Chain"
msgstr "IK 체인 지우기"
#: modules/websocket/websocket_server.cpp
-#, fuzzy
msgid "Handshake Timeout"
-msgstr "시간 초과."
+msgstr "핸드쉐이크 타임아웃"
#: modules/webxr/webxr_interface.cpp
#, fuzzy
@@ -18573,18 +18193,17 @@ msgid "Session Mode"
msgstr "영역 모드"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Required Features"
-msgstr "주요 기능:"
+msgstr "필수적 기능"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Optional Features"
-msgstr "주요 기능:"
+msgstr "선택적 기능"
#: modules/webxr/webxr_interface.cpp
+#, fuzzy
msgid "Requested Reference Space Types"
-msgstr ""
+msgstr "요청된 참조 공간 유형"
#: modules/webxr/webxr_interface.cpp
msgid "Reference Space Type"
@@ -18742,9 +18361,8 @@ msgid "Package"
msgstr "패킹 중"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Unique Name"
-msgstr "노드 이름:"
+msgstr "고유 이름"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18752,9 +18370,8 @@ msgid "Signed"
msgstr "시그널"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Classify As Game"
-msgstr "클래스 이름:"
+msgstr "게임으로 분류"
#: platform/android/export/export_plugin.cpp
msgid "Retain Data On Uninstall"
@@ -18766,9 +18383,8 @@ msgid "Exclude From Recents"
msgstr "노드 삭제"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Graphics"
-msgstr "격자 오프셋:"
+msgstr "그래픽"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18838,9 +18454,8 @@ msgid "Command Line"
msgstr "커뮤니티"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Extra Args"
-msgstr "별도의 호출 인수:"
+msgstr "추가적인 인수"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -19041,14 +18656,12 @@ msgid "Code Signing"
msgstr "시그널"
#: 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'를 찾을 수 없었습니다.\n"
-"명령이 Android SDK build-tools 디렉토리에서 사용 가능한지 확인해주세요.\n"
-"결과 %s는 서명되지 않습니다."
+"'apksigner'를 찾을 수 없습니다. 명령이 Android SDK build-tools 디렉토리에서 "
+"사용 가능한지 확인해주세요. 결과물 %s는 서명되지 않았습니다."
#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
@@ -19063,9 +18676,8 @@ msgid "Could not find keystore, unable to export."
msgstr "keystore를 찾을 수 없어, 내보낼 수 없었습니다."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not start apksigner executable."
-msgstr "하위 프로세스를 시작할 수 없습니다!"
+msgstr "apksigner 실행 파일을 시작할 수 없습니다."
#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
@@ -19096,9 +18708,8 @@ msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "잘못된 파일이름입니다! Android APK는 *.apk 확장자가 필요합니다."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Unsupported export format!"
-msgstr "지원되지 않는 내보내기 형식입니다!\n"
+msgstr "지원되지 않는 내보내기 형식입니다!"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19109,27 +18720,22 @@ msgstr ""
"(Project)' 메뉴에서 다시 설치해주세요."
#: 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 ""
-"Android 빌드 버전이 맞지 않음:\n"
-" 설치된 템플릿: %s\n"
-" Godot 버전: %s\n"
-"'프로젝트' 메뉴에서 Android 빌드 템플릿을 다시 설치해주세요."
+"Android 빌드 버전이 맞지 않음: 설치된 템플릿: %s, Godot 버전: %s. '프로젝트' "
+"메뉴에서 Android 빌드 템플릿을 다시 설치해주세요."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name."
msgstr ""
-"res://android/build/res/*.xml 파일을 프로젝트 이름으로 덮어쓸 수 없습니다"
+"res://android/build/res/*.xml 파일을 프로젝트 이름으로 덮어쓸 수 없습니다."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files to gradle project."
-msgstr "프로젝트 파일을 gradle 프로젝트로 내보낼 수 없었습니다\n"
+msgstr "프로젝트 파일을 gradle 프로젝트로 내보낼 수 없습니다."
#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
@@ -19140,13 +18746,12 @@ msgid "Building Android Project (gradle)"
msgstr "Android 프로젝트 빌드 중 (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 ""
-"Android 프로젝트의 빌드에 실패했습니다, 출력된 오류를 확인하세요.\n"
-"또는 docs.godotengine.org에서 Android 빌드 문서를 찾아보세요."
+"Android 프로젝트의 빌드에 실패했습니다, 출력된 오류를 확인하세요. 또는 docs."
+"godotengine.org에서 Android 빌드 문서를 찾아보세요."
#: platform/android/export/export_plugin.cpp
msgid "Moving output"
@@ -19161,20 +18766,16 @@ msgstr ""
"트 디렉토리를 확인하세요."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Package not found: \"%s\"."
-msgstr "패키지를 찾을 수 없음: %s"
+msgstr "패키지를 찾을 수 없음: \"%s\"."
#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr "APK를 만드는 중..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not find template APK to export: \"%s\"."
-msgstr ""
-"내보낼 템플릿 APK를 찾을 수 없음:\n"
-"%s"
+msgstr "내보낼 템플릿 APK를 찾을 수 없음: \"%s\"."
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -19193,9 +18794,8 @@ msgid "Adding files..."
msgstr "파일을 추가하는 중..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files."
-msgstr "프로젝트 파일을 내보낼 수 없었습니다"
+msgstr "프로젝트 파일을 내보낼 수 없습니다."
#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
@@ -19291,9 +18891,8 @@ msgid "Code Sign Identity Release"
msgstr ""
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Method Release"
-msgstr "내보내기 모드:"
+msgstr "내보내기 모드 출시"
#: platform/iphone/export/export.cpp
msgid "Targeted Device Family"
@@ -19304,9 +18903,8 @@ msgid "Info"
msgstr ""
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Identifier"
-msgstr "잘못된 식별자:"
+msgstr "식별자"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19330,14 +18928,12 @@ msgid "Capabilities"
msgstr "속성 붙여넣기"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Access Wi-Fi"
-msgstr "성공!"
+msgstr "Wi-Fi 연결"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Push Notifications"
-msgstr "무작위 회전:"
+msgstr "푸시 알림"
#: platform/iphone/export/export.cpp
#, fuzzy
@@ -19474,19 +19070,16 @@ msgid "Run exported HTML in the system's default browser."
msgstr "내보낸 HTML을 시스템의 기본 브라우저를 사용하여 실행합니다."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not open template for export: \"%s\"."
-msgstr "내보내기 템플릿을 열 수 없음:"
+msgstr "내보내기 템플릿을 열 수 없음: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Invalid export template: \"%s\"."
-msgstr "잘못된 내보내기 템플릿:"
+msgstr "잘못된 내보내기 템플릿: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not write file: \"%s\"."
-msgstr "파일에 쓸 수 없음:"
+msgstr "파일에 쓸 수 없음: \"%s\"."
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19494,18 +19087,16 @@ msgid "Icon Creation"
msgstr "여백 설정"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file: \"%s\"."
-msgstr "파일을 읽을 수 없음:"
+msgstr "파일을 읽을 수 없음: \"%s\"."
#: platform/javascript/export/export.cpp
msgid "PWA"
msgstr ""
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Variant"
-msgstr "간격:"
+msgstr "변종"
#: platform/javascript/export/export.cpp
#, fuzzy
@@ -19577,19 +19168,16 @@ msgid "Icon 512 X 512"
msgstr ""
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell: \"%s\"."
-msgstr "HTML shell을 읽을 수 없음:"
+msgstr "HTML shell을 읽을 수 없음: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not create HTTP server directory: %s."
-msgstr "HTTP 서버 디렉토리를 만들 수 없음:"
+msgstr "HTTP 서버 디렉토리를 만들 수 없음: %s."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server: %d."
-msgstr "HTTP 서버를 시작하는 중 오류:"
+msgstr "HTTP 서버를 시작하는 중 오류: %d."
#: platform/javascript/export/export.cpp
msgid "Web"
@@ -19693,9 +19281,8 @@ msgid "Unknown object type."
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "App Category"
-msgstr "카테고리:"
+msgstr "앱 카테고리"
#: platform/osx/export/export.cpp
msgid "High Res"
@@ -19888,14 +19475,12 @@ msgid "Apple Team ID"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not open icon file \"%s\"."
-msgstr "프로젝트 파일을 내보낼 수 없었습니다"
+msgstr "아이콘 파일 \"%s\"를 열 수 없습니다."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not start xcrun executable."
-msgstr "하위 프로세스를 시작할 수 없습니다!"
+msgstr "xcrun 실행 파일을 시작하지 못했습니다."
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19953,9 +19538,8 @@ msgid "No identity found."
msgstr "아이콘을 찾을 수 없습니다."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Cannot sign file %s."
-msgstr "파일 저장 중 오류: %s"
+msgstr "파일 %s를 서명할 수 없습니다."
#: platform/osx/export/export.cpp
msgid "Relative symlinks are not supported, exported \"%s\" might be broken!"
@@ -20235,7 +19819,7 @@ msgstr "개정"
#: platform/uwp/export/export.cpp
msgid "Landscape"
-msgstr ""
+msgstr "풍경"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20374,9 +19958,8 @@ msgid "Debug Algorithm"
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"
@@ -20402,19 +19985,16 @@ msgid "File Version"
msgstr "버전"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Product Version"
-msgstr "잘못된 제품 GUID."
+msgstr "제품 버전"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Company Name"
-msgstr "노드 이름:"
+msgstr "회사 이름"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Product Name"
-msgstr "프로젝트 이름:"
+msgstr "제품 이름"
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20426,9 +20006,8 @@ msgid "Trademarks"
msgstr ""
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Resources Modification"
-msgstr "무작위 회전:"
+msgstr "리소스 변경"
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20463,9 +20042,8 @@ msgid "Could not find osslsigncode executable at \"%s\"."
msgstr "keystore를 찾을 수 없어, 내보낼 수 없었습니다."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Invalid identity type."
-msgstr "잘못된 식별자:"
+msgstr "잘못된 식별자 타입입니다."
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20485,9 +20063,8 @@ msgid "Signtool failed to sign executable: %s."
msgstr "잘못된 확장자."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Failed to remove temporary file \"%s\"."
-msgstr "임시 파일을 제거할 수 없음:"
+msgstr "임시 파일 \"%s\"를 제거하지 못했습니다."
#: platform/windows/export/export.cpp
msgid ""
@@ -20496,19 +20073,16 @@ msgid ""
msgstr ""
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Invalid icon path:"
-msgstr "잘못된 경로."
+msgstr "잘못된 아이콘 경로:"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Invalid file version:"
-msgstr "잘못된 확장자."
+msgstr "잘못된 파일 버전:"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Invalid product version:"
-msgstr "잘못된 제품 GUID."
+msgstr "잘못된 제품 버전:"
#: platform/windows/export/export.cpp
msgid "Windows executables cannot be >= 4 GiB."
@@ -20542,7 +20116,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."
@@ -20674,9 +20248,8 @@ msgstr ""
#: scene/3d/light.cpp scene/3d/reflection_probe.cpp
#: scene/3d/visibility_notifier.cpp scene/3d/visual_instance.cpp
#: scene/resources/material.cpp
-#, fuzzy
msgid "Max Distance"
-msgstr "거리 선택:"
+msgstr "최대 거리"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/light.cpp
#, fuzzy
@@ -20710,9 +20283,8 @@ 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
-#, fuzzy
msgid "Current"
-msgstr "현재:"
+msgstr "현재"
#: scene/2d/camera_2d.cpp scene/gui/graph_edit.cpp
#, fuzzy
@@ -21009,9 +20581,8 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
-#, fuzzy
msgid "Randomness"
-msgstr "임의 재시작 (초):"
+msgstr "무작위성"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21101,7 +20672,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
@@ -21502,9 +21073,8 @@ msgid "Target Desired Distance"
msgstr ""
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Path Max Distance"
-msgstr "거리 선택:"
+msgstr "경로 최대 거리"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
#, fuzzy
@@ -21530,9 +21100,8 @@ msgid "Time Horizon"
msgstr "수평으로 뒤집기"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Max Speed"
-msgstr "속도:"
+msgstr "최대 속도"
#: scene/2d/navigation_agent_2d.cpp
msgid ""
@@ -21548,7 +21117,7 @@ msgstr "도넛 외부 반지름 바꾸기"
msgid ""
"The NavigationObstacle2D only serves to provide collision avoidance to a "
"Node2D object."
-msgstr ""
+msgstr "NavigationObstacle2D는 Node2D 개체에 대한 충돌 방지 기능만 제공합니다."
#: scene/2d/navigation_polygon.cpp
msgid ""
@@ -21574,9 +21143,8 @@ msgstr "진행"
#: scene/2d/node_2d.cpp scene/2d/polygon_2d.cpp scene/3d/spatial.cpp
#: scene/main/canvas_layer.cpp
-#, fuzzy
msgid "Rotation Degrees"
-msgstr "%s도로 회전."
+msgstr "회전 각도"
#: scene/2d/node_2d.cpp scene/3d/spatial.cpp
#, fuzzy
@@ -21584,14 +21152,12 @@ msgid "Global Rotation"
msgstr "상수"
#: scene/2d/node_2d.cpp
-#, fuzzy
msgid "Global Rotation Degrees"
-msgstr "%s도로 회전."
+msgstr "전역 회전 각도"
#: scene/2d/node_2d.cpp
-#, fuzzy
msgid "Global Scale"
-msgstr "무작위 스케일:"
+msgstr "전역 스케일"
#: scene/2d/node_2d.cpp scene/3d/spatial.cpp
#, fuzzy
@@ -21609,9 +21175,8 @@ msgid "Scroll"
msgstr ""
#: scene/2d/parallax_background.cpp
-#, fuzzy
msgid "Base Offset"
-msgstr "오프셋:"
+msgstr "기본 오프셋"
#: scene/2d/parallax_background.cpp
#, fuzzy
@@ -21705,19 +21270,16 @@ msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr "PathFollow2D는 Path2D 노드의 자식 노드로 있을 때만 작동합니다."
#: scene/2d/path_2d.cpp scene/3d/path.cpp
-#, fuzzy
msgid "Unit Offset"
-msgstr "격자 오프셋:"
+msgstr "단위 오프셋"
#: scene/2d/path_2d.cpp scene/3d/camera.cpp scene/3d/path.cpp
-#, fuzzy
msgid "H Offset"
-msgstr "오프셋:"
+msgstr "가로 오프셋"
#: scene/2d/path_2d.cpp scene/3d/camera.cpp scene/3d/path.cpp
-#, fuzzy
msgid "V Offset"
-msgstr "오프셋:"
+msgstr "세로 오프셋"
#: scene/2d/path_2d.cpp scene/3d/path.cpp
msgid "Cubic Interp"
@@ -21778,9 +21340,8 @@ msgid "Mass"
msgstr ""
#: scene/2d/physics_body_2d.cpp
-#, fuzzy
msgid "Inertia"
-msgstr "수직:"
+msgstr "관성"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -21817,9 +21378,8 @@ msgid "Sleeping"
msgstr "스마트 스냅"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Can Sleep"
-msgstr "속도:"
+msgstr "슬립 가능"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Damp"
@@ -21843,9 +21403,8 @@ msgid "Safe Margin"
msgstr "여백 설정"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Sync To Physics"
-msgstr " (물리)"
+msgstr "물리에 연동"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -21865,9 +21424,8 @@ msgid "Normal"
msgstr "형식"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Remainder"
-msgstr "렌더러:"
+msgstr "나머지"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -21917,14 +21475,12 @@ msgid "Invert"
msgstr ""
#: scene/2d/polygon_2d.cpp
-#, fuzzy
msgid "Vertex Colors"
-msgstr "꼭짓점"
+msgstr "꼭짓점 색"
#: scene/2d/polygon_2d.cpp
-#, fuzzy
msgid "Internal Vertex Count"
-msgstr "내부 꼭짓점 만들기"
+msgstr "내부 꼭짓점 개수"
#: scene/2d/position_2d.cpp
#, fuzzy
@@ -22184,9 +21740,8 @@ msgid "ARVROrigin requires an ARVRCamera child node."
msgstr "ARVROrigin은 자식으로 ARVRCamera 노드가 필요합니다."
#: scene/3d/arvr_nodes.cpp servers/arvr_server.cpp
-#, fuzzy
msgid "World Scale"
-msgstr "무작위 스케일:"
+msgstr "세계 크기"
#: scene/3d/audio_stream_player_3d.cpp
#, fuzzy
@@ -22215,9 +21770,8 @@ msgid "Emission Angle"
msgstr "방출 색상"
#: scene/3d/audio_stream_player_3d.cpp
-#, fuzzy
msgid "Degrees"
-msgstr "%s도로 회전."
+msgstr "각도"
#: scene/3d/audio_stream_player_3d.cpp
#, fuzzy
@@ -22236,9 +21790,8 @@ msgstr ""
#: scene/3d/audio_stream_player_3d.cpp
#: servers/audio/effects/audio_effect_filter.cpp
-#, fuzzy
msgid "dB"
-msgstr "B"
+msgstr "dB"
#: scene/3d/audio_stream_player_3d.cpp
#, fuzzy
@@ -22299,9 +21852,8 @@ msgid "Bounce Indirect Energy"
msgstr ""
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Use Denoiser"
-msgstr "필터:"
+msgstr "노이즈 감소 사용"
#: scene/3d/baked_lightmap.cpp scene/resources/texture.cpp
msgid "Use HDR"
@@ -22328,9 +21880,8 @@ msgid "Generate"
msgstr "일반"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Max Size"
-msgstr "크기:"
+msgstr "최대 크기"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -23807,6 +23358,16 @@ msgstr "오류"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "정렬"
+
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Use AABB Center"
+msgstr "주변광 사용"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -25901,9 +25462,8 @@ msgid "Title Height"
msgstr "테스트"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Close Highlight"
-msgstr "직접 조명"
+msgstr "강조 닫기"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26162,9 +25722,8 @@ msgid "Menu"
msgstr ""
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Menu Highlight"
-msgstr "직접 조명"
+msgstr "메뉴 강조"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26688,7 +26247,7 @@ msgstr ""
#: scene/resources/environment.cpp
msgid "Bloom"
-msgstr ""
+msgstr "블룸"
#: scene/resources/environment.cpp
msgid "HDR Threshold"
@@ -26779,9 +26338,8 @@ msgid "Unshaded"
msgstr "셰이더 없음 표시"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Vertex Lighting"
-msgstr "직접 조명"
+msgstr "꼭짓점 조명"
#: scene/resources/material.cpp
#, fuzzy
@@ -26815,9 +26373,8 @@ msgid "Albedo Tex MSDF"
msgstr ""
#: scene/resources/material.cpp
-#, fuzzy
msgid "Vertex Color"
-msgstr "꼭짓점"
+msgstr "꼭짓점 색"
#: scene/resources/material.cpp
msgid "Use As Albedo"
@@ -27319,9 +26876,8 @@ msgid "Bind"
msgstr "바인딩"
#: scene/resources/skin.cpp
-#, fuzzy
msgid "Bone"
-msgstr "본"
+msgstr "뼈"
#: scene/resources/sky.cpp
#, fuzzy
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
index e89e801a9b..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 ""
@@ -12948,9 +12948,10 @@ msgstr "Žingsnis(iai):"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14343,12 +14344,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -23371,6 +23371,15 @@ msgstr "Įvyko klaida kraunant šriftą."
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Importuojama:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/lv.po b/editor/translations/lv.po
index 7234ac270a..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 ""
@@ -12808,9 +12808,10 @@ msgstr "Opcijas"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14176,12 +14177,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -23214,6 +23214,15 @@ msgstr "%s Kļūda"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Šķirot"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/mk.po b/editor/translations/mk.po
index d0be6e7036..9f06f03d81 100644
--- a/editor/translations/mk.po
+++ b/editor/translations/mk.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2022-07-23 03:57+0000\n"
+"PO-Revision-Date: 2022-10-24 12:41+0000\n"
"Last-Translator: Kristijan Fremen Velkovski <me@krisfremen.com>\n"
"Language-Team: Macedonian <https://hosted.weblate.org/projects/godot-engine/"
"godot/mk/>\n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n==1 || n%10==1 ? 0 : 1;\n"
-"X-Generator: Weblate 4.14-dev\n"
+"X-Generator: Weblate 4.14.2-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
-msgstr ""
+msgstr "Драјвер за Таблет"
#: core/bind/core_bind.cpp
msgid "Clipboard"
@@ -49,7 +49,7 @@ 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)"
@@ -186,19 +186,19 @@ msgstr "Ред за наредби"
#: core/command_queue_mt.cpp
msgid "Multithreading Queue Size (KB)"
-msgstr ""
+msgstr "Големина на редот за Мултитрединг"
#: core/func_ref.cpp modules/visual_script/visual_script_builtin_funcs.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
#: scene/resources/visual_shader_nodes.cpp
msgid "Function"
-msgstr ""
+msgstr "Функција"
#: core/image.cpp core/packed_data_container.cpp scene/2d/polygon_2d.cpp
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
msgid "Data"
-msgstr ""
+msgstr "Дата"
#: core/io/file_access_network.cpp core/register_core_types.cpp
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp main/main.cpp
@@ -206,16 +206,15 @@ msgstr ""
#: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h
#: scene/gui/file_dialog.cpp
msgid "Network"
-msgstr ""
+msgstr "Мрежа"
#: core/io/file_access_network.cpp
-#, fuzzy
msgid "Remote FS"
-msgstr "Избриши невалидни клучеви"
+msgstr "Далечен ФС"
#: core/io/file_access_network.cpp
msgid "Page Size"
-msgstr ""
+msgstr "Големина на Страница"
#: core/io/file_access_network.cpp
msgid "Page Read Ahead"
@@ -3357,7 +3356,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Enumerations"
-msgstr ""
+msgstr "Енумерации"
#: editor/editor_help.cpp
msgid "Property Descriptions"
@@ -10625,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 ""
@@ -12418,9 +12417,10 @@ msgstr "Својства на анимацијата."
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13759,12 +13759,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22313,6 +22312,14 @@ msgstr "Огледало"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr ""
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/ml.po b/editor/translations/ml.po
index 35845df066..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 ""
@@ -12440,9 +12440,10 @@ msgstr "പ്രവൃത്തികൾ:"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13783,12 +13784,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22389,6 +22389,14 @@ msgstr "കണ്ണാടി"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr ""
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/mr.po b/editor/translations/mr.po
index 6baf1dc52e..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 ""
@@ -12432,9 +12432,10 @@ msgstr "अ‍ॅनिमेशन ट्री"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13776,12 +13777,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22411,6 +22411,14 @@ msgstr "त्रुटी!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr ""
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/ms.po b/editor/translations/ms.po
index adb377d13a..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 ""
@@ -12936,9 +12936,10 @@ msgstr "Pilihan Snap"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Grid Offset:"
@@ -14318,12 +14319,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -23441,6 +23441,15 @@ msgstr "%s Ralat"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Mengimport:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index b39bc2a602..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.
@@ -18,7 +18,7 @@
# Patrick Sletvold <patricksletvold@hotmail.com>, 2021.
# Kristoffer <kskau93@gmail.com>, 2021.
# Lili Zoey <sayaks1@gmail.com>, 2021.
-# slasken06 <ask.skivdal@gmail.com>, 2021.
+# slasken06 <ask.skivdal@gmail.com>, 2021, 2022.
# Daniel Skogly <daniel@klungo.no>, 2021.
# Imre Kristoffer Eilertsen <imreeil42@gmail.com>, 2022.
# Edvard Ekrem Sæther <edvardekrem@gmail.com>, 2022.
@@ -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-03-20 03:01+0000\n"
-"Last-Translator: Changry <c@changry.no>\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.12-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -118,9 +118,8 @@ msgstr "Minimert"
#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp
#: scene/gui/graph_node.cpp
-#, fuzzy
msgid "Resizable"
-msgstr "Kan Endre Størrelse"
+msgstr "Skalerbar"
#: core/bind/core_bind.cpp core/os/input_event.cpp scene/2d/node_2d.cpp
#: scene/2d/physics_body_2d.cpp scene/2d/remote_transform_2d.cpp
@@ -230,7 +229,6 @@ msgid "Network"
msgstr "Nettverk"
#: core/io/file_access_network.cpp
-#, fuzzy
msgid "Remote FS"
msgstr "Fjernstyrt FS"
@@ -243,7 +241,6 @@ msgid "Page Read Ahead"
msgstr ""
#: core/io/http_client.cpp
-#, fuzzy
msgid "Blocking Mode Enabled"
msgstr "Blokkeringsmodus Aktivert"
@@ -252,7 +249,6 @@ msgid "Connection"
msgstr "Tilkobling"
#: core/io/http_client.cpp
-#, fuzzy
msgid "Read Chunk Size"
msgstr "Les Chunk Størrelse"
@@ -286,7 +282,7 @@ msgstr "Overføringsmodus"
#: core/io/packet_peer.cpp
msgid "Encode Buffer Max Size"
-msgstr ""
+msgstr "Enkodingsbuffer Maks Størrelse"
#: core/io/packet_peer.cpp
msgid "Input Buffer Max Size"
@@ -2285,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
@@ -2872,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:"
@@ -2902,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 ""
@@ -2988,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
@@ -3000,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"
@@ -3035,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
@@ -3052,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
@@ -3086,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"
@@ -3101,7 +3080,7 @@ msgstr "Ressursbibliotek"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
-msgstr ""
+msgstr "Scenetre redigering"
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -3119,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."
@@ -11533,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 ""
@@ -13499,9 +13478,10 @@ msgstr "Snapping innstillinger"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Avstand:"
@@ -14927,16 +14907,17 @@ msgid "Invalid project path (changed anything?)."
msgstr ""
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Kunne ikke laste project.godot i prosjektstien (feil %d). Den kan mangle "
"eller være korrupt."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Kunne ikke endre project.godot i projsektstien."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Kan ikke åpne prosjekt"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -14993,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:"
@@ -15007,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 ""
@@ -15042,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."
@@ -15055,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
@@ -15065,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?"
@@ -15174,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"
@@ -15201,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"
@@ -15229,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"
@@ -15242,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 ""
@@ -24341,6 +24311,15 @@ msgstr "Feil!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Sortering"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index 9410069ae4..0e47306f0d 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -65,7 +65,7 @@ msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-08-30 03:11+0000\n"
+"PO-Revision-Date: 2022-09-23 04:16+0000\n"
"Last-Translator: Nnn <irri2020@outlook.com>\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/"
"nl/>\n"
@@ -74,7 +74,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-dev\n"
+"X-Generator: Weblate 4.14.1\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -249,9 +249,8 @@ msgstr ""
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Function"
-msgstr "Functies"
+msgstr "Functie"
#: core/image.cpp core/packed_data_container.cpp scene/2d/polygon_2d.cpp
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
@@ -263,14 +262,12 @@ msgstr ""
#: 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 "Netwerk Profiler"
+msgstr "Netwerk"
#: core/io/file_access_network.cpp
-#, fuzzy
msgid "Remote FS"
-msgstr "Remote "
+msgstr "Remote"
#: core/io/file_access_network.cpp
msgid "Page Size"
@@ -293,14 +290,12 @@ msgid "Read Chunk Size"
msgstr ""
#: core/io/marshalls.cpp
-#, fuzzy
msgid "Object ID"
-msgstr "Objecten Getekend"
+msgstr "Object ID"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
-#, fuzzy
msgid "Allow Object Decoding"
-msgstr "\"Onion Skinning\" Inschakelen"
+msgstr "Object Decoding Toestaan"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
msgid "Refuse New Network Connections"
@@ -317,9 +312,8 @@ msgid "Root Node"
msgstr "Wortelknoopnaam"
#: core/io/networked_multiplayer_peer.cpp
-#, fuzzy
msgid "Refuse New Connections"
-msgstr "Verbinden"
+msgstr "Nieuwe Verbindingen Weigeren"
#: core/io/networked_multiplayer_peer.cpp
#, fuzzy
@@ -411,7 +405,6 @@ msgid "Seed"
msgstr ""
#: core/math/random_number_generator.cpp
-#, fuzzy
msgid "State"
msgstr "Status"
@@ -424,9 +417,8 @@ msgid "Max Size (KB)"
msgstr ""
#: core/os/input.cpp
-#, fuzzy
msgid "Mouse Mode"
-msgstr "Verplaatsingsmodus"
+msgstr "Muismodus"
#: core/os/input.cpp
#, fuzzy
@@ -457,21 +449,18 @@ msgid "Meta"
msgstr ""
#: core/os/input_event.cpp
-#, fuzzy
msgid "Command"
-msgstr "Gemeenschap"
+msgstr "Commando"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Physical"
-msgstr "Physics Frame %"
+msgstr "Fysiek"
#: core/os/input_event.cpp scene/2d/touch_screen_button.cpp
#: scene/gui/base_button.cpp scene/gui/texture_button.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Pressed"
-msgstr "Voorinstellingen"
+msgstr "Gedrukt"
#: core/os/input_event.cpp
msgid "Scancode"
@@ -490,24 +479,20 @@ msgid "Echo"
msgstr ""
#: core/os/input_event.cpp scene/gui/base_button.cpp
-#, fuzzy
msgid "Button Mask"
-msgstr "Button (Knop)"
+msgstr "Knop Masker"
#: core/os/input_event.cpp scene/2d/node_2d.cpp scene/gui/control.cpp
-#, fuzzy
msgid "Global Position"
-msgstr "Constante"
+msgstr "Globale Positie"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Factor"
-msgstr "Vector"
+msgstr "Factor"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Button Index"
-msgstr "Muis Knop Index:"
+msgstr "Knop Index"
#: core/os/input_event.cpp
msgid "Doubleclick"
@@ -518,26 +503,23 @@ msgid "Tilt"
msgstr ""
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pressure"
-msgstr "Voorinstellingen"
+msgstr "Druk"
#: core/os/input_event.cpp
msgid "Pen Inverted"
msgstr ""
#: core/os/input_event.cpp
-#, fuzzy
msgid "Relative"
-msgstr "Relatief kleven"
+msgstr "Relatief"
#: 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
#: scene/animation/animation_player.cpp scene/resources/environment.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Speed"
-msgstr "Snelheid:"
+msgstr "Snelheid"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: scene/3d/sprite_3d.cpp
@@ -545,14 +527,12 @@ msgid "Axis"
msgstr "As"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Axis Value"
-msgstr "Waarde vastzetten"
+msgstr "As Waarde"
#: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Index"
-msgstr "Index:"
+msgstr "Index"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: modules/visual_script/visual_script_nodes.cpp
@@ -570,14 +550,12 @@ msgid "Delta"
msgstr ""
#: core/os/input_event.cpp
-#, fuzzy
msgid "Channel"
-msgstr "Wijzig"
+msgstr "Kanaal"
#: core/os/input_event.cpp main/main.cpp
-#, fuzzy
msgid "Message"
-msgstr "Commit veranderingen"
+msgstr "Bericht"
#: core/os/input_event.cpp
#, fuzzy
@@ -587,18 +565,16 @@ msgstr "Pitch"
#: 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 "Initialiseren"
+msgstr "Versnelling"
#: core/os/input_event.cpp
msgid "Instrument"
msgstr ""
#: core/os/input_event.cpp
-#, fuzzy
msgid "Controller Number"
-msgstr "Regelnummer:"
+msgstr "Controller Nummer"
#: core/os/input_event.cpp
msgid "Controller Value"
@@ -607,14 +583,12 @@ msgstr ""
#: 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 "Actie"
+msgstr "Applicatie"
#: core/project_settings.cpp main/main.cpp
-#, fuzzy
msgid "Config"
-msgstr "Kleven instellen"
+msgstr "Configuratie"
#: core/project_settings.cpp
#, fuzzy
@@ -653,14 +627,12 @@ msgid "Main Scene"
msgstr "Startscène"
#: core/project_settings.cpp
-#, fuzzy
msgid "Disable stdout"
-msgstr "Autotile uitschakelen"
+msgstr "Stdout Uitschakelen"
#: core/project_settings.cpp
-#, fuzzy
msgid "Disable stderr"
-msgstr "Item Uitschakelen"
+msgstr "Stderr Uitschakelen"
#: core/project_settings.cpp
msgid "Use Hidden Project Data Directory"
@@ -677,9 +649,8 @@ 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 "Alles tonen"
+msgstr "Tonen"
#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp
#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp
@@ -693,23 +664,20 @@ msgstr ""
#: scene/resources/capsule_shape_2d.cpp scene/resources/cylinder_shape.cpp
#: scene/resources/font.cpp scene/resources/navigation_mesh.cpp
#: scene/resources/primitive_meshes.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Height"
-msgstr "Licht"
+msgstr "Hoogte"
#: core/project_settings.cpp
msgid "Always On Top"
msgstr ""
#: core/project_settings.cpp
-#, fuzzy
msgid "Test Width"
-msgstr "Linkerbreedte"
+msgstr "Test Breedte"
#: core/project_settings.cpp
-#, fuzzy
msgid "Test Height"
-msgstr "Testen"
+msgstr "Test Hoogte"
#: core/project_settings.cpp editor/animation_track_editor.cpp
#: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp
@@ -752,58 +720,49 @@ msgid "Version Control Autoload On Startup"
msgstr "Versiebeheersysteem"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Plugin Name"
-msgstr "Versiebeheer"
+msgstr "Versiebeheer Controle Plugin Naam"
#: core/project_settings.cpp scene/2d/collision_object_2d.cpp
#: scene/3d/collision_object.cpp scene/gui/control.cpp
-#, fuzzy
msgid "Input"
-msgstr "Voeg invoer toe"
+msgstr "Invoer"
#: core/project_settings.cpp
msgid "UI Accept"
msgstr ""
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Select"
-msgstr "Selecteer"
+msgstr "UI Selecteer"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Cancel"
-msgstr "Annuleer"
+msgstr "UI Annuleer"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Focus Next"
-msgstr "Focus Pad"
+msgstr "UI Focus Volgende"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Focus Prev"
-msgstr "Focus Pad"
+msgstr "UI Focus Vorige"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Left"
-msgstr "Linksboven"
+msgstr "UI Links"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Right"
-msgstr "Rechtsboves"
+msgstr "UI Rechts"
#: core/project_settings.cpp
msgid "UI Up"
msgstr ""
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Down"
-msgstr "Omlaag"
+msgstr "UI Omlaag"
#: core/project_settings.cpp
#, fuzzy
@@ -11368,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 ""
@@ -13302,9 +13261,10 @@ msgstr "Kleefinstellingen"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Afstand:"
@@ -14772,16 +14732,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Ongeldig projectpad (iets veranderd?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Kan project.godot in project pad niet laden (error %d). Mogelijk is het "
"bestand niet aanwezig of corrupt."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Kan project.godot niet bewerken in projectpad."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Kan project niet openen op '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -24318,6 +24279,15 @@ msgstr "Fout"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Sorteren"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index 7b7e680cff..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,17 +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-08-17 18:20+0000\n"
-"Last-Translator: Patryk Morawski <gormit7@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"
@@ -79,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.14-dev\n"
+"X-Generator: Weblate 4.15.1\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -99,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"
@@ -107,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"
@@ -902,9 +908,8 @@ msgid "Connect Timeout Seconds"
msgstr "Sekundowy limit czasu połączenia"
#: core/register_core_types.cpp
-#, fuzzy
msgid "Packet Peer Stream"
-msgstr "Strumień członków pakietów"
+msgstr "Strumień pakietów równorzędnych"
#: core/register_core_types.cpp
msgid "Max Buffer (Power of 2)"
@@ -1159,9 +1164,8 @@ msgstr "Animacja Wywołanie funkcji"
#: editor/animation_track_editor.cpp scene/2d/animated_sprite.cpp
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Frame"
-msgstr "Klatka %"
+msgstr "Klatka"
#: editor/animation_track_editor.cpp editor/editor_profiler.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
@@ -1172,16 +1176,14 @@ msgstr "Czas"
#: editor/animation_track_editor.cpp editor/import/resource_importer_scene.cpp
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Location"
msgstr "Lokalizacja"
#: editor/animation_track_editor.cpp modules/gltf/gltf_node.cpp
#: scene/2d/polygon_2d.cpp scene/2d/remote_transform_2d.cpp
#: scene/3d/remote_transform.cpp scene/3d/spatial.cpp scene/gui/control.cpp
-#, fuzzy
msgid "Rotation"
-msgstr "Krok obrotu:"
+msgstr "Obrót"
#: editor/animation_track_editor.cpp editor/script_editor_debugger.cpp
#: modules/visual_script/visual_script_nodes.cpp scene/gui/range.cpp
@@ -1189,9 +1191,8 @@ msgid "Value"
msgstr "Wartość"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Arg Count"
-msgstr "Ilośc:"
+msgstr "Liczba argumentów"
#: editor/animation_track_editor.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
@@ -1206,14 +1207,12 @@ msgid "Type"
msgstr "Typ"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "In Handle"
-msgstr "Ustaw uchwyt"
+msgstr "Uchwyt wejściowy"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Out Handle"
-msgstr "Ustaw uchwyt"
+msgstr "Uchwyt wyjściowy"
#: editor/animation_track_editor.cpp
#: editor/import/resource_importer_texture.cpp
@@ -1223,14 +1222,12 @@ msgid "Stream"
msgstr "Strumień"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Start Offset"
-msgstr "Offset siatki:"
+msgstr "Rozpocznij przesunięcie"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "End Offset"
-msgstr "Przesunięcie:"
+msgstr "Koniec przesunięcia"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/import/resource_importer_scene.cpp
@@ -1243,9 +1240,8 @@ msgid "Animation"
msgstr "Animacja"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Easing"
-msgstr "Łagodne wejście-wyjście"
+msgstr "Wygładzanie"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
@@ -1354,19 +1350,16 @@ msgid "Remove this track."
msgstr "Usuń tę ścieżkę."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Time (s):"
-msgstr "Czas (s): "
+msgstr "Czas (s):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Position:"
-msgstr "Pozycja"
+msgstr "Pozycja:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Rotation:"
-msgstr "Krok obrotu:"
+msgstr "Obrót:"
#: editor/animation_track_editor.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -1383,44 +1376,36 @@ msgid "Type:"
msgstr "Typ:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "(Invalid, expected type: %s)"
-msgstr "Szablon eksportu nieprawidłowy:"
+msgstr "(Nieprawidłowy, oczekiwano typ: %s)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Easing:"
-msgstr "Łagodne wejście-wyjście"
+msgstr "Łagodne wejście-wyjście:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "In-Handle:"
-msgstr "Ustaw uchwyt"
+msgstr "Uchwyt wew.:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Out-Handle:"
-msgstr "Ustaw uchwyt"
+msgstr "Uchwyt zew.:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Stream:"
-msgstr "Członek transmisji"
+msgstr "Strumień:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Start (s):"
-msgstr "Restart(y):"
+msgstr "Start (s):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "End (s):"
-msgstr "Zanikanie w (s):"
+msgstr "Koniec (s):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Clip:"
-msgstr "Animacje:"
+msgstr "Animacja:"
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
@@ -1634,9 +1619,8 @@ msgid "Add Method Track Key"
msgstr "Dodaj klucz ścieżki metody"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Method not found in object:"
-msgstr "Metoda nie znaleziona w obiekcie: "
+msgstr "Metoda nie znaleziona w obiekcie:"
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
@@ -2601,9 +2585,8 @@ msgid "There is no '%s' file."
msgstr "Nie ma pliku \"%s\"."
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Layout:"
-msgstr "Układ"
+msgstr "Układ:"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -2809,19 +2792,16 @@ msgid "Project export for platform:"
msgstr "Eksportowanie projektu dla platformy:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed with warnings."
-msgstr "Skopiuj ścieżkę węzła"
+msgstr "Ukończone z ostrzeżeniami."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed successfully."
-msgstr "Pakiet zainstalowano poprawnie!"
+msgstr "Zakończono pomyślnie."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed."
-msgstr "Nie powiodło się:"
+msgstr "Nie powiodło się."
#: editor/editor_export.cpp
msgid "Storing File:"
@@ -2844,19 +2824,16 @@ msgid "Cannot create file \"%s\"."
msgstr "Nie można utworzyć pliku \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to export project files."
-msgstr "Nie udało się eksportować plików projektu"
+msgstr "Eksportowanie plików projektu nie powiodło się."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Can't open file to read from path \"%s\"."
msgstr "Nie można otworzyć pliku do zapisu:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Save ZIP"
-msgstr "Zapisz jako"
+msgstr "Zapisz plik ZIP"
#: editor/editor_export.cpp
msgid ""
@@ -2929,9 +2906,8 @@ msgid "Release"
msgstr "Wydanie"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Binary Format"
-msgstr "Operator koloru."
+msgstr "Format binarny"
#: editor/editor_export.cpp
msgid "64 Bits"
@@ -2942,9 +2918,8 @@ msgid "Embed PCK"
msgstr "Osadź PCK"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Texture Format"
-msgstr "Obszar tekstury"
+msgstr "Format tekstury"
#: editor/editor_export.cpp
msgid "BPTC"
@@ -2955,19 +2930,16 @@ msgid "S3TC"
msgstr "S3TC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "ETC"
-msgstr "TCP"
+msgstr "ETC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "ETC2"
msgstr "ETC2"
#: editor/editor_export.cpp
-#, fuzzy
msgid "No BPTC Fallbacks"
-msgstr "Fallback"
+msgstr "Brak fallbacków BPTC"
#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
@@ -2982,30 +2954,25 @@ msgid "Custom release template not found."
msgstr "Nie znaleziono własnego szablonu wydania."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Prepare Template"
-msgstr "Zarządzaj szablonami"
+msgstr "Przygotuj szablon"
#: editor/editor_export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "The given export path doesn't exist."
-msgstr "Podana ścieżka eksportu nie istnieje:"
+msgstr "Podana ścieżka eksportu nie istnieje."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found: \"%s\"."
-msgstr "Nie znaleziono pliku szablonu:"
+msgstr "Nie znaleziono pliku szablonu: \"%s\"."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Failed to copy export template."
-msgstr "Szablon eksportu nieprawidłowy:"
+msgstr "Kopiowanie szablonu eksportu nie powiodło się."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
-#, fuzzy
msgid "PCK Embedding"
-msgstr "Wyrównanie"
+msgstr "Osadzanie plików PCK"
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
@@ -3218,9 +3185,8 @@ msgid "Manage Editor Feature Profiles"
msgstr "Zarządzaj profilami funkcjonalności edytora"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Default Feature Profile"
-msgstr "Profil funkcjonalności Godota"
+msgstr "Profil domyślnych funkcji"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select Current Folder"
@@ -3292,14 +3258,12 @@ msgid "Save a File"
msgstr "Zapisz plik"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Access"
-msgstr "Sukces!"
+msgstr "Dostęp"
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Display Mode"
-msgstr "Tryb odtwarzania:"
+msgstr "Tryb wyświetlania"
#: editor/editor_file_dialog.cpp
#: editor/import/resource_importer_layered_texture.cpp
@@ -3312,30 +3276,25 @@ msgstr "Tryb odtwarzania:"
#: scene/resources/environment.cpp scene/resources/material.cpp
#: scene/resources/visual_shader.cpp
#: servers/audio/effects/audio_effect_distortion.cpp
-#, fuzzy
msgid "Mode"
-msgstr "Tryb przesuwania"
+msgstr "Tryb"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Current Dir"
-msgstr "Bieżący:"
+msgstr "Bieżący katalog"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Current File"
-msgstr "Bieżący profil:"
+msgstr "Bieżący Plik"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Current Path"
-msgstr "Bieżący:"
+msgstr "Bieżąca ścieżka"
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp
#: scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Show Hidden Files"
-msgstr "Przełącz ukryte pliki"
+msgstr "Pokaż ukryte pliki"
#: editor/editor_file_dialog.cpp
msgid "Disable Overwrite Warning"
@@ -3439,7 +3398,6 @@ msgid "(Re)Importing Assets"
msgstr "(Ponowne) importowanie zasobów"
#: editor/editor_file_system.cpp
-#, fuzzy
msgid "Reimport Missing Imported Files"
msgstr "Zaimportuj ponownie brakujące importowane pliki"
@@ -3632,36 +3590,30 @@ msgid "Property:"
msgstr "Właściwość:"
#: editor/editor_inspector.cpp editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Label"
-msgstr "Wartość"
+msgstr "Etykieta"
#: editor/editor_inspector.cpp editor/editor_spin_slider.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Read Only"
-msgstr "Tylko metody"
+msgstr "Tylko do odczytu"
#: editor/editor_inspector.cpp editor/plugins/item_list_editor_plugin.cpp
-#, fuzzy
msgid "Checkable"
-msgstr "Element wyboru"
+msgstr "Zaznaczalne"
#: editor/editor_inspector.cpp editor/plugins/item_list_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Checked"
-msgstr "Zaznaczony element wyboru"
+msgstr "Sprawdzone"
#: editor/editor_inspector.cpp
-#, fuzzy
msgid "Draw Red"
-msgstr "Wywołania rysowania:"
+msgstr "Rysuj czerwony"
#: editor/editor_inspector.cpp
-#, fuzzy
msgid "Keying"
-msgstr "Uruchom"
+msgstr "Kluczowanie"
#: editor/editor_inspector.cpp
msgid "Pin value"
@@ -4024,14 +3976,12 @@ msgid "Quick Open Script..."
msgstr "Szybkie otwieranie skryptu..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save & Reload"
msgstr "Zapisz i zrestartuj"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save changes to '%s' before reloading?"
-msgstr "Zapisać zmiany w \"%s\" przed zamknięciem?"
+msgstr "Zapisać zmiany w '%s' przed zrestartowaniem?"
#: editor/editor_node.cpp
msgid "Save & Close"
@@ -4150,9 +4100,8 @@ msgid "Open Project Manager?"
msgstr "Otworzyć menadżera projektów?"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save changes to the following scene(s) before reloading?"
-msgstr "Czy zapisać zmiany w aktualnej scenie/scenach przed wyjściem?"
+msgstr "Czy zapisać zmiany w aktualnej scenie/scenach przed zrestartowaniem?"
#: editor/editor_node.cpp
msgid "Save & Quit"
@@ -4343,24 +4292,20 @@ msgstr ""
#: editor/editor_node.cpp editor/editor_settings.cpp editor/scene_tree_dock.cpp
#: servers/arvr/arvr_interface.cpp
-#, fuzzy
msgid "Interface"
-msgstr "Interfejs użytkownika"
+msgstr "Interfejs"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Scene Tabs"
-msgstr "Przełącz zakładkę sceny"
+msgstr "Zakładki scen"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Always Show Close Button"
-msgstr "Zawsze pokazuj siatkę"
+msgstr "Zawsze pokazuj przycisk wyjścia"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Resize If Many Tabs"
-msgstr "Zmień rozmiar jeśli wyświetlonych jest wiele zakładek"
+msgstr "Rozszerz rozmiar jeżeli jest wiele zakładek"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Minimum Width"
@@ -4371,9 +4316,8 @@ msgid "Output"
msgstr "Konsola"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Always Clear Output On Play"
-msgstr "Wyczyść wyjście"
+msgstr "Zawsze wyczyszczaj wyjście gdy włączono grę"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Always Open Output On Play"
@@ -4388,41 +4332,34 @@ msgid "Save On Focus Loss"
msgstr "Zapisz przy utracie skupienia"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Save Each Scene On Quit"
-msgstr "Zapisz gałąź jako scenę"
+msgstr "Zapisz każdą scenę przed wyjściem"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Quit Confirmation"
-msgstr "Wyświetlaj informacje"
+msgstr "Potwierdzenie wyjścia"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Show Update Spinner"
-msgstr "Ukryj wiatraczek aktualizacji"
+msgstr "Pokaż suwak aktualizacji"
#: editor/editor_node.cpp
msgid "Update Continuously"
msgstr "Aktualizuj ciągle"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Update Vital Only"
-msgstr "Zaktualizuj istotne zmiany"
+msgstr "Aktualizuj tylko istotne"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Localize Settings"
-msgstr "Lokalizacja"
+msgstr "Lokalizuj ustawienia"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Restore Scenes On Load"
-msgstr "Pozyskaj węzeł sceny"
+msgstr "Przywracaj sceny po załadowaniu"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Show Thumbnail On Hover"
msgstr "Pokaż miniaturę po najechaniu kursorem"
@@ -4431,18 +4368,16 @@ msgid "Inspector"
msgstr "Inspektor"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Default Property Name Style"
-msgstr "Ścieżka do projektu:"
+msgstr "Domyślny styl nazw właściwości"
#: editor/editor_node.cpp
msgid "Default Float Step"
msgstr "Domyślny krok zmiennoprzecinkowy"
#: editor/editor_node.cpp scene/gui/tree.cpp
-#, fuzzy
msgid "Disable Folding"
-msgstr "Wyłączony przycisk"
+msgstr "Wyłącz zwijanie"
#: editor/editor_node.cpp
msgid "Auto Unfold Foreign Scenes"
@@ -4457,19 +4392,16 @@ msgid "Horizontal Vector Types Editing"
msgstr "Edycja poziomych typów wektorów"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Resources In Current Inspector"
-msgstr "Otwórz w inspektorze"
+msgstr "Otwórz zasoby w aktualnym inspektorze"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Resources To Open In New Inspector"
-msgstr "Otwórz w inspektorze"
+msgstr "Zasoby do otwarcia w nowym inspektorze"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Default Color Picker Mode"
-msgstr "Domyślny tryb pipety"
+msgstr "Domyślny tryb pobieracza kolorów"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Version Control"
@@ -4477,7 +4409,7 @@ msgstr "Kontrola wersji"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "Username"
-msgstr "Użytkownik"
+msgstr "Nazwa użytkownika"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Public Key Path"
@@ -5121,14 +5053,12 @@ msgid "Debugger"
msgstr "Debugger"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Profiler Frame History Size"
msgstr "Rozmiar historii klatek profilera"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Profiler Frame Max Functions"
-msgstr "Zmień nazwę funkcji"
+msgstr "Maksymalna ilość funkcji klatki profilera"
#: editor/editor_properties.cpp
msgid "Edit Text:"
@@ -5197,9 +5127,8 @@ msgid "Size:"
msgstr "Rozmiar:"
#: editor/editor_properties_array_dict.cpp
-#, fuzzy
msgid "Page:"
-msgstr "Strona: "
+msgstr "Strona:"
#: editor/editor_properties_array_dict.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -5261,20 +5190,17 @@ msgstr "Nowy %s"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "Base Type"
-msgstr "Zmień typ podstawowy"
+msgstr "Typ bazowy"
#: editor/editor_resource_picker.cpp
-#, fuzzy
msgid "Edited Resource"
-msgstr "Dodaj Zasób"
+msgstr "Edytowany zasób"
#: editor/editor_resource_picker.cpp scene/gui/line_edit.cpp
#: scene/gui/slider.cpp scene/gui/spin_box.cpp
-#, fuzzy
msgid "Editable"
-msgstr "Edytowalny element"
+msgstr "Edytowalny"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "New Script"
@@ -5285,9 +5211,8 @@ msgid "Extend Script"
msgstr "Rozszerz skrypt"
#: editor/editor_resource_picker.cpp
-#, fuzzy
msgid "Script Owner"
-msgstr "Nazwa skryptu:"
+msgstr "Właściciel skryptu"
#: editor/editor_run_native.cpp
msgid ""
@@ -5300,9 +5225,8 @@ msgstr ""
"jako uruchamialny."
#: editor/editor_run_native.cpp
-#, fuzzy
msgid "Project Run"
-msgstr "Projekt"
+msgstr "Uruchom projekt"
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
@@ -5329,14 +5253,12 @@ msgid "Did you forget the '_run' method?"
msgstr "Zapomniano metody \"_run\"?"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Editor Language"
-msgstr "Układ edytora"
+msgstr "Język edytora"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Display Scale"
-msgstr "Pokaż wszystko"
+msgstr "Rozmiar wyświetlania"
#: editor/editor_settings.cpp
msgid "Custom Display Scale"
@@ -5359,21 +5281,18 @@ msgid "Font Hinting"
msgstr "Czcionka podpowiedzi"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Main Font"
-msgstr "Scena główna"
+msgstr "Główna czcionka"
#: editor/editor_settings.cpp
msgid "Main Font Bold"
msgstr "Główna czcionka pogrubiona"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Code Font"
-msgstr "Dodaj punkt węzła"
+msgstr "Czcionka kodu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Dim Editor On Dialog Popup"
msgstr "Przygaś edytor przy wyskakującym oknie"
@@ -5386,9 +5305,8 @@ msgid "Unfocused Low Processor Mode Sleep (µsec)"
msgstr "Nieskoncentrowany tryb uśpienia w trybie niskiego procesora (µsec)"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Separate Distraction Mode"
-msgstr "Tryb bez rozproszeń"
+msgstr "Oddzielny tryb bez rozproszeń"
#: editor/editor_settings.cpp
msgid "Automatically Open Screenshots"
@@ -5413,14 +5331,12 @@ msgid "Icon And Font Color"
msgstr "Kolor ikony i czcionki"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Base Color"
-msgstr "Kolory"
+msgstr "Kolor podstawowy"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Accent Color"
-msgstr "Wybierz Kolor"
+msgstr "Kolor akcentu"
#: editor/editor_settings.cpp scene/resources/environment.cpp
msgid "Contrast"
@@ -5431,109 +5347,92 @@ msgid "Relationship Line Opacity"
msgstr "Przezroczystość linii relacji"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Highlight Tabs"
-msgstr "Zapisywanie map światła"
+msgstr "Podświetl zakładki"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Border Size"
-msgstr "Brzegowe piksele"
+msgstr "Rozmiar obwódki"
#: editor/editor_settings.cpp
msgid "Use Graph Node Headers"
msgstr "Użyj wykresu nagłówków węzłów"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Additional Spacing"
-msgstr "Zapętlenie animacji"
+msgstr "Dodatkowe odstępy"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Custom Theme"
-msgstr "Motyw edytora"
+msgstr "Własny motyw"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Script Button"
-msgstr "Kółko w prawo"
+msgstr "Pokaż przycisk skryptu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Directories"
-msgstr "Kierunki"
+msgstr "Katalogi"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Autoscan Project Path"
-msgstr "Ścieżka do projektu:"
+msgstr "Automatycznie skanuj ścieżkę projektu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Project Path"
-msgstr "Ścieżka do projektu:"
+msgstr "Domyślna ścieżka projektu"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "On Save"
-msgstr "Zapisz"
+msgstr "Przy zapisie"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Compress Binary Resources"
-msgstr "Kopiuj zasób"
+msgstr "Skompresuj binarne zasoby"
#: editor/editor_settings.cpp
msgid "Safe Save On Backup Then Rename"
msgstr "Bezpieczne zapisywanie kopii zapasowej, a następnie zmiana nazwy"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "File Dialog"
-msgstr "Okno dialogowe XForm"
+msgstr "Dialog plików"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Thumbnail Size"
-msgstr "Miniatura..."
+msgstr "Rozmiar miniaturki"
#: editor/editor_settings.cpp
msgid "Docks"
msgstr "Doki"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Scene Tree"
-msgstr "Pozyskaj drzewo sceny"
+msgstr "Drzewo sceny"
#: editor/editor_settings.cpp
msgid "Start Create Dialog Fully Expanded"
msgstr "Rozpocznij tworzenie w pełni rozwiniętego okna dialogowego"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Always Show Folders"
-msgstr "Zawsze pokazuj siatkę"
+msgstr "Zawsze pokazuj foldery"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Property Editor"
-msgstr "Edytor grup"
+msgstr "Edytor właściwości"
#: editor/editor_settings.cpp
msgid "Auto Refresh Interval"
msgstr "Czas między automatycznym odświeżaniem"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Subresource Hue Tint"
-msgstr "Zasoby"
+msgstr "Odcień barwy zasobów podrzędnych"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Color Theme"
-msgstr "Motyw edytora"
+msgstr "Motyw koloru"
#: editor/editor_settings.cpp scene/3d/label_3d.cpp
#: scene/resources/default_theme/default_theme.cpp
@@ -5542,14 +5441,12 @@ msgstr "Odstępy między liniami"
#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp
#: modules/gdscript/editor/gdscript_highlighter.cpp
-#, fuzzy
msgid "Highlighting"
-msgstr "Oświetlenie bezpośrednie"
+msgstr "Podświetlanie"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Syntax Highlighting"
-msgstr "Podświetlacz składni"
+msgstr "Podświetlanie składni"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "Highlight All Occurrences"
@@ -5564,28 +5461,24 @@ msgid "Highlight Type Safe Lines"
msgstr "Wyróżnij typy bezpiecznych linii"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Indent"
-msgstr "Wcięcie w lewo"
+msgstr "Wcięcie"
#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
msgstr "Automatyczne wcięcie"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Convert Indent On Save"
-msgstr "Zamień wcięcia na spacje"
+msgstr "Zamień wcięcia przy zapisie"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Draw Tabs"
-msgstr "Wywołania rysowania:"
+msgstr "Rysuj taby"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Draw Spaces"
-msgstr "Wywołania rysowania:"
+msgstr "Rysuj spacje"
#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/tile_map.cpp
@@ -5603,9 +5496,8 @@ msgid "V Scroll Speed"
msgstr "Pionowa szybkość przewijania"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Minimap"
-msgstr "Pokaż pozycję początkową"
+msgstr "Pokaż minimapę"
#: editor/editor_settings.cpp
msgid "Minimap Width"
@@ -5616,9 +5508,8 @@ msgid "Mouse Extra Buttons Navigate History"
msgstr "Historia nawigacji dodatkowych przycisków myszy"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Drag And Drop Selection"
-msgstr "Wybór GridMap"
+msgstr "Przeciągnij i upuść zaznaczenie"
#: editor/editor_settings.cpp
msgid "Stay In Script Editor On Node Selected"
@@ -5629,23 +5520,20 @@ msgid "Appearance"
msgstr "Wygląd"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Show Line Numbers"
-msgstr "Numer linii:"
+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"
@@ -5669,51 +5557,47 @@ msgstr "Wytyczne dotyczące długości linii miękkiej kolumny"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Hard Column"
-msgstr ""
+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"
-msgstr ""
+msgstr "Pokaż podgląd członków"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Files"
-msgstr "Plik"
+msgstr "Pliki"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Trim Trailing Whitespace On Save"
-msgstr "Przytnij końcowe białe znaki"
+msgstr "Przytnij końcowe białe znaki przy zapisie"
#: editor/editor_settings.cpp
msgid "Autosave Interval Secs"
-msgstr ""
+msgstr "czas autozapisu sek"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
msgid "Restore Scripts On Load"
-msgstr ""
+msgstr "Przywróć skrypty przy załadowaniu"
#: editor/editor_settings.cpp
msgid "Auto Reload And Parse Scripts On Save"
-msgstr ""
+msgstr "Automatycznie przeładuj i zanalizuj skrypty przy zapisie"
#: editor/editor_settings.cpp
msgid "Auto Reload Scripts On External Change"
-msgstr ""
+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"
-msgstr ""
+msgstr "Posortuj szkic członków alfabetycznie"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Cursor"
@@ -5721,24 +5605,23 @@ msgstr "Kursor"
#: editor/editor_settings.cpp
msgid "Scroll Past End Of File"
-msgstr ""
+msgstr "Przewijaj za koniec pliku"
#: editor/editor_settings.cpp
msgid "Block Caret"
-msgstr ""
+msgstr "Zablokuj Karete"
#: editor/editor_settings.cpp
msgid "Caret Blink"
-msgstr ""
+msgstr "Mignięcie karety"
#: editor/editor_settings.cpp
msgid "Caret Blink Speed"
-msgstr ""
+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
@@ -5748,68 +5631,63 @@ msgstr "Ukończenie"
#: editor/editor_settings.cpp
msgid "Idle Parse Delay"
-msgstr ""
+msgstr "Opóźnienie interpretacji"
#: editor/editor_settings.cpp
msgid "Auto Brace Complete"
-msgstr ""
+msgstr "Automatyczne zamykanie nawiasów"
#: editor/editor_settings.cpp
msgid "Code Complete Delay"
-msgstr ""
+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"
@@ -5820,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
@@ -5857,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"
@@ -6134,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
@@ -6205,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."
@@ -6378,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"
@@ -6676,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
@@ -7049,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
@@ -7093,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
@@ -7125,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"
@@ -7213,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
@@ -7321,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
@@ -7371,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..."
@@ -7406,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
@@ -7443,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
@@ -7550,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"
@@ -7636,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"
@@ -8201,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..."
@@ -8394,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:"
@@ -8533,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:"
@@ -8661,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!"
@@ -8698,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"
@@ -8767,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"
@@ -8826,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:"
@@ -9333,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
@@ -9701,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
@@ -9729,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"
@@ -9972,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"
@@ -9997,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)."
@@ -10172,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."
@@ -10530,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!"
@@ -10861,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"
@@ -11231,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]"
@@ -11273,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."
@@ -11429,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"
@@ -11730,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"
@@ -11791,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."
@@ -11824,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"
@@ -11899,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:"
@@ -12201,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 ""
@@ -13095,9 +12815,10 @@ msgstr "Opcje przyciągania"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Przesunięcie:"
@@ -14534,16 +14255,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Niepoprawna ścieżka projektu (zmienić cokolwiek?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Nie udało się wczytać project.godot w ścieżce projektu (błąd %d). Może go "
"brakować lub być uszkodzony."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Nie można było edytować engine.cfg w ścieżce projektu."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Nie można otworzyć projektu w \"%s\"."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -16592,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
@@ -16611,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"
@@ -16623,7 +16345,7 @@ msgstr "iOS"
#: main/main.cpp
msgid "Hide Home Indicator"
-msgstr ""
+msgstr "Ukryj wskaźnik powitalny"
#: main/main.cpp
#, fuzzy
@@ -16637,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
@@ -16666,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"
@@ -16710,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
@@ -16741,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
@@ -16765,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
@@ -16788,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"
@@ -16825,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
@@ -16863,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
@@ -16873,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"
@@ -16908,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"
@@ -16921,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
@@ -16932,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
@@ -17074,7 +16770,7 @@ msgstr "Dodaj pole architektury"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "GDNativeLibrary"
-msgstr "GDNativeLibrary"
+msgstr "Natywna biblioteka GD"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Enabled GDNative Singleton"
@@ -17157,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)"
@@ -17170,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."
@@ -17399,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
@@ -17502,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"
@@ -17532,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
@@ -17569,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"
@@ -17731,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"
@@ -17755,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
@@ -17779,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"
@@ -17798,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
@@ -17813,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"
@@ -17886,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"
@@ -17932,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"
@@ -18012,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
@@ -18142,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"
@@ -18199,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"
@@ -18383,7 +18062,7 @@ msgstr "Iterator"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "for (elem) in (input):"
-msgstr "for (element) in (wejście):"
+msgstr "dla (elementu) w (input)"
#: modules/visual_script/visual_script_flow_control.cpp
#, fuzzy
@@ -18555,9 +18234,8 @@ msgstr "Utwórz Tablicę"
#: modules/visual_script/visual_script_nodes.cpp scene/resources/material.cpp
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Operator"
-msgstr "Iterator"
+msgstr "Operator"
#: modules/visual_script/visual_script_nodes.cpp
#, fuzzy
@@ -18634,7 +18312,7 @@ msgstr "Pozyskaj samego siebie"
#: modules/visual_script/visual_script_nodes.cpp
msgid "CustomNode"
-msgstr "NiestandardowyWęzeł"
+msgstr "Niestandardowy węzeł"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
@@ -19277,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..."
@@ -19345,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
@@ -19376,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
@@ -19407,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."
@@ -21985,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 ""
@@ -22153,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
@@ -23179,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 ""
@@ -24139,6 +23807,15 @@ msgstr "Błąd"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Sortuj"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -24954,7 +24631,7 @@ msgstr ""
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Caret"
-msgstr "Karetka"
+msgstr "Kareta"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink"
@@ -26960,7 +26637,7 @@ msgstr "Debug kanału UV"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "Rozmazanie"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -28086,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
@@ -28097,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"
@@ -28113,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"
@@ -28565,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
@@ -28684,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 e8e4e5c79d..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 ""
@@ -12947,9 +12947,10 @@ msgstr "Yar, Blow th' Selected Down!"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14341,12 +14342,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -23398,6 +23398,15 @@ msgstr "Error loading yer Calligraphy Pen."
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Discharge ye' Signal"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/pt.po b/editor/translations/pt.po
index 271dcc1e8b..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.
+# 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.
@@ -28,13 +28,17 @@
# Zé Beato Página Oficial <zebeato@gmail.com>, 2022.
# Rafael Testa <rafael1testa@gmail.com>, 2022.
# Baiterson <baiter160@gmail.com>, 2022.
+# 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-08-25 13:04+0000\n"
-"Last-Translator: Baiterson <baiter160@gmail.com>\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"
"Language: pt\n"
@@ -42,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.14-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -180,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"
@@ -380,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"
@@ -2900,9 +2904,8 @@ msgid "ETC2"
msgstr "ETC2"
#: editor/editor_export.cpp
-#, fuzzy
msgid "No BPTC Fallbacks"
-msgstr "Forçar Shader de Reserva"
+msgstr "Sem Fallbacks para imagens BPTC"
#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
@@ -4330,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"
@@ -5477,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"
@@ -5592,9 +5595,8 @@ msgid "Caret Blink Speed"
msgstr "Velocidade do Piscamento do Cursor"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Right Click Moves Caret"
-msgstr "Clique direito para adicionar ponto"
+msgstr "Clique direito move cursor de texto"
#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp
#: modules/gdscript/gdscript_editor.cpp
@@ -5623,23 +5625,20 @@ msgid "Callhint Tooltip Offset"
msgstr "Deslocamento da Sugestão de Chamada"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Complete File Paths"
-msgstr "Copiar Caminho do Nó"
+msgstr "Caminhos Completos dos Arquivos"
#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp
-#, fuzzy
msgid "Add Type Hints"
-msgstr "Adicionar Tipo"
+msgstr "Adicionar Dicas de Tipo"
#: editor/editor_settings.cpp
msgid "Use Single Quotes"
msgstr "Use Citação Única"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Help Index"
-msgstr "Mostrar Ajudantes"
+msgstr "Mostrar Índice de Dicas"
#: editor/editor_settings.cpp
msgid "Help Font Size"
@@ -5662,9 +5661,8 @@ msgid "Pick Distance"
msgstr "Escolher Distância"
#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Preview Size"
-msgstr "Pré-visualização"
+msgstr "Tamanho de Pré-visualização"
#: editor/editor_settings.cpp
msgid "Primary Grid Color"
@@ -5675,32 +5673,27 @@ msgid "Secondary Grid Color"
msgstr "Cor da Grade Secundária"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Selection Box Color"
-msgstr "Apenas seleção"
+msgstr "Seleção de Cor da Caixa"
#: 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 "Bugigangas"
+msgstr "Bugigangas 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 "Cores de Emissão"
+msgstr "Cores das Bugigangas"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Instanced"
-msgstr "Instância"
+msgstr "Instânciado"
#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Joint"
-msgstr "Ponto"
+msgstr "Conjunto"
#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp
@@ -5732,58 +5725,48 @@ msgid "Grid Division Level Bias"
msgstr "Viés de Nível de Divisão de Grade"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid XZ Plane"
-msgstr "Pintura do GridMap"
+msgstr "Grade do Plano XZ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid XY Plane"
-msgstr "Pintura do GridMap"
+msgstr "Grade do Plano XY"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid YZ Plane"
-msgstr "Pintura do GridMap"
+msgstr "Grade do Plano YZ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default FOV"
-msgstr "Predefinição"
+msgstr "Campo de Visão (FOV) Padrão"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Z Near"
-msgstr "Tema Predefinido"
+msgstr "Z Padrão Próximo"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Z Far"
-msgstr "Predefinição"
+msgstr "Z Padrão Longe"
#: editor/editor_settings.cpp
msgid "Lightmap Baking Number Of CPU Threads"
msgstr "Número de threads da CPU para Baking do Mapa de luz"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Navigation Scheme"
-msgstr "Modo Navegação"
+msgstr "Esquema de Navegação"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Invert Y Axis"
-msgstr "Editar Eixo Y"
+msgstr "Inverter Eixo Y"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Invert X Axis"
-msgstr "Editar Eixo X"
+msgstr "Inverter Eixo X"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Style"
-msgstr "Diminuir Zoom"
+msgstr "Estilo de Zoom"
#: editor/editor_settings.cpp
msgid "Emulate Numpad"
@@ -5791,31 +5774,27 @@ 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
-#, fuzzy
msgid "Orbit Modifier"
-msgstr "Ordenar por Primeiro Modificado"
+msgstr "Modificador de Órbita"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Modifier"
-msgstr "Modo deslocamento"
+msgstr "Modificador de Panorâmica"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Modifier"
-msgstr "Modificado"
+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
-#, fuzzy
msgid "Navigation Feel"
-msgstr "Modo Navegação"
+msgstr "Sensação de Navegação"
#: editor/editor_settings.cpp
msgid "Orbit Sensitivity"
@@ -5826,82 +5805,68 @@ msgid "Orbit Inertia"
msgstr "Inércia da Órbita"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Translation Inertia"
-msgstr "Traduções"
+msgstr "Inércia de Translação"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Inertia"
-msgstr "Aumentar Zoom"
+msgstr "Inércia de Zoom"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook"
-msgstr "Freelook Cima"
+msgstr "Visão Livre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Navigation Scheme"
-msgstr "Criar Malha de Navegação"
+msgstr "Esquema de Navegação de Visão Livre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Sensitivity"
-msgstr "Freelook Esquerda"
+msgstr "Sensibilidade de visualização livre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Inertia"
-msgstr "Freelook Esquerda"
+msgstr "Inércia de Visualização livre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Base Speed"
-msgstr "Freelook Modificador de Velocidade"
+msgstr "Velocidade Base de Visão Livre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Activation Modifier"
-msgstr "Freelook Modificador de Lentidão"
+msgstr "Modificador de Ativação de Visão Livre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Speed Zoom Link"
-msgstr "Freelook Modificador de Velocidade"
+msgstr "Velocidade de Ligação do Visão Livre"
#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Grid Color"
-msgstr "Escolher cor"
+msgstr "Cor da Grade"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Guides Color"
-msgstr "Escolher cor"
+msgstr "Cor Guia"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Smart Snapping Line Color"
-msgstr "Ajuste Inteligente"
+msgstr "Cor da Linha de Encaixe Inteligente"
#: editor/editor_settings.cpp
msgid "Bone Width"
msgstr "Largura do Osso"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Color 1"
-msgstr "Renomear Item Cor"
+msgstr "Cor de Osso 1"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Color 2"
-msgstr "Renomear Item Cor"
+msgstr "Cor de Osso 2"
#: editor/editor_settings.cpp
msgid "Bone Selected Color"
-msgstr "Cor dos Ossos Selecionados"
+msgstr "Cor Selecionada do Osso"
#: editor/editor_settings.cpp
msgid "Bone IK Color"
@@ -5936,32 +5901,28 @@ msgid "Pan Speed"
msgstr "Velocidade de Rotação"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Poly Editor"
-msgstr "Editor UV de Polígono 2D"
+msgstr "Editor de Polígonos"
#: editor/editor_settings.cpp
msgid "Point Grab Radius"
msgstr "Raio do Ponto de Captura"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Show Previous Outline"
-msgstr "Plano Anterior"
+msgstr "Exibir Prévia Anterior"
#: editor/editor_settings.cpp editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Autorename Animation Tracks"
-msgstr "Renomear Animação"
+msgstr "Renomear Automaticamente Faixa de Animação"
#: editor/editor_settings.cpp
msgid "Default Create Bezier Tracks"
msgstr "Criar Faixas de Bézier Padrão"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Create Reset Tracks"
-msgstr "Criar Pista(s) RESET"
+msgstr "Criar Faixa RESET Por Padrão"
#: editor/editor_settings.cpp
msgid "Onion Layers Past Color"
@@ -6077,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
@@ -6877,9 +6838,8 @@ msgid "Use Ambient"
msgstr "Usar Ambiente"
#: editor/import/resource_importer_bitmask.cpp
-#, fuzzy
msgid "Create From"
-msgstr "Criar Pasta"
+msgstr "Criar à Partir de"
#: editor/import/resource_importer_bitmask.cpp
#: servers/audio/effects/audio_effect_compressor.cpp
@@ -6891,18 +6851,16 @@ msgstr "Limite"
#: 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 "Componentes"
+msgstr "Comprimir"
#: editor/import/resource_importer_csv_translation.cpp
msgid "Delimiter"
msgstr "Delimitador"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "ColorCorrect"
-msgstr "Função Cor."
+msgstr "Corrigir as Cores"
#: editor/import/resource_importer_layered_texture.cpp
msgid "No BPTC If RGB"
@@ -6930,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
@@ -6945,9 +6902,8 @@ msgid "sRGB"
msgstr "sRGB"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "Slices"
-msgstr "Corte automático"
+msgstr "Fatias"
#: editor/import/resource_importer_layered_texture.cpp
#: scene/gui/aspect_ratio_container.cpp scene/gui/control.cpp
@@ -6964,9 +6920,8 @@ msgid "Vertical"
msgstr "Vertical"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Generate Tangents"
-msgstr "Gerar Pontos"
+msgstr "Gerar Tangentes"
#: editor/import/resource_importer_obj.cpp
msgid "Scale Mesh"
@@ -7095,19 +7050,16 @@ msgid "Store In Subdir"
msgstr "Armazenar no Subdiretório"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Filter Script"
-msgstr "Scripts de filtro"
+msgstr "Filtrar Script"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep Custom Tracks"
-msgstr "Transformar"
+msgstr "Manter Faixas Personalizadas"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Optimizer"
-msgstr "Otimizar"
+msgstr "Otimizador"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/item_list_editor_plugin.cpp main/main.cpp
@@ -7121,9 +7073,8 @@ msgstr "Otimizar"
#: 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 "Ativar"
+msgstr "Ativado"
#: editor/import/resource_importer_scene.cpp
msgid "Max Linear Error"
@@ -7134,19 +7085,16 @@ msgid "Max Angular Error"
msgstr "Máximo de Erros Angulares"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Angle"
-msgstr "Valor"
+msgstr "Ângulo Máximo"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Remove Unused Tracks"
-msgstr "Remover Pista de Animação"
+msgstr "Remover Faixas não Utilizadas"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Clips"
-msgstr "Clips Anim"
+msgstr "Clipes"
#: 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
@@ -7428,14 +7376,12 @@ msgid "Raw"
msgstr "Raw"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Capitalized"
-msgstr "Capitalizar"
+msgstr "Capitalizado"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Localized"
-msgstr "Localização"
+msgstr "Localizado"
#: editor/inspector_dock.cpp
msgid "Localization not available for current language."
@@ -7984,9 +7930,8 @@ msgid "New"
msgstr "Novo"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Paste As Reference"
-msgstr "Referência de classe %s"
+msgstr "Colar como Referência"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Edit Transitions..."
@@ -8176,9 +8121,8 @@ msgid "Set the end animation. This is useful for sub-transitions."
msgstr "Definir a animação final. Útil para sub-transições."
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition:"
-msgstr "Transição: "
+msgstr "Transição:"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Play Mode:"
@@ -8478,25 +8422,21 @@ msgid "Loading..."
msgstr "A Carregar..."
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "First"
msgstr "Primeiro"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Previous"
msgstr "Anterior"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Next"
msgstr "Próximo"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Last"
msgstr "Último"
@@ -9110,23 +9050,20 @@ msgid "View"
msgstr "Vista"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show"
-msgstr "Mostrar grelha"
+msgstr "Exibir"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show When Snapping"
-msgstr "Ajuste Inteligente"
+msgstr "Exibir ao Encaixar"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Hide"
msgstr "Esconder"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Grid"
-msgstr "Alternar Modo"
+msgstr "Alternar Grade"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -9485,9 +9422,8 @@ msgid "Swap Gradient Fill Points"
msgstr "Trocar Pontos de Preenchimento de Gradiente"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Grid Snap"
-msgstr "Alternar Modo"
+msgstr "Alternar Encaixe da Grade"
#: editor/plugins/item_list_editor_plugin.cpp editor/project_export.cpp
#: scene/3d/label_3d.cpp scene/gui/button.cpp scene/gui/dialogs.cpp
@@ -9510,9 +9446,8 @@ msgstr "ID"
#: editor/plugins/item_list_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Separator"
-msgstr "Separação:"
+msgstr "Separador"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
@@ -9747,9 +9682,8 @@ msgstr ""
"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "MeshLibrary"
-msgstr "Bib. de Malhas"
+msgstr "Biblioteca de Malhas"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Add Item"
@@ -9772,14 +9706,12 @@ msgid "Update from Scene"
msgstr "Atualizar a partir da Cena"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Apply without Transforms"
-msgstr "Aplicar Transformações do MeshInstance"
+msgstr "Aplicar sem Transformações"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Apply with Transforms"
-msgstr "Aplicar Transformações do MeshInstance"
+msgstr "Aplicar com Transformações"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
@@ -9945,9 +9877,8 @@ msgid "Volume"
msgstr "Volume"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Source:"
-msgstr "Fonte de emissão: "
+msgstr "Fonte de emissão:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
@@ -10641,19 +10572,16 @@ msgid "External"
msgstr "Externo"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Use External Editor"
-msgstr "Depurar com Editor Externo"
+msgstr "Utilizar Editor Externo"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Exec Path"
-msgstr "Exportar Caminho"
+msgstr "Caminho de Execução"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Script Temperature Enabled"
-msgstr "Selecionar Ficheiro de Modelo"
+msgstr "Temperatura de Script Ativado"
#: editor/plugins/script_editor_plugin.cpp
msgid "Highlight Current Script"
@@ -10668,19 +10596,16 @@ msgid "Current Script Background Color"
msgstr "Cor de Fundo Script Atual"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Group Help Pages"
-msgstr "Agrupar Seleção"
+msgstr "Agrupar Páginas de Ajuda"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Sort Scripts By"
-msgstr "Criar Script"
+msgstr "Ordenar Scripts Por"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "List Script Names As"
-msgstr "Nome do Script:"
+msgstr "Listar Nomes de Script Como"
#: editor/plugins/script_editor_plugin.cpp
msgid "Exec Flags"
@@ -11000,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]"
@@ -11042,15 +10967,13 @@ msgstr "Translação"
#. TRANSLATORS: Refers to changing the scale of a node in the 3D editor.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scaling:"
-msgstr "A escalar: "
+msgstr "Escala:"
#. TRANSLATORS: Refers to changing the position of a node in the 3D editor.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translating:"
-msgstr "A transladar: "
+msgstr "Traduzir:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
@@ -11201,10 +11124,11 @@ msgid "(Not in GLES2)"
msgstr "(Não em GLES2)"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Debug draw modes are only available when using the GLES3 renderer, not GLES2."
-msgstr "Não disponível para o renderizador GLES2."
+msgstr ""
+"Modos de Debug draw só estão disponíveis para uso com o renderizador GLES3. "
+"GLES2 não suporta esta funcionalidade."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Left"
@@ -11506,9 +11430,8 @@ msgid "Manipulator Gizmo Opacity"
msgstr "Opacidade do Gizmo do Manipulador"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Show Viewport Rotation Gizmo"
-msgstr "Bloquear Rotação da Vista"
+msgstr "Exibir Gizmo de Rotação do Viewport"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unnamed Gizmo"
@@ -11559,9 +11482,8 @@ msgid "Invalid geometry, can't replace by mesh."
msgstr "Geometria inválida, não substituível por malha."
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Convert to MeshInstance2D"
-msgstr "Converter para Mesh2D"
+msgstr "Converter para MeshInstance2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
@@ -11592,19 +11514,16 @@ msgid "Sprite"
msgstr "Sprite"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Simplification:"
-msgstr "Simplificação: "
+msgstr "Simplificação:"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Shrink (Pixels):"
-msgstr "Encolher (Pixeis): "
+msgstr "Encolher (Pixels):"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Grow (Pixels):"
-msgstr "Aumentar (Pixeis): "
+msgstr "Crescer (Pixels):"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Update Preview"
@@ -11667,9 +11586,8 @@ msgid "New Animation"
msgstr "Nova Animação"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Filter animations"
-msgstr "Métodos de filtro"
+msgstr "Filtrar animações"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
@@ -11969,9 +11887,8 @@ msgstr ""
"Fechar na mesma?"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Type"
-msgstr "Remover Tile"
+msgstr "Remover Tipo"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -12015,14 +11932,12 @@ msgstr ""
"Adicione-lhe mais itens manualmente ou importando-os de outro tema."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Type"
-msgstr "Adicionar Tipo de Item"
+msgstr "Adicionar Tipo de Tema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Theme Type"
-msgstr "Remover Remoto"
+msgstr "Remover Tipo de Tema"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Color Item"
@@ -12137,9 +12052,8 @@ msgid "Select Another Theme Resource:"
msgstr "Selecionar Outro Recurso Tema:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Theme Resource"
-msgstr "Renomear recurso"
+msgstr "Recurso de Tema"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Another Theme"
@@ -12476,45 +12390,37 @@ msgid "Palette Min Width"
msgstr "Largura Mínima da Paleta"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Palette Item H Separation"
-msgstr "Separador Nomeado"
+msgstr "Separação Horizontal dos Itens de Paleta"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Show Tile Names"
-msgstr "Mostrar Todos os Idiomas"
+msgstr "Mostrar Nomes dos Tiles"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Show Tile Ids"
-msgstr "Mostrar réguas"
+msgstr "Mostrar Ids dos Tiles"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Sort Tiles By Name"
-msgstr "Ordenar ficheiros"
+msgstr "Ordenar Tiles por Nome"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Bucket Fill Preview"
-msgstr "Balde de Enchimento"
+msgstr "Pré-visualização do Preenchimento de Balde"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Editor Side"
-msgstr "Editor"
+msgstr "Lado do Editor"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Display Grid"
-msgstr "Vista Overdraw"
+msgstr "Mostrar Grid"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Axis Color"
-msgstr "Escolher cor"
+msgstr "Cor do Eixo"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Add Texture(s) to TileSet."
@@ -12851,9 +12757,8 @@ msgid "This property can't be changed."
msgstr "Esta propriedade não pode ser alterada."
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Snap Options"
-msgstr "Opções de Ajuste"
+msgstr "Opções de Encaixe"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/animated_sprite.cpp
#: scene/2d/camera_2d.cpp scene/2d/cpu_particles_2d.cpp scene/2d/light_2d.cpp
@@ -12861,12 +12766,12 @@ msgstr "Opções de Ajuste"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
-#, fuzzy
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
-msgstr "Compensação:"
+msgstr "Deslocamento"
#: editor/plugins/tile_set_editor_plugin.cpp editor/rename_dialog.cpp
#: scene/gui/range.cpp scene/resources/animation.cpp
@@ -12877,14 +12782,12 @@ msgstr "Passo"
#: editor/plugins/tile_set_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Separation"
-msgstr "Separação:"
+msgstr "Separação"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Tile"
-msgstr "Selecionar"
+msgstr "Selecionar Tile"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/cpu_particles_2d.cpp
#: scene/2d/light_2d.cpp scene/2d/line_2d.cpp scene/2d/mesh_instance_2d.cpp
@@ -12893,97 +12796,79 @@ msgstr "Selecionar"
#: scene/gui/nine_patch_rect.cpp scene/gui/texture_rect.cpp
#: scene/resources/material.cpp scene/resources/sky.cpp
#: scene/resources/style_box.cpp scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Texture"
-msgstr "Texto"
+msgstr "Textura"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tex Offset"
-msgstr "Compensação da grelha:"
+msgstr "Deslocamento da Textura"
#: editor/plugins/tile_set_editor_plugin.cpp modules/csg/csg_shape.cpp
#: scene/2d/canvas_item.cpp scene/2d/particles_2d.cpp
#: scene/3d/mesh_instance.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Material"
-msgstr "Mudanças de Material:"
+msgstr "Material"
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/canvas_item.cpp
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Modulate"
-msgstr "Povoar"
+msgstr "Modular"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tile Mode"
-msgstr "Alternar Modo"
+msgstr "Modo de Tiles"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Autotile Bitmask Mode"
-msgstr "Modo Bitmask"
+msgstr "Modo Bitmask do Autotile"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Size"
-msgstr "Tamanho do contorno:"
+msgstr "Tamanho do Subtile"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Spacing"
-msgstr "Loop da Animação"
+msgstr "Espaçamento dos Subtiles"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Occluder Offset"
-msgstr "Criar Polígono Oclusor"
+msgstr "Deslocamento de Oclusor"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Navigation Offset"
-msgstr "Modo Navegação"
+msgstr "Deslocamento da Navegação"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Offset"
-msgstr "Compensação:"
+msgstr "Deslocamento da Forma"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Transform"
-msgstr "Transformar"
+msgstr "Transformação da Forma"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision"
-msgstr "Colisão"
+msgstr "Colisão Selecionada"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision One Way"
-msgstr "Apenas seleção"
+msgstr "Colisão em sentido único selecionada"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision One Way Margin"
-msgstr "Modo Colisão"
+msgstr "Margem de colisão em sentido único selecionada"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Navigation"
-msgstr "Navegação Visível"
+msgstr "Navegação Selecionada"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Occlusion"
-msgstr "Selecionar"
+msgstr "Oclusão Selecionada"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tileset Script"
-msgstr "Scripts de filtro"
+msgstr "Scripts do Tileset"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "TileSet"
@@ -14188,51 +14073,44 @@ msgstr ""
"você precisa construir os modelos de exportação da fonte."
#: editor/project_export.cpp
-#, fuzzy
msgid "More Info..."
-msgstr "Mover para..."
+msgstr "Mais Informações..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export PCK/Zip..."
-msgstr "Exportar PCK/Zip"
+msgstr "Exportar PCK/Zip..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export Project..."
-msgstr "Exportar Projeto"
+msgstr "Exportar Projeto…"
#: editor/project_export.cpp
msgid "Export All"
msgstr "Exportar Tudo"
#: editor/project_export.cpp
-#, fuzzy
msgid "Choose an export mode:"
-msgstr "Por favor escolha uma pasta vazia."
+msgstr "Escolha um modo de exportação:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export All..."
-msgstr "Exportar Tudo"
+msgstr "Exportar tudo…"
#: editor/project_export.cpp editor/project_manager.cpp
msgid "ZIP File"
msgstr "Ficheiro ZIP"
#: editor/project_export.cpp
-#, fuzzy
msgid "Godot Project Pack"
-msgstr "Pacote de Jogo Godot"
+msgstr "Pacote do Projeto Godot"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "Não existem Modelos de exportação para esta plataforma:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Project Export"
-msgstr "Fundadores do Projeto"
+msgstr "Exportar Projeto"
#: editor/project_export.cpp
msgid "Manage Export Templates"
@@ -14299,15 +14177,14 @@ msgstr "Caminho de projeto inválido (alguma alteração?)."
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"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
-msgid "Couldn't edit project.godot in project path."
-msgstr "Incapaz de editar project.godot no caminho do projeto."
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Incapaz de salvar projeto em '%s' (error %d)."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -14546,7 +14423,6 @@ msgstr ""
#. TRANSLATORS: This refers to the application where users manage their Godot projects.
#: editor/project_manager.cpp
-#, fuzzy
msgctxt "Application"
msgid "Project Manager"
msgstr "Gestor de Projetos"
@@ -15343,19 +15219,16 @@ msgid "Make Local"
msgstr "Tornar Local"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "Nome do Nó:"
+msgstr "Ativar Nome(s) Único(s) de Cena"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "Outro nó já usa esse nome exclusivo na cena."
+msgstr "Nomes únicos já estão sendo usados por outro nó na cena:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Disable Scene Unique Name(s)"
-msgstr "Nome do Nó:"
+msgstr "Desativar Nome(s) Único(s) de Cena"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -15530,18 +15403,16 @@ msgid "Clear Inheritance? (No Undo!)"
msgstr "Limpar herança? (Definitivo!)"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Show Scene Tree Root Selection"
-msgstr "Centrar Seleção"
+msgstr "Mostrar seleção da hierarquia de cenas"
#: editor/scene_tree_dock.cpp
msgid "Derive Script Globals By Name"
msgstr "Derivar Globais de Script Por Nome"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Use Favorites Root Selection"
-msgstr "Seleção de Frame"
+msgstr "Seleção de favoritos da raíz"
#: editor/scene_tree_editor.cpp
msgid "Toggle Visible"
@@ -15556,9 +15427,8 @@ msgid "Button Group"
msgstr "Grupo Botão"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Disable Scene Unique Name"
-msgstr "Nome do Nó:"
+msgstr "Desativar Nome Único de Cena"
#: editor/scene_tree_editor.cpp
msgid "(Connecting From)"
@@ -15791,9 +15661,8 @@ msgid "Attach Node Script"
msgstr "Anexar Script de Nó"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Remote %s:"
-msgstr "Remoto "
+msgstr "%s remoto:"
#: editor/script_editor_debugger.cpp
msgid "Bytes:"
@@ -15868,9 +15737,8 @@ msgid "Stack Frames"
msgstr "Empilhar Frames"
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Filter stack variables"
-msgstr "Filtrar Tiles"
+msgstr "Filtrar variáveis stack"
#: editor/script_editor_debugger.cpp
msgid "Auto Switch To Remote Scene Tree"
@@ -16317,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"
@@ -16435,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"
@@ -16547,26 +16415,22 @@ msgid "Calculate Tangents"
msgstr "Calcular Tangentes"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Use Collision"
-msgstr "Colisão"
+msgstr "Usar Colisão"
#: modules/csg/csg_shape.cpp servers/physics_2d_server.cpp
-#, fuzzy
msgid "Collision Layer"
-msgstr "Modo Colisão"
+msgstr "Camada de Colisão"
#: 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 "Modo Colisão"
+msgstr "Máscara de Colisão"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Invert Faces"
-msgstr "Converter maiúsculas/minúsculas"
+msgstr "Inverter Faces"
#: modules/csg/csg_shape.cpp scene/2d/navigation_agent_2d.cpp
#: scene/2d/navigation_obstacle_2d.cpp scene/3d/navigation_agent.cpp
@@ -16576,43 +16440,36 @@ msgstr "Converter maiúsculas/minúsculas"
#: 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 "Raio:"
+msgstr "Raio"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Radial Segments"
-msgstr "Argumentos da Cena Principal:"
+msgstr "Segmentos Radiais"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Rings"
-msgstr "Avisos"
+msgstr "Anéis"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Smooth Faces"
-msgstr "Smoothstep"
+msgstr "Suavizar Faces"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Sides"
-msgstr "Mostrar Guias"
+msgstr "Lados"
#: modules/csg/csg_shape.cpp
msgid "Cone"
msgstr "Cone"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Inner Radius"
-msgstr "Mudar Raio Interno do Toro"
+msgstr "Raio Interno"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Outer Radius"
-msgstr "Mudar Raio Externo do Toro"
+msgstr "Raio Externo"
#: modules/csg/csg_shape.cpp
msgid "Ring Sides"
@@ -16621,9 +16478,8 @@ msgstr "Lados do Anel"
#: 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 "Polígonos"
+msgstr "Polígono"
#: modules/csg/csg_shape.cpp
msgid "Spin Degrees"
@@ -16634,14 +16490,12 @@ msgid "Spin Sides"
msgstr "Girar Lados"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Node"
-msgstr "Colar Nós"
+msgstr "Caminho do Nó"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Interval Type"
-msgstr "Criar vértice interno"
+msgstr "Tipo de Intervalo de Caminho"
#: modules/csg/csg_shape.cpp
msgid "Path Interval"
@@ -16652,49 +16506,40 @@ msgid "Path Simplify Angle"
msgstr "Simplifique o Ângulo do Caminho"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Rotation"
-msgstr "Rotação aleatória:"
+msgstr "Rotação do Caminho"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Local"
-msgstr "Tornar 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
-#, fuzzy
msgid "Path U Distance"
-msgstr "Distância de escolha:"
+msgstr "Distância do Caminho U"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Joined"
-msgstr "Rotação aleatória:"
+msgstr "Caminho Unido"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Compression Mode"
-msgstr "Modo Colisão"
+msgstr "Modo de Compressão"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Transfer Channel"
-msgstr "Mudar Transformação"
+msgstr "Transferir Canal"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Channel Count"
-msgstr "Instância"
+msgstr "Quantidade de Canais"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Always Ordered"
-msgstr "Mostrar Grelha Sempre"
+msgstr "Sempre Ordenado"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "Server Relay"
@@ -16709,9 +16554,8 @@ msgid "DTLS Hostname"
msgstr "Nome do Host DTLS"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Use DTLS"
-msgstr "Usar Ajuste"
+msgstr "Usar DTLS"
#: modules/fbx/editor_scene_importer_fbx.cpp
msgid "FBX"
@@ -16722,30 +16566,25 @@ msgid "Use FBX"
msgstr "Usar FBX"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Config File"
-msgstr "Armazenar o Ficheiro:"
+msgstr "Ficheiro de Configuração"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Load Once"
-msgstr "Carregar recurso"
+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
-#, fuzzy
msgid "Symbol Prefix"
-msgstr "Prefixo:"
+msgstr "Prefixo do Símbolo"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Reloadable"
-msgstr "Recarregar"
+msgstr "Recarregável"
#: modules/gdnative/gdnative.cpp
#: modules/gdnative/gdnative_library_singleton_editor.cpp
@@ -16798,24 +16637,20 @@ msgid "Disabled GDNative Singleton"
msgstr "Instância única GDNative desativada"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
-#, fuzzy
msgid "Libraries:"
-msgstr "Bibliotecas: "
+msgstr "Bibliotecas:"
#: modules/gdnative/nativescript/nativescript.cpp
-#, fuzzy
msgid "Class Name"
-msgstr "Nome de Classe:"
+msgstr "Nome da Classe"
#: modules/gdnative/nativescript/nativescript.cpp
-#, fuzzy
msgid "Script Class"
-msgstr "Nome do Script:"
+msgstr "Classe do Script"
#: modules/gdnative/nativescript/nativescript.cpp
-#, fuzzy
msgid "Icon Path"
-msgstr "Caminho de Foco"
+msgstr "Caminho para Ícone"
#: modules/gdnative/register_types.cpp
msgid "GDNative"
@@ -16823,18 +16658,16 @@ msgstr "GDNative"
#: modules/gdscript/editor/gdscript_highlighter.cpp
#: modules/gdscript/gdscript.cpp
-#, fuzzy
msgid "GDScript"
-msgstr "Script"
+msgstr "GDScript"
#: modules/gdscript/editor/gdscript_highlighter.cpp
msgid "Function Definition Color"
msgstr "Função de Definição de Cor"
#: modules/gdscript/editor/gdscript_highlighter.cpp
-#, fuzzy
msgid "Node Path Color"
-msgstr "Copiar Caminho do Nó"
+msgstr "Cor do Caminho do Nó"
#: modules/gdscript/gdscript.cpp modules/visual_script/visual_script.cpp
msgid "Max Call Stack"
@@ -16891,9 +16724,8 @@ msgid "Object can't provide a length."
msgstr "Objeto não fornece um comprimento."
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Language Server"
-msgstr "Linguagem:"
+msgstr "Servidor de Idioma"
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Enable Smart Resolve"
@@ -16916,44 +16748,36 @@ msgid "Export GLTF..."
msgstr "Exportar GLTF..."
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Buffer View"
-msgstr "Vista de Trás"
+msgstr "Visão de Buffer"
#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Byte Offset"
-msgstr "Compensação da grelha:"
+msgstr "Deslocamento do Byte"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Component Type"
-msgstr "Componentes"
+msgstr "Tipo do Componente"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Normalized"
-msgstr "Formato"
+msgstr "Normalizado"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Count"
-msgstr "Valor:"
+msgstr "Quantidade"
#: modules/gltf/gltf_accessor.cpp scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Min"
-msgstr "MiB"
+msgstr "Min"
#: modules/gltf/gltf_accessor.cpp scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Max"
-msgstr "Combinar"
+msgstr "Max"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Sparse Count"
-msgstr "Instância"
+msgstr "Contagem Escassa"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Buffer View"
@@ -16964,9 +16788,8 @@ msgid "Sparse Indices Byte Offset"
msgstr "Deslocamento de Bytes de Índices Esparsos"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Sparse Indices Component Type"
-msgstr "A analisar geometria..."
+msgstr "Tipo de Componente de Índices Esparsos"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Values Buffer View"
@@ -16977,37 +16800,32 @@ msgid "Sparse Values Byte Offset"
msgstr "Deslocamento de Bytes de Valores Esparsos"
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Buffer"
-msgstr "Vista de Trás"
+msgstr "Buffer"
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Byte Length"
-msgstr "Tema Predefinido"
+msgstr "Largura do byte"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Byte Stride"
msgstr "Passo de Byte"
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Indices"
-msgstr "Todos os Aparelhos"
+msgstr "Índices"
#: modules/gltf/gltf_camera.cpp
-#, fuzzy
msgid "FOV Size"
-msgstr "Tamanho:"
+msgstr "Tamanho do FOV"
#: modules/gltf/gltf_camera.cpp
msgid "Zfar"
msgstr "Zfar"
#: modules/gltf/gltf_camera.cpp
-#, fuzzy
msgid "Znear"
-msgstr "Linear"
+msgstr "Z perto"
#: modules/gltf/gltf_light.cpp scene/2d/canvas_modulate.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/light_2d.cpp scene/2d/polygon_2d.cpp
@@ -17017,9 +16835,8 @@ msgstr "Linear"
#: scene/resources/environment.cpp scene/resources/material.cpp
#: scene/resources/particles_material.cpp scene/resources/sky.cpp
#: scene/resources/style_box.cpp
-#, fuzzy
msgid "Color"
-msgstr "Cores"
+msgstr "Cor"
#: modules/gltf/gltf_light.cpp scene/3d/reflection_probe.cpp
#: scene/resources/environment.cpp
@@ -17027,9 +16844,8 @@ msgid "Intensity"
msgstr "Intensidade"
#: modules/gltf/gltf_light.cpp scene/2d/light_2d.cpp scene/3d/light.cpp
-#, fuzzy
msgid "Range"
-msgstr "Mudar"
+msgstr "Intervalo"
#: modules/gltf/gltf_light.cpp
msgid "Inner Cone Angle"
@@ -17040,19 +16856,16 @@ msgid "Outer Cone Angle"
msgstr "Ângulo do Cone Externo"
#: modules/gltf/gltf_mesh.cpp
-#, fuzzy
msgid "Blend Weights"
-msgstr "Consolidar Lightmaps"
+msgstr "Peso da mesclagem"
#: modules/gltf/gltf_mesh.cpp
-#, fuzzy
msgid "Instance Materials"
-msgstr "Mudanças de Material:"
+msgstr "Materiais da Instância"
#: modules/gltf/gltf_node.cpp scene/3d/skeleton.cpp
-#, fuzzy
msgid "Parent"
-msgstr "Reassociar"
+msgstr "Pai"
#: modules/gltf/gltf_node.cpp
#, fuzzy
@@ -17064,19 +16877,16 @@ msgid "Skin"
msgstr "Skin"
#: modules/gltf/gltf_node.cpp scene/3d/spatial.cpp
-#, fuzzy
msgid "Translation"
-msgstr "Traduções"
+msgstr "Tradução"
#: modules/gltf/gltf_node.cpp
-#, fuzzy
msgid "Children"
-msgstr "Filhos editáveis"
+msgstr "Filhos"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Joints"
-msgstr "Ponto"
+msgstr "Pontos"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
msgid "Roots"
@@ -17087,28 +16897,24 @@ msgid "Unique Names"
msgstr "Nomes Únicos"
#: modules/gltf/gltf_skeleton.cpp
-#, fuzzy
msgid "Godot Bone Node"
-msgstr "Obter Nó da Cena"
+msgstr "Nó de Osso Godot"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Skin Root"
-msgstr "Nova Raiz da Cena"
+msgstr "Raiz da Skin"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Joints Original"
-msgstr "Focar na Origem"
+msgstr "Pontos Originais"
#: modules/gltf/gltf_skin.cpp
msgid "Inverse Binds"
msgstr "Inverter Ligações"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Non Joints"
-msgstr "Mover Junta"
+msgstr "Não-Juntas"
#: modules/gltf/gltf_skin.cpp
msgid "Joint I To Bone I"
@@ -17147,48 +16953,41 @@ msgid "Json"
msgstr "Json"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Major Version"
-msgstr "Versão"
+msgstr "Versão Importante"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Minor Version"
-msgstr "Versão"
+msgstr "Versão Minoritária"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "GLB Data"
-msgstr "Com Dados"
+msgstr "Dados do GLB"
#: modules/gltf/gltf_state.cpp
msgid "Use Named Skin Binds"
msgstr "Usar Ligações de Skin Nomeadas"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Buffer Views"
-msgstr "Vista de Trás"
+msgstr "Visão Buffer"
#: modules/gltf/gltf_state.cpp
msgid "Accessors"
msgstr "Assessores"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Scene Name"
-msgstr "Caminho da Cena:"
+msgstr "Nome da Cena"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Root Nodes"
-msgstr "Nome do nó raiz"
+msgstr "Nós Raízes"
#: modules/gltf/gltf_state.cpp scene/2d/particles_2d.cpp
#: scene/gui/texture_button.cpp scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Textures"
-msgstr "Funcionalidades"
+msgstr "Texturas"
#: modules/gltf/gltf_state.cpp platform/uwp/export/export.cpp
msgid "Images"
@@ -17199,72 +16998,60 @@ msgid "Cameras"
msgstr "Câmeras"
#: modules/gltf/gltf_state.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Lights"
-msgstr "Luz"
+msgstr "Luzes"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Unique Animation Names"
-msgstr "Novo Nome da Animação:"
+msgstr "Nomes de Animação Únicos"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Skeletons"
-msgstr "Esqueleto"
+msgstr "Esqueletos"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Skeleton To Node"
-msgstr "Selecione um Nó"
+msgstr "Esqueleto Para Nó"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Animations"
-msgstr "Animações:"
+msgstr "Animações"
#: modules/gltf/gltf_texture.cpp
-#, fuzzy
msgid "Src Image"
-msgstr "Mostrar ossos"
+msgstr "Imagem fonte"
#: modules/gridmap/grid_map.cpp
msgid "Mesh Library"
msgstr "Bib. de Malhas"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Physics Material"
-msgstr "Frame de Física %"
+msgstr "Material de Física"
#: modules/gridmap/grid_map.cpp scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Use In Baked Light"
-msgstr "Consolidar Lightmaps"
+msgstr "Usar no mapa de luz"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Cell"
msgstr "Célula"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Octant Size"
-msgstr "Vista de Frente"
+msgstr "Tamanho Octante"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center X"
-msgstr "Centro"
+msgstr "Centro X"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center Y"
-msgstr "Centro"
+msgstr "Centro Y"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center Z"
-msgstr "Centro"
+msgstr "Centro 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
@@ -17273,17 +17060,15 @@ msgid "Mask"
msgstr "Máscara"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
-#, fuzzy
msgid "Bake Navigation"
-msgstr "Navegação"
+msgstr "Navegação Pré-Processada"
#: modules/gridmap/grid_map.cpp scene/2d/navigation_2d.cpp
#: 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 "Modo Navegação"
+msgstr "Camadas da Navegação"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -17442,9 +17227,8 @@ msgid "Plotting lightmaps"
msgstr "A Traçar lightmaps"
#: modules/lightmapper_cpu/register_types.cpp
-#, fuzzy
msgid "CPU Lightmapper"
-msgstr "Consolidar Lightmaps"
+msgstr "Mapeamento de Luz da CPU"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Low Quality Ray Count"
@@ -17466,9 +17250,8 @@ msgstr "Contagem de Raios de Ultra Qualidade"
#: 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 "Compensação:"
+msgstr "Deslocamento do Loop"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Eye Height"
@@ -17479,14 +17262,12 @@ msgid "IOD"
msgstr "IOD"
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "Display Width"
-msgstr "Vista Wireframe"
+msgstr "Largura de Ecrã"
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "Display To Lens"
-msgstr "Vista sem sombras"
+msgstr "Exibir às Lentes"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Oversample"
@@ -17509,24 +17290,20 @@ msgid "Build Solution"
msgstr "Construir Solução"
#: modules/mono/editor/csharp_project.cpp
-#, fuzzy
msgid "Auto Update Project"
-msgstr "Projeto sem nome"
+msgstr "Atualizar Projeto Automaticamente"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Assembly Name"
-msgstr "Mostrar Tudo"
+msgstr "Nome de Montagem"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Solution Directory"
-msgstr "Escolha uma Diretoria"
+msgstr "Diretório da Solução"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "C# Project Directory"
-msgstr "Escolha uma Diretoria"
+msgstr "Diretório do Projeto C#"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
@@ -17604,9 +17381,8 @@ msgid "Seamless"
msgstr "Sem Emenda"
#: modules/opensimplex/noise_texture.cpp
-#, fuzzy
msgid "As Normal Map"
-msgstr "Escala aleatória:"
+msgstr "Como Mapa Normal"
#: modules/opensimplex/noise_texture.cpp
msgid "Bump Strength"
@@ -17617,9 +17393,8 @@ msgid "Noise"
msgstr "Ruido"
#: modules/opensimplex/noise_texture.cpp
-#, fuzzy
msgid "Noise Offset"
-msgstr "Compensação da grelha:"
+msgstr "Deslocamento do Ruído"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Octaves"
@@ -17630,9 +17405,8 @@ msgid "Period"
msgstr "Periodo"
#: modules/opensimplex/open_simplex_noise.cpp
-#, fuzzy
msgid "Persistence"
-msgstr "Perspetiva"
+msgstr "Persistência"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Lacunarity"
@@ -17643,14 +17417,12 @@ msgid "Subject"
msgstr "Sujeito"
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Names"
-msgstr "Nome"
+msgstr "Nomes"
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Strings"
-msgstr "Configuração:"
+msgstr "Cadeias"
#: modules/upnp/upnp.cpp
msgid "Discover Multicast If"
@@ -17665,32 +17437,28 @@ msgid "Discover IPv6"
msgstr "Descobrir IPv6"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "Description URL"
-msgstr "Descrição"
+msgstr "URL Descritiva"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "Service Type"
-msgstr "Definir tipo de variável"
+msgstr "Tipo de Serviço"
#: modules/upnp/upnp_device.cpp
msgid "IGD Control URL"
msgstr "URL de controle IGD"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "IGD Service Type"
-msgstr "Definir tipo de variável"
+msgstr "Tipo de Serviço IGD"
#: modules/upnp/upnp_device.cpp
msgid "IGD Our Addr"
msgstr "IGD Nosso Endereço"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "IGD Status"
-msgstr "Status"
+msgstr "Estado do IGD"
#: modules/visual_script/visual_script.cpp
msgid ""
@@ -17717,9 +17485,8 @@ msgstr ""
"trabalho de nós! Corrija o seu nó por favor."
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Node returned an invalid sequence output:"
-msgstr "O nó retornou uma sequência de saída incorreta: "
+msgstr "O nó retornou uma saída de sequência inválida:"
#: modules/visual_script/visual_script.cpp
msgid "Found sequence bit but not the node in the stack, report bug!"
@@ -17727,14 +17494,12 @@ msgstr ""
"Foi encontrada o bit da sequência mas não o nó na pilha, denuncie o bug!"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Stack overflow with stack depth:"
-msgstr "Pilha cheia com a profundidade da pilha: "
+msgstr "Sobrecarga da pilha com profundidade:"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Visual Script"
-msgstr "Procurar VisualScript"
+msgstr "Script Visual"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Signal Arguments"
@@ -18062,14 +17827,12 @@ msgid "Return"
msgstr "Voltar"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Enabled"
-msgstr "Executável"
+msgstr "Retorno Ativado"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Type"
-msgstr "Voltar"
+msgstr "Tipo de Retorno"
#: modules/visual_script/visual_script_flow_control.cpp
#: scene/resources/visual_shader_nodes.cpp
@@ -18097,18 +17860,16 @@ msgid "for (elem) in (input):"
msgstr "para (elem) em (input):"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Input type not iterable:"
-msgstr "Tipo de Input não iterável: "
+msgstr "Tipo de entrada não iterável:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Iterator became invalid"
msgstr "O iterador tornou-se inválido"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Iterator became invalid:"
-msgstr "O iterador tornou-se inválido: "
+msgstr "Iterador tornou-se inválido:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Sequence"
@@ -18119,9 +17880,8 @@ msgid "in order:"
msgstr "em ordem:"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Steps"
-msgstr "Passo"
+msgstr "Passos"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Switch"
@@ -18141,9 +17901,8 @@ msgstr "É %s?"
#: modules/visual_script/visual_script_flow_control.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Base Script"
-msgstr "Novo Script"
+msgstr "Script Base"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "On %s"
@@ -18155,37 +17914,31 @@ msgstr "Nele Próprio"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "Call Mode"
-msgstr "Modo Escalar"
+msgstr "Modo de Chamada"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Basic Type"
-msgstr "Mudar tipo base"
+msgstr "Tipo Base"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "Node Path"
-msgstr "Copiar Caminho do Nó"
+msgstr "Caminho do Nó"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Use Default Args"
-msgstr "Restaurar Predefinições"
+msgstr "Usar Argumentos Padrão"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Validate"
-msgstr "Caracteres válidos:"
+msgstr "Validar"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "RPC Call Mode"
-msgstr "Modo Escalar"
+msgstr "Modo de Chamada RPC"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Subtract %s"
@@ -18224,14 +17977,12 @@ msgid "BitXor %s"
msgstr "BitXor %s"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Set Mode"
-msgstr "Modo Seleção"
+msgstr "Modo de Definição"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Assign Op"
-msgstr "Atribuir"
+msgstr "Atribuir Op"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
@@ -18248,9 +17999,8 @@ msgid "Base object is not a Node!"
msgstr "Objeto de base não é um Nó!"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Path does not lead to Node!"
-msgstr "Caminho não conduz Nó!"
+msgstr "Caminho não leva ao Nó!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name '%s' in node %s."
@@ -18266,38 +18016,32 @@ msgstr "Compor Array"
#: modules/visual_script/visual_script_nodes.cpp scene/resources/material.cpp
#: scene/resources/visual_shader_nodes.cpp
-#, fuzzy
msgid "Operator"
-msgstr "Iterador"
+msgstr "Operador"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Invalid argument of type:"
-msgstr ": Argumento inválido de tipo: "
+msgstr "Argumento inválido do tipo:"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Invalid arguments:"
-msgstr ": Argumentos inválidos: "
+msgstr "Argumentos inválidos:"
#: modules/visual_script/visual_script_nodes.cpp
msgid "a if cond, else b"
msgstr "a se cond, senão b"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Var Name"
-msgstr "Nome"
+msgstr "Nome da Variável"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "VariableGet not found in script:"
-msgstr "VariableGet não encontrado no script: "
+msgstr "VariableGet não encontrado no script:"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "VariableSet not found in script:"
-msgstr "VariableSet não encontrado no script: "
+msgstr "VariableSet não encontrado no script:"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Preload"
@@ -18413,9 +18157,8 @@ msgid "%s sec(s)"
msgstr "%s sec(s)"
#: modules/visual_script/visual_script_yield_nodes.cpp scene/main/timer.cpp
-#, fuzzy
msgid "Wait Time"
-msgstr "Pintar Tile"
+msgstr "Tempo de Espera"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "WaitSignal"
@@ -18430,9 +18173,8 @@ msgid "WaitInstanceSignal"
msgstr "WaitInstanceSignal"
#: modules/webrtc/webrtc_data_channel.cpp
-#, fuzzy
msgid "Write Mode"
-msgstr "Modo Prioridade"
+msgstr "Modo de Escrita"
#: modules/webrtc/webrtc_data_channel.h
msgid "WebRTC"
@@ -18451,69 +18193,60 @@ msgid "Trusted SSL Certificate"
msgstr "Certificado SSL Confiável"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "WebSocket Client"
-msgstr "Analisador de Rede"
+msgstr "Cliente WebSocket"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "Max In Buffer (KB)"
-msgstr "Tamanho Máximo (KB)"
+msgstr "Buffer de Entrada Máximo (KB)"
#: modules/websocket/websocket_macros.h
msgid "Max In Packets"
msgstr "Máximo de Pacotes de Entrada"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "Max Out Buffer (KB)"
-msgstr "Tamanho Máximo (KB)"
+msgstr "Buffer de Saída Máximo (KB)"
#: modules/websocket/websocket_macros.h
msgid "Max Out Packets"
msgstr "Máximo de Pacotes de Saida"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "WebSocket Server"
-msgstr "Analisador de Rede"
+msgstr "Servidor WebSocket"
#: modules/websocket/websocket_server.cpp
msgid "Bind IP"
msgstr "Associar IP"
#: modules/websocket/websocket_server.cpp
-#, fuzzy
msgid "Private Key"
-msgstr "Caminho da Chave Privada SSH"
+msgstr "Chave Privada"
#: modules/websocket/websocket_server.cpp platform/javascript/export/export.cpp
msgid "SSL Certificate"
msgstr "Certificado SSL"
#: modules/websocket/websocket_server.cpp
-#, fuzzy
msgid "CA Chain"
-msgstr "Apagar corrente IK"
+msgstr "Cadeia CA"
#: modules/websocket/websocket_server.cpp
msgid "Handshake Timeout"
msgstr "Timeout de Handshake"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Session Mode"
-msgstr "Modo Região"
+msgstr "Modo Sessão"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Required Features"
-msgstr "Funcionalidades Principais:"
+msgstr "Funcionalidades Necessárias"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Optional Features"
-msgstr "Funcionalidades Principais:"
+msgstr "Funcionalidades Opcionais"
#: modules/webxr/webxr_interface.cpp
msgid "Requested Reference Space Types"
@@ -18524,28 +18257,24 @@ msgid "Reference Space Type"
msgstr "Tipo de Espaço de Referência"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Visibility State"
-msgstr "Alternar visibilidade"
+msgstr "Estado de Visibilidade"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Bounds Geometry"
-msgstr "Repetir"
+msgstr "Limita a Geometria"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "XR Standard Mapping"
-msgstr "Ajuste Inteligente"
+msgstr "Mapeamento XR Padrão"
#: platform/android/export/export.cpp
msgid "Android SDK Path"
msgstr "Caminho do SDK Android"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Debug Keystore"
-msgstr "Depurador"
+msgstr "Depurar Keystore"
#: platform/android/export/export.cpp
msgid "Debug Keystore User"
@@ -18606,33 +18335,28 @@ msgid "The package must have at least one '.' separator."
msgstr "O pacote deve ter pelo menos um separador '.'."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Custom Build"
-msgstr "Usar Compilação Personalizada"
+msgstr "Build Personalizada"
#: platform/android/export/export_plugin.cpp
msgid "Use Custom Build"
msgstr "Usar Compilação Personalizada"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Export Format"
-msgstr "Exportar Caminho"
+msgstr "Exportar Formato"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Min SDK"
-msgstr "Tamanho do contorno:"
+msgstr "SDK Mínimo"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Target SDK"
-msgstr "Alvo"
+msgstr "SDK Alvo"
#: platform/android/export/export_plugin.cpp platform/iphone/export/export.cpp
-#, fuzzy
msgid "Architectures"
-msgstr "Adicionar uma entrada arquitetura"
+msgstr "Arquiteturas"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18640,91 +18364,76 @@ msgid "Keystore"
msgstr "Depurador"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Debug User"
-msgstr "Depurador"
+msgstr "Depurar Utilizador"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Debug Password"
-msgstr "Senha"
+msgstr "Depurar Palavra-passe"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Release User"
-msgstr "Libertar"
+msgstr "Liberar Utilizador"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Release Password"
-msgstr "Senha"
+msgstr "Liberar Palavra-passe"
#: platform/android/export/export_plugin.cpp
msgid "One Click Deploy"
msgstr "Implantação com Um Clique"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Clear Previous Install"
-msgstr "Inspecionar instância anterior"
+msgstr "Limpar Instalação Anterior"
#: platform/android/export/export_plugin.cpp
msgid "Code"
msgstr "Código"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Package"
-msgstr "Empacotamento"
+msgstr "Pacote"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Unique Name"
-msgstr "Nome do Nó:"
+msgstr "Nome Único"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Signed"
-msgstr "Sinal"
+msgstr "Assinado"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Classify As Game"
-msgstr "Nome de Classe:"
+msgstr "Classificar como Jogo"
#: platform/android/export/export_plugin.cpp
msgid "Retain Data On Uninstall"
msgstr "Reter Dados na Desinstalação"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Exclude From Recents"
-msgstr "Apagar Nós"
+msgstr "Excluir de Recentes"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Graphics"
-msgstr "Compensação da grelha:"
+msgstr "Gráficos"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "OpenGL Debug"
-msgstr "Abrir"
+msgstr "Depurar OpenGL"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "XR Features"
-msgstr "Funcionalidades"
+msgstr "Funcionalidades XR"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "XR Mode"
-msgstr "Modo deslocamento"
+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"
@@ -18735,72 +18444,60 @@ msgid "Passthrough"
msgstr "Atravessar"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Immersive Mode"
-msgstr "Modo Prioridade"
+msgstr "Modo Imersivo"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Small"
-msgstr "Suporte"
+msgstr "Suporte Pequeno"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Normal"
-msgstr "Suporte"
+msgstr "Suporte Normal"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Large"
-msgstr "Suporte"
+msgstr "Suporte Grande"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Xlarge"
-msgstr "Suporte"
+msgstr "Suporte Extra-grande"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "User Data Backup"
-msgstr "Interface do Utilizador"
+msgstr "Backup de Dados do Utilizador"
#: platform/android/export/export_plugin.cpp
msgid "Allow"
msgstr "Permitir"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Command Line"
-msgstr "Comunidade"
+msgstr "Linha de Comando"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Extra Args"
-msgstr "Argumentos de chamada extra:"
+msgstr "Argumentos Extra"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "APK Expansion"
-msgstr "Expressão"
+msgstr "Expansão APK"
#: platform/android/export/export_plugin.cpp
msgid "Salt"
msgstr "Sal"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Public Key"
-msgstr "Caminho da Chave Pública SSH"
+msgstr "Chave Pública"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Permissions"
-msgstr "Máscara de Emissão"
+msgstr "Permissões"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Custom Permissions"
-msgstr "Executar Cena Personalizada"
+msgstr "Permissões Personalizadas"
#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
@@ -18927,69 +18624,74 @@ msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "\"Use Custom Build\" têm de estar ativa para usar os plugins."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Hand Tracking\" is only valid when \"XR Mode\" is \"Oculus Mobile VrApi\" "
"or \"OpenXR\"."
msgstr ""
-"\"Rastreamento de Mão\" só é válido quando \"Modo Xr\" é \"Oculus Mobile "
-"VrApi\" ou \"OpenXR\"."
+"\"Hand Tracking\" só é válido quando o \"XR Mode\" é \"Oculus Mobile VrApi\" "
+"ou \"OpenXR\"."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "\"Passthrough\" is only valid when \"XR Mode\" is \"OpenXR\"."
-msgstr "\"Passthrough\" só é válido quando \"Modo Xr\" é \"OpenXR\"."
+msgstr "\"Passthrough\" só é válido quando o \"XR Mode\" é \"OpenXR\"."
#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr "\"Exportar AAB\" só é válido quando \"Use Custom Build\" está ativa."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Min SDK\" can only be overridden when \"Use Custom Build\" is enabled."
msgstr ""
-"Mudança de \"Min Sdk\" só é válida quando \"Use Custom Build\" está ativa."
+"\"Min SDK\" só pode ser substituído quando \"Usar Compilação Customizada\" "
+"está ativado."
#: platform/android/export/export_plugin.cpp
msgid "\"Min SDK\" should be a valid integer, but got \"%s\" which is invalid."
msgstr ""
+"\"Min SDK\" deve ser um número inteiro válido, mas obteve \"%s\" que é "
+"inválido."
#: platform/android/export/export_plugin.cpp
msgid ""
"\"Min SDK\" cannot be lower than %d, which is the version needed by the "
"Godot library."
msgstr ""
+"\"Min SDK\" não pode ser inferior a %d, que é a versão necessária para a "
+"biblioteca Godot."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Target SDK\" can only be overridden when \"Use Custom Build\" is enabled."
msgstr ""
-"Mudança de \"Target Sdk\" só é válida quando \"Use Custom Build\" está ativa."
+"\"Target SDK\" só pode ser substituído quando \"Usar Compilação "
+"Customizada\" está ativado."
#: platform/android/export/export_plugin.cpp
msgid ""
"\"Target SDK\" should be a valid integer, but got \"%s\" which is invalid."
msgstr ""
+"\"Target SDK\" deve ser um número inteiro válido, mas obteve \"%s\", que é "
+"inválido."
#: 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 é superior à versão padrão %d. Isso pode funcionar, mas "
+"não foi testado e pode ser instável."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "\"Target SDK\" version must be greater or equal to \"Min SDK\" version."
msgstr ""
-"Versão de \"Target Sdk\" tem de ser maior ou igual à versão de \"Min Sdk\"."
+"Versão do \"Target SDK\" precisa ser igual ou maior que a versão do \"Min "
+"SDK\"."
#: platform/android/export/export_plugin.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Code Signing"
-msgstr "Sinal"
+msgstr "Assinatura de Código"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19066,12 +18768,11 @@ msgstr ""
"menu 'Projeto'."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name."
msgstr ""
-"Incapaz de sobrescrever ficheiros res://android/build/res/*.xml com o nome "
-"do projeto"
+"Incapaz de sobrescrever os ficheiros res://android/build/res/*.xml com o "
+"nome do projeto."
#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project."
@@ -19107,9 +18808,8 @@ msgstr ""
"projeto gradle por resultados."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Package not found: \"%s\"."
-msgstr "Pacote não encontrado: '%s'"
+msgstr "Pacote não encontrado: \"%s\"."
#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
@@ -19134,9 +18834,8 @@ msgid "Adding files..."
msgstr "A adicionar ficheiros..."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files."
-msgstr "Incapaz de exportar ficheiros do projeto"
+msgstr "Não foi possível exportar os ficheiros do projeto."
#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
@@ -19219,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"
@@ -19232,9 +18930,8 @@ msgid "Code Sign Identity Release"
msgstr "Liberação de Identidade de Sinal de Código"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Method Release"
-msgstr "Modo exportação:"
+msgstr "Modo de Exportação Lançamento"
#: platform/iphone/export/export.cpp
msgid "Targeted Device Family"
@@ -19245,44 +18942,37 @@ msgid "Info"
msgstr "Informações"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Identifier"
-msgstr "Identificador Inválido:"
+msgstr "Identificador"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Signature"
-msgstr "Sinal"
+msgstr "Assinatura"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Short Version"
-msgstr "Versão"
+msgstr "Versão Curta"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Copyright"
-msgstr "Topo Direita"
+msgstr "Direitos Autorais"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Capabilities"
-msgstr "Colar Propriedades"
+msgstr "Capacidades"
#: platform/iphone/export/export.cpp
msgid "Access Wi-Fi"
msgstr "Acesso Wi-Fi"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Push Notifications"
-msgstr "Rotação aleatória:"
+msgstr "Notificações Push"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "User Data"
-msgstr "Interface do Utilizador"
+msgstr "Dados do Utilizador"
#: platform/iphone/export/export.cpp
msgid "Accessible From Files App"
@@ -19293,24 +18983,20 @@ msgid "Accessible From iTunes Sharing"
msgstr "Acessível a partir do Compartilhamento do iTunes"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Privacy"
-msgstr "Caminho da Chave Privada SSH"
+msgstr "Privacidade"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Camera Usage Description"
-msgstr "Descrição"
+msgstr "Descrição do Uso da Câmara"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Microphone Usage Description"
-msgstr "Descrições da Propriedade"
+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"
@@ -19353,45 +19039,37 @@ msgid "Use Launch Screen Storyboard"
msgstr "Use o Storyboard da Tela de Inicialização"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Image Scale Mode"
-msgstr "Modo Escalar"
+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
-#, fuzzy
msgid "Use Custom BG Color"
-msgstr "CustomNode"
+msgstr "Usar Cor Personalizada de Fundo"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom BG Color"
-msgstr "CustomNode"
+msgstr "Cor Personalizada de Fundo"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Icons"
-msgstr "Expandir Tudo"
+msgstr "Exportar Ícones"
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Prepare Templates"
-msgstr "Gerir Modelos"
+msgstr "Preparar Templates"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Export template not found."
-msgstr "Modelo de lançamento personalizado não encontrado."
+msgstr "Template exportado não encontrado."
#: platform/iphone/export/export.cpp
msgid "App Store Team ID not specified - cannot configure the project."
@@ -19415,48 +19093,40 @@ msgid "Run exported HTML in the system's default browser."
msgstr "Executar HTML exportado no navegador predefinido do sistema."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not open template for export: \"%s\"."
-msgstr "Incapaz de abrir modelo para exportação:"
+msgstr "Não foi possível abrir o modelo para exportação: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Invalid export template: \"%s\"."
-msgstr "Modelo de exportação inválido:"
+msgstr "Template de exportação inválido: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not write file: \"%s\"."
-msgstr "Incapaz de escrever ficheiro:"
+msgstr "Não foi possível escrever o ficheiro: \"%s\"."
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Icon Creation"
-msgstr "Definir Margem"
+msgstr "Criação de Ícone"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file: \"%s\"."
-msgstr "Incapaz de ler ficheiro:"
+msgstr "Não foi possível ler o ficheiro: \"%s\"."
#: platform/javascript/export/export.cpp
msgid "PWA"
msgstr "PWA"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Variant"
-msgstr "Separação:"
+msgstr "Variante"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Export Type"
-msgstr "Exportar"
+msgstr "Tipo de Exportação"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "VRAM Texture Compression"
-msgstr "Expressão"
+msgstr "Compressão de Texturas na VRAM"
#: platform/javascript/export/export.cpp
msgid "For Desktop"
@@ -19471,14 +19141,12 @@ msgid "HTML"
msgstr "HTML"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Export Icon"
-msgstr "Expandir Tudo"
+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"
@@ -19493,9 +19161,8 @@ msgid "Focus Canvas On Start"
msgstr "Focar Tela ao Iniciar"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Experimental Virtual Keyboard"
-msgstr "Filtrar sinais"
+msgstr "Teclado Virtual Experimental"
#: platform/javascript/export/export.cpp
msgid "Progressive Web App"
@@ -19518,19 +19185,16 @@ msgid "Icon 512 X 512"
msgstr "Ícone 512 X 512"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell: \"%s\"."
-msgstr "Incapaz de ler shell HTML:"
+msgstr "Não foi possível ler o shell HTML: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not create HTTP server directory: %s."
-msgstr "Incapaz de criar diretoria do servidor HTTP:"
+msgstr "Não foi possível criar o diretório do servidor HTTP: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server: %d."
-msgstr "Erro ao iniciar servidor HTTP:"
+msgstr "Erro ao iniciar o servidor HTTP: %d."
#: platform/javascript/export/export.cpp
msgid "Web"
@@ -19545,9 +19209,8 @@ msgid "HTTP Port"
msgstr "Porta HTTP"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Use SSL"
-msgstr "Usar Ajuste"
+msgstr "Usar SSL"
#: platform/javascript/export/export.cpp
msgid "SSL Key"
@@ -19576,27 +19239,24 @@ msgid "Invalid Info.plist, can't load."
msgstr "Geometria inválida, incapaz de criar polígono."
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Failed to create \"%s\" subfolder."
-msgstr "Não consegui criar pasta."
+msgstr "Falha ao criar sub-pasta \"%s\"."
#: platform/osx/export/codesign.cpp
msgid "Failed to extract thin binary."
msgstr "Falha ao extrair o binário fino."
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Invalid binary format."
-msgstr "Caminho base inválido."
+msgstr "Formato de binário inválido."
#: platform/osx/export/codesign.cpp
msgid "Already signed!"
msgstr "Já assinado!"
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Failed to process nested resources."
-msgstr "Falha ao carregar recurso."
+msgstr "Falha ao processar recursos aninhados."
#: platform/osx/export/codesign.cpp
msgid "Failed to create _CodeSignature subfolder."
@@ -19613,9 +19273,8 @@ msgid "Invalid entitlements file."
msgstr "Extensão inválida."
#: platform/osx/export/codesign.cpp
-#, fuzzy
msgid "Invalid executable file."
-msgstr "Extensão inválida."
+msgstr "Ficheiro executável inválido."
#: platform/osx/export/codesign.cpp
msgid "Can't resize signature load command."
@@ -19634,42 +19293,36 @@ msgid "Unknown object type."
msgstr "Tipo de objeto desconhecido."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "App Category"
-msgstr "Categoria:"
+msgstr "Categoria da App"
#: platform/osx/export/export.cpp
msgid "High Res"
msgstr "Alta resolução"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Location Usage Description"
-msgstr "Descrição"
+msgstr "Descrição do Uso da Localização"
#: platform/osx/export/export.cpp
msgid "Address Book Usage Description"
msgstr "Descrição de Uso do Catálogo de Endereços"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Calendar Usage Description"
-msgstr "Descrição"
+msgstr "Descrição do Uso do Calendário"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Photos Library Usage Description"
-msgstr "Descrições da Propriedade"
+msgstr "Descrição do Uso da Biblioteca de Fotos"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Desktop Folder Usage Description"
-msgstr "Descrições do Método"
+msgstr "Descrição do Uso da Pasta da Área de Trabalho"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Documents Folder Usage Description"
-msgstr "Descrições do Método"
+msgstr "Descrição do Uso da Pasta de Documentos"
#: platform/osx/export/export.cpp
msgid "Downloads Folder Usage Description"
@@ -19690,23 +19343,20 @@ msgstr "Nó"
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Identity"
-msgstr "Indentar à esquerda"
+msgstr "Identidade"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Timestamp"
-msgstr "Tempo"
+msgstr "Registo do Tempo"
#: platform/osx/export/export.cpp
msgid "Hardened Runtime"
msgstr "Tempo de Execução Reforçado"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Replace Existing Signature"
-msgstr "Substituir em Ficheiros"
+msgstr "Substituir Assinatura Existente"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19714,13 +19364,12 @@ msgid "Entitlements"
msgstr "Bugigangas"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Custom File"
-msgstr "CustomNode"
+msgstr "Ficheiro Personalizado"
#: platform/osx/export/export.cpp
msgid "Allow JIT Code Execution"
-msgstr ""
+msgstr "Permitir Execução de Código JIT"
#: platform/osx/export/export.cpp
msgid "Allow Unsigned Executable Memory"
@@ -19731,65 +19380,56 @@ msgid "Allow Dyld Environment Variables"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Disable Library Validation"
-msgstr "Desativar Botão"
+msgstr "Desativar Validação da Biblioteca"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Audio Input"
-msgstr "Adicionar entrada"
+msgstr "Entrada de Áudio"
#: platform/osx/export/export.cpp
msgid "Address Book"
-msgstr ""
+msgstr "Contatos"
#: platform/osx/export/export.cpp
msgid "Calendars"
-msgstr ""
+msgstr "Calendários"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Photos Library"
-msgstr "Exportar Biblioteca"
+msgstr "Biblioteca de Fotos"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Apple Events"
-msgstr "Adicionar evento"
+msgstr "Eventos Apple"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Debugging"
-msgstr "Depurar"
+msgstr "Depuração"
#: platform/osx/export/export.cpp
msgid "App Sandbox"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Network Server"
-msgstr "Analisador de Rede"
+msgstr "Servidor de Rede"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Network Client"
-msgstr "Analisador de Rede"
+msgstr "Cliente de Rede"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Device USB"
-msgstr "Aparelho"
+msgstr "Aparelho USB"
#: platform/osx/export/export.cpp
msgid "Device Bluetooth"
-msgstr ""
+msgstr "Bluetooth do Aparelho"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Downloads"
-msgstr "Descarrega"
+msgstr "Descarregas de Ficheiros"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19807,9 +19447,8 @@ msgid "Files Movies"
msgstr "Filtrar Tiles"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Custom Options"
-msgstr "Opções de Barramento"
+msgstr "Opções Personalizadas"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19818,7 +19457,7 @@ msgstr "Localização"
#: platform/osx/export/export.cpp
msgid "Apple ID Name"
-msgstr ""
+msgstr "Nome Apple ID"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19827,21 +19466,19 @@ msgstr "Senha"
#: platform/osx/export/export.cpp
msgid "Apple Team ID"
-msgstr ""
+msgstr "ID Apple Team"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not open icon file \"%s\"."
-msgstr "Incapaz de exportar ficheiros do projeto"
+msgstr "Não foi possível abrir o ficheiro de ícone \"%s\"."
#: platform/osx/export/export.cpp
msgid "Could not start xcrun executable."
msgstr "Não foi possível iniciar o executável xcrun."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization failed."
-msgstr "Localização"
+msgstr "Falha na notarização."
#: platform/osx/export/export.cpp
msgid "Notarization request UUID: \"%s\""
@@ -19858,6 +19495,8 @@ msgid ""
"You can check progress manually by opening a Terminal and running the "
"following command:"
msgstr ""
+"Pode verificar o progresso manualmente abrindo um Terminal e a executar o "
+"seguinte comando:"
#: platform/osx/export/export.cpp
msgid ""
@@ -19887,25 +19526,24 @@ msgid ""
"Could not start codesign executable, make sure Xcode command line tools are "
"installed."
msgstr ""
+"Não foi possível iniciar o executável codesign, tenha certeza que as "
+"utilidades de linha de comando do Xcode estão instaladas."
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "No identity found."
-msgstr "Ícones não encontrados."
+msgstr "Nenhuma identidade encontrada."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Cannot sign file %s."
-msgstr "Erro ao guardar ficheiro: %s"
+msgstr "Erro ao assinar o ficheiro %s."
#: platform/osx/export/export.cpp
msgid "Relative symlinks are not supported, exported \"%s\" might be broken!"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "DMG Creation"
-msgstr "Direções"
+msgstr "Criação de DMG"
#: platform/osx/export/export.cpp
msgid "Could not start hdiutil executable."
@@ -19913,11 +19551,11 @@ msgstr "Não foi possível iniciar o executável hdiutil."
#: platform/osx/export/export.cpp
msgid "`hdiutil create` failed - file exists."
-msgstr ""
+msgstr "`hdiutil create` falhou - o ficheiro existe."
#: platform/osx/export/export.cpp
msgid "`hdiutil create` failed."
-msgstr ""
+msgstr "`hdiutil create` falhou."
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19925,14 +19563,13 @@ msgid "Creating app bundle"
msgstr "A criar miniatura"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not find template app to export: \"%s\"."
-msgstr "Incapaz de encontrar modelo app para exportar:"
+msgstr ""
+"Não foi possível encontrar a aplicação de modelo para exportar: \"%s\"."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid export format."
-msgstr "Modelo de exportação inválido:"
+msgstr "Formato de exportação inválido."
#: platform/osx/export/export.cpp
msgid ""
@@ -19948,7 +19585,7 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "Making PKG"
-msgstr ""
+msgstr "Criando PKG"
#: platform/osx/export/export.cpp
msgid ""
@@ -19962,7 +19599,7 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "Making DMG"
-msgstr ""
+msgstr "Criando DMG"
#: platform/osx/export/export.cpp
msgid "Code signing DMG"
@@ -19970,7 +19607,7 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "Making ZIP"
-msgstr ""
+msgstr "Criando ZIP"
#: platform/osx/export/export.cpp
msgid ""
@@ -19983,9 +19620,8 @@ msgid "Sending archive for notarization"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "ZIP Creation"
-msgstr "Projeto"
+msgstr "Criação de ZIP"
#: platform/osx/export/export.cpp
msgid "Could not open file to read from path \"%s\"."
@@ -20039,6 +19675,8 @@ msgid ""
"Warning: Notarization is disabled. The exported project will be blocked by "
"Gatekeeper if it's downloaded from an unknown source."
msgstr ""
+"Aviso: Notarização está desativada. O projeto exportado será bloqueado pelo "
+"Gatekeeper se for descarregado de uma fonte desconhecida."
#: platform/osx/export/export.cpp
msgid ""
@@ -20068,70 +19706,78 @@ msgid ""
"Privacy: Microphone access is enabled, but usage description is not "
"specified."
msgstr ""
+"Privacidade: O acesso ao microfone está ativado, mas a descrição de uso não "
+"é especificada."
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Camera access is enabled, but usage description is not specified."
msgstr ""
+"Privacidade: O acesso à câmara está ativado, mas a descrição de uso não é "
+"especificada."
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Location information access is enabled, but usage description is "
"not specified."
msgstr ""
+"Privacidade: O acesso à localização está ativado, mas a descrição de uso não "
+"é especificada."
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Address book access is enabled, but usage description is not "
"specified."
msgstr ""
+"Privacidade: O acesso ao livro de endereços está ativado, mas a descrição de "
+"uso não é especificada."
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Calendar access is enabled, but usage description is not specified."
msgstr ""
+"Privacidade: O acesso ao calendário está ativado, mas a descrição de uso não "
+"é especificada."
#: platform/osx/export/export.cpp
msgid ""
"Privacy: Photo library access is enabled, but usage description is not "
"specified."
msgstr ""
+"Privacidade: O acesso à biblioteca de fotos está ativado, mas a descrição de "
+"uso não é especificada."
#: platform/osx/export/export.cpp
msgid "macOS"
-msgstr ""
+msgstr "macOS"
#: platform/osx/export/export.cpp
msgid "Force Builtin Codesign"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Architecture"
-msgstr "Adicionar uma entrada arquitetura"
+msgstr "Arquitetura"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Display Name"
-msgstr "Mostrar Tudo"
+msgstr "Nome de Exibição"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Short Name"
-msgstr "Nome do Script:"
+msgstr "Nome Curto"
#: platform/uwp/export/export.cpp
msgid "Publisher"
-msgstr ""
+msgstr "Publicadora"
#: platform/uwp/export/export.cpp
msgid "Publisher Display Name"
msgstr "Nome de Exibição do Editor"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Product GUID"
-msgstr "GUID do produto inválido."
+msgstr "GUID do produto"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20144,14 +19790,12 @@ msgid "Signing"
msgstr "Sinal"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Certificate"
-msgstr "Vértices:"
+msgstr "Certificado"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Algorithm"
-msgstr "Depurador"
+msgstr "Algoritmo"
#: platform/uwp/export/export.cpp
msgid "Major"
@@ -20167,26 +19811,24 @@ msgid "Build"
msgstr "Modo Régua"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Revision"
-msgstr "Expressão"
+msgstr "Revisão"
#: platform/uwp/export/export.cpp
msgid "Landscape"
-msgstr ""
+msgstr "Paisagem"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Portrait"
-msgstr "Inverter Portais"
+msgstr "Retrato"
#: platform/uwp/export/export.cpp
msgid "Landscape Flipped"
-msgstr ""
+msgstr "Paisagem Invertido"
#: platform/uwp/export/export.cpp
msgid "Portrait Flipped"
-msgstr ""
+msgstr "Retrato Invertido"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20195,33 +19837,31 @@ msgstr "Modo Escalar"
#: platform/uwp/export/export.cpp
msgid "Square 44 X 44 Logo"
-msgstr ""
+msgstr "Logo Quadrada 44 X 44"
#: platform/uwp/export/export.cpp
msgid "Square 71 X 71 Logo"
-msgstr ""
+msgstr "Logo Quadrada 71 X 71"
#: platform/uwp/export/export.cpp
msgid "Square 150 X 150 Logo"
-msgstr ""
+msgstr "Logo Quadrada 150 X 150"
#: platform/uwp/export/export.cpp
msgid "Square 310 X 310 Logo"
-msgstr ""
+msgstr "Logo Quadrada 310 X 310"
#: platform/uwp/export/export.cpp
msgid "Wide 310 X 150 Logo"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Splash Screen"
-msgstr "Chamadas de Desenho:"
+msgstr "Escrã de Abertura"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Tiles"
-msgstr "Ficheiro"
+msgstr "Tiles"
#: platform/uwp/export/export.cpp
msgid "Show Name On Square 150 X 150"
@@ -20240,6 +19880,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 ""
+"A versão Mono do Godot não suporta a plataforma UWP. Use a build padrão (sem "
+"suporte a C#) se deseja exportar para UWP."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -20301,7 +19943,7 @@ msgstr "Dimensões inválidas da imagem do ecrã inicial (deve ser 620x300)."
#: platform/uwp/export/export.cpp
msgid "UWP"
-msgstr ""
+msgstr "UWP"
#: platform/uwp/export/export.cpp platform/windows/export/export.cpp
#, fuzzy
@@ -20313,18 +19955,16 @@ msgid "Debug Certificate"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Debug Algorithm"
-msgstr "Depurador"
+msgstr "Algoritmo de Depuração"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Failed to rename temporary file \"%s\"."
-msgstr "Incapaz de remover ficheiro temporário:"
+msgstr "Falha ao renomear o ficheiro temporário \"%s\"."
#: platform/windows/export/export.cpp
msgid "Identity Type"
-msgstr ""
+msgstr "Tipo de Identidade"
#: platform/windows/export/export.cpp
msgid "Timestamp Server URL"
@@ -20336,42 +19976,36 @@ msgid "Digest Algorithm"
msgstr "Depurador"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Modify Resources"
-msgstr "Copiar Recurso"
+msgstr "Modificar Recursos"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "File Version"
-msgstr "Versão"
+msgstr "Versão do Ficheiro"
#: platform/windows/export/export.cpp
msgid "Product Version"
msgstr "Versão do Produto"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Company Name"
-msgstr "Nome do Nó:"
+msgstr "Nome da Empresa"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Product Name"
-msgstr "Nome do Projeto:"
+msgstr "Nome do Produto"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "File Description"
-msgstr "Descrição"
+msgstr "Descrição do Ficheiro"
#: platform/windows/export/export.cpp
msgid "Trademarks"
-msgstr ""
+msgstr "Marca Registada (Trademarks)"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Resources Modification"
-msgstr "Rotação aleatória:"
+msgstr "Modificações dos Recursos"
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20406,9 +20040,8 @@ msgid "Could not find osslsigncode executable at \"%s\"."
msgstr "Incapaz de encontrar keystore e exportar."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Invalid identity type."
-msgstr "Identificador Inválido:"
+msgstr "Tipo de identidade inválido."
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20428,9 +20061,8 @@ msgid "Signtool failed to sign executable: %s."
msgstr "Extensão inválida."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Failed to remove temporary file \"%s\"."
-msgstr "Incapaz de remover ficheiro temporário:"
+msgstr "Falha ao remover o ficheiro temporário \"%s\"."
#: platform/windows/export/export.cpp
msgid ""
@@ -20452,7 +20084,7 @@ msgstr "Versão de produto inválida:"
#: platform/windows/export/export.cpp
msgid "Windows executables cannot be >= 4 GiB."
-msgstr ""
+msgstr "Executáveis Windows não podem ser >= 4GiB."
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
#, fuzzy
@@ -20465,12 +20097,11 @@ msgstr ""
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
msgid "Executable \"pck\" section not found."
-msgstr ""
+msgstr "Secção executável \"pck\" não encontrada."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Windows"
-msgstr "Nova Janela"
+msgstr "Windows"
#: platform/windows/export/export.cpp
msgid "Rcedit"
@@ -20482,7 +20113,7 @@ msgstr ""
#: platform/windows/export/export.cpp
msgid "Wine"
-msgstr ""
+msgstr "Vinho"
#: platform/x11/export/export.cpp
msgid "32-bit executables cannot have embedded data >= 4 GiB."
@@ -20490,9 +20121,8 @@ msgstr ""
#: scene/2d/animated_sprite.cpp scene/3d/sprite_3d.cpp
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Frames"
-msgstr "Frame %"
+msgstr "Quadros"
#: scene/2d/animated_sprite.cpp
msgid ""
@@ -20504,21 +20134,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 "Escala"
+msgstr "Escalonamento da Velocidade"
#: 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 "Executar"
+msgstr "A executar"
#: scene/2d/animated_sprite.cpp scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
-#, fuzzy
msgid "Centered"
-msgstr "Centro"
+msgstr "Centralizado"
#: scene/2d/animated_sprite.cpp scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
#: scene/gui/texture_button.cpp scene/gui/texture_rect.cpp
@@ -20531,14 +20158,12 @@ msgid "Flip V"
msgstr ""
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Monitoring"
-msgstr "Monitor"
+msgstr "Monitorando"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Monitorable"
-msgstr "Monitor"
+msgstr "Monitorável"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
#, fuzzy
@@ -20551,9 +20176,8 @@ msgid "Space Override"
msgstr "Sobrepõe"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Gravity Point"
-msgstr "Gerar Pontos"
+msgstr "Ponto de Gravidade"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
#, fuzzy
@@ -20568,7 +20192,7 @@ msgstr "Pré-visualização Predefinida"
#: 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 "Gravidade"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
#, fuzzy
@@ -20580,46 +20204,40 @@ msgid "Angular Damp"
msgstr ""
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Audio Bus"
-msgstr "Adicionar barramento de áudio"
+msgstr "Canal de Áudio"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Override"
-msgstr "Sobrepõe"
+msgstr "Sobrescrever"
#: scene/2d/audio_stream_player_2d.cpp scene/audio/audio_stream_player.cpp
#: scene/gui/video_player.cpp servers/audio/effects/audio_effect_amplify.cpp
-#, fuzzy
msgid "Volume dB"
-msgstr "Volume"
+msgstr "Volume dB (decibéis)"
#: 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 "Escala"
+msgstr "Escalonamento de Pitch"
#: 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
-#, fuzzy
msgid "Autoplay"
-msgstr "Alternar reprodução automática"
+msgstr "Reproduzir automaticamente"
#: 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 "Fluxo Pausado"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/3d/light.cpp scene/3d/reflection_probe.cpp
#: scene/3d/visibility_notifier.cpp scene/3d/visual_instance.cpp
#: scene/resources/material.cpp
-#, fuzzy
msgid "Max Distance"
-msgstr "Distância de escolha:"
+msgstr "Distância Máxima"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/light.cpp
#, fuzzy
@@ -20628,39 +20246,33 @@ msgstr "Animação"
#: 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
-#, fuzzy
msgid "Bus"
-msgstr "Adicionar Barramento"
+msgstr "Canal"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
msgid "Area Mask"
msgstr ""
#: scene/2d/back_buffer_copy.cpp
-#, fuzzy
msgid "Copy Mode"
-msgstr "Copiar Nós"
+msgstr "Mode de Cópia"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Anchor Mode"
-msgstr "Modo Ícone"
+msgstr "Modo de Âncora"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Rotating"
-msgstr "Passo da rotação:"
+msgstr "Rotacionando"
#: scene/2d/camera_2d.cpp scene/2d/listener_2d.cpp scene/3d/camera.cpp
#: scene/3d/listener.cpp scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Current"
-msgstr "Atual:"
+msgstr "Atual"
#: scene/2d/camera_2d.cpp scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom"
-msgstr "Aumentar Zoom"
+msgstr "Zoom"
#: scene/2d/camera_2d.cpp scene/main/canvas_layer.cpp
#, fuzzy
@@ -20676,31 +20288,27 @@ msgstr "Modo Mover"
#: scene/2d/camera_2d.cpp
msgid "Limit"
-msgstr ""
+msgstr "Limite"
#: scene/2d/camera_2d.cpp scene/gui/control.cpp scene/gui/nine_patch_rect.cpp
#: scene/resources/style_box.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Left"
-msgstr "Topo Esquerda"
+msgstr "Esquerda"
#: scene/2d/camera_2d.cpp scene/gui/control.cpp scene/gui/nine_patch_rect.cpp
#: scene/resources/style_box.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Right"
-msgstr "Luz"
+msgstr "Direita"
#: scene/2d/camera_2d.cpp scene/gui/control.cpp scene/gui/nine_patch_rect.cpp
#: scene/resources/dynamic_font.cpp scene/resources/style_box.cpp
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Bottom"
-msgstr "Fundo Esquerda"
+msgstr "Embaixo"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Smoothed"
-msgstr "Smoothstep"
+msgstr "Suavizado"
#: scene/2d/camera_2d.cpp
#, fuzzy
@@ -20718,9 +20326,8 @@ msgid "Drag Margin V Enabled"
msgstr "Definir Margem"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Smoothing"
-msgstr "Smoothstep"
+msgstr "Suavizamento"
#: scene/2d/camera_2d.cpp
msgid "H"
@@ -20737,14 +20344,12 @@ msgid "Drag Margin"
msgstr "Definir Margem"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Draw Screen"
-msgstr "Chamadas de Desenho:"
+msgstr "Ecrã de Desenho"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Draw Limits"
-msgstr "Chamadas de Desenho:"
+msgstr "Limites de Desenho"
#: scene/2d/camera_2d.cpp
#, fuzzy
@@ -20763,9 +20368,8 @@ msgid "Light Mode"
msgstr "Direita Wide"
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Particles Animation"
-msgstr "Partículas"
+msgstr "Animação de Partículas"
#: scene/2d/canvas_item.cpp
msgid "Particles Anim H Frames"
@@ -20781,39 +20385,34 @@ msgid "Particles Anim Loop"
msgstr "Partículas"
#: scene/2d/canvas_item.cpp scene/3d/spatial.cpp
-#, fuzzy
msgid "Visibility"
-msgstr "Alternar visibilidade"
+msgstr "Visibilidade"
#: scene/2d/canvas_item.cpp scene/3d/spatial.cpp scene/gui/progress_bar.cpp
#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
-#, fuzzy
msgid "Visible"
-msgstr "Alternar visibilidade"
+msgstr "Visível"
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Self Modulate"
-msgstr "Povoar"
+msgstr "Auto Modular"
#: scene/2d/canvas_item.cpp
msgid "Show Behind Parent"
-msgstr ""
+msgstr "Mostrar Atrás do Pai"
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Show On Top"
-msgstr "Mostrar Origem"
+msgstr "Mostrar Em Cima"
#: scene/2d/canvas_item.cpp scene/2d/light_occluder_2d.cpp
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Light Mask"
-msgstr "Luz"
+msgstr "Máscara de Luz"
#: scene/2d/canvas_item.cpp
msgid "Use Parent Material"
-msgstr ""
+msgstr "Usar Material do Pai"
#: scene/2d/canvas_modulate.cpp
msgid ""
@@ -20835,9 +20434,8 @@ msgstr ""
"para definir a sua forma."
#: scene/2d/collision_object_2d.cpp
-#, fuzzy
msgid "Pickable"
-msgstr "Escolher Tile"
+msgstr "Pegável"
#: scene/2d/collision_polygon_2d.cpp
msgid ""
@@ -20879,9 +20477,8 @@ msgstr "Modo Régua"
#: scene/3d/collision_polygon.cpp scene/3d/collision_shape.cpp
#: scene/animation/animation_node_state_machine.cpp scene/gui/base_button.cpp
#: scene/gui/texture_button.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Disabled"
-msgstr "Item Desativado"
+msgstr "Desativado"
#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp
#, fuzzy
@@ -20929,9 +20526,8 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
-#, fuzzy
msgid "Emitting"
-msgstr "Configuração:"
+msgstr "Emitindo"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -20946,20 +20542,18 @@ msgstr "Nó OneShot"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
-#, fuzzy
msgid "Preprocess"
-msgstr "Pós-processamento"
+msgstr "Pré processamento"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
msgid "Explosiveness"
-msgstr ""
+msgstr "Explosividade"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
-#, fuzzy
msgid "Randomness"
-msgstr "Reinício aleatório (s):"
+msgstr "Aleatoriedade"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -20968,9 +20562,8 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
-#, fuzzy
msgid "Fixed FPS"
-msgstr "Ver FPS"
+msgstr "FPS Fixado"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -20980,24 +20573,22 @@ 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 "Desenhando"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
-#, fuzzy
msgid "Local Coords"
-msgstr "Projetos Locais"
+msgstr "Coordenadas Locais"
#: 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 "Ordem de Desenho"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Emission Shape"
-msgstr "Máscara de Emissão"
+msgstr "Forma de Emissão"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21010,9 +20601,8 @@ msgid "Rect Extents"
msgstr "Bugigangas"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
-#, fuzzy
msgid "Normals"
-msgstr "Formato"
+msgstr "Normais"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21022,51 +20612,45 @@ msgstr "Atribuir"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Direction"
-msgstr "Direções"
+msgstr "Direção"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Spread"
-msgstr ""
+msgstr "Espalhar"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Initial Velocity"
-msgstr "Inicializar"
+msgstr "Velocidade Inicial"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Velocity Random"
-msgstr "Vista Órbita Direita"
+msgstr "Velocidade Aleatória"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
msgid "Angular Velocity"
-msgstr ""
+msgstr "Velocidade Angular"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Velocity Curve"
-msgstr "Vista Órbita Direita"
+msgstr "Curva de Velocidade"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Orbit Velocity"
-msgstr "Vista Órbita Direita"
+msgstr "Velocidade Orbital"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Linear Accel"
-msgstr "Linear"
+msgstr "Aceleração Linear"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21076,23 +20660,22 @@ msgstr "Acel"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Accel Random"
-msgstr ""
+msgstr "Aceleração Aleatória"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Accel Curve"
-msgstr "Dividir Curva"
+msgstr "Curva de Aceleração"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Radial Accel"
-msgstr ""
+msgstr "Aceleração Radial"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Tangential Accel"
-msgstr ""
+msgstr "Aceleração Tangencial"
#: scene/2d/cpu_particles_2d.cpp scene/2d/joints_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/physics_body.cpp
@@ -21116,23 +20699,21 @@ msgstr "Dividir Curva"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp scene/3d/light.cpp
#: scene/resources/particles_material.cpp
msgid "Angle"
-msgstr ""
+msgstr "Ângulo"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Angle Random"
-msgstr ""
+msgstr "Ângulo Aleatório"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Angle Curve"
-msgstr "Fechar curva"
+msgstr "Curva do Ângulo"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
-#, fuzzy
msgid "Scale Amount"
-msgstr "Valor:"
+msgstr "Quantidade da Escala"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
msgid "Scale Amount Random"
@@ -21156,45 +20737,38 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Hue Variation"
-msgstr "Separação:"
+msgstr "Variação da Tonalidade"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Variation"
-msgstr "Separação:"
+msgstr "Variação"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Variation Random"
-msgstr "Separação:"
+msgstr "Variação Aleatória"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Variation Curve"
-msgstr "Separação:"
+msgstr "Curva de Variação"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Speed Random"
-msgstr "Escala"
+msgstr "Velocidade Aleatória"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Speed Curve"
-msgstr "Dividir Curva"
+msgstr "Curva de Velocidade"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Offset Random"
-msgstr "Compensação:"
+msgstr "Deslocamento Aleatório"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21223,14 +20797,12 @@ msgid "Node A and Node B must be different PhysicsBody2Ds"
msgstr "Nó A e Nó B têm de ser PhysicsBody2Ds diferentes"
#: scene/2d/joints_2d.cpp scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Node A"
-msgstr "Nó"
+msgstr "Nó A"
#: scene/2d/joints_2d.cpp scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Node B"
-msgstr "Nó"
+msgstr "Nó B"
#: scene/2d/joints_2d.cpp scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/light.cpp scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
@@ -21239,9 +20811,8 @@ msgid "Bias"
msgstr ""
#: scene/2d/joints_2d.cpp
-#, fuzzy
msgid "Disable Collision"
-msgstr "Desativar Botão"
+msgstr "Desativar Colisão"
#: scene/2d/joints_2d.cpp scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Softness"
@@ -21250,7 +20821,7 @@ msgstr ""
#: scene/2d/joints_2d.cpp scene/resources/animation.cpp
#: scene/resources/ray_shape.cpp scene/resources/segment_shape_2d.cpp
msgid "Length"
-msgstr ""
+msgstr "Comprimento"
#: scene/2d/joints_2d.cpp
#, fuzzy
@@ -21274,20 +20845,18 @@ msgstr ""
"\"Textura\"."
#: scene/2d/light_2d.cpp scene/3d/light.cpp scene/gui/reference_rect.cpp
-#, fuzzy
msgid "Editor Only"
-msgstr "Editor"
+msgstr "Somente Editor"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Texture Scale"
-msgstr "TextureRegion"
+msgstr "Escalonamento da Textura"
#: scene/2d/light_2d.cpp scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/light.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp scene/resources/sky.cpp
msgid "Energy"
-msgstr ""
+msgstr "Energia"
#: scene/2d/light_2d.cpp
msgid "Z Min"
@@ -21312,9 +20881,8 @@ msgid "Item Cull Mask"
msgstr ""
#: scene/2d/light_2d.cpp scene/3d/light.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Shadow"
-msgstr "Shader"
+msgstr "Sombra"
#: scene/2d/light_2d.cpp
#, fuzzy
@@ -21322,9 +20890,8 @@ msgid "Buffer Size"
msgstr "Vista de Trás"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Gradient Length"
-msgstr "Gradiente Editado"
+msgstr "Comprimento do Gradiente"
#: scene/2d/light_2d.cpp
#, fuzzy
@@ -21332,9 +20899,8 @@ msgid "Filter Smooth"
msgstr "Métodos de filtro"
#: scene/2d/light_occluder_2d.cpp
-#, fuzzy
msgid "Closed"
-msgstr "Fechar"
+msgstr "Fechado"
#: scene/2d/light_occluder_2d.cpp scene/resources/material.cpp
#, fuzzy
@@ -21353,28 +20919,24 @@ msgid "The occluder polygon for this occluder is empty. Please draw a polygon."
msgstr "O polígono oclusor deste oclusor está vazio. Desenhe um polígono."
#: scene/2d/line_2d.cpp
-#, fuzzy
msgid "Width Curve"
-msgstr "Dividir Curva"
+msgstr "Largura da Curva"
#: scene/2d/line_2d.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Default Color"
-msgstr "Predefinição"
+msgstr "Cor Padrão"
#: scene/2d/line_2d.cpp scene/resources/texture.cpp
msgid "Fill"
-msgstr ""
+msgstr "Preencher"
#: scene/2d/line_2d.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Gradient"
-msgstr "Gradiente Editado"
+msgstr "Gradiente"
#: scene/2d/line_2d.cpp
-#, fuzzy
msgid "Texture Mode"
-msgstr "TextureRegion"
+msgstr "Modo de Textura"
#: scene/2d/line_2d.cpp
msgid "Capping"
@@ -21391,14 +20953,12 @@ msgid "Begin Cap Mode"
msgstr "Modo Região"
#: scene/2d/line_2d.cpp
-#, fuzzy
msgid "End Cap Mode"
-msgstr "Modo Ajuste:"
+msgstr "Modo de Limite Final"
#: scene/2d/line_2d.cpp scene/2d/polygon_2d.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Border"
-msgstr "em ordem:"
+msgstr "Borda"
#: scene/2d/line_2d.cpp
msgid "Sharp Limit"
@@ -21406,7 +20966,7 @@ msgstr ""
#: scene/2d/line_2d.cpp
msgid "Round Precision"
-msgstr ""
+msgstr "Precisão do Arredondamento"
#: scene/2d/line_2d.cpp scene/2d/polygon_2d.cpp
#: scene/resources/dynamic_font.cpp
@@ -21426,9 +20986,8 @@ msgid "Cell Size"
msgstr ""
#: scene/2d/navigation_2d.cpp scene/3d/navigation.cpp
-#, fuzzy
msgid "Edge Connection Margin"
-msgstr "Editar Conexão:"
+msgstr "Margem de Ligação da Borda"
#: scene/2d/navigation_2d.cpp
msgid ""
@@ -21452,9 +21011,8 @@ msgid "Target Desired Distance"
msgstr ""
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Path Max Distance"
-msgstr "Distância de escolha:"
+msgstr "Distância Máxima do Caminho"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
#, fuzzy
@@ -21480,9 +21038,8 @@ msgid "Time Horizon"
msgstr "Inverter na Horizontal"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Max Speed"
-msgstr "Velocidade:"
+msgstr "Velocidade Máxima"
#: scene/2d/navigation_agent_2d.cpp
#, fuzzy
@@ -21491,9 +21048,8 @@ msgid ""
msgstr "O NavigationAgent2D pode ser apenas usado dentro de um nó Node2D."
#: scene/2d/navigation_obstacle_2d.cpp scene/3d/navigation_obstacle.cpp
-#, fuzzy
msgid "Estimate Radius"
-msgstr "Mudar Raio Externo do Toro"
+msgstr "Raio Estimado"
#: scene/2d/navigation_obstacle_2d.cpp
msgid ""
@@ -21531,18 +21087,16 @@ msgid "Rotation Degrees"
msgstr "Graus de Rotação"
#: scene/2d/node_2d.cpp scene/3d/spatial.cpp
-#, fuzzy
msgid "Global Rotation"
-msgstr "Constante Global"
+msgstr "Rotação Global"
#: scene/2d/node_2d.cpp
msgid "Global Rotation Degrees"
msgstr "Graus de Rotação Global"
#: scene/2d/node_2d.cpp
-#, fuzzy
msgid "Global Scale"
-msgstr "Escala aleatória:"
+msgstr "Escala Global"
#: scene/2d/node_2d.cpp scene/3d/spatial.cpp
#, fuzzy
@@ -21557,12 +21111,11 @@ msgstr "Ajuste Relativo"
#: scene/2d/parallax_background.cpp scene/gui/scroll_container.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Scroll"
-msgstr ""
+msgstr "Rolagem"
#: scene/2d/parallax_background.cpp
-#, fuzzy
msgid "Base Offset"
-msgstr "Compensação:"
+msgstr "Deslocamento Base"
#: scene/2d/parallax_background.cpp
#, fuzzy
@@ -21571,16 +21124,15 @@ msgstr "Usar Ajuste de Escala"
#: scene/2d/parallax_background.cpp
msgid "Limit Begin"
-msgstr ""
+msgstr "Início do Limite"
#: scene/2d/parallax_background.cpp
-#, fuzzy
msgid "Limit End"
-msgstr "No Fim"
+msgstr "Fim do limite"
#: scene/2d/parallax_background.cpp
msgid "Ignore Camera Zoom"
-msgstr ""
+msgstr "Ignorar Zoom da Câmara"
#: scene/2d/parallax_layer.cpp
msgid ""
@@ -21653,9 +21205,8 @@ msgstr ""
#: scene/2d/path_2d.cpp scene/3d/path.cpp scene/resources/sky.cpp
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Curve"
-msgstr "Dividir Curva"
+msgstr "Curva"
#: scene/2d/path_2d.cpp
msgid "PathFollow2D only works when set as a child of a Path2D node."
@@ -21663,48 +21214,41 @@ msgstr ""
"PathFollow2D apenas funciona quando definido como filho de um nó Path2D."
#: scene/2d/path_2d.cpp scene/3d/path.cpp
-#, fuzzy
msgid "Unit Offset"
-msgstr "Compensação da grelha:"
+msgstr "Deslocamento da Unidade"
#: scene/2d/path_2d.cpp scene/3d/camera.cpp scene/3d/path.cpp
-#, fuzzy
msgid "H Offset"
-msgstr "Compensação:"
+msgstr "Deslocamento H"
#: scene/2d/path_2d.cpp scene/3d/camera.cpp scene/3d/path.cpp
-#, fuzzy
msgid "V Offset"
-msgstr "Compensação:"
+msgstr "Deslocamento V"
#: scene/2d/path_2d.cpp scene/3d/path.cpp
msgid "Cubic Interp"
-msgstr ""
+msgstr "Interpolação Cúbica"
#: scene/2d/path_2d.cpp
msgid "Lookahead"
msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Layers"
-msgstr "Camada"
+msgstr "Camadas"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Constant Linear Velocity"
-msgstr "Inicializar"
+msgstr "Velocidade Linear Constante"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Constant Angular Velocity"
-msgstr "Inicializar"
+msgstr "Velocidade Angular Constante"
#: scene/2d/physics_body_2d.cpp scene/2d/tile_map.cpp scene/3d/physics_body.cpp
#: scene/resources/physics_material.cpp
-#, fuzzy
msgid "Friction"
-msgstr "Função"
+msgstr "Fricção"
#: scene/2d/physics_body_2d.cpp scene/2d/tile_map.cpp scene/3d/physics_body.cpp
#: scene/resources/physics_material.cpp
@@ -21717,9 +21261,8 @@ msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: scene/resources/world.cpp scene/resources/world_2d.cpp
-#, fuzzy
msgid "Default Gravity"
-msgstr "Pré-visualização Predefinida"
+msgstr "Gravidade Padrão"
#: scene/2d/physics_body_2d.cpp
msgid ""
@@ -21733,26 +21276,23 @@ msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Mass"
-msgstr ""
+msgstr "Massa"
#: scene/2d/physics_body_2d.cpp
-#, fuzzy
msgid "Inertia"
-msgstr "Vertical:"
+msgstr "Inércia"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Weight"
-msgstr "Luz"
+msgstr "Peso"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Gravity Scale"
-msgstr ""
+msgstr "Escala da Gravidade"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Custom Integrator"
-msgstr "CustomNode"
+msgstr "Integrador Customizado"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -21775,25 +21315,24 @@ msgid "Sleeping"
msgstr "Ajuste Inteligente"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Can Sleep"
-msgstr "Velocidade:"
+msgstr "Pode Dormir"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Damp"
-msgstr ""
+msgstr "Úmido"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Angular"
-msgstr ""
+msgstr "Angular"
#: scene/2d/physics_body_2d.cpp
msgid "Applied Forces"
-msgstr ""
+msgstr "Forças Aplicadas"
#: scene/2d/physics_body_2d.cpp
msgid "Torque"
-msgstr ""
+msgstr "Torque"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -21805,73 +21344,64 @@ msgid "Sync To Physics"
msgstr "Sincronizar com Física"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Moving Platform"
-msgstr "A mover saída"
+msgstr "Plataforma Móvel"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Apply Velocity On Leave"
-msgstr ""
+msgstr "Aplicar Velocidade ao Sair"
#: scene/2d/physics_body_2d.cpp scene/2d/touch_screen_button.cpp
#: scene/3d/physics_body.cpp scene/gui/texture_button.cpp
#: scene/resources/default_theme/default_theme.cpp
#: scene/resources/line_shape_2d.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Normal"
-msgstr "Formato"
+msgstr "Normal"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Remainder"
-msgstr "Renderizador:"
+msgstr "Restante"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Local Shape"
-msgstr "Localização"
+msgstr "Forma Local"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Collider"
-msgstr "Modo Colisão"
+msgstr "Colisor"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Collider ID"
-msgstr ""
+msgstr "ID do Colisor"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Collider RID"
-msgstr "RID inválido"
+msgstr "RID do Colisor"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Collider Shape"
-msgstr "Modo Colisão"
+msgstr "Forma do Colisor"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Collider Shape Index"
-msgstr "Modo Colisão"
+msgstr "Índice da Forma do Colisor"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Collider Velocity"
-msgstr "Vista Órbita Direita"
+msgstr "Velocidade do Colisor"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Collider Metadata"
-msgstr ""
+msgstr "Metadados do Colisor"
#: scene/2d/polygon_2d.cpp
msgid "Invert"
-msgstr ""
+msgstr "Inverter"
#: scene/2d/polygon_2d.cpp
#, fuzzy
@@ -21890,7 +21420,7 @@ msgstr "Bugigangas"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Exclude Parent"
-msgstr ""
+msgstr "Excluir Pai"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
#, fuzzy
@@ -21899,15 +21429,15 @@ msgstr "Criar Nó Shader"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Collide With"
-msgstr ""
+msgstr "Colidir com"
#: scene/2d/ray_cast_2d.cpp scene/3d/camera.cpp scene/3d/ray_cast.cpp
msgid "Areas"
-msgstr ""
+msgstr "Áreas"
#: scene/2d/ray_cast_2d.cpp scene/3d/camera.cpp scene/3d/ray_cast.cpp
msgid "Bodies"
-msgstr ""
+msgstr "Corpos"
#: scene/2d/remote_transform_2d.cpp
msgid "Path property must point to a valid Node2D node to work."
@@ -21916,14 +21446,12 @@ msgstr ""
"válido."
#: scene/2d/remote_transform_2d.cpp scene/3d/remote_transform.cpp
-#, fuzzy
msgid "Remote Path"
-msgstr "Remover Ponto"
+msgstr "Remover Caminho"
#: scene/2d/remote_transform_2d.cpp scene/3d/remote_transform.cpp
-#, fuzzy
msgid "Use Global Coordinates"
-msgstr "Próxima Coordenada"
+msgstr "Usar Coordenadas Globais"
#: scene/2d/skeleton_2d.cpp scene/3d/skeleton.cpp
#, fuzzy
@@ -21931,9 +21459,8 @@ msgid "Rest"
msgstr "Reiniciar"
#: scene/2d/skeleton_2d.cpp
-#, fuzzy
msgid "Default Length"
-msgstr "Tema Predefinido"
+msgstr "Comprimento Padrão"
#: scene/2d/skeleton_2d.cpp
msgid "This Bone2D chain should end at a Skeleton2D node."
@@ -21977,14 +21504,12 @@ msgstr ""
"RigidBody2D, KinematicBody2D, etc. para lhes dar uma forma."
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Tile Set"
-msgstr "TileSet"
+msgstr "Tile Set"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Quadrant Size"
-msgstr "Mudar tamanho da Câmara"
+msgstr "Tamanho do Quadrante"
#: scene/2d/tile_map.cpp
#, fuzzy
@@ -21997,9 +21522,8 @@ msgid "Half Offset"
msgstr "Inicializar"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Tile Origin"
-msgstr "Ver origem"
+msgstr "Origem do Tile"
#: scene/2d/tile_map.cpp
#, fuzzy
@@ -22007,51 +21531,44 @@ msgid "Y Sort"
msgstr "Ordenar"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Show Collision"
-msgstr "Colisão"
+msgstr "Mostrar Colisão"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Compatibility Mode"
-msgstr "Modo Prioridade"
+msgstr "Modo de Compatibilidade"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Centered Textures"
-msgstr "Funcionalidades Principais:"
+msgstr "Texturas Centradas"
#: scene/2d/tile_map.cpp
msgid "Cell Clip UV"
msgstr ""
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Use Parent"
-msgstr "Modo Colisão"
+msgstr "Usar Pai"
#: scene/2d/tile_map.cpp
msgid "Use Kinematic"
msgstr ""
#: scene/2d/touch_screen_button.cpp
-#, fuzzy
msgid "Shape Centered"
-msgstr "Ajustar ao Centro do Nó"
+msgstr "Forma Centralizada"
#: scene/2d/touch_screen_button.cpp
-#, fuzzy
msgid "Shape Visible"
-msgstr "Alternar Visibilidade"
+msgstr "Forma Visível"
#: scene/2d/touch_screen_button.cpp
msgid "Passby Press"
msgstr ""
#: scene/2d/touch_screen_button.cpp
-#, fuzzy
msgid "Visibility Mode"
-msgstr "Modo Prioridade"
+msgstr "Modo de Visibilidade"
#: scene/2d/visibility_notifier_2d.cpp
msgid ""
@@ -22062,23 +21579,20 @@ msgstr ""
"na cena raiz editada."
#: scene/2d/visibility_notifier_2d.cpp scene/3d/visibility_notifier.cpp
-#, fuzzy
msgid "Pause Animations"
-msgstr "Colar Animação"
+msgstr "Pausar Animações"
#: scene/2d/visibility_notifier_2d.cpp scene/3d/visibility_notifier.cpp
msgid "Freeze Bodies"
-msgstr ""
+msgstr "Congelar Corpos"
#: scene/2d/visibility_notifier_2d.cpp
-#, fuzzy
msgid "Pause Particles"
-msgstr "Partículas"
+msgstr "Pausar Partículas"
#: scene/2d/visibility_notifier_2d.cpp
-#, fuzzy
msgid "Pause Animated Sprites"
-msgstr "Colar Animação"
+msgstr "Pausar Sprites Animados"
#: scene/2d/visibility_notifier_2d.cpp
#, fuzzy
@@ -22108,7 +21622,7 @@ msgstr ""
#: scene/3d/arvr_nodes.cpp servers/arvr/arvr_positional_tracker.cpp
msgid "Rumble"
-msgstr ""
+msgstr "Vibrar"
#: scene/3d/arvr_nodes.cpp
msgid "ARVRController must have an ARVROrigin node as its parent."
@@ -22144,9 +21658,8 @@ msgid "ARVROrigin requires an ARVRCamera child node."
msgstr "ARVROrigin exige um nó filho ARVRCamera."
#: scene/3d/arvr_nodes.cpp servers/arvr_server.cpp
-#, fuzzy
msgid "World Scale"
-msgstr "Escala aleatória:"
+msgstr "Escala do Mundo"
#: scene/3d/audio_stream_player_3d.cpp
#, fuzzy
@@ -22155,24 +21668,23 @@ msgstr "Nó Animation"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Unit dB"
-msgstr ""
+msgstr "Unidade dB"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Unit Size"
-msgstr ""
+msgstr "Tamanho da Unidade"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Max dB"
-msgstr ""
+msgstr "Max dB"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Out Of Range Mode"
msgstr ""
#: scene/3d/audio_stream_player_3d.cpp
-#, fuzzy
msgid "Emission Angle"
-msgstr "Cores de Emissão"
+msgstr "Ângulo de Emissão"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Degrees"
@@ -22185,7 +21697,7 @@ msgstr "Animação"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Attenuation Filter"
-msgstr ""
+msgstr "Filtro de Atenuação"
#: scene/3d/audio_stream_player_3d.cpp
#: servers/audio/effects/audio_effect_chorus.cpp
@@ -22195,14 +21707,12 @@ msgstr ""
#: scene/3d/audio_stream_player_3d.cpp
#: servers/audio/effects/audio_effect_filter.cpp
-#, fuzzy
msgid "dB"
-msgstr "B"
+msgstr "dB"
#: scene/3d/audio_stream_player_3d.cpp
-#, fuzzy
msgid "Doppler"
-msgstr "Ativar Doppler"
+msgstr "Doppler"
#: scene/3d/audio_stream_player_3d.cpp
#, fuzzy
@@ -22212,7 +21722,7 @@ msgstr "Empacotamento"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/reflection_probe.cpp
msgid "Interior"
-msgstr ""
+msgstr "Interior"
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
@@ -22247,7 +21757,7 @@ msgstr "Bugigangas"
#: scene/3d/baked_lightmap.cpp
msgid "Tweaks"
-msgstr ""
+msgstr "Ajustes"
#: scene/3d/baked_lightmap.cpp
msgid "Bounces"
@@ -22258,18 +21768,16 @@ msgid "Bounce Indirect Energy"
msgstr ""
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Use Denoiser"
-msgstr "Filtro:"
+msgstr "Usar Redutor de Ruído"
#: scene/3d/baked_lightmap.cpp scene/resources/texture.cpp
msgid "Use HDR"
-msgstr ""
+msgstr "Usar HDR"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Use Color"
-msgstr "Cores"
+msgstr "Usar Cor"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -22277,38 +21785,32 @@ msgid "Default Texels Per Unit"
msgstr "Tema Predefinido"
#: scene/3d/baked_lightmap.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Atlas"
-msgstr "Novo Atlas"
+msgstr "Atlas"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generate"
-msgstr "Geral"
+msgstr "Gerar"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Max Size"
-msgstr "Tamanho:"
+msgstr "Tamanho Máximo"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Custom Sky"
-msgstr "CustomNode"
+msgstr "Céu Personalizado"
#: scene/3d/baked_lightmap.cpp
msgid "Custom Sky Rotation Degrees"
msgstr "Graus de Rotação do Céu Personalizado"
#: scene/3d/baked_lightmap.cpp scene/3d/ray_cast.cpp
-#, fuzzy
msgid "Custom Color"
-msgstr "CustomNode"
+msgstr "Cor Personalizada"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Custom Energy"
-msgstr "Mover Efeito de Barramento"
+msgstr "Energia Personalizada"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -22322,7 +21824,7 @@ msgstr "Navegação"
#: scene/3d/baked_lightmap.cpp
msgid "Image Path"
-msgstr ""
+msgstr "Caminho da Imagem"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -22330,13 +21832,12 @@ msgid "Light Data"
msgstr "Com Dados"
#: scene/3d/bone_attachment.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Bone Name"
-msgstr "Nome do Nó:"
+msgstr "Nome do Osso"
#: scene/3d/camera.cpp
msgid "Keep Aspect"
-msgstr ""
+msgstr "Manter Aspeto"
#: scene/3d/camera.cpp scene/3d/light.cpp scene/3d/reflection_probe.cpp
msgid "Cull Mask"
@@ -22348,18 +21849,16 @@ msgid "Doppler Tracking"
msgstr "Pista de Propriedades"
#: scene/3d/camera.cpp
-#, fuzzy
msgid "Projection"
-msgstr "Projeto"
+msgstr "Projeção"
#: scene/3d/camera.cpp
msgid "FOV"
-msgstr ""
+msgstr "FOV"
#: scene/3d/camera.cpp
-#, fuzzy
msgid "Frustum Offset"
-msgstr "Compensação da grelha:"
+msgstr "Deslocamento do Frustum"
#: scene/3d/camera.cpp
#, fuzzy
@@ -22368,16 +21867,15 @@ msgstr "Mais próximo"
#: scene/3d/camera.cpp
msgid "Far"
-msgstr ""
+msgstr "Longe"
#: 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
#: scene/resources/shape.cpp scene/resources/style_box.cpp
#: scene/resources/texture.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
-#, fuzzy
msgid "Margin"
-msgstr "Definir Margem"
+msgstr "Margem"
#: scene/3d/camera.cpp
#, fuzzy
@@ -22486,28 +21984,24 @@ msgid "Ring Axis"
msgstr "Avisos"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Rotate Y"
-msgstr "Rodar"
+msgstr "Rotacionar em Y"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Disable Z"
-msgstr "Item Desativado"
+msgstr "Desativar Z"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
msgid "Flatness"
msgstr ""
#: scene/3d/cull_instance.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Portals"
-msgstr "Inverter Portais"
+msgstr "Portais"
#: scene/3d/cull_instance.cpp
-#, fuzzy
msgid "Portal Mode"
-msgstr "Modo Prioridade"
+msgstr "Modo Portal"
#: scene/3d/cull_instance.cpp
msgid "Include In Bound"
@@ -22515,7 +22009,7 @@ msgstr ""
#: scene/3d/cull_instance.cpp
msgid "Allow Merging"
-msgstr ""
+msgstr "Permitir Junção"
#: scene/3d/cull_instance.cpp
#, fuzzy
@@ -22553,9 +22047,8 @@ msgid "Subdiv"
msgstr ""
#: scene/3d/gi_probe.cpp
-#, fuzzy
msgid "Dynamic Range"
-msgstr "Biblioteca Dinâmica"
+msgstr "Alcance Dinâmico"
#: scene/3d/gi_probe.cpp scene/3d/light.cpp
msgid "Normal Bias"
@@ -22563,9 +22056,8 @@ msgstr ""
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
#: scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Pixel Size"
-msgstr "Ajuste de Pixel"
+msgstr "Tamanho de Pixel"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Billboard"
@@ -22585,9 +22077,8 @@ msgid "No Depth Test"
msgstr ""
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Fixed Size"
-msgstr "Vista de Frente"
+msgstr "Tamanho Fixo"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Alpha Cut"
@@ -22614,19 +22105,16 @@ msgstr "Forçar modulação branca"
#: scene/3d/label_3d.cpp scene/resources/default_theme/default_theme.cpp
#: scene/resources/dynamic_font.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Font"
-msgstr "Fontes"
+msgstr "Fonte"
#: scene/3d/label_3d.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Horizontal Alignment"
-msgstr "Horizontal:"
+msgstr "Alinhamento Horizontal"
#: scene/3d/label_3d.cpp
-#, fuzzy
msgid "Vertical Alignment"
-msgstr "Filtrar sinais"
+msgstr "Alinhamento Vertical"
#: scene/3d/label_3d.cpp scene/gui/dialogs.cpp scene/gui/label.cpp
#, fuzzy
@@ -22634,14 +22122,12 @@ msgid "Autowrap"
msgstr "Carregamento automático"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Indirect Energy"
-msgstr "Cores de Emissão"
+msgstr "Energia Indireta"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Negative"
-msgstr "GDNative"
+msgstr "Negativo"
#: scene/3d/light.cpp scene/resources/material.cpp
#: scene/resources/visual_shader.cpp
@@ -22655,9 +22141,8 @@ msgid "Bake Mode"
msgstr "Modo Bitmask"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Contact"
-msgstr "Escolher cor"
+msgstr "Contato"
#: scene/3d/light.cpp
#, fuzzy
@@ -22665,29 +22150,24 @@ msgid "Reverse Cull Face"
msgstr "Repor Volume do Barramento"
#: scene/3d/light.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Directional Shadow"
-msgstr "Direções"
+msgstr "Sombra Direcional"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 1"
-msgstr "Separar"
+msgstr "Dividir 1"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 2"
-msgstr "Separar"
+msgstr "Dividir 2"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 3"
-msgstr "Separar"
+msgstr "Dividir 3"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Blend Splits"
-msgstr "Tempos de Mistura:"
+msgstr "Divisões de Mistura"
#: scene/3d/light.cpp
#, fuzzy
@@ -22695,9 +22175,8 @@ msgid "Bias Split Scale"
msgstr "Usar Ajuste de Escala"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Depth Range"
-msgstr "Profundidade"
+msgstr "Alcance de Profundidade"
#: scene/3d/light.cpp
msgid "Omni"
@@ -22719,12 +22198,11 @@ msgstr "Uma SpotLight com ângulo superior a 90 graus não cria sombras."
#: scene/3d/light.cpp
msgid "Spot"
-msgstr ""
+msgstr "Ponto"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Angle Attenuation"
-msgstr "Animação"
+msgstr "Atenuação Angular"
#: scene/3d/mesh_instance.cpp
msgid "Software Skinning"
@@ -22740,6 +22218,8 @@ msgid ""
"be removed in a future version. Use 'NavigationServer.map_get_path()' "
"instead."
msgstr ""
+"O nó 'Navigation' e 'Navigation.get_simple_path()' estão depreciados e serão "
+"removidos em versões futuras. Use 'NavigationServer.map_get_path()' no lugar."
#: scene/3d/navigation.cpp scene/resources/curve.cpp
#, fuzzy
@@ -22756,9 +22236,8 @@ msgid "Agent Height Offset"
msgstr ""
#: scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Ignore Y"
-msgstr "[Ignorar]"
+msgstr "Ignorar Y"
#: scene/3d/navigation_agent.cpp
#, fuzzy
@@ -22767,9 +22246,8 @@ msgid ""
msgstr "O NavigationAgent pode ser apenas usado dentro de um nó espacial."
#: scene/3d/navigation_mesh_instance.cpp scene/resources/mesh_library.cpp
-#, fuzzy
msgid "NavMesh"
-msgstr "Consolidar NavMesh"
+msgstr "NavMesh"
#: scene/3d/navigation_obstacle.cpp
#, fuzzy
@@ -22827,19 +22305,16 @@ msgstr ""
"definido como \"Billboard Particles\"."
#: scene/3d/particles.cpp
-#, fuzzy
msgid "Visibility AABB"
-msgstr "Alternar visibilidade"
+msgstr "Visibilidade AABB"
#: scene/3d/particles.cpp
-#, fuzzy
msgid "Draw Passes"
-msgstr "Chamadas de Desenho:"
+msgstr "Passos de Desenho"
#: scene/3d/particles.cpp
-#, fuzzy
msgid "Passes"
-msgstr "Chamadas de Desenho:"
+msgstr "Passos"
#: scene/3d/path.cpp
msgid "PathFollow only works when set as a child of a Path node."
@@ -22854,9 +22329,8 @@ msgstr ""
"Curva do Caminho do seu progenitor."
#: scene/3d/path.cpp
-#, fuzzy
msgid "Rotation Mode"
-msgstr "Modo Rodar"
+msgstr "Modo de Rotação"
#: scene/3d/physics_body.cpp
msgid ""
@@ -22874,46 +22348,40 @@ msgid "Axis Lock"
msgstr "Eixo"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear X"
-msgstr "Linear"
+msgstr "X Linear"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Y"
-msgstr "Linear"
+msgstr "Y Linear"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Z"
-msgstr "Linear"
+msgstr "Z Linear"
#: scene/3d/physics_body.cpp
msgid "Angular X"
-msgstr ""
+msgstr "X Angular"
#: scene/3d/physics_body.cpp
msgid "Angular Y"
-msgstr ""
+msgstr "Y Angular"
#: scene/3d/physics_body.cpp
msgid "Angular Z"
-msgstr ""
+msgstr "Z Angular"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion X"
-msgstr "Ação"
+msgstr "Movimento X"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion Y"
-msgstr "Ação"
+msgstr "Movimento Y"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion Z"
-msgstr "Ação"
+msgstr "Movimento Z"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -22935,14 +22403,12 @@ msgstr ""
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
#: scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Relaxation"
-msgstr "Separação:"
+msgstr "Relaxamento"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Enabled"
-msgstr "Filtrar sinais"
+msgstr "Limite Angular Ativado"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -23006,20 +22472,19 @@ msgstr "Animação"
#: scene/3d/physics_body.cpp
msgid "X"
-msgstr ""
+msgstr "X"
#: scene/3d/physics_body.cpp
msgid "Y"
-msgstr ""
+msgstr "Y"
#: scene/3d/physics_body.cpp
msgid "Z"
-msgstr ""
+msgstr "Z"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Limit Enabled"
-msgstr "Linear"
+msgstr "Limite Linear Ativado"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -23037,9 +22502,8 @@ msgid "Linear Spring Damping"
msgstr "Linear"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Equilibrium Point"
-msgstr "Linear"
+msgstr "Ponto de Equilíbrio Linear"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -23063,7 +22527,7 @@ msgstr "Animação"
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "ERP"
-msgstr ""
+msgstr "ERP"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -23080,12 +22544,11 @@ msgstr ""
#: scene/3d/physics_body.cpp
msgid "Angular Equilibrium Point"
-msgstr ""
+msgstr "Ponto de Equilíbrio Angular"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Body Offset"
-msgstr "Compensação:"
+msgstr "Deslocamento do Corpo"
#: scene/3d/physics_joint.cpp
msgid "Node A and Node B must be PhysicsBodies"
@@ -23112,18 +22575,16 @@ msgid "Solver"
msgstr ""
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Exclude Nodes"
-msgstr "Apagar Nós"
+msgstr "Excluir Nós"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Params"
-msgstr "Parâmetro Alterado:"
+msgstr "Parâmetros"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit"
-msgstr ""
+msgstr "Limite Angular"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23145,24 +22606,20 @@ msgid "Target Velocity"
msgstr "Vista Órbita Direita"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Max Impulse"
-msgstr "Velocidade:"
+msgstr "Impulso Máximo"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Limit"
-msgstr "Linear"
+msgstr "Limite Linear"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Upper Distance"
-msgstr "Distância de escolha:"
+msgstr "Distância mais Alta"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Lower Distance"
-msgstr "Distância de escolha:"
+msgstr "Distância mais Baixa"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23195,9 +22652,8 @@ msgid "Angular Motion"
msgstr "Animação"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Angular Ortho"
-msgstr "Máximo de Erros Angulares:"
+msgstr "Orto Angular"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23210,9 +22666,8 @@ msgid "Linear Motor X"
msgstr "Inicializar"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Force Limit"
-msgstr "Chamadas de Desenho:"
+msgstr "Limite de Força"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23221,7 +22676,7 @@ msgstr "Linear"
#: scene/3d/physics_joint.cpp
msgid "Equilibrium Point"
-msgstr ""
+msgstr "Ponto de Equilíbrio"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit X"
@@ -23310,9 +22765,8 @@ msgid "Two Way"
msgstr ""
#: scene/3d/portal.cpp
-#, fuzzy
msgid "Linked Room"
-msgstr "Raiz de Edição ao Vivo:"
+msgstr "Sala Vinculada"
#: scene/3d/portal.cpp
#, fuzzy
@@ -23320,18 +22774,16 @@ msgid "Use Default Margin"
msgstr "Predefinição"
#: scene/3d/proximity_group.cpp
-#, fuzzy
msgid "Group Name"
-msgstr "Agrupado"
+msgstr "Nome do Grupo"
#: scene/3d/proximity_group.cpp
msgid "Dispatch Mode"
msgstr ""
#: scene/3d/proximity_group.cpp
-#, fuzzy
msgid "Grid Radius"
-msgstr "Raio:"
+msgstr "Raio da Grade"
#: scene/3d/ray_cast.cpp
#, fuzzy
@@ -23340,7 +22792,7 @@ msgstr "Depurador"
#: scene/3d/ray_cast.cpp scene/resources/style_box.cpp
msgid "Thickness"
-msgstr ""
+msgstr "Espessura"
#: scene/3d/reflection_probe.cpp scene/main/viewport.cpp
#, fuzzy
@@ -23348,9 +22800,8 @@ msgid "Update Mode"
msgstr "Modo Rodar"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Origin Offset"
-msgstr "Compensação da grelha:"
+msgstr "Deslocamento da Origem"
#: scene/3d/reflection_probe.cpp
#, fuzzy
@@ -23358,19 +22809,16 @@ msgid "Box Projection"
msgstr "Projeto"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Enable Shadows"
-msgstr "Ativar Ajuste"
+msgstr "Ativar Sombras"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Ambient Color"
-msgstr "Escolher cor"
+msgstr "Cor Ambiente"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Ambient Energy"
-msgstr "Cores de Emissão"
+msgstr "Energia Ambiente"
#: scene/3d/reflection_probe.cpp
#, fuzzy
@@ -23448,38 +22896,34 @@ msgstr "Só deve existir um RoomManager na SceneTree."
#: scene/3d/room_manager.cpp
msgid "Main"
-msgstr ""
+msgstr "Principal"
#: scene/3d/room_manager.cpp scene/animation/animation_blend_tree.cpp
#: scene/animation/animation_player.cpp scene/animation/animation_tree.cpp
#: scene/animation/animation_tree_player.cpp
#: servers/audio/effects/audio_effect_delay.cpp
-#, fuzzy
msgid "Active"
-msgstr "Ação"
+msgstr "Ativo"
#: scene/3d/room_manager.cpp
msgid "Roomlist"
msgstr ""
#: scene/3d/room_manager.cpp servers/visual_server.cpp
-#, fuzzy
msgid "PVS"
-msgstr "FPS"
+msgstr "PVS"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "PVS Mode"
-msgstr "Modo deslocamento"
+msgstr "Modo PVS"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "PVS Filename"
-msgstr "Ficheiro ZIP"
+msgstr "Nome do Ficheiro PVS"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
msgid "Gameplay"
-msgstr ""
+msgstr "Jogabilidade"
#: scene/3d/room_manager.cpp
#, fuzzy
@@ -23487,19 +22931,16 @@ msgid "Gameplay Monitor"
msgstr "Monitor"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Use Secondary PVS"
-msgstr "Usar Ajuste de Escala"
+msgstr "Usar PVS Secundário"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Merge Meshes"
-msgstr "Malha"
+msgstr "Mesclar Malhas"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Show Margins"
-msgstr "Mostrar Origem"
+msgstr "Mostrar Margens"
#: scene/3d/room_manager.cpp
#, fuzzy
@@ -23511,18 +22952,16 @@ msgid "Overlap Warning Threshold"
msgstr ""
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Preview Camera"
-msgstr "Pré-visualização"
+msgstr "Visualizar Câmara"
#: scene/3d/room_manager.cpp
msgid "Portal Depth Limit"
msgstr ""
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Default Portal Margin"
-msgstr "Definir Margem"
+msgstr "Margem Padrão de Portal"
#: scene/3d/room_manager.cpp
#, fuzzy
@@ -23607,9 +23046,8 @@ msgid "Spatial Attachment Path"
msgstr ""
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Physics Enabled"
-msgstr "Frame de Física %"
+msgstr "Física Ativada"
#: scene/3d/soft_body.cpp
#, fuzzy
@@ -23621,9 +23059,8 @@ msgid "Simulation Precision"
msgstr "Precisão da Simulação"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Total Mass"
-msgstr "Total:"
+msgstr "Massa Total"
#: scene/3d/soft_body.cpp
msgid "Linear Stiffness"
@@ -23639,7 +23076,7 @@ msgstr ""
#: scene/3d/soft_body.cpp
msgid "Pressure Coefficient"
-msgstr ""
+msgstr "Coeficiente de Pressão"
#: scene/3d/soft_body.cpp
msgid "Damping Coefficient"
@@ -23668,18 +23105,16 @@ msgstr ""
"Em vez disso, mude o tamanho das formas de colisão filhas."
#: scene/3d/spatial.cpp
-#, fuzzy
msgid "Global Translation"
-msgstr "Manter Transformação Global"
+msgstr "Transformação Global"
#: scene/3d/spatial.cpp
msgid "Matrix"
-msgstr ""
+msgstr "Matriz"
#: scene/3d/spatial.cpp
-#, fuzzy
msgid "Gizmo"
-msgstr "Bugigangas"
+msgstr "Gizmo"
#: scene/3d/spatial_velocity_tracker.cpp
#, fuzzy
@@ -23692,12 +23127,11 @@ msgstr ""
#: scene/3d/sprite_3d.cpp scene/gui/graph_edit.cpp
msgid "Opacity"
-msgstr ""
+msgstr "Opacidade"
#: scene/3d/sprite_3d.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Transparent"
-msgstr "Transpor"
+msgstr "Transparente"
#: scene/3d/sprite_3d.cpp
msgid ""
@@ -23721,13 +23155,12 @@ msgid "Per-Wheel Motion"
msgstr "Botão roda para baixo"
#: scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Engine Force"
-msgstr "Documentação Online"
+msgstr "Força do Motor"
#: scene/3d/vehicle_body.cpp
msgid "Brake"
-msgstr ""
+msgstr "Freio"
#: scene/3d/vehicle_body.cpp
msgid "Steering"
@@ -23738,9 +23171,8 @@ msgid "VehicleBody Motion"
msgstr ""
#: scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Use As Traction"
-msgstr "Separação:"
+msgstr "Usar Como Tração"
#: scene/3d/vehicle_body.cpp
msgid "Use As Steering"
@@ -23760,9 +23192,8 @@ msgid "Friction Slip"
msgstr "Função"
#: scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Suspension"
-msgstr "Expressão"
+msgstr "Suspensão"
#: scene/3d/vehicle_body.cpp
#, fuzzy
@@ -23771,12 +23202,21 @@ msgstr "Erro"
#: scene/3d/visibility_notifier.cpp
msgid "AABB"
-msgstr ""
+msgstr "AABB"
-#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
+#: scene/3d/visual_instance.cpp
#, fuzzy
+msgid "Sorting"
+msgstr "Ordenar"
+
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Use AABB Center"
+msgstr "Usar Ambiente"
+
+#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
-msgstr "Repetir"
+msgstr "Geometria"
#: scene/3d/visual_instance.cpp
#, fuzzy
@@ -23784,9 +23224,8 @@ msgid "Material Override"
msgstr "Sobrepõe"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Material Overlay"
-msgstr "Mudanças de Material:"
+msgstr "Sobreposição do Material"
#: scene/3d/visual_instance.cpp
#, fuzzy
@@ -23794,9 +23233,8 @@ msgid "Cast Shadow"
msgstr "Criar Nó Shader"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Extra Cull Margin"
-msgstr "Argumentos de chamada extra:"
+msgstr "Margem de Descarte Extra"
#: scene/3d/visual_instance.cpp
#, fuzzy
@@ -23814,13 +23252,12 @@ msgstr ""
#: scene/3d/visual_instance.cpp
msgid "LOD"
-msgstr ""
+msgstr "LOD (Nível de Detalhe)"
#: scene/3d/visual_instance.cpp scene/animation/skeleton_ik.cpp
#: scene/resources/material.cpp
-#, fuzzy
msgid "Min Distance"
-msgstr "Distância de escolha:"
+msgstr "Distância Mínima"
#: scene/3d/visual_instance.cpp
msgid "Min Hysteresis"
@@ -23867,33 +23304,28 @@ msgid "Mix Mode"
msgstr "Nó Mix"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Fadein Time"
-msgstr "Tempo X-Fade (s):"
+msgstr "Tempo de Esmaecer de Entrada"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Fadeout Time"
-msgstr "Tempo X-Fade (s):"
+msgstr "Tempo de Esmaecer de Saída"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Auto Restart"
-msgstr "Reinício automático:"
+msgstr "Reinício Automático"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Autorestart"
-msgstr "Reinício automático:"
+msgstr "Reinício Automático"
#: scene/animation/animation_blend_tree.cpp
msgid "Delay"
-msgstr ""
+msgstr "Atraso"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Random Delay"
-msgstr "Inclinação aleatória:"
+msgstr "Atraso Aleatório"
#: scene/animation/animation_blend_tree.cpp
#, fuzzy
@@ -23917,9 +23349,8 @@ msgstr "Adicionar Porta de Entrada"
#: scene/animation/animation_blend_tree.cpp
#: scene/animation/animation_node_state_machine.cpp
-#, fuzzy
msgid "Xfade Time"
-msgstr "Tempo X-Fade (s):"
+msgstr "Tempo do Esmaecer Cruzado"
#: scene/animation/animation_node_state_machine.cpp
#, fuzzy
@@ -23952,7 +23383,7 @@ msgstr "Adicionar Animação"
#: scene/animation/animation_player.cpp
msgid "Reset On Save"
-msgstr ""
+msgstr "Redefinir ao Gravar"
#: scene/animation/animation_player.cpp
#, fuzzy
@@ -23965,9 +23396,8 @@ msgid "Current Animation Position"
msgstr "Adicionar Ponto Animação"
#: scene/animation/animation_player.cpp
-#, fuzzy
msgid "Playback Options"
-msgstr "Opções da Classe:"
+msgstr "Opções de Playback"
#: scene/animation/animation_player.cpp
#, fuzzy
@@ -24009,9 +23439,8 @@ msgid "The AnimationPlayer root node is not a valid node."
msgstr "O nó raiz de AnimationPlayer não é um nó válido."
#: scene/animation/animation_tree.cpp
-#, fuzzy
msgid "Tree Root"
-msgstr "Criar Nó Raiz:"
+msgstr "Nó Raiz"
#: scene/animation/animation_tree.cpp
#, fuzzy
@@ -24067,9 +23496,8 @@ msgid "Tip Bone"
msgstr "Ossos"
#: scene/animation/skeleton_ik.cpp
-#, fuzzy
msgid "Interpolation"
-msgstr "Modo de Interpolação"
+msgstr "Interpolação"
#: scene/animation/skeleton_ik.cpp
#, fuzzy
@@ -24122,7 +23550,7 @@ msgstr "Modo Seleção"
#: scene/gui/aspect_ratio_container.cpp scene/gui/box_container.cpp
msgid "Alignment"
-msgstr ""
+msgstr "Alinhamento"
#: scene/gui/base_button.cpp
#, fuzzy
@@ -24160,11 +23588,11 @@ msgstr "Copiar Texto"
#: scene/gui/button.cpp scene/gui/label.cpp scene/gui/line_edit.cpp
#: scene/gui/spin_box.cpp
msgid "Align"
-msgstr ""
+msgstr "Alinhar"
#: scene/gui/button.cpp
msgid "Icon Align"
-msgstr ""
+msgstr "Alinhamento do Ícone"
#: scene/gui/button.cpp
#, fuzzy
@@ -24268,14 +23696,12 @@ msgid "Grow Direction"
msgstr "Direções"
#: scene/gui/control.cpp scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Min Size"
-msgstr "Tamanho do contorno:"
+msgstr "Tamanho Mínimo"
#: scene/gui/control.cpp
-#, fuzzy
msgid "Pivot Offset"
-msgstr "Compensação da grelha:"
+msgstr "Deslocamento do Pivô"
#: scene/gui/control.cpp
#, fuzzy
@@ -24323,7 +23749,7 @@ msgstr "Anterior"
#: scene/gui/control.cpp
msgid "Mouse"
-msgstr ""
+msgstr "Rato"
#: scene/gui/control.cpp
msgid "Default Cursor Shape"
@@ -24349,7 +23775,7 @@ msgstr "Propriedades do Tema"
#: scene/gui/dialogs.cpp
msgid "Window Title"
-msgstr ""
+msgstr "Título da Janela"
#: scene/gui/dialogs.cpp
#, fuzzy
@@ -24383,14 +23809,12 @@ msgid "Right Disconnects"
msgstr "Desligar"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Scroll Offset"
-msgstr "Compensação da grelha:"
+msgstr "Deslocamento da Rolagem"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Snap Distance"
-msgstr "Distância de escolha:"
+msgstr "Distância de Encaixe"
#: scene/gui/graph_edit.cpp
#, fuzzy
@@ -24415,7 +23839,7 @@ msgstr "Mostrar ossos"
#: scene/gui/graph_edit.cpp scene/gui/text_edit.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Minimap"
-msgstr ""
+msgstr "Mini-Mapa"
#: scene/gui/graph_edit.cpp
msgid "Enable grid minimap."
@@ -24488,9 +23912,8 @@ msgid "Fixed Column Width"
msgstr ""
#: scene/gui/item_list.cpp
-#, fuzzy
msgid "Icon Scale"
-msgstr "Escala aleatória:"
+msgstr "Escala de Ícone"
#: scene/gui/item_list.cpp
#, fuzzy
@@ -24503,9 +23926,8 @@ msgid "V Align"
msgstr "Atribuir"
#: scene/gui/label.cpp scene/gui/rich_text_label.cpp
-#, fuzzy
msgid "Visible Characters"
-msgstr "Caracteres válidos:"
+msgstr "Caracteres Visiveis"
#: scene/gui/label.cpp scene/gui/rich_text_label.cpp
#, fuzzy
@@ -24529,9 +23951,8 @@ msgid "Secret"
msgstr ""
#: scene/gui/line_edit.cpp
-#, fuzzy
msgid "Secret Character"
-msgstr "Caracteres válidos:"
+msgstr "Caracteres Secretos"
#: scene/gui/line_edit.cpp
msgid "Expand To Text Length"
@@ -24584,24 +24005,23 @@ msgstr "Carregar como marcador de posição"
#: scene/gui/line_edit.cpp
msgid "Alpha"
-msgstr ""
+msgstr "Alfa"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Caret"
-msgstr ""
+msgstr "Circunflexo"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink"
-msgstr ""
+msgstr "Piscar"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Blink Speed"
-msgstr "Velocidade:"
+msgstr "Velocidade de Piscar"
#: scene/gui/link_button.cpp
msgid "Underline"
-msgstr ""
+msgstr "Sublinhado"
#: scene/gui/menu_button.cpp
#, fuzzy
@@ -24683,9 +24103,8 @@ msgid "Allow Search"
msgstr "Procurar"
#: scene/gui/progress_bar.cpp
-#, fuzzy
msgid "Percent"
-msgstr "Recente:"
+msgstr "Percentagem"
#: scene/gui/range.cpp
msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."
@@ -24744,9 +24163,8 @@ msgid "Absolute Index"
msgstr "Indentação Automática"
#: scene/gui/rich_text_effect.cpp
-#, fuzzy
msgid "Elapsed Time"
-msgstr "Tempos de Mistura:"
+msgstr "Tempo Decorrido"
#: scene/gui/rich_text_effect.cpp
#, fuzzy
@@ -24754,9 +24172,8 @@ msgid "Env"
msgstr "Fim"
#: scene/gui/rich_text_effect.cpp
-#, fuzzy
msgid "Character"
-msgstr "Caracteres válidos:"
+msgstr "Caractere"
#: scene/gui/rich_text_label.cpp
msgid "BBCode"
@@ -24767,9 +24184,8 @@ msgid "Meta Underlined"
msgstr ""
#: scene/gui/rich_text_label.cpp
-#, fuzzy
msgid "Tab Size"
-msgstr "Tamanho:"
+msgstr "Tamanho da Tabulação"
#: scene/gui/rich_text_label.cpp
#, fuzzy
@@ -24790,9 +24206,8 @@ msgid "Selection Enabled"
msgstr "Apenas seleção"
#: scene/gui/rich_text_label.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Override Selected Font Color"
-msgstr "Configurar Perfil Selecionado:"
+msgstr "Sobrescrever Cor da Fonte Selecionada"
#: scene/gui/rich_text_label.cpp
#, fuzzy
@@ -24820,9 +24235,8 @@ msgid "Follow Focus"
msgstr "Povoar superfície"
#: scene/gui/scroll_container.cpp
-#, fuzzy
msgid "Horizontal Enabled"
-msgstr "Horizontal:"
+msgstr "Horizontal Ativado"
#: scene/gui/scroll_container.cpp
#, fuzzy
@@ -24843,24 +24257,20 @@ msgid "Tick Count"
msgstr "Escolher cor"
#: scene/gui/slider.cpp
-#, fuzzy
msgid "Ticks On Borders"
-msgstr "em ordem:"
+msgstr "Pontos Nas Bordas"
#: scene/gui/spin_box.cpp
-#, fuzzy
msgid "Prefix"
-msgstr "Prefixo:"
+msgstr "Prefixo"
#: scene/gui/spin_box.cpp
-#, fuzzy
msgid "Suffix"
-msgstr "Sufixo:"
+msgstr "Sufixo"
#: scene/gui/split_container.cpp
-#, fuzzy
msgid "Split Offset"
-msgstr "Compensação da grelha:"
+msgstr "Deslocamento de Divisão"
#: scene/gui/split_container.cpp scene/gui/tree.cpp
#, fuzzy
@@ -24877,9 +24287,8 @@ msgid "Tab Align"
msgstr ""
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
-#, fuzzy
msgid "Current Tab"
-msgstr "Atual:"
+msgstr "Guia Atual"
#: scene/gui/tab_container.cpp
#, fuzzy
@@ -24891,9 +24300,8 @@ msgid "All Tabs In Front"
msgstr ""
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
-#, fuzzy
msgid "Drag To Rearrange Enabled"
-msgstr "Arrastar e largar para reorganizar."
+msgstr "Arrastar Para Reorganizar Ativado"
#: scene/gui/tab_container.cpp
msgid "Use Hidden Tabs For Min Size"
@@ -24922,9 +24330,8 @@ msgid "Breakpoint Gutter"
msgstr "Saltar Pontos de Paragem"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Fold Gutter"
-msgstr "Pasta:"
+msgstr "Espaçamento de Dobra"
#: scene/gui/text_edit.cpp
#, fuzzy
@@ -24942,19 +24349,16 @@ msgid "Wrap Enabled"
msgstr "Ativar"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Scroll Vertical"
-msgstr "Vertical:"
+msgstr "Scroll Vertical"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Scroll Horizontal"
-msgstr "Horizontal:"
+msgstr "Scroll Horizontal"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Draw"
-msgstr "Chamadas de Desenho:"
+msgstr "Desenhar"
#: scene/gui/text_edit.cpp
#, fuzzy
@@ -25012,9 +24416,8 @@ msgid "Progress Offset"
msgstr ""
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Fill Mode"
-msgstr "Modo Jogo:"
+msgstr "Modo de Preenchimento"
#: scene/gui/texture_progress.cpp scene/resources/material.cpp
msgid "Tint"
@@ -25030,9 +24433,8 @@ msgid "Initial Angle"
msgstr "Inicializar"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Fill Degrees"
-msgstr "A rodar %s graus."
+msgstr "Graus de Preenchimento"
#: scene/gui/texture_progress.cpp scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -25083,9 +24485,8 @@ msgid "Hide Folding"
msgstr "Desativar Botão"
#: scene/gui/tree.cpp
-#, fuzzy
msgid "Hide Root"
-msgstr "Criar Nó Raiz:"
+msgstr "Esconder Raiz"
#: scene/gui/tree.cpp
msgid "Drop Mode Flags"
@@ -25098,7 +24499,7 @@ msgstr "Adicionar Pista"
#: scene/gui/video_player.cpp scene/main/scene_tree.cpp scene/main/timer.cpp
msgid "Paused"
-msgstr ""
+msgstr "Pausado"
#: scene/gui/video_player.cpp
#, fuzzy
@@ -25139,9 +24540,8 @@ msgid "Max Redirects"
msgstr ""
#: scene/main/http_request.cpp
-#, fuzzy
msgid "Timeout"
-msgstr "Tempo expirado."
+msgstr "Tempo esgotado"
#: scene/main/node.cpp
msgid ""
@@ -25156,7 +24556,7 @@ msgstr "Separador Nomeado"
#: scene/main/node.cpp
msgid "Name Casing"
-msgstr ""
+msgstr "Capitalização do Nome"
#: scene/main/node.cpp
#, fuzzy
@@ -25169,9 +24569,8 @@ msgid "Pause Mode"
msgstr "Modo deslocamento"
#: scene/main/node.cpp
-#, fuzzy
msgid "Physics Interpolation Mode"
-msgstr "Modo de Interpolação"
+msgstr "Modo de Interpolação da Física"
#: scene/main/node.cpp
#, fuzzy
@@ -25184,19 +24583,16 @@ msgid "Filename"
msgstr "Renomear"
#: scene/main/node.cpp
-#, fuzzy
msgid "Owner"
-msgstr "Proprietários de:"
+msgstr "Dono"
#: scene/main/node.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Multiplayer"
-msgstr "Multiplicar %s"
+msgstr "Multijogador"
#: scene/main/node.cpp
-#, fuzzy
msgid "Custom Multiplayer"
-msgstr "Definir Múltiplo:"
+msgstr "Multijogador Personalizado"
#: scene/main/node.cpp
#, fuzzy
@@ -25229,7 +24625,7 @@ msgstr "Nova Raiz da Cena"
#: scene/main/scene_tree.cpp
msgid "Root"
-msgstr ""
+msgstr "Raiz"
#: scene/main/scene_tree.cpp
#, fuzzy
@@ -25239,11 +24635,11 @@ msgstr "Multiplicar %s"
#: scene/main/scene_tree.cpp scene/resources/mesh_library.cpp
#: scene/resources/shape_2d.cpp
msgid "Shapes"
-msgstr ""
+msgstr "Formas"
#: scene/main/scene_tree.cpp
msgid "Shape Color"
-msgstr ""
+msgstr "Cor da Forma"
#: scene/main/scene_tree.cpp
#, fuzzy
@@ -25252,7 +24648,7 @@ msgstr "Escolher cor"
#: scene/main/scene_tree.cpp
msgid "Geometry Color"
-msgstr ""
+msgstr "Cor da Geometria"
#: scene/main/scene_tree.cpp
#, fuzzy
@@ -25269,14 +24665,12 @@ msgid "Draw 2D Outlines"
msgstr "Criar contorno"
#: scene/main/scene_tree.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Reflections"
-msgstr "Direções"
+msgstr "Reflexões"
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Atlas Size"
-msgstr "Tamanho do contorno:"
+msgstr "Tamanho do Atlas"
#: scene/main/scene_tree.cpp
msgid "Atlas Subdiv"
@@ -25288,7 +24682,7 @@ msgstr ""
#: scene/main/scene_tree.cpp
msgid "Use FXAA"
-msgstr ""
+msgstr "Usar FXAA"
#: scene/main/scene_tree.cpp
msgid "Use Debanding"
@@ -25296,16 +24690,15 @@ msgstr ""
#: scene/main/scene_tree.cpp scene/main/viewport.cpp
msgid "HDR"
-msgstr ""
+msgstr "HDR"
#: scene/main/scene_tree.cpp scene/main/viewport.cpp
msgid "Use 32 BPC Depth"
msgstr ""
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Default Environment"
-msgstr "Ver ambiente"
+msgstr "Ambiente Padrão"
#: scene/main/scene_tree.cpp
msgid ""
@@ -25334,9 +24727,8 @@ msgstr ""
"para tempos de espera muito baixos."
#: scene/main/timer.cpp
-#, fuzzy
msgid "Autostart"
-msgstr "Reinício automático:"
+msgstr "Início Automático"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25362,7 +24754,7 @@ msgstr ""
#: scene/main/viewport.cpp
msgid "ARVR"
-msgstr ""
+msgstr "ARVR"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25375,16 +24767,15 @@ msgstr ""
#: scene/main/viewport.cpp scene/resources/world_2d.cpp
msgid "World"
-msgstr ""
+msgstr "Mundo"
#: scene/main/viewport.cpp
msgid "World 2D"
-msgstr ""
+msgstr "Mundo 2D"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Transparent BG"
-msgstr "Transpor"
+msgstr "Fundo Transparente"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25393,7 +24784,7 @@ msgstr "Mudar valor de entrada"
#: scene/main/viewport.cpp
msgid "FXAA"
-msgstr ""
+msgstr "FXAA"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25412,7 +24803,7 @@ msgstr "Linear Esquerda"
#: scene/main/viewport.cpp
msgid "Render Direct To Screen"
-msgstr ""
+msgstr "Renderizar Diretamente ao Ecrã"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25420,9 +24811,8 @@ msgid "Debug Draw"
msgstr "Depurar"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Render Target"
-msgstr "Renderizador:"
+msgstr "Alvo do Renderizador"
#: scene/main/viewport.cpp
msgid "V Flip"
@@ -25530,7 +24920,7 @@ msgstr "Navegação"
#: scene/register_scene_types.cpp
msgid "Use hiDPI"
-msgstr ""
+msgstr "Usar hiDPI"
#: scene/register_scene_types.cpp
#, fuzzy
@@ -25550,12 +24940,11 @@ msgstr "Nó Mix"
#: scene/resources/audio_stream_sample.cpp
msgid "Stereo"
-msgstr ""
+msgstr "Stereo"
#: scene/resources/concave_polygon_shape_2d.cpp
-#, fuzzy
msgid "Segments"
-msgstr "Argumentos da Cena Principal:"
+msgstr "Segmentos"
#: scene/resources/curve.cpp
#, fuzzy
@@ -25568,7 +24957,7 @@ msgstr ""
#: scene/resources/default_theme/default_theme.cpp
msgid "Panel"
-msgstr ""
+msgstr "Painel"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25596,9 +24985,8 @@ msgid "Font Color Disabled"
msgstr "Recorte desativado"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "H Separation"
-msgstr "Separação:"
+msgstr "Separação Horizontal"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25607,7 +24995,7 @@ msgstr "Loop da Animação"
#: scene/resources/default_theme/default_theme.cpp
msgid "Arrow"
-msgstr ""
+msgstr "Seta"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25686,14 +25074,12 @@ msgid "Font Outline Modulate"
msgstr "Forçar modulação branca"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Shadow Offset X"
-msgstr "Deslocação X da grelha:"
+msgstr "Deslocamento da Sombra em X"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Shadow Offset Y"
-msgstr "Deslocação Y da grelha:"
+msgstr "Deslocamento da Sombra em Y"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25751,14 +25137,12 @@ msgid "Space"
msgstr "Cena Principal"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Folded"
-msgstr "Pasta:"
+msgstr "Dobrado"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Fold"
-msgstr "Pasta:"
+msgstr "Dobrar"
#: scene/resources/default_theme/default_theme.cpp
msgid "Font Color Readonly"
@@ -25922,14 +25306,12 @@ msgid "Font Color Accel"
msgstr "Renomear Item Cor"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color Separator"
-msgstr "Operador de Cor."
+msgstr "Separador de Cor da Fonte"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "V Separation"
-msgstr "Separação:"
+msgstr "Separação Vertical"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25982,9 +25364,8 @@ msgid "Close Offset"
msgstr "Compensação da grelha:"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Port Offset"
-msgstr "Compensação da grelha:"
+msgstr "Deslocamento de Porta"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25998,7 +25379,7 @@ msgstr "Selecionar"
#: scene/resources/default_theme/default_theme.cpp
msgid "Cursor Unfocused"
-msgstr ""
+msgstr "Cursor Desfocado"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26094,14 +25475,12 @@ msgid "Draw Guides"
msgstr "Mostrar Guias"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Scroll Border"
-msgstr "Vertical:"
+msgstr "Borda da Barra de Rolagem"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Scroll Speed"
-msgstr "Compensação da grelha:"
+msgstr "Velocidade de Rolagem"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26109,9 +25488,8 @@ msgid "Icon Margin"
msgstr "Definir Margem"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Line Separation"
-msgstr "Separação:"
+msgstr "Separação de Linha"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26119,9 +25497,8 @@ msgid "Tab FG"
msgstr "Aba 1"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Tab BG"
-msgstr "Aba 1"
+msgstr "BG da Guia"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26130,7 +25507,7 @@ msgstr "Item Desativado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Menu"
-msgstr ""
+msgstr "Menu"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26171,9 +25548,8 @@ msgid "Large"
msgstr "Alvo"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Folder"
-msgstr "Pasta:"
+msgstr "Pasta"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26211,9 +25587,8 @@ msgid "Label Width"
msgstr "Esquerda Wide"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Screen Picker"
-msgstr "Operador Ecrã."
+msgstr "Seletor de Ecrã"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26231,9 +25606,8 @@ msgid "Color Sample"
msgstr "Cores"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Preset BG"
-msgstr "Predefinições"
+msgstr "Fundo Predefinido"
#: scene/resources/default_theme/default_theme.cpp
msgid "Overbright Indicator"
@@ -26245,9 +25619,8 @@ msgid "Preset FG"
msgstr "Predefinições"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Preset BG Icon"
-msgstr "Predefinições"
+msgstr "Ícone de Fundo Predefinido"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26266,7 +25639,7 @@ msgstr "Cena Principal"
#: scene/resources/default_theme/default_theme.cpp
msgid "Bold Italics Font"
-msgstr ""
+msgstr "Fonte Negrito Itálica"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26274,14 +25647,12 @@ msgid "Mono Font"
msgstr "Cena Principal"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Table H Separation"
-msgstr "Separação:"
+msgstr "Separação Horizontal da Tabela"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Table V Separation"
-msgstr "Separação:"
+msgstr "Separação Vertical da Tabela"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26310,11 +25681,11 @@ msgstr "Corte automático"
#: scene/resources/default_theme/default_theme.cpp
msgid "Minus"
-msgstr ""
+msgstr "Menos"
#: scene/resources/default_theme/default_theme.cpp
msgid "More"
-msgstr ""
+msgstr "Mais"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26374,9 +25745,8 @@ msgid "Font Path"
msgstr "Caminho de Foco"
#: scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Outline Size"
-msgstr "Tamanho do contorno:"
+msgstr "Tamanho do Contorno"
#: scene/resources/dynamic_font.cpp
#, fuzzy
@@ -26389,14 +25759,12 @@ msgid "Use Mipmaps"
msgstr "Sinais"
#: scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Extra Spacing"
-msgstr "Opções Extra:"
+msgstr "Espaçamento Extra"
#: scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Char"
-msgstr "Caracteres válidos:"
+msgstr "Caractere"
#: scene/resources/dynamic_font.cpp
#, fuzzy
@@ -26405,11 +25773,11 @@ msgstr "Com Dados"
#: scene/resources/environment.cpp
msgid "Background"
-msgstr ""
+msgstr "Plano de Fundo"
#: scene/resources/environment.cpp scene/resources/sky.cpp
msgid "Sky"
-msgstr ""
+msgstr "Céu"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26422,14 +25790,12 @@ msgid "Sky Orientation"
msgstr "Documentação Online"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sky Rotation"
-msgstr "Passo da rotação:"
+msgstr "Rotação do Céu"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sky Rotation Degrees"
-msgstr "A rodar %s graus."
+msgstr "Graus de Rotação do Céu"
#: scene/resources/environment.cpp
msgid "Canvas Max Layer"
@@ -26451,17 +25817,15 @@ msgstr "Condição"
#: scene/resources/environment.cpp
msgid "Fog"
-msgstr ""
+msgstr "Névoa"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sun Color"
-msgstr "Armazenar o Ficheiro:"
+msgstr "Cor do Sol"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sun Amount"
-msgstr "Valor:"
+msgstr "Quantidade do Sol"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26525,7 +25889,7 @@ msgstr "Exportar"
#: scene/resources/environment.cpp
msgid "White"
-msgstr ""
+msgstr "Branco"
#: scene/resources/environment.cpp
msgid "Auto Exposure"
@@ -26550,14 +25914,12 @@ msgid "Max Steps"
msgstr "Passo"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Fade In"
-msgstr "Aparecer (s):"
+msgstr "Esmaecer de Entrada"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Fade Out"
-msgstr "Desvanecer (s):"
+msgstr "Esmaecer de Saída"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26566,16 +25928,15 @@ msgstr "Profundidade"
#: scene/resources/environment.cpp scene/resources/material.cpp
msgid "Roughness"
-msgstr ""
+msgstr "Rugosidade"
#: scene/resources/environment.cpp
msgid "SSAO"
-msgstr ""
+msgstr "SSAO"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Radius 2"
-msgstr "Raio:"
+msgstr "Raio 2"
#: scene/resources/environment.cpp
msgid "Intensity 2"
@@ -26604,9 +25965,8 @@ msgid "DOF Far Blur"
msgstr ""
#: scene/resources/environment.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Distance"
-msgstr "Distância de escolha:"
+msgstr "Distância"
#: scene/resources/environment.cpp
msgid "Transition"
@@ -26618,7 +25978,7 @@ msgstr ""
#: scene/resources/environment.cpp
msgid "Glow"
-msgstr ""
+msgstr "Brilho"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26680,7 +26040,7 @@ msgstr ""
#: scene/resources/environment.cpp
msgid "Adjustments"
-msgstr ""
+msgstr "Ajustamentos"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26688,19 +26048,16 @@ msgid "Brightness"
msgstr "Luz"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Saturation"
-msgstr "Separação:"
+msgstr "Separação"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Color Correction"
-msgstr "Função Cor."
+msgstr "Correção de Cor"
#: scene/resources/font.cpp
-#, fuzzy
msgid "Ascent"
-msgstr "Recente:"
+msgstr "Subida"
#: scene/resources/font.cpp
#, fuzzy
@@ -26713,9 +26070,8 @@ msgid "Raw Data"
msgstr "Profundidade"
#: scene/resources/gradient.cpp
-#, fuzzy
msgid "Offsets"
-msgstr "Compensação:"
+msgstr "Deslocamentos"
#: scene/resources/height_map_shape.cpp
msgid "Map Width"
@@ -26745,9 +26101,8 @@ msgid "Use Shadow To Opacity"
msgstr ""
#: scene/resources/material.cpp
-#, fuzzy
msgid "Unshaded"
-msgstr "Vista sem sombras"
+msgstr "Sem sombra"
#: scene/resources/material.cpp
#, fuzzy
@@ -26769,7 +26124,7 @@ msgstr ""
#: scene/resources/material.cpp
msgid "Do Not Receive Shadows"
-msgstr ""
+msgstr "Não Receber Sombras"
#: scene/resources/material.cpp
#, fuzzy
@@ -26796,12 +26151,11 @@ msgstr ""
#: scene/resources/material.cpp
msgid "Is sRGB"
-msgstr ""
+msgstr "É sRGB"
#: scene/resources/material.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Parameters"
-msgstr "Parâmetro Alterado:"
+msgstr "Parâmetros"
#: scene/resources/material.cpp
#, fuzzy
@@ -26840,12 +26194,11 @@ msgstr "Modo Régua"
#: scene/resources/material.cpp
msgid "Grow"
-msgstr ""
+msgstr "Crescer"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Grow Amount"
-msgstr "Valor:"
+msgstr "Quantidade de Crescimento"
#: scene/resources/material.cpp
msgid "Use Alpha Scissor"
@@ -26868,11 +26221,11 @@ msgstr "Frame %"
#: scene/resources/material.cpp
msgid "Albedo"
-msgstr ""
+msgstr "Albedo"
#: scene/resources/material.cpp
msgid "Metallic"
-msgstr ""
+msgstr "Metálico"
#: scene/resources/material.cpp
#, fuzzy
@@ -26880,9 +26233,8 @@ msgid "Texture Channel"
msgstr "TextureRegion"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Emission"
-msgstr "Máscara de Emissão"
+msgstr "Emissão"
#: scene/resources/material.cpp
msgid "On UV2"
@@ -26907,7 +26259,7 @@ msgstr ""
#: scene/resources/material.cpp
msgid "Anisotropy"
-msgstr ""
+msgstr "Anisotrópico"
#: scene/resources/material.cpp
msgid "Flowmap"
@@ -26950,13 +26302,12 @@ msgid "Transmission"
msgstr "Transmissão"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Refraction"
-msgstr "Separação:"
+msgstr "Refração"
#: scene/resources/material.cpp
msgid "Detail"
-msgstr ""
+msgstr "Detalhe"
#: scene/resources/material.cpp
#, fuzzy
@@ -27002,7 +26353,7 @@ msgstr "Consolidar Lightmaps"
#: scene/resources/mesh.cpp scene/resources/primitive_meshes.cpp
msgid "Custom AABB"
-msgstr ""
+msgstr "AABB Personalizado"
#: scene/resources/mesh_library.cpp
#, fuzzy
@@ -27015,14 +26366,12 @@ msgid "NavMesh Transform"
msgstr "Limpar Transformação"
#: scene/resources/multimesh.cpp
-#, fuzzy
msgid "Color Format"
-msgstr "Operador de Cor."
+msgstr "Formato de Cor"
#: scene/resources/multimesh.cpp
-#, fuzzy
msgid "Transform Format"
-msgstr "Transformação Abortada."
+msgstr "Formato de Transformação"
#: scene/resources/multimesh.cpp
msgid "Custom Data Format"
@@ -27035,12 +26384,11 @@ msgstr "Instância"
#: scene/resources/multimesh.cpp
msgid "Visible Instance Count"
-msgstr ""
+msgstr "Quantidade de Instâncias Visíveis"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Sampling"
-msgstr "A escalar: "
+msgstr "Mostragem"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -27048,27 +26396,24 @@ msgid "Partition Type"
msgstr "Definir tipo de variável"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Parsed Geometry Type"
-msgstr "A analisar geometria..."
+msgstr "Tipo de Geometria Analisada"
#: scene/resources/navigation_mesh.cpp
msgid "Source Geometry Mode"
msgstr ""
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Source Group Name"
-msgstr "Fonte"
+msgstr "Origem do Nome do Grupo"
#: scene/resources/navigation_mesh.cpp
msgid "Cells"
-msgstr ""
+msgstr "Células"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Agents"
-msgstr "Argumentos da Cena Principal:"
+msgstr "Agentes"
#: scene/resources/navigation_mesh.cpp
msgid "Max Climb"
@@ -27090,7 +26435,7 @@ msgstr "Mesclar a partir da Cena"
#: scene/resources/navigation_mesh.cpp
msgid "Edges"
-msgstr ""
+msgstr "Arestas"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -27099,7 +26444,7 @@ msgstr "Erro"
#: scene/resources/navigation_mesh.cpp
msgid "Verts Per Poly"
-msgstr ""
+msgstr "Vértices Por Polígono"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -27107,9 +26452,8 @@ msgid "Details"
msgstr "Mostrar Predefinição"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Sample Distance"
-msgstr "Distância de escolha:"
+msgstr "Distância de Amostra"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -27140,7 +26484,7 @@ msgstr "Compensação:"
#: scene/resources/occluder_shape.cpp
msgid "Spheres"
-msgstr ""
+msgstr "Esferas"
#: scene/resources/occluder_shape.cpp
msgid "OccluderShapeSphere Set Spheres"
@@ -27180,9 +26524,8 @@ msgid "Color Modifier"
msgstr "Freelook Modificador de Lentidão"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Point Texture"
-msgstr "Pontos de emissão:"
+msgstr "Textura de Ponto"
#: scene/resources/particles_material.cpp
msgid "Normal Texture"
@@ -27199,9 +26542,8 @@ msgid "Point Count"
msgstr "Adicionar Porta de Entrada"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Scale Random"
-msgstr "Proporção de Escala:"
+msgstr "Randomização de Escala"
#: scene/resources/particles_material.cpp
#, fuzzy
@@ -27217,9 +26559,8 @@ msgid "Absorbent"
msgstr ""
#: scene/resources/plane_shape.cpp
-#, fuzzy
msgid "Plane"
-msgstr "Plano:"
+msgstr "Plano"
#: scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -27243,9 +26584,8 @@ msgid "Subdivide Depth"
msgstr ""
#: scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Top Radius"
-msgstr "Raio:"
+msgstr "Raio do Topo"
#: scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -27294,9 +26634,8 @@ msgid "Bone"
msgstr "Ossos"
#: scene/resources/sky.cpp
-#, fuzzy
msgid "Radiance Size"
-msgstr "Tamanho do contorno:"
+msgstr "Tamanho da Radiância"
#: scene/resources/sky.cpp
msgid "Panorama"
@@ -27308,9 +26647,8 @@ msgid "Top Color"
msgstr "Próximo Piso"
#: scene/resources/sky.cpp
-#, fuzzy
msgid "Horizon Color"
-msgstr "Armazenar o Ficheiro:"
+msgstr "Cor do Horizonte"
#: scene/resources/sky.cpp
#, fuzzy
@@ -27334,7 +26672,7 @@ msgstr "Substituto"
#: scene/resources/sky.cpp
msgid "Longitude"
-msgstr ""
+msgstr "Longitude"
#: scene/resources/sky.cpp
msgid "Angle Min"
@@ -27369,7 +26707,7 @@ msgstr ""
#: scene/resources/style_box.cpp
msgid "Anti Aliasing"
-msgstr ""
+msgstr "Anti Serrilhamento"
#: scene/resources/style_box.cpp
msgid "Grow Begin"
@@ -27419,9 +26757,8 @@ msgid "Lossy Storage Quality"
msgstr "Capturar"
#: scene/resources/texture.cpp
-#, fuzzy
msgid "From"
-msgstr "Modo Jogo:"
+msgstr "À Partir de"
#: scene/resources/texture.cpp
#, fuzzy
@@ -27595,11 +26932,11 @@ msgstr "Editar Conexão:"
#: scene/resources/world_2d.cpp
msgid "Canvas"
-msgstr ""
+msgstr "Tela"
#: servers/arvr/arvr_interface.cpp
msgid "Is Primary"
-msgstr ""
+msgstr "É Principal"
#: servers/arvr/arvr_interface.cpp
#, fuzzy
@@ -27625,9 +26962,8 @@ msgid "Audio Stream"
msgstr "Item Rádio"
#: servers/audio/audio_stream.cpp
-#, fuzzy
msgid "Random Pitch"
-msgstr "Inclinação aleatória:"
+msgstr "Timbre Aleatório"
#: servers/audio/effects/audio_effect_capture.cpp
#: servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -27637,27 +26973,27 @@ msgstr ""
#: servers/audio/effects/audio_effect_chorus.cpp
msgid "Voice Count"
-msgstr ""
+msgstr "Quantidade de Vozes"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Dry"
-msgstr ""
+msgstr "Seco"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Wet"
-msgstr ""
+msgstr "Molhado"
#: servers/audio/effects/audio_effect_chorus.cpp
msgid "Voice"
-msgstr ""
+msgstr "Voz"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Delay (ms)"
-msgstr ""
+msgstr "Atraso (ms)"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_phaser.cpp
@@ -27672,7 +27008,7 @@ msgstr "Profundidade"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
msgid "Level dB"
-msgstr ""
+msgstr "Nível dB"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
@@ -27684,11 +27020,11 @@ msgstr "Plano:"
#: servers/audio/effects/audio_effect_compressor.cpp
#: servers/audio/effects/audio_effect_filter.cpp
msgid "Gain"
-msgstr ""
+msgstr "Ganho"
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Attack (µs)"
-msgstr ""
+msgstr "Ataque (µs)"
#: servers/audio/effects/audio_effect_compressor.cpp
#, fuzzy
@@ -27725,7 +27061,7 @@ msgstr "Ignorar"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Pre Gain"
-msgstr ""
+msgstr "Pré Ganho"
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Keep Hf Hz"
@@ -27775,13 +27111,12 @@ msgstr ""
#: servers/audio/effects/audio_effect_pitch_shift.cpp
#: servers/audio/effects/audio_effect_spectrum_analyzer.cpp
-#, fuzzy
msgid "FFT Size"
-msgstr "Tamanho:"
+msgstr "Tamanho FFT"
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Predelay"
-msgstr ""
+msgstr "Pré Atraso"
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Msec"
@@ -27789,7 +27124,7 @@ msgstr ""
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Room Size"
-msgstr ""
+msgstr "Tamanho da Sala"
#: servers/audio/effects/audio_effect_reverb.cpp
#, fuzzy
@@ -27805,9 +27140,8 @@ msgid "Pan Pullout"
msgstr ""
#: servers/audio/effects/audio_effect_stereo_enhance.cpp
-#, fuzzy
msgid "Time Pullout (ms)"
-msgstr "Tempo expirado."
+msgstr "Retirada de Tempo (ms)"
#: servers/audio/effects/audio_effect_stereo_enhance.cpp
msgid "Surround"
@@ -27819,9 +27153,8 @@ msgid "Enable Audio Input"
msgstr "Renomear o barramento de áudio"
#: servers/audio_server.cpp
-#, fuzzy
msgid "Output Latency"
-msgstr "Saída"
+msgstr "Latência de Saída"
#: servers/audio_server.cpp
msgid "Channel Disable Threshold dB"
@@ -27870,12 +27203,11 @@ msgstr ""
#: servers/physics/space_sw.cpp servers/physics_2d/space_2d_sw.cpp
msgid "Time Before Sleep"
-msgstr ""
+msgstr "Tempo Antes de Dormir"
#: servers/physics_2d/physics_2d_server_sw.cpp
-#, fuzzy
msgid "BP Hash Table Size"
-msgstr "Tamanho:"
+msgstr "Tamanho da \"BP Hash Table\""
#: servers/physics_2d/physics_2d_server_sw.cpp
msgid "Large Object Surface Threshold In Cells"
@@ -27883,12 +27215,11 @@ msgstr ""
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Inverse Mass"
-msgstr ""
+msgstr "Inverter Massa"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Inverse Inertia"
-msgstr "Freelook Esquerda"
+msgstr "Inverter Inércia"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Total Angular Damp"
@@ -27911,7 +27242,7 @@ msgstr "Inicializar"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Exclude"
-msgstr ""
+msgstr "Excluir"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Shape RID"
@@ -27924,7 +27255,7 @@ msgstr "Modo Colisão"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Collide With Areas"
-msgstr ""
+msgstr "Colidir com Áreas"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
msgid "Motion Remainder"
@@ -28004,9 +27335,8 @@ msgid "Constants cannot be modified."
msgstr "Constantes não podem ser modificadas."
#: servers/visual/visual_server_scene.cpp
-#, fuzzy
msgid "Spatial Partitioning"
-msgstr "A segmentar..."
+msgstr "Particionamento Espacial"
#: servers/visual_server.cpp
#, fuzzy
@@ -28045,16 +27375,15 @@ msgstr "Importar tema"
#: servers/visual_server.cpp
msgid "Lossless Compression"
-msgstr ""
+msgstr "Compressão Sem Perda"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Force PNG"
-msgstr "Forçar Impulso"
+msgstr "Forçar PNG"
#: servers/visual_server.cpp
msgid "WebP Compression Level"
-msgstr ""
+msgstr "Nível de Compressão WebP"
#: servers/visual_server.cpp
msgid "Time Rollover Secs"
@@ -28098,7 +27427,7 @@ msgstr "Centrar Seleção"
#: servers/visual_server.cpp
msgid "High Quality GGX"
-msgstr ""
+msgstr "GGX de Alta Qualidade"
#: servers/visual_server.cpp
msgid "Irradiance Max Size"
@@ -28172,9 +27501,8 @@ msgid "Ninepatch Mode"
msgstr "Modo de Interpolação"
#: servers/visual_server.cpp
-#, fuzzy
msgid "OpenGL"
-msgstr "Abrir"
+msgstr "abrir"
#: servers/visual_server.cpp
msgid "Batching Send Null"
@@ -28194,9 +27522,8 @@ msgid "Legacy Stream"
msgstr ""
#: servers/visual_server.cpp
-#, fuzzy
msgid "Batching"
-msgstr "A procurar..."
+msgstr "Loteamento"
#: servers/visual_server.cpp
msgid "Use Batching"
@@ -28224,9 +27551,8 @@ msgid "Scissor Area Threshold"
msgstr ""
#: servers/visual_server.cpp
-#, fuzzy
msgid "Max Join Items"
-msgstr "Gerir Itens..."
+msgstr "Máximo de Itens de Junção"
#: servers/visual_server.cpp
msgid "Batch Buffer Size"
@@ -28238,7 +27564,7 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Flash Batching"
-msgstr ""
+msgstr "Loteamento de Flashes"
#: servers/visual_server.cpp
#, fuzzy
@@ -28247,15 +27573,15 @@ msgstr "Colar Frame"
#: servers/visual_server.cpp
msgid "GLES2"
-msgstr ""
+msgstr "GLES2"
#: servers/visual_server.cpp
msgid "Compatibility"
-msgstr ""
+msgstr "Compatibilidade"
#: servers/visual_server.cpp
msgid "Disable Half Float"
-msgstr ""
+msgstr "Desativar Meia Float"
#: servers/visual_server.cpp
#, fuzzy
@@ -28269,11 +27595,11 @@ msgstr "Expressão"
#: servers/visual_server.cpp
msgid "UV Contract"
-msgstr ""
+msgstr "Contrato UV"
#: servers/visual_server.cpp
msgid "UV Contract Amount"
-msgstr ""
+msgstr "Valor do Contrato UV"
#: servers/visual_server.cpp
#, fuzzy
@@ -28282,7 +27608,7 @@ msgstr "Usar Ajuste de Escala"
#: servers/visual_server.cpp
msgid "PVS Logging"
-msgstr ""
+msgstr "Registo PVS"
#: servers/visual_server.cpp
#, fuzzy
@@ -28306,12 +27632,11 @@ msgstr "Ver Culling da Oclusão"
#: servers/visual_server.cpp
msgid "Max Active Spheres"
-msgstr ""
+msgstr "Máximo de Esferas Ativas"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Max Active Polygons"
-msgstr "Mover Polígono"
+msgstr "Máximo de Polígonos Ativos"
#: servers/visual_server.cpp
#, fuzzy
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index 4541da85ee..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.
@@ -38,7 +38,7 @@
# Pedro Pacheco <pedroxixipa@hotmail.com>, 2018, 2019.
# Bruno Henrique <nimbusdroid@gmail.com>, 2018, 2019.
# Luciano Scilletta <lucianoscilletta@gmail.com>, 2018.
-# Julio Yagami <juliohenrique31501234@hotmail.com>, 2018, 2019.
+# Julio Yagami <juliohenrique31501234@hotmail.com>, 2018, 2019, 2022.
# Fernando Martinez <contact@fernandodev.com>, 2018.
# Marcelo <mitissa@gmail.com>, 2018, 2019.
# Walter Bolitto <wrcarval@live.com>, 2018, 2019.
@@ -95,21 +95,21 @@
# Felipe Jesus Macedo <fmacedo746@gmail.com>, 2020.
# José Paulo <jose.paulo1919@gmail.com>, 2020.
# Necco <necco@outlook.com>, 2020.
-# Marcelo Silveira Hayden <mshayden.1998@gmail.com>, 2020, 2021.
+# Marcelo Silveira Hayden <mshayden.1998@gmail.com>, 2020, 2021, 2022.
# GUILHERME SOUZA REIS DE MELO LOPES <guilhermesrml@unipam.edu.br>, 2020.
# Gabriela Araújo <Gabirin@outlook.com.br>, 2020.
# Jairo Tuboi <tuboi.jairo@gmail.com>, 2020.
# Felipe Fetter <felipetfetter@gmail.com>, 2020.
# Rafael Henrique Capati <rhcapati@gmail.com>, 2020.
-# NogardRyuu <nogardryuu@gmail.com>, 2020, 2021.
+# NogardRyuu <nogardryuu@gmail.com>, 2020, 2021, 2022.
# Elton <eltondeoliveira@outlook.com>, 2020, 2021.
-# ThiagoCTN <thiagocampostn@gmail.com>, 2020.
+# ThiagoCTN <thiagocampostn@gmail.com>, 2020, 2022.
# Alec Santos <alecsantos96@gmail.com>, 2020.
# Augusto Milão <augusto.milao01@gmail.com>, 2021, 2022.
# Gabriel Gavazzi Felix <mutcholoko32@gmail.com>, 2021.
# Lucas Dantas <lucas.lucantas38@gmail.com>, 2021.
-# Carlos Bonifacio <carlosboni.sa@gmail.com>, 2021.
-# Lucas Castro <castroclucas@gmail.com>, 2021.
+# Carlos Bonifacio <carlosboni.sa@gmail.com>, 2021, 2022.
+# Lucas Castro <castroclucas@gmail.com>, 2021, 2022.
# Ricardo Zamarrenho Carvalho Correa <ricardozcc17@gmail.com>, 2021.
# Diego dos Reis Macedo <diego_dragon97@hotmail.com>, 2021.
# Lucas E. <lukas.ed45@gmail.com>, 2021.
@@ -151,13 +151,19 @@
# Avery <jarreed0@gmail.com>, 2022.
# TheJC <the-green-green.0rvdk@simplelogin.fr>, 2022.
# Mauricio Mazur <mauricio.mazur12@gmail.com>, 2022.
+# ! Zyll <emanueljunior756@gmail.com>, 2022.
+# Kirrby <kirrby.gaming@gmail.com>, 2022.
+# 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-09-05 11:17+0000\n"
-"Last-Translator: TheJC <the-green-green.0rvdk@simplelogin.fr>\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"
@@ -165,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.14.1-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -1128,7 +1134,7 @@ msgstr "Máximo de luzes renderizáveis"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Reflections"
-msgstr "Máximo de Reflexos renderizáveis"
+msgstr "Max. Reflexões Renderizaveis"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Lights Per Object"
@@ -1291,7 +1297,7 @@ msgstr "Manipulador de Entrada"
#: editor/animation_track_editor.cpp
msgid "Out Handle"
-msgstr "Manipulador de Saída"
+msgstr "Fora do controle"
#: editor/animation_track_editor.cpp
#: editor/import/resource_importer_texture.cpp
@@ -1573,7 +1579,7 @@ msgstr "Editores"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
msgid "Confirm Insert Track"
-msgstr "Confirmar Inserção de Trilha"
+msgstr "Confirmar inserção de faixa"
#. TRANSLATORS: %s will be replaced by a phrase describing the target of track.
#: editor/animation_track_editor.cpp
@@ -1744,7 +1750,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Anim Add RESET Keys"
-msgstr "Anim Adicionar Teclas de RESET"
+msgstr "Anim adicionar teclas de RESET"
#: editor/animation_track_editor.cpp
msgid ""
@@ -3063,7 +3069,7 @@ msgstr "Em exportações de 32 bits, o PCK embutido não pode ser maior que 4GB.
#: editor/editor_export.cpp
msgid "Convert Text Resources To Binary On Export"
-msgstr "Converter Recursos de Texto para Binário na Exportação"
+msgstr "Converter recursos de texto para binário na exportação"
#: editor/editor_feature_profile.cpp
msgid "3D Editor"
@@ -3383,7 +3389,7 @@ msgstr "Mostrar Arquivos Ocultos"
#: editor/editor_file_dialog.cpp
msgid "Disable Overwrite Warning"
-msgstr "Desativar Aviso de Substituição"
+msgstr "Desativar aviso de substituição"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
@@ -3486,7 +3492,7 @@ msgstr "(Re)Importando Assets"
#: editor/editor_file_system.cpp
msgid "Reimport Missing Imported Files"
-msgstr "Reimportar Arquivos Importados Ausentes"
+msgstr "Reimportar arquivos importados perdidos"
#: editor/editor_help.cpp scene/2d/camera_2d.cpp scene/gui/control.cpp
#: scene/gui/nine_patch_rect.cpp scene/resources/dynamic_font.cpp
@@ -3597,7 +3603,7 @@ msgstr "Ajuda"
#: editor/editor_help.cpp
msgid "Sort Functions Alphabetically"
-msgstr "Classificar Funções em Ordem Alfabética"
+msgstr "Ordenar funções alfabéticamente"
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -4402,7 +4408,7 @@ msgstr "Redimensionar se Houver Muitas Guias"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Minimum Width"
-msgstr "Largura Mínima"
+msgstr "Largura mínima"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Output"
@@ -4410,11 +4416,11 @@ msgstr "Saída"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Always Clear Output On Play"
-msgstr "Sempre limpar saída ao jogar"
+msgstr "Sempre Limpar Output no modo Play"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Always Open Output On Play"
-msgstr "Sempre abrir a saída ao jogar"
+msgstr "Sempre abrir a saída ao reproduzir"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Always Close Output On Stop"
@@ -4422,7 +4428,7 @@ msgstr "Sempre fechar a saída ao parar"
#: editor/editor_node.cpp
msgid "Save On Focus Loss"
-msgstr "Salvar em caso de perda de foco"
+msgstr "Salvar ao perder o foco"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Save Each Scene On Quit"
@@ -4454,7 +4460,7 @@ msgstr "Restaurar Cenas ao Carregar"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Show Thumbnail On Hover"
-msgstr "Mostrar miniatura ao passar o mouse"
+msgstr "Exibir miniatura ao passar o mouse por cima"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Inspector"
@@ -4462,11 +4468,11 @@ msgstr "Inspetor"
#: editor/editor_node.cpp
msgid "Default Property Name Style"
-msgstr "Estilo de Nome de Propriedade Padrão"
+msgstr "Estilo de Nome Padrão de Propriedade"
#: editor/editor_node.cpp
msgid "Default Float Step"
-msgstr "Passo de ponto flutuante padrão"
+msgstr "Passo de Float padrão"
#: editor/editor_node.cpp scene/gui/tree.cpp
msgid "Disable Folding"
@@ -5357,7 +5363,7 @@ msgstr "Linguagem do Editor"
#: editor/editor_settings.cpp
msgid "Display Scale"
-msgstr "Escala de Exibição"
+msgstr "Exibir Escala"
#: editor/editor_settings.cpp
msgid "Custom Display Scale"
@@ -5365,15 +5371,15 @@ msgstr "Escala de Exibição Customizada"
#: editor/editor_settings.cpp
msgid "Main Font Size"
-msgstr "Tamanho de Fonte Principal"
+msgstr "Tamanho da Fonte Principal"
#: editor/editor_settings.cpp
msgid "Code Font Size"
-msgstr "Tamanho de Fonte (Tipo) no Código"
+msgstr "Tamanho da Fonte do Código"
#: editor/editor_settings.cpp
msgid "Font Antialiased"
-msgstr "Fonte Com Serrilhado Suavizado"
+msgstr "Fonte com Anti-aliasing"
#: editor/editor_settings.cpp
msgid "Font Hinting"
@@ -5385,27 +5391,27 @@ msgstr "Fonte Principal"
#: editor/editor_settings.cpp
msgid "Main Font Bold"
-msgstr "Fonte Principal (Negrito)"
+msgstr "Fonte Principal com Negrito"
#: editor/editor_settings.cpp
msgid "Code Font"
-msgstr "Fonte para Código"
+msgstr "Fonte do Código"
#: editor/editor_settings.cpp
msgid "Dim Editor On Dialog Popup"
-msgstr "Escurecer o Editor ao Abir Janela Popup"
+msgstr "Escurecer Editor no Pop-up de Diálogo"
#: editor/editor_settings.cpp main/main.cpp
msgid "Low Processor Mode Sleep (µsec)"
-msgstr "Tempo de Espera em Modo de Hibernação (µseg)"
+msgstr "Modo de baixo processamento tempo (µsec)"
#: editor/editor_settings.cpp
msgid "Unfocused Low Processor Mode Sleep (µsec)"
-msgstr "Tempo de Espera em Modo de Hibernação Quando Fora de Foco (µseg)"
+msgstr "Modo de baixo processamento não focado (µsec)"
#: editor/editor_settings.cpp
msgid "Separate Distraction Mode"
-msgstr "Modo \"Sem Distrações\" Desacoplado"
+msgstr "Separar Modo Distração"
#: editor/editor_settings.cpp
msgid "Automatically Open Screenshots"
@@ -5427,7 +5433,7 @@ msgstr "Predefinição"
#: editor/editor_settings.cpp
msgid "Icon And Font Color"
-msgstr "Cor da Fonte e do Ícone"
+msgstr "Cores do ícone e da fonte"
#: editor/editor_settings.cpp
msgid "Base Color"
@@ -5503,7 +5509,7 @@ msgstr "Tamanho da Miniatura"
#: editor/editor_settings.cpp
msgid "Docks"
-msgstr "Docks"
+msgstr "Painéis"
#: editor/editor_settings.cpp
msgid "Scene Tree"
@@ -5700,7 +5706,7 @@ msgstr "Ordenar Prévia de Membros Automaticamente"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Cursor"
-msgstr "Cursor"
+msgstr "Ponteiro"
#: editor/editor_settings.cpp
msgid "Scroll Past End Of File"
@@ -8483,7 +8489,7 @@ msgstr "Obtido:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed SHA-256 hash check"
-msgstr "Falha na verificação do hash SHA-256"
+msgstr "Falha na verificação da hash SHA-256"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
@@ -8667,8 +8673,8 @@ msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
-"Alguma malha é inválida. Certifique-se de que os valores do canal UV2 estão "
-"contidos na região quadrada [0.0,1.0]."
+"Algum mesh é invalido. Tenha certeza que os valores do canal UV2 estão "
+"contidos dentro da região quadrática [0.0,1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -8809,8 +8815,8 @@ msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
msgstr ""
-"Filhos de contêineres têm suas posições e tamanhos sobrescritos pelos seus "
-"pais."
+"Filhos de contêineres têm seus valores de âncoras e margens substituídos "
+"pelos seus pais."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Presets for the anchors and margins values of a Control node."
@@ -11070,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]"
@@ -11403,11 +11409,11 @@ msgstr "Orbitar Visão Para Baixo"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orbit View Left"
-msgstr "Orbitar Visão para a Esquerda"
+msgstr "Orbitar Visão à Esquerda"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orbit View Right"
-msgstr "Orbitar Visão para a Direita"
+msgstr "Orbitar Visão à Direita"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orbit View Up"
@@ -11415,7 +11421,7 @@ msgstr "Orbitar Visão para Cima"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orbit View 180"
-msgstr "Orbitar Visão em 180"
+msgstr "Orbitar Visão 180º"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Switch Perspective/Orthogonal View"
@@ -12320,7 +12326,7 @@ msgid ""
"Toggle the control picker, allowing to visually select control types for "
"edit."
msgstr ""
-"Acionar o selecionador de controles, permitindo selecionar visualmente os "
+"Acionar o selecionador de controles, permitindo visualmente selecionar os "
"tipos de controles para edição."
#: editor/plugins/theme_editor_preview.cpp
@@ -12527,6 +12533,7 @@ msgid "Clear Transform"
msgstr "Limpar Transformação"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
msgid "Tile Map"
msgstr "Tile Map"
@@ -12557,9 +12564,8 @@ msgstr "Pré-visualização do Preenchimento de Balde"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Editor Side"
-msgstr "Editor"
+msgstr "Lado do Editor"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Display Grid"
@@ -12913,9 +12919,10 @@ msgstr "Opções de Encaixe"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr "Deslocamento"
@@ -13001,9 +13008,8 @@ msgid "Selected Collision One Way"
msgstr "Colisão em sentido único selecionada"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision One Way Margin"
-msgstr "Modo Colisão"
+msgstr "Margem de colisão em sentido único selecionada"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Selected Navigation"
@@ -13145,9 +13151,8 @@ msgid "Branch Name"
msgstr "Nome do Ramo"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Remotes"
-msgstr "Remoto"
+msgstr "Remotos"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Create New Remote"
@@ -13158,7 +13163,6 @@ msgid "Remove Remote"
msgstr "Remover remoto"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Remote Name"
msgstr "Nome Remoto"
@@ -14329,15 +14333,14 @@ msgstr "Caminho de projeto inválido (mudou alguma coisa?)."
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"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
-msgid "Couldn't edit project.godot in project path."
-msgstr "Não foi possível editar project.godot no caminho do projeto."
+msgid "Couldn't save project at '%s' (error %d)."
+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."
@@ -15375,19 +15378,16 @@ msgid "Make Local"
msgstr "Tornar Local"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "Habilitar Nome Único de Cena"
+msgstr "Habilitar Nome(s) Único(s) de Cena"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "Outro nó já está usando este nome único na cena atual."
+msgstr "Nomes únicos já estão sendo usados por outro nó na cena:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Disable Scene Unique Name(s)"
-msgstr "Desabilitar Nome Único de Cena"
+msgstr "Desabilitar Nome(s) Único(s) de Cena"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -15562,18 +15562,16 @@ msgid "Clear Inheritance? (No Undo!)"
msgstr "Limpar Herança? (Irreversível!)"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Show Scene Tree Root Selection"
-msgstr "Seleção Central"
+msgstr "Mostrar seleção da hierarquia de cenas"
#: editor/scene_tree_dock.cpp
msgid "Derive Script Globals By Name"
msgstr "Obter Globais de Script por Nome"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Use Favorites Root Selection"
-msgstr "Seleção de Frame"
+msgstr "Seleção de favoritos da raíz"
#: editor/scene_tree_editor.cpp
msgid "Toggle Visible"
@@ -15875,7 +15873,7 @@ msgstr "Copiar Erro"
#: editor/script_editor_debugger.cpp
msgid "Open C++ Source on GitHub"
-msgstr "Abrir Código C++ no GitHub"
+msgstr "Abrir código C++ no GitHub"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
@@ -16159,12 +16157,10 @@ msgid "Set Occluder Sphere Position"
msgstr "Definir Posição Da Esfera Do Oclusor"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Occluder Polygon Point Position"
msgstr "Definir Posição do Ponto do Polígono Oclusor"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Occluder Hole Point Position"
msgstr "Definir Posição do Ponto do Buraco Oclusor"
@@ -16173,9 +16169,8 @@ msgid "Occluder Polygon Front"
msgstr "Frente do Polígono Oclusor"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Occluder Polygon Back"
-msgstr "Costas do Polígono Oclusor"
+msgstr "Traseira do Polígono Oclusor"
#: editor/spatial_editor_gizmos.cpp
msgid "Occluder Hole"
@@ -16183,7 +16178,7 @@ msgstr "Buraco Oclusor"
#: main/main.cpp
msgid "Godot Physics"
-msgstr "Godot Physics"
+msgstr "Física Godot"
#: main/main.cpp servers/physics_2d/physics_2d_server_sw.cpp
#: servers/visual/visual_server_scene.cpp
@@ -16205,7 +16200,7 @@ msgstr "Servidor com Multi-Thread"
#: main/main.cpp
msgid "RID Pool Prealloc"
-msgstr ""
+msgstr "Pool de Prealocação de RID"
#: main/main.cpp
msgid "Debugger stdout"
@@ -16313,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"
@@ -16372,9 +16367,8 @@ msgid "Enable Warnings"
msgstr "Habilitar Avisos"
#: main/main.cpp
-#, fuzzy
msgid "Frame Delay Msec"
-msgstr "Seleção de Frame"
+msgstr "Atraso de quadro Mseg"
#: main/main.cpp
msgid "Low Processor Mode"
@@ -16532,14 +16526,12 @@ msgid "Auto Accept Quit"
msgstr "Aceitar Sair Automaticamente"
#: main/main.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Quit On Go Back"
-msgstr "Sair em Voltar"
+msgstr "Sair ao Voltar"
#: main/main.cpp scene/main/viewport.cpp
-#, fuzzy
msgid "Snap Controls To Pixels"
-msgstr "Encaixar nos Lados do Nó"
+msgstr "Encaixar Nós de Controle nos pixels"
#: main/main.cpp
msgid "Dynamic Fonts"
@@ -16661,9 +16653,8 @@ msgid "Path Node"
msgstr "Caminho do Nó"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Interval Type"
-msgstr "Criar Vertex Interno"
+msgstr "Tipo de Intervalo de Caminho"
#: modules/csg/csg_shape.cpp
msgid "Path Interval"
@@ -16678,14 +16669,12 @@ msgid "Path Rotation"
msgstr "Rotação do Caminho"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Local"
-msgstr "Tornar Local"
+msgstr "Caminho Local"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Continuous U"
-msgstr "Contínuo"
+msgstr "Caminho Continuo U"
#: modules/csg/csg_shape.cpp
msgid "Path U Distance"
@@ -16918,9 +16907,8 @@ msgid "Export GLTF..."
msgstr "Exportar GLTF..."
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Buffer View"
-msgstr "Visão Traseira"
+msgstr "Visão de Buffer"
#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_buffer_view.cpp
msgid "Byte Offset"
@@ -16947,17 +16935,16 @@ msgid "Max"
msgstr "Max"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Sparse Count"
-msgstr "Instância"
+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"
@@ -16965,25 +16952,23 @@ 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
-#, fuzzy
msgid "Buffer"
-msgstr "Visão Traseira"
+msgstr "Buffer"
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Byte Length"
-msgstr "Tema Padrão"
+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"
@@ -16995,12 +16980,11 @@ msgstr "Tamanho do FOV"
#: modules/gltf/gltf_camera.cpp
msgid "Zfar"
-msgstr ""
+msgstr "Z longe"
#: modules/gltf/gltf_camera.cpp
-#, fuzzy
msgid "Znear"
-msgstr "Linear"
+msgstr "Z perto"
#: modules/gltf/gltf_light.cpp scene/2d/canvas_modulate.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/light_2d.cpp scene/2d/polygon_2d.cpp
@@ -17031,9 +17015,8 @@ msgid "Outer Cone Angle"
msgstr "Ângulo externo do cone"
#: modules/gltf/gltf_mesh.cpp
-#, fuzzy
msgid "Blend Weights"
-msgstr "Faça mapas de luz"
+msgstr "Peso da mesclagem"
#: modules/gltf/gltf_mesh.cpp
msgid "Instance Materials"
@@ -17044,13 +17027,12 @@ msgid "Parent"
msgstr "Pai"
#: modules/gltf/gltf_node.cpp
-#, fuzzy
msgid "Xform"
-msgstr "Plataforma"
+msgstr "Xform"
#: modules/gltf/gltf_node.cpp scene/3d/mesh_instance.cpp
msgid "Skin"
-msgstr "Skin"
+msgstr "Pele"
#: modules/gltf/gltf_node.cpp scene/3d/spatial.cpp
msgid "Translation"
@@ -17086,12 +17068,11 @@ msgstr "Pontos Originais"
#: modules/gltf/gltf_skin.cpp
msgid "Inverse Binds"
-msgstr ""
+msgstr "Designações invertidas"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Non Joints"
-msgstr "Mover Junta"
+msgstr "Não-Juntas"
#: modules/gltf/gltf_skin.cpp
msgid "Joint I To Bone I"
@@ -17103,15 +17084,15 @@ msgstr "Junta I ao Nome"
#: modules/gltf/gltf_skin.cpp
msgid "Godot Skin"
-msgstr ""
+msgstr "Skin Godot"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Diffuse Img"
-msgstr "Difusa Img"
+msgstr "Imagem Difusa"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Diffuse Factor"
-msgstr "Difusa Fator"
+msgstr "Fator de Difusão"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Gloss Factor"
@@ -17123,7 +17104,7 @@ 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"
@@ -17134,23 +17115,20 @@ msgid "Major Version"
msgstr "Versão Importante"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Minor Version"
-msgstr "Versão"
+msgstr "Versão Minoritária"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "GLB Data"
-msgstr "Com Dados"
+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
-#, fuzzy
msgid "Buffer Views"
-msgstr "Visão Traseira"
+msgstr "Visão Buffer"
#: modules/gltf/gltf_state.cpp
msgid "Accessors"
@@ -17198,9 +17176,8 @@ msgid "Animations"
msgstr "Animações"
#: modules/gltf/gltf_texture.cpp
-#, fuzzy
msgid "Src Image"
-msgstr "Mostrar Ossos"
+msgstr "Imagem fonte"
#: modules/gridmap/grid_map.cpp
msgid "Mesh Library"
@@ -17211,18 +17188,16 @@ msgid "Physics Material"
msgstr "Material de Física"
#: modules/gridmap/grid_map.cpp scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Use In Baked Light"
-msgstr "Faça mapas de luz"
+msgstr "Usar no mapa de luz"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Cell"
msgstr "Célula"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Octant Size"
-msgstr "Visão Frontal"
+msgstr "Tamanho Octante"
#: modules/gridmap/grid_map.cpp
msgid "Center X"
@@ -17383,7 +17358,7 @@ msgstr "Atribua um recurso MeshLibrary a este GridMap para usar seus meshes."
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr "Iniciar bake"
+msgstr "Iniciar Bake"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
@@ -17395,7 +17370,7 @@ msgstr "Gerar buffers"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Direct lighting"
-msgstr "Iluminação direta"
+msgstr "Iluminação Direta"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Indirect lighting"
@@ -17407,7 +17382,7 @@ msgstr "Pós-processamento"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Plotting lightmaps"
-msgstr "Traçando mapas de luz"
+msgstr "Planejando Luzes"
#: modules/lightmapper_cpu/register_types.cpp
msgid "CPU Lightmapper"
@@ -17449,21 +17424,20 @@ msgid "Display Width"
msgstr "Largura de Tela"
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "Display To Lens"
-msgstr "Exibir Sem Sombreamento"
+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"
@@ -17478,19 +17452,16 @@ msgid "Auto Update Project"
msgstr "Atualizar Projeto Automaticamente"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Assembly Name"
-msgstr "Nome de Exibição"
+msgstr "Nome de Montagem"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "Solution Directory"
-msgstr "Escolha um Diretório"
+msgstr "Diretório da Solução"
#: modules/mono/godotsharp_dirs.cpp
-#, fuzzy
msgid "C# Project Directory"
-msgstr "Escolha um Diretório"
+msgstr "Diretório do Projeto C#"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
@@ -17573,7 +17544,7 @@ msgstr "Como Mapa Normal"
#: modules/opensimplex/noise_texture.cpp
msgid "Bump Strength"
-msgstr ""
+msgstr "Força do Bump"
#: modules/opensimplex/noise_texture.cpp
msgid "Noise"
@@ -17613,7 +17584,7 @@ msgstr "Strings"
#: modules/upnp/upnp.cpp
msgid "Discover Multicast If"
-msgstr ""
+msgstr "Descobrir if Multicast"
#: modules/upnp/upnp.cpp
msgid "Discover Local Port"
@@ -17624,9 +17595,8 @@ msgid "Discover IPv6"
msgstr "Descobrir IPv6"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "Description URL"
-msgstr "Descrição"
+msgstr "URL Descritiva"
#: modules/upnp/upnp_device.cpp
msgid "Service Type"
@@ -18016,9 +17986,8 @@ msgid "Return"
msgstr "Retornar"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Enabled"
-msgstr "Executável"
+msgstr "Retorno Ativado"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Return Type"
@@ -18047,7 +18016,7 @@ msgstr "Iterador"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "for (elem) in (input):"
-msgstr "para (elem) em (input):"
+msgstr "for (elem) in (input):"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Input type not iterable:"
@@ -18099,9 +18068,8 @@ msgid "On %s"
msgstr "Em %s"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "On Self"
-msgstr "Self"
+msgstr "Em sí mesmo"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_yield_nodes.cpp
@@ -18144,23 +18112,20 @@ msgid "Divide %s"
msgstr "Dividir %s"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Mod %s"
-msgstr "Mod %s"
+msgstr "[code]Mod %s[/code]"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "ShiftLeft %s"
-msgstr "ShiftLeft %s"
+msgstr ""
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "ShiftRight %s"
msgstr ""
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "BitAnd %s"
-msgstr "BitAnd %s"
+msgstr ""
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "BitOr %s"
@@ -18171,12 +18136,10 @@ msgid "BitXor %s"
msgstr ""
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Set Mode"
-msgstr "Modo de Seleção"
+msgstr "Modo de Definição"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Assign Op"
msgstr "Atribuir Op"
@@ -18225,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"
@@ -18281,12 +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
-#, fuzzy
msgid "CustomNode"
-msgstr "CustomNode"
+msgstr "Nó Personalizado"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
@@ -18303,9 +18265,8 @@ msgstr ""
"string (erro)."
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "SubCall"
-msgstr "SubCall"
+msgstr "Sub-Chamada"
#: modules/visual_script/visual_script_nodes.cpp scene/gui/graph_node.cpp
msgid "Title"
@@ -18337,7 +18298,7 @@ msgstr "Buscar VisualScript"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "Yield"
-msgstr "Yield"
+msgstr "Aguardar Retorno"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "Wait"
@@ -18360,33 +18321,28 @@ msgid "Wait Time"
msgstr "Tempo de Espera"
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "WaitSignal"
-msgstr "WaitSignal"
+msgstr "EsperarSinal"
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "WaitNodeSignal"
-msgstr "WaitNodeSignal"
+msgstr ""
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "WaitInstanceSignal"
-msgstr "WaitInstanceSignal"
+msgstr ""
#: modules/webrtc/webrtc_data_channel.cpp
-#, fuzzy
msgid "Write Mode"
-msgstr "Modo Prioridade"
+msgstr "Modo de Escrita"
#: modules/webrtc/webrtc_data_channel.h
msgid "WebRTC"
msgstr "WebRTC"
#: modules/webrtc/webrtc_data_channel.h
-#, fuzzy
msgid "Max Channel In Buffer (KB)"
-msgstr "Tamanho do buffer do índice do polígono da tela (KB)"
+msgstr "Canal Máximo no Buffer (KB)"
#: modules/websocket/websocket_client.cpp
msgid "Verify SSL"
@@ -18422,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,9 +18397,8 @@ msgid "Handshake Timeout"
msgstr "Tempo de Handshake Esgotado"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Session Mode"
-msgstr "Modo Região"
+msgstr "Modo Sessão"
#: modules/webxr/webxr_interface.cpp
msgid "Required Features"
@@ -18455,46 +18410,43 @@ msgstr "Funcionalidades Opcionais"
#: modules/webxr/webxr_interface.cpp
msgid "Requested Reference Space Types"
-msgstr ""
+msgstr "Tipos de Espaço de Referência Solicitados"
#: modules/webxr/webxr_interface.cpp
msgid "Reference Space Type"
-msgstr ""
+msgstr "Tipo de Espaço de Referência"
#: modules/webxr/webxr_interface.cpp
msgid "Visibility State"
msgstr "Estado de Visibilidade"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Bounds Geometry"
-msgstr "Tentar Novamente"
+msgstr "Limita a Geometria"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "XR Standard Mapping"
-msgstr "Encaixe inteligente"
+msgstr "Mapeamento XR Padrão"
#: platform/android/export/export.cpp
msgid "Android SDK Path"
msgstr "Caminho para SDK Android"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Debug Keystore"
-msgstr "Depurador"
+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"
-msgstr ""
+msgstr "Forçar Usuário do Sistema"
#: platform/android/export/export.cpp
msgid "Shutdown ADB On Exit"
@@ -18544,14 +18496,12 @@ msgid "The package must have at least one '.' separator."
msgstr "O pacote deve ter pelo menos um separador '.'."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Custom Build"
-msgstr "Usar Diretório de Usuário Personalizado"
+msgstr "Build Personalizada"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Use Custom Build"
-msgstr "Usar Diretório de Usuário Personalizado"
+msgstr "Usar Build Personalizada"
#: platform/android/export/export_plugin.cpp
msgid "Export Format"
@@ -18570,29 +18520,24 @@ msgid "Architectures"
msgstr "Arquiteturas"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Keystore"
-msgstr "Depurador"
+msgstr "Keystore"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Debug User"
-msgstr "Depurador"
+msgstr "Depurar Usuário"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Debug Password"
-msgstr "Senha"
+msgstr "Depurar Senha"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Release User"
-msgstr "Lançamento"
+msgstr "Liberar Usuário"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Release Password"
-msgstr "Senha"
+msgstr "Liberar Senha"
#: platform/android/export/export_plugin.cpp
msgid "One Click Deploy"
@@ -18635,9 +18580,8 @@ msgid "Graphics"
msgstr "Gráficos"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "OpenGL Debug"
-msgstr "Abrir"
+msgstr "Depurar OpenGL"
#: platform/android/export/export_plugin.cpp
msgid "XR Features"
@@ -18650,7 +18594,7 @@ msgstr "Modo XR"
#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Hand Tracking"
-msgstr "Empacotando"
+msgstr "Detecção de Mãos"
#: platform/android/export/export_plugin.cpp
msgid "Hand Tracking Frequency"
@@ -18665,24 +18609,20 @@ msgid "Immersive Mode"
msgstr "Modo Imersivo"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Small"
-msgstr "Suporte"
+msgstr "Suporte Pequeno"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Normal"
-msgstr "Suporte"
+msgstr "Suporte Normal"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Large"
-msgstr "Suporte"
+msgstr "Suporte Grande"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Xlarge"
-msgstr "Suporte"
+msgstr "Suporte Extra-grande"
#: platform/android/export/export_plugin.cpp
msgid "User Data Backup"
@@ -18701,9 +18641,8 @@ msgid "Extra Args"
msgstr "Argumentos Extra"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "APK Expansion"
-msgstr "Expressão"
+msgstr "Expansão APK"
#: platform/android/export/export_plugin.cpp
msgid "Salt"
@@ -18795,7 +18734,7 @@ msgstr "Um caminho Android SDK é necessário nas Configurações do Editor."
#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
-msgstr "Caminho do Android SDK está inválido nas Configurações do Editor."
+msgstr "Caminho do Android SDK inválido nas Configurações do Editor."
#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
@@ -18814,7 +18753,7 @@ msgstr ""
#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
-msgstr "Diretório 'build-tools' está faltando!"
+msgstr "Diretório 'build-tools' ausente!"
#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
@@ -18851,18 +18790,16 @@ msgstr ""
"utilizar plugins."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Hand Tracking\" is only valid when \"XR Mode\" is \"Oculus Mobile VrApi\" "
"or \"OpenXR\"."
msgstr ""
-"\"Hand Tracking\" só é válido quando o \"Xr Mode\" é \"Oculus Mobile VR\"."
+"\"Hand Tracking\" só é válido quando o \"XR Mode\" é \"Oculus Mobile VrApi\" "
+"ou \"OpenXR\"."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "\"Passthrough\" is only valid when \"XR Mode\" is \"OpenXR\"."
-msgstr ""
-"\"Passthrough\" só é válido quando o \"Xr Mode\" é \"Oculus Mobile VR\"."
+msgstr "\"Passthrough\" só é válido quando o \"XR Mode\" é \"OpenXR\"."
#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
@@ -18871,12 +18808,11 @@ msgstr ""
"habilitado."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Min SDK\" can only be overridden when \"Use Custom Build\" is enabled."
msgstr ""
-"\"Exportar AAB\" só é válido quando \"Usar Compilação Customizada\" está "
-"habilitado."
+"\"Min SDK\" só pode ser substituído quando \"Usar Compilação Customizada\" "
+"está habilitado."
#: platform/android/export/export_plugin.cpp
msgid "\"Min SDK\" should be a valid integer, but got \"%s\" which is invalid."
@@ -18893,12 +18829,11 @@ msgstr ""
"biblioteca Godot."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Target SDK\" can only be overridden when \"Use Custom Build\" is enabled."
msgstr ""
-"\"Exportar AAB\" só é válido quando \"Usar Compilação Customizada\" está "
-"habilitado."
+"\"Target SDK\" só pode ser substituído quando \"Usar Compilação "
+"Customizada\" está habilitado."
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -18916,11 +18851,10 @@ msgstr ""
"não foi testado e pode ser instável."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "\"Target SDK\" version must be greater or equal to \"Min SDK\" version."
msgstr ""
-"Versão do \"Target Sdk\" precisa ser igual ou maior que a versão do \"Min "
-"Sdk\"."
+"Versão do \"Target SDK\" precisa ser igual ou maior que a versão do \"Min "
+"SDK\"."
#: platform/android/export/export_plugin.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
@@ -18970,11 +18904,12 @@ msgstr "Exportando para Android"
#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
-msgstr "Nome de arquivo inválido! Android App Bundle requer a extensão *.aab."
+msgstr ""
+"Nome de arquivo inválido! O Android App Bundle requer a extensão *.aab."
#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
-msgstr "A expansão APK não é compatível com o Android App Bundle."
+msgstr "Expansão do APK não é compatível com Android App Bundle."
#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
@@ -19091,11 +19026,11 @@ msgstr "O caractere '%s' não é permitido no identificador."
#: platform/iphone/export/export.cpp
msgid "Landscape Launch Screens"
-msgstr ""
+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"
@@ -19111,7 +19046,7 @@ 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"
@@ -19135,11 +19070,11 @@ msgstr "iPad 768 X 1024"
#: platform/iphone/export/export.cpp
msgid "iPad 1536 X 2048"
-msgstr "iPad 1536 X 2048"
+msgstr ""
#: platform/iphone/export/export.cpp
msgid "iPhone 1242 X 2208"
-msgstr "iPhone 1242 X 2208"
+msgstr ""
#: platform/iphone/export/export.cpp
msgid "App Store Team ID"
@@ -19238,23 +19173,23 @@ msgstr "Descrições da Propriedade"
#: platform/iphone/export/export.cpp
msgid "iPhone 120 X 120"
-msgstr "iPhone 120 X 120"
+msgstr ""
#: platform/iphone/export/export.cpp
msgid "iPhone 180 X 180"
-msgstr "iPhone 180 X 180"
+msgstr ""
#: platform/iphone/export/export.cpp
msgid "iPad 76 X 76"
-msgstr "iPad 76 X 76"
+msgstr ""
#: platform/iphone/export/export.cpp
msgid "iPad 152 X 152"
-msgstr "iPad 152 X 152"
+msgstr ""
#: platform/iphone/export/export.cpp
msgid "iPad 167 X 167"
-msgstr "iPad 167 X 167"
+msgstr ""
#: platform/iphone/export/export.cpp
msgid "App Store 1024 X 1024"
@@ -19299,9 +19234,8 @@ msgid "Custom BG Color"
msgstr "Cor Personalizada de Fundo"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Icons"
-msgstr "Exportar Ícone"
+msgstr "Exportar Ícones"
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp
@@ -19366,9 +19300,8 @@ msgid "Export Type"
msgstr "Tipo de Exportação"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "VRAM Texture Compression"
-msgstr "Expressão"
+msgstr "Compressão de Texturas na VRAM"
#: platform/javascript/export/export.cpp
msgid "For Desktop"
@@ -19409,7 +19342,7 @@ msgstr "Teclado Virtual Experimental"
#: platform/javascript/export/export.cpp
msgid "Progressive Web App"
-msgstr "Progressive Web App"
+msgstr "Aplicativo Web Progressivo"
#: platform/javascript/export/export.cpp
msgid "Offline Page"
@@ -19521,7 +19454,7 @@ msgstr "Arquivo executável inválido."
#: platform/osx/export/codesign.cpp
msgid "Can't resize signature load command."
-msgstr ""
+msgstr "Não é possível redimensionar o comando de carregamento de assinatura."
#: platform/osx/export/codesign.cpp
msgid "Failed to create fat binary."
@@ -20124,6 +20057,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 ""
+"A versão Mono do Godot não suporta a plataforma UWP. Use a build padrão (sem "
+"suporte a C#) se deseja exportar para UWP."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -20199,7 +20134,6 @@ msgid "Failed to rename temporary file \"%s\"."
msgstr "Falha ao renomear arquivo temporário \"%s\"."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Identity Type"
msgstr "Tipo de Identidade"
@@ -20333,9 +20267,8 @@ msgid "Executable file header corrupted."
msgstr ""
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
-#, fuzzy
msgid "Executable \"pck\" section not found."
-msgstr "Executável seção \"pck\" não encontrado."
+msgstr "Seção executável \"pck\" não encontrada."
#: platform/windows/export/export.cpp
msgid "Windows"
@@ -20343,7 +20276,7 @@ msgstr "Windows"
#: platform/windows/export/export.cpp
msgid "Rcedit"
-msgstr "Rcedit"
+msgstr ""
#: platform/windows/export/export.cpp
msgid "Osslsigncode"
@@ -20351,7 +20284,7 @@ msgstr ""
#: platform/windows/export/export.cpp
msgid "Wine"
-msgstr "Wine"
+msgstr "Vinho"
#: platform/x11/export/export.cpp
msgid "32-bit executables cannot have embedded data >= 4 GiB."
@@ -20632,9 +20565,8 @@ msgid "Visible"
msgstr "Visível"
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Self Modulate"
-msgstr "Popular"
+msgstr "Auto Modular"
#: scene/2d/canvas_item.cpp
msgid "Show Behind Parent"
@@ -21084,9 +21016,8 @@ msgstr ""
"Uma textura com a forma da luz deve ser fornecida na propriedade \"textura\"."
#: scene/2d/light_2d.cpp scene/3d/light.cpp scene/gui/reference_rect.cpp
-#, fuzzy
msgid "Editor Only"
-msgstr "Editor"
+msgstr "Somente Editor"
#: scene/2d/light_2d.cpp
msgid "Texture Scale"
@@ -21575,9 +21506,8 @@ msgid "Sync To Physics"
msgstr "Sincronizar com a Física"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Moving Platform"
-msgstr "Movendo saída"
+msgstr "Plataforma Móvel"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Apply Velocity On Leave"
@@ -21976,7 +21906,7 @@ msgstr "Gerando captura"
#: scene/3d/baked_lightmap.cpp
msgid "Saving lightmaps"
-msgstr "Salvando mapas de luz"
+msgstr "Salvando lightmaps"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -22412,9 +22342,8 @@ msgid "Bias Split Scale"
msgstr "Usar Encaixe Escalar"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Depth Range"
-msgstr "Profundidade"
+msgstr "Alcance de Profundidade"
#: scene/3d/light.cpp
msgid "Omni"
@@ -22600,19 +22529,16 @@ msgid "Angular Z"
msgstr "Z Angular"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion X"
-msgstr "Ação"
+msgstr "Movimento X"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion Y"
-msgstr "Ação"
+msgstr "Movimento Y"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion Z"
-msgstr "Ação"
+msgstr "Movimento Z"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -23183,9 +23109,8 @@ msgid "Overlap Warning Threshold"
msgstr ""
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Preview Camera"
-msgstr "Visualização"
+msgstr "Visualizar Câmera"
#: scene/3d/room_manager.cpp
msgid "Portal Depth Limit"
@@ -23437,6 +23362,16 @@ msgstr "Erro"
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 "Utilizar Ambient"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr "Geometria"
@@ -23891,7 +23826,7 @@ msgid ""
"children placement behavior.\n"
"If you don't intend to add a script, use a plain Control node instead."
msgstr ""
-"O contêiner por si só não possui propósito algum, a menos que um script "
+"O contêiner por si só não tem nenhum propósito, a menos que um script "
"configure seu comportamento de posicionamento dos filhos.\n"
"Se você não pretende adicionar um script, use um nó de Controle simples."
@@ -24067,7 +24002,7 @@ msgstr "Mini-Mapa"
#: scene/gui/graph_edit.cpp
msgid "Enable grid minimap."
-msgstr "Ativar minimap em grade."
+msgstr "Ativar o minimapa de grade."
#: scene/gui/graph_node.cpp
#, fuzzy
@@ -24403,7 +24338,7 @@ msgstr "Caractere"
#: scene/gui/rich_text_label.cpp
msgid "BBCode"
-msgstr "BBCode"
+msgstr ""
#: scene/gui/rich_text_label.cpp
msgid "Meta Underlined"
@@ -25341,9 +25276,8 @@ msgid "Minimum Spaces"
msgstr "Cena Principal"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "BG"
-msgstr "Plano de Fundo"
+msgstr ""
#: scene/resources/default_theme/default_theme.cpp
msgid "FG"
@@ -25722,9 +25656,8 @@ msgid "Tab FG"
msgstr "Guia 1"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Tab BG"
-msgstr "Plano de Fundo da Aba"
+msgstr "BG da Aba"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26180,7 +26113,7 @@ msgstr "Depuração do Canal UV"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr "Blur"
+msgstr ""
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -26865,7 +26798,7 @@ msgstr "Tamanho da Radiância"
#: scene/resources/sky.cpp
msgid "Panorama"
-msgstr "Panorama"
+msgstr ""
#: scene/resources/sky.cpp
#, fuzzy
@@ -26933,7 +26866,7 @@ msgstr ""
#: scene/resources/style_box.cpp
msgid "Anti Aliasing"
-msgstr "Anti Aliasing"
+msgstr "Anti Serrilhamento"
#: scene/resources/style_box.cpp
msgid "Grow Begin"
@@ -27158,7 +27091,7 @@ msgstr "Margem de Ligação da Borda"
#: scene/resources/world_2d.cpp
msgid "Canvas"
-msgstr "Canvas"
+msgstr "Tela"
#: servers/arvr/arvr_interface.cpp
msgid "Is Primary"
@@ -27240,7 +27173,7 @@ msgstr "Nível dB"
#: servers/audio/effects/audio_effect_delay.cpp
#: servers/audio/effects/audio_effect_panner.cpp
msgid "Pan"
-msgstr "Panoramizar"
+msgstr ""
#: servers/audio/effects/audio_effect_compressor.cpp
#: servers/audio/effects/audio_effect_filter.cpp
@@ -27294,7 +27227,7 @@ msgstr ""
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Drive"
-msgstr "Drive"
+msgstr ""
#: servers/audio/effects/audio_effect_distortion.cpp
#, fuzzy
@@ -27345,7 +27278,7 @@ msgstr "Pré Atraso"
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Msec"
-msgstr "Msec"
+msgstr ""
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Room Size"
@@ -27603,9 +27536,8 @@ msgid "Lossless Compression"
msgstr "Compressão Sem Perda"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Force PNG"
-msgstr "Forçar Push"
+msgstr "Forçar PNG"
#: servers/visual_server.cpp
msgid "WebP Compression Level"
@@ -27727,9 +27659,8 @@ msgid "Ninepatch Mode"
msgstr "Modo de Interpolação"
#: servers/visual_server.cpp
-#, fuzzy
msgid "OpenGL"
-msgstr "Abrir"
+msgstr "abrir"
#: servers/visual_server.cpp
msgid "Batching Send Null"
@@ -27791,7 +27722,7 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Flash Batching"
-msgstr ""
+msgstr "Loteamento de Flashes"
#: servers/visual_server.cpp
#, fuzzy
@@ -27808,7 +27739,7 @@ msgstr "Compatibilidade"
#: servers/visual_server.cpp
msgid "Disable Half Float"
-msgstr ""
+msgstr "Desativar Meia Float"
#: servers/visual_server.cpp
#, fuzzy
@@ -27835,7 +27766,7 @@ msgstr "Usar Encaixe Escalar"
#: servers/visual_server.cpp
msgid "PVS Logging"
-msgstr ""
+msgstr "Registro PVS"
#: servers/visual_server.cpp
#, fuzzy
@@ -27862,9 +27793,8 @@ msgid "Max Active Spheres"
msgstr "Máximo de Esferas Ativas"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Max Active Polygons"
-msgstr "Mover Polígono"
+msgstr "Máximo de Polígonos Ativos"
#: servers/visual_server.cpp
#, fuzzy
@@ -27876,8 +27806,9 @@ msgid "Max Simultaneous Compiles"
msgstr "Compilações Simultâneas Máximas"
#: servers/visual_server.cpp
+#, fuzzy
msgid "Log Active Async Compiles Count"
-msgstr ""
+msgstr "Registro do Número de Compilações Assíncronas Ativas"
#: servers/visual_server.cpp
msgid "Shader Cache Size (MB)"
diff --git a/editor/translations/ro.po b/editor/translations/ro.po
index 0dc49c7dba..9e2d8b5c96 100644
--- a/editor/translations/ro.po
+++ b/editor/translations/ro.po
@@ -18,13 +18,17 @@
# FlooferLand <yunaflarf@gmail.com>, 2021, 2022.
# N3mEee <n3mebusiness@gmail.com>, 2021.
# 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-05-15 09:38+0000\n"
-"Last-Translator: Psynt <nichita@cadvegra.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"
@@ -33,11 +37,11 @@ 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.13-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
-msgstr ""
+msgstr "Driver de tableta"
#: core/bind/core_bind.cpp
msgid "Clipboard"
@@ -61,20 +65,19 @@ msgstr "V-Sync Prin Compozitor"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Delta Smoothing"
-msgstr ""
+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)"
-msgstr ""
+msgstr "Timp de utilizare scăzut al procesorului (μsec)"
#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp
msgid "Keep Screen On"
-msgstr ""
+msgstr "Păstrați ecranul pornit"
#: core/bind/core_bind.cpp
msgid "Min Window Size"
@@ -116,7 +119,7 @@ msgstr "Minimizat"
#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp
#: scene/gui/graph_node.cpp
msgid "Resizable"
-msgstr ""
+msgstr "Redimensionabil"
#: core/bind/core_bind.cpp core/os/input_event.cpp scene/2d/node_2d.cpp
#: scene/2d/physics_body_2d.cpp scene/2d/remote_transform_2d.cpp
@@ -148,7 +151,7 @@ msgstr "Indiciu Editor"
#: core/bind/core_bind.cpp
msgid "Print Error Messages"
-msgstr ""
+msgstr "Imprimare mesaje de eroare"
#: core/bind/core_bind.cpp
msgid "Iterations Per Second"
@@ -159,9 +162,8 @@ msgid "Target FPS"
msgstr "Frecvență Țintă"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Time Scale"
-msgstr "Nod DimensiuneTimp"
+msgstr "Scară de timp"
#: core/bind/core_bind.cpp main/main.cpp
#, fuzzy
@@ -173,22 +175,20 @@ msgid "Error"
msgstr "Eroare"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Error String"
-msgstr "Eroare La Salvarea"
+msgstr "Eroare string"
#: core/bind/core_bind.cpp
msgid "Error Line"
msgstr "Linia Erorii"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Result"
-msgstr "Căutați în Ajutor"
+msgstr "Rezultat"
#: core/command_queue_mt.cpp core/message_queue.cpp main/main.cpp
msgid "Memory"
-msgstr ""
+msgstr "Memorie"
#: core/command_queue_mt.cpp core/message_queue.cpp
#: core/register_core_types.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp
@@ -202,13 +202,12 @@ msgid "Limits"
msgstr "Limite"
#: core/command_queue_mt.cpp
-#, fuzzy
msgid "Command Queue"
-msgstr "Trage: Rotire"
+msgstr "Lista de comenzi"
#: core/command_queue_mt.cpp
msgid "Multithreading Queue Size (KB)"
-msgstr ""
+msgstr "Mărimea cozii de așteptare pentru mai multe fire (KB)"
#: core/func_ref.cpp modules/visual_script/visual_script_builtin_funcs.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
@@ -220,59 +219,55 @@ msgstr "Funcție"
#: core/image.cpp core/packed_data_container.cpp scene/2d/polygon_2d.cpp
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
msgid "Data"
-msgstr ""
+msgstr "Date"
#: core/io/file_access_network.cpp core/register_core_types.cpp
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp main/main.cpp
#: 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"
-msgstr ""
+msgstr "Pagina Citește înainte"
#: core/io/http_client.cpp
msgid "Blocking Mode Enabled"
-msgstr ""
+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"
@@ -288,36 +283,35 @@ 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"
-msgstr ""
+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"
-msgstr ""
+msgstr "Blocare Handshake"
#: core/io/udp_server.cpp
-#, fuzzy
msgid "Max Pending Connections"
-msgstr "Modifică Conexiunea:"
+msgstr "Număr maxim de conexiuni în așteptare"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -367,30 +361,27 @@ msgstr "În apelarea lui '%s':"
#: core/math/random_number_generator.cpp
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Seed"
-msgstr ""
+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"
-msgstr ""
+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,12 +402,11 @@ msgstr "Control"
#: core/os/input_event.cpp
msgid "Meta"
-msgstr ""
+msgstr "Meta"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Command"
-msgstr "Comunitate"
+msgstr "Comandă"
#: core/os/input_event.cpp
#, fuzzy
@@ -444,12 +434,11 @@ msgstr "Unicode"
#: core/os/input_event.cpp
msgid "Echo"
-msgstr ""
+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"
@@ -460,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"
@@ -478,7 +466,7 @@ msgstr "Presiune"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "Stilou inversat"
#: core/os/input_event.cpp
msgid "Relative"
@@ -501,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
@@ -521,55 +508,48 @@ 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
-#, fuzzy
msgid "Controller Number"
-msgstr "Linia Numărul:"
+msgstr "Numărul controlerului"
#: core/os/input_event.cpp
msgid "Controller Value"
-msgstr ""
+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
@@ -600,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
@@ -635,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
@@ -644,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
@@ -666,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
@@ -679,94 +654,84 @@ msgstr "Editor"
#: core/project_settings.cpp
msgid "Main Run Args"
-msgstr ""
+msgstr "Argumente principale ale rulării"
#: core/project_settings.cpp
-#, fuzzy
msgid "Scene Naming"
-msgstr "Calea Scenei:"
+msgstr "Denumirea scenei"
#: core/project_settings.cpp
msgid "Search In File Extensions"
-msgstr ""
+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 ""
+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 ""
+msgstr "Pagina Ssus (UI)"
#: core/project_settings.cpp
msgid "UI Page Down"
-msgstr ""
+msgstr "Pagină Jos (UI)"
#: core/project_settings.cpp
msgid "UI Home"
-msgstr ""
+msgstr "UI Acasă"
#: core/project_settings.cpp
msgid "UI End"
-msgstr ""
+msgstr "Sfârșitul interfeței de utilizator"
#: core/project_settings.cpp main/main.cpp modules/bullet/register_types.cpp
#: modules/bullet/space_bullet.cpp scene/2d/physics_body_2d.cpp
@@ -788,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
@@ -805,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
@@ -815,18 +780,17 @@ msgstr ""
#: scene/resources/multimesh.cpp servers/visual/visual_server_scene.cpp
#: servers/visual_server.cpp
msgid "Quality"
-msgstr ""
+msgstr "Calitate"
#: core/project_settings.cpp scene/gui/file_dialog.cpp
#: scene/main/scene_tree.cpp scene/resources/navigation_mesh.cpp
#: servers/visual_server.cpp
-#, fuzzy
msgid "Filters"
-msgstr "Filtre:"
+msgstr "Filtre"
#: core/project_settings.cpp scene/main/viewport.cpp
msgid "Sharpen Intensity"
-msgstr ""
+msgstr "Intensitate Sharpen"
#: core/project_settings.cpp editor/editor_export.cpp editor/editor_node.cpp
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
@@ -842,14 +806,13 @@ msgstr "Depanare"
#: core/project_settings.cpp main/main.cpp modules/gdscript/gdscript.cpp
#: modules/visual_script/visual_script.cpp scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Settings"
-msgstr "Setări:"
+msgstr "Setări"
#: core/project_settings.cpp editor/script_editor_debugger.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
msgid "Profiler"
-msgstr ""
+msgstr "Profiler"
#: core/project_settings.cpp
#, fuzzy
@@ -857,49 +820,48 @@ 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"
-msgstr ""
+msgstr "Potrivire la distanță"
#: core/project_settings.cpp
msgid "Compression Level"
-msgstr ""
+msgstr "Nivelul de compresie"
#: core/project_settings.cpp
msgid "Window Log Size"
-msgstr ""
+msgstr "Dimensiunea jurnalului de fereastră"
#: 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"
-msgstr ""
+msgstr "Android"
#: core/project_settings.cpp
msgid "Modules"
-msgstr ""
+msgstr "Module"
#: core/register_core_types.cpp
msgid "TCP"
-msgstr ""
+msgstr "TCP"
#: core/register_core_types.cpp
#, fuzzy
@@ -908,15 +870,15 @@ msgstr "Conectați la Nod:"
#: core/register_core_types.cpp
msgid "Packet Peer Stream"
-msgstr ""
+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
@@ -948,7 +910,7 @@ msgstr "Resursă"
#: core/translation.cpp editor/project_settings_editor.cpp
msgid "Locale"
-msgstr ""
+msgstr "Local"
#: core/translation.cpp
#, fuzzy
@@ -957,7 +919,7 @@ msgstr "Se Testează"
#: core/translation.cpp scene/resources/font.cpp
msgid "Fallback"
-msgstr ""
+msgstr "Fallback"
#: core/ustring.cpp scene/resources/segment_shape_2d.cpp
msgid "B"
@@ -993,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
@@ -1015,7 +977,7 @@ msgstr ""
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/visual_server.cpp
msgid "2D"
-msgstr ""
+msgstr "2D"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
@@ -1032,7 +994,7 @@ msgstr "Utilizează Pixel Snap"
#: drivers/gles2/rasterizer_scene_gles2.cpp
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Immediate Buffer Size (KB)"
-msgstr ""
+msgstr "Dimensiunea imediată a bufferului (KB)"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
@@ -1043,15 +1005,15 @@ msgstr "Procesează Lightmaps"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
msgid "Use Bicubic Sampling"
-msgstr ""
+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
@@ -1060,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"
@@ -1076,9 +1038,8 @@ msgstr ""
#: scene/animation/animation_blend_tree.cpp scene/gui/control.cpp
#: scene/main/canvas_layer.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Scale"
-msgstr "Dimensiune:"
+msgstr "Scară"
#: drivers/gles3/rasterizer_scene_gles3.cpp
#, fuzzy
@@ -1095,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)"
@@ -1186,21 +1147,19 @@ msgstr "Timp"
#: editor/animation_track_editor.cpp editor/import/resource_importer_scene.cpp
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Location"
-msgstr "Pas Rotație:"
+msgstr "Locație"
#: editor/animation_track_editor.cpp modules/gltf/gltf_node.cpp
#: scene/2d/polygon_2d.cpp scene/2d/remote_transform_2d.cpp
#: scene/3d/remote_transform.cpp scene/3d/spatial.cpp scene/gui/control.cpp
-#, fuzzy
msgid "Rotation"
-msgstr "Pas Rotație:"
+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
@@ -1210,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
@@ -1237,14 +1196,12 @@ msgid "Stream"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Start Offset"
-msgstr "Compensare Grilă:"
+msgstr "Decalaj de pornire"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "End Offset"
-msgstr "Compensare Grilă:"
+msgstr "Decalaj de sfarsire"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/import/resource_importer_scene.cpp
@@ -1368,14 +1325,12 @@ msgid "Remove this track."
msgstr "Ștergeți pista selectată."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Time (s):"
-msgstr "Timp (s): "
+msgstr "Timp (s):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Position:"
-msgstr "Poziție"
+msgstr "Poziție:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1394,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
@@ -1416,9 +1371,8 @@ msgid "Out-Handle:"
msgstr "Setează Mâner"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Stream:"
-msgstr "Închidere curbă"
+msgstr "Curent:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1648,9 +1602,8 @@ msgid "Add Method Track Key"
msgstr "Inserați Pistă și Cheie"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Method not found in object:"
-msgstr "Metoda nu a fost găsită în obiect: "
+msgstr "Metoda nu a fost găsită în obiect:"
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
@@ -1662,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"
@@ -2623,9 +2576,8 @@ msgid "There is no '%s' file."
msgstr "Nu este niciun '%s' în filă."
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Layout:"
-msgstr "Schemă"
+msgstr "Dispunere:"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -2684,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:"
@@ -2878,9 +2830,8 @@ msgid "Failed to export project files."
msgstr "Nu s-a putut porni subprocesul!"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Can't open file to read from path \"%s\"."
-msgstr "Nu pot deschide fişierul pentru scris:"
+msgstr "Nu se poate deschide fişierul pentru a citi din \"%s\":"
#: editor/editor_export.cpp
#, fuzzy
@@ -2967,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"
@@ -3021,9 +2972,8 @@ msgid "The given export path doesn't exist."
msgstr "Fișierul nu există."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found: \"%s\"."
-msgstr "Fișierul șablon nu a fost găsit:"
+msgstr "Fișierul șablonului nu a fost găsit: \"%s\"."
#: editor/editor_export.cpp
#, fuzzy
@@ -3226,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:"
@@ -3327,9 +3279,8 @@ msgid "Access"
msgstr "Succes!"
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Display Mode"
-msgstr "Mod redare:"
+msgstr "Modul de afișare"
#: editor/editor_file_dialog.cpp
#: editor/import/resource_importer_layered_texture.cpp
@@ -3349,17 +3300,15 @@ msgstr "Mod În Jur"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
msgid "Current Dir"
-msgstr "Curent:"
+msgstr "Dir curent"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Current File"
-msgstr "Profil Curent:"
+msgstr "Fișier curent"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "Current Path"
-msgstr "Curent:"
+msgstr "Calea curentă"
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp
#: scene/gui/file_dialog.cpp
@@ -3369,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"
@@ -3518,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"
@@ -3526,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"
@@ -3667,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
@@ -4235,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 ""
@@ -4932,9 +4881,8 @@ msgid "Install from file"
msgstr "Instalează Din Fișier"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select android sources file"
-msgstr "Selectează un Mesh Sursă:"
+msgstr "Selectează fisierele sursa android"
#: editor/editor_node.cpp
msgid ""
@@ -5082,9 +5030,8 @@ msgstr "Actualizare"
#: editor/editor_plugin_settings.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Version"
-msgstr "Versiune:"
+msgstr "Versiune"
#: editor/editor_plugin_settings.cpp
#, fuzzy
@@ -5282,9 +5229,8 @@ msgstr ""
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "Base Type"
-msgstr "Modificare tip bază:"
+msgstr "Tip de bază"
#: editor/editor_resource_picker.cpp
#, fuzzy
@@ -5381,9 +5327,8 @@ msgid "Font Hinting"
msgstr ""
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Main Font"
-msgstr "Caracteristici active:"
+msgstr "Font principal"
#: editor/editor_settings.cpp
msgid "Main Font Bold"
@@ -5644,9 +5589,8 @@ msgid "Appearance"
msgstr ""
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Show Line Numbers"
-msgstr "Linia Numărul:"
+msgstr "Afiseaza numerele liniei"
#: editor/editor_settings.cpp
#, fuzzy
@@ -5696,9 +5640,8 @@ msgid "Show Members Overview"
msgstr ""
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Files"
-msgstr "Fișier:"
+msgstr "Fișiere"
#: editor/editor_settings.cpp
msgid "Trim Trailing Whitespace On Save"
@@ -5869,14 +5812,12 @@ msgid "Shape"
msgstr ""
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Primary Grid Steps"
-msgstr "Pas Grilă:"
+msgstr "Pași de grilă primară"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid Size"
-msgstr "Pas Grilă:"
+msgstr "Dimensiunea grilei"
#: editor/editor_settings.cpp
msgid "Grid Division Level Max"
@@ -6047,9 +5988,8 @@ msgid "Bone Color 2"
msgstr "Redenumiţi Autoload"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Selected Color"
-msgstr "Configură Profilul Selectat:"
+msgstr "Culoarea osului selectat"
#: editor/editor_settings.cpp
msgid "Bone IK Color"
@@ -6060,9 +6000,8 @@ msgid "Bone Outline Color"
msgstr ""
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Outline Size"
-msgstr "Dimensiunea Conturului:"
+msgstr "Dimensiunea conturului osului"
#: editor/editor_settings.cpp
msgid "Viewport Border Color"
@@ -6200,9 +6139,8 @@ msgstr ""
#. TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects.
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Sorting Order"
-msgstr "Redenumind directorul:"
+msgstr "Ordinea de sortare"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Symbol Color"
@@ -6217,9 +6155,8 @@ msgid "Control Flow Keyword Color"
msgstr ""
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Base Type Color"
-msgstr "Modificare tip bază:"
+msgstr "Culoare tip de bază"
#: editor/editor_settings.cpp
msgid "Engine Type Color"
@@ -6272,14 +6209,12 @@ msgid "Text Color"
msgstr ""
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Line Number Color"
-msgstr "Linia Numărul:"
+msgstr "Culoare numărul liniei"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Safe Line Number Color"
-msgstr "Linia Numărul:"
+msgstr "Culoarea numărului liniei sigură"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Caret Color"
@@ -6431,17 +6366,15 @@ msgstr "Se conectează la Oglinda..."
#: editor/export_template_manager.cpp
#, fuzzy
msgid "Can't resolve the requested address."
-msgstr "Nu se poate rezolva numele gazdei:"
+msgstr "Nu se poate rezolva adresa solicitată."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't connect to the mirror."
-msgstr "Nu se poate conecta la gazda:"
+msgstr "Nu se poate conecta la oglindă."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No response from the mirror."
-msgstr "Nciun răspuns de la gazda:"
+msgstr "Niciun răspuns de la oglinda."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -6455,9 +6388,8 @@ msgid "Request ended up in a redirect loop."
msgstr "Cerere eșuată, prea multe redirecționări"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request failed:"
-msgstr "Cerere Eșuată."
+msgstr "Cerere Eșuată:"
#: editor/export_template_manager.cpp
msgid "Download complete; extracting templates..."
@@ -6606,9 +6538,8 @@ msgid "Uninstall templates for the current version."
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download from:"
-msgstr "Eroare Descărcare"
+msgstr "Descărcați din:"
#: editor/export_template_manager.cpp
#, fuzzy
@@ -7100,9 +7031,8 @@ msgstr ""
#: 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 "Filtre:"
+msgstr "Filtru:"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
@@ -7141,9 +7071,8 @@ msgid "Vertical"
msgstr "Mută ghidul vertical"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Generate Tangents"
-msgstr "Număr de Puncte Generate:"
+msgstr "Generează tangente"
#: editor/import/resource_importer_obj.cpp
#, fuzzy
@@ -7219,12 +7148,11 @@ msgstr "Tip Membru"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
msgid "Root Name"
-msgstr "Nume Nod:"
+msgstr "Nume rădăcină"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Scale"
-msgstr "Dimensiune:"
+msgstr "Dimensiune Radacina"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
@@ -7232,9 +7160,8 @@ msgid "Custom Script"
msgstr "Creează Nod"
#: editor/import/resource_importer_scene.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Storage"
-msgstr "Fişierul se Stochează:"
+msgstr "Stochare"
#: editor/import/resource_importer_scene.cpp
msgid "Use Legacy Names"
@@ -7320,9 +7247,8 @@ msgid "Enabled"
msgstr "Activați"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Linear Error"
-msgstr "Eroare Lineară Max:"
+msgstr "Eroare liniară maximă"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
@@ -7330,9 +7256,8 @@ msgid "Max Angular Error"
msgstr "Eroare Angulară Max:"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Max Angle"
-msgstr "Valoare:"
+msgstr "Unghiul maxim"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
@@ -7340,16 +7265,14 @@ msgid "Remove Unused Tracks"
msgstr "Elimină Pista Anim"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Clips"
-msgstr "Secvențe Anim:"
+msgstr "Clipuri"
#: 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 "Cantitate:"
+msgstr "Cantitate"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7365,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..."
@@ -7457,9 +7379,8 @@ msgid "Invert Color"
msgstr "Culori de Emisie"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Normal Map Invert Y"
-msgstr "Dimensiune Aleatorie:"
+msgstr "Hartă normală inversează Y"
#: editor/import/resource_importer_texture.cpp
#, fuzzy
@@ -7481,9 +7402,8 @@ msgid ""
msgstr ""
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Atlas File"
-msgstr "Dimensiunea Conturului:"
+msgstr "Fișierul Atlasului"
#: editor/import/resource_importer_texture_atlas.cpp
#, fuzzy
@@ -7500,9 +7420,8 @@ msgid "Trim Alpha Border From Region"
msgstr ""
#: editor/import/resource_importer_wav.cpp scene/2d/physics_body_2d.cpp
-#, fuzzy
msgid "Force"
-msgstr "Mesh Sursă:"
+msgstr "Forță"
#: editor/import/resource_importer_wav.cpp
msgid "8 Bit"
@@ -7529,9 +7448,8 @@ msgid "Trim"
msgstr ""
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Normalize"
-msgstr "Dimensiune Aleatorie:"
+msgstr "Normalizați"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
@@ -7635,9 +7553,8 @@ msgid "Capitalized"
msgstr "Proprietăți"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Localized"
-msgstr "Dimensiune Aleatorie:"
+msgstr "Localizat"
#: editor/inspector_dock.cpp
msgid "Localization not available for current language."
@@ -7984,9 +7901,8 @@ msgid "Blend:"
msgstr "Amestec:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Parameter Changed:"
-msgstr "Modificări ale Actualizării"
+msgstr "Parametru modificat:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -8404,9 +8320,8 @@ msgid "Set the end animation. This is useful for sub-transitions."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition:"
-msgstr "Tranziție: "
+msgstr "Tranziție:"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Play Mode:"
@@ -8675,7 +8590,7 @@ msgstr "Eroare Descărcare"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Available URLs"
-msgstr "Profile Disponibile:"
+msgstr "URL-uri disponibile"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
@@ -9022,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"
@@ -9087,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
@@ -9095,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"
@@ -9167,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
@@ -9210,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
@@ -9244,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"
@@ -9267,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"
@@ -9280,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
@@ -9290,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
@@ -9326,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
@@ -9337,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
@@ -9348,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
@@ -9359,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"
@@ -9377,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
@@ -9388,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
@@ -9433,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"
@@ -9445,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"
@@ -9476,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)"
@@ -9498,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
@@ -9522,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..."
@@ -9585,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 ""
@@ -9598,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"
@@ -9650,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
@@ -9673,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
@@ -9722,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"
@@ -9759,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"
@@ -9769,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"
@@ -9790,24 +9657,23 @@ 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
-#, fuzzy
msgid "Separator"
-msgstr "Enumerări:"
+msgstr "Separator"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
@@ -10239,9 +10105,8 @@ msgid "Volume"
msgstr "Volum"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Source:"
-msgstr "Sursă de Emisie: "
+msgstr "Sursă de Emisie:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
@@ -10661,9 +10526,8 @@ msgid "Flip Portals"
msgstr ""
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Room Generate Points"
-msgstr "Număr de Puncte Generate:"
+msgstr "Cameră Genereaza puncte"
#: editor/plugins/room_manager_editor_plugin.cpp
#, fuzzy
@@ -11346,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 ""
@@ -13305,9 +13169,10 @@ msgstr "Opțiuni Snapping"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Compensare Grilă:"
@@ -14714,13 +14579,13 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Imposibil de deschis '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -16758,7 +16623,7 @@ msgstr ""
#: main/main.cpp
msgid "iOS"
-msgstr ""
+msgstr "iOS"
#: main/main.cpp
msgid "Hide Home Indicator"
@@ -18713,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"
@@ -18776,9 +18639,8 @@ msgid "Get Self"
msgstr "Propriu"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "CustomNode"
-msgstr "Creează Nod"
+msgstr "Nod Custom"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
@@ -19412,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."
@@ -19934,7 +19793,7 @@ msgstr "Eroare la scrierea TextFile:"
#: platform/javascript/export/export.cpp
msgid "Web"
-msgstr ""
+msgstr "Web"
#: platform/javascript/export/export.cpp
msgid "HTTP Host"
@@ -20861,9 +20720,8 @@ msgid "Executable \"pck\" section not found."
msgstr ""
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Windows"
-msgstr "Fereastră Nouă"
+msgstr "Windows"
#: platform/windows/export/export.cpp
msgid "Rcedit"
@@ -22638,7 +22496,7 @@ msgstr ""
#: scene/3d/camera.cpp scene/3d/light.cpp scene/3d/reflection_probe.cpp
msgid "Cull Mask"
-msgstr ""
+msgstr "Masca Cull"
#: scene/3d/camera.cpp
#, fuzzy
@@ -23990,6 +23848,15 @@ msgstr "Eroare!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Se importă:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr "Geometria"
@@ -24782,7 +24649,7 @@ msgstr ""
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Caret"
-msgstr ""
+msgstr "Caret"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink"
@@ -26740,7 +26607,7 @@ msgstr ""
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "Blur"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index b79923abf1..97e9723383 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -124,13 +124,16 @@
# Gulpy <yak.aryslan.1999@gmail.com>, 2022.
# Sergey Karmanov <ppoocpel8888@gmail.com>, 2022.
# Дмитрий <Dimega@inbox.ru>, 2022.
+# Vladimir Kirillovskiy <vladimir.kirillovskiy@gmail.com>, 2022.
+# Evgeniy Khramov <thejenjagamertjg@gmail.com>, 2022.
+# kirill blaze <kirillblaze2@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-09-01 15:11+0000\n"
-"Last-Translator: Дмитрий <Dimega@inbox.ru>\n"
+"PO-Revision-Date: 2022-11-25 12:13+0000\n"
+"Last-Translator: Vladimir Kirillovskiy <vladimir.kirillovskiy@gmail.com>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ru/>\n"
"Language: ru\n"
@@ -139,7 +142,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-dev\n"
+"X-Generator: Weblate 4.15-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -1263,12 +1266,10 @@ msgid "Type"
msgstr "Тип"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "In Handle"
msgstr "Задать обработчик"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Out Handle"
msgstr "Задать обработчик"
@@ -1298,9 +1299,8 @@ msgid "Animation"
msgstr "Анимация"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Easing"
-msgstr "Переход В-ИЗ"
+msgstr "Облегчение"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
@@ -1443,12 +1443,10 @@ msgid "Easing:"
msgstr "Переход В-ИЗ:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "In-Handle:"
msgstr "Обработчик Ввода:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Out-Handle:"
msgstr "Обработчик Вывода:"
@@ -11031,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 " [порталы активны]"
@@ -11695,9 +11693,8 @@ msgid "New Animation"
msgstr "Новая анимация"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Filter animations"
-msgstr "Фильтровать анимации"
+msgstr "Фильтр анимации"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
@@ -12878,9 +12875,10 @@ msgstr "Параметры привязки"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr "Смещение"
@@ -12911,9 +12909,8 @@ msgid "Texture"
msgstr "Текстура"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tex Offset"
-msgstr "Смещение байтов"
+msgstr "Смещение текстуры"
#: editor/plugins/tile_set_editor_plugin.cpp modules/csg/csg_shape.cpp
#: scene/2d/canvas_item.cpp scene/2d/particles_2d.cpp
@@ -12931,44 +12928,36 @@ msgid "Tile Mode"
msgstr "Режим плитки"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Autotile Bitmask Mode"
msgstr "Режим битовой маски"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Size"
msgstr "Размер контура"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Spacing"
msgstr "Межстрочный интервал"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Occluder Offset"
-msgstr "Отверстие окклюдера"
+msgstr "Сдвиг окклюдера"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Navigation Offset"
msgstr "Чувствительность навигации"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Offset"
-msgstr "Базовое смещение"
+msgstr "Смещение Формы"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Transform"
-msgstr "Преобразование"
+msgstr "Трансформация формы"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision"
-msgstr "Использовать столкновение"
+msgstr "Выделить столкновение"
#: editor/plugins/tile_set_editor_plugin.cpp
#, fuzzy
@@ -12991,9 +12980,8 @@ msgid "Selected Occlusion"
msgstr "Выделение"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tileset Script"
-msgstr "Фильтр сценариев"
+msgstr "Скрипт набора тайлов"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "TileSet"
@@ -14207,14 +14195,12 @@ msgid "More Info..."
msgstr "Подробнее..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export PCK/Zip..."
-msgstr "Экспортировать PCK/Zip"
+msgstr "Экспортировать PCK/Zip..."
#: editor/project_export.cpp
-#, fuzzy
msgid "Export Project..."
-msgstr "Экспортировать проект"
+msgstr "Экспортировать проект..."
#: editor/project_export.cpp
msgid "Export All"
@@ -14226,7 +14212,7 @@ msgstr "Пожалуйста, выберите режим экспорта:"
#: editor/project_export.cpp
msgid "Export All..."
-msgstr "Экспортировать всё"
+msgstr "Экспортировать всё..."
#: editor/project_export.cpp editor/project_manager.cpp
msgid "ZIP File"
@@ -14242,9 +14228,8 @@ msgid "Export templates for this platform are missing:"
msgstr "Шаблоны экспорта для этой платформы отсутствуют:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Project Export"
-msgstr "Основатели проекта"
+msgstr "Экспорт проекта"
#: editor/project_export.cpp
msgid "Manage Export Templates"
@@ -14308,16 +14293,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Неверный путь к проекту (Что-то изменили?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Не удалось загрузить project.godot в пути проекта (ошибка %d). Возможно, он "
"отсутствует или поврежден."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Не удалось изменить project.godot в папке проекта."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Не удаётся открыть проект в «%s»."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15364,9 +15350,8 @@ msgid "Enable Scene Unique Name(s)"
msgstr "Добавить уникальное имя сцене"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "Данное уникальное имя уже использовано у другого узла в сцене."
+msgstr "Данное уникальное имя уже использовано у другого узла в сцене:"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -17195,19 +17180,16 @@ msgid "Octant Size"
msgstr "Размер октанта"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center X"
-msgstr "По центру"
+msgstr "По центру X"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center Y"
-msgstr "По центру"
+msgstr "По центру Y"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center Z"
-msgstr "По центру"
+msgstr "По центру 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
@@ -17224,9 +17206,8 @@ msgstr "Навигация"
#: 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 "Чувствительность навигации"
+msgstr "Слои навигации"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -17466,9 +17447,8 @@ msgid "Solution Directory"
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"
@@ -17624,9 +17604,8 @@ msgid "IGD Our Addr"
msgstr "IGD Наш Адр"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "IGD Status"
-msgstr "Статус"
+msgstr "IGD Статус"
#: modules/visual_script/visual_script.cpp
msgid ""
@@ -18441,9 +18420,8 @@ msgid "Visibility State"
msgstr "Видимость"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Bounds Geometry"
-msgstr "Повторить"
+msgstr "Геометрия границ"
#: modules/webxr/webxr_interface.cpp
msgid "XR Standard Mapping"
@@ -18545,14 +18523,12 @@ msgid "Keystore"
msgstr "Хранилище ключей"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Debug User"
-msgstr "Отладчик"
+msgstr "Пользователь отладчика"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Debug Password"
-msgstr "Пароль"
+msgstr "Пароль отладчика"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18589,18 +18565,16 @@ msgid "Signed"
msgstr "Подписано"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Classify As Game"
-msgstr "Имя класса"
+msgstr "Классифицировать как игру"
#: platform/android/export/export_plugin.cpp
msgid "Retain Data On Uninstall"
-msgstr ""
+msgstr "Сохранить данные при удалении программы"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Exclude From Recents"
-msgstr "Удалить узлы"
+msgstr "Исключить из недавнего"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18660,9 +18634,8 @@ msgid "Support Xlarge"
msgstr "Поддержка"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "User Data Backup"
-msgstr "Пользовательский интерфейс"
+msgstr "Резервное копирование пользовательских данных"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18670,32 +18643,28 @@ msgid "Allow"
msgstr "Разрешено"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Command Line"
-msgstr "Command"
+msgstr "Командная строка"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
msgid "Extra Args"
msgstr "Дополнительные аргументы"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "APK Expansion"
-msgstr "Выражение"
+msgstr "APK расширение"
#: platform/android/export/export_plugin.cpp
msgid "Salt"
msgstr ""
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Public Key"
-msgstr "Путь к открытому ключу SSH"
+msgstr "Открытый ключ"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Permissions"
-msgstr "Маска излучения"
+msgstr "Разрешения"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18857,12 +18826,16 @@ msgstr ""
#: platform/android/export/export_plugin.cpp
msgid "\"Min SDK\" should be a valid integer, but got \"%s\" which is invalid."
msgstr ""
+"\"Min SDK\" должно быть валидным целым числом, полученное \"%s\" - не "
+"валидно."
#: platform/android/export/export_plugin.cpp
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
@@ -18876,12 +18849,16 @@ msgstr ""
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
@@ -18890,9 +18867,8 @@ msgstr "Версия «Target Sdk» должна быть больше или р
#: platform/android/export/export_plugin.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Code Signing"
-msgstr "Подпись кода DMG"
+msgstr "Подпись кода"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -18969,7 +18945,8 @@ msgstr ""
#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name."
-msgstr "Невозможно перезаписать res://android/build/res/*.xml с именем проекта"
+msgstr ""
+"Невозможно перезаписать res://android/build/res/*.xml с именем проекта."
#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project."
@@ -19144,9 +19121,8 @@ msgid "Identifier"
msgstr "Индетификатор"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Signature"
-msgstr "Сигнал"
+msgstr "Подпись"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19155,14 +19131,12 @@ msgstr "Старшая версия"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Copyright"
-msgstr "Справа вверху"
+msgstr "Авторские права"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Capabilities"
-msgstr "Капитализировать свойства"
+msgstr "Возможности"
#: platform/iphone/export/export.cpp
msgid "Access Wi-Fi"
@@ -19173,37 +19147,32 @@ msgid "Push Notifications"
msgstr "Всплывающее уведомление"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "User Data"
-msgstr "Пользовательский интерфейс"
+msgstr "Пользовательские данные"
#: platform/iphone/export/export.cpp
msgid "Accessible From Files App"
-msgstr ""
+msgstr "Доступно из приложения Files"
#: platform/iphone/export/export.cpp
msgid "Accessible From iTunes Sharing"
-msgstr ""
+msgstr "Доступно из iTunes Sharing"
#: 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
msgid "Photolibrary Usage Description"
-msgstr "Описания свойств"
+msgstr "Описание использования фото-библиотеки"
#: platform/iphone/export/export.cpp
msgid "iPhone 120 X 120"
@@ -19246,40 +19215,33 @@ msgid "Use Launch Screen Storyboard"
msgstr ""
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Image Scale Mode"
-msgstr "Режим масштабирования"
+msgstr "Режим масштабирования изображения"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom Image @2x"
-msgstr "Пользовательское изображение"
+msgstr "Пользовательское изображение @2x"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom Image @3x"
-msgstr "Пользовательское изображение"
+msgstr "Пользовательское изображение @3x"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Use Custom BG Color"
-msgstr "Пользовательский цвет"
+msgstr "Использовать пользовательский цвет фона"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom BG Color"
-msgstr "Пользовательский цвет"
+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
-#, fuzzy
msgid "Prepare Templates"
-msgstr "Управление шаблонами"
+msgstr "Подготовить шаблоны"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19319,9 +19281,8 @@ msgid "Could not write file: \"%s\"."
msgstr "Не удалось записать файл: \"%s\"."
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Icon Creation"
-msgstr "Задать отступ"
+msgstr "Создание иконки"
#: platform/javascript/export/export.cpp
msgid "Could not read file: \"%s\"."
@@ -19337,14 +19298,12 @@ msgid "Variant"
msgstr "Вариация оттенка"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Export Type"
-msgstr "Экспорт"
+msgstr "Тип экспорта"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "VRAM Texture Compression"
-msgstr "Выражение"
+msgstr "VRAM компрессия текстуры"
#: platform/javascript/export/export.cpp
msgid "For Desktop"
@@ -19352,16 +19311,15 @@ msgstr ""
#: platform/javascript/export/export.cpp
msgid "For Mobile"
-msgstr ""
+msgstr "Для мобильных устройств"
#: platform/javascript/export/export.cpp
msgid "HTML"
-msgstr ""
+msgstr "HTML"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Export Icon"
-msgstr "Развернуть все"
+msgstr "Экспортировать иконку"
#: platform/javascript/export/export.cpp
#, fuzzy
@@ -19374,36 +19332,35 @@ msgstr ""
#: platform/javascript/export/export.cpp
msgid "Canvas Resize Policy"
-msgstr ""
+msgstr "Политика изменения размера холста"
#: platform/javascript/export/export.cpp
msgid "Focus Canvas On Start"
msgstr ""
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Experimental Virtual Keyboard"
-msgstr "Фильтр сигналов"
+msgstr "Экспериментальная виртуальная клавиатура"
#: platform/javascript/export/export.cpp
msgid "Progressive Web App"
-msgstr ""
+msgstr "Прогрессивное веб-приложение"
#: platform/javascript/export/export.cpp
msgid "Offline Page"
-msgstr ""
+msgstr "Офлайн-страница"
#: platform/javascript/export/export.cpp
msgid "Icon 144 X 144"
-msgstr ""
+msgstr "Иконка 144 X 144"
#: platform/javascript/export/export.cpp
msgid "Icon 180 X 180"
-msgstr ""
+msgstr "Иконка 180 X 180"
#: platform/javascript/export/export.cpp
msgid "Icon 512 X 512"
-msgstr ""
+msgstr "Иконка 512 X 512"
#: platform/javascript/export/export.cpp
msgid "Could not read HTML shell: \"%s\"."
@@ -19414,9 +19371,8 @@ msgid "Could not create HTTP server directory: %s."
msgstr "Не удалось создать каталог HTTP-сервера: %s."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server: %d."
-msgstr "Ошибка запуска HTTP-сервера:"
+msgstr "Ошибка запуска HTTP-сервера: %d."
#: platform/javascript/export/export.cpp
msgid "Web"
@@ -19525,31 +19481,27 @@ msgstr "Описание"
#: platform/osx/export/export.cpp
msgid "Address Book Usage Description"
-msgstr ""
+msgstr "Описание использования адресной книги"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Calendar Usage Description"
-msgstr "Описание"
+msgstr "Описание использования календаря"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Photos Library Usage Description"
-msgstr "Описания свойств"
+msgstr "Описание использования Фото библиотеки"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Desktop Folder Usage Description"
-msgstr "Описания методов"
+msgstr "Описание использования папки рабочего стола"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Documents Folder Usage Description"
-msgstr "Описания методов"
+msgstr "Описание использования папки Документов"
#: platform/osx/export/export.cpp
msgid "Downloads Folder Usage Description"
-msgstr ""
+msgstr "Описание использования папки загрузок"
#: platform/osx/export/export.cpp
msgid "Network Volumes Usage Description"
@@ -19591,49 +19543,44 @@ msgid "Entitlements"
msgstr "Гизмо"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Custom File"
-msgstr "Пользовательский шрифт"
+msgstr "Пользовательский файл"
#: platform/osx/export/export.cpp
msgid "Allow JIT Code Execution"
-msgstr ""
+msgstr "Разрешить выполнение JIT-кода"
#: platform/osx/export/export.cpp
msgid "Allow Unsigned Executable Memory"
-msgstr ""
+msgstr "Разрешить неподписанную исполняемую память"
#: platform/osx/export/export.cpp
msgid "Allow Dyld Environment Variables"
-msgstr ""
+msgstr "Разрешить переменные среды Dyld"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Disable Library Validation"
-msgstr "Заблокированная кнопка"
+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
@@ -19642,51 +19589,43 @@ 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 "Устройство Bluetooth"
#: 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
msgid "Custom Options"
-msgstr "Параметры шины"
+msgstr "Пользовательские параметры"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19698,27 +19637,24 @@ msgid "Apple ID Name"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Apple ID Password"
-msgstr "Пароль"
+msgstr "Пароль Apple ID"
#: platform/osx/export/export.cpp
msgid "Apple Team ID"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not open icon file \"%s\"."
-msgstr "Не удалось экспортировать файлы проекта"
+msgstr "Не получилось открыть файлы иконок \"%s\"."
#: platform/osx/export/export.cpp
msgid "Could not start xcrun executable."
msgstr "Не удаётся запустить исполняемый файл xcrun."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization failed."
-msgstr "Локализация"
+msgstr "Нотаризация не удалась."
#: platform/osx/export/export.cpp
msgid "Notarization request UUID: \"%s\""
@@ -19774,15 +19710,16 @@ msgid ""
"Could not start codesign executable, make sure Xcode command line tools are "
"installed."
msgstr ""
+"Не удалось запустить исполняемый файл codesign, убедитесь, что инструменты "
+"командной строки Xcode установлены."
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
msgid "No identity found."
msgstr "Identity не найдена."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Cannot sign file %s."
-msgstr "Ошибка при сохранении файла: %s"
+msgstr "Не удалось подписать файл %s."
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19802,25 +19739,23 @@ msgstr "Не удаётся запустить исполняемый файл h
#: platform/osx/export/export.cpp
msgid "`hdiutil create` failed - file exists."
-msgstr ""
+msgstr "Не удалось выполнить `hdiutil create` - файл уже существует."
#: platform/osx/export/export.cpp
msgid "`hdiutil create` failed."
-msgstr ""
+msgstr "Не удалось выполнить `hdiutil create`."
#: platform/osx/export/export.cpp
msgid "Creating app bundle"
msgstr "Создание пакета приложения"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not find template app to export: \"%s\"."
-msgstr "Не удалось найти шаблон приложения для экспорта:"
+msgstr "Не удалось найти шаблон приложения для экспорта: \"%s\"."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid export format."
-msgstr "Неверный шаблон экспорта:"
+msgstr "Неверный формат экспорта."
#: platform/osx/export/export.cpp
msgid ""
@@ -19880,9 +19815,8 @@ msgid "Sending archive for notarization"
msgstr "Отправка архива для подтверждения"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "ZIP Creation"
-msgstr "Проекция"
+msgstr "Создание ZIP"
#: platform/osx/export/export.cpp
msgid "Could not open file to read from path \"%s\"."
@@ -20028,9 +19962,8 @@ msgid "Force Builtin Codesign"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Architecture"
-msgstr "Добавить поле архитектуры"
+msgstr "Архитектура"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20043,7 +19976,7 @@ msgstr "Короткое имя"
#: platform/uwp/export/export.cpp
msgid "Publisher"
-msgstr ""
+msgstr "Издатель"
#: platform/uwp/export/export.cpp
msgid "Publisher Display Name"
@@ -20054,9 +19987,8 @@ msgid "Product GUID"
msgstr "GUID Продукта"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Publisher GUID"
-msgstr "Очистить направляющие"
+msgstr "Издатель GUID"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20064,14 +19996,12 @@ msgid "Signing"
msgstr "Сигнал"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Certificate"
-msgstr "Сертификаты"
+msgstr "Сертификат"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Algorithm"
-msgstr "Отладчик"
+msgstr "Алгоритм"
#: platform/uwp/export/export.cpp
msgid "Major"
@@ -20082,9 +20012,8 @@ msgid "Minor"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Build"
-msgstr "Режим измерения"
+msgstr "Сборка"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20096,9 +20025,8 @@ msgid "Landscape"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Portrait"
-msgstr "Порт"
+msgstr "Портрет"
#: platform/uwp/export/export.cpp
msgid "Landscape Flipped"
@@ -20115,23 +20043,23 @@ 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
@@ -20139,13 +20067,12 @@ msgid "Splash Screen"
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 X 150"
#: platform/uwp/export/export.cpp
msgid "Show Name On Wide 310 X 150"
@@ -20218,23 +20145,20 @@ 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 "Сертификат отладки"
#: 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"
@@ -20250,41 +20174,36 @@ msgid "Digest Algorithm"
msgstr "Отладчик"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Modify Resources"
-msgstr "Копировать параметры"
+msgstr "Изменить ресурсы"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "File Version"
-msgstr "Версия"
+msgstr "Версия файла"
#: platform/windows/export/export.cpp
msgid "Product Version"
msgstr "Версия продукта"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Company Name"
-msgstr "Имя кости"
+msgstr "Имя компании"
#: platform/windows/export/export.cpp
msgid "Product Name"
msgstr "Название продукта"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "File Description"
-msgstr "Описание"
+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
@@ -20307,9 +20226,8 @@ msgstr ""
"Windows > Rcedit) для изменения значка или информационных данных приложения."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "rcedit failed to modify executable: %s."
-msgstr "Недопустимый исполняемый файл."
+msgstr "rcedit не смог изменить исполняемый файл: %s."
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20322,14 +20240,12 @@ msgid "Could not find osslsigncode executable at \"%s\"."
msgstr "Не удалось найти хранилище ключей, невозможно экспортировать."
#: 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
#, fuzzy
@@ -20342,14 +20258,12 @@ msgstr ""
"Windows > Rcedit) для изменения значка или информационных данных приложения."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Signtool failed to sign executable: %s."
-msgstr "Недопустимый исполняемый файл."
+msgstr "Signtool не смог подписать исполняемый файл: %s."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Failed to remove temporary file \"%s\"."
-msgstr "Невозможно удалить временный файл:"
+msgstr "Невозможно удалить временный файл \"%s\"."
#: platform/windows/export/export.cpp
msgid ""
@@ -20376,9 +20290,8 @@ msgid "Windows executables cannot be >= 4 GiB."
msgstr ""
#: 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."
@@ -20447,39 +20360,32 @@ 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
-#, fuzzy
msgid "Physics Overrides"
-msgstr "Переопределить"
+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
@@ -20496,9 +20402,8 @@ msgid "Angular Damp"
msgstr ""
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Audio Bus"
-msgstr "Добавить аудио шину"
+msgstr "Аудио шина"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
#, fuzzy
@@ -20507,9 +20412,8 @@ msgstr "Переопределить"
#: scene/2d/audio_stream_player_2d.cpp scene/audio/audio_stream_player.cpp
#: scene/gui/video_player.cpp servers/audio/effects/audio_effect_amplify.cpp
-#, fuzzy
msgid "Volume dB"
-msgstr "Объём"
+msgstr "Громкость dB"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/audio/audio_stream_player.cpp
@@ -20520,9 +20424,8 @@ 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
-#, fuzzy
msgid "Autoplay"
-msgstr "Переключить автовоспроизведение"
+msgstr "Автовоспроизведение"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/audio_stream_player_3d.cpp
#: scene/audio/audio_stream_player.cpp
@@ -20537,9 +20440,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
@@ -20559,9 +20461,8 @@ msgid "Anchor Mode"
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
@@ -20574,9 +20475,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
@@ -20591,22 +20491,19 @@ msgstr "Лимит"
#: scene/2d/camera_2d.cpp scene/gui/control.cpp scene/gui/nine_patch_rect.cpp
#: scene/resources/style_box.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Left"
-msgstr "UI Влево"
+msgstr "Лево"
#: scene/2d/camera_2d.cpp scene/gui/control.cpp scene/gui/nine_patch_rect.cpp
#: scene/resources/style_box.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Right"
-msgstr "Свет"
+msgstr "Право"
#: scene/2d/camera_2d.cpp scene/gui/control.cpp scene/gui/nine_patch_rect.cpp
#: scene/resources/dynamic_font.cpp scene/resources/style_box.cpp
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Bottom"
-msgstr "Слева внизу"
+msgstr "Внизу"
#: scene/2d/camera_2d.cpp
#, fuzzy
@@ -20663,9 +20560,8 @@ msgstr "Задать отступ"
#: scene/2d/canvas_item.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp
-#, fuzzy
msgid "Blend Mode"
-msgstr "Blend2 узел"
+msgstr "Режим смешивания"
#: scene/2d/canvas_item.cpp
#, fuzzy
@@ -20673,9 +20569,8 @@ msgid "Light Mode"
msgstr "Справа по всей высоте"
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Particles Animation"
-msgstr "Частицы"
+msgstr "Анимация частиц"
#: scene/2d/canvas_item.cpp
msgid "Particles Anim H Frames"
@@ -20686,9 +20581,8 @@ msgid "Particles Anim V Frames"
msgstr ""
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Particles Anim Loop"
-msgstr "Частицы"
+msgstr "Цикл анимации частиц"
#: scene/2d/canvas_item.cpp scene/3d/spatial.cpp
msgid "Visibility"
@@ -20709,9 +20603,8 @@ msgid "Show Behind Parent"
msgstr ""
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Show On Top"
-msgstr "Отображать центр"
+msgstr "Отображать поверх"
#: scene/2d/canvas_item.cpp scene/2d/light_occluder_2d.cpp
#: scene/2d/tile_map.cpp
@@ -20776,9 +20669,8 @@ msgid ""
msgstr ""
#: scene/2d/collision_polygon_2d.cpp
-#, fuzzy
msgid "Build Mode"
-msgstr "Режим измерения"
+msgstr "Режим сборки"
#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp
#: scene/3d/collision_polygon.cpp scene/3d/collision_shape.cpp
@@ -20792,9 +20684,8 @@ msgid "One Way Collision"
msgstr "Одностороннее столкновение"
#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp
-#, fuzzy
msgid "One Way Collision Margin"
-msgstr "Создать полигон столкновений"
+msgstr "Отступ одностороннего полигона столкновений"
#: scene/2d/collision_shape_2d.cpp
msgid ""
@@ -20869,9 +20760,8 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
-#, fuzzy
msgid "Fixed FPS"
-msgstr "Показывать FPS"
+msgstr "Фиксированный FPS"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -20885,9 +20775,8 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
-#, fuzzy
msgid "Local Coords"
-msgstr "Локальные проекты"
+msgstr "Локальные координаты"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -20910,15 +20799,13 @@ msgid "Rect Extents"
msgstr "Гизмо"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
-#, fuzzy
msgid "Normals"
-msgstr "Формат"
+msgstr "Нормали"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Align Y"
-msgstr "Оператор присваивания"
+msgstr "Выравнивать по Y"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -20938,9 +20825,8 @@ msgstr "Начальная скорость"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Velocity Random"
-msgstr "Скорость"
+msgstr "Случайная скорость"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp
@@ -20950,9 +20836,8 @@ msgstr "Угловая скорость"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Velocity Curve"
-msgstr "Скорость"
+msgstr "Кривая скорости"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -20966,20 +20851,18 @@ msgstr "Линейное ускорение"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Accel"
-msgstr "Доступ"
+msgstr "Ускорение"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
msgid "Accel Random"
-msgstr ""
+msgstr "Случайное ускорение"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Accel Curve"
-msgstr "Разделить кривую"
+msgstr "Кривая ускорения"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21006,9 +20889,8 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Damping Curve"
-msgstr "Разделить кривую"
+msgstr "Кривая затухания"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp scene/3d/light.cpp
#: scene/resources/particles_material.cpp
@@ -21022,23 +20904,20 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Angle Curve"
-msgstr "Сомкнуть кривую"
+msgstr "Кривая угла"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
-#, fuzzy
msgid "Scale Amount"
-msgstr "Количество солнц"
+msgstr "Масштаб"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
msgid "Scale Amount Random"
msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
-#, fuzzy
msgid "Scale Amount Curve"
-msgstr "Масштабировать от курсора"
+msgstr "Кривая масштаба"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21058,45 +20937,38 @@ msgstr "Вариация оттенка"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Variation"
-msgstr "Вариация оттенка"
+msgstr "Вариация"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Variation Random"
-msgstr "Вариация оттенка"
+msgstr "Случайная вариация"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Variation Curve"
-msgstr "Вариация оттенка"
+msgstr "Кривая вариации"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Speed Random"
-msgstr "Масштаб скорости"
+msgstr "Случайная скорость"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Speed Curve"
-msgstr "Разделить кривую"
+msgstr "Кривая скорости"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Offset Random"
-msgstr "Смещение"
+msgstr "Случайное смещение"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Offset Curve"
-msgstr "Сомкнуть кривую"
+msgstr "Кривая смещения"
#: scene/2d/joints_2d.cpp
msgid "Node A and Node B must be PhysicsBody2Ds"
@@ -21122,14 +20994,12 @@ msgstr ""
"Узел А и Узел B должны быть различными экземплярами класса PhysicsBody2D"
#: scene/2d/joints_2d.cpp scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Node A"
-msgstr "Узел"
+msgstr "Узел А"
#: scene/2d/joints_2d.cpp scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Node B"
-msgstr "Узел"
+msgstr "Узел B"
#: scene/2d/joints_2d.cpp scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/light.cpp scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
@@ -21138,9 +21008,8 @@ msgid "Bias"
msgstr ""
#: scene/2d/joints_2d.cpp
-#, fuzzy
msgid "Disable Collision"
-msgstr "Заблокированная кнопка"
+msgstr "Отключить столкновения"
#: scene/2d/joints_2d.cpp scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Softness"
@@ -21152,9 +21021,8 @@ msgid "Length"
msgstr "Длина"
#: scene/2d/joints_2d.cpp
-#, fuzzy
msgid "Initial Offset"
-msgstr "Инициализировать"
+msgstr "Начальное смещение"
#: scene/2d/joints_2d.cpp scene/3d/vehicle_body.cpp
msgid "Rest Length"
@@ -21176,9 +21044,8 @@ msgid "Editor Only"
msgstr "Редактор"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Texture Scale"
-msgstr "Область текстуры"
+msgstr "Масштаб текстуры"
#: scene/2d/light_2d.cpp scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/light.cpp scene/resources/environment.cpp
@@ -21195,14 +21062,12 @@ msgid "Z Max"
msgstr ""
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Layer Min"
-msgstr "Изменить размер камеры"
+msgstr "Слой Min"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Layer Max"
-msgstr "Слой"
+msgstr "Слой Max"
#: scene/2d/light_2d.cpp
msgid "Item Cull Mask"
@@ -21217,14 +21082,12 @@ msgid "Buffer Size"
msgstr "Размер буфера"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Gradient Length"
-msgstr "Градиент отредактирован"
+msgstr "Длина градиента"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Filter Smooth"
-msgstr "Фильтр методов"
+msgstr "Фильтровать сглаживание"
#: scene/2d/light_occluder_2d.cpp
msgid "Closed"
@@ -21346,14 +21209,12 @@ msgid "Path Max Distance"
msgstr "Максимальное расстояние пути"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Avoidance"
-msgstr "Дополнительно"
+msgstr "Уклонение"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Avoidance Enabled"
-msgstr "Включить"
+msgstr "Включить уклонение"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Neighbor Dist"
@@ -21568,14 +21429,12 @@ msgid "Layers"
msgstr "Слои"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Constant Linear Velocity"
-msgstr "Инициализировать"
+msgstr "Постоянная линейная скорость"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Constant Angular Velocity"
-msgstr "Инициализировать"
+msgstr "Постоянная угловая скорость"
#: scene/2d/physics_body_2d.cpp scene/2d/tile_map.cpp scene/3d/physics_body.cpp
#: scene/resources/physics_material.cpp
@@ -21712,26 +21571,22 @@ msgstr "ID коллайдера"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Collider RID"
-msgstr "Неверный RID"
+msgstr "Коллайдер RID"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Collider Shape"
-msgstr "Режим столкновения"
+msgstr "Форма коллайдера"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Collider Shape Index"
-msgstr "Режим столкновения"
+msgstr "Индекс формы коллайдера"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Collider Velocity"
-msgstr "Вид с орбиты вправо"
+msgstr "Скорость коллайдера"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Collider Metadata"
@@ -21742,14 +21597,12 @@ msgid "Invert"
msgstr ""
#: scene/2d/polygon_2d.cpp
-#, fuzzy
msgid "Vertex Colors"
-msgstr "Вершины"
+msgstr "Цвета вершин"
#: scene/2d/polygon_2d.cpp
-#, fuzzy
msgid "Internal Vertex Count"
-msgstr "Создать внутреннюю вершину"
+msgstr "Внутренний счет вершин"
#: scene/2d/position_2d.cpp
#, fuzzy
@@ -21761,9 +21614,8 @@ msgid "Exclude Parent"
msgstr ""
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
-#, fuzzy
msgid "Cast To"
-msgstr "Создать Шейдерный узел"
+msgstr "Отбрасывать на"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Collide With"
@@ -21784,14 +21636,12 @@ msgstr ""
"Node2D."
#: scene/2d/remote_transform_2d.cpp scene/3d/remote_transform.cpp
-#, fuzzy
msgid "Remote Path"
-msgstr "Удалить точку"
+msgstr "Удаленный путь"
#: scene/2d/remote_transform_2d.cpp scene/3d/remote_transform.cpp
-#, fuzzy
msgid "Use Global Coordinates"
-msgstr "Следующая координата"
+msgstr "Использовать глобальные координаты"
#: scene/2d/skeleton_2d.cpp scene/3d/skeleton.cpp
#, fuzzy
@@ -21799,9 +21649,8 @@ msgid "Rest"
msgstr "Перезапустить"
#: scene/2d/skeleton_2d.cpp
-#, fuzzy
msgid "Default Length"
-msgstr "Тема по умолчанию"
+msgstr "Длина по умолчанию"
#: scene/2d/skeleton_2d.cpp
msgid "This Bone2D chain should end at a Skeleton2D node."
@@ -21852,9 +21701,8 @@ msgid "Tile Set"
msgstr "Набор тайлов"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Quadrant Size"
-msgstr "Изменить размер камеры"
+msgstr "Размер квадранта"
#: scene/2d/tile_map.cpp
#, fuzzy
@@ -21877,14 +21725,12 @@ msgid "Y Sort"
msgstr "Сортировать"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Show Collision"
-msgstr "Столкновение"
+msgstr "Показывать столкновение"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Compatibility Mode"
-msgstr "Режим приоритета"
+msgstr "Режим совместимости"
#: scene/2d/tile_map.cpp
msgid "Centered Textures"
@@ -21895,9 +21741,8 @@ msgid "Cell Clip UV"
msgstr ""
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Use Parent"
-msgstr "Режим столкновения"
+msgstr "Использовать родитель"
#: scene/2d/tile_map.cpp
msgid "Use Kinematic"
@@ -21909,9 +21754,8 @@ msgid "Shape Centered"
msgstr "Привязка к центру узла"
#: scene/2d/touch_screen_button.cpp
-#, fuzzy
msgid "Shape Visible"
-msgstr "Переключить видимость"
+msgstr "Видимость формы"
#: scene/2d/touch_screen_button.cpp
msgid "Passby Press"
@@ -21930,29 +21774,24 @@ msgstr ""
"является его прямым родителем."
#: scene/2d/visibility_notifier_2d.cpp scene/3d/visibility_notifier.cpp
-#, fuzzy
msgid "Pause Animations"
-msgstr "Вставить анимацию"
+msgstr "Приостановить анимации"
#: scene/2d/visibility_notifier_2d.cpp scene/3d/visibility_notifier.cpp
-#, fuzzy
msgid "Freeze Bodies"
-msgstr "Тела"
+msgstr "Заморозить тела"
#: scene/2d/visibility_notifier_2d.cpp
-#, fuzzy
msgid "Pause Particles"
-msgstr "Частицы"
+msgstr "Приостановить частицы"
#: scene/2d/visibility_notifier_2d.cpp
-#, fuzzy
msgid "Pause Animated Sprites"
-msgstr "Вставить анимацию"
+msgstr "Приостановить анимационные спрайты"
#: scene/2d/visibility_notifier_2d.cpp
-#, fuzzy
msgid "Process Parent"
-msgstr "Включить приоритет"
+msgstr "Родитель процесса"
#: scene/2d/visibility_notifier_2d.cpp
msgid "Physics Process Parent"
@@ -21992,9 +21831,8 @@ msgstr ""
"будет привязан к фактическому контроллеру."
#: scene/3d/arvr_nodes.cpp
-#, fuzzy
msgid "Anchor ID"
-msgstr "Только якоря"
+msgstr "ID якоря"
#: scene/3d/arvr_nodes.cpp
msgid "ARVRAnchor must have an ARVROrigin node as its parent."
@@ -22018,9 +21856,8 @@ msgid "World Scale"
msgstr "Мировой масштаб"
#: scene/3d/audio_stream_player_3d.cpp
-#, fuzzy
msgid "Attenuation Model"
-msgstr "Animation узел"
+msgstr "Модель затухания"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Unit dB"
@@ -22039,9 +21876,8 @@ msgid "Out Of Range Mode"
msgstr "Режим Вне Зоны Действия"
#: scene/3d/audio_stream_player_3d.cpp
-#, fuzzy
msgid "Emission Angle"
-msgstr "Цвета излучения"
+msgstr "Угол излучения"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Degrees"
@@ -22176,18 +22012,16 @@ msgid "Min Light"
msgstr "Минимальный Свет"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
-#, fuzzy
msgid "Propagation"
-msgstr "Навигация"
+msgstr "Распространение"
#: scene/3d/baked_lightmap.cpp
msgid "Image Path"
msgstr "Путь к изображению"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Light Data"
-msgstr "С данными"
+msgstr "Данные света"
#: scene/3d/bone_attachment.cpp scene/3d/physics_body.cpp
msgid "Bone Name"
@@ -22337,28 +22171,24 @@ msgid "Ring Axis"
msgstr "Ось Кольца"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Rotate Y"
-msgstr "Повернуть"
+msgstr "Повернуть по Y"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Disable Z"
-msgstr "Отключить 3D"
+msgstr "Отключить Z"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
msgid "Flatness"
msgstr "Плоскостность"
#: scene/3d/cull_instance.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Portals"
-msgstr "Перевернуть порталы"
+msgstr "Порталы"
#: scene/3d/cull_instance.cpp
-#, fuzzy
msgid "Portal Mode"
-msgstr "Режим приоритета"
+msgstr "Режим портала"
#: scene/3d/cull_instance.cpp
msgid "Include In Bound"
@@ -22404,9 +22234,8 @@ msgid "Subdiv"
msgstr ""
#: scene/3d/gi_probe.cpp
-#, fuzzy
msgid "Dynamic Range"
-msgstr "Динамическая библиотека"
+msgstr "Динамический диапазон"
#: scene/3d/gi_probe.cpp scene/3d/light.cpp
msgid "Normal Bias"
@@ -22414,23 +22243,20 @@ msgstr ""
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
#: scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Pixel Size"
-msgstr "Попиксельная привязка"
+msgstr "Размер пикселя"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Billboard"
msgstr ""
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
-#, fuzzy
msgid "Shaded"
-msgstr "Шейдер"
+msgstr "Затененный"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
-#, fuzzy
msgid "Double Sided"
-msgstr "Двойной щелчок"
+msgstr "Двухсторонний"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/material.cpp
msgid "No Depth Test"
@@ -22454,9 +22280,8 @@ msgid "Render Priority"
msgstr "Приоритет рендеринга"
#: scene/3d/label_3d.cpp
-#, fuzzy
msgid "Outline Render Priority"
-msgstr "Приоритет рендеринга"
+msgstr "Выделить приоритет рендеринга"
#: scene/3d/label_3d.cpp
#, fuzzy
@@ -22469,14 +22294,12 @@ msgid "Font"
msgstr "Шрифт"
#: scene/3d/label_3d.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Horizontal Alignment"
-msgstr "Горизонтальная включена"
+msgstr "Горизонтальное выравнивание"
#: scene/3d/label_3d.cpp
-#, fuzzy
msgid "Vertical Alignment"
-msgstr "Выравнивание"
+msgstr "Вертикальное выравнивание"
#: scene/3d/label_3d.cpp scene/gui/dialogs.cpp scene/gui/label.cpp
msgid "Autowrap"
@@ -22488,25 +22311,21 @@ msgid "Indirect Energy"
msgstr "Цвета излучения"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Negative"
-msgstr "GDNative"
+msgstr "Негатив"
#: scene/3d/light.cpp scene/resources/material.cpp
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Specular"
-msgstr "Режим измерения"
+msgstr ""
#: scene/3d/light.cpp
-#, fuzzy
msgid "Bake Mode"
-msgstr "Режим битовой маски"
+msgstr "Режим запекания"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Contact"
-msgstr "Контраст"
+msgstr "Контакт"
#: scene/3d/light.cpp
#, fuzzy
@@ -22514,24 +22333,20 @@ msgid "Reverse Cull Face"
msgstr "Сбросить громкость шины"
#: scene/3d/light.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Directional Shadow"
-msgstr "Направления"
+msgstr "Направленные тени"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 1"
-msgstr "Раздельный"
+msgstr "Раздельный 1"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 2"
-msgstr "Раздельный"
+msgstr "Раздельный 2"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 3"
-msgstr "Раздельный"
+msgstr "Раздельный 3"
#: scene/3d/light.cpp
#, fuzzy
@@ -22544,23 +22359,20 @@ msgid "Bias Split Scale"
msgstr "Базовый масштаб"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Depth Range"
-msgstr "Глубина"
+msgstr "Диапазон глубины"
#: scene/3d/light.cpp
msgid "Omni"
msgstr ""
#: scene/3d/light.cpp
-#, fuzzy
msgid "Shadow Mode"
-msgstr "Шейдер"
+msgstr "Режим тени"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Shadow Detail"
-msgstr "Показать по умолчанию"
+msgstr "Детали тени"
#: scene/3d/light.cpp
msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
@@ -22571,9 +22383,8 @@ msgid "Spot"
msgstr ""
#: scene/3d/light.cpp
-#, fuzzy
msgid "Angle Attenuation"
-msgstr "Анимация"
+msgstr "Угол угасания"
#: scene/3d/mesh_instance.cpp
msgid "Software Skinning"
@@ -22592,23 +22403,20 @@ msgid ""
msgstr ""
#: scene/3d/navigation.cpp scene/resources/curve.cpp
-#, fuzzy
msgid "Up Vector"
-msgstr "Вектор"
+msgstr "Вектор вверх"
#: scene/3d/navigation.cpp
-#, fuzzy
msgid "Cell Height"
-msgstr "Тестируемые"
+msgstr "Высота клетки"
#: scene/3d/navigation_agent.cpp
msgid "Agent Height Offset"
msgstr ""
#: scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Ignore Y"
-msgstr "[Игнорировать]"
+msgstr "Игнорировать Y"
#: scene/3d/navigation_agent.cpp
#, fuzzy
@@ -22677,9 +22485,8 @@ msgstr ""
"Mode установлено в «Particle Billboard»."
#: scene/3d/particles.cpp
-#, fuzzy
msgid "Visibility AABB"
-msgstr "Переключить видимость"
+msgstr "Видимость AABB"
#: scene/3d/particles.cpp
#, fuzzy
@@ -22719,59 +22526,48 @@ msgstr ""
"Измените размер дочерней формы коллизии."
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Axis Lock"
-msgstr "Ось"
+msgstr "Заблокировать ось"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear X"
-msgstr "Линейный"
+msgstr "Линейный X"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Y"
-msgstr "Линейный"
+msgstr "Линейный Y"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Z"
-msgstr "Линейный"
+msgstr "Линейный Z"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular X"
-msgstr "Угловая скорость"
+msgstr "Угловая скорость X"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Y"
-msgstr "Угловая скорость"
+msgstr "Угловая скорость Y"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Z"
-msgstr "Угловая скорость"
+msgstr "Угловая скорость Z"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion X"
-msgstr "Движение"
+msgstr "Движение X"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion Y"
-msgstr "Движение"
+msgstr "Движение Y"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion Z"
-msgstr "Движение"
+msgstr "Движение Z"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Joint Constraints"
-msgstr "Константы"
+msgstr "Ограничения соединений"
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Impulse Clamp"
@@ -22798,24 +22594,20 @@ msgid "Angular Limit Enabled"
msgstr "Фильтр сигналов"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Upper"
-msgstr "Линейный"
+msgstr "Верхний лимит угловой скорости"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Lower"
-msgstr "Угловая скорость"
+msgstr "Нижний лимит угловой скорости"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Bias"
-msgstr "Линейный"
+msgstr "Смещение лимита угловой скорости"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Softness"
-msgstr "Угловая скорость"
+msgstr "Мягкость лимита угловой скорости"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -22823,14 +22615,12 @@ msgid "Angular Limit Relaxation"
msgstr "Угловая скорость"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Limit Upper"
-msgstr "Линейный"
+msgstr "Линейный лимит верхний"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Limit Lower"
-msgstr "Линейный"
+msgstr "Линейный лимит нижний"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -22979,14 +22769,12 @@ msgid "Angular Limit"
msgstr "Угловой Предел"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Upper"
-msgstr "ВЕРХНИЙ РЕГИСТР"
+msgstr "Верхний"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Lower"
-msgstr "нижний регистр"
+msgstr "Нижний"
#: scene/3d/physics_joint.cpp
msgid "Motor"
@@ -23003,14 +22791,12 @@ msgid "Max Impulse"
msgstr "Макс скорость"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Limit"
-msgstr "Линейный"
+msgstr "Линейный лимит"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Upper Distance"
-msgstr "Расстояние образца"
+msgstr "Верхняя дистанция"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23023,29 +22809,24 @@ msgid "Restitution"
msgstr "Описание"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Motion"
-msgstr "Инициализировать"
+msgstr "Линейное движение"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Ortho"
-msgstr "Задний ортогональный"
+msgstr "Линейный ортогональный"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Upper Angle"
-msgstr "ВЕРХНИЙ РЕГИСТР"
+msgstr "Верхний Угол"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Lower Angle"
-msgstr "нижний регистр"
+msgstr "Нижний угол"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Angular Motion"
-msgstr "Угловая скорость"
+msgstr "Угловое движение"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23053,19 +22834,16 @@ msgid "Angular Ortho"
msgstr "Угловая прямость"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Limit X"
-msgstr "Линейный"
+msgstr "Линейный лимит X"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Motor X"
-msgstr "Инициализировать"
+msgstr "Линейный мотор X"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Force Limit"
-msgstr "Рисовать лимиты"
+msgstr "Форсировать лимиты"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23090,14 +22868,12 @@ msgid "Angular Spring X"
msgstr "X Угловой Пружины"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Limit Y"
-msgstr "Линейный"
+msgstr "Линейный лимит Y"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Motor Y"
-msgstr "Инициализировать"
+msgstr "Линейный мотор Y"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23118,14 +22894,12 @@ msgid "Angular Spring Y"
msgstr "Y Угловой Пружины"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Limit Z"
-msgstr "Линейный"
+msgstr "Линейный лимит Z"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Motor Z"
-msgstr "Инициализировать"
+msgstr "Линейный мотор Z"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23170,14 +22944,12 @@ msgid "Linked Room"
msgstr "Связанная комната"
#: scene/3d/portal.cpp
-#, fuzzy
msgid "Use Default Margin"
-msgstr "По умолчанию"
+msgstr "Использовать отступы по умолчанию"
#: scene/3d/proximity_group.cpp
-#, fuzzy
msgid "Group Name"
-msgstr "Сгруппирован"
+msgstr "Имя группы"
#: scene/3d/proximity_group.cpp
msgid "Dispatch Mode"
@@ -23188,18 +22960,16 @@ msgid "Grid Radius"
msgstr "Радиус сетки"
#: scene/3d/ray_cast.cpp
-#, fuzzy
msgid "Debug Shape"
-msgstr "Отладчик"
+msgstr "Форма отладчика"
#: scene/3d/ray_cast.cpp scene/resources/style_box.cpp
msgid "Thickness"
msgstr ""
#: scene/3d/reflection_probe.cpp scene/main/viewport.cpp
-#, fuzzy
msgid "Update Mode"
-msgstr "Режим вращения"
+msgstr "Режим обновления"
#: scene/3d/reflection_probe.cpp
#, fuzzy
@@ -23212,14 +22982,12 @@ msgid "Box Projection"
msgstr "Проект"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Enable Shadows"
-msgstr "Включить привязку"
+msgstr "Включить тени"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Ambient Color"
-msgstr "Выбрать цвет"
+msgstr "Ambient цвет"
#: scene/3d/reflection_probe.cpp
#, fuzzy
@@ -23227,9 +22995,8 @@ msgid "Ambient Energy"
msgstr "Цвета излучения"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Ambient Contrib"
-msgstr "Отступ вправо"
+msgstr "Ambient влияние"
#: scene/3d/remote_transform.cpp
msgid ""
@@ -23273,9 +23040,8 @@ msgid "Bound"
msgstr "Граница"
#: scene/3d/room_group.cpp
-#, fuzzy
msgid "Roomgroup Priority"
-msgstr "Приоритет"
+msgstr "Roomgroup приоритет"
#: scene/3d/room_group.cpp
msgid "The RoomManager should not be placed inside a RoomGroup."
@@ -23309,28 +23075,24 @@ msgstr "Главная"
#: scene/animation/animation_player.cpp scene/animation/animation_tree.cpp
#: scene/animation/animation_tree_player.cpp
#: servers/audio/effects/audio_effect_delay.cpp
-#, fuzzy
msgid "Active"
-msgstr "Действие"
+msgstr "Активный"
#: scene/3d/room_manager.cpp
msgid "Roomlist"
msgstr "Список комнат"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
-#, fuzzy
msgid "PVS"
-msgstr "FPS"
+msgstr ""
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "PVS Mode"
-msgstr "Режим осмотра"
+msgstr "PVS режим"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "PVS Filename"
-msgstr "ZIP-файл"
+msgstr "PVS имя файла"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
msgid "Gameplay"
@@ -23342,42 +23104,36 @@ msgid "Gameplay Monitor"
msgstr "Геймплей"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Use Secondary PVS"
-msgstr "Использовать привязку масштабирования"
+msgstr "Использовать вторичный PVS"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Merge Meshes"
-msgstr "Меши"
+msgstr "Соединить меши"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Show Margins"
-msgstr "Отображать центр"
+msgstr "Показать отступы"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Debug Sprawl"
-msgstr "Отладка"
+msgstr "Отладка Sprawl"
#: scene/3d/room_manager.cpp
msgid "Overlap Warning Threshold"
msgstr ""
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Preview Camera"
-msgstr "Размер превью"
+msgstr "Камера предпросмотра"
#: scene/3d/room_manager.cpp
msgid "Portal Depth Limit"
msgstr ""
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Default Portal Margin"
-msgstr "Отступ портала"
+msgstr "Отступ портала по умолчанию"
#: scene/3d/room_manager.cpp
#, fuzzy
@@ -23435,43 +23191,36 @@ msgstr ""
"Убедитесь, что все комнаты содержат геометрию или границы заданы вручную."
#: scene/3d/skeleton.cpp scene/resources/skin.cpp
-#, fuzzy
msgid "Pose"
-msgstr "Копировать позу"
+msgstr "Поза"
#: scene/3d/skeleton.cpp
-#, fuzzy
msgid "Bound Children"
-msgstr "Дети"
+msgstr "Связать детей"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Pinned Points"
-msgstr "Закреплено %s"
+msgstr "Закрепленные точки"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Attachments"
-msgstr "Гизмо"
+msgstr "Приложения"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Point Index"
-msgstr "Получить индекс"
+msgstr "Индекс точки"
#: scene/3d/soft_body.cpp
msgid "Spatial Attachment Path"
msgstr ""
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Physics Enabled"
-msgstr "Кадр физики %"
+msgstr "Физика включена"
#: scene/3d/soft_body.cpp
-#, fuzzy
msgid "Parent Collision Ignore"
-msgstr "Создать полигон столкновений"
+msgstr "Игнорировать родительские столкновения"
#: scene/3d/soft_body.cpp
msgid "Simulation Precision"
@@ -23552,9 +23301,8 @@ msgid "Opacity"
msgstr ""
#: scene/3d/sprite_3d.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Transparent"
-msgstr "Транспонировать"
+msgstr "Прозрачный"
#: scene/3d/sprite_3d.cpp
msgid ""
@@ -23578,9 +23326,8 @@ msgid "Per-Wheel Motion"
msgstr "Колёсико вниз"
#: scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Engine Force"
-msgstr "Онлайн документация"
+msgstr "Сила движка"
#: scene/3d/vehicle_body.cpp
msgid "Brake"
@@ -23617,28 +23364,34 @@ msgid "Friction Slip"
msgstr "Функция"
#: scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Suspension"
-msgstr "Выражение"
+msgstr "Подвеска"
#: scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Max Force"
-msgstr "Ошибка"
+msgstr "Макс Сила"
#: scene/3d/visibility_notifier.cpp
msgid "AABB"
msgstr ""
-#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
+#: scene/3d/visual_instance.cpp
#, fuzzy
-msgid "Geometry"
-msgstr "Повторить"
+msgid "Sorting"
+msgstr "Сортировать"
#: scene/3d/visual_instance.cpp
#, fuzzy
+msgid "Use AABB Center"
+msgstr "Использовать Ambient"
+
+#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
+msgid "Geometry"
+msgstr "Геометрия"
+
+#: scene/3d/visual_instance.cpp
msgid "Material Override"
-msgstr "Переопределить"
+msgstr "Переопределить материалы"
#: scene/3d/visual_instance.cpp
#, fuzzy
@@ -23646,9 +23399,8 @@ msgid "Material Overlay"
msgstr "Наложение материала"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Cast Shadow"
-msgstr "Создать Шейдерный узел"
+msgstr "Отбрасывать тень"
#: scene/3d/visual_instance.cpp
#, fuzzy
@@ -23666,9 +23418,8 @@ msgid "Generate Lightmap"
msgstr "Создание карт освещения"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Lightmap Scale"
-msgstr "Запекание LightMap"
+msgstr "Масштаб карты освещения"
#: scene/3d/visual_instance.cpp
msgid "LOD"
@@ -23719,9 +23470,8 @@ msgid "Animation not found: '%s'"
msgstr "Анимация не найдена: %s"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Mix Mode"
-msgstr "Mix узел"
+msgstr "Mix режим"
#: scene/animation/animation_blend_tree.cpp
msgid "Fadein Time"
@@ -23742,24 +23492,20 @@ msgid "Autorestart"
msgstr "Автоперезапуск"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Delay"
-msgstr "Задержка (мс)"
+msgstr "Задержка"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Random Delay"
-msgstr "Случайная задержка автоперезапуска"
+msgstr "Случайная задержка"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Add Amount"
-msgstr "Количество"
+msgstr "Добавить количество"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Blend Amount"
-msgstr "Количество солнц"
+msgstr "Количество смешивания"
#: scene/animation/animation_blend_tree.cpp
#, fuzzy
@@ -23773,19 +23519,16 @@ msgstr "Добавить входной порт"
#: scene/animation/animation_blend_tree.cpp
#: scene/animation/animation_node_state_machine.cpp
-#, fuzzy
msgid "Xfade Time"
-msgstr "Время затухания"
+msgstr "Время Xfade"
#: scene/animation/animation_node_state_machine.cpp
-#, fuzzy
msgid "Switch Mode"
-msgstr "Множественный выбор"
+msgstr "Режим переключения"
#: scene/animation/animation_node_state_machine.cpp
-#, fuzzy
msgid "Auto Advance"
-msgstr "Автоматическая установка"
+msgstr "Автоматическое продвижение"
#: scene/animation/animation_node_state_machine.cpp
#, fuzzy
@@ -23797,28 +23540,24 @@ msgid "Anim Apply Reset"
msgstr "Анимация - Применить сброс"
#: scene/animation/animation_player.cpp
-#, fuzzy
msgid "Current Animation"
-msgstr "Задать анимацию"
+msgstr "Текущая анимация"
#: scene/animation/animation_player.cpp
-#, fuzzy
msgid "Assigned Animation"
-msgstr "Добавить анимацию"
+msgstr "Привязанная анимация"
#: scene/animation/animation_player.cpp
msgid "Reset On Save"
msgstr ""
#: scene/animation/animation_player.cpp
-#, fuzzy
msgid "Current Animation Length"
-msgstr "Изменить длину анимации"
+msgstr "Длина текущей анимации"
#: scene/animation/animation_player.cpp
-#, fuzzy
msgid "Current Animation Position"
-msgstr "Добавить точку анимации"
+msgstr "Позиция текущей анимации"
#: scene/animation/animation_player.cpp
#, fuzzy
@@ -23826,9 +23565,8 @@ msgid "Playback Options"
msgstr "Параметры воспроизведения"
#: scene/animation/animation_player.cpp
-#, fuzzy
msgid "Default Blend Time"
-msgstr "Тема по умолчанию"
+msgstr "Время смешения по умолчанию"
#: scene/animation/animation_player.cpp
msgid "Method Call Mode"
@@ -23867,32 +23605,28 @@ msgid "Tree Root"
msgstr "Корень дерева"
#: scene/animation/animation_tree.cpp
-#, fuzzy
msgid "Anim Player"
-msgstr "Закрепить анимацию игрока"
+msgstr "Анимация игрока"
#: scene/animation/animation_tree.cpp
msgid "Root Motion"
msgstr ""
#: scene/animation/animation_tree.cpp
-#, fuzzy
msgid "Track"
-msgstr "Добавить трек"
+msgstr "Дорожка"
#: scene/animation/animation_tree_player.cpp
msgid "This node has been deprecated. Use AnimationTree instead."
msgstr "Этот узел был удален. Вместо этого используйте AnimationTree."
#: scene/animation/animation_tree_player.cpp
-#, fuzzy
msgid "Playback"
-msgstr "Запустить"
+msgstr "Воспроизведение"
#: scene/animation/animation_tree_player.cpp
-#, fuzzy
msgid "Master Player"
-msgstr "Вставить параметры"
+msgstr "Главный Игрок"
#: scene/animation/animation_tree_player.cpp
#, fuzzy
@@ -23900,29 +23634,24 @@ msgid "Base Path"
msgstr "Путь экспорта"
#: scene/animation/root_motion_view.cpp
-#, fuzzy
msgid "Animation Path"
-msgstr "Анимация"
+msgstr "Путь анимации"
#: scene/animation/root_motion_view.cpp
-#, fuzzy
msgid "Zero Y"
-msgstr "Ноль"
+msgstr "Ноль Y"
#: scene/animation/skeleton_ik.cpp
-#, fuzzy
msgid "Root Bone"
-msgstr "Имя корневого узла"
+msgstr "Корневая кость"
#: scene/animation/skeleton_ik.cpp
-#, fuzzy
msgid "Tip Bone"
-msgstr "Кости"
+msgstr "Конечная кость"
#: scene/animation/skeleton_ik.cpp
-#, fuzzy
msgid "Interpolation"
-msgstr "Режим интерполяции"
+msgstr "Интерполяция"
#: scene/animation/skeleton_ik.cpp
#, fuzzy
@@ -23938,40 +23667,34 @@ msgid "Magnet"
msgstr "Магнит"
#: scene/animation/skeleton_ik.cpp
-#, fuzzy
msgid "Target Node"
-msgstr "Переподчинить узел"
+msgstr "Целевой узел"
#: scene/animation/skeleton_ik.cpp
-#, fuzzy
msgid "Max Iterations"
-msgstr "Сделать функцию"
+msgstr "Макс повторений"
#: scene/animation/tween.cpp
msgid "Playback Process Mode"
msgstr ""
#: scene/animation/tween.cpp
-#, fuzzy
msgid "Playback Speed"
-msgstr "Запустить сцену"
+msgstr "Скорость воспроизведения"
#: scene/audio/audio_stream_player.cpp
-#, fuzzy
msgid "Mix Target"
-msgstr "Цель"
+msgstr "Смешанная цель"
#: scene/gui/aspect_ratio_container.cpp scene/gui/range.cpp
#: servers/audio/effects/audio_effect_compressor.cpp
-#, fuzzy
msgid "Ratio"
-msgstr "Сохранять пропорции"
+msgstr "Пропорции"
#: scene/gui/aspect_ratio_container.cpp scene/gui/texture_button.cpp
#: scene/gui/texture_rect.cpp
-#, fuzzy
msgid "Stretch Mode"
-msgstr "Режим выделения"
+msgstr "Режим растяжения"
#: scene/gui/aspect_ratio_container.cpp scene/gui/box_container.cpp
msgid "Alignment"
@@ -23983,9 +23706,8 @@ msgid "Shortcut In Tooltip"
msgstr "Отображать центр"
#: scene/gui/base_button.cpp
-#, fuzzy
msgid "Action Mode"
-msgstr "Режим иконки"
+msgstr "Режим действия"
#: scene/gui/base_button.cpp
msgid "Enabled Focus Mode"
@@ -24018,9 +23740,8 @@ msgid "Icon Align"
msgstr ""
#: scene/gui/button.cpp
-#, fuzzy
msgid "Expand Icon"
-msgstr "Развернуть все"
+msgstr "Расширить иконку"
#: scene/gui/center_container.cpp
#, fuzzy
@@ -24043,24 +23764,20 @@ msgid "Edit Alpha"
msgstr "Редактировать полигон"
#: scene/gui/color_picker.cpp
-#, fuzzy
msgid "HSV Mode"
-msgstr "Режим выделения"
+msgstr "HSV режим"
#: scene/gui/color_picker.cpp
-#, fuzzy
msgid "Raw Mode"
-msgstr "Режим осмотра"
+msgstr "Режим Raw"
#: scene/gui/color_picker.cpp
-#, fuzzy
msgid "Deferred Mode"
-msgstr "Отложенное"
+msgstr "Отложенный режим"
#: scene/gui/color_picker.cpp
-#, fuzzy
msgid "Presets Enabled"
-msgstr "Предустановки"
+msgstr "Пресеты включены"
#: scene/gui/color_picker.cpp
msgid "Presets Visible"
@@ -24108,14 +23825,12 @@ msgstr ""
"положение «Stop» или «Pass»."
#: scene/gui/control.cpp
-#, fuzzy
msgid "Anchor"
-msgstr "Только якоря"
+msgstr "Якорь"
#: scene/gui/control.cpp
-#, fuzzy
msgid "Grow Direction"
-msgstr "Направления"
+msgstr "Направление роста"
#: scene/gui/control.cpp scene/resources/navigation_mesh.cpp
msgid "Min Size"
@@ -24136,14 +23851,12 @@ msgid "Hint"
msgstr ""
#: scene/gui/control.cpp
-#, fuzzy
msgid "Tooltip"
-msgstr "Инструменты"
+msgstr "Подсказка"
#: scene/gui/control.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Focus"
-msgstr "Переместить фокус на строку пути"
+msgstr "Фокус"
#: scene/gui/control.cpp
msgid "Neighbour Left"
@@ -24158,9 +23871,8 @@ msgid "Neighbour Right"
msgstr ""
#: scene/gui/control.cpp
-#, fuzzy
msgid "Neighbour Bottom"
-msgstr "Внизу посередине"
+msgstr "Сосед снизу"
#: scene/gui/control.cpp
msgid "Next"
@@ -24187,9 +23899,8 @@ msgid "Size Flags"
msgstr "Флаги размера"
#: scene/gui/control.cpp
-#, fuzzy
msgid "Stretch Ratio"
-msgstr "Режим выделения"
+msgstr "Коэффициент растяжения"
#: scene/gui/control.cpp
#, fuzzy
@@ -24239,19 +23950,16 @@ msgid "Snap Distance"
msgstr "Расстояние привязки"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom Min"
-msgstr "Приблизить"
+msgstr "Приблизить Min"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom Max"
-msgstr "Приблизить"
+msgstr "Приблизить Max"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom Step"
-msgstr "Отдалить"
+msgstr "Приблизить шаг"
#: scene/gui/graph_edit.cpp
#, fuzzy
@@ -24274,9 +23982,8 @@ msgstr "Показать кости"
#: scene/gui/graph_node.cpp scene/gui/option_button.cpp
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Selected"
-msgstr "Выделение"
+msgstr "Выделено"
#: scene/gui/graph_node.cpp scene/resources/default_theme/default_theme.cpp
msgid "Comment"
@@ -24300,23 +24007,20 @@ msgid "Incremental Search Max Interval Msec"
msgstr ""
#: scene/gui/item_list.cpp scene/gui/tree.cpp
-#, fuzzy
msgid "Allow Reselect"
-msgstr "Применить сброс"
+msgstr "Разрешить перевыбор"
#: scene/gui/item_list.cpp scene/gui/tree.cpp
-#, fuzzy
msgid "Allow RMB Select"
-msgstr "Заполнить выбранное"
+msgstr "Разрешить выбор ПКМ"
#: scene/gui/item_list.cpp
msgid "Max Text Lines"
msgstr ""
#: scene/gui/item_list.cpp
-#, fuzzy
msgid "Auto Height"
-msgstr "Тестируемые"
+msgstr "Авто высота"
#: scene/gui/item_list.cpp
msgid "Max Columns"
@@ -24339,18 +24043,16 @@ msgid "Fixed Icon Size"
msgstr "Фиксированный размер иконки"
#: scene/gui/label.cpp
-#, fuzzy
msgid "V Align"
-msgstr "Оператор присваивания"
+msgstr "Вертикальное выравнивание"
#: scene/gui/label.cpp scene/gui/rich_text_label.cpp
msgid "Visible Characters"
msgstr "Видимые символы"
#: scene/gui/label.cpp scene/gui/rich_text_label.cpp
-#, fuzzy
msgid "Percent Visible"
-msgstr "Переключить видимость"
+msgstr "Процент видимости"
#: scene/gui/label.cpp
msgid "Lines Skipped"
@@ -24378,34 +24080,28 @@ msgid "Expand To Text Length"
msgstr ""
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Context Menu Enabled"
-msgstr "Контекстная справка"
+msgstr "Включить контекстное меню"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Virtual Keyboard Enabled"
-msgstr "Фильтр сигналов"
+msgstr "Включить виртуальную клавиатуру"
#: scene/gui/line_edit.cpp
-#, fuzzy
msgid "Clear Button Enabled"
-msgstr "Фильтр сигналов"
+msgstr "Включить кнопку очистки"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Shortcut Keys Enabled"
-msgstr "Горячие клавиши"
+msgstr "Включить горячие клавиши"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Middle Mouse Paste Enabled"
-msgstr "Фильтр сигналов"
+msgstr "Включить вставку средней кнопкой мыши"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Selecting Enabled"
-msgstr "Только выделенное"
+msgstr "Включить выделение"
#: scene/gui/line_edit.cpp scene/gui/rich_text_label.cpp
#: scene/gui/text_edit.cpp
@@ -24413,14 +24109,12 @@ msgid "Deselect On Focus Loss Enabled"
msgstr ""
#: scene/gui/line_edit.cpp
-#, fuzzy
msgid "Right Icon"
-msgstr "Правая кнопка мыши"
+msgstr "Правая иконка"
#: scene/gui/line_edit.cpp
-#, fuzzy
msgid "Placeholder"
-msgstr "Загрузить как заполнитель"
+msgstr "Заполнитель"
#: scene/gui/line_edit.cpp
msgid "Alpha"
@@ -24443,9 +24137,8 @@ msgid "Underline"
msgstr ""
#: scene/gui/menu_button.cpp
-#, fuzzy
msgid "Switch On Hover"
-msgstr "Множественный выбор"
+msgstr "Переключить при наведении"
#: scene/gui/nine_patch_rect.cpp scene/resources/style_box.cpp
#, fuzzy
@@ -24453,9 +24146,8 @@ msgid "Draw Center"
msgstr "По центру"
#: scene/gui/nine_patch_rect.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "Region Rect"
-msgstr "Задать регион"
+msgstr "Прямоугольный регион"
#: scene/gui/nine_patch_rect.cpp
#, fuzzy
@@ -24479,9 +24171,8 @@ msgstr ""
"работать как Stretch."
#: scene/gui/popup.cpp
-#, fuzzy
msgid "Popup"
-msgstr "Заполнить"
+msgstr "Всплывающее окно"
#: scene/gui/popup.cpp
#, fuzzy
@@ -24499,9 +24190,8 @@ msgstr ""
"но они будут скрыты при запуске."
#: scene/gui/popup_menu.cpp
-#, fuzzy
msgid "Hide On Item Selection"
-msgstr "Центрировать выбранное"
+msgstr "Спрятать при выделении предмета"
#: scene/gui/popup_menu.cpp
#, fuzzy
@@ -24518,9 +24208,8 @@ msgid "Submenu Popup Delay"
msgstr ""
#: scene/gui/popup_menu.cpp
-#, fuzzy
msgid "Allow Search"
-msgstr "Поиск"
+msgstr "Разрешить поиск"
#: scene/gui/progress_bar.cpp
msgid "Percent"
@@ -24548,9 +24237,8 @@ msgid "Exp Edit"
msgstr "Редактировать"
#: scene/gui/range.cpp
-#, fuzzy
msgid "Rounded"
-msgstr "Сгруппирован"
+msgstr "Округлённый"
#: scene/gui/range.cpp
msgid "Allow Greater"
@@ -24569,14 +24257,12 @@ msgid "Border Width"
msgstr "Ширина границы"
#: scene/gui/rich_text_effect.cpp
-#, fuzzy
msgid "Relative Index"
-msgstr "Получить индекс"
+msgstr "Относительный индекс"
#: scene/gui/rich_text_effect.cpp
-#, fuzzy
msgid "Absolute Index"
-msgstr "Автоотступ"
+msgstr "Абсолютный индекс"
#: scene/gui/rich_text_effect.cpp
#, fuzzy
@@ -24584,9 +24270,8 @@ msgid "Elapsed Time"
msgstr "Прошедшее время"
#: scene/gui/rich_text_effect.cpp
-#, fuzzy
msgid "Env"
-msgstr "Конец"
+msgstr "Среда"
#: scene/gui/rich_text_effect.cpp
msgid "Character"
@@ -24605,9 +24290,8 @@ msgid "Tab Size"
msgstr "Размер табов"
#: scene/gui/rich_text_label.cpp
-#, fuzzy
msgid "Fit Content Height"
-msgstr "Изменить вес костей"
+msgstr "Вместить по высоте контента"
#: scene/gui/rich_text_label.cpp
msgid "Scroll Active"
@@ -24618,9 +24302,8 @@ msgid "Scroll Following"
msgstr ""
#: scene/gui/rich_text_label.cpp
-#, fuzzy
msgid "Selection Enabled"
-msgstr "Только выделенное"
+msgstr "Включить выделение"
#: scene/gui/rich_text_label.cpp scene/gui/text_edit.cpp
#, fuzzy
@@ -24628,14 +24311,12 @@ msgid "Override Selected Font Color"
msgstr "Переопределить выбранный цвет шрифта"
#: scene/gui/rich_text_label.cpp
-#, fuzzy
msgid "Custom Effects"
-msgstr "Передвинуть эффект шины"
+msgstr "Пользовательские эффекты"
#: scene/gui/scroll_bar.cpp
-#, fuzzy
msgid "Custom Step"
-msgstr "Пользовательский узел"
+msgstr "Пользовательский шаг"
#: scene/gui/scroll_container.cpp
msgid ""
@@ -24671,9 +24352,8 @@ msgid "Scrollable"
msgstr ""
#: scene/gui/slider.cpp
-#, fuzzy
msgid "Tick Count"
-msgstr "Выбрать цвет"
+msgstr "Счетчик галочек"
#: scene/gui/slider.cpp
#, fuzzy
@@ -24694,9 +24374,8 @@ msgid "Split Offset"
msgstr "Смещение разделения"
#: scene/gui/split_container.cpp scene/gui/tree.cpp
-#, fuzzy
msgid "Collapsed"
-msgstr "Свернуть все"
+msgstr "Свернуто"
#: scene/gui/split_container.cpp
#, fuzzy
@@ -24782,9 +24461,8 @@ msgid "Draw"
msgstr "Рисовать"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Block Mode"
-msgstr "Разблокировать узел"
+msgstr "Режим блокировки"
#: scene/gui/text_edit.cpp
msgid "Moving By Right Click"
@@ -24803,9 +24481,8 @@ msgid "Hover"
msgstr ""
#: scene/gui/texture_button.cpp
-#, fuzzy
msgid "Focused"
-msgstr "Переместить фокус на строку пути"
+msgstr "Сфокусировано"
#: scene/gui/texture_button.cpp
#, fuzzy
@@ -24814,9 +24491,8 @@ msgstr "Режим столкновения"
#: scene/gui/texture_button.cpp scene/gui/texture_rect.cpp
#: scene/gui/video_player.cpp
-#, fuzzy
msgid "Expand"
-msgstr "Развернуть все"
+msgstr "Развернуть"
#: scene/gui/texture_progress.cpp
msgid "Under"
@@ -24828,9 +24504,8 @@ msgid "Over"
msgstr "Перезаписать"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Progress"
-msgstr "Свойства темы"
+msgstr "Прогресс"
#: scene/gui/texture_progress.cpp
msgid "Progress Offset"
@@ -24849,9 +24524,8 @@ msgid "Radial Fill"
msgstr ""
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Initial Angle"
-msgstr "Инициализировать"
+msgstr "Начальный угол"
#: scene/gui/texture_progress.cpp
#, fuzzy
@@ -24868,24 +24542,20 @@ msgid "Nine Patch Stretch"
msgstr "Режим интерполяции"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Stretch Margin Left"
-msgstr "Задать отступ"
+msgstr "Растянуть отступ лево"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Stretch Margin Top"
-msgstr "Задать отступ"
+msgstr "Растянуть отступ вверх"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Stretch Margin Right"
-msgstr "Задать отступ"
+msgstr "Растянуть отступ право"
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Stretch Margin Bottom"
-msgstr "Режим выделения"
+msgstr "Растянуть отступ низ"
#: scene/gui/tree.cpp
msgid "Custom Minimum Height"
@@ -24896,9 +24566,8 @@ msgid "(Other)"
msgstr "(Другие)"
#: scene/gui/tree.cpp
-#, fuzzy
msgid "Column Titles Visible"
-msgstr "Переключить видимость"
+msgstr "Видимость заголовков столбцов"
#: scene/gui/tree.cpp
#, fuzzy
@@ -24922,9 +24591,8 @@ msgid "Paused"
msgstr "Остановлен"
#: scene/gui/video_player.cpp
-#, fuzzy
msgid "Buffering Msec"
-msgstr "Буферизация"
+msgstr "Буферизация Msec"
#: scene/gui/video_player.cpp
#, fuzzy
@@ -24932,9 +24600,8 @@ msgid "Stream Position"
msgstr "Установить позицию входа кривой"
#: scene/gui/viewport_container.cpp
-#, fuzzy
msgid "Stretch Shrink"
-msgstr "Извлечь"
+msgstr "Растянуть сжать"
#: scene/main/canvas_layer.cpp
#, fuzzy
@@ -24946,9 +24613,8 @@ msgid "Download File"
msgstr "Загрузить файл"
#: scene/main/http_request.cpp
-#, fuzzy
msgid "Download Chunk Size"
-msgstr "Загрузка"
+msgstr "Размер куска скачивания"
#: scene/main/http_request.cpp
msgid "Body Size Limit"
@@ -24978,38 +24644,32 @@ msgid "Name Casing"
msgstr ""
#: scene/main/node.cpp
-#, fuzzy
msgid "Editor Description"
-msgstr "Описание"
+msgstr "Редактировать описание"
#: scene/main/node.cpp
-#, fuzzy
msgid "Pause Mode"
-msgstr "Режим осмотра"
+msgstr "Режим паузы"
#: scene/main/node.cpp
-#, fuzzy
msgid "Physics Interpolation Mode"
-msgstr "физическая интерполяции"
+msgstr "Режим физической интерполяции"
#: scene/main/node.cpp
-#, fuzzy
msgid "Display Folded"
-msgstr "Режим без теней"
+msgstr "Показать сложённым"
#: scene/main/node.cpp
-#, fuzzy
msgid "Filename"
-msgstr "Переименовать"
+msgstr "Имя файла"
#: scene/main/node.cpp
msgid "Owner"
msgstr "Владелец"
#: scene/main/node.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Multiplayer"
-msgstr "Умножить %s"
+msgstr "Мультиплеер"
#: scene/main/node.cpp
#, fuzzy
@@ -25022,9 +24682,8 @@ msgid "Process Priority"
msgstr "Включить приоритет"
#: scene/main/scene_tree.cpp scene/main/timer.cpp
-#, fuzzy
msgid "Time Left"
-msgstr "Слева вверху"
+msgstr "Осталось времени"
#: scene/main/scene_tree.cpp
#, fuzzy
@@ -25032,18 +24691,16 @@ msgid "Debug Collisions Hint"
msgstr "Режим столкновения"
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Debug Navigation Hint"
-msgstr "Режим навигации"
+msgstr "Подсказка режима навигации"
#: scene/main/scene_tree.cpp
msgid "Use Font Oversampling"
msgstr ""
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Edited Scene Root"
-msgstr "Новый корень сцены"
+msgstr "Редактировать корень сцены"
#: scene/main/scene_tree.cpp
msgid "Root"
@@ -25064,9 +24721,8 @@ msgid "Shape Color"
msgstr ""
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Contact Color"
-msgstr "Выбрать цвет"
+msgstr "Цвет контакта"
#: scene/main/scene_tree.cpp
msgid "Geometry Color"
@@ -25082,9 +24738,8 @@ msgid "Max Contacts Displayed"
msgstr ""
#: scene/main/scene_tree.cpp scene/resources/shape_2d.cpp
-#, fuzzy
msgid "Draw 2D Outlines"
-msgstr "Создать контур"
+msgstr "Создать 2D контур"
#: scene/main/scene_tree.cpp servers/visual_server.cpp
msgid "Reflections"
@@ -25119,9 +24774,8 @@ msgid "Use 32 BPC Depth"
msgstr ""
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Default Environment"
-msgstr "Окружение"
+msgstr "Окружение по умолчанию"
#: scene/main/scene_tree.cpp
msgid ""
@@ -25154,9 +24808,8 @@ msgid "Autostart"
msgstr "Автозапуск"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Viewport Path"
-msgstr "Путь экспорта"
+msgstr "Путь окна предпросмотра"
#: scene/main/viewport.cpp
msgid ""
@@ -25197,14 +24850,12 @@ msgid "World 2D"
msgstr "Мир 2D"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Transparent BG"
-msgstr "Транспонировать"
+msgstr "Прозрачный фон"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Handle Input Locally"
-msgstr "Изменить входное значение"
+msgstr "Обрабатывать ввод локально"
#: scene/main/viewport.cpp
msgid "FXAA"
@@ -25229,9 +24880,8 @@ msgid "Render Direct To Screen"
msgstr ""
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Debug Draw"
-msgstr "Отладка"
+msgstr "Отладка рисовки"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25243,9 +24893,8 @@ msgid "V Flip"
msgstr ""
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Clear Mode"
-msgstr "Режим измерения"
+msgstr "Режим очистки"
#: scene/main/viewport.cpp
msgid "Enable 2D"
@@ -25284,58 +24933,48 @@ msgid "Quad 3"
msgstr ""
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Canvas Transform"
-msgstr "Очистить преобразование"
+msgstr "Преобразование полотна"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Global Canvas Transform"
-msgstr "Сохранить глобальные преобразования"
+msgstr "Глобальное преобразование полотна"
#: scene/main/viewport.cpp
msgid "Tooltip Delay (sec)"
msgstr ""
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "Swap OK Cancel"
-msgstr "UI Отменить"
+msgstr "Поменять местами OK Cancel"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "Layer Names"
-msgstr "Имя переменной"
+msgstr "Имена слоя"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "2D Render"
-msgstr "Рендеринг"
+msgstr "2D Рендеринг"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "3D Render"
-msgstr "Рендеринг"
+msgstr "3D Рендеринг"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "2D Physics"
-msgstr "Физика"
+msgstr "2D Физика"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "3D Physics"
-msgstr "Физика"
+msgstr "3D Физика"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "2D Navigation"
-msgstr "Навигация"
+msgstr "2D Навигация"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "3D Navigation"
-msgstr "Навигация"
+msgstr "3D Навигация"
#: scene/register_scene_types.cpp
msgid "Use hiDPI"
@@ -25364,9 +25003,8 @@ msgid "Segments"
msgstr "Сегменты"
#: scene/resources/curve.cpp
-#, fuzzy
msgid "Bake Resolution"
-msgstr "Половинное разрешение"
+msgstr "Запечь разрешение"
#: scene/resources/curve.cpp
msgid "Bake Interval"
@@ -25377,34 +25015,28 @@ msgid "Panel"
msgstr ""
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color"
-msgstr "Цвет комментария"
+msgstr "Цвет шрифта"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color Pressed"
-msgstr "Цвет кости 1"
+msgstr "Цвет нажатого шрифта"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color Hover"
-msgstr "Цвет кости 1"
+msgstr "Цвет наведенного шрифта"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color Focus"
-msgstr "Следовать за фокусом"
+msgstr "Цвет шрифта в фокусе"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color Disabled"
-msgstr "Отключить обрезку"
+msgstr "Цвет отключенного шрифта"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "H Separation"
-msgstr "H Разделение"
+msgstr "Горизонтальное разделение"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25482,9 +25114,8 @@ msgid "Off Disabled"
msgstr "Отключённый"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color Shadow"
-msgstr "Цвет кости 1"
+msgstr "Цвет тени шрифта"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25502,43 +25133,36 @@ msgid "Shadow Offset Y"
msgstr "Отступ тени по Y"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Shadow As Outline"
-msgstr "Показывать предыдущий контур"
+msgstr "Тень как контур"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Color Selected"
-msgstr "Разблокировать выделенное"
+msgstr "Цвет шрифта выделенного"
#: scene/resources/default_theme/default_theme.cpp
msgid "Font Color Uneditable"
msgstr ""
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Cursor Color"
-msgstr "Пользовательский цвет"
+msgstr "Цвет курсора"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Clear Button Color"
-msgstr "Фильтр сигналов"
+msgstr "Цвет кнопки Очистить"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Clear Button Color Pressed"
-msgstr "Фильтр сигналов"
+msgstr "Цвет нажатой кнопки Очистить"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Minimum Spaces"
-msgstr "Главная сцена"
+msgstr "Минимальные расстояния"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "BG"
-msgstr "Б"
+msgstr "Задний фон"
#: scene/resources/default_theme/default_theme.cpp
msgid "FG"
@@ -25552,9 +25176,8 @@ msgstr "Вкладка 1"
#: scene/resources/default_theme/default_theme.cpp
#: scene/resources/dynamic_font.cpp scene/resources/world.cpp
#: scene/resources/world_2d.cpp
-#, fuzzy
msgid "Space"
-msgstr "Главная сцена"
+msgstr "Пространство"
#: scene/resources/default_theme/default_theme.cpp
msgid "Folded"
@@ -25630,9 +25253,8 @@ msgid "Decrement Pressed"
msgstr ""
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Slider"
-msgstr "Коллайдер"
+msgstr "Слайдер"
#: scene/resources/default_theme/default_theme.cpp
msgid "Grabber Area"
@@ -25661,19 +25283,16 @@ msgid "Scaleborder Size"
msgstr "Размер границы"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Title Font"
-msgstr "Размер шрифта заголовков справки"
+msgstr "Шрифт заголовка"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Title Color"
-msgstr "Цвет текста"
+msgstr "Цвет заголовка"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Title Height"
-msgstr "Тестовая высота"
+msgstr "Высота заголовка"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25691,9 +25310,8 @@ msgid "Close V Offset"
msgstr "Смещение шума"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Parent Folder"
-msgstr "Создать папку"
+msgstr "Родительская папка"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25716,9 +25334,8 @@ msgid "Labeled Separator Right"
msgstr "Именованный разделитель"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Font Separator"
-msgstr "Разделитель цветов шрифта"
+msgstr "Разделитель шрифта"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25740,14 +25357,12 @@ msgid "Selected Frame"
msgstr "Выбрать кадры"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Default Frame"
-msgstr "Z Far по умолчанию"
+msgstr "Кадр по умолчанию"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Default Focus"
-msgstr "Шрифт по умолчанию"
+msgstr "Фокус по умолчанию"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25755,9 +25370,8 @@ msgid "Comment Focus"
msgstr "Комментарий"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Breakpoint"
-msgstr "Точки останова"
+msgstr "Точка остановки"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25775,9 +25389,8 @@ msgid "Resizer Color"
msgstr "Использовать цвет"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Title Offset"
-msgstr "Смещение байтов"
+msgstr "Смещение заголовка"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25804,9 +25417,8 @@ msgid "Cursor Unfocused"
msgstr ""
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Button Pressed"
-msgstr "Нажато"
+msgstr "Нажатая кнопка"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25824,19 +25436,16 @@ msgid "Title Button Hover"
msgstr "Кнопка-переключатель"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Custom Button"
-msgstr "Пользовательский шрифт"
+msgstr "Пользовательская кнопка"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Custom Button Pressed"
-msgstr "Параметры шины"
+msgstr "Пользовательская кнопка нажата"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Custom Button Hover"
-msgstr "Пользовательский цвет"
+msgstr "Пользовательская кнопка наведена"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25878,14 +25487,12 @@ msgid "Custom Button Font Highlight"
msgstr ""
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Item Margin"
-msgstr "Задать отступ"
+msgstr "Отступ предмета"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Button Margin"
-msgstr "Маска кнопок"
+msgstr "Отступ кнопки"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25898,19 +25505,16 @@ msgid "Draw Guides"
msgstr "Отображение направляющих"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Scroll Border"
-msgstr "Вертикальная прокрутка"
+msgstr "Граница прокрутки"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Scroll Speed"
-msgstr "Скорость вертикальной прокрутки"
+msgstr "Скорость прокрутки"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Icon Margin"
-msgstr "Задать отступ"
+msgstr "Отступ иконки"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25970,9 +25574,8 @@ msgid "Label V Align BG"
msgstr ""
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Large"
-msgstr "Цель"
+msgstr "Крупный"
#: scene/resources/default_theme/default_theme.cpp
msgid "Folder"
@@ -26024,9 +25627,8 @@ msgid "Add Preset"
msgstr "Загрузить пресет"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Color Hue"
-msgstr "Тема редактора"
+msgstr "Оттенок цвета"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26054,28 +25656,24 @@ msgid "Preset BG Icon"
msgstr "Пресет"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Normal Font"
-msgstr "Передняя часть портала"
+msgstr "Обычный шрифт"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Bold Font"
-msgstr "Шрифт кода"
+msgstr "Жирный шрифт"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Italics Font"
-msgstr "Основной шрифт"
+msgstr "Курсивный шрифт"
#: scene/resources/default_theme/default_theme.cpp
msgid "Bold Italics Font"
msgstr ""
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Mono Font"
-msgstr "Основной шрифт"
+msgstr "Моноширинный шрифт"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26088,29 +25686,24 @@ msgid "Table V Separation"
msgstr "Разделение таблицы V"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Margin Left"
-msgstr "Задать отступ"
+msgstr "Отступ слева"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Margin Top"
-msgstr "Отступ"
+msgstr "Отступ сверху"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Margin Right"
-msgstr "Отступ вправо"
+msgstr "Отступ справа"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Margin Bottom"
-msgstr "Режим выделения"
+msgstr "Отступ снизу"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Autohide"
-msgstr "Автоматически"
+msgstr "Скрывать автоматически"
#: scene/resources/default_theme/default_theme.cpp
msgid "Minus"
@@ -26131,9 +25724,8 @@ msgid "Grid Major"
msgstr "Сеточная карта"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Selection Fill"
-msgstr "Только выделенное"
+msgstr "Заполнение выделенного"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26183,9 +25775,8 @@ msgid "Outline Size"
msgstr "Размер контура"
#: scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Outline Color"
-msgstr "Функция"
+msgstr "Цвет контура"
#: scene/resources/dynamic_font.cpp
#, fuzzy
@@ -26215,9 +25806,8 @@ msgid "Sky"
msgstr "Небо"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sky Custom FOV"
-msgstr "Пользовательский узел"
+msgstr "Пользовательский угол обзора неба"
#: scene/resources/environment.cpp
msgid "Sky Orientation"
@@ -26262,24 +25852,20 @@ msgid "Sun Amount"
msgstr "Количество солнц"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Depth Enabled"
-msgstr "Глубина"
+msgstr "Глубина включена"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Depth Begin"
-msgstr "Глубина"
+msgstr "Глубина начало"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Depth End"
-msgstr "Глубина"
+msgstr "Глубина конец"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Depth Curve"
-msgstr "Разделить кривую"
+msgstr "Кривая глубины"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26292,9 +25878,8 @@ msgid "Transmit Curve"
msgstr "Разделить кривую"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Height Enabled"
-msgstr "Фильтр сигналов"
+msgstr "Высота включена"
#: scene/resources/environment.cpp
msgid "Height Min"
@@ -26305,14 +25890,12 @@ msgid "Height Max"
msgstr "Макс высота"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Height Curve"
-msgstr "Разделить кривую"
+msgstr "Кривая высоты"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Tonemap"
-msgstr "Переназначения"
+msgstr "Карта тональности"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26341,9 +25924,8 @@ msgid "SS Reflections"
msgstr "Масштабировать выбранное"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Max Steps"
-msgstr "Шаг"
+msgstr "Макс шагов"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26427,13 +26009,12 @@ msgstr ""
#: scene/resources/environment.cpp
#: servers/audio/effects/audio_effect_chorus.cpp
msgid "2"
-msgstr ""
+msgstr "2"
#: scene/resources/environment.cpp
#: servers/audio/effects/audio_effect_chorus.cpp
-#, fuzzy
msgid "3"
-msgstr "3D"
+msgstr "3"
#: scene/resources/environment.cpp
#: servers/audio/effects/audio_effect_chorus.cpp
@@ -26465,9 +26046,8 @@ msgid "HDR Luminance Cap"
msgstr ""
#: scene/resources/environment.cpp
-#, fuzzy
msgid "HDR Scale"
-msgstr "Масштабировать"
+msgstr "HDR маcштаб"
#: scene/resources/environment.cpp
msgid "Bicubic Upscale"
@@ -26478,9 +26058,8 @@ msgid "Adjustments"
msgstr "Adjustments (настройки)"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Brightness"
-msgstr "Свет"
+msgstr "Яркость"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26502,9 +26081,8 @@ msgid "Distance Field"
msgstr "Режим без отвлечения"
#: scene/resources/gradient.cpp
-#, fuzzy
msgid "Raw Data"
-msgstr "Данные карты"
+msgstr "Необработанные данные"
#: scene/resources/gradient.cpp
#, fuzzy
@@ -26562,9 +26140,8 @@ msgid "Do Not Receive Shadows"
msgstr ""
#: scene/resources/material.cpp
-#, fuzzy
msgid "Disable Ambient Light"
-msgstr "Отступ вправо"
+msgstr "Отключить окружающие освещение"
#: scene/resources/material.cpp
#, fuzzy
@@ -26576,9 +26153,8 @@ msgid "Albedo Tex MSDF"
msgstr ""
#: scene/resources/material.cpp
-#, fuzzy
msgid "Vertex Color"
-msgstr "Вершины"
+msgstr "Цвет вершин"
#: scene/resources/material.cpp
msgid "Use As Albedo"
@@ -26593,9 +26169,8 @@ msgid "Parameters"
msgstr "Параметры"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Diffuse Mode"
-msgstr "Режим осмотра"
+msgstr "Режим смешения"
#: scene/resources/material.cpp
#, fuzzy
@@ -26639,9 +26214,8 @@ msgid "Use Alpha Scissor"
msgstr ""
#: scene/resources/material.cpp
-#, fuzzy
msgid "Particles Anim"
-msgstr "Частицы"
+msgstr "Анимация частиц"
#: scene/resources/material.cpp
#, fuzzy
@@ -26667,9 +26241,8 @@ msgid "Texture Channel"
msgstr "Область текстуры"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Emission"
-msgstr "Маска излучения"
+msgstr "Излучение"
#: scene/resources/material.cpp
msgid "On UV2"
@@ -26744,14 +26317,12 @@ msgid "Detail"
msgstr "Деталь"
#: scene/resources/material.cpp
-#, fuzzy
msgid "UV Layer"
-msgstr "Слой"
+msgstr "UV Слой"
#: scene/resources/material.cpp
-#, fuzzy
msgid "UV1"
-msgstr "UV"
+msgstr "UV1"
#: scene/resources/material.cpp
msgid "Triplanar"
@@ -26762,9 +26333,8 @@ msgid "Triplanar Sharpness"
msgstr ""
#: scene/resources/material.cpp
-#, fuzzy
msgid "UV2"
-msgstr "UV"
+msgstr "UV2"
#: scene/resources/material.cpp
#, fuzzy
@@ -26776,9 +26346,8 @@ msgid "Distance Fade"
msgstr ""
#: scene/resources/material.cpp
-#, fuzzy
msgid "Async Mode"
-msgstr "Режим осмотра"
+msgstr "Асинхронный режим"
#: scene/resources/mesh.cpp
#, fuzzy
@@ -26790,14 +26359,12 @@ msgid "Custom AABB"
msgstr ""
#: scene/resources/mesh_library.cpp
-#, fuzzy
msgid "Mesh Transform"
-msgstr "Преобразование"
+msgstr "Преобразование меша"
#: scene/resources/mesh_library.cpp
-#, fuzzy
msgid "NavMesh Transform"
-msgstr "Очистить преобразование"
+msgstr "NavMesh преобразование"
#: scene/resources/multimesh.cpp
#, fuzzy
@@ -26823,9 +26390,8 @@ msgid "Visible Instance Count"
msgstr ""
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Sampling"
-msgstr "Масштаб:"
+msgstr "Семплирование"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -26846,9 +26412,8 @@ msgid "Source Group Name"
msgstr "Название группы-источника"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Cells"
-msgstr "Ячейка"
+msgstr "Ячейки"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -26864,33 +26429,28 @@ msgid "Max Slope"
msgstr ""
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Regions"
-msgstr "Регион"
+msgstr "Регионы"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Merge Size"
-msgstr "Слияние из Сцены"
+msgstr "Размер слияния"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Edges"
-msgstr "Край"
+msgstr "Края"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Max Error"
-msgstr "Ошибка"
+msgstr "Max Ошибка"
#: scene/resources/navigation_mesh.cpp
msgid "Verts Per Poly"
msgstr ""
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Details"
-msgstr "Деталь"
+msgstr "Детали"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -26915,14 +26475,12 @@ msgid "Walkable Low Height Spans"
msgstr ""
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Baking AABB"
-msgstr "Генерация AABB"
+msgstr "Запекание AABB"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Baking AABB Offset"
-msgstr "Базовое смещение"
+msgstr "Смещение запекания AABB"
#: scene/resources/occluder_shape.cpp
msgid "Spheres"
@@ -26933,9 +26491,8 @@ msgid "OccluderShapeSphere Set Spheres"
msgstr "OccluderShapeSphere Задать сферы"
#: scene/resources/occluder_shape_polygon.cpp
-#, fuzzy
msgid "Polygon Points"
-msgstr "Полигоны"
+msgstr "Точки полигонов"
#: scene/resources/occluder_shape_polygon.cpp
#, fuzzy
@@ -26951,19 +26508,16 @@ msgid "Trail"
msgstr "След"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Divisor"
-msgstr "Разделить %s"
+msgstr "Разделитель"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Size Modifier"
-msgstr "Модификатор скорости свободного вида"
+msgstr "Модификатор скорости"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Color Modifier"
-msgstr "Модификатор замедления свободного вида"
+msgstr "Модификатор цвета"
#: scene/resources/particles_material.cpp
#, fuzzy
@@ -26987,9 +26541,8 @@ msgid "Scale Random"
msgstr "Случайный Масштаб"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Scale Curve"
-msgstr "Сомкнуть кривую"
+msgstr "Кривая масштаба"
#: scene/resources/physics_material.cpp
msgid "Rough"
@@ -27030,23 +26583,20 @@ msgid "Top Radius"
msgstr "Верхний радиус"
#: scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Bottom Radius"
-msgstr "Справа внизу"
+msgstr "Нижний радиус"
#: scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Left To Right"
-msgstr "Справа вверху"
+msgstr "Слева на право"
#: scene/resources/primitive_meshes.cpp
msgid "Is Hemisphere"
msgstr ""
#: scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Curve Step"
-msgstr "Кривая"
+msgstr "Шаг кривой"
#: scene/resources/ray_shape.cpp scene/resources/segment_shape_2d.cpp
msgid "Slips On Slope"
@@ -27071,9 +26621,8 @@ msgid "Bind"
msgstr "Привязка"
#: scene/resources/skin.cpp
-#, fuzzy
msgid "Bone"
-msgstr "Кости"
+msgstr "Кость"
#: scene/resources/sky.cpp
#, fuzzy
@@ -27135,9 +26684,8 @@ msgid "Skew"
msgstr ""
#: scene/resources/style_box.cpp
-#, fuzzy
msgid "Corner Radius"
-msgstr "Изменение внутреннего радиуса полукруга"
+msgstr "Радиус угла"
#: scene/resources/style_box.cpp
msgid "Corner Detail"
@@ -27156,9 +26704,8 @@ msgid "Grow End"
msgstr ""
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Load Path"
-msgstr "Загрузить пресет"
+msgstr "Загрузить путь"
#: scene/resources/texture.cpp
msgid "Base Texture"
@@ -27169,9 +26716,8 @@ msgid "Image Size"
msgstr "Размер изображения"
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Side"
-msgstr "Стороны"
+msgstr "Сторона"
#: scene/resources/texture.cpp
#, fuzzy
@@ -27184,24 +26730,20 @@ msgid "Back"
msgstr "Назад"
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Storage Mode"
-msgstr "Режим масштабирования"
+msgstr "Режим хранения"
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Lossy Storage Quality"
-msgstr "Захват"
+msgstr "Качество сжатого хранилища"
#: scene/resources/texture.cpp
-#, fuzzy
msgid "From"
-msgstr "Заполнить от"
+msgstr "От"
#: scene/resources/texture.cpp
-#, fuzzy
msgid "To"
-msgstr "Верх"
+msgstr "До"
#: scene/resources/texture.cpp
#, fuzzy
@@ -27248,14 +26790,12 @@ msgid "Diffuse"
msgstr "Режим осмотра"
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Async"
-msgstr "Режим осмотра"
+msgstr "Асинхронный"
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Modes"
-msgstr "Режим"
+msgstr "Режимы"
#: scene/resources/visual_shader.cpp
msgid "Input Name"
@@ -27317,9 +26857,8 @@ msgid "Scenario"
msgstr "Сцена"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
-#, fuzzy
msgid "Navigation Map"
-msgstr "Навигация"
+msgstr "Карта навигации"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
msgid "Direct Space State"
@@ -27344,14 +26883,12 @@ msgid "Default Map Up"
msgstr "Шаг по умолчанию плавающих чисел"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
-#, fuzzy
msgid "Default Cell Size"
-msgstr "Размер ячейки"
+msgstr "Размер ячейки по умолчанию"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
-#, fuzzy
msgid "Default Cell Height"
-msgstr "Тестируемые"
+msgstr "Высота клетки по умолчанию"
#: scene/resources/world.cpp scene/resources/world_2d.cpp
#, fuzzy
@@ -27427,9 +26964,8 @@ msgid "Rate Hz"
msgstr ""
#: servers/audio/effects/audio_effect_chorus.cpp
-#, fuzzy
msgid "Depth (ms)"
-msgstr "Глубина"
+msgstr "Глубина (мс)"
#: servers/audio/effects/audio_effect_chorus.cpp
#: servers/audio/effects/audio_effect_delay.cpp
@@ -27453,9 +26989,8 @@ msgid "Attack (µs)"
msgstr ""
#: servers/audio/effects/audio_effect_compressor.cpp
-#, fuzzy
msgid "Release (ms)"
-msgstr "Релиз"
+msgstr "Релиз (мс)"
#: servers/audio/effects/audio_effect_compressor.cpp
msgid "Mix"
@@ -27476,9 +27011,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 "Отправить отзыв о документации"
+msgstr "Отзыв"
#: servers/audio/effects/audio_effect_delay.cpp
#, fuzzy
@@ -27706,9 +27240,8 @@ msgid "Collision Unsafe Fraction"
msgstr "Режим столкновения"
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Physics Engine"
-msgstr "Кадр физики %"
+msgstr "Физический движек"
#: servers/physics_server.cpp
msgid "Center Of Mass"
@@ -27758,23 +27291,20 @@ msgid "Spatial Partitioning"
msgstr "Пространственное разбиение"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Render Loop Enabled"
-msgstr "Фильтр сигналов"
+msgstr "Включить цикл рендера"
#: servers/visual_server.cpp
msgid "VRAM Compression"
msgstr "Сжатие VRAM"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Import BPTC"
-msgstr "Импорт"
+msgstr "Импорт BPTC"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Import S3TC"
-msgstr "Импорт"
+msgstr "Импорт S3TC"
#: servers/visual_server.cpp
msgid "Import ETC"
@@ -27785,9 +27315,8 @@ msgid "Import ETC2"
msgstr "Импортировать ETC2"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Import PVRTC"
-msgstr "Импортировать тему"
+msgstr "Импорт PVRTC"
#: servers/visual_server.cpp
msgid "Lossless Compression"
diff --git a/editor/translations/si.po b/editor/translations/si.po
index 5e99894cf1..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 ""
@@ -12562,9 +12562,10 @@ msgstr "ශ්‍රිත:"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13926,12 +13927,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22683,6 +22683,15 @@ msgstr "කැඩපත"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "නිවේශන මාදිලිය"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index ebd2256728..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 ""
@@ -13245,9 +13246,10 @@ msgstr "Možnosti Prichytávania"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Odchýlka Mriežky:"
@@ -14658,12 +14660,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -23921,6 +23922,15 @@ msgstr "Chyba!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Importovanie:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index f0e227266d..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 ""
@@ -13421,9 +13421,10 @@ msgstr "Možnosti pripenjanja"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Mrežni Zamik:"
@@ -14850,13 +14851,13 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Ni mogoče odpreti '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -24167,6 +24168,15 @@ msgstr "Napaka!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Uvažanje:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/sq.po b/editor/translations/sq.po
index f8ffd0e88d..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 ""
@@ -13106,9 +13106,10 @@ msgstr "Përshkrimi i Klasës"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14502,12 +14503,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -23576,6 +23576,15 @@ msgstr "Pasqyrë"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Duke Importuar:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po
index f2f6a5bf09..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 ""
@@ -14116,9 +14116,10 @@ msgstr "Поставке Залепљавања"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Офсет:"
@@ -15791,16 +15792,15 @@ msgstr "Неважећа путања пројекта(нешто је изме
#: editor/project_manager.cpp
#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Неуспешно учитавање project.godot-а у његовој путањи (грешка %d). Могуће да "
"нешто недостаје или је корумпирано."
#: editor/project_manager.cpp
#, fuzzy
-msgid "Couldn't edit project.godot in project path."
-msgstr "Неуспешна измена project.godot-а у путањи пројекта."
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Не могу отворити '%s'."
#: editor/project_manager.cpp
#, fuzzy
@@ -25808,6 +25808,15 @@ msgstr "Грешка"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Сортирање"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po
index 8af5b1daaf..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 ""
@@ -12586,9 +12586,10 @@ msgstr "Kačenje:"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13957,12 +13958,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22819,6 +22819,15 @@ msgstr "%s Greška"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Postavke Uređivača..."
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/sv.po b/editor/translations/sv.po
index 44b6fcf8b6..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-08-30 03:11+0000\n"
-"Last-Translator: Björn Åkesson <bjorn.akesson@gmail.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-dev\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
@@ -7177,7 +7177,7 @@ msgstr ""
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
msgid "sRGB"
-msgstr ""
+msgstr "sRGB"
#: editor/import/resource_importer_layered_texture.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 ""
@@ -13310,9 +13310,10 @@ msgstr "Alternativ"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13515,7 +13516,7 @@ msgstr ""
#: editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Passphrase"
-msgstr ""
+msgstr "Lösenordsfras för SSH"
#: editor/plugins/version_control_editor_plugin.cpp
#, fuzzy
@@ -14713,13 +14714,13 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Kan inte öppna projekt vid '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15030,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"
@@ -15071,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)"
@@ -18486,7 +18486,7 @@ msgstr ""
#: modules/visual_script/visual_script_flow_control.cpp
msgid "While"
-msgstr ""
+msgstr "Medans"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "while (cond):"
@@ -20907,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
@@ -20984,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
@@ -23988,6 +23988,15 @@ msgstr "Fel"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Sortera"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -25645,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 fe9f95b213..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 ""
@@ -12382,9 +12382,10 @@ msgstr "గణనలు"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -13718,12 +13719,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -22285,6 +22285,15 @@ msgstr ""
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "స్థిరాంకాలు"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/th.po b/editor/translations/th.po
index 6e4b0e578f..c41428e6d1 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -13,13 +13,14 @@
# PT 07 <porton555@gmail.com>, 2021.
# SysError_ <ictsanook@hotmail.com>, 2021.
# Kanda Ninthfish <akkhaporn@gmail.com>, 2022.
+# Absurdnoobman <jakkalin91@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-04-18 09:10+0000\n"
-"Last-Translator: Kanda Ninthfish <akkhaporn@gmail.com>\n"
+"PO-Revision-Date: 2022-11-26 14:36+0000\n"
+"Last-Translator: Absurdnoobman <jakkalin91@gmail.com>\n"
"Language-Team: Thai <https://hosted.weblate.org/projects/godot-engine/godot/"
"th/>\n"
"Language: th\n"
@@ -27,7 +28,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.12-dev\n"
+"X-Generator: Weblate 4.15-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -48,9 +49,8 @@ msgid "Exit Code"
msgstr ""
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "V-Sync Enabled"
-msgstr "เปิด"
+msgstr "เปิด V-Sync"
#: core/bind/core_bind.cpp main/main.cpp
msgid "V-Sync Via Compositor"
@@ -114,14 +114,13 @@ msgid "Maximized"
msgstr ""
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Minimized"
-msgstr "เริ่มต้น"
+msgstr "ย่อขนาด"
#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp
#: scene/gui/graph_node.cpp
msgid "Resizable"
-msgstr ""
+msgstr "ปรับขนาดได้"
#: core/bind/core_bind.cpp core/os/input_event.cpp scene/2d/node_2d.cpp
#: scene/2d/physics_body_2d.cpp scene/2d/remote_transform_2d.cpp
@@ -185,12 +184,11 @@ msgstr "ผิดพลาด"
#: core/bind/core_bind.cpp
#, fuzzy
msgid "Error String"
-msgstr "ผิดพลาดขณะบันทึก"
+msgstr "String ผิดพลาด"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Error Line"
-msgstr "ผิดพลาดขณะบันทึก"
+msgstr "บรรทัดผิดพลาด"
#: core/bind/core_bind.cpp
#, fuzzy
@@ -213,9 +211,8 @@ msgid "Limits"
msgstr ""
#: core/command_queue_mt.cpp
-#, fuzzy
msgid "Command Queue"
-msgstr "ctrl: หมุน"
+msgstr "คิวคำสั่ง"
#: core/command_queue_mt.cpp
msgid "Multithreading Queue Size (KB)"
@@ -232,7 +229,7 @@ msgstr "ฟังก์ชัน"
#: core/image.cpp core/packed_data_container.cpp scene/2d/polygon_2d.cpp
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
msgid "Data"
-msgstr ""
+msgstr "ข้อมูล"
#: core/io/file_access_network.cpp core/register_core_types.cpp
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp main/main.cpp
@@ -11273,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 ""
@@ -13201,9 +13198,10 @@ msgstr "ตัวเลือกการสแนป"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "เลื่อน:"
@@ -14635,15 +14633,16 @@ msgid "Invalid project path (changed anything?)."
msgstr "ตำแหน่งโปรเจกต์ผิดพลาด (ได้แก้ไขอะไรไปหรือไม่?)"
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"โหลดไฟล์ project.godot ในโฟลเดอร์โปรเจกต์ไม่ได้ (ข้อผิดพลาด %d) ไฟล์อาจสูญหายหรือเสียหาย"
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "แก้ไขไฟล์ project.godot ไม่ได้"
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "ไม่สามารถเปิดโปรเจกต์ที่ '%s'"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -24074,6 +24073,15 @@ msgstr "ผิดพลาด"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "เรียง"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -26878,7 +26886,7 @@ msgstr "ดีบั๊ก UV"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "เบลอร์"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
diff --git a/editor/translations/tl.po b/editor/translations/tl.po
index bf39f11166..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]"
@@ -12724,9 +12724,10 @@ msgstr "Pagsasaayos ng Kalansay"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Usog:"
@@ -14099,12 +14100,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -23165,6 +23165,15 @@ msgstr "Nabigo"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Pagkakaayos"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index e115c4d368..73fbaec2cb 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -84,13 +84,18 @@
# Volkan Gezer <volkangezer@gmail.com>, 2022.
# bsr <bsndrn16@gmail.com>, 2022.
# Ramazan SANCAR <ramazansancar4545@gmail.com>, 2022.
+# Burak Orcun OZKABLAN <borcunozkablan@gmail.com>, 2022.
+# arda4888 <ardagaming2006@gmail.com>, 2022.
+# Dream Drunk <myemailpoly149@gmail.com>, 2022.
+# alpdenthedev <ekrem_ekrem_45@hotmail.com>, 2022.
+# Muhammed Said Gülberk <msgulberk@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-08-30 03:11+0000\n"
-"Last-Translator: Ramazan SANCAR <ramazansancar4545@gmail.com>\n"
+"PO-Revision-Date: 2022-12-05 10:16+0000\n"
+"Last-Translator: Muhammed Said Gülberk <msgulberk@gmail.com>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/"
"godot/tr/>\n"
"Language: tr\n"
@@ -98,11 +103,11 @@ 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-dev\n"
+"X-Generator: Weblate 4.15-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
-msgstr "Tablet Sürücü"
+msgstr "Tablet Sürücüsü"
#: core/bind/core_bind.cpp
msgid "Clipboard"
@@ -113,7 +118,6 @@ msgid "Current Screen"
msgstr "Şu anki Ekran"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Exit Code"
msgstr "Çıkış Kodu"
@@ -131,11 +135,11 @@ msgstr "Delta Yumuşatma"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode"
-msgstr "Düşük İşlemci Kullanım Modu"
+msgstr "İşlemci Dostu Mod"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode Sleep (µsec)"
-msgstr "Düşük İşlemci Kullanımı Uyku Modu (μsn)"
+msgstr "Uykulu İşlemci Modu (µsec)"
#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp
msgid "Keep Screen On"
@@ -151,7 +155,7 @@ msgstr "Maksimum Ekran Boyutu"
#: core/bind/core_bind.cpp
msgid "Screen Orientation"
-msgstr "Ekran Yönü"
+msgstr "Ekran oryantasyonu"
#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp
#: platform/uwp/os_uwp.cpp
@@ -160,7 +164,7 @@ msgstr "Pencere"
#: core/bind/core_bind.cpp core/project_settings.cpp
msgid "Borderless"
-msgstr "Kenarlıksız"
+msgstr "Kenarsız"
#: core/bind/core_bind.cpp
msgid "Per Pixel Transparency Enabled"
@@ -263,9 +267,8 @@ msgid "Limits"
msgstr "Limitler"
#: core/command_queue_mt.cpp
-#, fuzzy
msgid "Command Queue"
-msgstr "Komut Sırası"
+msgstr "Komut Kuyruğu"
#: core/command_queue_mt.cpp
msgid "Multithreading Queue Size (KB)"
@@ -333,7 +336,7 @@ msgstr "Ağ Profilcisi"
#: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp
msgid "Root Node"
-msgstr "Kök Düğüm Adı"
+msgstr "Kök Düğümü"
#: core/io/networked_multiplayer_peer.cpp
msgid "Refuse New Connections"
@@ -361,7 +364,7 @@ msgstr "Akış Eşi"
#: core/io/stream_peer.cpp
msgid "Big Endian"
-msgstr "big-endian"
+msgstr "Big Endian"
#: core/io/stream_peer.cpp
msgid "Data Array"
@@ -369,7 +372,7 @@ msgstr "Veri Dizisi"
#: core/io/stream_peer_ssl.cpp
msgid "Blocking Handshake"
-msgstr "Tokalaşmayı blokla"
+msgstr "El Sıkışmayı Blokla"
#: core/io/udp_server.cpp
msgid "Max Pending Connections"
@@ -388,7 +391,7 @@ msgstr "1(bir) karakter uzunluğunda bir dize bekleniyor ."
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr "Baytları çözümlemek için yetersiz miktarda bayt ya da geçersiz format."
+msgstr "Baytları çözümlemek için yetersiz bayt miktarı veya geçersiz format."
#: core/math/expression.cpp
msgid "Invalid input %d (not passed) in expression"
@@ -396,7 +399,7 @@ msgstr "İfadede geçersiz giriş %d"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr "self kullanılamaz çünkü örnek boş (geçilmedi)"
+msgstr "örnek boş olduğu için self kullanılamaz (geçilmedi)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -1153,9 +1156,8 @@ msgid "Anim Duplicate Keys"
msgstr "Animasyon Anahtarları Çoğalt"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Delete Keys"
-msgstr "Animasyon Anahtarları Sil"
+msgstr "Animasyon Silme Tuşları"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -7223,6 +7225,9 @@ 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: Dokunun 3D'de normal haritası olarak kullanıldığı algılandı. Bellek "
+"kullanımını azaltmak için kırmızı-yeşil doku sıkıştırma etkinleştiriliyor. "
+"(mavi kanal kullanılmıyor)."
#: editor/import/resource_importer_texture.cpp
#, fuzzy
@@ -7252,7 +7257,7 @@ msgstr "HDR Modu"
#: editor/import/resource_importer_texture.cpp
msgid "BPTC LDR"
-msgstr ""
+msgstr "BPTC LDR"
#: editor/import/resource_importer_texture.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/2d/cpu_particles_2d.cpp
@@ -7360,7 +7365,7 @@ msgstr "Maximum Hz Oranı"
#: editor/import/resource_importer_wav.cpp
msgid "Trim"
-msgstr ""
+msgstr "Kırp"
#: editor/import/resource_importer_wav.cpp
msgid "Normalize"
@@ -9536,7 +9541,7 @@ msgstr "Simge"
#: 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
@@ -10709,7 +10714,7 @@ msgstr "Script İsimlerini Listele"
#: editor/plugins/script_editor_plugin.cpp
msgid "Exec Flags"
-msgstr ""
+msgstr "Çalıştırma Bayrakları"
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Scripts"
@@ -11027,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]"
@@ -12892,9 +12897,10 @@ msgstr "Hizalama Ayarları"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr "Kaydırma"
@@ -14320,16 +14326,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Geçersiz proje yolu (bir şey değişti mi?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Proje yolundaki proje.godot düzenlenemedi (error %d). Eksik veya bozulmuş "
"olabilir."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "proje yolundaki proje.godot düzenlenemedi."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "'%s' adresindeki proje açılamıyor."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15327,6 +15334,9 @@ msgid ""
"To save this branch into its own scene, open the original scene, right click "
"on this branch, and select \"Save Branch as Scene\"."
msgstr ""
+"Halihazırda örneklendirilmiş bir sahnenin alt öğesi olan dal kaydedilemez.\n"
+"Bu dalı kendisine ait sahneye kaydetmek için, orijinal sahneyi açın, bu dala "
+"sağ tıklayın, ve \"Dalı Sahne olarak Kaydet\"i seçin."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -15334,6 +15344,9 @@ msgid ""
"To save this branch into its own scene, open the original scene, right click "
"on this branch, and select \"Save Branch as Scene\"."
msgstr ""
+"Devralınan sahnenin parçası olan bir dal kaydedilemez.\n"
+"Bu dalı kendisine ait sahneye kaydetmek için, orijinal sahneyi açın, bu dala "
+"sağ tıklayın, ve \"Dalı Sahne olarak Kaydet\"i seçin."
#: editor/scene_tree_dock.cpp
msgid "Save New Scene As..."
@@ -15361,19 +15374,18 @@ msgid "Make Local"
msgstr "Yerelleştir"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
-msgstr "Sahne Benzersiz İsmini Etkin Kıl"
+msgstr "Sahne İçi Benzersiz İsim(ler)i Etkin Kıl"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "Başka bir düğüm sahnede bu benzersiz adı zaten kullanıyor."
+msgstr ""
+"Halihazırda sahnedeki başka bir düğüm tarafından kullanılan benzersiz "
+"isimler:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Disable Scene Unique Name(s)"
-msgstr "Sahne Benzersiz İsmini Etkisiz Kıl"
+msgstr "Sahne İçi Benzersiz İsim(ler)i Etkisiz Kıl"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -15401,7 +15413,7 @@ msgstr "Diğer Düğüm"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
-msgstr "Yad bir sahnedeki düğümler üzerinde çalışamaz!"
+msgstr "Yabancı bir sahnedeki düğümler üzerinde çalışılamaz!"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes the current scene inherits from!"
@@ -15440,7 +15452,7 @@ msgstr "Sahne kaydedilirken hata."
#: editor/scene_tree_dock.cpp
msgid "Error duplicating scene to save it."
-msgstr "Kaydetmek için sahne çoğaltılırken hata."
+msgstr "Sahne kaydetmek için çoğaltılırken hata."
#: editor/scene_tree_dock.cpp
msgid "Sub-Resources"
@@ -15448,11 +15460,11 @@ msgstr "Alt Kaynaklar"
#: editor/scene_tree_dock.cpp
msgid "Access as Scene Unique Name"
-msgstr ""
+msgstr "Sahne İçi Benzersiz İsim olarak Erişim"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance"
-msgstr "Kalıtı Temizle"
+msgstr "Kalıtımı Temizle"
#: editor/scene_tree_dock.cpp
msgid "Editable Children"
@@ -15477,7 +15489,7 @@ msgstr "Alt Düğüm Ekle"
#: editor/scene_tree_dock.cpp
msgid "Expand/Collapse All"
-msgstr "Hepsini Aç/Kapa"
+msgstr "Hepsini Genişlet/Daralt"
#: editor/scene_tree_dock.cpp
msgid "Change Type"
@@ -16194,7 +16206,7 @@ msgstr "Godot Fiziği"
#: main/main.cpp servers/physics_2d/physics_2d_server_sw.cpp
#: servers/visual/visual_server_scene.cpp
msgid "Use BVH"
-msgstr ""
+msgstr "BVH Kullan"
#: main/main.cpp servers/physics_2d/physics_2d_server_sw.cpp
#: servers/visual/visual_server_scene.cpp
@@ -16214,7 +16226,7 @@ msgstr "MultiNode Kur"
#: main/main.cpp
msgid "RID Pool Prealloc"
-msgstr ""
+msgstr "RID Havuzu Ön Tahsisi"
#: main/main.cpp
#, fuzzy
@@ -16276,7 +16288,7 @@ msgstr "Sürücü Adı"
#: main/main.cpp
msgid "Fallback To GLES2"
-msgstr ""
+msgstr "GLES2'ye Geri Dön"
#: main/main.cpp
msgid "Use Nvidia Rect Flicker Workaround"
@@ -16890,9 +16902,8 @@ msgid "Script Class"
msgstr "Betik Sınıfı"
#: modules/gdnative/nativescript/nativescript.cpp
-#, fuzzy
msgid "Icon Path"
-msgstr "Yola Odaklan"
+msgstr "İkon Yolu"
#: modules/gdnative/register_types.cpp
msgid "GDNative"
@@ -16900,9 +16911,8 @@ msgstr "GDYerel"
#: modules/gdscript/editor/gdscript_highlighter.cpp
#: modules/gdscript/gdscript.cpp
-#, fuzzy
msgid "GDScript"
-msgstr "Betik"
+msgstr "GDScript"
#: modules/gdscript/editor/gdscript_highlighter.cpp
msgid "Function Definition Color"
@@ -18204,7 +18214,7 @@ msgstr ""
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Type Cast"
-msgstr "Tür Değişimi"
+msgstr "Tür Dönüştür"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Is %s?"
@@ -18254,9 +18264,8 @@ msgid "Validate"
msgstr "Doğrula"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "RPC Call Mode"
-msgstr "Esnetme Şekli"
+msgstr "RPC çağrı modu"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Subtract %s"
@@ -23139,7 +23148,7 @@ msgstr "Küçük harf"
#: scene/3d/physics_joint.cpp
msgid "Motor"
-msgstr ""
+msgstr "Motor"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23772,6 +23781,16 @@ msgstr "Hata"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Sırala"
+
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Use AABB Center"
+msgstr "Çevreyi Kullan"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index fe0bc96c04..a8d989d5ee 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -17,20 +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, 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-08-25 13:04+0000\n"
-"Last-Translator: Artem <artem@molotov.work>\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"
@@ -39,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-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -59,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"
@@ -466,7 +469,6 @@ msgid "Pressure"
msgstr "Тиск"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pen Inverted"
msgstr "Перо перевернуте"
@@ -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,12 +5498,10 @@ 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
-#, fuzzy
msgid "Stay In Script Editor On Node Selected"
msgstr "Залишитися в редакторі скриптів на вибраному вузлі"
@@ -6377,7 +6377,7 @@ msgstr "Поточна версія:"
#: editor/export_template_manager.cpp
msgid "Export templates are missing. Download them or install from a file."
msgstr ""
-"Не вистачає шаблонів експортування. Отримайте їх або встановіть з файла."
+"Не вистачає шаблонів експортування. Отримайте їх або встановіть із файлу."
#: editor/export_template_manager.cpp
msgid "Export templates are installed and ready to be used."
@@ -10956,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 " [портали активні]"
@@ -12805,9 +12805,10 @@ msgstr "Параметри прилипання"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr "Зміщення"
@@ -14159,7 +14160,7 @@ msgstr "Експортування проєкту"
#: editor/project_export.cpp
msgid "Manage Export Templates"
-msgstr "Управління шаблонами експорту"
+msgstr "Керування шаблонами експорту"
#: editor/project_export.cpp
msgid "Export With Debug"
@@ -14220,15 +14221,14 @@ msgstr "Некоректний шлях до проєкту (щось зміни
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
-"Не вдалося завантажити project.godot у каталозі проєкту (помилка %d). "
-"Можливо, файл вилучено або пошкоджено."
+"Не вдалося завантажити проєкт у '%s' (помилка %d). Можливо, файл вилучено "
+"або пошкоджено."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Не вдалося редагувати project.godot у каталозі проєкту."
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Не вдалося зберегти проєкт у '%s' (помилка %d)."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -15189,7 +15189,7 @@ msgstr "Вилучити вузол «%s»?"
msgid ""
"Saving the branch as a scene requires having a scene open in the editor."
msgstr ""
-"Щоб можна було зберегти гілку як сцену, сцену має бути відкрито у редакторі."
+"Щоб можна було зберегти гілку як сцену, сцена має бути відкрита у редакторі."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -15271,19 +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
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "Цю унікальну назву у сцені вже використано іншим вузлом."
+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"
@@ -16966,7 +16961,6 @@ msgid "Joints Original"
msgstr "Початок з'єднання"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Inverse Binds"
msgstr "Зворотні зв'язки"
@@ -16983,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"
@@ -17004,7 +17000,7 @@ msgstr "Коефіцієнт дзеркальності"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Spec Gloss Img"
-msgstr ""
+msgstr "Дзеркальне глянцеве зображення"
#: modules/gltf/gltf_state.cpp
msgid "Json"
@@ -17023,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"
@@ -17128,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"
@@ -17293,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
@@ -17316,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"
@@ -17332,7 +17329,7 @@ msgstr "Перегляд без тіней"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Oversample"
-msgstr ""
+msgstr "Надвибірка"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "K1"
@@ -17355,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"
@@ -17517,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"
@@ -18315,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"
@@ -18336,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"
@@ -18359,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
@@ -18368,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."
@@ -18448,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"
@@ -18730,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
@@ -18744,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
@@ -18771,10 +18780,8 @@ 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».\n"
-"Будь ласка, перевірте, чи є програма доступною у каталозі build-tools набору "
-"засобів для розробки Android.\n"
-"Отриманий у результаті %s не підписано."
+"Не вдалося знайти «apksigner». Будь ласка, перевірте, чи є команда доступною "
+"у каталозі build-tools Android SDK. Отриманий результат %s не підписано."
#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
@@ -18791,7 +18798,7 @@ msgstr "Не вдалося знайти сховище ключів. Немож
#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not start apksigner executable."
-msgstr "Не вдалося запустити підпроцес!"
+msgstr "Не вдалося запустити виконуваний файл apksigner."
#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
@@ -18825,9 +18832,8 @@ msgstr ""
"Некоректна назва файла! Пакунок Android APK повинен мати суфікс назви *.apk."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Unsupported export format!"
-msgstr "Непідтримуваний формат експортування!\n"
+msgstr "Непідтримуваний формат експортування!"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -18839,28 +18845,24 @@ msgstr ""
"допомогою меню «Проєкт»."
#: 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 ""
-"Невідповідність версія для збирання для Android:\n"
-" Встановлений шаблон: %s\n"
-" Версія Godot: %s\n"
-"Будь ласка, повторно встановіть шаблон для збирання для Android за допомогою "
-"меню «Проєкт»."
+"Невідповідність версія для збирання під Android: Встановлений шаблон: %s, "
+"Версія Godot: %s. Будь ласка, повторно встановіть шаблон для збирання під "
+"Android за допомогою меню «Проєкт»."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name."
msgstr ""
-"Не вдалося перезаписати файли res://android/build/res/*.xml із назвою проєкту"
+"Не вдалося перезаписати файли res://android/build/res/*.xml із назвою "
+"проєкту."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files to gradle project."
-msgstr "Не вдалося експортувати файли проєкту до проєкту gradle\n"
+msgstr "Не вдалося експортувати файли проєкту до проєкту gradle."
#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
@@ -18871,15 +18873,13 @@ msgid "Building Android Project (gradle)"
msgstr "Збирання проєкту Android (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 ""
-"Не вдалося виконати збирання проєкту Android. Ознайомтеся із виведеними "
-"даними, щоб визначити причину помилки.\n"
-"Крім того, можете відвідати docs.godotengine.org і ознайомитися із "
-"документацією щодо збирання для Android."
+"Не вдалося виконати збирання проєкту для Android. Ознайомтеся із виведеними "
+"даними, щоб визначити причину помилки. Крім того, можете відвідати docs."
+"godotengine.org і ознайомитися із документацією щодо збирання для Android."
#: platform/android/export/export_plugin.cpp
msgid "Moving output"
@@ -18894,29 +18894,24 @@ msgstr ""
"дані можна знайти у каталозі проєкту gradle."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Package not found: \"%s\"."
-msgstr "Пакунок не знайдено: %s"
+msgstr "Пакунок не знайдено: \"%s\"."
#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr "Створення APK…"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not find template APK to export: \"%s\"."
-msgstr ""
-"Не вдалося знайти шаблон APK для експортування:\n"
-"%s"
+msgstr "Не вдалося знайти шаблон APK для експортування: %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 ""
-"Не вистачає бібліотек у шаблоні експортування для вибраних архітектур: %s.\n"
+"Не вистачає бібліотек у шаблоні експортування для вибраних архітектур: %s. "
"Будь ласка, створіть шаблон з усіма необхідними бібліотеками або зніміть "
"позначку з архітектур із пропущеними бібліотеками у стилі експортування."
@@ -18925,9 +18920,8 @@ msgid "Adding files..."
msgstr "Додавання файлів…"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files."
-msgstr "Не вдалося експортувати файли проєкту"
+msgstr "Не вдалося експортувати файли проєкту."
#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
@@ -18946,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
@@ -18970,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
@@ -19010,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"
@@ -19199,19 +19196,16 @@ msgid "Run exported HTML in the system's default browser."
msgstr "Виконати експортований HTML у браузері за умовчанням системи."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not open template for export: \"%s\"."
-msgstr "Не вдалося відкрити шаблон для експорту:"
+msgstr "Не вдалося відкрити шаблон для експорту: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Invalid export template: \"%s\"."
-msgstr "Неправильний шаблон експорту:"
+msgstr "Неправильний шаблон експорту: \"%s\"."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not write file: \"%s\"."
-msgstr "Не вдалося записати файл:"
+msgstr "Не вдалося записати файл: \"%s\"."
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19219,9 +19213,8 @@ msgid "Icon Creation"
msgstr "Поле піктограми"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file: \"%s\"."
-msgstr "Не вдалося прочитати файл:"
+msgstr "Не вдалося прочитати файл: \"%s\"."
#: platform/javascript/export/export.cpp
msgid "PWA"
@@ -19296,19 +19289,17 @@ msgid "Icon 512 X 512"
msgstr "Піктограма 512⨯12"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell: \"%s\"."
-msgstr "Не вдалося прочитати оболонку HTML:"
+msgstr "Не вдалося прочитати оболонку HTML: \"%s\"."
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not create HTTP server directory: %s."
-msgstr "Не вдалося створити каталог на сервері HTTP:"
+msgstr "Не вдалося створити каталог для сервера HTTP: %s."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server: %d."
-msgstr "Помилка під час спроби запуску сервера HTTP:"
+msgstr "Помилка під час спроби запуску сервера HTTP: %d."
#: platform/javascript/export/export.cpp
msgid "Web"
@@ -19574,17 +19565,17 @@ msgstr ""
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Could not open icon file \"%s\"."
-msgstr "Не вдалося експортувати файли проєкту"
+msgstr "Не вдалося відкрити файл іконки \"%s\"."
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Could not start xcrun executable."
-msgstr "Не вдалося запустити підпроцес!"
+msgstr "Не вдалося запустити виконуваний файл xcrun."
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Notarization failed."
-msgstr "Засвідчення"
+msgstr "Нотаріальне засвідчення не відбулося."
#: platform/osx/export/export.cpp
msgid "Notarization request UUID: \"%s\""
@@ -19649,9 +19640,8 @@ msgid "No identity found."
msgstr "Не знайдено профілю."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Cannot sign file %s."
-msgstr "Помилка під час збереження файла: %s"
+msgstr "Не вдається підписати файл %s."
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19668,7 +19658,7 @@ msgstr "Напрямок"
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Could not start hdiutil executable."
-msgstr "Не вдалося запустити підпроцес!"
+msgstr "Не вдалося запустити виконуваний файл hdiutil."
#: platform/osx/export/export.cpp
msgid "`hdiutil create` failed - file exists."
@@ -19683,14 +19673,12 @@ msgid "Creating app bundle"
msgstr "Створюємо комплект програми"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not find template app to export: \"%s\"."
-msgstr "Не вдалося знайти програму-шаблон для експортування:"
+msgstr "Не вдалося знайти шаблон програми для експортування: \"%s\"."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid export format."
-msgstr "Неправильний шаблон експорту:"
+msgstr "Неправильний формат експорту."
#: platform/osx/export/export.cpp
msgid ""
@@ -19757,7 +19745,7 @@ msgstr "Проєкція"
#: platform/osx/export/export.cpp
#, fuzzy
msgid "Could not open file to read from path \"%s\"."
-msgstr "Не вдалося експортувати файли проєкту до проєкту gradle\n"
+msgstr "Не вдалося відкрити файл для читання з шляху \"%s\"."
#: platform/osx/export/export.cpp
msgid "Invalid bundle identifier:"
@@ -20102,9 +20090,8 @@ msgid "Debug Algorithm"
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"
@@ -20190,7 +20177,7 @@ msgstr "Не вдалося знайти сховище ключів. Немож
#: platform/windows/export/export.cpp
#, fuzzy
msgid "Invalid identity type."
-msgstr "Тип профілю"
+msgstr "Невірний тип профілю."
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20214,9 +20201,8 @@ msgid "Signtool failed to sign executable: %s."
msgstr "Некоректний виконуваний файл."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Failed to remove temporary file \"%s\"."
-msgstr "Не вдалося вилучити тимчасовий файл:"
+msgstr "Не вдалося вилучити тимчасовий файл \"%s\"."
#: platform/windows/export/export.cpp
msgid ""
@@ -20506,7 +20492,7 @@ msgstr "Режим змішування"
#: scene/2d/canvas_item.cpp
msgid "Light Mode"
-msgstr "Праворуч за шириною"
+msgstr "Режим освітлення"
#: scene/2d/canvas_item.cpp
msgid "Particles Animation"
@@ -23261,6 +23247,16 @@ msgstr "Максимальна сила"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Сортувати"
+
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Use AABB Center"
+msgstr "Використовувати адаптивний"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr "Геометрія"
@@ -26126,7 +26122,7 @@ msgstr ""
#: scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Sampling"
-msgstr "Масштаб:"
+msgstr "Масштаб"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index d09218a600..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 ""
@@ -12827,9 +12827,10 @@ msgstr ".تمام کا انتخاب"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14217,12 +14218,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
+msgid "Couldn't save project at '%s' (error %d)."
msgstr ""
#: editor/project_manager.cpp
@@ -23156,6 +23156,15 @@ msgstr ""
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr ".تمام کا انتخاب"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr ""
diff --git a/editor/translations/vi.po b/editor/translations/vi.po
index 2a0fadcf9f..0ff37e659e 100644
--- a/editor/translations/vi.po
+++ b/editor/translations/vi.po
@@ -22,13 +22,14 @@
# Hung <hungthitkhia@gmail.com>, 2021.
# Paweł Fertyk <pfertyk@pfertyk.me>, 2022.
# MInhTriet <luckyblockblack@gmail.com>, 2022.
+# Nhật Huy <nhat.huy.7996@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-08-17 18:20+0000\n"
-"Last-Translator: MInhTriet <luckyblockblack@gmail.com>\n"
+"PO-Revision-Date: 2022-11-30 15:16+0000\n"
+"Last-Translator: Nhật Huy <nhat.huy.7996@gmail.com>\n"
"Language-Team: Vietnamese <https://hosted.weblate.org/projects/godot-engine/"
"godot/vi/>\n"
"Language: vi\n"
@@ -36,7 +37,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-dev\n"
+"X-Generator: Weblate 4.15-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -63,9 +64,8 @@ msgid "V-Sync Via Compositor"
msgstr "V-Sync thông qua Compositor"
#: core/bind/core_bind.cpp main/main.cpp
-#, fuzzy
msgid "Delta Smoothing"
-msgstr "Delta smoothing"
+msgstr "Dealta smooth"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode"
@@ -162,9 +162,8 @@ msgid "Target FPS"
msgstr "FPS cần đạt tới"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Time Scale"
-msgstr "Nút TimeScale"
+msgstr "độ giãn nở thời gian"
#: core/bind/core_bind.cpp main/main.cpp
#, fuzzy
@@ -11120,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 ""
@@ -13042,9 +13041,10 @@ msgstr "Tùy chọn Dính"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
#, fuzzy
msgid "Offset"
msgstr "Độ dời:"
@@ -14457,16 +14457,17 @@ msgid "Invalid project path (changed anything?)."
msgstr "Đường dẫn dự án không hợp lệ (bạn có thay đổi điều gì?)."
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
"Không thể nạp 'project.godot' trong đường dẫn dự án (lỗi %d). Nó có thể bị "
"thiếu hoặc đã hỏng."
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "Không thể chỉnh sửa 'project.godot' trong đường dẫn dự án."
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "Không thể mở dự án tại '%s'."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -23932,6 +23933,15 @@ msgstr "Lỗi"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "Sắp xếp"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index 86a37e167f..5b58752f63 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -84,12 +84,15 @@
# nitenook <admin@alterbaum.net>, 2021.
# jker <cxgmfy@163.com>, 2021.
# Ankar <1511276198@qq.com>, 2022.
+# 风青山 <idleman@yeah.net>, 2022.
+# 1104 EXSPIRAVIT_ <m18621006730@gmail.com>, 2022.
+# ChairC <974833488@qq.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified) (Godot Engine)\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: 2018-01-20 12:15+0200\n"
-"PO-Revision-Date: 2022-08-25 13:04+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"
@@ -98,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.14-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -142,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
@@ -1094,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"
@@ -4148,7 +4151,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Scene '%s' has broken dependencies:"
-msgstr "场景 “%s” 的依赖已被破坏:"
+msgstr "场景 “%s” 的依赖已损坏:"
#: editor/editor_node.cpp
msgid "Clear Recent Scenes"
@@ -5637,12 +5640,12 @@ msgstr "选择框颜色"
#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "3D Gizmos"
-msgstr "3D 控制器"
+msgstr "3D 小工具"
#: editor/editor_settings.cpp editor/plugins/path_editor_plugin.cpp
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Gizmo Colors"
-msgstr "控制器颜色"
+msgstr "小工具颜色"
#: editor/editor_settings.cpp
msgid "Instanced"
@@ -5840,7 +5843,7 @@ msgstr "骨骼轮廓颜色"
#: editor/editor_settings.cpp
msgid "Viewport Border Color"
-msgstr "视区边框颜色"
+msgstr "视口边框颜色"
#: editor/editor_settings.cpp
msgid "Constrain Editor View"
@@ -7920,7 +7923,7 @@ msgstr "强制用白色调和"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Include Gizmos (3D)"
-msgstr "包括控制器(3D)"
+msgstr "包括小工具(3D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Pin AnimationPlayer"
@@ -8439,7 +8442,7 @@ msgstr "创建光照贴图失败,切确保文件是可写的。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
-msgstr "无法确定光照贴图大小。最大光照贴图大小太小?"
+msgstr "无法确定光照贴图大小。最大光照贴图尺寸太小?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -8682,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
@@ -10816,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 " [入口生效]"
@@ -10984,7 +10987,7 @@ msgstr "查看环境"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Gizmos"
-msgstr "查看控制器"
+msgstr "查看小工具"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Information"
@@ -11090,9 +11093,9 @@ msgid ""
msgstr ""
"点击以切换可见状态。\n"
"\n"
-"睁眼:控制器可见。\n"
-"闭眼:控制器隐藏。\n"
-"半睁眼:控制器也可穿过不透明的表面可见(“X 光”)。"
+"睁眼:小工具可见。\n"
+"闭眼:小工具隐藏。\n"
+"半睁眼:小工具也可穿过不透明的表面可见(“X 光”)。"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Nodes to Floor"
@@ -11200,31 +11203,31 @@ 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"
-msgstr "控制器"
+msgstr "小工具"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Origin"
@@ -11309,19 +11312,19 @@ msgstr "后置"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Size"
-msgstr "操作控制器大小"
+msgstr "操作小工具大小"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Opacity"
-msgstr "操作控制器不透明度"
+msgstr "操作小工具不透明度"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Show Viewport Rotation Gizmo"
-msgstr "显示视区旋转控制器"
+msgstr "显示视口旋转小工具"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unnamed Gizmo"
-msgstr "未命名控制器"
+msgstr "未命名小工具"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -12636,9 +12639,10 @@ msgstr "吸附选项"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr "偏移"
@@ -14007,14 +14011,12 @@ msgstr "项目路径无效(被外部修改?)。"
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
-msgstr ""
-"无法在项目路径中加载 project.godot 文件(错误 %d)。该文件可能缺失或已损坏。"
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
+msgstr "无法加载位于“%s”的项目(错误 %d)。项目可能缺失或已损坏。"
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "无法在项目路径下编辑 project.godot 文件。"
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "无法保存位于“%s”的项目(错误 %d)。"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -14929,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?"
@@ -15022,17 +15024,14 @@ msgid "Make Local"
msgstr "转为本地"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name(s)"
msgstr "启用场景唯一名称"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Unique names already used by another node in the scene:"
-msgstr "该场景中已有使用该唯一名称的节点。"
+msgstr "唯一名称已被该场景中的其他节点使用:"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Disable Scene Unique Name(s)"
msgstr "禁用场景唯一名称"
@@ -16421,7 +16420,7 @@ msgstr "添加架构项"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "GDNativeLibrary"
-msgstr "GDNative 库"
+msgstr "GDNativeLibrary"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Enabled GDNative Singleton"
@@ -17086,19 +17085,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"
@@ -18801,7 +18797,6 @@ msgid "Custom BG Color"
msgstr "自定义背景色"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Icons"
msgstr "导出图标"
@@ -19593,6 +19588,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 ""
+"Godot 的 Mono 版本不支持 UWP 平台。如果想要以 UWP 为目标,请使用标准构建(不"
+"支持 C#)。"
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -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
@@ -20647,7 +20644,7 @@ msgid ""
"instead."
msgstr ""
"“Navigation2D”节点和“Navigation2D.get_simple_path()”已废弃,会在将来的版本中"
-"移除。请用“Navigation2DServer.map_get_path()”替代。"
+"移除。 请用“Navigation2DServer.map_get_path()”替代。"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Pathfinding"
@@ -20696,7 +20693,7 @@ msgstr "NavigationAgent2D 只能在继承 Node2D 的父节点下使用。"
#: scene/2d/navigation_obstacle_2d.cpp scene/3d/navigation_obstacle.cpp
msgid "Estimate Radius"
-msgstr "估计半径"
+msgstr "估算半径"
#: scene/2d/navigation_obstacle_2d.cpp
msgid ""
@@ -21038,7 +21035,7 @@ msgstr "内部顶点数"
#: scene/2d/position_2d.cpp
msgid "Gizmo Extents"
-msgstr "控制器大小"
+msgstr "小工具范围"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Exclude Parent"
@@ -21788,7 +21785,7 @@ msgid ""
"instead."
msgstr ""
"“Navigation”节点和“Navigation.get_simple_path()”已废弃,会在将来的版本中移"
-"除。请用“NavigationServer.map_get_path()”替代。"
+"除。 请用“NavigationServer.map_get_path()”替代。"
#: scene/3d/navigation.cpp scene/resources/curve.cpp
msgid "Up Vector"
@@ -22612,7 +22609,7 @@ msgstr "矩阵"
#: scene/3d/spatial.cpp
msgid "Gizmo"
-msgstr "控制器"
+msgstr "小工具"
#: scene/3d/spatial_velocity_tracker.cpp
msgid "Track Physics Step"
@@ -22698,6 +22695,14 @@ msgstr "最大力度"
msgid "AABB"
msgstr "AABB"
+#: scene/3d/visual_instance.cpp
+msgid "Sorting"
+msgstr "排序"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr "使用 AABB 中心"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
msgid "Geometry"
msgstr "几何体"
@@ -23859,7 +23864,7 @@ msgstr "拉伸收缩"
#: scene/main/canvas_layer.cpp
msgid "Follow Viewport"
-msgstr "跟随视区"
+msgstr "跟随视口"
#: scene/main/http_request.cpp
msgid "Download File"
@@ -24227,7 +24232,7 @@ msgstr "自定义"
#: scene/register_scene_types.cpp
msgid "Custom Font"
-msgstr "自定字体"
+msgstr "自定义字体"
#: scene/resources/audio_stream_sample.cpp
#: servers/audio/effects/audio_stream_generator.cpp servers/audio_server.cpp
@@ -25198,7 +25203,7 @@ msgstr "亮度"
#: scene/resources/environment.cpp
msgid "Saturation"
-msgstr "对比度"
+msgstr "饱和度"
#: scene/resources/environment.cpp
msgid "Color Correction"
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index f8529ea3ca..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 ""
@@ -13397,9 +13397,10 @@ msgstr "選項"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr ""
@@ -14821,13 +14822,13 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr ""
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr ""
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "不能連接。"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -24070,6 +24071,15 @@ msgstr "錯誤!"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "排序:"
+
+#: scene/3d/visual_instance.cpp
+msgid "Use AABB Center"
+msgstr ""
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index 994c49156e..4d04c45976 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -37,13 +37,15 @@
# marktwtn <marktwtn@gmail.com>, 2022.
# 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-09-07 06:16+0000\n"
-"Last-Translator: Chia-Hsiang Cheng <cche0109@student.monash.edu>\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"
@@ -51,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.14.1-dev\n"
+"X-Generator: Weblate 4.15.1-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -1153,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"
@@ -4147,7 +4149,7 @@ msgstr "刪除配置"
#: editor/editor_node.cpp editor/import_dock.cpp
#: editor/script_create_dialog.cpp
msgid "Default"
-msgstr "默認"
+msgstr "預設"
#: editor/editor_node.cpp editor/editor_resource_picker.cpp
#: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp
@@ -10679,6 +10681,7 @@ msgid "Create Rest Pose from Bones"
msgstr "自骨骼建立靜止姿勢"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton2D"
msgstr "Sekeleton2D"
@@ -10769,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 " [入口生效]"
@@ -12589,9 +12592,10 @@ msgstr "吸附選項"
#: scene/2d/path_2d.cpp scene/2d/polygon_2d.cpp scene/2d/sprite.cpp
#: scene/3d/cpu_particles.cpp scene/3d/label_3d.cpp scene/3d/path.cpp
#: scene/3d/physics_body.cpp scene/3d/soft_body.cpp scene/3d/sprite_3d.cpp
-#: scene/gui/graph_node.cpp scene/gui/rich_text_effect.cpp
-#: scene/main/canvas_layer.cpp scene/resources/material.cpp
-#: scene/resources/particles_material.cpp scene/resources/style_box.cpp
+#: scene/3d/visual_instance.cpp scene/gui/graph_node.cpp
+#: scene/gui/rich_text_effect.cpp scene/main/canvas_layer.cpp
+#: scene/resources/material.cpp scene/resources/particles_material.cpp
+#: scene/resources/style_box.cpp
msgid "Offset"
msgstr "偏移"
@@ -13960,14 +13964,15 @@ msgid "Invalid project path (changed anything?)."
msgstr "不正確的專案路徑(有修改了什麼嗎?)。"
#: editor/project_manager.cpp
+#, fuzzy
msgid ""
-"Couldn't load project.godot in project path (error %d). It may be missing or "
-"corrupted."
+"Couldn't load project at '%s' (error %d). It may be missing or corrupted."
msgstr "無法自專案路徑內載入 project.godot(錯誤 %d)。檔案可能遺失或損毀。"
#: editor/project_manager.cpp
-msgid "Couldn't edit project.godot in project path."
-msgstr "無法在專案路徑中編輯 project.godot。"
+#, fuzzy
+msgid "Couldn't save project at '%s' (error %d)."
+msgstr "無法於「%s」打開專案。"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -17238,7 +17243,7 @@ msgstr "發現本地通訊埠"
#: modules/upnp/upnp.cpp
msgid "Discover IPv6"
-msgstr "DiscoverIPv6"
+msgstr "Discover IPv6"
#: modules/upnp/upnp_device.cpp
#, fuzzy
@@ -17783,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
@@ -18166,7 +18170,7 @@ msgstr "自適應前景 432 X 432"
#: platform/android/export/export_plugin.cpp
msgid "Adaptive Background 432 X 432"
-msgstr ""
+msgstr "自適應背景 432 X 432"
#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
@@ -18199,7 +18203,7 @@ msgstr "剪下節點"
#: platform/android/export/export_plugin.cpp
msgid "Use Custom Build"
-msgstr ""
+msgstr "使用自定義建構"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18232,7 +18236,7 @@ msgstr "除錯工具"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
msgid "Debug Password"
-msgstr ""
+msgstr "偵錯密碼"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18246,7 +18250,7 @@ msgstr "發行"
#: platform/android/export/export_plugin.cpp
msgid "One Click Deploy"
-msgstr ""
+msgstr "一鍵部署"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18255,7 +18259,7 @@ msgstr "偵查前一個實體"
#: platform/android/export/export_plugin.cpp
msgid "Code"
-msgstr ""
+msgstr "程式碼"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
#, fuzzy
@@ -18277,7 +18281,7 @@ msgstr "分類為遊戲"
#: platform/android/export/export_plugin.cpp
msgid "Retain Data On Uninstall"
-msgstr ""
+msgstr "取消安裝時保留資料"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18310,11 +18314,11 @@ msgstr "正在打包"
#: platform/android/export/export_plugin.cpp
msgid "Hand Tracking Frequency"
-msgstr ""
+msgstr "手勢追蹤頻率"
#: platform/android/export/export_plugin.cpp
msgid "Passthrough"
-msgstr ""
+msgstr "穿透"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18348,7 +18352,7 @@ msgstr "使用者界面"
#: platform/android/export/export_plugin.cpp
msgid "Allow"
-msgstr ""
+msgstr "允許"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
#, fuzzy
@@ -18366,7 +18370,7 @@ msgstr "設定表示式"
#: platform/android/export/export_plugin.cpp
msgid "Salt"
-msgstr ""
+msgstr "Salt"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18486,6 +18490,10 @@ msgid ""
"Note that the singleton was also renamed from \"GodotPayments\" to "
"\"GodotGooglePlayBilling\"."
msgstr ""
+"「android/modules」專案設定中包含了無效的「GodotPaymentV3」(在 Godot 3.2.2 "
+"中已更改)。\n"
+"請將其更換為第一方的「GodotGooglePlayBilling」外掛。\n"
+"請注意,該單例已從「GodotPayments」更改為「GodotGooglePlayBilling」。"
#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
@@ -18517,13 +18525,13 @@ msgstr "對「Min Sdk」的修改僅在「Use Custom Build」啟用時有效。"
#: platform/android/export/export_plugin.cpp
msgid "\"Min SDK\" should be a valid integer, but got \"%s\" which is invalid."
-msgstr ""
+msgstr "「最小 SDK」應為有效整數,但目前值為無效的「%s」。"
#: platform/android/export/export_plugin.cpp
msgid ""
"\"Min SDK\" cannot be lower than %d, which is the version needed by the "
"Godot library."
-msgstr ""
+msgstr "「最小 SDK」不可低於 %d,因 Godot 函式庫需要該最小版本。"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18549,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 ""
@@ -18758,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"
@@ -18840,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
@@ -18925,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
@@ -19009,7 +19012,7 @@ msgstr ""
#: platform/javascript/export/export.cpp
msgid "HTML"
-msgstr ""
+msgstr "HTML"
#: platform/javascript/export/export.cpp
#, fuzzy
@@ -19044,7 +19047,7 @@ msgstr ""
#: platform/javascript/export/export.cpp
msgid "Offline Page"
-msgstr ""
+msgstr "離線頁面"
#: platform/javascript/export/export.cpp
msgid "Icon 144 X 144"
@@ -19076,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"
@@ -19151,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."
@@ -19221,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
@@ -19251,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"
@@ -19273,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
@@ -19354,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\"."
@@ -19996,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."
@@ -23173,6 +23159,16 @@ msgstr "錯誤"
msgid "AABB"
msgstr ""
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Sorting"
+msgstr "排序"
+
+#: scene/3d/visual_instance.cpp
+#, fuzzy
+msgid "Use AABB Center"
+msgstr "使用環境通道"
+
#: scene/3d/visual_instance.cpp scene/resources/navigation_mesh.cpp
#, fuzzy
msgid "Geometry"
@@ -26988,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"